@tectra-ng/blocks 0.4.4 → 0.4.5
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.
- package/actions-menu/README.md +9 -1
- package/app-layout/README.md +3 -2
- package/command-palette/README.md +7 -0
- package/console-layout/README.md +24 -0
- package/cookie-notice/README.md +1 -1
- package/fesm2022/tectra-ng-blocks-actions-menu.mjs +37 -15
- package/fesm2022/tectra-ng-blocks-actions-menu.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-app-layout.mjs +19 -2
- package/fesm2022/tectra-ng-blocks-app-layout.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-command-palette.mjs +31 -8
- package/fesm2022/tectra-ng-blocks-command-palette.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-console-layout.mjs +89 -10
- package/fesm2022/tectra-ng-blocks-console-layout.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-cookie-notice.mjs +2 -2
- package/fesm2022/tectra-ng-blocks-cookie-notice.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-filters-panel.mjs +101 -12
- package/fesm2022/tectra-ng-blocks-filters-panel.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-kanban.mjs +102 -17
- package/fesm2022/tectra-ng-blocks-kanban.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-page-header.mjs +2 -2
- package/fesm2022/tectra-ng-blocks-page-header.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-public-header.mjs +17 -3
- package/fesm2022/tectra-ng-blocks-public-header.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-wizard.mjs +145 -8
- package/fesm2022/tectra-ng-blocks-wizard.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks.mjs +1 -1
- package/filters-panel/README.md +20 -1
- package/kanban/README.md +19 -1
- package/package.json +6 -6
- package/page-header/README.md +1 -1
- package/public-header/README.md +6 -0
- package/switch-language/README.md +1 -1
- package/topbar-preferences/README.md +1 -1
- package/types/tectra-ng-blocks-actions-menu.d.ts +9 -0
- package/types/tectra-ng-blocks-actions-menu.d.ts.map +1 -1
- package/types/tectra-ng-blocks-app-layout.d.ts +10 -3
- package/types/tectra-ng-blocks-app-layout.d.ts.map +1 -1
- package/types/tectra-ng-blocks-command-palette.d.ts +38 -5
- package/types/tectra-ng-blocks-command-palette.d.ts.map +1 -1
- package/types/tectra-ng-blocks-console-layout.d.ts +58 -9
- package/types/tectra-ng-blocks-console-layout.d.ts.map +1 -1
- package/types/tectra-ng-blocks-cookie-notice.d.ts +5 -5
- package/types/tectra-ng-blocks-filters-panel.d.ts +48 -4
- package/types/tectra-ng-blocks-filters-panel.d.ts.map +1 -1
- package/types/tectra-ng-blocks-kanban.d.ts +47 -7
- package/types/tectra-ng-blocks-kanban.d.ts.map +1 -1
- package/types/tectra-ng-blocks-public-header.d.ts +9 -2
- package/types/tectra-ng-blocks-public-header.d.ts.map +1 -1
- package/types/tectra-ng-blocks-wizard.d.ts +34 -6
- package/types/tectra-ng-blocks-wizard.d.ts.map +1 -1
- package/types/tectra-ng-blocks.d.ts +1 -1
- package/wizard/README.md +21 -3
package/actions-menu/README.md
CHANGED
|
@@ -13,7 +13,7 @@ readonly actions: TxActionsMenuItem[] = [
|
|
|
13
13
|
];
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Without items nothing is rendered. The button is named by `ariaLabel`, then `tooltip`, then the translated "More actions".
|
|
16
|
+
Without items nothing is rendered. The button is named by `ariaLabel`, then `tooltip`, then the translated "More actions". `open()`, `toggle()` and `close()` drive the menu from code, e.g. from a shortcut or from another button.
|
|
17
17
|
|
|
18
18
|
## Inputs
|
|
19
19
|
| Name | Description |
|
|
@@ -32,6 +32,14 @@ Without items nothing is rendered. The button is named by `ariaLabel`, then `too
|
|
|
32
32
|
|---|---|
|
|
33
33
|
| itemSelect | The id of the chosen action, emitted once the menu has closed |
|
|
34
34
|
|
|
35
|
+
## Methods
|
|
36
|
+
| Name | Description |
|
|
37
|
+
|---|---|
|
|
38
|
+
| open(target?) | Opens the menu at an element or at `event.currentTarget` — a row, a custom button, a context-menu click — or at its own button |
|
|
39
|
+
| toggle(target?) | Closes the menu when it is open at that target, otherwise opens it there |
|
|
40
|
+
| close() | Closes the menu |
|
|
41
|
+
| isOpen | Signal: whether the menu is open |
|
|
42
|
+
|
|
35
43
|
## Keyboard
|
|
36
44
|
| Key | Action |
|
|
37
45
|
|---|---|
|
package/app-layout/README.md
CHANGED
|
@@ -10,7 +10,7 @@ The shell of a signed-in app: a sidebar menu, a top bar, the page and a footer.
|
|
|
10
10
|
</tx-app-layout>
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
`model` takes `TxPanelMenuItem` sections, as `tx-panel-menu` with `variant="sidebar"` draws them: a section with a `label` gets a title, items take `icon`, `routerLink`, `badge
|
|
13
|
+
`model` takes `TxPanelMenuItem` sections, as `tx-panel-menu` with `variant="sidebar"` draws them: a section with a `label` gets a title (an empty label draws none), items take `icon`, `routerLink`, `badge` (a value or a signal), `disabled` (a lock), nested `items` and `active`. Without the sidebar (`[sidebar]="false"`) the top bar shows the logo and the title instead — for pages before the user has a workspace.
|
|
14
14
|
|
|
15
15
|
When the page is printed the sidebar, the top bar and the backdrop are left out and the page content takes the full width of the paper.
|
|
16
16
|
|
|
@@ -28,8 +28,9 @@ When the page is printed the sidebar, the top bar and the backdrop are left out
|
|
|
28
28
|
| backdropVariant | `spectrum` — primary, purple and cyan tints (default); `accent` — tints of the primary colour only |
|
|
29
29
|
| responsive | What the 1024px breakpoint measures: `viewport` — the window (default), `container` — the layout itself; it also keeps the mobile menu, the mask and the backdrop inside it (a preview, a frame) |
|
|
30
30
|
| menuLabel | Name of the menu, its button and the sidebar; the translated "Menu" by default |
|
|
31
|
+
| translate | Translate function of the menu: item labels, section titles and item titles are keys passed through it (as `translate` of `tx-panel-menu`) |
|
|
31
32
|
| dt | Design tokens of this instance (`appLayout`) |
|
|
32
|
-
| pt | Classes and styles of the parts: `root`, `sidebar`, `brand`, `menu`, `topbar`, `menuButton`, `content`, `mask` |
|
|
33
|
+
| pt | Classes and styles of the parts: `root`, `sidebar`, `brand`, `logo`, `menu`, `topbar`, `menuButton`, `content`, `mask` |
|
|
33
34
|
| ptOptions | How `pt` merges with the global pass-through |
|
|
34
35
|
| unstyled | Removes the tectra styles |
|
|
35
36
|
|
|
@@ -15,6 +15,12 @@ A search button for the top bar and a ⌘K / Ctrl K window with grouped results:
|
|
|
15
15
|
|
|
16
16
|
`menuPaletteItems` turns a sidebar menu (`TxPanelMenuItem[]`) into page items; `commandPaletteFilter` matches the label and the sublabel. Both are also exported as functions (`menuPaletteItems()`, `filterPaletteItems()`).
|
|
17
17
|
|
|
18
|
+
The second argument of `menuPaletteItems` is the group (`pages`) or `TxMenuPaletteOptions`: `group`, `translate` — a function that turns the menu labels (translation keys) into text, section and parent titles too — `icon` — a map `{ 'menu-icon': 'palette-icon' }` or a function of the menu item, for menus whose icons are named differently — and `defaultIcon` for items without one (`file`). The pipe is pure: give it a new options object when the language changes.
|
|
19
|
+
|
|
20
|
+
```html
|
|
21
|
+
<tx-command-palette localFilter [items]="menu | menuPaletteItems: { translate: t, icon: { house: 'home' } }" />
|
|
22
|
+
```
|
|
23
|
+
|
|
18
24
|
The window is a dialog with a combobox: the field owns the focus, the active result is announced with `aria-activedescendant`, focus goes back to the button after closing, and the page does not scroll behind it.
|
|
19
25
|
|
|
20
26
|
## Inputs
|
|
@@ -28,6 +34,7 @@ The window is a dialog with a combobox: the field owns the focus, the active res
|
|
|
28
34
|
| loading | A spinner in the field and a "Searching…" row |
|
|
29
35
|
| emptyText | Text when a query finds nothing; translated by default |
|
|
30
36
|
| loadingText | Text of the loading row; translated by default |
|
|
37
|
+
| hintTexts | Own texts of the footer key hints (`TxCommandPaletteHints`: `navigate`, `open`, `close`); a missing or empty one stays translated |
|
|
31
38
|
| minQueryLength | Shortest term `searchChange` sends; shorter terms send `''` (default 2) |
|
|
32
39
|
| debounceTime | Delay in ms before `searchChange` (default 300) |
|
|
33
40
|
| shortcutKey | Key that opens and closes the window with ⌘ / Ctrl (default `k`) |
|
package/console-layout/README.md
CHANGED
|
@@ -54,6 +54,30 @@ The panel goes inside the layout content; it moves the layout footer next to its
|
|
|
54
54
|
| ptOptions | How `pt` merges with the global pass-through |
|
|
55
55
|
| unstyled | Removes the tectra styles |
|
|
56
56
|
|
|
57
|
+
## Inputs — tx-console-rail
|
|
58
|
+
| Name | Description |
|
|
59
|
+
|---|---|
|
|
60
|
+
| items | Required. Sections of the rail (`TxConsoleRailItem[]`) |
|
|
61
|
+
| label | Name of the rail navigation |
|
|
62
|
+
| responsive | When the rail turns into a row under 768px: `viewport` — the window (default), `container` — the nearest container named `tx-console-layout`, `none` — it stays a column. Inside `tx-console-layout` it follows the layout |
|
|
63
|
+
| unstyled | Removes the tectra styles |
|
|
64
|
+
|
|
65
|
+
`tx-console-rail` also works on its own, e.g. next to your own header: it turns into a scrolling row on narrow screens like the rail of the layout. With `responsive="container"` give its frame `container: tx-console-layout / inline-size`.
|
|
66
|
+
|
|
67
|
+
## Console in a wrapper component
|
|
68
|
+
|
|
69
|
+
A panel reads the breakpoint mode and the footer from its console through the `TX_CONSOLE_LAYOUT` token. A panel projected into a component that wraps `tx-console-layout` cannot see the console, because Angular resolves it where it is written. Add `provideTxConsoleLayoutRelay()` to the wrapper's `providers`: the console inside it then reaches the projected panels and moves its footer into them.
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
@Component({
|
|
73
|
+
selector: 'admin-console',
|
|
74
|
+
imports: [TxConsoleLayout],
|
|
75
|
+
providers: [provideTxConsoleLayoutRelay()],
|
|
76
|
+
template: `<tx-console-layout title="Admin" footerName="Admin console" [railItems]="sections"><ng-content /></tx-console-layout>`,
|
|
77
|
+
})
|
|
78
|
+
export class AdminConsole {}
|
|
79
|
+
```
|
|
80
|
+
|
|
57
81
|
## Slots
|
|
58
82
|
| Name | Description |
|
|
59
83
|
|---|---|
|
package/cookie-notice/README.md
CHANGED
|
@@ -6,7 +6,7 @@ A small card in the bottom-left corner that tells the visitor the site keeps onl
|
|
|
6
6
|
<tx-cookie-notice [link]="['/privacy']" sharedDomain="example.com" />
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
The texts are translated and can be replaced. It renders nothing on the server and appears in the browser after a short delay, so it never moves the page. With `sharedDomain` the choice is kept for every subdomain of that domain. While `tx-network-status` shows its pill, the card moves up by the `--tx-bottom-overlay-offset` the pill writes on `<body>`, so the two never cover each other; any other bottom overlay can set that variable too.
|
|
9
|
+
The texts are translated and can be replaced; an empty string or `null` keeps the translated text. It renders nothing on the server and appears in the browser after a short delay, so it never moves the page. With `sharedDomain` the choice is kept for every subdomain of that domain. While `tx-network-status` shows its pill, the card moves up by the `--tx-bottom-overlay-offset` the pill writes on `<body>`, so the two never cover each other; any other bottom overlay can set that variable too.
|
|
10
10
|
|
|
11
11
|
## Inputs
|
|
12
12
|
| Name | Description |
|
|
@@ -24,6 +24,7 @@ var TxActionsMenu = class TxActionsMenu {
|
|
|
24
24
|
actionsMenuTheme = injectTokens(ACTIONS_MENU_THEME);
|
|
25
25
|
popover = viewChild(TxPopover, ...ngDevMode ? [{ debugName: "popover" }] : /* istanbul ignore next */ []);
|
|
26
26
|
list = viewChild("list", ...ngDevMode ? [{ debugName: "list" }] : /* istanbul ignore next */ []);
|
|
27
|
+
trigger = viewChild("trigger", ...ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []);
|
|
27
28
|
pending = null;
|
|
28
29
|
items = input.required(...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
29
30
|
tooltip = input(void 0, ...ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []);
|
|
@@ -47,6 +48,13 @@ var TxActionsMenu = class TxActionsMenu {
|
|
|
47
48
|
}), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
|
|
48
49
|
popoverTokens = { content: { padding: "0" } };
|
|
49
50
|
name = computed(() => this.ariaLabel() ?? this.tooltip() ?? this.translations().moreActions, ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
|
|
51
|
+
isOpen = computed(() => this.popover()?.isOpen() ?? false, ...ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []);
|
|
52
|
+
open(target) {
|
|
53
|
+
this.popover()?.show(target ?? this.trigger()?.nativeElement);
|
|
54
|
+
}
|
|
55
|
+
toggle(target) {
|
|
56
|
+
this.popover()?.toggle(target ?? this.trigger()?.nativeElement);
|
|
57
|
+
}
|
|
50
58
|
close() {
|
|
51
59
|
this.popover()?.hide();
|
|
52
60
|
}
|
|
@@ -153,21 +161,31 @@ var TxActionsMenu = class TxActionsMenu {
|
|
|
153
161
|
},
|
|
154
162
|
classAttribute: "tx-actions-menu"
|
|
155
163
|
},
|
|
156
|
-
viewQueries: [
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
164
|
+
viewQueries: [
|
|
165
|
+
{
|
|
166
|
+
propertyName: "popover",
|
|
167
|
+
first: true,
|
|
168
|
+
predicate: TxPopover,
|
|
169
|
+
descendants: true,
|
|
170
|
+
isSignal: true
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
propertyName: "list",
|
|
174
|
+
first: true,
|
|
175
|
+
predicate: ["list"],
|
|
176
|
+
descendants: true,
|
|
177
|
+
isSignal: true
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
propertyName: "trigger",
|
|
181
|
+
first: true,
|
|
182
|
+
predicate: ["trigger"],
|
|
183
|
+
descendants: true,
|
|
184
|
+
isSignal: true
|
|
185
|
+
}
|
|
186
|
+
],
|
|
169
187
|
ngImport: i0,
|
|
170
|
-
template: "@if (items().length) {\n <button\n txButton\n type=\"button\"\n class=\"tx-actions-menu__trigger\"\n severity=\"secondary\"\n outlined\n icon=\"ellipsis-h\"\n [size]=\"size()\"\n [txTooltip]=\"tooltip()\"\n [txPopoverTrigger]=\"popover\"\n [attr.aria-label]=\"name()\"\n [unstyled]=\"isUnstyled()\"\n [class]=\"passThrough().trigger?.class\"\n [style]=\"passThrough().trigger?.style\"\n ></button>\n <tx-popover #popover [ariaLabel]=\"name()\" [dt]=\"popoverTokens\" [unstyled]=\"isUnstyled()\" (closed)=\"onClosed()\">\n <div\n #list\n class=\"tx-actions-menu__list\"\n role=\"menu\"\n tabindex=\"-1\"\n [attr.aria-label]=\"name()\"\n [attr.data-styled]=\"!isUnstyled() || null\"\n [style]=\"tokenStyle()\"\n [class]=\"passThrough().list?.class\"\n (keydown)=\"onKeydown($event)\"\n >\n @for (item of items(); track item.id) {\n <button\n type=\"button\"\n role=\"menuitem\"\n class=\"tx-actions-menu__item\"\n [class.tx-actions-menu__item--danger]=\"item.danger\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n (click)=\"select(item)\"\n >\n @if (item.icon) {\n <tx-icon\n class=\"tx-actions-menu__icon\"\n aria-hidden=\"true\"\n [name]=\"item.icon\"\n [class]=\"passThrough().icon?.class\"\n [style]=\"passThrough().icon?.style\"\n />\n }\n <span class=\"tx-actions-menu__label\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ item.label }}</span>\n </button>\n }\n </div>\n </tx-popover>\n}\n",
|
|
188
|
+
template: "@if (items().length) {\n <button\n #trigger\n txButton\n type=\"button\"\n class=\"tx-actions-menu__trigger\"\n severity=\"secondary\"\n outlined\n icon=\"ellipsis-h\"\n [size]=\"size()\"\n [txTooltip]=\"tooltip()\"\n [txPopoverTrigger]=\"popover\"\n [attr.aria-label]=\"name()\"\n [unstyled]=\"isUnstyled()\"\n [class]=\"passThrough().trigger?.class\"\n [style]=\"passThrough().trigger?.style\"\n ></button>\n <tx-popover #popover [ariaLabel]=\"name()\" [dt]=\"popoverTokens\" [unstyled]=\"isUnstyled()\" (closed)=\"onClosed()\">\n <div\n #list\n class=\"tx-actions-menu__list\"\n role=\"menu\"\n tabindex=\"-1\"\n [attr.aria-label]=\"name()\"\n [attr.data-styled]=\"!isUnstyled() || null\"\n [style]=\"tokenStyle()\"\n [class]=\"passThrough().list?.class\"\n (keydown)=\"onKeydown($event)\"\n >\n @for (item of items(); track item.id) {\n <button\n type=\"button\"\n role=\"menuitem\"\n class=\"tx-actions-menu__item\"\n [class.tx-actions-menu__item--danger]=\"item.danger\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n (click)=\"select(item)\"\n >\n @if (item.icon) {\n <tx-icon\n class=\"tx-actions-menu__icon\"\n aria-hidden=\"true\"\n [name]=\"item.icon\"\n [class]=\"passThrough().icon?.class\"\n [style]=\"passThrough().icon?.style\"\n />\n }\n <span class=\"tx-actions-menu__label\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ item.label }}</span>\n </button>\n }\n </div>\n </tx-popover>\n}\n",
|
|
171
189
|
styles: [":host{display:inline-flex}.tx-actions-menu__list{display:flex;flex-direction:column}.tx-actions-menu__item{display:flex;align-items:center;width:100%;margin:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;white-space:nowrap;cursor:pointer}.tx-actions-menu__icon{flex-shrink:0}.tx-actions-menu__list[data-styled]{gap:var(--tx-actions-menu-list-gap);min-width:var(--tx-actions-menu-list-min-width);padding:var(--tx-actions-menu-list-padding)}.tx-actions-menu__list[data-styled] .tx-actions-menu__item{gap:var(--tx-actions-menu-item-gap);padding:var(--tx-actions-menu-item-padding-y) var(--tx-actions-menu-item-padding-x);border-radius:var(--tx-actions-menu-item-border-radius);color:var(--tx-actions-menu-item-color);font-family:var(--tx-font-family);font-size:var(--tx-actions-menu-item-font-size);font-weight:var(--tx-actions-menu-item-font-weight);line-height:var(--tx-actions-menu-item-line-height);transition:background-color var(--tx-actions-menu-item-transition-duration)}.tx-actions-menu__list[data-styled] .tx-actions-menu__item:hover{background:var(--tx-actions-menu-item-hover-background)}.tx-actions-menu__list[data-styled] .tx-actions-menu__item:active{background:var(--tx-actions-menu-item-active-background)}.tx-actions-menu__list[data-styled] .tx-actions-menu__item:focus-visible{outline:2px solid var(--tx-actions-menu-item-focus-ring-color);outline-offset:-2px}.tx-actions-menu__list[data-styled] .tx-actions-menu__item--danger{color:var(--tx-actions-menu-item-danger-color)}.tx-actions-menu__list[data-styled] .tx-actions-menu__item--danger:hover{background:var(--tx-actions-menu-item-danger-hover-background)}.tx-actions-menu__list[data-styled] .tx-actions-menu__item--danger:active{background:var(--tx-actions-menu-item-danger-active-background)}@media(prefers-reduced-motion:reduce){.tx-actions-menu__list[data-styled] .tx-actions-menu__item{transition:none}}\n"],
|
|
172
190
|
dependencies: [
|
|
173
191
|
{
|
|
@@ -300,7 +318,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
300
318
|
"[attr.data-size]": "size()"
|
|
301
319
|
},
|
|
302
320
|
viewProviders: [provideTxIconDefaults(ACTIONS_MENU_ICON_DEFAULTS)],
|
|
303
|
-
template: "@if (items().length) {\n <button\n txButton\n type=\"button\"\n class=\"tx-actions-menu__trigger\"\n severity=\"secondary\"\n outlined\n icon=\"ellipsis-h\"\n [size]=\"size()\"\n [txTooltip]=\"tooltip()\"\n [txPopoverTrigger]=\"popover\"\n [attr.aria-label]=\"name()\"\n [unstyled]=\"isUnstyled()\"\n [class]=\"passThrough().trigger?.class\"\n [style]=\"passThrough().trigger?.style\"\n ></button>\n <tx-popover #popover [ariaLabel]=\"name()\" [dt]=\"popoverTokens\" [unstyled]=\"isUnstyled()\" (closed)=\"onClosed()\">\n <div\n #list\n class=\"tx-actions-menu__list\"\n role=\"menu\"\n tabindex=\"-1\"\n [attr.aria-label]=\"name()\"\n [attr.data-styled]=\"!isUnstyled() || null\"\n [style]=\"tokenStyle()\"\n [class]=\"passThrough().list?.class\"\n (keydown)=\"onKeydown($event)\"\n >\n @for (item of items(); track item.id) {\n <button\n type=\"button\"\n role=\"menuitem\"\n class=\"tx-actions-menu__item\"\n [class.tx-actions-menu__item--danger]=\"item.danger\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n (click)=\"select(item)\"\n >\n @if (item.icon) {\n <tx-icon\n class=\"tx-actions-menu__icon\"\n aria-hidden=\"true\"\n [name]=\"item.icon\"\n [class]=\"passThrough().icon?.class\"\n [style]=\"passThrough().icon?.style\"\n />\n }\n <span class=\"tx-actions-menu__label\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ item.label }}</span>\n </button>\n }\n </div>\n </tx-popover>\n}\n",
|
|
321
|
+
template: "@if (items().length) {\n <button\n #trigger\n txButton\n type=\"button\"\n class=\"tx-actions-menu__trigger\"\n severity=\"secondary\"\n outlined\n icon=\"ellipsis-h\"\n [size]=\"size()\"\n [txTooltip]=\"tooltip()\"\n [txPopoverTrigger]=\"popover\"\n [attr.aria-label]=\"name()\"\n [unstyled]=\"isUnstyled()\"\n [class]=\"passThrough().trigger?.class\"\n [style]=\"passThrough().trigger?.style\"\n ></button>\n <tx-popover #popover [ariaLabel]=\"name()\" [dt]=\"popoverTokens\" [unstyled]=\"isUnstyled()\" (closed)=\"onClosed()\">\n <div\n #list\n class=\"tx-actions-menu__list\"\n role=\"menu\"\n tabindex=\"-1\"\n [attr.aria-label]=\"name()\"\n [attr.data-styled]=\"!isUnstyled() || null\"\n [style]=\"tokenStyle()\"\n [class]=\"passThrough().list?.class\"\n (keydown)=\"onKeydown($event)\"\n >\n @for (item of items(); track item.id) {\n <button\n type=\"button\"\n role=\"menuitem\"\n class=\"tx-actions-menu__item\"\n [class.tx-actions-menu__item--danger]=\"item.danger\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n (click)=\"select(item)\"\n >\n @if (item.icon) {\n <tx-icon\n class=\"tx-actions-menu__icon\"\n aria-hidden=\"true\"\n [name]=\"item.icon\"\n [class]=\"passThrough().icon?.class\"\n [style]=\"passThrough().icon?.style\"\n />\n }\n <span class=\"tx-actions-menu__label\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ item.label }}</span>\n </button>\n }\n </div>\n </tx-popover>\n}\n",
|
|
304
322
|
styles: [":host{display:inline-flex}.tx-actions-menu__list{display:flex;flex-direction:column}.tx-actions-menu__item{display:flex;align-items:center;width:100%;margin:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;white-space:nowrap;cursor:pointer}.tx-actions-menu__icon{flex-shrink:0}.tx-actions-menu__list[data-styled]{gap:var(--tx-actions-menu-list-gap);min-width:var(--tx-actions-menu-list-min-width);padding:var(--tx-actions-menu-list-padding)}.tx-actions-menu__list[data-styled] .tx-actions-menu__item{gap:var(--tx-actions-menu-item-gap);padding:var(--tx-actions-menu-item-padding-y) var(--tx-actions-menu-item-padding-x);border-radius:var(--tx-actions-menu-item-border-radius);color:var(--tx-actions-menu-item-color);font-family:var(--tx-font-family);font-size:var(--tx-actions-menu-item-font-size);font-weight:var(--tx-actions-menu-item-font-weight);line-height:var(--tx-actions-menu-item-line-height);transition:background-color var(--tx-actions-menu-item-transition-duration)}.tx-actions-menu__list[data-styled] .tx-actions-menu__item:hover{background:var(--tx-actions-menu-item-hover-background)}.tx-actions-menu__list[data-styled] .tx-actions-menu__item:active{background:var(--tx-actions-menu-item-active-background)}.tx-actions-menu__list[data-styled] .tx-actions-menu__item:focus-visible{outline:2px solid var(--tx-actions-menu-item-focus-ring-color);outline-offset:-2px}.tx-actions-menu__list[data-styled] .tx-actions-menu__item--danger{color:var(--tx-actions-menu-item-danger-color)}.tx-actions-menu__list[data-styled] .tx-actions-menu__item--danger:hover{background:var(--tx-actions-menu-item-danger-hover-background)}.tx-actions-menu__list[data-styled] .tx-actions-menu__item--danger:active{background:var(--tx-actions-menu-item-danger-active-background)}@media(prefers-reduced-motion:reduce){.tx-actions-menu__list[data-styled] .tx-actions-menu__item{transition:none}}\n"]
|
|
305
323
|
}]
|
|
306
324
|
}],
|
|
@@ -313,6 +331,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
313
331
|
type: i0.ViewChild,
|
|
314
332
|
args: ["list", { isSignal: true }]
|
|
315
333
|
}],
|
|
334
|
+
trigger: [{
|
|
335
|
+
type: i0.ViewChild,
|
|
336
|
+
args: ["trigger", { isSignal: true }]
|
|
337
|
+
}],
|
|
316
338
|
items: [{
|
|
317
339
|
type: i0.Input,
|
|
318
340
|
args: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-blocks-actions-menu.mjs","names":[],"sources":["../../../../packages/blocks/actions-menu/src/actions-menu.icons.ts","../../../../packages/blocks/actions-menu/src/actions-menu.theme.ts","../../../../packages/blocks/actions-menu/src/actions-menu.component.ts","../../../../packages/blocks/actions-menu/src/actions-menu.component.html"],"sourcesContent":["import { TxIconSet, txIconEllipsisH, txIconList } from '@tectra-ng/icons';\n\nexport const ACTIONS_MENU_ICON_DEFAULTS: TxIconSet = {\n 'ellipsis-h': txIconEllipsisH,\n list: txIconList,\n};\n","import { actionsMenuTokens } from '@tectra-ng/themes';\n\nexport const ACTIONS_MENU_THEME = {\n actionsMenu: actionsMenuTokens,\n};\n","import { ChangeDetectionStrategy, Component, ElementRef, computed, input, output, viewChild } from '@angular/core';\nimport { nextListIndex } from '@tectra-ng/core/a11y';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TectraActionsMenuTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxButton } from '@tectra-ng/ui/button';\nimport { TxPopover, TxPopoverTrigger } from '@tectra-ng/ui/popover';\nimport { TxTooltip } from '@tectra-ng/ui/tooltip';\nimport { TxActionsMenuItem, TxActionsMenuPart, TxActionsMenuSize } from './actions-menu.types';\nimport { ACTIONS_MENU_ICON_DEFAULTS } from './actions-menu.icons';\nimport { ACTIONS_MENU_THEME } from './actions-menu.theme';\n\nconst MENU_KEYS = new Set(['ArrowDown', 'ArrowUp', 'Home', 'End']);\n\n@Component({\n selector: 'tx-actions-menu',\n imports: [TxButton, TxIcon, TxPopover, TxPopoverTrigger, TxTooltip],\n templateUrl: './actions-menu.component.html',\n styleUrl: './actions-menu.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-actions-menu',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-size]': 'size()',\n },\n viewProviders: [provideTxIconDefaults(ACTIONS_MENU_ICON_DEFAULTS)],\n})\nexport class TxActionsMenu {\n private readonly actionsMenuTheme = injectTokens(ACTIONS_MENU_THEME);\n\n private readonly popover = viewChild(TxPopover);\n private readonly list = viewChild<ElementRef<HTMLElement>>('list');\n private pending: TxActionsMenuItem | null = null;\n\n readonly items = input.required<readonly TxActionsMenuItem[]>();\n readonly tooltip = input<string | undefined>(undefined);\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly size = input<TxActionsMenuSize>('medium');\n readonly dt = input<TectraDeepPartial<TectraActionsMenuTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxActionsMenuPart, TxActionsMenu> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly itemSelect = output<string>();\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('actionsMenu', this, this.pt, this.ptOptions);\n protected readonly translations = injectTranslations();\n protected readonly tokenStyle = computed(() => toStyleObject(this.dt(), '--tx-actions-menu'));\n readonly hostStyle = computed(() => ({ ...this.tokenStyle(), ...this.passThrough().root?.style }));\n protected readonly popoverTokens = { content: { padding: '0' } };\n protected readonly name = computed(() => this.ariaLabel() ?? this.tooltip() ?? this.translations().moreActions);\n\n close(): void {\n this.popover()?.hide();\n }\n\n protected select(item: TxActionsMenuItem): void {\n this.pending = item;\n this.close();\n }\n\n protected onClosed(): void {\n const item = this.pending;\n this.pending = null;\n if (item) {\n this.itemSelect.emit(item.id);\n }\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (!MENU_KEYS.has(event.key)) {\n return;\n }\n const items = Array.from(this.list()?.nativeElement.querySelectorAll<HTMLElement>('[role=\"menuitem\"]') ?? []);\n const current = items.indexOf(event.target as HTMLElement);\n const next = nextListIndex(event.key, { count: items.length, current });\n if (next === null) {\n return;\n }\n event.preventDefault();\n items[next]?.focus();\n }\n}\n","@if (items().length) {\n <button\n txButton\n type=\"button\"\n class=\"tx-actions-menu__trigger\"\n severity=\"secondary\"\n outlined\n icon=\"ellipsis-h\"\n [size]=\"size()\"\n [txTooltip]=\"tooltip()\"\n [txPopoverTrigger]=\"popover\"\n [attr.aria-label]=\"name()\"\n [unstyled]=\"isUnstyled()\"\n [class]=\"passThrough().trigger?.class\"\n [style]=\"passThrough().trigger?.style\"\n ></button>\n <tx-popover #popover [ariaLabel]=\"name()\" [dt]=\"popoverTokens\" [unstyled]=\"isUnstyled()\" (closed)=\"onClosed()\">\n <div\n #list\n class=\"tx-actions-menu__list\"\n role=\"menu\"\n tabindex=\"-1\"\n [attr.aria-label]=\"name()\"\n [attr.data-styled]=\"!isUnstyled() || null\"\n [style]=\"tokenStyle()\"\n [class]=\"passThrough().list?.class\"\n (keydown)=\"onKeydown($event)\"\n >\n @for (item of items(); track item.id) {\n <button\n type=\"button\"\n role=\"menuitem\"\n class=\"tx-actions-menu__item\"\n [class.tx-actions-menu__item--danger]=\"item.danger\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n (click)=\"select(item)\"\n >\n @if (item.icon) {\n <tx-icon\n class=\"tx-actions-menu__icon\"\n aria-hidden=\"true\"\n [name]=\"item.icon\"\n [class]=\"passThrough().icon?.class\"\n [style]=\"passThrough().icon?.style\"\n />\n }\n <span class=\"tx-actions-menu__label\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ item.label }}</span>\n </button>\n }\n </div>\n </tx-popover>\n}\n"],"mappings":";;;;;;;;;;;AAEA,MAAa,6BAAwC;CACnD,cAAc;CACd,MAAM;AACP;ACHD,MAAa,qBAAqB,EAChC,aAAa,kBACd;ACUD,MAAM,4BAAY,IAAI,IAAI;CAAC;CAAa;CAAW;CAAQ;AAAK,CAAC;AAiBjE,IAAa,gBAAb,MAAa,cAAa;CACP,mBAAmB,aAAa,kBAAkB;CAElD,UAAU,UAAU,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAC9B,OAAO,UAAmC,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAC1D,UAAoC;CAEnC,QAAQ,MAAM,SAAwC,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACtD,UAAU,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAC9C,YAAY,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAChD,OAAO,MAAyB,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACzC,KAAK,MAA8D,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;CAC7E,KAAK,MAAmE,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;CAClF,YAAY,MAAwC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAC9D,WAAW,MAAoC,QAAS;EAAA,GAAA,YAAA,EAAA,WAAA,WAAA,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AAA;GAAA,MAAA,CAAA,YAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"tectra-ng-blocks-actions-menu.mjs","names":[],"sources":["../../../../packages/blocks/actions-menu/src/actions-menu.icons.ts","../../../../packages/blocks/actions-menu/src/actions-menu.theme.ts","../../../../packages/blocks/actions-menu/src/actions-menu.component.ts","../../../../packages/blocks/actions-menu/src/actions-menu.component.html"],"sourcesContent":["import { TxIconSet, txIconEllipsisH, txIconList } from '@tectra-ng/icons';\n\nexport const ACTIONS_MENU_ICON_DEFAULTS: TxIconSet = {\n 'ellipsis-h': txIconEllipsisH,\n list: txIconList,\n};\n","import { actionsMenuTokens } from '@tectra-ng/themes';\n\nexport const ACTIONS_MENU_THEME = {\n actionsMenu: actionsMenuTokens,\n};\n","import { ChangeDetectionStrategy, Component, ElementRef, computed, input, output, viewChild } from '@angular/core';\nimport { nextListIndex } from '@tectra-ng/core/a11y';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TectraActionsMenuTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxButton } from '@tectra-ng/ui/button';\nimport { TxPopover, TxPopoverTarget, TxPopoverTrigger } from '@tectra-ng/ui/popover';\nimport { TxTooltip } from '@tectra-ng/ui/tooltip';\nimport { TxActionsMenuItem, TxActionsMenuPart, TxActionsMenuSize } from './actions-menu.types';\nimport { ACTIONS_MENU_ICON_DEFAULTS } from './actions-menu.icons';\nimport { ACTIONS_MENU_THEME } from './actions-menu.theme';\n\nconst MENU_KEYS = new Set(['ArrowDown', 'ArrowUp', 'Home', 'End']);\n\n@Component({\n selector: 'tx-actions-menu',\n imports: [TxButton, TxIcon, TxPopover, TxPopoverTrigger, TxTooltip],\n templateUrl: './actions-menu.component.html',\n styleUrl: './actions-menu.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-actions-menu',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-size]': 'size()',\n },\n viewProviders: [provideTxIconDefaults(ACTIONS_MENU_ICON_DEFAULTS)],\n})\nexport class TxActionsMenu {\n private readonly actionsMenuTheme = injectTokens(ACTIONS_MENU_THEME);\n\n private readonly popover = viewChild(TxPopover);\n private readonly list = viewChild<ElementRef<HTMLElement>>('list');\n private readonly trigger = viewChild<ElementRef<HTMLButtonElement>>('trigger');\n private pending: TxActionsMenuItem | null = null;\n\n readonly items = input.required<readonly TxActionsMenuItem[]>();\n readonly tooltip = input<string | undefined>(undefined);\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly size = input<TxActionsMenuSize>('medium');\n readonly dt = input<TectraDeepPartial<TectraActionsMenuTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxActionsMenuPart, TxActionsMenu> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly itemSelect = output<string>();\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('actionsMenu', this, this.pt, this.ptOptions);\n protected readonly translations = injectTranslations();\n protected readonly tokenStyle = computed(() => toStyleObject(this.dt(), '--tx-actions-menu'));\n readonly hostStyle = computed(() => ({ ...this.tokenStyle(), ...this.passThrough().root?.style }));\n protected readonly popoverTokens = { content: { padding: '0' } };\n protected readonly name = computed(() => this.ariaLabel() ?? this.tooltip() ?? this.translations().moreActions);\n readonly isOpen = computed(() => this.popover()?.isOpen() ?? false);\n\n open(target?: TxPopoverTarget): void {\n this.popover()?.show(target ?? this.trigger()?.nativeElement);\n }\n\n toggle(target?: TxPopoverTarget): void {\n this.popover()?.toggle(target ?? this.trigger()?.nativeElement);\n }\n\n close(): void {\n this.popover()?.hide();\n }\n\n protected select(item: TxActionsMenuItem): void {\n this.pending = item;\n this.close();\n }\n\n protected onClosed(): void {\n const item = this.pending;\n this.pending = null;\n if (item) {\n this.itemSelect.emit(item.id);\n }\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (!MENU_KEYS.has(event.key)) {\n return;\n }\n const items = Array.from(this.list()?.nativeElement.querySelectorAll<HTMLElement>('[role=\"menuitem\"]') ?? []);\n const current = items.indexOf(event.target as HTMLElement);\n const next = nextListIndex(event.key, { count: items.length, current });\n if (next === null) {\n return;\n }\n event.preventDefault();\n items[next]?.focus();\n }\n}\n","@if (items().length) {\n <button\n #trigger\n txButton\n type=\"button\"\n class=\"tx-actions-menu__trigger\"\n severity=\"secondary\"\n outlined\n icon=\"ellipsis-h\"\n [size]=\"size()\"\n [txTooltip]=\"tooltip()\"\n [txPopoverTrigger]=\"popover\"\n [attr.aria-label]=\"name()\"\n [unstyled]=\"isUnstyled()\"\n [class]=\"passThrough().trigger?.class\"\n [style]=\"passThrough().trigger?.style\"\n ></button>\n <tx-popover #popover [ariaLabel]=\"name()\" [dt]=\"popoverTokens\" [unstyled]=\"isUnstyled()\" (closed)=\"onClosed()\">\n <div\n #list\n class=\"tx-actions-menu__list\"\n role=\"menu\"\n tabindex=\"-1\"\n [attr.aria-label]=\"name()\"\n [attr.data-styled]=\"!isUnstyled() || null\"\n [style]=\"tokenStyle()\"\n [class]=\"passThrough().list?.class\"\n (keydown)=\"onKeydown($event)\"\n >\n @for (item of items(); track item.id) {\n <button\n type=\"button\"\n role=\"menuitem\"\n class=\"tx-actions-menu__item\"\n [class.tx-actions-menu__item--danger]=\"item.danger\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n (click)=\"select(item)\"\n >\n @if (item.icon) {\n <tx-icon\n class=\"tx-actions-menu__icon\"\n aria-hidden=\"true\"\n [name]=\"item.icon\"\n [class]=\"passThrough().icon?.class\"\n [style]=\"passThrough().icon?.style\"\n />\n }\n <span class=\"tx-actions-menu__label\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ item.label }}</span>\n </button>\n }\n </div>\n </tx-popover>\n}\n"],"mappings":";;;;;;;;;;;AAEA,MAAa,6BAAwC;CACnD,cAAc;CACd,MAAM;AACP;ACHD,MAAa,qBAAqB,EAChC,aAAa,kBACd;ACUD,MAAM,4BAAY,IAAI,IAAI;CAAC;CAAa;CAAW;CAAQ;AAAK,CAAC;AAiBjE,IAAa,gBAAb,MAAa,cAAa;CACP,mBAAmB,aAAa,kBAAkB;CAElD,UAAU,UAAU,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAC9B,OAAO,UAAmC,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACjD,UAAU,UAAyC,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACtE,UAAoC;CAEnC,QAAQ,MAAM,SAAwC,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACtD,UAAU,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAC9C,YAAY,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAChD,OAAO,MAAyB,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACzC,KAAK,MAA8D,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;CAC7E,KAAK,MAAmE,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;CAClF,YAAY,MAAwC,QAAU,GAAA,YAAA,CAAA,EAAA,W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,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,IAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,IAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,YAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -46,6 +46,7 @@ var TxAppLayout = class TxAppLayout {
|
|
|
46
46
|
backdropVariant = input("spectrum", ...ngDevMode ? [{ debugName: "backdropVariant" }] : /* istanbul ignore next */ []);
|
|
47
47
|
responsive = input("viewport", ...ngDevMode ? [{ debugName: "responsive" }] : /* istanbul ignore next */ []);
|
|
48
48
|
menuLabel = input(void 0, ...ngDevMode ? [{ debugName: "menuLabel" }] : /* istanbul ignore next */ []);
|
|
49
|
+
translate = input(void 0, ...ngDevMode ? [{ debugName: "translate" }] : /* istanbul ignore next */ []);
|
|
49
50
|
dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
|
|
50
51
|
pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
|
|
51
52
|
ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
|
|
@@ -246,6 +247,13 @@ var TxAppLayout = class TxAppLayout {
|
|
|
246
247
|
isRequired: false,
|
|
247
248
|
transformFunction: null
|
|
248
249
|
},
|
|
250
|
+
translate: {
|
|
251
|
+
classPropertyName: "translate",
|
|
252
|
+
publicName: "translate",
|
|
253
|
+
isSignal: true,
|
|
254
|
+
isRequired: false,
|
|
255
|
+
transformFunction: null
|
|
256
|
+
},
|
|
249
257
|
dt: {
|
|
250
258
|
classPropertyName: "dt",
|
|
251
259
|
publicName: "dt",
|
|
@@ -299,7 +307,7 @@ var TxAppLayout = class TxAppLayout {
|
|
|
299
307
|
isSignal: true
|
|
300
308
|
}],
|
|
301
309
|
ngImport: i0,
|
|
302
|
-
template: "@if (backdrop()) {\n <div class=\"tx-app-layout__backdrop\" aria-hidden=\"true\" [attr.data-variant]=\"backdropVariant()\"></div>\n}\n@if (sidebar()) {\n <div class=\"tx-app-layout__slot\">\n <aside\n class=\"tx-app-layout__sidebar\"\n [id]=\"id + '-sidebar'\"\n [attr.aria-label]=\"menuName()\"\n [attr.inert]=\"mobile() && !mobileOpen() ? '' : null\"\n [class]=\"passThrough().sidebar?.class\"\n [style]=\"passThrough().sidebar?.style\"\n (mouseenter)=\"setHovered(true)\"\n (mouseleave)=\"setHovered(false)\"\n (focusin)=\"onFocusIn($event)\"\n (focusout)=\"onFocusOut($event)\"\n >\n <div class=\"tx-app-layout__sidebar-header\">\n @if (homeLink() !== undefined) {\n <a class=\"tx-app-layout__brand\" [routerLink]=\"homeLink()\" [attr.aria-label]=\"title() ?? null\" [class]=\"passThrough().brand?.class\" [style]=\"passThrough().brand?.style\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </a>\n } @else {\n <span class=\"tx-app-layout__brand\" [class]=\"passThrough().brand?.class\" [style]=\"passThrough().brand?.style\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </span>\n }\n <button\n type=\"button\"\n class=\"tx-app-layout__anchor\"\n tooltipPlacement=\"right\"\n [attr.aria-pressed]=\"anchored()\"\n [attr.aria-label]=\"anchored() ? translations().unpinMenu : translations().pinMenu\"\n [txTooltip]=\"anchored() ? translations().unpinMenu : translations().pinMenu\"\n (click)=\"toggleAnchored()\"\n >\n <tx-icon class=\"tx-app-layout__pin-icon\" aria-hidden=\"true\" name=\"thumbtack\" [class.tx-app-layout__pin-icon--on]=\"!anchored()\" />\n <tx-icon class=\"tx-app-layout__pin-icon\" aria-hidden=\"true\" name=\"angle-double-left\" [class.tx-app-layout__pin-icon--on]=\"anchored()\" />\n </button>\n </div>\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- picks inside the menu are its own links and tree items -->\n <div class=\"tx-app-layout__menu\" (click)=\"onSidebarClick($event)\">\n <tx-panel-menu\n variant=\"sidebar\"\n [ariaLabel]=\"menuName()\"\n [model]=\"model()\"\n [collapsed]=\"!wide()\"\n [unstyled]=\"isUnstyled()\"\n [class]=\"passThrough().menu?.class\"\n [style]=\"passThrough().menu?.style\"\n />\n </div>\n </aside>\n </div>\n <div class=\"tx-app-layout__mask\" aria-hidden=\"true\" [class]=\"passThrough().mask?.class\" [style]=\"passThrough().mask?.style\" (click)=\"closeMobile()\"></div>\n}\n<div class=\"tx-app-layout__column\">\n <header class=\"tx-app-layout__topbar\" [class]=\"passThrough().topbar?.class\" [style]=\"passThrough().topbar?.style\">\n @if (sidebar()) {\n <button\n #menuButton\n type=\"button\"\n class=\"tx-app-layout__menu-button\"\n [attr.aria-label]=\"menuName()\"\n [attr.aria-expanded]=\"mobileOpen()\"\n [attr.aria-controls]=\"id + '-sidebar'\"\n [class]=\"passThrough().menuButton?.class\"\n [style]=\"passThrough().menuButton?.style\"\n (click)=\"toggleMobile()\"\n >\n <tx-icon name=\"bars\" aria-hidden=\"true\" />\n </button>\n } @else {\n @if (homeLink() !== undefined) {\n <a class=\"tx-app-layout__plain-brand\" [routerLink]=\"homeLink()\" [attr.aria-label]=\"title() ?? null\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </a>\n } @else {\n <span class=\"tx-app-layout__plain-brand\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </span>\n }\n }\n <div class=\"tx-app-layout__topbar-end\">\n <ng-content select=\"[txAppTopbar]\" />\n </div>\n </header>\n <div class=\"tx-app-layout__wrapper\">\n <main class=\"tx-app-layout__content\" [class]=\"passThrough().content?.class\" [style]=\"passThrough().content?.style\">\n <ng-content />\n </main>\n <ng-content select=\"[txAppFooter]\" />\n </div>\n</div>\n\n<ng-template #brand>\n @if (logo()) {\n <img class=\"tx-app-layout__logo\" alt=\"\" [src]=\"logo()\" />\n }\n @if (title()) {\n <span class=\"tx-app-layout__name\">{{ title() }}</span>\n }\n</ng-template>\n",
|
|
310
|
+
template: "@if (backdrop()) {\n <div class=\"tx-app-layout__backdrop\" aria-hidden=\"true\" [attr.data-variant]=\"backdropVariant()\"></div>\n}\n@if (sidebar()) {\n <div class=\"tx-app-layout__slot\">\n <aside\n class=\"tx-app-layout__sidebar\"\n [id]=\"id + '-sidebar'\"\n [attr.aria-label]=\"menuName()\"\n [attr.inert]=\"mobile() && !mobileOpen() ? '' : null\"\n [class]=\"passThrough().sidebar?.class\"\n [style]=\"passThrough().sidebar?.style\"\n (mouseenter)=\"setHovered(true)\"\n (mouseleave)=\"setHovered(false)\"\n (focusin)=\"onFocusIn($event)\"\n (focusout)=\"onFocusOut($event)\"\n >\n <div class=\"tx-app-layout__sidebar-header\">\n @if (homeLink() !== undefined) {\n <a class=\"tx-app-layout__brand\" [routerLink]=\"homeLink()\" [attr.aria-label]=\"title() ?? null\" [class]=\"passThrough().brand?.class\" [style]=\"passThrough().brand?.style\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </a>\n } @else {\n <span class=\"tx-app-layout__brand\" [class]=\"passThrough().brand?.class\" [style]=\"passThrough().brand?.style\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </span>\n }\n <button\n type=\"button\"\n class=\"tx-app-layout__anchor\"\n tooltipPlacement=\"right\"\n [attr.aria-pressed]=\"anchored()\"\n [attr.aria-label]=\"anchored() ? translations().unpinMenu : translations().pinMenu\"\n [txTooltip]=\"anchored() ? translations().unpinMenu : translations().pinMenu\"\n (click)=\"toggleAnchored()\"\n >\n <tx-icon class=\"tx-app-layout__pin-icon\" aria-hidden=\"true\" name=\"thumbtack\" [class.tx-app-layout__pin-icon--on]=\"!anchored()\" />\n <tx-icon class=\"tx-app-layout__pin-icon\" aria-hidden=\"true\" name=\"angle-double-left\" [class.tx-app-layout__pin-icon--on]=\"anchored()\" />\n </button>\n </div>\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- picks inside the menu are its own links and tree items -->\n <div class=\"tx-app-layout__menu\" (click)=\"onSidebarClick($event)\">\n <tx-panel-menu\n variant=\"sidebar\"\n [ariaLabel]=\"menuName()\"\n [model]=\"model()\"\n [translate]=\"translate()\"\n [collapsed]=\"!wide()\"\n [unstyled]=\"isUnstyled()\"\n [class]=\"passThrough().menu?.class\"\n [style]=\"passThrough().menu?.style\"\n />\n </div>\n </aside>\n </div>\n <div class=\"tx-app-layout__mask\" aria-hidden=\"true\" [class]=\"passThrough().mask?.class\" [style]=\"passThrough().mask?.style\" (click)=\"closeMobile()\"></div>\n}\n<div class=\"tx-app-layout__column\">\n <header class=\"tx-app-layout__topbar\" [class]=\"passThrough().topbar?.class\" [style]=\"passThrough().topbar?.style\">\n @if (sidebar()) {\n <button\n #menuButton\n type=\"button\"\n class=\"tx-app-layout__menu-button\"\n [attr.aria-label]=\"menuName()\"\n [attr.aria-expanded]=\"mobileOpen()\"\n [attr.aria-controls]=\"id + '-sidebar'\"\n [class]=\"passThrough().menuButton?.class\"\n [style]=\"passThrough().menuButton?.style\"\n (click)=\"toggleMobile()\"\n >\n <tx-icon name=\"bars\" aria-hidden=\"true\" />\n </button>\n } @else {\n @if (homeLink() !== undefined) {\n <a class=\"tx-app-layout__plain-brand\" [routerLink]=\"homeLink()\" [attr.aria-label]=\"title() ?? null\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </a>\n } @else {\n <span class=\"tx-app-layout__plain-brand\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </span>\n }\n }\n <div class=\"tx-app-layout__topbar-end\">\n <ng-content select=\"[txAppTopbar]\" />\n </div>\n </header>\n <div class=\"tx-app-layout__wrapper\">\n <main class=\"tx-app-layout__content\" [class]=\"passThrough().content?.class\" [style]=\"passThrough().content?.style\">\n <ng-content />\n </main>\n <ng-content select=\"[txAppFooter]\" />\n </div>\n</div>\n\n<ng-template #brand>\n @if (logo()) {\n <img class=\"tx-app-layout__logo\" alt=\"\" [src]=\"logo()\" [class]=\"passThrough().logo?.class\" [style]=\"passThrough().logo?.style\" />\n }\n @if (title()) {\n <span class=\"tx-app-layout__name\">{{ title() }}</span>\n }\n</ng-template>\n",
|
|
303
311
|
styles: [":host{position:relative;display:flex;isolation:isolate}:host([data-responsive=container]){container:tx-app-layout/inline-size;contain:layout}.tx-app-layout__backdrop{position:fixed;inset:0;z-index:-1;pointer-events:none}.tx-app-layout__slot{position:sticky;flex-shrink:0}.tx-app-layout__sidebar{position:absolute;top:0;left:0;display:flex;flex-direction:column;box-sizing:border-box;height:100%}.tx-app-layout__sidebar-header{display:flex;flex-shrink:0;align-items:center;overflow:hidden}.tx-app-layout__brand,.tx-app-layout__plain-brand{display:inline-flex;align-items:center;color:inherit;text-decoration:none}.tx-app-layout__name{white-space:nowrap;text-box:trim-both cap alphabetic}.tx-app-layout__anchor{display:none;flex-shrink:0;place-items:center;margin-inline-start:auto;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}.tx-app-layout__menu{flex:1;min-height:0;overflow:hidden}.tx-app-layout__mask{position:fixed;inset:0;display:none}.tx-app-layout__column{display:flex;flex:1;flex-direction:column;min-width:0}.tx-app-layout__topbar{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box}.tx-app-layout__menu-button{display:none;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}.tx-app-layout__topbar-end{display:flex;flex:1;align-items:center;justify-content:flex-end;min-width:0}.tx-app-layout__wrapper{display:flex;flex:1;flex-direction:column;box-sizing:border-box}.tx-app-layout__content{flex:1;width:100%}.tx-app-layout__pin-icon{grid-area:1/1}:host(.tx-app-layout--wide) .tx-app-layout__anchor{display:inline-grid}:host(.tx-app-layout--wide) .tx-app-layout__menu{overflow:auto}:host([data-styled]){min-height:var(--tx-app-layout-min-height);background:var(--tx-app-layout-background);color:var(--tx-app-layout-color);font-family:var(--tx-font-family)}:host([data-styled]) .tx-app-layout__backdrop{background:var(--tx-app-layout-backdrop-spectrum)}:host([data-styled]) .tx-app-layout__backdrop[data-variant=accent]{background:var(--tx-app-layout-backdrop-accent)}:host([data-styled]) .tx-app-layout__backdrop:after{position:absolute;inset:0;background-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>\");background-size:var(--tx-app-layout-backdrop-noise-size) var(--tx-app-layout-backdrop-noise-size);opacity:var(--tx-app-layout-backdrop-noise-opacity);content:\"\"}:host([data-styled]):has(.tx-app-layout__backdrop){background:transparent}:host([data-styled]) .tx-app-layout__slot{top:var(--tx-app-layout-top-offset);z-index:var(--tx-app-layout-sidebar-z-index);width:var(--tx-app-layout-sidebar-rail-width);height:calc(var(--tx-app-layout-viewport-height) - var(--tx-app-layout-top-offset));transition:width var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-styled]) .tx-app-layout__sidebar{z-index:var(--tx-app-layout-sidebar-z-index);width:var(--tx-app-layout-sidebar-rail-width);border-inline-end:1px solid var(--tx-app-layout-sidebar-border-color);background:var(--tx-app-layout-sidebar-background);transition:width var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-styled]) .tx-app-layout__sidebar-header{height:var(--tx-app-layout-sidebar-header-height);padding-inline-start:calc((var(--tx-app-layout-sidebar-rail-width) - var(--tx-app-layout-sidebar-logo-size)) / 2);border-bottom:1px solid var(--tx-app-layout-sidebar-border-color);transition:padding var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-styled]) .tx-app-layout__brand{color:var(--tx-app-layout-sidebar-name-color)}:host([data-styled]) .tx-app-layout__brand .tx-app-layout__logo{flex-shrink:0;width:var(--tx-app-layout-sidebar-logo-size);height:var(--tx-app-layout-sidebar-logo-size)}:host([data-styled]) .tx-app-layout__brand .tx-app-layout__name{width:0;overflow:hidden;opacity:0;font-size:var(--tx-app-layout-sidebar-name-font-size);font-weight:var(--tx-app-layout-sidebar-name-font-weight);letter-spacing:var(--tx-app-layout-sidebar-name-letter-spacing);transition:opacity var(--tx-app-layout-sidebar-name-hide-duration)}:host([data-styled]) .tx-app-layout__anchor{width:var(--tx-app-layout-sidebar-pin-size);height:var(--tx-app-layout-sidebar-pin-size);border-radius:var(--tx-app-layout-sidebar-pin-border-radius);color:var(--tx-app-layout-sidebar-pin-color);font-size:var(--tx-app-layout-sidebar-pin-icon-size);transition:background-color var(--tx-motion-duration) var(--tx-motion-easing),color var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__anchor:hover{background:var(--tx-app-layout-sidebar-pin-hover-background);color:var(--tx-app-layout-sidebar-pin-hover-color)}:host([data-styled]) .tx-app-layout__anchor:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:-2px}:host([data-styled]) .tx-app-layout__pin-icon{opacity:0;scale:.5;rotate:-45deg;transition:opacity var(--tx-app-layout-sidebar-pin-swap-duration) var(--tx-motion-easing),scale var(--tx-app-layout-sidebar-pin-swap-duration) var(--tx-motion-easing),rotate var(--tx-app-layout-sidebar-pin-swap-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__pin-icon--on{opacity:1;scale:1;rotate:0deg}:host([data-styled]) .tx-app-layout__sidebar{--tx-app-layout-menu-indent1: var(--tx-panel-menu-sidebar-indent1);--tx-app-layout-menu-indent2: var(--tx-panel-menu-sidebar-indent2);--tx-app-layout-menu-indent3: var(--tx-panel-menu-sidebar-indent3);--tx-app-layout-menu-badge-start: var(--tx-panel-menu-sidebar-collapsed-badge-start);--tx-app-layout-menu-lock-start: var(--tx-panel-menu-sidebar-collapsed-lock-start);--tx-app-layout-menu-shift: calc( (var(--tx-app-layout-sidebar-rail-width) - var(--tx-panel-menu-sidebar-icon-size)) / 2 - var(--tx-app-layout-sidebar-menu-item-inset) - var(--tx-panel-menu-sidebar-indent1) )}:host([data-styled]) .tx-app-layout__menu{--tx-panel-menu-sidebar-indent1: calc(var(--tx-app-layout-menu-indent1) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-indent2: calc(var(--tx-app-layout-menu-indent2) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-indent3: calc(var(--tx-app-layout-menu-indent3) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-collapsed-badge-start: calc(var(--tx-app-layout-menu-badge-start) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-collapsed-lock-start: calc(var(--tx-app-layout-menu-lock-start) + var(--tx-app-layout-menu-shift));padding:var(--tx-app-layout-sidebar-menu-padding);scrollbar-color:var(--tx-app-layout-sidebar-scrollbar-color) transparent;scrollbar-width:thin}:host([data-styled]) .tx-app-layout__mask{z-index:var(--tx-app-layout-mask-z-index);background:var(--tx-app-layout-mask-background);animation:tx-app-layout-fade var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__topbar{gap:var(--tx-app-layout-topbar-gap);min-height:var(--tx-app-layout-topbar-min-height);padding:var(--tx-app-layout-topbar-padding);background:var(--tx-app-layout-topbar-background)}:host([data-styled]) .tx-app-layout__menu-button{width:var(--tx-app-layout-menu-button-size);height:var(--tx-app-layout-menu-button-size);margin-inline-end:var(--tx-app-layout-menu-button-margin-end);border-radius:var(--tx-app-layout-menu-button-border-radius);color:var(--tx-app-layout-menu-button-color);font-size:var(--tx-app-layout-menu-button-icon-size);transition:background-color var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__menu-button:hover{background:var(--tx-app-layout-menu-button-hover-background)}:host([data-styled]) .tx-app-layout__menu-button:focus-visible{outline:none;box-shadow:var(--tx-app-layout-menu-button-focus-ring-shadow)}:host([data-styled]) .tx-app-layout__wrapper{padding:var(--tx-app-layout-content-padding)}:host([data-styled]) .tx-app-layout__content{max-width:var(--tx-app-layout-content-max-width);margin-inline:auto}:host([data-styled].tx-app-layout--wide) .tx-app-layout__sidebar{width:var(--tx-app-layout-sidebar-width)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__sidebar-header{padding:var(--tx-app-layout-sidebar-header-padding)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__brand{gap:var(--tx-app-layout-sidebar-brand-gap)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__brand .tx-app-layout__name{width:auto;opacity:1;transition-duration:var(--tx-app-layout-sidebar-name-reveal-duration)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__anchor{animation:tx-app-layout-fade var(--tx-motion-duration) linear}:host([data-styled].tx-app-layout--anchored) .tx-app-layout__slot{width:var(--tx-app-layout-sidebar-width)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__topbar{padding-inline:var(--tx-app-layout-plain-padding)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__plain-brand{gap:var(--tx-app-layout-plain-brand-gap);color:var(--tx-app-layout-plain-color)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__plain-brand .tx-app-layout__logo{width:var(--tx-app-layout-plain-logo-size);height:var(--tx-app-layout-plain-logo-size)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__plain-brand .tx-app-layout__name{font-size:var(--tx-app-layout-plain-name-font-size);font-weight:var(--tx-app-layout-plain-name-font-weight);line-height:var(--tx-app-layout-plain-name-line-height)}@media(width<1024px){:host([data-responsive=viewport]) .tx-app-layout__slot{position:static}:host([data-responsive=viewport]) .tx-app-layout__sidebar{position:fixed;transform:translate(-100%)}:host([data-responsive=viewport].tx-app-layout--open) .tx-app-layout__sidebar{transform:none}:host([data-responsive=viewport].tx-app-layout--open) .tx-app-layout__mask{display:block}:host([data-responsive=viewport]) .tx-app-layout__menu-button{display:inline-flex}:host([data-responsive=viewport]) .tx-app-layout__anchor{display:none}:host([data-responsive=viewport][data-styled]) .tx-app-layout__slot{width:0;height:auto}:host([data-responsive=viewport][data-styled]) .tx-app-layout__sidebar{top:var(--tx-app-layout-top-offset);height:calc(var(--tx-app-layout-viewport-height) - var(--tx-app-layout-top-offset));width:var(--tx-app-layout-sidebar-width);transition:transform var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-responsive=viewport][data-styled]) .tx-app-layout__topbar{padding-inline-start:var(--tx-app-layout-topbar-mobile-padding-start)}:host([data-responsive=viewport][data-styled]) .tx-app-layout__wrapper{padding:var(--tx-app-layout-content-mobile-padding)}}@container tx-app-layout (width < 1024px){:host([data-responsive=container]) .tx-app-layout__slot{position:static}:host([data-responsive=container]) .tx-app-layout__sidebar{position:fixed;transform:translate(-100%)}:host([data-responsive=container].tx-app-layout--open) .tx-app-layout__sidebar{transform:none}:host([data-responsive=container].tx-app-layout--open) .tx-app-layout__mask{display:block}:host([data-responsive=container]) .tx-app-layout__menu-button{display:inline-flex}:host([data-responsive=container]) .tx-app-layout__anchor{display:none}:host([data-responsive=container][data-styled]) .tx-app-layout__slot{width:0;height:auto}:host([data-responsive=container][data-styled]) .tx-app-layout__sidebar{top:var(--tx-app-layout-top-offset);height:calc(var(--tx-app-layout-viewport-height) - var(--tx-app-layout-top-offset));width:var(--tx-app-layout-sidebar-width);transition:transform var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-responsive=container][data-styled]) .tx-app-layout__topbar{padding-inline-start:var(--tx-app-layout-topbar-mobile-padding-start)}:host([data-responsive=container][data-styled]) .tx-app-layout__wrapper{padding:var(--tx-app-layout-content-mobile-padding)}}@keyframes tx-app-layout-fade{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-app-layout__slot,:host([data-styled]) .tx-app-layout__sidebar,:host([data-styled]) .tx-app-layout__sidebar-header,:host([data-styled]) .tx-app-layout__menu-button,:host([data-styled]) .tx-app-layout__anchor,:host([data-styled]) .tx-app-layout__pin-icon{transition:none}:host([data-styled]) .tx-app-layout__mask{animation:none}:host([data-styled].tx-app-layout--wide) .tx-app-layout__anchor{animation:none}:host([data-styled]) .tx-app-layout__brand .tx-app-layout__name{transition:none}}@media print{:host,:host([data-styled]){display:block;min-height:0;background:none;isolation:auto}:host .tx-app-layout__backdrop,:host .tx-app-layout__slot,:host .tx-app-layout__mask,:host .tx-app-layout__topbar{display:none!important}:host .tx-app-layout__column,:host .tx-app-layout__wrapper{display:block}:host .tx-app-layout__wrapper{padding:0!important}:host .tx-app-layout__content{max-width:none!important;margin:0!important}}\n"],
|
|
304
312
|
dependencies: [
|
|
305
313
|
{
|
|
@@ -349,6 +357,7 @@ var TxAppLayout = class TxAppLayout {
|
|
|
349
357
|
"expandedKeys",
|
|
350
358
|
"badgeMax",
|
|
351
359
|
"ariaLabel",
|
|
360
|
+
"translate",
|
|
352
361
|
"dt",
|
|
353
362
|
"pt",
|
|
354
363
|
"ptOptions",
|
|
@@ -419,7 +428,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
419
428
|
"(keydown.escape)": "closeFromKeyboard()"
|
|
420
429
|
},
|
|
421
430
|
viewProviders: [provideTxIconDefaults(APP_LAYOUT_ICON_DEFAULTS)],
|
|
422
|
-
template: "@if (backdrop()) {\n <div class=\"tx-app-layout__backdrop\" aria-hidden=\"true\" [attr.data-variant]=\"backdropVariant()\"></div>\n}\n@if (sidebar()) {\n <div class=\"tx-app-layout__slot\">\n <aside\n class=\"tx-app-layout__sidebar\"\n [id]=\"id + '-sidebar'\"\n [attr.aria-label]=\"menuName()\"\n [attr.inert]=\"mobile() && !mobileOpen() ? '' : null\"\n [class]=\"passThrough().sidebar?.class\"\n [style]=\"passThrough().sidebar?.style\"\n (mouseenter)=\"setHovered(true)\"\n (mouseleave)=\"setHovered(false)\"\n (focusin)=\"onFocusIn($event)\"\n (focusout)=\"onFocusOut($event)\"\n >\n <div class=\"tx-app-layout__sidebar-header\">\n @if (homeLink() !== undefined) {\n <a class=\"tx-app-layout__brand\" [routerLink]=\"homeLink()\" [attr.aria-label]=\"title() ?? null\" [class]=\"passThrough().brand?.class\" [style]=\"passThrough().brand?.style\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </a>\n } @else {\n <span class=\"tx-app-layout__brand\" [class]=\"passThrough().brand?.class\" [style]=\"passThrough().brand?.style\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </span>\n }\n <button\n type=\"button\"\n class=\"tx-app-layout__anchor\"\n tooltipPlacement=\"right\"\n [attr.aria-pressed]=\"anchored()\"\n [attr.aria-label]=\"anchored() ? translations().unpinMenu : translations().pinMenu\"\n [txTooltip]=\"anchored() ? translations().unpinMenu : translations().pinMenu\"\n (click)=\"toggleAnchored()\"\n >\n <tx-icon class=\"tx-app-layout__pin-icon\" aria-hidden=\"true\" name=\"thumbtack\" [class.tx-app-layout__pin-icon--on]=\"!anchored()\" />\n <tx-icon class=\"tx-app-layout__pin-icon\" aria-hidden=\"true\" name=\"angle-double-left\" [class.tx-app-layout__pin-icon--on]=\"anchored()\" />\n </button>\n </div>\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- picks inside the menu are its own links and tree items -->\n <div class=\"tx-app-layout__menu\" (click)=\"onSidebarClick($event)\">\n <tx-panel-menu\n variant=\"sidebar\"\n [ariaLabel]=\"menuName()\"\n [model]=\"model()\"\n [collapsed]=\"!wide()\"\n [unstyled]=\"isUnstyled()\"\n [class]=\"passThrough().menu?.class\"\n [style]=\"passThrough().menu?.style\"\n />\n </div>\n </aside>\n </div>\n <div class=\"tx-app-layout__mask\" aria-hidden=\"true\" [class]=\"passThrough().mask?.class\" [style]=\"passThrough().mask?.style\" (click)=\"closeMobile()\"></div>\n}\n<div class=\"tx-app-layout__column\">\n <header class=\"tx-app-layout__topbar\" [class]=\"passThrough().topbar?.class\" [style]=\"passThrough().topbar?.style\">\n @if (sidebar()) {\n <button\n #menuButton\n type=\"button\"\n class=\"tx-app-layout__menu-button\"\n [attr.aria-label]=\"menuName()\"\n [attr.aria-expanded]=\"mobileOpen()\"\n [attr.aria-controls]=\"id + '-sidebar'\"\n [class]=\"passThrough().menuButton?.class\"\n [style]=\"passThrough().menuButton?.style\"\n (click)=\"toggleMobile()\"\n >\n <tx-icon name=\"bars\" aria-hidden=\"true\" />\n </button>\n } @else {\n @if (homeLink() !== undefined) {\n <a class=\"tx-app-layout__plain-brand\" [routerLink]=\"homeLink()\" [attr.aria-label]=\"title() ?? null\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </a>\n } @else {\n <span class=\"tx-app-layout__plain-brand\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </span>\n }\n }\n <div class=\"tx-app-layout__topbar-end\">\n <ng-content select=\"[txAppTopbar]\" />\n </div>\n </header>\n <div class=\"tx-app-layout__wrapper\">\n <main class=\"tx-app-layout__content\" [class]=\"passThrough().content?.class\" [style]=\"passThrough().content?.style\">\n <ng-content />\n </main>\n <ng-content select=\"[txAppFooter]\" />\n </div>\n</div>\n\n<ng-template #brand>\n @if (logo()) {\n <img class=\"tx-app-layout__logo\" alt=\"\" [src]=\"logo()\" />\n }\n @if (title()) {\n <span class=\"tx-app-layout__name\">{{ title() }}</span>\n }\n</ng-template>\n",
|
|
431
|
+
template: "@if (backdrop()) {\n <div class=\"tx-app-layout__backdrop\" aria-hidden=\"true\" [attr.data-variant]=\"backdropVariant()\"></div>\n}\n@if (sidebar()) {\n <div class=\"tx-app-layout__slot\">\n <aside\n class=\"tx-app-layout__sidebar\"\n [id]=\"id + '-sidebar'\"\n [attr.aria-label]=\"menuName()\"\n [attr.inert]=\"mobile() && !mobileOpen() ? '' : null\"\n [class]=\"passThrough().sidebar?.class\"\n [style]=\"passThrough().sidebar?.style\"\n (mouseenter)=\"setHovered(true)\"\n (mouseleave)=\"setHovered(false)\"\n (focusin)=\"onFocusIn($event)\"\n (focusout)=\"onFocusOut($event)\"\n >\n <div class=\"tx-app-layout__sidebar-header\">\n @if (homeLink() !== undefined) {\n <a class=\"tx-app-layout__brand\" [routerLink]=\"homeLink()\" [attr.aria-label]=\"title() ?? null\" [class]=\"passThrough().brand?.class\" [style]=\"passThrough().brand?.style\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </a>\n } @else {\n <span class=\"tx-app-layout__brand\" [class]=\"passThrough().brand?.class\" [style]=\"passThrough().brand?.style\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </span>\n }\n <button\n type=\"button\"\n class=\"tx-app-layout__anchor\"\n tooltipPlacement=\"right\"\n [attr.aria-pressed]=\"anchored()\"\n [attr.aria-label]=\"anchored() ? translations().unpinMenu : translations().pinMenu\"\n [txTooltip]=\"anchored() ? translations().unpinMenu : translations().pinMenu\"\n (click)=\"toggleAnchored()\"\n >\n <tx-icon class=\"tx-app-layout__pin-icon\" aria-hidden=\"true\" name=\"thumbtack\" [class.tx-app-layout__pin-icon--on]=\"!anchored()\" />\n <tx-icon class=\"tx-app-layout__pin-icon\" aria-hidden=\"true\" name=\"angle-double-left\" [class.tx-app-layout__pin-icon--on]=\"anchored()\" />\n </button>\n </div>\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- picks inside the menu are its own links and tree items -->\n <div class=\"tx-app-layout__menu\" (click)=\"onSidebarClick($event)\">\n <tx-panel-menu\n variant=\"sidebar\"\n [ariaLabel]=\"menuName()\"\n [model]=\"model()\"\n [translate]=\"translate()\"\n [collapsed]=\"!wide()\"\n [unstyled]=\"isUnstyled()\"\n [class]=\"passThrough().menu?.class\"\n [style]=\"passThrough().menu?.style\"\n />\n </div>\n </aside>\n </div>\n <div class=\"tx-app-layout__mask\" aria-hidden=\"true\" [class]=\"passThrough().mask?.class\" [style]=\"passThrough().mask?.style\" (click)=\"closeMobile()\"></div>\n}\n<div class=\"tx-app-layout__column\">\n <header class=\"tx-app-layout__topbar\" [class]=\"passThrough().topbar?.class\" [style]=\"passThrough().topbar?.style\">\n @if (sidebar()) {\n <button\n #menuButton\n type=\"button\"\n class=\"tx-app-layout__menu-button\"\n [attr.aria-label]=\"menuName()\"\n [attr.aria-expanded]=\"mobileOpen()\"\n [attr.aria-controls]=\"id + '-sidebar'\"\n [class]=\"passThrough().menuButton?.class\"\n [style]=\"passThrough().menuButton?.style\"\n (click)=\"toggleMobile()\"\n >\n <tx-icon name=\"bars\" aria-hidden=\"true\" />\n </button>\n } @else {\n @if (homeLink() !== undefined) {\n <a class=\"tx-app-layout__plain-brand\" [routerLink]=\"homeLink()\" [attr.aria-label]=\"title() ?? null\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </a>\n } @else {\n <span class=\"tx-app-layout__plain-brand\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </span>\n }\n }\n <div class=\"tx-app-layout__topbar-end\">\n <ng-content select=\"[txAppTopbar]\" />\n </div>\n </header>\n <div class=\"tx-app-layout__wrapper\">\n <main class=\"tx-app-layout__content\" [class]=\"passThrough().content?.class\" [style]=\"passThrough().content?.style\">\n <ng-content />\n </main>\n <ng-content select=\"[txAppFooter]\" />\n </div>\n</div>\n\n<ng-template #brand>\n @if (logo()) {\n <img class=\"tx-app-layout__logo\" alt=\"\" [src]=\"logo()\" [class]=\"passThrough().logo?.class\" [style]=\"passThrough().logo?.style\" />\n }\n @if (title()) {\n <span class=\"tx-app-layout__name\">{{ title() }}</span>\n }\n</ng-template>\n",
|
|
423
432
|
styles: [":host{position:relative;display:flex;isolation:isolate}:host([data-responsive=container]){container:tx-app-layout/inline-size;contain:layout}.tx-app-layout__backdrop{position:fixed;inset:0;z-index:-1;pointer-events:none}.tx-app-layout__slot{position:sticky;flex-shrink:0}.tx-app-layout__sidebar{position:absolute;top:0;left:0;display:flex;flex-direction:column;box-sizing:border-box;height:100%}.tx-app-layout__sidebar-header{display:flex;flex-shrink:0;align-items:center;overflow:hidden}.tx-app-layout__brand,.tx-app-layout__plain-brand{display:inline-flex;align-items:center;color:inherit;text-decoration:none}.tx-app-layout__name{white-space:nowrap;text-box:trim-both cap alphabetic}.tx-app-layout__anchor{display:none;flex-shrink:0;place-items:center;margin-inline-start:auto;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}.tx-app-layout__menu{flex:1;min-height:0;overflow:hidden}.tx-app-layout__mask{position:fixed;inset:0;display:none}.tx-app-layout__column{display:flex;flex:1;flex-direction:column;min-width:0}.tx-app-layout__topbar{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box}.tx-app-layout__menu-button{display:none;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}.tx-app-layout__topbar-end{display:flex;flex:1;align-items:center;justify-content:flex-end;min-width:0}.tx-app-layout__wrapper{display:flex;flex:1;flex-direction:column;box-sizing:border-box}.tx-app-layout__content{flex:1;width:100%}.tx-app-layout__pin-icon{grid-area:1/1}:host(.tx-app-layout--wide) .tx-app-layout__anchor{display:inline-grid}:host(.tx-app-layout--wide) .tx-app-layout__menu{overflow:auto}:host([data-styled]){min-height:var(--tx-app-layout-min-height);background:var(--tx-app-layout-background);color:var(--tx-app-layout-color);font-family:var(--tx-font-family)}:host([data-styled]) .tx-app-layout__backdrop{background:var(--tx-app-layout-backdrop-spectrum)}:host([data-styled]) .tx-app-layout__backdrop[data-variant=accent]{background:var(--tx-app-layout-backdrop-accent)}:host([data-styled]) .tx-app-layout__backdrop:after{position:absolute;inset:0;background-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>\");background-size:var(--tx-app-layout-backdrop-noise-size) var(--tx-app-layout-backdrop-noise-size);opacity:var(--tx-app-layout-backdrop-noise-opacity);content:\"\"}:host([data-styled]):has(.tx-app-layout__backdrop){background:transparent}:host([data-styled]) .tx-app-layout__slot{top:var(--tx-app-layout-top-offset);z-index:var(--tx-app-layout-sidebar-z-index);width:var(--tx-app-layout-sidebar-rail-width);height:calc(var(--tx-app-layout-viewport-height) - var(--tx-app-layout-top-offset));transition:width var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-styled]) .tx-app-layout__sidebar{z-index:var(--tx-app-layout-sidebar-z-index);width:var(--tx-app-layout-sidebar-rail-width);border-inline-end:1px solid var(--tx-app-layout-sidebar-border-color);background:var(--tx-app-layout-sidebar-background);transition:width var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-styled]) .tx-app-layout__sidebar-header{height:var(--tx-app-layout-sidebar-header-height);padding-inline-start:calc((var(--tx-app-layout-sidebar-rail-width) - var(--tx-app-layout-sidebar-logo-size)) / 2);border-bottom:1px solid var(--tx-app-layout-sidebar-border-color);transition:padding var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-styled]) .tx-app-layout__brand{color:var(--tx-app-layout-sidebar-name-color)}:host([data-styled]) .tx-app-layout__brand .tx-app-layout__logo{flex-shrink:0;width:var(--tx-app-layout-sidebar-logo-size);height:var(--tx-app-layout-sidebar-logo-size)}:host([data-styled]) .tx-app-layout__brand .tx-app-layout__name{width:0;overflow:hidden;opacity:0;font-size:var(--tx-app-layout-sidebar-name-font-size);font-weight:var(--tx-app-layout-sidebar-name-font-weight);letter-spacing:var(--tx-app-layout-sidebar-name-letter-spacing);transition:opacity var(--tx-app-layout-sidebar-name-hide-duration)}:host([data-styled]) .tx-app-layout__anchor{width:var(--tx-app-layout-sidebar-pin-size);height:var(--tx-app-layout-sidebar-pin-size);border-radius:var(--tx-app-layout-sidebar-pin-border-radius);color:var(--tx-app-layout-sidebar-pin-color);font-size:var(--tx-app-layout-sidebar-pin-icon-size);transition:background-color var(--tx-motion-duration) var(--tx-motion-easing),color var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__anchor:hover{background:var(--tx-app-layout-sidebar-pin-hover-background);color:var(--tx-app-layout-sidebar-pin-hover-color)}:host([data-styled]) .tx-app-layout__anchor:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:-2px}:host([data-styled]) .tx-app-layout__pin-icon{opacity:0;scale:.5;rotate:-45deg;transition:opacity var(--tx-app-layout-sidebar-pin-swap-duration) var(--tx-motion-easing),scale var(--tx-app-layout-sidebar-pin-swap-duration) var(--tx-motion-easing),rotate var(--tx-app-layout-sidebar-pin-swap-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__pin-icon--on{opacity:1;scale:1;rotate:0deg}:host([data-styled]) .tx-app-layout__sidebar{--tx-app-layout-menu-indent1: var(--tx-panel-menu-sidebar-indent1);--tx-app-layout-menu-indent2: var(--tx-panel-menu-sidebar-indent2);--tx-app-layout-menu-indent3: var(--tx-panel-menu-sidebar-indent3);--tx-app-layout-menu-badge-start: var(--tx-panel-menu-sidebar-collapsed-badge-start);--tx-app-layout-menu-lock-start: var(--tx-panel-menu-sidebar-collapsed-lock-start);--tx-app-layout-menu-shift: calc( (var(--tx-app-layout-sidebar-rail-width) - var(--tx-panel-menu-sidebar-icon-size)) / 2 - var(--tx-app-layout-sidebar-menu-item-inset) - var(--tx-panel-menu-sidebar-indent1) )}:host([data-styled]) .tx-app-layout__menu{--tx-panel-menu-sidebar-indent1: calc(var(--tx-app-layout-menu-indent1) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-indent2: calc(var(--tx-app-layout-menu-indent2) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-indent3: calc(var(--tx-app-layout-menu-indent3) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-collapsed-badge-start: calc(var(--tx-app-layout-menu-badge-start) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-collapsed-lock-start: calc(var(--tx-app-layout-menu-lock-start) + var(--tx-app-layout-menu-shift));padding:var(--tx-app-layout-sidebar-menu-padding);scrollbar-color:var(--tx-app-layout-sidebar-scrollbar-color) transparent;scrollbar-width:thin}:host([data-styled]) .tx-app-layout__mask{z-index:var(--tx-app-layout-mask-z-index);background:var(--tx-app-layout-mask-background);animation:tx-app-layout-fade var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__topbar{gap:var(--tx-app-layout-topbar-gap);min-height:var(--tx-app-layout-topbar-min-height);padding:var(--tx-app-layout-topbar-padding);background:var(--tx-app-layout-topbar-background)}:host([data-styled]) .tx-app-layout__menu-button{width:var(--tx-app-layout-menu-button-size);height:var(--tx-app-layout-menu-button-size);margin-inline-end:var(--tx-app-layout-menu-button-margin-end);border-radius:var(--tx-app-layout-menu-button-border-radius);color:var(--tx-app-layout-menu-button-color);font-size:var(--tx-app-layout-menu-button-icon-size);transition:background-color var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__menu-button:hover{background:var(--tx-app-layout-menu-button-hover-background)}:host([data-styled]) .tx-app-layout__menu-button:focus-visible{outline:none;box-shadow:var(--tx-app-layout-menu-button-focus-ring-shadow)}:host([data-styled]) .tx-app-layout__wrapper{padding:var(--tx-app-layout-content-padding)}:host([data-styled]) .tx-app-layout__content{max-width:var(--tx-app-layout-content-max-width);margin-inline:auto}:host([data-styled].tx-app-layout--wide) .tx-app-layout__sidebar{width:var(--tx-app-layout-sidebar-width)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__sidebar-header{padding:var(--tx-app-layout-sidebar-header-padding)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__brand{gap:var(--tx-app-layout-sidebar-brand-gap)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__brand .tx-app-layout__name{width:auto;opacity:1;transition-duration:var(--tx-app-layout-sidebar-name-reveal-duration)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__anchor{animation:tx-app-layout-fade var(--tx-motion-duration) linear}:host([data-styled].tx-app-layout--anchored) .tx-app-layout__slot{width:var(--tx-app-layout-sidebar-width)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__topbar{padding-inline:var(--tx-app-layout-plain-padding)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__plain-brand{gap:var(--tx-app-layout-plain-brand-gap);color:var(--tx-app-layout-plain-color)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__plain-brand .tx-app-layout__logo{width:var(--tx-app-layout-plain-logo-size);height:var(--tx-app-layout-plain-logo-size)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__plain-brand .tx-app-layout__name{font-size:var(--tx-app-layout-plain-name-font-size);font-weight:var(--tx-app-layout-plain-name-font-weight);line-height:var(--tx-app-layout-plain-name-line-height)}@media(width<1024px){:host([data-responsive=viewport]) .tx-app-layout__slot{position:static}:host([data-responsive=viewport]) .tx-app-layout__sidebar{position:fixed;transform:translate(-100%)}:host([data-responsive=viewport].tx-app-layout--open) .tx-app-layout__sidebar{transform:none}:host([data-responsive=viewport].tx-app-layout--open) .tx-app-layout__mask{display:block}:host([data-responsive=viewport]) .tx-app-layout__menu-button{display:inline-flex}:host([data-responsive=viewport]) .tx-app-layout__anchor{display:none}:host([data-responsive=viewport][data-styled]) .tx-app-layout__slot{width:0;height:auto}:host([data-responsive=viewport][data-styled]) .tx-app-layout__sidebar{top:var(--tx-app-layout-top-offset);height:calc(var(--tx-app-layout-viewport-height) - var(--tx-app-layout-top-offset));width:var(--tx-app-layout-sidebar-width);transition:transform var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-responsive=viewport][data-styled]) .tx-app-layout__topbar{padding-inline-start:var(--tx-app-layout-topbar-mobile-padding-start)}:host([data-responsive=viewport][data-styled]) .tx-app-layout__wrapper{padding:var(--tx-app-layout-content-mobile-padding)}}@container tx-app-layout (width < 1024px){:host([data-responsive=container]) .tx-app-layout__slot{position:static}:host([data-responsive=container]) .tx-app-layout__sidebar{position:fixed;transform:translate(-100%)}:host([data-responsive=container].tx-app-layout--open) .tx-app-layout__sidebar{transform:none}:host([data-responsive=container].tx-app-layout--open) .tx-app-layout__mask{display:block}:host([data-responsive=container]) .tx-app-layout__menu-button{display:inline-flex}:host([data-responsive=container]) .tx-app-layout__anchor{display:none}:host([data-responsive=container][data-styled]) .tx-app-layout__slot{width:0;height:auto}:host([data-responsive=container][data-styled]) .tx-app-layout__sidebar{top:var(--tx-app-layout-top-offset);height:calc(var(--tx-app-layout-viewport-height) - var(--tx-app-layout-top-offset));width:var(--tx-app-layout-sidebar-width);transition:transform var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-responsive=container][data-styled]) .tx-app-layout__topbar{padding-inline-start:var(--tx-app-layout-topbar-mobile-padding-start)}:host([data-responsive=container][data-styled]) .tx-app-layout__wrapper{padding:var(--tx-app-layout-content-mobile-padding)}}@keyframes tx-app-layout-fade{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-app-layout__slot,:host([data-styled]) .tx-app-layout__sidebar,:host([data-styled]) .tx-app-layout__sidebar-header,:host([data-styled]) .tx-app-layout__menu-button,:host([data-styled]) .tx-app-layout__anchor,:host([data-styled]) .tx-app-layout__pin-icon{transition:none}:host([data-styled]) .tx-app-layout__mask{animation:none}:host([data-styled].tx-app-layout--wide) .tx-app-layout__anchor{animation:none}:host([data-styled]) .tx-app-layout__brand .tx-app-layout__name{transition:none}}@media print{:host,:host([data-styled]){display:block;min-height:0;background:none;isolation:auto}:host .tx-app-layout__backdrop,:host .tx-app-layout__slot,:host .tx-app-layout__mask,:host .tx-app-layout__topbar{display:none!important}:host .tx-app-layout__column,:host .tx-app-layout__wrapper{display:block}:host .tx-app-layout__wrapper{padding:0!important}:host .tx-app-layout__content{max-width:none!important;margin:0!important}}\n"]
|
|
424
433
|
}]
|
|
425
434
|
}],
|
|
@@ -520,6 +529,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
520
529
|
required: false
|
|
521
530
|
}]
|
|
522
531
|
}],
|
|
532
|
+
translate: [{
|
|
533
|
+
type: i0.Input,
|
|
534
|
+
args: [{
|
|
535
|
+
isSignal: true,
|
|
536
|
+
alias: "translate",
|
|
537
|
+
required: false
|
|
538
|
+
}]
|
|
539
|
+
}],
|
|
523
540
|
dt: [{
|
|
524
541
|
type: i0.Input,
|
|
525
542
|
args: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-blocks-app-layout.mjs","names":[],"sources":["../../../../packages/blocks/app-layout/src/app-layout.icons.ts","../../../../packages/blocks/app-layout/src/app-layout.theme.ts","../../../../packages/blocks/app-layout/src/app-layout.component.ts","../../../../packages/blocks/app-layout/src/app-layout.component.html"],"sourcesContent":["import { TxIconSet, txIconAngleDoubleLeft, txIconBars, txIconSidebar, txIconThumbtack } from '@tectra-ng/icons';\n\nexport const APP_LAYOUT_ICON_DEFAULTS: TxIconSet = {\n 'angle-double-left': txIconAngleDoubleLeft,\n bars: txIconBars,\n sidebar: txIconSidebar,\n thumbtack: txIconThumbtack,\n};\n","import { appLayoutTokens, panelMenuTokens } from '@tectra-ng/themes';\n\nexport const APP_LAYOUT_THEME = {\n appLayout: appLayoutTokens,\n panelMenu: panelMenuTokens,\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DOCUMENT,\n DestroyRef,\n ElementRef,\n OnInit,\n afterNextRender,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n signal,\n viewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NavigationEnd, Router, RouterLink } from '@angular/router';\nimport { uniqueId } from '@tectra-ng/core/a11y';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TectraAppLayoutTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxPanelMenu, TxPanelMenuItem } from '@tectra-ng/ui/panel-menu';\nimport { TxTooltip } from '@tectra-ng/ui/tooltip';\nimport { filter } from 'rxjs';\nimport { TxAppLayoutBackdrop, TxAppLayoutPart, TxAppLayoutResponsive } from './app-layout.types';\nimport { APP_LAYOUT_ICON_DEFAULTS } from './app-layout.icons';\nimport { APP_LAYOUT_THEME } from './app-layout.theme';\n\nconst MOBILE_WIDTH = 1024;\nconst PICKED = 'a[href], [role=\"treeitem\"]:not([aria-expanded])';\n\n@Component({\n selector: 'tx-app-layout',\n imports: [NgTemplateOutlet, RouterLink, TxIcon, TxPanelMenu, TxTooltip],\n templateUrl: './app-layout.component.html',\n styleUrl: './app-layout.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-app-layout',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.title]': 'null',\n '[attr.data-responsive]': 'responsive()',\n '[class.tx-app-layout--plain]': '!sidebar()',\n '[class.tx-app-layout--anchored]': 'sidebar() && anchored()',\n '[class.tx-app-layout--wide]': 'sidebar() && wide()',\n '[class.tx-app-layout--open]': 'sidebar() && mobileOpen()',\n '(keydown.escape)': 'closeFromKeyboard()',\n },\n viewProviders: [provideTxIconDefaults(APP_LAYOUT_ICON_DEFAULTS)],\n})\nexport class TxAppLayout implements OnInit {\n private readonly appLayoutTheme = injectTokens(APP_LAYOUT_THEME);\n\n private readonly document = inject(DOCUMENT);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly menuButton = viewChild<ElementRef<HTMLButtonElement>>('menuButton');\n\n readonly model = input<TxPanelMenuItem[]>([]);\n readonly logo = input<string | undefined>(undefined);\n readonly title = input<string | undefined>(undefined);\n readonly homeLink = input<string | readonly unknown[] | undefined>('/');\n readonly sidebar = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly anchored = model(true);\n readonly stateKey = input<string | undefined>(undefined);\n readonly backdrop = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly backdropVariant = input<TxAppLayoutBackdrop>('spectrum');\n readonly responsive = input<TxAppLayoutResponsive>('viewport');\n readonly menuLabel = input<string | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraAppLayoutTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxAppLayoutPart, TxAppLayout> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('appLayout', this, this.pt, this.ptOptions);\n protected readonly translations = injectTranslations();\n protected readonly id = uniqueId('tx-app-layout');\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-app-layout'), ...this.passThrough().root?.style }));\n\n readonly mobile = signal(false);\n readonly mobileOpen = signal(false);\n private readonly hovered = signal(false);\n private readonly focused = signal(false);\n readonly expanded = computed(() => this.anchored() || this.hovered() || this.focused());\n readonly wide = computed(() => this.mobile() || this.expanded());\n protected readonly menuName = computed(() => this.menuLabel() ?? this.translations().menu);\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n inject(Router, { optional: true })\n ?.events.pipe(\n filter((event) => event instanceof NavigationEnd),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.mobileOpen.set(false));\n afterNextRender(() => {\n const view = this.document.defaultView;\n if (!view) {\n return;\n }\n const update = (mobile: boolean) => {\n this.mobile.set(mobile);\n if (!mobile) {\n this.mobileOpen.set(false);\n }\n };\n if (this.responsive() === 'container' && 'ResizeObserver' in view) {\n const observer = new view.ResizeObserver(([entry]) => update(entry.contentRect.width < MOBILE_WIDTH));\n observer.observe(this.host.nativeElement);\n destroyRef.onDestroy(() => observer.disconnect());\n return;\n }\n const media = view.matchMedia?.(`(width < ${MOBILE_WIDTH}px)`);\n if (media) {\n const change = () => update(media.matches);\n change();\n media.addEventListener?.('change', change);\n destroyRef.onDestroy(() => media.removeEventListener?.('change', change));\n }\n });\n }\n\n ngOnInit(): void {\n const stored = this.readAnchored();\n if (stored !== null) {\n this.anchored.set(stored);\n }\n }\n\n toggleAnchored(): void {\n const next = !this.anchored();\n this.anchored.set(next);\n this.hovered.set(true);\n this.writeAnchored(next);\n }\n\n toggleMobile(): void {\n this.mobileOpen.update((open) => !open);\n }\n\n closeMobile(): void {\n this.mobileOpen.set(false);\n }\n\n protected setHovered(hovered: boolean): void {\n this.hovered.set(hovered);\n }\n\n protected onFocusIn(event: FocusEvent): void {\n this.focused.set((event.target as HTMLElement | null)?.matches(':focus-visible') ?? false);\n }\n\n protected onFocusOut(event: FocusEvent): void {\n const next = event.relatedTarget as Node | null;\n if (!next || !(event.currentTarget as HTMLElement).contains(next)) {\n this.focused.set(false);\n }\n }\n\n protected onSidebarClick(event: Event): void {\n if (this.mobile() && (event.target as HTMLElement | null)?.closest(PICKED)) {\n this.mobileOpen.set(false);\n }\n }\n\n protected closeFromKeyboard(): void {\n if (this.mobileOpen()) {\n this.mobileOpen.set(false);\n this.menuButton()?.nativeElement.focus();\n }\n }\n\n private storage(): Storage | null {\n try {\n return this.document.defaultView?.localStorage ?? null;\n } catch {\n return null;\n }\n }\n\n private readAnchored(): boolean | null {\n const key = this.stateKey();\n if (!key) {\n return null;\n }\n try {\n const value = this.storage()?.getItem(key);\n return value === null || value === undefined ? null : value === 'true';\n } catch {\n return null;\n }\n }\n\n private writeAnchored(value: boolean): void {\n const key = this.stateKey();\n if (!key) {\n return;\n }\n try {\n this.storage()?.setItem(key, String(value));\n } catch {\n return;\n }\n }\n}\n","@if (backdrop()) {\n <div class=\"tx-app-layout__backdrop\" aria-hidden=\"true\" [attr.data-variant]=\"backdropVariant()\"></div>\n}\n@if (sidebar()) {\n <div class=\"tx-app-layout__slot\">\n <aside\n class=\"tx-app-layout__sidebar\"\n [id]=\"id + '-sidebar'\"\n [attr.aria-label]=\"menuName()\"\n [attr.inert]=\"mobile() && !mobileOpen() ? '' : null\"\n [class]=\"passThrough().sidebar?.class\"\n [style]=\"passThrough().sidebar?.style\"\n (mouseenter)=\"setHovered(true)\"\n (mouseleave)=\"setHovered(false)\"\n (focusin)=\"onFocusIn($event)\"\n (focusout)=\"onFocusOut($event)\"\n >\n <div class=\"tx-app-layout__sidebar-header\">\n @if (homeLink() !== undefined) {\n <a class=\"tx-app-layout__brand\" [routerLink]=\"homeLink()\" [attr.aria-label]=\"title() ?? null\" [class]=\"passThrough().brand?.class\" [style]=\"passThrough().brand?.style\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </a>\n } @else {\n <span class=\"tx-app-layout__brand\" [class]=\"passThrough().brand?.class\" [style]=\"passThrough().brand?.style\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </span>\n }\n <button\n type=\"button\"\n class=\"tx-app-layout__anchor\"\n tooltipPlacement=\"right\"\n [attr.aria-pressed]=\"anchored()\"\n [attr.aria-label]=\"anchored() ? translations().unpinMenu : translations().pinMenu\"\n [txTooltip]=\"anchored() ? translations().unpinMenu : translations().pinMenu\"\n (click)=\"toggleAnchored()\"\n >\n <tx-icon class=\"tx-app-layout__pin-icon\" aria-hidden=\"true\" name=\"thumbtack\" [class.tx-app-layout__pin-icon--on]=\"!anchored()\" />\n <tx-icon class=\"tx-app-layout__pin-icon\" aria-hidden=\"true\" name=\"angle-double-left\" [class.tx-app-layout__pin-icon--on]=\"anchored()\" />\n </button>\n </div>\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- picks inside the menu are its own links and tree items -->\n <div class=\"tx-app-layout__menu\" (click)=\"onSidebarClick($event)\">\n <tx-panel-menu\n variant=\"sidebar\"\n [ariaLabel]=\"menuName()\"\n [model]=\"model()\"\n [collapsed]=\"!wide()\"\n [unstyled]=\"isUnstyled()\"\n [class]=\"passThrough().menu?.class\"\n [style]=\"passThrough().menu?.style\"\n />\n </div>\n </aside>\n </div>\n <div class=\"tx-app-layout__mask\" aria-hidden=\"true\" [class]=\"passThrough().mask?.class\" [style]=\"passThrough().mask?.style\" (click)=\"closeMobile()\"></div>\n}\n<div class=\"tx-app-layout__column\">\n <header class=\"tx-app-layout__topbar\" [class]=\"passThrough().topbar?.class\" [style]=\"passThrough().topbar?.style\">\n @if (sidebar()) {\n <button\n #menuButton\n type=\"button\"\n class=\"tx-app-layout__menu-button\"\n [attr.aria-label]=\"menuName()\"\n [attr.aria-expanded]=\"mobileOpen()\"\n [attr.aria-controls]=\"id + '-sidebar'\"\n [class]=\"passThrough().menuButton?.class\"\n [style]=\"passThrough().menuButton?.style\"\n (click)=\"toggleMobile()\"\n >\n <tx-icon name=\"bars\" aria-hidden=\"true\" />\n </button>\n } @else {\n @if (homeLink() !== undefined) {\n <a class=\"tx-app-layout__plain-brand\" [routerLink]=\"homeLink()\" [attr.aria-label]=\"title() ?? null\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </a>\n } @else {\n <span class=\"tx-app-layout__plain-brand\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </span>\n }\n }\n <div class=\"tx-app-layout__topbar-end\">\n <ng-content select=\"[txAppTopbar]\" />\n </div>\n </header>\n <div class=\"tx-app-layout__wrapper\">\n <main class=\"tx-app-layout__content\" [class]=\"passThrough().content?.class\" [style]=\"passThrough().content?.style\">\n <ng-content />\n </main>\n <ng-content select=\"[txAppFooter]\" />\n </div>\n</div>\n\n<ng-template #brand>\n @if (logo()) {\n <img class=\"tx-app-layout__logo\" alt=\"\" [src]=\"logo()\" />\n }\n @if (title()) {\n <span class=\"tx-app-layout__name\">{{ title() }}</span>\n }\n</ng-template>\n"],"mappings":";;;;;;;;;;;;;;AAEA,MAAa,2BAAsC;CACjD,qBAAqB;CACrB,MAAM;CACN,SAAS;CACT,WAAW;AACZ;ACLD,MAAa,mBAAmB;CAC9B,WAAW;CACX,WAAW;AACZ;AC2BD,MAAM,eAAe;AACrB,MAAM,SAAS;AAuBf,IAAa,cAAb,MAAa,YAAW;CACL,iBAAiB,aAAa,gBAAgB;CAE9C,WAAW,OAAO,QAAQ;CAC1B,OAAO,OAAgC,UAAU;CACjD,aAAa,UAAyC,cAAa,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAE3E,QAAQ,MAAyB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACpC,OAAO,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAC3C,QAAQ,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAC5C,WAAW,MAA+C,KAAI,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAC9D,UAAU,MAAwB,MAAI;EAAA,GAAA,YAAA,EAAA,WAAA,UAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACrE,WAAW,MAAM,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CACtB,WAAW,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAC/C,WAAW,MAAwB,OAAK;EAAA,GAA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,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"tectra-ng-blocks-app-layout.mjs","names":[],"sources":["../../../../packages/blocks/app-layout/src/app-layout.icons.ts","../../../../packages/blocks/app-layout/src/app-layout.theme.ts","../../../../packages/blocks/app-layout/src/app-layout.component.ts","../../../../packages/blocks/app-layout/src/app-layout.component.html"],"sourcesContent":["import { TxIconSet, txIconAngleDoubleLeft, txIconBars, txIconSidebar, txIconThumbtack } from '@tectra-ng/icons';\n\nexport const APP_LAYOUT_ICON_DEFAULTS: TxIconSet = {\n 'angle-double-left': txIconAngleDoubleLeft,\n bars: txIconBars,\n sidebar: txIconSidebar,\n thumbtack: txIconThumbtack,\n};\n","import { appLayoutTokens, panelMenuTokens } from '@tectra-ng/themes';\n\nexport const APP_LAYOUT_THEME = {\n appLayout: appLayoutTokens,\n panelMenu: panelMenuTokens,\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DOCUMENT,\n DestroyRef,\n ElementRef,\n OnInit,\n afterNextRender,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n signal,\n viewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NavigationEnd, Router, RouterLink } from '@angular/router';\nimport { uniqueId } from '@tectra-ng/core/a11y';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TectraAppLayoutTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxPanelMenu, TxPanelMenuItem, TxPanelMenuTranslate } from '@tectra-ng/ui/panel-menu';\nimport { TxTooltip } from '@tectra-ng/ui/tooltip';\nimport { filter } from 'rxjs';\nimport { TxAppLayoutBackdrop, TxAppLayoutPart, TxAppLayoutResponsive } from './app-layout.types';\nimport { APP_LAYOUT_ICON_DEFAULTS } from './app-layout.icons';\nimport { APP_LAYOUT_THEME } from './app-layout.theme';\n\nconst MOBILE_WIDTH = 1024;\nconst PICKED = 'a[href], [role=\"treeitem\"]:not([aria-expanded])';\n\n@Component({\n selector: 'tx-app-layout',\n imports: [NgTemplateOutlet, RouterLink, TxIcon, TxPanelMenu, TxTooltip],\n templateUrl: './app-layout.component.html',\n styleUrl: './app-layout.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-app-layout',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.title]': 'null',\n '[attr.data-responsive]': 'responsive()',\n '[class.tx-app-layout--plain]': '!sidebar()',\n '[class.tx-app-layout--anchored]': 'sidebar() && anchored()',\n '[class.tx-app-layout--wide]': 'sidebar() && wide()',\n '[class.tx-app-layout--open]': 'sidebar() && mobileOpen()',\n '(keydown.escape)': 'closeFromKeyboard()',\n },\n viewProviders: [provideTxIconDefaults(APP_LAYOUT_ICON_DEFAULTS)],\n})\nexport class TxAppLayout implements OnInit {\n private readonly appLayoutTheme = injectTokens(APP_LAYOUT_THEME);\n\n private readonly document = inject(DOCUMENT);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly menuButton = viewChild<ElementRef<HTMLButtonElement>>('menuButton');\n\n readonly model = input<TxPanelMenuItem[]>([]);\n readonly logo = input<string | undefined>(undefined);\n readonly title = input<string | undefined>(undefined);\n readonly homeLink = input<string | readonly unknown[] | undefined>('/');\n readonly sidebar = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly anchored = model(true);\n readonly stateKey = input<string | undefined>(undefined);\n readonly backdrop = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly backdropVariant = input<TxAppLayoutBackdrop>('spectrum');\n readonly responsive = input<TxAppLayoutResponsive>('viewport');\n readonly menuLabel = input<string | undefined>(undefined);\n readonly translate = input<TxPanelMenuTranslate | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraAppLayoutTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxAppLayoutPart, TxAppLayout> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('appLayout', this, this.pt, this.ptOptions);\n protected readonly translations = injectTranslations();\n protected readonly id = uniqueId('tx-app-layout');\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-app-layout'), ...this.passThrough().root?.style }));\n\n readonly mobile = signal(false);\n readonly mobileOpen = signal(false);\n private readonly hovered = signal(false);\n private readonly focused = signal(false);\n readonly expanded = computed(() => this.anchored() || this.hovered() || this.focused());\n readonly wide = computed(() => this.mobile() || this.expanded());\n protected readonly menuName = computed(() => this.menuLabel() ?? this.translations().menu);\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n inject(Router, { optional: true })\n ?.events.pipe(\n filter((event) => event instanceof NavigationEnd),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.mobileOpen.set(false));\n afterNextRender(() => {\n const view = this.document.defaultView;\n if (!view) {\n return;\n }\n const update = (mobile: boolean) => {\n this.mobile.set(mobile);\n if (!mobile) {\n this.mobileOpen.set(false);\n }\n };\n if (this.responsive() === 'container' && 'ResizeObserver' in view) {\n const observer = new view.ResizeObserver(([entry]) => update(entry.contentRect.width < MOBILE_WIDTH));\n observer.observe(this.host.nativeElement);\n destroyRef.onDestroy(() => observer.disconnect());\n return;\n }\n const media = view.matchMedia?.(`(width < ${MOBILE_WIDTH}px)`);\n if (media) {\n const change = () => update(media.matches);\n change();\n media.addEventListener?.('change', change);\n destroyRef.onDestroy(() => media.removeEventListener?.('change', change));\n }\n });\n }\n\n ngOnInit(): void {\n const stored = this.readAnchored();\n if (stored !== null) {\n this.anchored.set(stored);\n }\n }\n\n toggleAnchored(): void {\n const next = !this.anchored();\n this.anchored.set(next);\n this.hovered.set(true);\n this.writeAnchored(next);\n }\n\n toggleMobile(): void {\n this.mobileOpen.update((open) => !open);\n }\n\n closeMobile(): void {\n this.mobileOpen.set(false);\n }\n\n protected setHovered(hovered: boolean): void {\n this.hovered.set(hovered);\n }\n\n protected onFocusIn(event: FocusEvent): void {\n this.focused.set((event.target as HTMLElement | null)?.matches(':focus-visible') ?? false);\n }\n\n protected onFocusOut(event: FocusEvent): void {\n const next = event.relatedTarget as Node | null;\n if (!next || !(event.currentTarget as HTMLElement).contains(next)) {\n this.focused.set(false);\n }\n }\n\n protected onSidebarClick(event: Event): void {\n if (this.mobile() && (event.target as HTMLElement | null)?.closest(PICKED)) {\n this.mobileOpen.set(false);\n }\n }\n\n protected closeFromKeyboard(): void {\n if (this.mobileOpen()) {\n this.mobileOpen.set(false);\n this.menuButton()?.nativeElement.focus();\n }\n }\n\n private storage(): Storage | null {\n try {\n return this.document.defaultView?.localStorage ?? null;\n } catch {\n return null;\n }\n }\n\n private readAnchored(): boolean | null {\n const key = this.stateKey();\n if (!key) {\n return null;\n }\n try {\n const value = this.storage()?.getItem(key);\n return value === null || value === undefined ? null : value === 'true';\n } catch {\n return null;\n }\n }\n\n private writeAnchored(value: boolean): void {\n const key = this.stateKey();\n if (!key) {\n return;\n }\n try {\n this.storage()?.setItem(key, String(value));\n } catch {\n return;\n }\n }\n}\n","@if (backdrop()) {\n <div class=\"tx-app-layout__backdrop\" aria-hidden=\"true\" [attr.data-variant]=\"backdropVariant()\"></div>\n}\n@if (sidebar()) {\n <div class=\"tx-app-layout__slot\">\n <aside\n class=\"tx-app-layout__sidebar\"\n [id]=\"id + '-sidebar'\"\n [attr.aria-label]=\"menuName()\"\n [attr.inert]=\"mobile() && !mobileOpen() ? '' : null\"\n [class]=\"passThrough().sidebar?.class\"\n [style]=\"passThrough().sidebar?.style\"\n (mouseenter)=\"setHovered(true)\"\n (mouseleave)=\"setHovered(false)\"\n (focusin)=\"onFocusIn($event)\"\n (focusout)=\"onFocusOut($event)\"\n >\n <div class=\"tx-app-layout__sidebar-header\">\n @if (homeLink() !== undefined) {\n <a class=\"tx-app-layout__brand\" [routerLink]=\"homeLink()\" [attr.aria-label]=\"title() ?? null\" [class]=\"passThrough().brand?.class\" [style]=\"passThrough().brand?.style\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </a>\n } @else {\n <span class=\"tx-app-layout__brand\" [class]=\"passThrough().brand?.class\" [style]=\"passThrough().brand?.style\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </span>\n }\n <button\n type=\"button\"\n class=\"tx-app-layout__anchor\"\n tooltipPlacement=\"right\"\n [attr.aria-pressed]=\"anchored()\"\n [attr.aria-label]=\"anchored() ? translations().unpinMenu : translations().pinMenu\"\n [txTooltip]=\"anchored() ? translations().unpinMenu : translations().pinMenu\"\n (click)=\"toggleAnchored()\"\n >\n <tx-icon class=\"tx-app-layout__pin-icon\" aria-hidden=\"true\" name=\"thumbtack\" [class.tx-app-layout__pin-icon--on]=\"!anchored()\" />\n <tx-icon class=\"tx-app-layout__pin-icon\" aria-hidden=\"true\" name=\"angle-double-left\" [class.tx-app-layout__pin-icon--on]=\"anchored()\" />\n </button>\n </div>\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- picks inside the menu are its own links and tree items -->\n <div class=\"tx-app-layout__menu\" (click)=\"onSidebarClick($event)\">\n <tx-panel-menu\n variant=\"sidebar\"\n [ariaLabel]=\"menuName()\"\n [model]=\"model()\"\n [translate]=\"translate()\"\n [collapsed]=\"!wide()\"\n [unstyled]=\"isUnstyled()\"\n [class]=\"passThrough().menu?.class\"\n [style]=\"passThrough().menu?.style\"\n />\n </div>\n </aside>\n </div>\n <div class=\"tx-app-layout__mask\" aria-hidden=\"true\" [class]=\"passThrough().mask?.class\" [style]=\"passThrough().mask?.style\" (click)=\"closeMobile()\"></div>\n}\n<div class=\"tx-app-layout__column\">\n <header class=\"tx-app-layout__topbar\" [class]=\"passThrough().topbar?.class\" [style]=\"passThrough().topbar?.style\">\n @if (sidebar()) {\n <button\n #menuButton\n type=\"button\"\n class=\"tx-app-layout__menu-button\"\n [attr.aria-label]=\"menuName()\"\n [attr.aria-expanded]=\"mobileOpen()\"\n [attr.aria-controls]=\"id + '-sidebar'\"\n [class]=\"passThrough().menuButton?.class\"\n [style]=\"passThrough().menuButton?.style\"\n (click)=\"toggleMobile()\"\n >\n <tx-icon name=\"bars\" aria-hidden=\"true\" />\n </button>\n } @else {\n @if (homeLink() !== undefined) {\n <a class=\"tx-app-layout__plain-brand\" [routerLink]=\"homeLink()\" [attr.aria-label]=\"title() ?? null\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </a>\n } @else {\n <span class=\"tx-app-layout__plain-brand\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </span>\n }\n }\n <div class=\"tx-app-layout__topbar-end\">\n <ng-content select=\"[txAppTopbar]\" />\n </div>\n </header>\n <div class=\"tx-app-layout__wrapper\">\n <main class=\"tx-app-layout__content\" [class]=\"passThrough().content?.class\" [style]=\"passThrough().content?.style\">\n <ng-content />\n </main>\n <ng-content select=\"[txAppFooter]\" />\n </div>\n</div>\n\n<ng-template #brand>\n @if (logo()) {\n <img class=\"tx-app-layout__logo\" alt=\"\" [src]=\"logo()\" [class]=\"passThrough().logo?.class\" [style]=\"passThrough().logo?.style\" />\n }\n @if (title()) {\n <span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