@rt-tools/ui-kit-v2 0.28.0 → 0.29.1
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/fesm2022/rt-tools-ui-kit-v2-calendar.mjs +2 -2
- package/fesm2022/rt-tools-ui-kit-v2-calendar.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-container.mjs +9 -4
- package/fesm2022/rt-tools-ui-kit-v2-container.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-core.mjs +37 -4
- package/fesm2022/rt-tools-ui-kit-v2-core.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-data-list.mjs +2 -2
- package/fesm2022/rt-tools-ui-kit-v2-data-list.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-date-picker.mjs +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-date-picker.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-date-range.mjs +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-date-range.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-dynamic-list.mjs +2 -2
- package/fesm2022/rt-tools-ui-kit-v2-dynamic-list.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-dynamic-selector.mjs +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-dynamic-selector.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-filter-control.mjs +2 -2
- package/fesm2022/rt-tools-ui-kit-v2-filter-control.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-page-header.mjs +367 -23
- package/fesm2022/rt-tools-ui-kit-v2-page-header.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-pdf-viewer.mjs +2 -2
- package/fesm2022/rt-tools-ui-kit-v2-pdf-viewer.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-popover.mjs +4 -0
- package/fesm2022/rt-tools-ui-kit-v2-popover.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-rich-editor.mjs +2 -2
- package/fesm2022/rt-tools-ui-kit-v2-rich-editor.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-table.mjs +4 -1
- package/fesm2022/rt-tools-ui-kit-v2-table.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-toolbar.mjs +2 -2
- package/fesm2022/rt-tools-ui-kit-v2-toolbar.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-workspace.mjs +2 -2
- package/fesm2022/rt-tools-ui-kit-v2-workspace.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/components/calendar/rt-calendar.component.scss +3 -2
- package/src/lib/components/container/CONTEXT.md +6 -0
- package/src/lib/components/container/rt-container.component.scss +4 -0
- package/src/lib/components/data-list/toolbar/rt-data-list-toolbar.component.scss +1 -1
- package/src/lib/components/dynamic-list/rt-dynamic-list.component.scss +1 -1
- package/src/lib/components/filter-control/rt-filter-control.component.scss +4 -2
- package/src/lib/components/page-header/CONTEXT.md +12 -0
- package/src/lib/components/page-header/more/rt-page-header-more.component.scss +7 -0
- package/src/lib/components/page-header/rt-page-header-mobile.scss +24 -0
- package/src/lib/components/page-header/rt-page-header.component.scss +25 -3
- package/src/lib/components/pdf-viewer/rt-pdf-viewer.component.scss +1 -1
- package/src/lib/components/popover/CONTEXT.md +2 -1
- package/src/lib/components/toolbar/rt-toolbar.component.scss +3 -1
- package/src/lib/components/workspace/rt-workspace.component.scss +8 -6
- package/src/rich-editor/lib/components/chat/rt-chat.component.scss +5 -3
- package/src/styles/_breakpoints.scss +19 -0
- package/src/styles/_index.scss +4 -0
- package/src/styles/_place.scss +7 -0
- package/styles/tokens.css +8 -0
- package/types/rt-tools-ui-kit-v2-core.d.ts +24 -5
- package/types/rt-tools-ui-kit-v2-page-header.d.ts +60 -6
- package/types/rt-tools-ui-kit-v2-table.d.ts +4 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, ViewEncapsulation, afterNextRender, booleanAttribute, computed, effect, inject, input, numberAttribute, output, signal, viewChild } from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, ViewEncapsulation, afterNextRender, afterRenderEffect, booleanAttribute, computed, effect, inject, input, numberAttribute, output, signal, viewChild } from "@angular/core";
|
|
3
3
|
import { toSignal } from "@angular/core/rxjs-interop";
|
|
4
4
|
import { NavigationEnd, Router, RouterLink, RouterLinkActive } from "@angular/router";
|
|
5
5
|
import { filter, map } from "rxjs";
|
|
@@ -14,6 +14,7 @@ var ERtPageHeaderEntry;
|
|
|
14
14
|
ERtPageHeaderEntry["Link"] = "link";
|
|
15
15
|
ERtPageHeaderEntry["Button"] = "button";
|
|
16
16
|
})(ERtPageHeaderEntry || (ERtPageHeaderEntry = {}));
|
|
17
|
+
const FIT_TOLERANCE = .5;
|
|
17
18
|
function panelItemsOf(item) {
|
|
18
19
|
return (item.columns ?? []).flatMap((column) => column.groups.flatMap((group) => group.items));
|
|
19
20
|
}
|
|
@@ -63,7 +64,8 @@ function toSections(items) {
|
|
|
63
64
|
columns,
|
|
64
65
|
columnCount: columns.length,
|
|
65
66
|
panelItems: panelItemsOf(item).map(toEntry),
|
|
66
|
-
panelGroups: panelGroupsOf(columns)
|
|
67
|
+
panelGroups: panelGroupsOf(columns),
|
|
68
|
+
priority: item.priority ?? 0
|
|
67
69
|
};
|
|
68
70
|
});
|
|
69
71
|
}
|
|
@@ -86,6 +88,251 @@ function activeSectionIds(sections, url) {
|
|
|
86
88
|
for (const section of sections) if (section.panelItems.some((entry) => isEntryActive(entry, path))) ids.add(section.id);
|
|
87
89
|
return ids;
|
|
88
90
|
}
|
|
91
|
+
function idOf(slot) {
|
|
92
|
+
return slot.id;
|
|
93
|
+
}
|
|
94
|
+
function rowWidthOf(widths, gap) {
|
|
95
|
+
return widths.reduce((sum, width) => sum + width, 0) + gap * Math.max(0, widths.length - 1);
|
|
96
|
+
}
|
|
97
|
+
function fitRow(input) {
|
|
98
|
+
const { slots, moreWidth, available, gap } = input;
|
|
99
|
+
const limit = available + FIT_TOLERANCE;
|
|
100
|
+
if (rowWidthOf(slots.map((slot) => slot.width), gap) <= limit) return {
|
|
101
|
+
row: slots.map(idOf),
|
|
102
|
+
more: []
|
|
103
|
+
};
|
|
104
|
+
const departure = Array.from(slots.keys()).sort((a, b) => slots[a].priority - slots[b].priority || b - a);
|
|
105
|
+
const kept = new Set(slots.keys());
|
|
106
|
+
for (const index of departure) {
|
|
107
|
+
if (rowWidthOf([...Array.from(kept, (at) => slots[at].width), moreWidth], gap) <= limit) break;
|
|
108
|
+
kept.delete(index);
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
row: Array.from(slots.keys()).filter((index) => kept.has(index)).map((index) => slots[index].id),
|
|
112
|
+
more: Array.from(slots.keys()).filter((index) => !kept.has(index)).map((index) => slots[index].id)
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
function isSectionActive(section, path) {
|
|
116
|
+
return isEntryActive(section, path) || section.panelItems.some((entry) => isEntryActive(entry, path));
|
|
117
|
+
}
|
|
118
|
+
function hasActiveSection(sections, url) {
|
|
119
|
+
const path = pathOf(url);
|
|
120
|
+
return sections.some((section) => isSectionActive(section, path));
|
|
121
|
+
}
|
|
122
|
+
const BEM_BLOCK$1 = "rt-page-header-more";
|
|
123
|
+
var RtPageHeaderMoreComponent = class RtPageHeaderMoreComponent {
|
|
124
|
+
constructor() {
|
|
125
|
+
this.#translate = inject(RT_KIT_TRANSLATOR);
|
|
126
|
+
this.translate = this.#translate;
|
|
127
|
+
this.t = inject(RT_KIT_LABELS);
|
|
128
|
+
this.EntryKind = ERtPageHeaderEntry;
|
|
129
|
+
this.unread = computed(() => this.sections().some((section) => section.unread), ...ngDevMode ? [{ debugName: "unread" }] : /* istanbul ignore next */ []);
|
|
130
|
+
this.sections = input([], ...ngDevMode ? [{ debugName: "sections" }] : /* istanbul ignore next */ []);
|
|
131
|
+
this.active = input(false, {
|
|
132
|
+
...ngDevMode ? { debugName: "active" } : /* istanbul ignore next */ {},
|
|
133
|
+
transform: booleanAttribute
|
|
134
|
+
});
|
|
135
|
+
this.itemClick = output();
|
|
136
|
+
}
|
|
137
|
+
#translate;
|
|
138
|
+
onItemClick(id) {
|
|
139
|
+
this.itemClick.emit(id);
|
|
140
|
+
}
|
|
141
|
+
static {
|
|
142
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
143
|
+
minVersion: "12.0.0",
|
|
144
|
+
version: "22.2.2",
|
|
145
|
+
ngImport: i0,
|
|
146
|
+
type: RtPageHeaderMoreComponent,
|
|
147
|
+
deps: [],
|
|
148
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
static {
|
|
152
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
153
|
+
minVersion: "17.0.0",
|
|
154
|
+
version: "22.2.2",
|
|
155
|
+
type: RtPageHeaderMoreComponent,
|
|
156
|
+
isStandalone: true,
|
|
157
|
+
selector: "rt-page-header-more",
|
|
158
|
+
inputs: {
|
|
159
|
+
sections: {
|
|
160
|
+
classPropertyName: "sections",
|
|
161
|
+
publicName: "sections",
|
|
162
|
+
isSignal: true,
|
|
163
|
+
isRequired: false,
|
|
164
|
+
transformFunction: null
|
|
165
|
+
},
|
|
166
|
+
active: {
|
|
167
|
+
classPropertyName: "active",
|
|
168
|
+
publicName: "active",
|
|
169
|
+
isSignal: true,
|
|
170
|
+
isRequired: false,
|
|
171
|
+
transformFunction: null
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
outputs: { itemClick: "itemClick" },
|
|
175
|
+
host: { classAttribute: "rt-page-header-more" },
|
|
176
|
+
ngImport: i0,
|
|
177
|
+
template: "<!--\n Кнопка берёт элементы блока шапки, а не свои: «Ещё» стоит в том же ряду и выглядит как его пункт,\n а второй набор тех же правил разошёлся бы с первым при первой правке.\n-->\n<ng-container rtBlock=\"rt-page-header\">\n <button\n rtElem=\"link\"\n type=\"button\"\n qa-dataid=\"header-nav-more\"\n #morePopover=\"rtPopover\"\n rtPopoverTrigger=\"hover\"\n rtPopoverAlign=\"end\"\n rtPopoverFitViewport\n rtPopoverOffsetY=\"14\"\n [rtMod]=\"{ isActive: active(), isOpen: morePopover.isOpen() }\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"morePopover.isOpen()\"\n [rtPopover]=\"moreTpl\"\n (click)=\"morePopover.open()\">\n <span rtElem=\"label\">{{ t().uiNavMore }}</span>\n @if (unread()) {\n <span rtElem=\"marker\" role=\"img\" qa-dataid=\"header-nav-marker\" data-id=\"more\" [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n <span rtElem=\"caret\" aria-hidden=\"true\">\n <rt-icon name=\"chevron-up-down\" size=\"xs\" />\n </span>\n </button>\n</ng-container>\n\n<!--\n Панель «Ещё» — та же разметка, что меню узкого экрана, без аккордеона: раздел с панелью стоит\n заголовком, а пункты его групп идут под ним сразу.\n-->\n<ng-template #moreTpl>\n <div rtBlock=\"rt-page-header-mobile\" role=\"menu\" qa-dataid=\"header-nav-more-list\" [rtMod]=\"{ more: true }\">\n @for (section of sections(); track section.id) {\n @switch (section.kind) {\n @case (EntryKind.Panel) {\n <div rtElem=\"heading\" qa-dataid=\"header-nav-more-section\" [attr.data-id]=\"section.id\">\n <span rtElem=\"label\">{{ section.label }}</span>\n </div>\n <div rtElem=\"children\">\n @for (group of section.panelGroups; track group.id) {\n <div rtElem=\"group\" role=\"group\" [attr.aria-label]=\"group.label || null\">\n @if (group.label) {\n <div rtElem=\"group-title\" qa-dataid=\"header-nav-more-group\" [attr.data-id]=\"group.id\">\n <span rtElem=\"group-label\">{{ group.label }}</span>\n </div>\n }\n @for (entry of group.items; track entry.id) {\n @if (entry.kind === EntryKind.Link) {\n <a\n rtElem=\"link\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-more-item\"\n routerLinkActive=\"rt-page-header-mobile__link--is-active\"\n [rtMod]=\"{ child: true }\"\n [attr.data-id]=\"entry.id\"\n [routerLink]=\"entry.route\"\n [routerLinkActiveOptions]=\"{ exact: entry.routerLinkActiveExact }\"\n (click)=\"morePopover.close()\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n @if (entry.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n } @else if (entry.disabled) {\n <span\n rtElem=\"disabled-slot\"\n role=\"none\"\n [rtTooltip]=\"'uiSectionInProgress' | rtKitLabel: translate() : { label: entry.label }\">\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-more-item\"\n [rtMod]=\"{ child: true, disabled: true }\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-disabled]=\"true\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n </button>\n </span>\n } @else {\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-more-item\"\n [rtMod]=\"{ child: true }\"\n [attr.data-id]=\"entry.id\"\n (click)=\"onItemClick(entry.id); morePopover.close()\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n @if (entry.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n </div>\n }\n </div>\n }\n @case (EntryKind.Link) {\n <a\n rtElem=\"link\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-more-item\"\n routerLinkActive=\"rt-page-header-mobile__link--is-active\"\n [attr.data-id]=\"section.id\"\n [routerLink]=\"section.route\"\n [routerLinkActiveOptions]=\"{ exact: section.routerLinkActiveExact }\"\n (click)=\"morePopover.close()\">\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n }\n @default {\n @if (section.disabled) {\n <span\n rtElem=\"disabled-slot\"\n role=\"none\"\n [rtTooltip]=\"'uiSectionInProgress' | rtKitLabel: translate() : { label: section.label }\">\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-more-item\"\n [rtMod]=\"{ disabled: true }\"\n [attr.data-id]=\"section.id\"\n [attr.aria-disabled]=\"true\">\n <span rtElem=\"label\">{{ section.label }}</span>\n </button>\n </span>\n } @else {\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-more-item\"\n [attr.data-id]=\"section.id\"\n (click)=\"onItemClick(section.id); morePopover.close()\">\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n }\n }\n </div>\n</ng-template>\n",
|
|
178
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-page-header-more{display:contents}}\n"],
|
|
179
|
+
dependencies: [
|
|
180
|
+
{
|
|
181
|
+
kind: "directive",
|
|
182
|
+
type: RouterLink,
|
|
183
|
+
selector: "[routerLink]",
|
|
184
|
+
inputs: [
|
|
185
|
+
"target",
|
|
186
|
+
"queryParams",
|
|
187
|
+
"fragment",
|
|
188
|
+
"queryParamsHandling",
|
|
189
|
+
"state",
|
|
190
|
+
"info",
|
|
191
|
+
"relativeTo",
|
|
192
|
+
"preserveFragment",
|
|
193
|
+
"skipLocationChange",
|
|
194
|
+
"replaceUrl",
|
|
195
|
+
"browserUrl",
|
|
196
|
+
"routerLink"
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
kind: "directive",
|
|
201
|
+
type: RouterLinkActive,
|
|
202
|
+
selector: "[routerLinkActive]",
|
|
203
|
+
inputs: [
|
|
204
|
+
"routerLinkActiveOptions",
|
|
205
|
+
"ariaCurrentWhenActive",
|
|
206
|
+
"routerLinkActive"
|
|
207
|
+
],
|
|
208
|
+
outputs: ["isActiveChange"],
|
|
209
|
+
exportAs: ["routerLinkActive"]
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
kind: "component",
|
|
213
|
+
type: RtIconComponent,
|
|
214
|
+
selector: "rt-icon",
|
|
215
|
+
inputs: [
|
|
216
|
+
"name",
|
|
217
|
+
"glyph",
|
|
218
|
+
"glyphStrategy",
|
|
219
|
+
"size",
|
|
220
|
+
"color",
|
|
221
|
+
"fill",
|
|
222
|
+
"spin",
|
|
223
|
+
"rotate"
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
kind: "directive",
|
|
228
|
+
type: RtPopoverDirective,
|
|
229
|
+
selector: "[rtPopover]",
|
|
230
|
+
inputs: [
|
|
231
|
+
"rtPopover",
|
|
232
|
+
"rtPopoverTrigger",
|
|
233
|
+
"rtPopoverWidth",
|
|
234
|
+
"rtPopoverAlign",
|
|
235
|
+
"rtPopoverFitViewport",
|
|
236
|
+
"rtPopoverContext",
|
|
237
|
+
"rtPopoverPanelClass",
|
|
238
|
+
"rtPopoverDisabled",
|
|
239
|
+
"rtPopoverOffsetY",
|
|
240
|
+
"rtPopoverOffsetX",
|
|
241
|
+
"rtPopoverPositions"
|
|
242
|
+
],
|
|
243
|
+
outputs: ["rtPopoverOpened", "rtPopoverClosed"],
|
|
244
|
+
exportAs: ["rtPopover"]
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
kind: "directive",
|
|
248
|
+
type: RtTooltipDirective,
|
|
249
|
+
selector: "[rtTooltip]",
|
|
250
|
+
inputs: [
|
|
251
|
+
"rtTooltip",
|
|
252
|
+
"rtTooltipPlacement",
|
|
253
|
+
"rtTooltipWhenTruncated",
|
|
254
|
+
"rtTooltipHideOnClick"
|
|
255
|
+
],
|
|
256
|
+
exportAs: ["rtTooltip"]
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
kind: "directive",
|
|
260
|
+
type: BlockDirective,
|
|
261
|
+
selector: "[rtBlock]",
|
|
262
|
+
inputs: ["rtMod"]
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
kind: "directive",
|
|
266
|
+
type: ElemDirective,
|
|
267
|
+
selector: "[rtElem]",
|
|
268
|
+
inputs: ["rtMod"]
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
kind: "directive",
|
|
272
|
+
type: ModDirective,
|
|
273
|
+
selector: "[rtMod]"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
kind: "pipe",
|
|
277
|
+
type: RtKitLabelPipe,
|
|
278
|
+
name: "rtKitLabel"
|
|
279
|
+
}
|
|
280
|
+
],
|
|
281
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
282
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
287
|
+
minVersion: "12.0.0",
|
|
288
|
+
version: "22.2.2",
|
|
289
|
+
ngImport: i0,
|
|
290
|
+
type: RtPageHeaderMoreComponent,
|
|
291
|
+
decorators: [{
|
|
292
|
+
type: Component,
|
|
293
|
+
args: [{
|
|
294
|
+
selector: "rt-page-header-more",
|
|
295
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
296
|
+
encapsulation: ViewEncapsulation.None,
|
|
297
|
+
imports: [
|
|
298
|
+
RtKitLabelPipe,
|
|
299
|
+
RouterLink,
|
|
300
|
+
RouterLinkActive,
|
|
301
|
+
RtIconComponent,
|
|
302
|
+
RtPopoverDirective,
|
|
303
|
+
RtTooltipDirective,
|
|
304
|
+
BlockDirective,
|
|
305
|
+
ElemDirective,
|
|
306
|
+
ModDirective
|
|
307
|
+
],
|
|
308
|
+
host: { class: BEM_BLOCK$1 },
|
|
309
|
+
template: "<!--\n Кнопка берёт элементы блока шапки, а не свои: «Ещё» стоит в том же ряду и выглядит как его пункт,\n а второй набор тех же правил разошёлся бы с первым при первой правке.\n-->\n<ng-container rtBlock=\"rt-page-header\">\n <button\n rtElem=\"link\"\n type=\"button\"\n qa-dataid=\"header-nav-more\"\n #morePopover=\"rtPopover\"\n rtPopoverTrigger=\"hover\"\n rtPopoverAlign=\"end\"\n rtPopoverFitViewport\n rtPopoverOffsetY=\"14\"\n [rtMod]=\"{ isActive: active(), isOpen: morePopover.isOpen() }\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"morePopover.isOpen()\"\n [rtPopover]=\"moreTpl\"\n (click)=\"morePopover.open()\">\n <span rtElem=\"label\">{{ t().uiNavMore }}</span>\n @if (unread()) {\n <span rtElem=\"marker\" role=\"img\" qa-dataid=\"header-nav-marker\" data-id=\"more\" [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n <span rtElem=\"caret\" aria-hidden=\"true\">\n <rt-icon name=\"chevron-up-down\" size=\"xs\" />\n </span>\n </button>\n</ng-container>\n\n<!--\n Панель «Ещё» — та же разметка, что меню узкого экрана, без аккордеона: раздел с панелью стоит\n заголовком, а пункты его групп идут под ним сразу.\n-->\n<ng-template #moreTpl>\n <div rtBlock=\"rt-page-header-mobile\" role=\"menu\" qa-dataid=\"header-nav-more-list\" [rtMod]=\"{ more: true }\">\n @for (section of sections(); track section.id) {\n @switch (section.kind) {\n @case (EntryKind.Panel) {\n <div rtElem=\"heading\" qa-dataid=\"header-nav-more-section\" [attr.data-id]=\"section.id\">\n <span rtElem=\"label\">{{ section.label }}</span>\n </div>\n <div rtElem=\"children\">\n @for (group of section.panelGroups; track group.id) {\n <div rtElem=\"group\" role=\"group\" [attr.aria-label]=\"group.label || null\">\n @if (group.label) {\n <div rtElem=\"group-title\" qa-dataid=\"header-nav-more-group\" [attr.data-id]=\"group.id\">\n <span rtElem=\"group-label\">{{ group.label }}</span>\n </div>\n }\n @for (entry of group.items; track entry.id) {\n @if (entry.kind === EntryKind.Link) {\n <a\n rtElem=\"link\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-more-item\"\n routerLinkActive=\"rt-page-header-mobile__link--is-active\"\n [rtMod]=\"{ child: true }\"\n [attr.data-id]=\"entry.id\"\n [routerLink]=\"entry.route\"\n [routerLinkActiveOptions]=\"{ exact: entry.routerLinkActiveExact }\"\n (click)=\"morePopover.close()\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n @if (entry.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n } @else if (entry.disabled) {\n <span\n rtElem=\"disabled-slot\"\n role=\"none\"\n [rtTooltip]=\"'uiSectionInProgress' | rtKitLabel: translate() : { label: entry.label }\">\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-more-item\"\n [rtMod]=\"{ child: true, disabled: true }\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-disabled]=\"true\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n </button>\n </span>\n } @else {\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-more-item\"\n [rtMod]=\"{ child: true }\"\n [attr.data-id]=\"entry.id\"\n (click)=\"onItemClick(entry.id); morePopover.close()\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n @if (entry.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n </div>\n }\n </div>\n }\n @case (EntryKind.Link) {\n <a\n rtElem=\"link\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-more-item\"\n routerLinkActive=\"rt-page-header-mobile__link--is-active\"\n [attr.data-id]=\"section.id\"\n [routerLink]=\"section.route\"\n [routerLinkActiveOptions]=\"{ exact: section.routerLinkActiveExact }\"\n (click)=\"morePopover.close()\">\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n }\n @default {\n @if (section.disabled) {\n <span\n rtElem=\"disabled-slot\"\n role=\"none\"\n [rtTooltip]=\"'uiSectionInProgress' | rtKitLabel: translate() : { label: section.label }\">\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-more-item\"\n [rtMod]=\"{ disabled: true }\"\n [attr.data-id]=\"section.id\"\n [attr.aria-disabled]=\"true\">\n <span rtElem=\"label\">{{ section.label }}</span>\n </button>\n </span>\n } @else {\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-more-item\"\n [attr.data-id]=\"section.id\"\n (click)=\"onItemClick(section.id); morePopover.close()\">\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n }\n }\n </div>\n</ng-template>\n",
|
|
310
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-page-header-more{display:contents}}\n"]
|
|
311
|
+
}]
|
|
312
|
+
}],
|
|
313
|
+
propDecorators: {
|
|
314
|
+
sections: [{
|
|
315
|
+
type: i0.Input,
|
|
316
|
+
args: [{
|
|
317
|
+
isSignal: true,
|
|
318
|
+
alias: "sections",
|
|
319
|
+
required: false
|
|
320
|
+
}]
|
|
321
|
+
}],
|
|
322
|
+
active: [{
|
|
323
|
+
type: i0.Input,
|
|
324
|
+
args: [{
|
|
325
|
+
isSignal: true,
|
|
326
|
+
alias: "active",
|
|
327
|
+
required: false
|
|
328
|
+
}]
|
|
329
|
+
}],
|
|
330
|
+
itemClick: [{
|
|
331
|
+
type: i0.Output,
|
|
332
|
+
args: ["itemClick"]
|
|
333
|
+
}]
|
|
334
|
+
}
|
|
335
|
+
});
|
|
89
336
|
const BEM_BLOCK = "rt-page-header";
|
|
90
337
|
var RtPageHeaderComponent = class RtPageHeaderComponent {
|
|
91
338
|
#router;
|
|
@@ -94,6 +341,8 @@ var RtPageHeaderComponent = class RtPageHeaderComponent {
|
|
|
94
341
|
#window;
|
|
95
342
|
#stuck;
|
|
96
343
|
#t_uiMainNav;
|
|
344
|
+
#rowWatch;
|
|
345
|
+
#overflowIds;
|
|
97
346
|
#currentUrl;
|
|
98
347
|
#breakpoints;
|
|
99
348
|
#translate;
|
|
@@ -104,6 +353,14 @@ var RtPageHeaderComponent = class RtPageHeaderComponent {
|
|
|
104
353
|
this.#window = inject(WINDOW);
|
|
105
354
|
this.#stuck = signal(false, ...ngDevMode ? [{ debugName: "#stuck" }] : /* istanbul ignore next */ []);
|
|
106
355
|
this.#t_uiMainNav = rtKitLabel("uiMainNav");
|
|
356
|
+
this.#rowWatch = null;
|
|
357
|
+
this.#overflowIds = signal(/* @__PURE__ */ new Set(), {
|
|
358
|
+
...ngDevMode ? { debugName: "#overflowIds" } : /* istanbul ignore next */ {},
|
|
359
|
+
equal: (a, b) => a.size === b.size && [...a].every((id) => b.has(id))
|
|
360
|
+
});
|
|
361
|
+
this.navRef = viewChild("nav", ...ngDevMode ? [{ debugName: "navRef" }] : /* istanbul ignore next */ []);
|
|
362
|
+
this.listRef = viewChild("list", ...ngDevMode ? [{ debugName: "listRef" }] : /* istanbul ignore next */ []);
|
|
363
|
+
this.moreItemRef = viewChild("moreItem", ...ngDevMode ? [{ debugName: "moreItemRef" }] : /* istanbul ignore next */ []);
|
|
107
364
|
this.#currentUrl = toSignal(this.#router.events.pipe(filter((e) => e instanceof NavigationEnd), map(() => this.#router.url)), { initialValue: this.#router.url });
|
|
108
365
|
this.#breakpoints = inject(BreakpointsService);
|
|
109
366
|
this.#translate = inject(RT_KIT_TRANSLATOR);
|
|
@@ -119,6 +376,10 @@ var RtPageHeaderComponent = class RtPageHeaderComponent {
|
|
|
119
376
|
});
|
|
120
377
|
this.compact = computed(() => this.stickyCompact() && this.#stuck(), ...ngDevMode ? [{ debugName: "compact" }] : /* istanbul ignore next */ []);
|
|
121
378
|
this.compactSections = computed(() => compactSectionsOf(this.sections(), this.compactVisibleCount()), ...ngDevMode ? [{ debugName: "compactSections" }] : /* istanbul ignore next */ []);
|
|
379
|
+
this.overflowIds = this.#overflowIds.asReadonly();
|
|
380
|
+
this.moreSections = computed(() => this.sections().filter((section) => this.overflowIds().has(section.id)), ...ngDevMode ? [{ debugName: "moreSections" }] : /* istanbul ignore next */ []);
|
|
381
|
+
this.moreShown = computed(() => this.moreSections().length > 0, ...ngDevMode ? [{ debugName: "moreShown" }] : /* istanbul ignore next */ []);
|
|
382
|
+
this.moreActive = computed(() => hasActiveSection(this.moreSections(), this.#currentUrl()), ...ngDevMode ? [{ debugName: "moreActive" }] : /* istanbul ignore next */ []);
|
|
122
383
|
this.sections = computed(() => toSections(this.items()), ...ngDevMode ? [{ debugName: "sections" }] : /* istanbul ignore next */ []);
|
|
123
384
|
this.activeSectionIds = computed(() => activeSectionIds(this.sections(), this.#currentUrl()), ...ngDevMode ? [{ debugName: "activeSectionIds" }] : /* istanbul ignore next */ []);
|
|
124
385
|
this.userAvatar = computed(() => {
|
|
@@ -150,6 +411,45 @@ var RtPageHeaderComponent = class RtPageHeaderComponent {
|
|
|
150
411
|
if (!this.isNarrow()) this.mobileNavPopoverRef()?.close();
|
|
151
412
|
});
|
|
152
413
|
afterNextRender(() => this.#observeStuck());
|
|
414
|
+
afterRenderEffect(() => {
|
|
415
|
+
this.sections();
|
|
416
|
+
this.t();
|
|
417
|
+
this.#watchRow();
|
|
418
|
+
this.#measureRow();
|
|
419
|
+
});
|
|
420
|
+
this.#destroyRef.onDestroy(() => this.#rowWatch?.disconnect());
|
|
421
|
+
}
|
|
422
|
+
#watchRow() {
|
|
423
|
+
const nav = this.navRef()?.nativeElement;
|
|
424
|
+
const list = this.listRef()?.nativeElement;
|
|
425
|
+
if (nav === void 0 || list === void 0 || !("ResizeObserver" in this.#window)) return;
|
|
426
|
+
this.#rowWatch?.disconnect();
|
|
427
|
+
this.#rowWatch = new this.#window.ResizeObserver(() => this.#measureRow());
|
|
428
|
+
this.#rowWatch.observe(nav);
|
|
429
|
+
Array.from(list.children).forEach((item) => this.#rowWatch?.observe(item));
|
|
430
|
+
}
|
|
431
|
+
#measureRow() {
|
|
432
|
+
const nav = this.navRef()?.nativeElement;
|
|
433
|
+
const list = this.listRef()?.nativeElement;
|
|
434
|
+
const moreItem = this.moreItemRef()?.nativeElement;
|
|
435
|
+
if (nav === void 0 || list === void 0 || moreItem === void 0) return;
|
|
436
|
+
const available = nav.getBoundingClientRect().width;
|
|
437
|
+
if (available <= 0) return;
|
|
438
|
+
const widths = /* @__PURE__ */ new Map();
|
|
439
|
+
list.querySelectorAll("[qa-dataid=\"header-nav-item\"]").forEach((item) => {
|
|
440
|
+
widths.set(item.dataset["id"] ?? "", item.getBoundingClientRect().width);
|
|
441
|
+
});
|
|
442
|
+
const fit = fitRow({
|
|
443
|
+
slots: this.sections().map((section) => ({
|
|
444
|
+
id: section.id,
|
|
445
|
+
width: widths.get(section.id) ?? 0,
|
|
446
|
+
priority: section.priority
|
|
447
|
+
})),
|
|
448
|
+
moreWidth: moreItem.getBoundingClientRect().width,
|
|
449
|
+
gap: parseFloat(this.#window.getComputedStyle(list).columnGap) || 0,
|
|
450
|
+
available
|
|
451
|
+
});
|
|
452
|
+
this.#overflowIds.set(new Set(fit.more));
|
|
153
453
|
}
|
|
154
454
|
#observeStuck() {
|
|
155
455
|
const observer = new this.#window.IntersectionObserver((entries) => {
|
|
@@ -267,27 +567,51 @@ var RtPageHeaderComponent = class RtPageHeaderComponent {
|
|
|
267
567
|
},
|
|
268
568
|
classAttribute: "rt-page-header"
|
|
269
569
|
},
|
|
270
|
-
viewQueries: [
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
570
|
+
viewQueries: [
|
|
571
|
+
{
|
|
572
|
+
propertyName: "navRef",
|
|
573
|
+
first: true,
|
|
574
|
+
predicate: ["nav"],
|
|
575
|
+
descendants: true,
|
|
576
|
+
isSignal: true
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
propertyName: "listRef",
|
|
580
|
+
first: true,
|
|
581
|
+
predicate: ["list"],
|
|
582
|
+
descendants: true,
|
|
583
|
+
isSignal: true
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
propertyName: "moreItemRef",
|
|
587
|
+
first: true,
|
|
588
|
+
predicate: ["moreItem"],
|
|
589
|
+
descendants: true,
|
|
590
|
+
isSignal: true
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
propertyName: "mobileNavPopoverRef",
|
|
594
|
+
first: true,
|
|
595
|
+
predicate: ["mobileNavPopover"],
|
|
596
|
+
descendants: true,
|
|
597
|
+
read: RtPopoverDirective,
|
|
598
|
+
isSignal: true
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
propertyName: "compactNavPopoverRef",
|
|
602
|
+
first: true,
|
|
603
|
+
predicate: ["compactNavPopover"],
|
|
604
|
+
descendants: true,
|
|
605
|
+
read: RtPopoverDirective,
|
|
606
|
+
isSignal: true
|
|
607
|
+
}
|
|
608
|
+
],
|
|
285
609
|
ngImport: i0,
|
|
286
|
-
template: "<ng-container rtBlock=\"rt-page-header\">\n <nav rtElem=\"nav\" [attr.aria-label]=\"navAriaLabel()\">\n <ul rtElem=\"list\" role=\"list\">\n @for (section of sections(); track section.id) {\n <li rtElem=\"item\" qa-dataid=\"header-nav-item\" [attr.data-id]=\"section.id\">\n @switch (section.kind) {\n @case (EntryKind.Panel) {\n <button\n rtElem=\"link\"\n type=\"button\"\n qa-dataid=\"header-nav-trigger\"\n #groupPopover=\"rtPopover\"\n rtPopoverTrigger=\"hover\"\n rtPopoverFitViewport\n rtPopoverOffsetY=\"14\"\n [rtMod]=\"{\n isActive: activeSectionIds().has(section.id),\n isOpen: groupPopover.isOpen(),\n }\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"groupPopover.isOpen()\"\n [rtPopover]=\"submenuTpl\"\n (click)=\"groupPopover.open()\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n <span rtElem=\"caret\" aria-hidden=\"true\">\n <rt-icon name=\"chevron-up-down\" size=\"xs\" />\n </span>\n </button>\n <ng-template #submenuTpl>\n <div rtBlock=\"rt-page-header-submenu\" role=\"menu\" [style.--rt-nav-panel-columns]=\"section.columnCount\">\n @for (column of section.columns; track column.id) {\n <div rtElem=\"column\" qa-dataid=\"header-nav-column\" [attr.data-id]=\"column.id\">\n @for (group of column.groups; track group.id) {\n <div rtElem=\"group\" role=\"group\" [attr.aria-label]=\"group.label || null\">\n @if (group.label) {\n <div rtElem=\"group-title\" qa-dataid=\"header-nav-group\" [attr.data-id]=\"group.id\">\n @if (group.icon) {\n <rt-icon rtElem=\"group-icon\" size=\"xs\" [name]=\"group.icon\" />\n }\n <span rtElem=\"group-label\">{{ group.label }}</span>\n </div>\n }\n @for (entry of group.items; track entry.id) {\n @if (entry.kind === EntryKind.Link) {\n <a\n rtElem=\"link\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-subitem\"\n routerLinkActive=\"rt-page-header-submenu__link--is-active\"\n [attr.data-id]=\"entry.id\"\n [routerLink]=\"entry.route\"\n [routerLinkActiveOptions]=\"{ exact: entry.routerLinkActiveExact }\"\n (click)=\"groupPopover.close()\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n @if (entry.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n } @else if (entry.disabled) {\n <span\n rtElem=\"disabled-slot\"\n role=\"none\"\n [rtTooltip]=\"\n 'uiSectionInProgress' | rtKitLabel: translate() : { label: entry.label }\n \">\n <button\n rtElem=\"link\"\n role=\"menuitem\"\n type=\"button\"\n qa-dataid=\"header-nav-subitem\"\n [rtMod]=\"{ disabled: true }\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-disabled]=\"true\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n </button>\n </span>\n } @else {\n <button\n rtElem=\"link\"\n role=\"menuitem\"\n type=\"button\"\n qa-dataid=\"header-nav-subitem\"\n [attr.data-id]=\"entry.id\"\n (click)=\"onItemClick(entry.id)\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n @if (entry.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n </div>\n }\n </div>\n }\n </div>\n </ng-template>\n }\n @case (EntryKind.Link) {\n <a\n rtElem=\"link\"\n routerLinkActive=\"rt-page-header__link--is-active\"\n [routerLink]=\"section.route\"\n [routerLinkActiveOptions]=\"{ exact: section.routerLinkActiveExact }\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n }\n @default {\n @if (section.disabled) {\n <span\n rtElem=\"disabled-slot\"\n role=\"none\"\n [rtTooltip]=\"'uiSectionInProgress' | rtKitLabel: translate() : { label: section.label }\">\n <button rtElem=\"link\" type=\"button\" [rtMod]=\"{ disabled: true }\" [attr.aria-disabled]=\"true\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n </button>\n </span>\n } @else {\n <button rtElem=\"link\" type=\"button\" (click)=\"onItemClick(section.id)\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n }\n </li>\n }\n </ul>\n </nav>\n\n <button\n rtElem=\"burger\"\n type=\"button\"\n qa-dataid=\"header-nav-burger\"\n #mobileNavPopover=\"rtPopover\"\n rtPopoverFitViewport\n rtPopoverOffsetY=\"14\"\n [attr.aria-label]=\"t().uiNavMenu\"\n [rtMod]=\"{ isOpen: mobileNavPopover.isOpen() }\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"mobileNavPopover.isOpen()\"\n [rtPopover]=\"mobileNavTpl\">\n <rt-icon rtElem=\"burger-icon\" name=\"bars\" size=\"md\" />\n </button>\n\n <!--\n Сжатая полоса стоит в разметке всегда, как и узкая: показывает её модификатор хоста.\n Слева стопка кругов — «ещё» поверх остальных, — дальше три слота потребителя.\n -->\n <div rtElem=\"compact\" qa-dataid=\"header-compact\">\n <div rtElem=\"compact-stack\">\n <button\n rtElem=\"compact-circle\"\n type=\"button\"\n qa-dataid=\"header-compact-more\"\n #compactNavPopover=\"rtPopover\"\n rtPopoverFitViewport\n rtPopoverOffsetY=\"10\"\n [rtMod]=\"{ more: true, isOpen: compactNavPopover.isOpen() }\"\n [attr.aria-label]=\"t().uiNavMenu\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"compactNavPopover.isOpen()\"\n [rtPopover]=\"mobileNavTpl\">\n <rt-icon name=\"ellipsis-h\" size=\"sm\" />\n </button>\n @for (section of compactSections(); track section.id; let index = $index) {\n @if (section.kind === EntryKind.Link) {\n <a\n rtElem=\"compact-circle\"\n qa-dataid=\"header-compact-section\"\n routerLinkActive=\"rt-page-header__compact-circle--is-active\"\n [style.--rt-nav-compact-index]=\"index + 1\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"section.label\"\n [routerLink]=\"section.route\"\n [routerLinkActiveOptions]=\"{ exact: section.routerLinkActiveExact }\"\n [rtTooltip]=\"section.label\">\n @if (section.icon; as icon) {\n <rt-icon size=\"sm\" [name]=\"icon\" />\n }\n @if (section.unread) {\n <span rtElem=\"compact-marker\" role=\"img\" [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n } @else {\n <button\n rtElem=\"compact-circle\"\n type=\"button\"\n qa-dataid=\"header-compact-section\"\n [rtMod]=\"{ isActive: activeSectionIds().has(section.id), disabled: section.disabled }\"\n [style.--rt-nav-compact-index]=\"index + 1\"\n [disabled]=\"section.disabled\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"section.label\"\n [rtTooltip]=\"section.label\"\n (click)=\"onCompactSectionClick(section)\">\n @if (section.icon; as icon) {\n <rt-icon size=\"sm\" [name]=\"icon\" />\n }\n @if (section.unread) {\n <span rtElem=\"compact-marker\" role=\"img\" [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n </div>\n <div rtElem=\"compact-slot\" [rtMod]=\"{ left: true }\"><ng-content select=\"[rtCompactLeft]\" /></div>\n <div rtElem=\"compact-slot\" [rtMod]=\"{ center: true }\"><ng-content select=\"[rtCompactCenter]\" /></div>\n <div rtElem=\"compact-slot\" [rtMod]=\"{ right: true }\"><ng-content select=\"[rtCompactRight]\" /></div>\n </div>\n\n <ng-template #mobileNavTpl>\n <div rtBlock=\"rt-page-header-mobile\" role=\"menu\">\n @for (section of sections(); track section.id) {\n @switch (section.kind) {\n @case (EntryKind.Panel) {\n <button\n rtElem=\"section\"\n type=\"button\"\n qa-dataid=\"header-nav-mobile-trigger\"\n [rtMod]=\"{\n isExpanded: expandedSectionIds().has(section.id),\n isActive: activeSectionIds().has(section.id),\n }\"\n [attr.data-id]=\"section.id\"\n [attr.aria-expanded]=\"expandedSectionIds().has(section.id)\"\n (click)=\"toggleSection(section.id)\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n <span rtElem=\"caret\" aria-hidden=\"true\">\n <rt-icon name=\"chevron-up-down\" size=\"xs\" />\n </span>\n </button>\n @if (expandedSectionIds().has(section.id)) {\n <div rtElem=\"children\">\n @for (group of section.panelGroups; track group.id) {\n <div rtElem=\"group\" role=\"group\" [attr.aria-label]=\"group.label || null\">\n @if (group.label) {\n <div rtElem=\"group-title\" qa-dataid=\"header-nav-mobile-group\" [attr.data-id]=\"group.id\">\n @if (group.icon) {\n <rt-icon rtElem=\"group-icon\" size=\"xs\" [name]=\"group.icon\" />\n }\n <span rtElem=\"group-label\">{{ group.label }}</span>\n </div>\n }\n @for (entry of group.items; track entry.id) {\n @if (entry.kind === EntryKind.Link) {\n <a\n rtElem=\"link\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n routerLinkActive=\"rt-page-header-mobile__link--is-active\"\n [rtMod]=\"{ child: true }\"\n [attr.data-id]=\"entry.id\"\n [routerLink]=\"entry.route\"\n [routerLinkActiveOptions]=\"{ exact: entry.routerLinkActiveExact }\"\n (click)=\"closeNavPanels()\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n @if (entry.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n } @else if (entry.disabled) {\n <span\n rtElem=\"disabled-slot\"\n role=\"none\"\n [rtTooltip]=\"'uiSectionInProgress' | rtKitLabel: translate() : { label: entry.label }\">\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n [rtMod]=\"{ child: true, disabled: true }\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-disabled]=\"true\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n </button>\n </span>\n } @else {\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n [rtMod]=\"{ child: true }\"\n [attr.data-id]=\"entry.id\"\n (click)=\"onMobileItemClick(entry.id)\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n @if (entry.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n </div>\n }\n </div>\n }\n }\n @case (EntryKind.Link) {\n <a\n rtElem=\"link\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n routerLinkActive=\"rt-page-header-mobile__link--is-active\"\n [attr.data-id]=\"section.id\"\n [routerLink]=\"section.route\"\n [routerLinkActiveOptions]=\"{ exact: section.routerLinkActiveExact }\"\n (click)=\"closeNavPanels()\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n }\n @default {\n @if (section.disabled) {\n <span\n rtElem=\"disabled-slot\"\n role=\"none\"\n [rtTooltip]=\"'uiSectionInProgress' | rtKitLabel: translate() : { label: section.label }\">\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n [rtMod]=\"{ disabled: true }\"\n [attr.data-id]=\"section.id\"\n [attr.aria-disabled]=\"true\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n </button>\n </span>\n } @else {\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n [attr.data-id]=\"section.id\"\n (click)=\"onMobileItemClick(section.id)\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n }\n }\n </div>\n </ng-template>\n\n <ng-content select=\"[rtHeaderBell]\" />\n\n @if (user(); as u) {\n @if (userMenu(); as menuTpl) {\n <!--\n Меню профиля открывается наведением, как и разделы: весь верхний\n ряд ведёт себя одинаково. Нажатие остаётся запасным путём для\n касания, а переход курсора на список языков панель переживает —\n вложенный оверлей за уход наружу не считается.\n -->\n <button\n rtElem=\"user\"\n type=\"button\"\n qa-dataid=\"header-user-menu\"\n #userPopover=\"rtPopover\"\n rtPopoverTrigger=\"hover\"\n rtPopoverAlign=\"end\"\n rtPopoverOffsetY=\"14\"\n [rtMod]=\"{ isOpen: userPopover.isOpen() }\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"userPopover.isOpen()\"\n [rtPopover]=\"menuTpl\"\n (click)=\"userPopover.open()\">\n <span rtElem=\"user-avatar\" aria-hidden=\"true\">{{ userAvatar() }}</span>\n <span rtElem=\"user-name\" qa-dataid=\"header-user-name\">{{ u.name }}</span>\n <span rtElem=\"user-caret\" aria-hidden=\"true\">\n <rt-icon name=\"chevron-up-down\" size=\"xs\" />\n </span>\n </button>\n } @else {\n <button rtElem=\"user\" type=\"button\" (click)=\"onUserClick()\">\n <span rtElem=\"user-avatar\" aria-hidden=\"true\">{{ userAvatar() }}</span>\n <span rtElem=\"user-name\" qa-dataid=\"header-user-name\">{{ u.name }}</span>\n <span rtElem=\"user-caret\" aria-hidden=\"true\">\n <rt-icon name=\"chevron-up-down\" size=\"xs\" />\n </span>\n </button>\n }\n }\n</ng-container>\n",
|
|
610
|
+
template: "<ng-container rtBlock=\"rt-page-header\">\n <nav rtElem=\"nav\" #nav [attr.aria-label]=\"navAriaLabel()\">\n <ul rtElem=\"list\" role=\"list\" #list>\n @for (section of sections(); track section.id) {\n <li\n rtElem=\"item\"\n qa-dataid=\"header-nav-item\"\n [rtMod]=\"{ isOverflow: overflowIds().has(section.id) }\"\n [attr.data-id]=\"section.id\"\n [attr.aria-hidden]=\"overflowIds().has(section.id) || null\"\n [attr.inert]=\"overflowIds().has(section.id) || null\">\n @switch (section.kind) {\n @case (EntryKind.Panel) {\n <button\n rtElem=\"link\"\n type=\"button\"\n qa-dataid=\"header-nav-trigger\"\n #groupPopover=\"rtPopover\"\n rtPopoverTrigger=\"hover\"\n rtPopoverFitViewport\n rtPopoverOffsetY=\"14\"\n [rtMod]=\"{\n isActive: activeSectionIds().has(section.id),\n isOpen: groupPopover.isOpen(),\n }\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"groupPopover.isOpen()\"\n [rtPopover]=\"submenuTpl\"\n (click)=\"groupPopover.open()\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n <span rtElem=\"caret\" aria-hidden=\"true\">\n <rt-icon name=\"chevron-up-down\" size=\"xs\" />\n </span>\n </button>\n <ng-template #submenuTpl>\n <div rtBlock=\"rt-page-header-submenu\" role=\"menu\" [style.--rt-nav-panel-columns]=\"section.columnCount\">\n @for (column of section.columns; track column.id) {\n <div rtElem=\"column\" qa-dataid=\"header-nav-column\" [attr.data-id]=\"column.id\">\n @for (group of column.groups; track group.id) {\n <div rtElem=\"group\" role=\"group\" [attr.aria-label]=\"group.label || null\">\n @if (group.label) {\n <div rtElem=\"group-title\" qa-dataid=\"header-nav-group\" [attr.data-id]=\"group.id\">\n @if (group.icon) {\n <rt-icon rtElem=\"group-icon\" size=\"xs\" [name]=\"group.icon\" />\n }\n <span rtElem=\"group-label\">{{ group.label }}</span>\n </div>\n }\n @for (entry of group.items; track entry.id) {\n @if (entry.kind === EntryKind.Link) {\n <a\n rtElem=\"link\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-subitem\"\n routerLinkActive=\"rt-page-header-submenu__link--is-active\"\n [attr.data-id]=\"entry.id\"\n [routerLink]=\"entry.route\"\n [routerLinkActiveOptions]=\"{ exact: entry.routerLinkActiveExact }\"\n (click)=\"groupPopover.close()\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n @if (entry.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n } @else if (entry.disabled) {\n <span\n rtElem=\"disabled-slot\"\n role=\"none\"\n [rtTooltip]=\"\n 'uiSectionInProgress' | rtKitLabel: translate() : { label: entry.label }\n \">\n <button\n rtElem=\"link\"\n role=\"menuitem\"\n type=\"button\"\n qa-dataid=\"header-nav-subitem\"\n [rtMod]=\"{ disabled: true }\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-disabled]=\"true\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n </button>\n </span>\n } @else {\n <button\n rtElem=\"link\"\n role=\"menuitem\"\n type=\"button\"\n qa-dataid=\"header-nav-subitem\"\n [attr.data-id]=\"entry.id\"\n (click)=\"onItemClick(entry.id)\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n @if (entry.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n </div>\n }\n </div>\n }\n </div>\n </ng-template>\n }\n @case (EntryKind.Link) {\n <a\n rtElem=\"link\"\n routerLinkActive=\"rt-page-header__link--is-active\"\n [routerLink]=\"section.route\"\n [routerLinkActiveOptions]=\"{ exact: section.routerLinkActiveExact }\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n }\n @default {\n @if (section.disabled) {\n <span\n rtElem=\"disabled-slot\"\n role=\"none\"\n [rtTooltip]=\"'uiSectionInProgress' | rtKitLabel: translate() : { label: section.label }\">\n <button rtElem=\"link\" type=\"button\" [rtMod]=\"{ disabled: true }\" [attr.aria-disabled]=\"true\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n </button>\n </span>\n } @else {\n <button rtElem=\"link\" type=\"button\" (click)=\"onItemClick(section.id)\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n }\n </li>\n }\n <li\n rtElem=\"item\"\n #moreItem\n [rtMod]=\"{ isOverflow: !moreShown() }\"\n [attr.aria-hidden]=\"!moreShown() || null\"\n [attr.inert]=\"!moreShown() || null\">\n <rt-page-header-more [sections]=\"moreSections()\" [active]=\"moreActive()\" (itemClick)=\"onItemClick($event)\" />\n </li>\n </ul>\n </nav>\n\n <button\n rtElem=\"burger\"\n type=\"button\"\n qa-dataid=\"header-nav-burger\"\n #mobileNavPopover=\"rtPopover\"\n rtPopoverFitViewport\n rtPopoverOffsetY=\"14\"\n [attr.aria-label]=\"t().uiNavMenu\"\n [rtMod]=\"{ isOpen: mobileNavPopover.isOpen() }\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"mobileNavPopover.isOpen()\"\n [rtPopover]=\"mobileNavTpl\">\n <rt-icon rtElem=\"burger-icon\" name=\"bars\" size=\"md\" />\n </button>\n\n <!--\n Сжатая полоса стоит в разметке всегда, как и узкая: показывает её модификатор хоста.\n Слева стопка кругов — «ещё» поверх остальных, — дальше три слота потребителя.\n -->\n <div rtElem=\"compact\" qa-dataid=\"header-compact\">\n <div rtElem=\"compact-stack\">\n <button\n rtElem=\"compact-circle\"\n type=\"button\"\n qa-dataid=\"header-compact-more\"\n #compactNavPopover=\"rtPopover\"\n rtPopoverFitViewport\n rtPopoverOffsetY=\"10\"\n [rtMod]=\"{ more: true, isOpen: compactNavPopover.isOpen() }\"\n [attr.aria-label]=\"t().uiNavMenu\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"compactNavPopover.isOpen()\"\n [rtPopover]=\"mobileNavTpl\">\n <rt-icon name=\"ellipsis-h\" size=\"sm\" />\n </button>\n @for (section of compactSections(); track section.id; let index = $index) {\n @if (section.kind === EntryKind.Link) {\n <a\n rtElem=\"compact-circle\"\n qa-dataid=\"header-compact-section\"\n routerLinkActive=\"rt-page-header__compact-circle--is-active\"\n [style.--rt-nav-compact-index]=\"index + 1\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"section.label\"\n [routerLink]=\"section.route\"\n [routerLinkActiveOptions]=\"{ exact: section.routerLinkActiveExact }\"\n [rtTooltip]=\"section.label\">\n @if (section.icon; as icon) {\n <rt-icon size=\"sm\" [name]=\"icon\" />\n }\n @if (section.unread) {\n <span rtElem=\"compact-marker\" role=\"img\" [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n } @else {\n <button\n rtElem=\"compact-circle\"\n type=\"button\"\n qa-dataid=\"header-compact-section\"\n [rtMod]=\"{ isActive: activeSectionIds().has(section.id), disabled: section.disabled }\"\n [style.--rt-nav-compact-index]=\"index + 1\"\n [disabled]=\"section.disabled\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"section.label\"\n [rtTooltip]=\"section.label\"\n (click)=\"onCompactSectionClick(section)\">\n @if (section.icon; as icon) {\n <rt-icon size=\"sm\" [name]=\"icon\" />\n }\n @if (section.unread) {\n <span rtElem=\"compact-marker\" role=\"img\" [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n </div>\n <div rtElem=\"compact-slot\" [rtMod]=\"{ left: true }\"><ng-content select=\"[rtCompactLeft]\" /></div>\n <div rtElem=\"compact-slot\" [rtMod]=\"{ center: true }\"><ng-content select=\"[rtCompactCenter]\" /></div>\n <div rtElem=\"compact-slot\" [rtMod]=\"{ right: true }\"><ng-content select=\"[rtCompactRight]\" /></div>\n </div>\n\n <ng-template #mobileNavTpl>\n <div rtBlock=\"rt-page-header-mobile\" role=\"menu\">\n @for (section of sections(); track section.id) {\n @switch (section.kind) {\n @case (EntryKind.Panel) {\n <button\n rtElem=\"section\"\n type=\"button\"\n qa-dataid=\"header-nav-mobile-trigger\"\n [rtMod]=\"{\n isExpanded: expandedSectionIds().has(section.id),\n isActive: activeSectionIds().has(section.id),\n }\"\n [attr.data-id]=\"section.id\"\n [attr.aria-expanded]=\"expandedSectionIds().has(section.id)\"\n (click)=\"toggleSection(section.id)\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n <span rtElem=\"caret\" aria-hidden=\"true\">\n <rt-icon name=\"chevron-up-down\" size=\"xs\" />\n </span>\n </button>\n @if (expandedSectionIds().has(section.id)) {\n <div rtElem=\"children\">\n @for (group of section.panelGroups; track group.id) {\n <div rtElem=\"group\" role=\"group\" [attr.aria-label]=\"group.label || null\">\n @if (group.label) {\n <div rtElem=\"group-title\" qa-dataid=\"header-nav-mobile-group\" [attr.data-id]=\"group.id\">\n @if (group.icon) {\n <rt-icon rtElem=\"group-icon\" size=\"xs\" [name]=\"group.icon\" />\n }\n <span rtElem=\"group-label\">{{ group.label }}</span>\n </div>\n }\n @for (entry of group.items; track entry.id) {\n @if (entry.kind === EntryKind.Link) {\n <a\n rtElem=\"link\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n routerLinkActive=\"rt-page-header-mobile__link--is-active\"\n [rtMod]=\"{ child: true }\"\n [attr.data-id]=\"entry.id\"\n [routerLink]=\"entry.route\"\n [routerLinkActiveOptions]=\"{ exact: entry.routerLinkActiveExact }\"\n (click)=\"closeNavPanels()\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n @if (entry.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n } @else if (entry.disabled) {\n <span\n rtElem=\"disabled-slot\"\n role=\"none\"\n [rtTooltip]=\"'uiSectionInProgress' | rtKitLabel: translate() : { label: entry.label }\">\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n [rtMod]=\"{ child: true, disabled: true }\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-disabled]=\"true\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n </button>\n </span>\n } @else {\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n [rtMod]=\"{ child: true }\"\n [attr.data-id]=\"entry.id\"\n (click)=\"onMobileItemClick(entry.id)\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n @if (entry.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n </div>\n }\n </div>\n }\n }\n @case (EntryKind.Link) {\n <a\n rtElem=\"link\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n routerLinkActive=\"rt-page-header-mobile__link--is-active\"\n [attr.data-id]=\"section.id\"\n [routerLink]=\"section.route\"\n [routerLinkActiveOptions]=\"{ exact: section.routerLinkActiveExact }\"\n (click)=\"closeNavPanels()\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n }\n @default {\n @if (section.disabled) {\n <span\n rtElem=\"disabled-slot\"\n role=\"none\"\n [rtTooltip]=\"'uiSectionInProgress' | rtKitLabel: translate() : { label: section.label }\">\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n [rtMod]=\"{ disabled: true }\"\n [attr.data-id]=\"section.id\"\n [attr.aria-disabled]=\"true\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n </button>\n </span>\n } @else {\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n [attr.data-id]=\"section.id\"\n (click)=\"onMobileItemClick(section.id)\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n }\n }\n </div>\n </ng-template>\n\n <ng-content select=\"[rtHeaderBell]\" />\n\n @if (user(); as u) {\n @if (userMenu(); as menuTpl) {\n <!--\n Меню профиля открывается наведением, как и разделы: весь верхний\n ряд ведёт себя одинаково. Нажатие остаётся запасным путём для\n касания, а переход курсора на список языков панель переживает —\n вложенный оверлей за уход наружу не считается.\n -->\n <button\n rtElem=\"user\"\n type=\"button\"\n qa-dataid=\"header-user-menu\"\n #userPopover=\"rtPopover\"\n rtPopoverTrigger=\"hover\"\n rtPopoverAlign=\"end\"\n rtPopoverOffsetY=\"14\"\n [rtMod]=\"{ isOpen: userPopover.isOpen() }\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"userPopover.isOpen()\"\n [rtPopover]=\"menuTpl\"\n (click)=\"userPopover.open()\">\n <span rtElem=\"user-avatar\" aria-hidden=\"true\">{{ userAvatar() }}</span>\n <span rtElem=\"user-name\" qa-dataid=\"header-user-name\">{{ u.name }}</span>\n <span rtElem=\"user-caret\" aria-hidden=\"true\">\n <rt-icon name=\"chevron-up-down\" size=\"xs\" />\n </span>\n </button>\n } @else {\n <button rtElem=\"user\" type=\"button\" (click)=\"onUserClick()\">\n <span rtElem=\"user-avatar\" aria-hidden=\"true\">{{ userAvatar() }}</span>\n <span rtElem=\"user-name\" qa-dataid=\"header-user-name\">{{ u.name }}</span>\n <span rtElem=\"user-caret\" aria-hidden=\"true\">\n <rt-icon name=\"chevron-up-down\" size=\"xs\" />\n </span>\n </button>\n }\n }\n</ng-container>\n",
|
|
287
611
|
styles: [
|
|
288
|
-
"@charset \"UTF-8\";@layer rt-kit.components{.rt-page-header{--rt-nav-header-radius: var(--rt-radius-md);--rt-nav-header-transition-duration: var(--rt-duration-fast);--rt-nav-item-radius: var(--rt-radius-md);--rt-nav-item-border-width: var(--rt-border-width-thin);--rt-nav-burger-radius: var(--rt-radius-ms);--rt-nav-marker-radius: var(--rt-radius-full);--rt-nav-user-avatar-radius: var(--rt-radius-full);--rt-nav-user-avatar-border-width: var(--rt-border-width-thin);display:flex;width:auto;min-height:48px;box-sizing:border-box;align-items:center;justify-content:space-between;padding:var(--rt-nav-header-padding);border-radius:var(--rt-nav-header-radius);background-color:var(--rt-page-header-bg, var(--rt-nav-header-color-bg));color:var(--rt-nav-item-color);gap:var(--rt-space-2)}.rt-page-header__nav{min-width:0;flex:1 1
|
|
612
|
+
"@charset \"UTF-8\";@layer rt-kit.components{.rt-page-header{--rt-nav-header-radius: var(--rt-radius-md);--rt-nav-header-transition-duration: var(--rt-duration-fast);--rt-nav-item-radius: var(--rt-radius-md);--rt-nav-item-border-width: var(--rt-border-width-thin);--rt-nav-burger-radius: var(--rt-radius-ms);--rt-nav-marker-radius: var(--rt-radius-full);--rt-nav-user-avatar-radius: var(--rt-radius-full);--rt-nav-user-avatar-border-width: var(--rt-border-width-thin);display:flex;width:auto;min-height:48px;box-sizing:border-box;align-items:center;justify-content:space-between;padding:var(--rt-nav-header-padding);border-radius:var(--rt-nav-header-radius);background-color:var(--rt-page-header-bg, var(--rt-nav-header-color-bg));color:var(--rt-nav-item-color);gap:var(--rt-space-2)}.rt-page-header__nav{min-width:0;flex:1 1 0}.rt-page-header__list{position:relative;display:flex;flex-flow:row wrap;align-items:center;padding:0;margin:0;gap:var(--rt-nav-item-gap);list-style:none}.rt-page-header__item{display:inline-flex;flex-shrink:0;align-items:center;border:var(--rt-nav-item-border-width) solid var(--rt-nav-item-color-border);border-radius:var(--rt-nav-item-radius);background-color:var(--rt-nav-item-color-bg)}.rt-page-header__item--is-overflow{position:absolute;top:0;left:0;pointer-events:none;visibility:hidden}.rt-page-header__disabled-slot{display:inline-flex;flex-direction:column;align-items:stretch}.rt-page-header__link{position:relative;display:inline-flex;min-height:var(--rt-nav-item-height);align-items:center;padding:var(--rt-nav-item-padding);border:0;border-radius:var(--rt-nav-item-radius);background-color:transparent;color:var(--rt-nav-item-color);cursor:pointer;font-size:var(--rt-nav-item-font-size);font-weight:var(--rt-nav-item-font-weight);gap:var(--rt-nav-item-content-gap);line-height:var(--rt-nav-item-line-height);text-decoration:none;transition:color var(--rt-nav-header-transition-duration) linear;white-space:nowrap}.rt-page-header__link:hover{color:var(--rt-nav-item-color-hover)}.rt-page-header__link:focus{outline:none}.rt-page-header__link:focus-visible{outline:2px dashed var(--rt-nav-color-focus);outline-offset:2px}.rt-page-header__link--is-active{background-color:var(--rt-nav-item-color-bg-active);color:var(--rt-nav-item-color)}.rt-page-header__link--is-open{color:var(--rt-nav-item-color-hover)}.rt-page-header__link--disabled,.rt-page-header__link:disabled,.rt-page-header__link[aria-disabled=true]{background-color:transparent;color:var(--rt-nav-color-disabled);cursor:not-allowed}.rt-page-header__link--disabled:hover,.rt-page-header__link:disabled:hover,.rt-page-header__link[aria-disabled=true]:hover{background-color:transparent}.rt-page-header__icon{flex-shrink:0}.rt-page-header__marker{width:var(--rt-nav-marker-size);height:var(--rt-nav-marker-size);flex-shrink:0;border-radius:var(--rt-nav-marker-radius);background-color:var(--rt-nav-marker-color)}.rt-page-header__caret{display:inline-flex;flex-shrink:0;color:var(--rt-nav-item-color-caret)}.rt-page-header__burger{display:none;flex-shrink:0;align-items:center;justify-content:center;padding:var(--rt-space-2);border:0;border-radius:var(--rt-nav-burger-radius);background-color:transparent;color:var(--rt-nav-item-color);cursor:pointer;transition:color var(--rt-nav-header-transition-duration) linear}.rt-page-header__burger:hover{color:var(--rt-nav-item-color-hover)}.rt-page-header__burger:active{color:var(--rt-nav-item-color-pressed)}.rt-page-header__burger:focus{outline:none}.rt-page-header__burger:focus-visible{outline:2px dashed var(--rt-nav-color-focus);outline-offset:2px}.rt-page-header__burger--is-open{background-color:var(--rt-nav-item-color-bg-active)}.rt-page-header__burger-icon{flex-shrink:0}@container rt-place (width <= 1380px){.rt-page-header__link .rt-page-header__icon{display:none}}@container rt-place (width <= 1080px){.rt-page-header__nav{display:none}.rt-page-header__burger{display:inline-flex}}.rt-page-header__user{display:inline-flex;min-height:var(--rt-nav-item-height);align-items:center;padding:var(--rt-nav-item-padding);border:0;border-radius:var(--rt-nav-item-radius);background-color:transparent;color:var(--rt-nav-item-color);cursor:pointer;font-size:var(--rt-nav-item-font-size);font-weight:var(--rt-nav-item-font-weight);gap:var(--rt-nav-item-content-gap);line-height:var(--rt-leading-tight);transition:background-color var(--rt-nav-header-transition-duration) linear}.rt-page-header__user:hover,.rt-page-header__user:active{background-color:var(--rt-nav-item-color-bg-active)}.rt-page-header__user:focus{outline:none}.rt-page-header__user:focus-visible{outline:2px dashed var(--rt-nav-color-focus);outline-offset:2px}.rt-page-header__user-avatar{display:inline-flex;width:16px;height:16px;align-items:center;justify-content:center;border:var(--rt-nav-user-avatar-border-width) solid var(--rt-nav-item-color-caret);border-radius:var(--rt-nav-user-avatar-radius);color:var(--rt-color-text-muted);font-size:var(--rt-text-2xs);font-weight:var(--rt-font-weight-semibold);line-height:var(--rt-leading-none)}.rt-page-header__user-name{white-space:nowrap}.rt-page-header__user-caret{display:inline-flex;flex-shrink:0;color:var(--rt-nav-item-color-caret)}.rt-page-header__user--is-open{background-color:var(--rt-nav-item-color-bg-active)}}\n",
|
|
289
613
|
"@charset \"UTF-8\";@layer rt-kit.components{.rt-page-header-submenu{--rt-nav-panel-columns-width: calc(var(--rt-nav-panel-columns) * var(--rt-nav-panel-column-width));--rt-nav-panel-gaps-width: calc((var(--rt-nav-panel-columns) - 1) * var(--rt-nav-panel-column-gap));--rt-nav-panel-padding-width: calc(var(--rt-nav-panel-padding) + var(--rt-nav-panel-padding));--rt-nav-panel-radius: var(--rt-radius-md);--rt-nav-panel-border-width: var(--rt-border-width-thin);--rt-nav-panel-item-radius: var(--rt-radius-md);--rt-nav-panel-item-transition-duration: var(--rt-duration-fast);--rt-nav-marker-radius: var(--rt-radius-full);display:flex;width:calc(var(--rt-nav-panel-columns-width) + var(--rt-nav-panel-gaps-width) + var(--rt-nav-panel-padding-width));box-sizing:border-box;align-items:flex-start;padding:var(--rt-nav-panel-padding-y) var(--rt-nav-panel-padding);border:var(--rt-nav-panel-border-width) solid var(--rt-nav-panel-color-border);border-radius:var(--rt-nav-panel-radius);background-color:var(--rt-nav-panel-color-bg);box-shadow:var(--rt-nav-panel-shadow);color:var(--rt-nav-panel-item-color);font-size:var(--rt-nav-panel-item-font-size);font-weight:var(--rt-nav-panel-item-font-weight);gap:var(--rt-nav-panel-column-gap)}.rt-page-header-submenu__column{display:flex;min-width:0;flex:0 0 var(--rt-nav-panel-column-width);flex-direction:column;gap:var(--rt-nav-panel-group-gap)}.rt-page-header-submenu__group{display:flex;flex-direction:column;align-items:flex-start;gap:var(--rt-nav-panel-item-gap)}.rt-page-header-submenu__group-title{display:inline-flex;max-width:100%;min-height:var(--rt-nav-panel-item-height);align-items:center;padding:var(--rt-nav-panel-item-padding);color:var(--rt-nav-panel-group-color);cursor:default;font-size:var(--rt-nav-panel-group-font-size);font-weight:var(--rt-nav-panel-group-font-weight);gap:var(--rt-nav-panel-group-content-gap);line-height:var(--rt-leading-none)}.rt-page-header-submenu__group-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rt-page-header-submenu__group-icon{flex-shrink:0}.rt-page-header-submenu__disabled-slot{display:inline-flex;max-width:100%;flex-direction:column;align-items:flex-start}.rt-page-header-submenu__link{display:inline-flex;max-width:100%;min-height:var(--rt-nav-panel-item-height);align-items:center;padding:var(--rt-nav-panel-item-padding);border:0;border-radius:var(--rt-nav-panel-item-radius);background-color:transparent;color:var(--rt-nav-panel-item-color);cursor:pointer;font-size:var(--rt-nav-panel-item-font-size);font-weight:var(--rt-nav-panel-item-font-weight);gap:var(--rt-nav-panel-item-content-gap);line-height:var(--rt-leading-none);text-align:left;text-decoration:none;transition:background-color var(--rt-nav-panel-item-transition-duration) linear,color var(--rt-nav-panel-item-transition-duration) linear;white-space:nowrap}.rt-page-header-submenu__link--is-active{background-color:var(--rt-nav-panel-item-color-bg-active);color:var(--rt-nav-panel-item-color-active)}.rt-page-header-submenu__link:not(.rt-page-header-submenu__link--is-active):hover,.rt-page-header-submenu__link:not(.rt-page-header-submenu__link--is-active):active{background-color:var(--rt-nav-panel-item-color-bg-hover)}.rt-page-header-submenu__link:focus{outline:none}.rt-page-header-submenu__link:focus-visible{outline:2px dashed var(--rt-nav-color-focus);outline-offset:2px}.rt-page-header-submenu__link--disabled,.rt-page-header-submenu__link:disabled,.rt-page-header-submenu__link[aria-disabled=true]{background-color:transparent;color:var(--rt-nav-color-disabled);cursor:not-allowed}.rt-page-header-submenu__link--disabled:hover,.rt-page-header-submenu__link:disabled:hover,.rt-page-header-submenu__link[aria-disabled=true]:hover{background-color:transparent}.rt-page-header-submenu__label{overflow:hidden;text-overflow:ellipsis}.rt-page-header-submenu__marker{width:var(--rt-nav-marker-size);height:var(--rt-nav-marker-size);flex-shrink:0;border-radius:var(--rt-nav-marker-radius);background-color:var(--rt-nav-marker-color)}.rt-page-header-submenu__icon{flex-shrink:0}}\n",
|
|
290
|
-
"@charset \"UTF-8\";@layer rt-kit.components{.rt-page-header-mobile{--rt-nav-panel-radius: var(--rt-radius-md);--rt-nav-panel-border-width: var(--rt-border-width-thin);--rt-nav-panel-item-radius: var(--rt-radius-md);--rt-nav-panel-item-transition-duration: var(--rt-duration-fast);--rt-nav-marker-radius: var(--rt-radius-full);display:flex;min-width:240px;max-width:320px;min-height:0;max-height:100%;box-sizing:border-box;flex-direction:column;padding:var(--rt-space-2);border:var(--rt-nav-panel-border-width) solid var(--rt-nav-panel-color-border);border-radius:var(--rt-nav-panel-radius);background-color:var(--rt-nav-panel-color-bg);box-shadow:var(--rt-nav-panel-shadow);gap:var(--rt-space-2xs);overflow-y:auto}.rt-page-header-mobile__link,.rt-page-header-mobile__section{position:relative;display:flex;width:100%;align-items:center;padding:var(--rt-nav-item-padding);border:0;border-radius:var(--rt-nav-panel-item-radius);background-color:transparent;color:var(--rt-nav-item-color);cursor:pointer;font-size:var(--rt-nav-item-font-size);font-weight:var(--rt-nav-item-font-weight);gap:var(--rt-nav-item-content-gap);line-height:var(--rt-leading-tight);text-align:left;text-decoration:none;transition:background-color var(--rt-nav-panel-item-transition-duration) linear,color var(--rt-nav-panel-item-transition-duration) linear;white-space:nowrap}.rt-page-header-mobile__link:hover,.rt-page-header-mobile__section:hover{background-color:var(--rt-nav-panel-item-color-bg-hover)}.rt-page-header-mobile__link:focus,.rt-page-header-mobile__section:focus{outline:none}.rt-page-header-mobile__link:focus-visible,.rt-page-header-mobile__section:focus-visible{outline:2px dashed var(--rt-nav-color-focus);outline-offset:2px}.rt-page-header-mobile__link--child{color:var(--rt-nav-panel-item-color);font-weight:var(--rt-nav-panel-item-font-weight)}.rt-page-header-mobile__link--is-active{background-color:var(--rt-nav-panel-item-color-bg-active);color:var(--rt-nav-panel-item-color-active)}.rt-page-header-mobile__link--disabled,.rt-page-header-mobile__link:disabled,.rt-page-header-mobile__link[aria-disabled=true]{background-color:transparent;color:var(--rt-nav-color-disabled);cursor:not-allowed}.rt-page-header-mobile__link--disabled:hover,.rt-page-header-mobile__link:disabled:hover,.rt-page-header-mobile__link[aria-disabled=true]:hover{background-color:transparent}.rt-page-header-mobile__disabled-slot{display:flex;flex-direction:column;align-items:stretch}.rt-page-header-mobile__section--is-active{background-color:var(--rt-color-bg-surface-subtle)}.rt-page-header-mobile__caret{display:inline-flex;flex-shrink:0;margin-left:auto;color:var(--rt-nav-item-color-caret);transition:transform var(--rt-nav-panel-item-transition-duration) linear}.rt-page-header-mobile__section--is-expanded .rt-page-header-mobile__caret{transform:rotate(180deg)}.rt-page-header-mobile__marker{width:var(--rt-nav-marker-size);height:var(--rt-nav-marker-size);flex-shrink:0;border-radius:var(--rt-nav-marker-radius);background-color:var(--rt-nav-marker-color)}.rt-page-header-mobile__children{display:flex;flex-direction:column;padding-left:var(--rt-space-4);gap:var(--rt-nav-panel-group-gap)}.rt-page-header-mobile__group{display:flex;flex-direction:column;gap:var(--rt-space-2xs)}.rt-page-header-mobile__group-title{display:flex;min-height:var(--rt-nav-panel-item-height);align-items:center;padding:var(--rt-nav-panel-item-padding);color:var(--rt-nav-panel-group-color);cursor:default;font-size:var(--rt-nav-panel-group-font-size);font-weight:var(--rt-nav-panel-group-font-weight);gap:var(--rt-nav-panel-group-content-gap);line-height:var(--rt-leading-none)}.rt-page-header-mobile__group-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rt-page-header-mobile__group-icon,.rt-page-header-mobile__icon{flex-shrink:0}}\n",
|
|
614
|
+
"@charset \"UTF-8\";@layer rt-kit.components{.rt-page-header-mobile{--rt-nav-panel-radius: var(--rt-radius-md);--rt-nav-panel-border-width: var(--rt-border-width-thin);--rt-nav-panel-item-radius: var(--rt-radius-md);--rt-nav-panel-item-transition-duration: var(--rt-duration-fast);--rt-nav-marker-radius: var(--rt-radius-full);display:flex;min-width:240px;max-width:320px;min-height:0;max-height:100%;box-sizing:border-box;flex-direction:column;padding:var(--rt-space-2);border:var(--rt-nav-panel-border-width) solid var(--rt-nav-panel-color-border);border-radius:var(--rt-nav-panel-radius);background-color:var(--rt-nav-panel-color-bg);box-shadow:var(--rt-nav-panel-shadow);gap:var(--rt-space-2xs);overflow-y:auto}.rt-page-header-mobile__link,.rt-page-header-mobile__section{position:relative;display:flex;width:100%;align-items:center;padding:var(--rt-nav-item-padding);border:0;border-radius:var(--rt-nav-panel-item-radius);background-color:transparent;color:var(--rt-nav-item-color);cursor:pointer;font-size:var(--rt-nav-item-font-size);font-weight:var(--rt-nav-item-font-weight);gap:var(--rt-nav-item-content-gap);line-height:var(--rt-leading-tight);text-align:left;text-decoration:none;transition:background-color var(--rt-nav-panel-item-transition-duration) linear,color var(--rt-nav-panel-item-transition-duration) linear;white-space:nowrap}.rt-page-header-mobile__link:hover,.rt-page-header-mobile__section:hover{background-color:var(--rt-nav-panel-item-color-bg-hover)}.rt-page-header-mobile__link:focus,.rt-page-header-mobile__section:focus{outline:none}.rt-page-header-mobile__link:focus-visible,.rt-page-header-mobile__section:focus-visible{outline:2px dashed var(--rt-nav-color-focus);outline-offset:2px}.rt-page-header-mobile__link--child{color:var(--rt-nav-panel-item-color);font-weight:var(--rt-nav-panel-item-font-weight)}.rt-page-header-mobile__link--is-active{background-color:var(--rt-nav-panel-item-color-bg-active);color:var(--rt-nav-panel-item-color-active)}.rt-page-header-mobile__link--disabled,.rt-page-header-mobile__link:disabled,.rt-page-header-mobile__link[aria-disabled=true]{background-color:transparent;color:var(--rt-nav-color-disabled);cursor:not-allowed}.rt-page-header-mobile__link--disabled:hover,.rt-page-header-mobile__link:disabled:hover,.rt-page-header-mobile__link[aria-disabled=true]:hover{background-color:transparent}.rt-page-header-mobile__disabled-slot{display:flex;flex-direction:column;align-items:stretch}.rt-page-header-mobile__section--is-active{background-color:var(--rt-color-bg-surface-subtle)}.rt-page-header-mobile__caret{display:inline-flex;flex-shrink:0;margin-left:auto;color:var(--rt-nav-item-color-caret);transition:transform var(--rt-nav-panel-item-transition-duration) linear}.rt-page-header-mobile__section--is-expanded .rt-page-header-mobile__caret{transform:rotate(180deg)}.rt-page-header-mobile__marker{width:var(--rt-nav-marker-size);height:var(--rt-nav-marker-size);flex-shrink:0;border-radius:var(--rt-nav-marker-radius);background-color:var(--rt-nav-marker-color)}.rt-page-header-mobile__children{display:flex;flex-direction:column;padding-left:var(--rt-space-4);gap:var(--rt-nav-panel-group-gap)}.rt-page-header-mobile__group{display:flex;flex-direction:column;gap:var(--rt-space-2xs)}.rt-page-header-mobile__group-title{display:flex;min-height:var(--rt-nav-panel-item-height);align-items:center;padding:var(--rt-nav-panel-item-padding);color:var(--rt-nav-panel-group-color);cursor:default;font-size:var(--rt-nav-panel-group-font-size);font-weight:var(--rt-nav-panel-group-font-weight);gap:var(--rt-nav-panel-group-content-gap);line-height:var(--rt-leading-none)}.rt-page-header-mobile__group-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rt-page-header-mobile__group-icon,.rt-page-header-mobile__icon{flex-shrink:0}.rt-page-header-mobile__heading{display:flex;min-height:var(--rt-nav-panel-item-height);align-items:center;padding:var(--rt-nav-panel-item-padding);color:var(--rt-nav-item-color);cursor:default;font-size:var(--rt-nav-item-font-size);font-weight:var(--rt-nav-item-font-weight);line-height:var(--rt-leading-tight);white-space:nowrap}.rt-page-header-mobile--more .rt-page-header-mobile__children{padding-left:0}.rt-page-header-mobile--more .rt-page-header-mobile__group-title{letter-spacing:var(--rt-letter-spacing-wide);text-transform:uppercase}}\n",
|
|
291
615
|
"@charset \"UTF-8\";@layer rt-kit.components{.rt-page-header{--rt-nav-compact-height: 46px;--rt-nav-compact-circle-size: var(--rt-size-6);--rt-nav-compact-circle-overlap: calc(var(--rt-nav-compact-circle-size) / 2);--rt-nav-compact-circle-ring-width: var(--rt-border-width-thick);--rt-nav-compact-circle-radius: var(--rt-radius-full);--rt-nav-compact-circle-color-bg: var(--rt-neutral-100);--rt-nav-compact-circle-color-bg-active: var(--rt-nav-item-color-bg-active);--rt-nav-compact-color-bg: var(--rt-color-bg-surface);--rt-nav-compact-stack-depth: 16}.rt-page-header--sticky{position:sticky;z-index:var(--rt-z-sticky);top:-1px}.rt-page-header__compact{display:none;min-width:0;min-height:var(--rt-nav-compact-height);flex:1 1 auto;align-items:center;gap:var(--rt-space-4)}.rt-page-header--is-compact{min-height:var(--rt-nav-compact-height);padding:0 var(--rt-space-5);border-radius:0;background-color:var(--rt-nav-compact-color-bg)}.rt-page-header--is-compact>:not(.rt-page-header__compact){display:none}.rt-page-header--is-compact .rt-page-header__compact{display:flex}.rt-page-header__compact-stack{display:flex;flex-shrink:0;align-items:center;isolation:isolate}.rt-page-header__compact-circle{--rt-nav-compact-index: 0;position:relative;z-index:calc(var(--rt-nav-compact-stack-depth) - var(--rt-nav-compact-index));display:inline-flex;width:var(--rt-nav-compact-circle-size);height:var(--rt-nav-compact-circle-size);box-sizing:border-box;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;border-radius:var(--rt-nav-compact-circle-radius);background-color:var(--rt-nav-compact-circle-color-bg);box-shadow:0 0 0 var(--rt-nav-compact-circle-ring-width) var(--rt-nav-compact-color-bg);color:var(--rt-nav-item-color);cursor:pointer;text-decoration:none;transition:color var(--rt-nav-header-transition-duration) linear}.rt-page-header__compact-circle+.rt-page-header__compact-circle{margin-left:calc(-1 * var(--rt-nav-compact-circle-overlap))}.rt-page-header__compact-circle:hover{color:var(--rt-nav-item-color-hover)}.rt-page-header__compact-circle:active{color:var(--rt-nav-item-color-pressed)}.rt-page-header__compact-circle:focus{outline:none}.rt-page-header__compact-circle:focus-visible{z-index:calc(var(--rt-nav-compact-stack-depth) + 1);outline:2px dashed var(--rt-nav-color-focus);outline-offset:2px}.rt-page-header__compact-circle--is-active,.rt-page-header__compact-circle--is-open{background-color:var(--rt-nav-compact-circle-color-bg-active);color:var(--rt-nav-item-color-hover)}.rt-page-header__compact-circle--disabled,.rt-page-header__compact-circle:disabled{color:var(--rt-nav-color-disabled);cursor:not-allowed}.rt-page-header__compact-marker{position:absolute;top:0;right:0;width:var(--rt-nav-marker-size);height:var(--rt-nav-marker-size);border-radius:var(--rt-nav-marker-radius);background-color:var(--rt-nav-marker-color)}.rt-page-header__compact-slot{display:flex;min-width:0;align-items:center}.rt-page-header__compact-slot--left{flex:0 1 auto}.rt-page-header__compact-slot--center{flex:1 1 auto;justify-content:center}.rt-page-header__compact-slot--right{flex:0 0 auto;margin-left:auto}}\n"
|
|
292
616
|
],
|
|
293
617
|
dependencies: [
|
|
@@ -369,6 +693,13 @@ var RtPageHeaderComponent = class RtPageHeaderComponent {
|
|
|
369
693
|
],
|
|
370
694
|
exportAs: ["rtTooltip"]
|
|
371
695
|
},
|
|
696
|
+
{
|
|
697
|
+
kind: "component",
|
|
698
|
+
type: RtPageHeaderMoreComponent,
|
|
699
|
+
selector: "rt-page-header-more",
|
|
700
|
+
inputs: ["sections", "active"],
|
|
701
|
+
outputs: ["itemClick"]
|
|
702
|
+
},
|
|
372
703
|
{
|
|
373
704
|
kind: "directive",
|
|
374
705
|
type: BlockDirective,
|
|
@@ -415,6 +746,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
415
746
|
RtIconComponent,
|
|
416
747
|
RtPopoverDirective,
|
|
417
748
|
RtTooltipDirective,
|
|
749
|
+
RtPageHeaderMoreComponent,
|
|
418
750
|
BlockDirective,
|
|
419
751
|
ElemDirective,
|
|
420
752
|
ModDirective
|
|
@@ -424,17 +756,29 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
424
756
|
"[class.rt-page-header--sticky]": "stickyCompact()",
|
|
425
757
|
"[class.rt-page-header--is-compact]": "compact()"
|
|
426
758
|
},
|
|
427
|
-
template: "<ng-container rtBlock=\"rt-page-header\">\n <nav rtElem=\"nav\" [attr.aria-label]=\"navAriaLabel()\">\n <ul rtElem=\"list\" role=\"list\">\n @for (section of sections(); track section.id) {\n <li rtElem=\"item\" qa-dataid=\"header-nav-item\" [attr.data-id]=\"section.id\">\n @switch (section.kind) {\n @case (EntryKind.Panel) {\n <button\n rtElem=\"link\"\n type=\"button\"\n qa-dataid=\"header-nav-trigger\"\n #groupPopover=\"rtPopover\"\n rtPopoverTrigger=\"hover\"\n rtPopoverFitViewport\n rtPopoverOffsetY=\"14\"\n [rtMod]=\"{\n isActive: activeSectionIds().has(section.id),\n isOpen: groupPopover.isOpen(),\n }\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"groupPopover.isOpen()\"\n [rtPopover]=\"submenuTpl\"\n (click)=\"groupPopover.open()\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n <span rtElem=\"caret\" aria-hidden=\"true\">\n <rt-icon name=\"chevron-up-down\" size=\"xs\" />\n </span>\n </button>\n <ng-template #submenuTpl>\n <div rtBlock=\"rt-page-header-submenu\" role=\"menu\" [style.--rt-nav-panel-columns]=\"section.columnCount\">\n @for (column of section.columns; track column.id) {\n <div rtElem=\"column\" qa-dataid=\"header-nav-column\" [attr.data-id]=\"column.id\">\n @for (group of column.groups; track group.id) {\n <div rtElem=\"group\" role=\"group\" [attr.aria-label]=\"group.label || null\">\n @if (group.label) {\n <div rtElem=\"group-title\" qa-dataid=\"header-nav-group\" [attr.data-id]=\"group.id\">\n @if (group.icon) {\n <rt-icon rtElem=\"group-icon\" size=\"xs\" [name]=\"group.icon\" />\n }\n <span rtElem=\"group-label\">{{ group.label }}</span>\n </div>\n }\n @for (entry of group.items; track entry.id) {\n @if (entry.kind === EntryKind.Link) {\n <a\n rtElem=\"link\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-subitem\"\n routerLinkActive=\"rt-page-header-submenu__link--is-active\"\n [attr.data-id]=\"entry.id\"\n [routerLink]=\"entry.route\"\n [routerLinkActiveOptions]=\"{ exact: entry.routerLinkActiveExact }\"\n (click)=\"groupPopover.close()\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n @if (entry.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n } @else if (entry.disabled) {\n <span\n rtElem=\"disabled-slot\"\n role=\"none\"\n [rtTooltip]=\"\n 'uiSectionInProgress' | rtKitLabel: translate() : { label: entry.label }\n \">\n <button\n rtElem=\"link\"\n role=\"menuitem\"\n type=\"button\"\n qa-dataid=\"header-nav-subitem\"\n [rtMod]=\"{ disabled: true }\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-disabled]=\"true\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n </button>\n </span>\n } @else {\n <button\n rtElem=\"link\"\n role=\"menuitem\"\n type=\"button\"\n qa-dataid=\"header-nav-subitem\"\n [attr.data-id]=\"entry.id\"\n (click)=\"onItemClick(entry.id)\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n @if (entry.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n </div>\n }\n </div>\n }\n </div>\n </ng-template>\n }\n @case (EntryKind.Link) {\n <a\n rtElem=\"link\"\n routerLinkActive=\"rt-page-header__link--is-active\"\n [routerLink]=\"section.route\"\n [routerLinkActiveOptions]=\"{ exact: section.routerLinkActiveExact }\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n }\n @default {\n @if (section.disabled) {\n <span\n rtElem=\"disabled-slot\"\n role=\"none\"\n [rtTooltip]=\"'uiSectionInProgress' | rtKitLabel: translate() : { label: section.label }\">\n <button rtElem=\"link\" type=\"button\" [rtMod]=\"{ disabled: true }\" [attr.aria-disabled]=\"true\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n </button>\n </span>\n } @else {\n <button rtElem=\"link\" type=\"button\" (click)=\"onItemClick(section.id)\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n }\n </li>\n }\n </ul>\n </nav>\n\n <button\n rtElem=\"burger\"\n type=\"button\"\n qa-dataid=\"header-nav-burger\"\n #mobileNavPopover=\"rtPopover\"\n rtPopoverFitViewport\n rtPopoverOffsetY=\"14\"\n [attr.aria-label]=\"t().uiNavMenu\"\n [rtMod]=\"{ isOpen: mobileNavPopover.isOpen() }\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"mobileNavPopover.isOpen()\"\n [rtPopover]=\"mobileNavTpl\">\n <rt-icon rtElem=\"burger-icon\" name=\"bars\" size=\"md\" />\n </button>\n\n <!--\n Сжатая полоса стоит в разметке всегда, как и узкая: показывает её модификатор хоста.\n Слева стопка кругов — «ещё» поверх остальных, — дальше три слота потребителя.\n -->\n <div rtElem=\"compact\" qa-dataid=\"header-compact\">\n <div rtElem=\"compact-stack\">\n <button\n rtElem=\"compact-circle\"\n type=\"button\"\n qa-dataid=\"header-compact-more\"\n #compactNavPopover=\"rtPopover\"\n rtPopoverFitViewport\n rtPopoverOffsetY=\"10\"\n [rtMod]=\"{ more: true, isOpen: compactNavPopover.isOpen() }\"\n [attr.aria-label]=\"t().uiNavMenu\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"compactNavPopover.isOpen()\"\n [rtPopover]=\"mobileNavTpl\">\n <rt-icon name=\"ellipsis-h\" size=\"sm\" />\n </button>\n @for (section of compactSections(); track section.id; let index = $index) {\n @if (section.kind === EntryKind.Link) {\n <a\n rtElem=\"compact-circle\"\n qa-dataid=\"header-compact-section\"\n routerLinkActive=\"rt-page-header__compact-circle--is-active\"\n [style.--rt-nav-compact-index]=\"index + 1\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"section.label\"\n [routerLink]=\"section.route\"\n [routerLinkActiveOptions]=\"{ exact: section.routerLinkActiveExact }\"\n [rtTooltip]=\"section.label\">\n @if (section.icon; as icon) {\n <rt-icon size=\"sm\" [name]=\"icon\" />\n }\n @if (section.unread) {\n <span rtElem=\"compact-marker\" role=\"img\" [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n } @else {\n <button\n rtElem=\"compact-circle\"\n type=\"button\"\n qa-dataid=\"header-compact-section\"\n [rtMod]=\"{ isActive: activeSectionIds().has(section.id), disabled: section.disabled }\"\n [style.--rt-nav-compact-index]=\"index + 1\"\n [disabled]=\"section.disabled\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"section.label\"\n [rtTooltip]=\"section.label\"\n (click)=\"onCompactSectionClick(section)\">\n @if (section.icon; as icon) {\n <rt-icon size=\"sm\" [name]=\"icon\" />\n }\n @if (section.unread) {\n <span rtElem=\"compact-marker\" role=\"img\" [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n </div>\n <div rtElem=\"compact-slot\" [rtMod]=\"{ left: true }\"><ng-content select=\"[rtCompactLeft]\" /></div>\n <div rtElem=\"compact-slot\" [rtMod]=\"{ center: true }\"><ng-content select=\"[rtCompactCenter]\" /></div>\n <div rtElem=\"compact-slot\" [rtMod]=\"{ right: true }\"><ng-content select=\"[rtCompactRight]\" /></div>\n </div>\n\n <ng-template #mobileNavTpl>\n <div rtBlock=\"rt-page-header-mobile\" role=\"menu\">\n @for (section of sections(); track section.id) {\n @switch (section.kind) {\n @case (EntryKind.Panel) {\n <button\n rtElem=\"section\"\n type=\"button\"\n qa-dataid=\"header-nav-mobile-trigger\"\n [rtMod]=\"{\n isExpanded: expandedSectionIds().has(section.id),\n isActive: activeSectionIds().has(section.id),\n }\"\n [attr.data-id]=\"section.id\"\n [attr.aria-expanded]=\"expandedSectionIds().has(section.id)\"\n (click)=\"toggleSection(section.id)\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n <span rtElem=\"caret\" aria-hidden=\"true\">\n <rt-icon name=\"chevron-up-down\" size=\"xs\" />\n </span>\n </button>\n @if (expandedSectionIds().has(section.id)) {\n <div rtElem=\"children\">\n @for (group of section.panelGroups; track group.id) {\n <div rtElem=\"group\" role=\"group\" [attr.aria-label]=\"group.label || null\">\n @if (group.label) {\n <div rtElem=\"group-title\" qa-dataid=\"header-nav-mobile-group\" [attr.data-id]=\"group.id\">\n @if (group.icon) {\n <rt-icon rtElem=\"group-icon\" size=\"xs\" [name]=\"group.icon\" />\n }\n <span rtElem=\"group-label\">{{ group.label }}</span>\n </div>\n }\n @for (entry of group.items; track entry.id) {\n @if (entry.kind === EntryKind.Link) {\n <a\n rtElem=\"link\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n routerLinkActive=\"rt-page-header-mobile__link--is-active\"\n [rtMod]=\"{ child: true }\"\n [attr.data-id]=\"entry.id\"\n [routerLink]=\"entry.route\"\n [routerLinkActiveOptions]=\"{ exact: entry.routerLinkActiveExact }\"\n (click)=\"closeNavPanels()\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n @if (entry.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n } @else if (entry.disabled) {\n <span\n rtElem=\"disabled-slot\"\n role=\"none\"\n [rtTooltip]=\"'uiSectionInProgress' | rtKitLabel: translate() : { label: entry.label }\">\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n [rtMod]=\"{ child: true, disabled: true }\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-disabled]=\"true\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n </button>\n </span>\n } @else {\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n [rtMod]=\"{ child: true }\"\n [attr.data-id]=\"entry.id\"\n (click)=\"onMobileItemClick(entry.id)\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n @if (entry.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n </div>\n }\n </div>\n }\n }\n @case (EntryKind.Link) {\n <a\n rtElem=\"link\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n routerLinkActive=\"rt-page-header-mobile__link--is-active\"\n [attr.data-id]=\"section.id\"\n [routerLink]=\"section.route\"\n [routerLinkActiveOptions]=\"{ exact: section.routerLinkActiveExact }\"\n (click)=\"closeNavPanels()\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n }\n @default {\n @if (section.disabled) {\n <span\n rtElem=\"disabled-slot\"\n role=\"none\"\n [rtTooltip]=\"'uiSectionInProgress' | rtKitLabel: translate() : { label: section.label }\">\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n [rtMod]=\"{ disabled: true }\"\n [attr.data-id]=\"section.id\"\n [attr.aria-disabled]=\"true\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n </button>\n </span>\n } @else {\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n [attr.data-id]=\"section.id\"\n (click)=\"onMobileItemClick(section.id)\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n }\n }\n </div>\n </ng-template>\n\n <ng-content select=\"[rtHeaderBell]\" />\n\n @if (user(); as u) {\n @if (userMenu(); as menuTpl) {\n <!--\n Меню профиля открывается наведением, как и разделы: весь верхний\n ряд ведёт себя одинаково. Нажатие остаётся запасным путём для\n касания, а переход курсора на список языков панель переживает —\n вложенный оверлей за уход наружу не считается.\n -->\n <button\n rtElem=\"user\"\n type=\"button\"\n qa-dataid=\"header-user-menu\"\n #userPopover=\"rtPopover\"\n rtPopoverTrigger=\"hover\"\n rtPopoverAlign=\"end\"\n rtPopoverOffsetY=\"14\"\n [rtMod]=\"{ isOpen: userPopover.isOpen() }\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"userPopover.isOpen()\"\n [rtPopover]=\"menuTpl\"\n (click)=\"userPopover.open()\">\n <span rtElem=\"user-avatar\" aria-hidden=\"true\">{{ userAvatar() }}</span>\n <span rtElem=\"user-name\" qa-dataid=\"header-user-name\">{{ u.name }}</span>\n <span rtElem=\"user-caret\" aria-hidden=\"true\">\n <rt-icon name=\"chevron-up-down\" size=\"xs\" />\n </span>\n </button>\n } @else {\n <button rtElem=\"user\" type=\"button\" (click)=\"onUserClick()\">\n <span rtElem=\"user-avatar\" aria-hidden=\"true\">{{ userAvatar() }}</span>\n <span rtElem=\"user-name\" qa-dataid=\"header-user-name\">{{ u.name }}</span>\n <span rtElem=\"user-caret\" aria-hidden=\"true\">\n <rt-icon name=\"chevron-up-down\" size=\"xs\" />\n </span>\n </button>\n }\n }\n</ng-container>\n",
|
|
759
|
+
template: "<ng-container rtBlock=\"rt-page-header\">\n <nav rtElem=\"nav\" #nav [attr.aria-label]=\"navAriaLabel()\">\n <ul rtElem=\"list\" role=\"list\" #list>\n @for (section of sections(); track section.id) {\n <li\n rtElem=\"item\"\n qa-dataid=\"header-nav-item\"\n [rtMod]=\"{ isOverflow: overflowIds().has(section.id) }\"\n [attr.data-id]=\"section.id\"\n [attr.aria-hidden]=\"overflowIds().has(section.id) || null\"\n [attr.inert]=\"overflowIds().has(section.id) || null\">\n @switch (section.kind) {\n @case (EntryKind.Panel) {\n <button\n rtElem=\"link\"\n type=\"button\"\n qa-dataid=\"header-nav-trigger\"\n #groupPopover=\"rtPopover\"\n rtPopoverTrigger=\"hover\"\n rtPopoverFitViewport\n rtPopoverOffsetY=\"14\"\n [rtMod]=\"{\n isActive: activeSectionIds().has(section.id),\n isOpen: groupPopover.isOpen(),\n }\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"groupPopover.isOpen()\"\n [rtPopover]=\"submenuTpl\"\n (click)=\"groupPopover.open()\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n <span rtElem=\"caret\" aria-hidden=\"true\">\n <rt-icon name=\"chevron-up-down\" size=\"xs\" />\n </span>\n </button>\n <ng-template #submenuTpl>\n <div rtBlock=\"rt-page-header-submenu\" role=\"menu\" [style.--rt-nav-panel-columns]=\"section.columnCount\">\n @for (column of section.columns; track column.id) {\n <div rtElem=\"column\" qa-dataid=\"header-nav-column\" [attr.data-id]=\"column.id\">\n @for (group of column.groups; track group.id) {\n <div rtElem=\"group\" role=\"group\" [attr.aria-label]=\"group.label || null\">\n @if (group.label) {\n <div rtElem=\"group-title\" qa-dataid=\"header-nav-group\" [attr.data-id]=\"group.id\">\n @if (group.icon) {\n <rt-icon rtElem=\"group-icon\" size=\"xs\" [name]=\"group.icon\" />\n }\n <span rtElem=\"group-label\">{{ group.label }}</span>\n </div>\n }\n @for (entry of group.items; track entry.id) {\n @if (entry.kind === EntryKind.Link) {\n <a\n rtElem=\"link\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-subitem\"\n routerLinkActive=\"rt-page-header-submenu__link--is-active\"\n [attr.data-id]=\"entry.id\"\n [routerLink]=\"entry.route\"\n [routerLinkActiveOptions]=\"{ exact: entry.routerLinkActiveExact }\"\n (click)=\"groupPopover.close()\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n @if (entry.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n } @else if (entry.disabled) {\n <span\n rtElem=\"disabled-slot\"\n role=\"none\"\n [rtTooltip]=\"\n 'uiSectionInProgress' | rtKitLabel: translate() : { label: entry.label }\n \">\n <button\n rtElem=\"link\"\n role=\"menuitem\"\n type=\"button\"\n qa-dataid=\"header-nav-subitem\"\n [rtMod]=\"{ disabled: true }\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-disabled]=\"true\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n </button>\n </span>\n } @else {\n <button\n rtElem=\"link\"\n role=\"menuitem\"\n type=\"button\"\n qa-dataid=\"header-nav-subitem\"\n [attr.data-id]=\"entry.id\"\n (click)=\"onItemClick(entry.id)\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n @if (entry.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n </div>\n }\n </div>\n }\n </div>\n </ng-template>\n }\n @case (EntryKind.Link) {\n <a\n rtElem=\"link\"\n routerLinkActive=\"rt-page-header__link--is-active\"\n [routerLink]=\"section.route\"\n [routerLinkActiveOptions]=\"{ exact: section.routerLinkActiveExact }\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n }\n @default {\n @if (section.disabled) {\n <span\n rtElem=\"disabled-slot\"\n role=\"none\"\n [rtTooltip]=\"'uiSectionInProgress' | rtKitLabel: translate() : { label: section.label }\">\n <button rtElem=\"link\" type=\"button\" [rtMod]=\"{ disabled: true }\" [attr.aria-disabled]=\"true\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n </button>\n </span>\n } @else {\n <button rtElem=\"link\" type=\"button\" (click)=\"onItemClick(section.id)\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n }\n </li>\n }\n <li\n rtElem=\"item\"\n #moreItem\n [rtMod]=\"{ isOverflow: !moreShown() }\"\n [attr.aria-hidden]=\"!moreShown() || null\"\n [attr.inert]=\"!moreShown() || null\">\n <rt-page-header-more [sections]=\"moreSections()\" [active]=\"moreActive()\" (itemClick)=\"onItemClick($event)\" />\n </li>\n </ul>\n </nav>\n\n <button\n rtElem=\"burger\"\n type=\"button\"\n qa-dataid=\"header-nav-burger\"\n #mobileNavPopover=\"rtPopover\"\n rtPopoverFitViewport\n rtPopoverOffsetY=\"14\"\n [attr.aria-label]=\"t().uiNavMenu\"\n [rtMod]=\"{ isOpen: mobileNavPopover.isOpen() }\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"mobileNavPopover.isOpen()\"\n [rtPopover]=\"mobileNavTpl\">\n <rt-icon rtElem=\"burger-icon\" name=\"bars\" size=\"md\" />\n </button>\n\n <!--\n Сжатая полоса стоит в разметке всегда, как и узкая: показывает её модификатор хоста.\n Слева стопка кругов — «ещё» поверх остальных, — дальше три слота потребителя.\n -->\n <div rtElem=\"compact\" qa-dataid=\"header-compact\">\n <div rtElem=\"compact-stack\">\n <button\n rtElem=\"compact-circle\"\n type=\"button\"\n qa-dataid=\"header-compact-more\"\n #compactNavPopover=\"rtPopover\"\n rtPopoverFitViewport\n rtPopoverOffsetY=\"10\"\n [rtMod]=\"{ more: true, isOpen: compactNavPopover.isOpen() }\"\n [attr.aria-label]=\"t().uiNavMenu\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"compactNavPopover.isOpen()\"\n [rtPopover]=\"mobileNavTpl\">\n <rt-icon name=\"ellipsis-h\" size=\"sm\" />\n </button>\n @for (section of compactSections(); track section.id; let index = $index) {\n @if (section.kind === EntryKind.Link) {\n <a\n rtElem=\"compact-circle\"\n qa-dataid=\"header-compact-section\"\n routerLinkActive=\"rt-page-header__compact-circle--is-active\"\n [style.--rt-nav-compact-index]=\"index + 1\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"section.label\"\n [routerLink]=\"section.route\"\n [routerLinkActiveOptions]=\"{ exact: section.routerLinkActiveExact }\"\n [rtTooltip]=\"section.label\">\n @if (section.icon; as icon) {\n <rt-icon size=\"sm\" [name]=\"icon\" />\n }\n @if (section.unread) {\n <span rtElem=\"compact-marker\" role=\"img\" [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n } @else {\n <button\n rtElem=\"compact-circle\"\n type=\"button\"\n qa-dataid=\"header-compact-section\"\n [rtMod]=\"{ isActive: activeSectionIds().has(section.id), disabled: section.disabled }\"\n [style.--rt-nav-compact-index]=\"index + 1\"\n [disabled]=\"section.disabled\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"section.label\"\n [rtTooltip]=\"section.label\"\n (click)=\"onCompactSectionClick(section)\">\n @if (section.icon; as icon) {\n <rt-icon size=\"sm\" [name]=\"icon\" />\n }\n @if (section.unread) {\n <span rtElem=\"compact-marker\" role=\"img\" [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n </div>\n <div rtElem=\"compact-slot\" [rtMod]=\"{ left: true }\"><ng-content select=\"[rtCompactLeft]\" /></div>\n <div rtElem=\"compact-slot\" [rtMod]=\"{ center: true }\"><ng-content select=\"[rtCompactCenter]\" /></div>\n <div rtElem=\"compact-slot\" [rtMod]=\"{ right: true }\"><ng-content select=\"[rtCompactRight]\" /></div>\n </div>\n\n <ng-template #mobileNavTpl>\n <div rtBlock=\"rt-page-header-mobile\" role=\"menu\">\n @for (section of sections(); track section.id) {\n @switch (section.kind) {\n @case (EntryKind.Panel) {\n <button\n rtElem=\"section\"\n type=\"button\"\n qa-dataid=\"header-nav-mobile-trigger\"\n [rtMod]=\"{\n isExpanded: expandedSectionIds().has(section.id),\n isActive: activeSectionIds().has(section.id),\n }\"\n [attr.data-id]=\"section.id\"\n [attr.aria-expanded]=\"expandedSectionIds().has(section.id)\"\n (click)=\"toggleSection(section.id)\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n <span rtElem=\"caret\" aria-hidden=\"true\">\n <rt-icon name=\"chevron-up-down\" size=\"xs\" />\n </span>\n </button>\n @if (expandedSectionIds().has(section.id)) {\n <div rtElem=\"children\">\n @for (group of section.panelGroups; track group.id) {\n <div rtElem=\"group\" role=\"group\" [attr.aria-label]=\"group.label || null\">\n @if (group.label) {\n <div rtElem=\"group-title\" qa-dataid=\"header-nav-mobile-group\" [attr.data-id]=\"group.id\">\n @if (group.icon) {\n <rt-icon rtElem=\"group-icon\" size=\"xs\" [name]=\"group.icon\" />\n }\n <span rtElem=\"group-label\">{{ group.label }}</span>\n </div>\n }\n @for (entry of group.items; track entry.id) {\n @if (entry.kind === EntryKind.Link) {\n <a\n rtElem=\"link\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n routerLinkActive=\"rt-page-header-mobile__link--is-active\"\n [rtMod]=\"{ child: true }\"\n [attr.data-id]=\"entry.id\"\n [routerLink]=\"entry.route\"\n [routerLinkActiveOptions]=\"{ exact: entry.routerLinkActiveExact }\"\n (click)=\"closeNavPanels()\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n @if (entry.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n } @else if (entry.disabled) {\n <span\n rtElem=\"disabled-slot\"\n role=\"none\"\n [rtTooltip]=\"'uiSectionInProgress' | rtKitLabel: translate() : { label: entry.label }\">\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n [rtMod]=\"{ child: true, disabled: true }\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-disabled]=\"true\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n </button>\n </span>\n } @else {\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n [rtMod]=\"{ child: true }\"\n [attr.data-id]=\"entry.id\"\n (click)=\"onMobileItemClick(entry.id)\">\n <span rtElem=\"label\">{{ entry.label }}</span>\n @if (entry.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"entry.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n </div>\n }\n </div>\n }\n }\n @case (EntryKind.Link) {\n <a\n rtElem=\"link\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n routerLinkActive=\"rt-page-header-mobile__link--is-active\"\n [attr.data-id]=\"section.id\"\n [routerLink]=\"section.route\"\n [routerLinkActiveOptions]=\"{ exact: section.routerLinkActiveExact }\"\n (click)=\"closeNavPanels()\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </a>\n }\n @default {\n @if (section.disabled) {\n <span\n rtElem=\"disabled-slot\"\n role=\"none\"\n [rtTooltip]=\"'uiSectionInProgress' | rtKitLabel: translate() : { label: section.label }\">\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n [rtMod]=\"{ disabled: true }\"\n [attr.data-id]=\"section.id\"\n [attr.aria-disabled]=\"true\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n </button>\n </span>\n } @else {\n <button\n rtElem=\"link\"\n type=\"button\"\n role=\"menuitem\"\n qa-dataid=\"header-nav-mobile-item\"\n [attr.data-id]=\"section.id\"\n (click)=\"onMobileItemClick(section.id)\">\n @if (section.icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"section.icon\" />\n }\n <span rtElem=\"label\">{{ section.label }}</span>\n @if (section.unread) {\n <span\n rtElem=\"marker\"\n role=\"img\"\n qa-dataid=\"header-nav-marker\"\n [attr.data-id]=\"section.id\"\n [attr.aria-label]=\"t().uiNavUnread\"></span>\n }\n </button>\n }\n }\n }\n }\n </div>\n </ng-template>\n\n <ng-content select=\"[rtHeaderBell]\" />\n\n @if (user(); as u) {\n @if (userMenu(); as menuTpl) {\n <!--\n Меню профиля открывается наведением, как и разделы: весь верхний\n ряд ведёт себя одинаково. Нажатие остаётся запасным путём для\n касания, а переход курсора на список языков панель переживает —\n вложенный оверлей за уход наружу не считается.\n -->\n <button\n rtElem=\"user\"\n type=\"button\"\n qa-dataid=\"header-user-menu\"\n #userPopover=\"rtPopover\"\n rtPopoverTrigger=\"hover\"\n rtPopoverAlign=\"end\"\n rtPopoverOffsetY=\"14\"\n [rtMod]=\"{ isOpen: userPopover.isOpen() }\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"userPopover.isOpen()\"\n [rtPopover]=\"menuTpl\"\n (click)=\"userPopover.open()\">\n <span rtElem=\"user-avatar\" aria-hidden=\"true\">{{ userAvatar() }}</span>\n <span rtElem=\"user-name\" qa-dataid=\"header-user-name\">{{ u.name }}</span>\n <span rtElem=\"user-caret\" aria-hidden=\"true\">\n <rt-icon name=\"chevron-up-down\" size=\"xs\" />\n </span>\n </button>\n } @else {\n <button rtElem=\"user\" type=\"button\" (click)=\"onUserClick()\">\n <span rtElem=\"user-avatar\" aria-hidden=\"true\">{{ userAvatar() }}</span>\n <span rtElem=\"user-name\" qa-dataid=\"header-user-name\">{{ u.name }}</span>\n <span rtElem=\"user-caret\" aria-hidden=\"true\">\n <rt-icon name=\"chevron-up-down\" size=\"xs\" />\n </span>\n </button>\n }\n }\n</ng-container>\n",
|
|
428
760
|
styles: [
|
|
429
|
-
"@charset \"UTF-8\";@layer rt-kit.components{.rt-page-header{--rt-nav-header-radius: var(--rt-radius-md);--rt-nav-header-transition-duration: var(--rt-duration-fast);--rt-nav-item-radius: var(--rt-radius-md);--rt-nav-item-border-width: var(--rt-border-width-thin);--rt-nav-burger-radius: var(--rt-radius-ms);--rt-nav-marker-radius: var(--rt-radius-full);--rt-nav-user-avatar-radius: var(--rt-radius-full);--rt-nav-user-avatar-border-width: var(--rt-border-width-thin);display:flex;width:auto;min-height:48px;box-sizing:border-box;align-items:center;justify-content:space-between;padding:var(--rt-nav-header-padding);border-radius:var(--rt-nav-header-radius);background-color:var(--rt-page-header-bg, var(--rt-nav-header-color-bg));color:var(--rt-nav-item-color);gap:var(--rt-space-2)}.rt-page-header__nav{min-width:0;flex:1 1
|
|
761
|
+
"@charset \"UTF-8\";@layer rt-kit.components{.rt-page-header{--rt-nav-header-radius: var(--rt-radius-md);--rt-nav-header-transition-duration: var(--rt-duration-fast);--rt-nav-item-radius: var(--rt-radius-md);--rt-nav-item-border-width: var(--rt-border-width-thin);--rt-nav-burger-radius: var(--rt-radius-ms);--rt-nav-marker-radius: var(--rt-radius-full);--rt-nav-user-avatar-radius: var(--rt-radius-full);--rt-nav-user-avatar-border-width: var(--rt-border-width-thin);display:flex;width:auto;min-height:48px;box-sizing:border-box;align-items:center;justify-content:space-between;padding:var(--rt-nav-header-padding);border-radius:var(--rt-nav-header-radius);background-color:var(--rt-page-header-bg, var(--rt-nav-header-color-bg));color:var(--rt-nav-item-color);gap:var(--rt-space-2)}.rt-page-header__nav{min-width:0;flex:1 1 0}.rt-page-header__list{position:relative;display:flex;flex-flow:row wrap;align-items:center;padding:0;margin:0;gap:var(--rt-nav-item-gap);list-style:none}.rt-page-header__item{display:inline-flex;flex-shrink:0;align-items:center;border:var(--rt-nav-item-border-width) solid var(--rt-nav-item-color-border);border-radius:var(--rt-nav-item-radius);background-color:var(--rt-nav-item-color-bg)}.rt-page-header__item--is-overflow{position:absolute;top:0;left:0;pointer-events:none;visibility:hidden}.rt-page-header__disabled-slot{display:inline-flex;flex-direction:column;align-items:stretch}.rt-page-header__link{position:relative;display:inline-flex;min-height:var(--rt-nav-item-height);align-items:center;padding:var(--rt-nav-item-padding);border:0;border-radius:var(--rt-nav-item-radius);background-color:transparent;color:var(--rt-nav-item-color);cursor:pointer;font-size:var(--rt-nav-item-font-size);font-weight:var(--rt-nav-item-font-weight);gap:var(--rt-nav-item-content-gap);line-height:var(--rt-nav-item-line-height);text-decoration:none;transition:color var(--rt-nav-header-transition-duration) linear;white-space:nowrap}.rt-page-header__link:hover{color:var(--rt-nav-item-color-hover)}.rt-page-header__link:focus{outline:none}.rt-page-header__link:focus-visible{outline:2px dashed var(--rt-nav-color-focus);outline-offset:2px}.rt-page-header__link--is-active{background-color:var(--rt-nav-item-color-bg-active);color:var(--rt-nav-item-color)}.rt-page-header__link--is-open{color:var(--rt-nav-item-color-hover)}.rt-page-header__link--disabled,.rt-page-header__link:disabled,.rt-page-header__link[aria-disabled=true]{background-color:transparent;color:var(--rt-nav-color-disabled);cursor:not-allowed}.rt-page-header__link--disabled:hover,.rt-page-header__link:disabled:hover,.rt-page-header__link[aria-disabled=true]:hover{background-color:transparent}.rt-page-header__icon{flex-shrink:0}.rt-page-header__marker{width:var(--rt-nav-marker-size);height:var(--rt-nav-marker-size);flex-shrink:0;border-radius:var(--rt-nav-marker-radius);background-color:var(--rt-nav-marker-color)}.rt-page-header__caret{display:inline-flex;flex-shrink:0;color:var(--rt-nav-item-color-caret)}.rt-page-header__burger{display:none;flex-shrink:0;align-items:center;justify-content:center;padding:var(--rt-space-2);border:0;border-radius:var(--rt-nav-burger-radius);background-color:transparent;color:var(--rt-nav-item-color);cursor:pointer;transition:color var(--rt-nav-header-transition-duration) linear}.rt-page-header__burger:hover{color:var(--rt-nav-item-color-hover)}.rt-page-header__burger:active{color:var(--rt-nav-item-color-pressed)}.rt-page-header__burger:focus{outline:none}.rt-page-header__burger:focus-visible{outline:2px dashed var(--rt-nav-color-focus);outline-offset:2px}.rt-page-header__burger--is-open{background-color:var(--rt-nav-item-color-bg-active)}.rt-page-header__burger-icon{flex-shrink:0}@container rt-place (width <= 1380px){.rt-page-header__link .rt-page-header__icon{display:none}}@container rt-place (width <= 1080px){.rt-page-header__nav{display:none}.rt-page-header__burger{display:inline-flex}}.rt-page-header__user{display:inline-flex;min-height:var(--rt-nav-item-height);align-items:center;padding:var(--rt-nav-item-padding);border:0;border-radius:var(--rt-nav-item-radius);background-color:transparent;color:var(--rt-nav-item-color);cursor:pointer;font-size:var(--rt-nav-item-font-size);font-weight:var(--rt-nav-item-font-weight);gap:var(--rt-nav-item-content-gap);line-height:var(--rt-leading-tight);transition:background-color var(--rt-nav-header-transition-duration) linear}.rt-page-header__user:hover,.rt-page-header__user:active{background-color:var(--rt-nav-item-color-bg-active)}.rt-page-header__user:focus{outline:none}.rt-page-header__user:focus-visible{outline:2px dashed var(--rt-nav-color-focus);outline-offset:2px}.rt-page-header__user-avatar{display:inline-flex;width:16px;height:16px;align-items:center;justify-content:center;border:var(--rt-nav-user-avatar-border-width) solid var(--rt-nav-item-color-caret);border-radius:var(--rt-nav-user-avatar-radius);color:var(--rt-color-text-muted);font-size:var(--rt-text-2xs);font-weight:var(--rt-font-weight-semibold);line-height:var(--rt-leading-none)}.rt-page-header__user-name{white-space:nowrap}.rt-page-header__user-caret{display:inline-flex;flex-shrink:0;color:var(--rt-nav-item-color-caret)}.rt-page-header__user--is-open{background-color:var(--rt-nav-item-color-bg-active)}}\n",
|
|
430
762
|
"@charset \"UTF-8\";@layer rt-kit.components{.rt-page-header-submenu{--rt-nav-panel-columns-width: calc(var(--rt-nav-panel-columns) * var(--rt-nav-panel-column-width));--rt-nav-panel-gaps-width: calc((var(--rt-nav-panel-columns) - 1) * var(--rt-nav-panel-column-gap));--rt-nav-panel-padding-width: calc(var(--rt-nav-panel-padding) + var(--rt-nav-panel-padding));--rt-nav-panel-radius: var(--rt-radius-md);--rt-nav-panel-border-width: var(--rt-border-width-thin);--rt-nav-panel-item-radius: var(--rt-radius-md);--rt-nav-panel-item-transition-duration: var(--rt-duration-fast);--rt-nav-marker-radius: var(--rt-radius-full);display:flex;width:calc(var(--rt-nav-panel-columns-width) + var(--rt-nav-panel-gaps-width) + var(--rt-nav-panel-padding-width));box-sizing:border-box;align-items:flex-start;padding:var(--rt-nav-panel-padding-y) var(--rt-nav-panel-padding);border:var(--rt-nav-panel-border-width) solid var(--rt-nav-panel-color-border);border-radius:var(--rt-nav-panel-radius);background-color:var(--rt-nav-panel-color-bg);box-shadow:var(--rt-nav-panel-shadow);color:var(--rt-nav-panel-item-color);font-size:var(--rt-nav-panel-item-font-size);font-weight:var(--rt-nav-panel-item-font-weight);gap:var(--rt-nav-panel-column-gap)}.rt-page-header-submenu__column{display:flex;min-width:0;flex:0 0 var(--rt-nav-panel-column-width);flex-direction:column;gap:var(--rt-nav-panel-group-gap)}.rt-page-header-submenu__group{display:flex;flex-direction:column;align-items:flex-start;gap:var(--rt-nav-panel-item-gap)}.rt-page-header-submenu__group-title{display:inline-flex;max-width:100%;min-height:var(--rt-nav-panel-item-height);align-items:center;padding:var(--rt-nav-panel-item-padding);color:var(--rt-nav-panel-group-color);cursor:default;font-size:var(--rt-nav-panel-group-font-size);font-weight:var(--rt-nav-panel-group-font-weight);gap:var(--rt-nav-panel-group-content-gap);line-height:var(--rt-leading-none)}.rt-page-header-submenu__group-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rt-page-header-submenu__group-icon{flex-shrink:0}.rt-page-header-submenu__disabled-slot{display:inline-flex;max-width:100%;flex-direction:column;align-items:flex-start}.rt-page-header-submenu__link{display:inline-flex;max-width:100%;min-height:var(--rt-nav-panel-item-height);align-items:center;padding:var(--rt-nav-panel-item-padding);border:0;border-radius:var(--rt-nav-panel-item-radius);background-color:transparent;color:var(--rt-nav-panel-item-color);cursor:pointer;font-size:var(--rt-nav-panel-item-font-size);font-weight:var(--rt-nav-panel-item-font-weight);gap:var(--rt-nav-panel-item-content-gap);line-height:var(--rt-leading-none);text-align:left;text-decoration:none;transition:background-color var(--rt-nav-panel-item-transition-duration) linear,color var(--rt-nav-panel-item-transition-duration) linear;white-space:nowrap}.rt-page-header-submenu__link--is-active{background-color:var(--rt-nav-panel-item-color-bg-active);color:var(--rt-nav-panel-item-color-active)}.rt-page-header-submenu__link:not(.rt-page-header-submenu__link--is-active):hover,.rt-page-header-submenu__link:not(.rt-page-header-submenu__link--is-active):active{background-color:var(--rt-nav-panel-item-color-bg-hover)}.rt-page-header-submenu__link:focus{outline:none}.rt-page-header-submenu__link:focus-visible{outline:2px dashed var(--rt-nav-color-focus);outline-offset:2px}.rt-page-header-submenu__link--disabled,.rt-page-header-submenu__link:disabled,.rt-page-header-submenu__link[aria-disabled=true]{background-color:transparent;color:var(--rt-nav-color-disabled);cursor:not-allowed}.rt-page-header-submenu__link--disabled:hover,.rt-page-header-submenu__link:disabled:hover,.rt-page-header-submenu__link[aria-disabled=true]:hover{background-color:transparent}.rt-page-header-submenu__label{overflow:hidden;text-overflow:ellipsis}.rt-page-header-submenu__marker{width:var(--rt-nav-marker-size);height:var(--rt-nav-marker-size);flex-shrink:0;border-radius:var(--rt-nav-marker-radius);background-color:var(--rt-nav-marker-color)}.rt-page-header-submenu__icon{flex-shrink:0}}\n",
|
|
431
|
-
"@charset \"UTF-8\";@layer rt-kit.components{.rt-page-header-mobile{--rt-nav-panel-radius: var(--rt-radius-md);--rt-nav-panel-border-width: var(--rt-border-width-thin);--rt-nav-panel-item-radius: var(--rt-radius-md);--rt-nav-panel-item-transition-duration: var(--rt-duration-fast);--rt-nav-marker-radius: var(--rt-radius-full);display:flex;min-width:240px;max-width:320px;min-height:0;max-height:100%;box-sizing:border-box;flex-direction:column;padding:var(--rt-space-2);border:var(--rt-nav-panel-border-width) solid var(--rt-nav-panel-color-border);border-radius:var(--rt-nav-panel-radius);background-color:var(--rt-nav-panel-color-bg);box-shadow:var(--rt-nav-panel-shadow);gap:var(--rt-space-2xs);overflow-y:auto}.rt-page-header-mobile__link,.rt-page-header-mobile__section{position:relative;display:flex;width:100%;align-items:center;padding:var(--rt-nav-item-padding);border:0;border-radius:var(--rt-nav-panel-item-radius);background-color:transparent;color:var(--rt-nav-item-color);cursor:pointer;font-size:var(--rt-nav-item-font-size);font-weight:var(--rt-nav-item-font-weight);gap:var(--rt-nav-item-content-gap);line-height:var(--rt-leading-tight);text-align:left;text-decoration:none;transition:background-color var(--rt-nav-panel-item-transition-duration) linear,color var(--rt-nav-panel-item-transition-duration) linear;white-space:nowrap}.rt-page-header-mobile__link:hover,.rt-page-header-mobile__section:hover{background-color:var(--rt-nav-panel-item-color-bg-hover)}.rt-page-header-mobile__link:focus,.rt-page-header-mobile__section:focus{outline:none}.rt-page-header-mobile__link:focus-visible,.rt-page-header-mobile__section:focus-visible{outline:2px dashed var(--rt-nav-color-focus);outline-offset:2px}.rt-page-header-mobile__link--child{color:var(--rt-nav-panel-item-color);font-weight:var(--rt-nav-panel-item-font-weight)}.rt-page-header-mobile__link--is-active{background-color:var(--rt-nav-panel-item-color-bg-active);color:var(--rt-nav-panel-item-color-active)}.rt-page-header-mobile__link--disabled,.rt-page-header-mobile__link:disabled,.rt-page-header-mobile__link[aria-disabled=true]{background-color:transparent;color:var(--rt-nav-color-disabled);cursor:not-allowed}.rt-page-header-mobile__link--disabled:hover,.rt-page-header-mobile__link:disabled:hover,.rt-page-header-mobile__link[aria-disabled=true]:hover{background-color:transparent}.rt-page-header-mobile__disabled-slot{display:flex;flex-direction:column;align-items:stretch}.rt-page-header-mobile__section--is-active{background-color:var(--rt-color-bg-surface-subtle)}.rt-page-header-mobile__caret{display:inline-flex;flex-shrink:0;margin-left:auto;color:var(--rt-nav-item-color-caret);transition:transform var(--rt-nav-panel-item-transition-duration) linear}.rt-page-header-mobile__section--is-expanded .rt-page-header-mobile__caret{transform:rotate(180deg)}.rt-page-header-mobile__marker{width:var(--rt-nav-marker-size);height:var(--rt-nav-marker-size);flex-shrink:0;border-radius:var(--rt-nav-marker-radius);background-color:var(--rt-nav-marker-color)}.rt-page-header-mobile__children{display:flex;flex-direction:column;padding-left:var(--rt-space-4);gap:var(--rt-nav-panel-group-gap)}.rt-page-header-mobile__group{display:flex;flex-direction:column;gap:var(--rt-space-2xs)}.rt-page-header-mobile__group-title{display:flex;min-height:var(--rt-nav-panel-item-height);align-items:center;padding:var(--rt-nav-panel-item-padding);color:var(--rt-nav-panel-group-color);cursor:default;font-size:var(--rt-nav-panel-group-font-size);font-weight:var(--rt-nav-panel-group-font-weight);gap:var(--rt-nav-panel-group-content-gap);line-height:var(--rt-leading-none)}.rt-page-header-mobile__group-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rt-page-header-mobile__group-icon,.rt-page-header-mobile__icon{flex-shrink:0}}\n",
|
|
763
|
+
"@charset \"UTF-8\";@layer rt-kit.components{.rt-page-header-mobile{--rt-nav-panel-radius: var(--rt-radius-md);--rt-nav-panel-border-width: var(--rt-border-width-thin);--rt-nav-panel-item-radius: var(--rt-radius-md);--rt-nav-panel-item-transition-duration: var(--rt-duration-fast);--rt-nav-marker-radius: var(--rt-radius-full);display:flex;min-width:240px;max-width:320px;min-height:0;max-height:100%;box-sizing:border-box;flex-direction:column;padding:var(--rt-space-2);border:var(--rt-nav-panel-border-width) solid var(--rt-nav-panel-color-border);border-radius:var(--rt-nav-panel-radius);background-color:var(--rt-nav-panel-color-bg);box-shadow:var(--rt-nav-panel-shadow);gap:var(--rt-space-2xs);overflow-y:auto}.rt-page-header-mobile__link,.rt-page-header-mobile__section{position:relative;display:flex;width:100%;align-items:center;padding:var(--rt-nav-item-padding);border:0;border-radius:var(--rt-nav-panel-item-radius);background-color:transparent;color:var(--rt-nav-item-color);cursor:pointer;font-size:var(--rt-nav-item-font-size);font-weight:var(--rt-nav-item-font-weight);gap:var(--rt-nav-item-content-gap);line-height:var(--rt-leading-tight);text-align:left;text-decoration:none;transition:background-color var(--rt-nav-panel-item-transition-duration) linear,color var(--rt-nav-panel-item-transition-duration) linear;white-space:nowrap}.rt-page-header-mobile__link:hover,.rt-page-header-mobile__section:hover{background-color:var(--rt-nav-panel-item-color-bg-hover)}.rt-page-header-mobile__link:focus,.rt-page-header-mobile__section:focus{outline:none}.rt-page-header-mobile__link:focus-visible,.rt-page-header-mobile__section:focus-visible{outline:2px dashed var(--rt-nav-color-focus);outline-offset:2px}.rt-page-header-mobile__link--child{color:var(--rt-nav-panel-item-color);font-weight:var(--rt-nav-panel-item-font-weight)}.rt-page-header-mobile__link--is-active{background-color:var(--rt-nav-panel-item-color-bg-active);color:var(--rt-nav-panel-item-color-active)}.rt-page-header-mobile__link--disabled,.rt-page-header-mobile__link:disabled,.rt-page-header-mobile__link[aria-disabled=true]{background-color:transparent;color:var(--rt-nav-color-disabled);cursor:not-allowed}.rt-page-header-mobile__link--disabled:hover,.rt-page-header-mobile__link:disabled:hover,.rt-page-header-mobile__link[aria-disabled=true]:hover{background-color:transparent}.rt-page-header-mobile__disabled-slot{display:flex;flex-direction:column;align-items:stretch}.rt-page-header-mobile__section--is-active{background-color:var(--rt-color-bg-surface-subtle)}.rt-page-header-mobile__caret{display:inline-flex;flex-shrink:0;margin-left:auto;color:var(--rt-nav-item-color-caret);transition:transform var(--rt-nav-panel-item-transition-duration) linear}.rt-page-header-mobile__section--is-expanded .rt-page-header-mobile__caret{transform:rotate(180deg)}.rt-page-header-mobile__marker{width:var(--rt-nav-marker-size);height:var(--rt-nav-marker-size);flex-shrink:0;border-radius:var(--rt-nav-marker-radius);background-color:var(--rt-nav-marker-color)}.rt-page-header-mobile__children{display:flex;flex-direction:column;padding-left:var(--rt-space-4);gap:var(--rt-nav-panel-group-gap)}.rt-page-header-mobile__group{display:flex;flex-direction:column;gap:var(--rt-space-2xs)}.rt-page-header-mobile__group-title{display:flex;min-height:var(--rt-nav-panel-item-height);align-items:center;padding:var(--rt-nav-panel-item-padding);color:var(--rt-nav-panel-group-color);cursor:default;font-size:var(--rt-nav-panel-group-font-size);font-weight:var(--rt-nav-panel-group-font-weight);gap:var(--rt-nav-panel-group-content-gap);line-height:var(--rt-leading-none)}.rt-page-header-mobile__group-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rt-page-header-mobile__group-icon,.rt-page-header-mobile__icon{flex-shrink:0}.rt-page-header-mobile__heading{display:flex;min-height:var(--rt-nav-panel-item-height);align-items:center;padding:var(--rt-nav-panel-item-padding);color:var(--rt-nav-item-color);cursor:default;font-size:var(--rt-nav-item-font-size);font-weight:var(--rt-nav-item-font-weight);line-height:var(--rt-leading-tight);white-space:nowrap}.rt-page-header-mobile--more .rt-page-header-mobile__children{padding-left:0}.rt-page-header-mobile--more .rt-page-header-mobile__group-title{letter-spacing:var(--rt-letter-spacing-wide);text-transform:uppercase}}\n",
|
|
432
764
|
"@charset \"UTF-8\";@layer rt-kit.components{.rt-page-header{--rt-nav-compact-height: 46px;--rt-nav-compact-circle-size: var(--rt-size-6);--rt-nav-compact-circle-overlap: calc(var(--rt-nav-compact-circle-size) / 2);--rt-nav-compact-circle-ring-width: var(--rt-border-width-thick);--rt-nav-compact-circle-radius: var(--rt-radius-full);--rt-nav-compact-circle-color-bg: var(--rt-neutral-100);--rt-nav-compact-circle-color-bg-active: var(--rt-nav-item-color-bg-active);--rt-nav-compact-color-bg: var(--rt-color-bg-surface);--rt-nav-compact-stack-depth: 16}.rt-page-header--sticky{position:sticky;z-index:var(--rt-z-sticky);top:-1px}.rt-page-header__compact{display:none;min-width:0;min-height:var(--rt-nav-compact-height);flex:1 1 auto;align-items:center;gap:var(--rt-space-4)}.rt-page-header--is-compact{min-height:var(--rt-nav-compact-height);padding:0 var(--rt-space-5);border-radius:0;background-color:var(--rt-nav-compact-color-bg)}.rt-page-header--is-compact>:not(.rt-page-header__compact){display:none}.rt-page-header--is-compact .rt-page-header__compact{display:flex}.rt-page-header__compact-stack{display:flex;flex-shrink:0;align-items:center;isolation:isolate}.rt-page-header__compact-circle{--rt-nav-compact-index: 0;position:relative;z-index:calc(var(--rt-nav-compact-stack-depth) - var(--rt-nav-compact-index));display:inline-flex;width:var(--rt-nav-compact-circle-size);height:var(--rt-nav-compact-circle-size);box-sizing:border-box;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;border-radius:var(--rt-nav-compact-circle-radius);background-color:var(--rt-nav-compact-circle-color-bg);box-shadow:0 0 0 var(--rt-nav-compact-circle-ring-width) var(--rt-nav-compact-color-bg);color:var(--rt-nav-item-color);cursor:pointer;text-decoration:none;transition:color var(--rt-nav-header-transition-duration) linear}.rt-page-header__compact-circle+.rt-page-header__compact-circle{margin-left:calc(-1 * var(--rt-nav-compact-circle-overlap))}.rt-page-header__compact-circle:hover{color:var(--rt-nav-item-color-hover)}.rt-page-header__compact-circle:active{color:var(--rt-nav-item-color-pressed)}.rt-page-header__compact-circle:focus{outline:none}.rt-page-header__compact-circle:focus-visible{z-index:calc(var(--rt-nav-compact-stack-depth) + 1);outline:2px dashed var(--rt-nav-color-focus);outline-offset:2px}.rt-page-header__compact-circle--is-active,.rt-page-header__compact-circle--is-open{background-color:var(--rt-nav-compact-circle-color-bg-active);color:var(--rt-nav-item-color-hover)}.rt-page-header__compact-circle--disabled,.rt-page-header__compact-circle:disabled{color:var(--rt-nav-color-disabled);cursor:not-allowed}.rt-page-header__compact-marker{position:absolute;top:0;right:0;width:var(--rt-nav-marker-size);height:var(--rt-nav-marker-size);border-radius:var(--rt-nav-marker-radius);background-color:var(--rt-nav-marker-color)}.rt-page-header__compact-slot{display:flex;min-width:0;align-items:center}.rt-page-header__compact-slot--left{flex:0 1 auto}.rt-page-header__compact-slot--center{flex:1 1 auto;justify-content:center}.rt-page-header__compact-slot--right{flex:0 0 auto;margin-left:auto}}\n"
|
|
433
765
|
]
|
|
434
766
|
}]
|
|
435
767
|
}],
|
|
436
768
|
ctorParameters: () => [],
|
|
437
769
|
propDecorators: {
|
|
770
|
+
navRef: [{
|
|
771
|
+
type: i0.ViewChild,
|
|
772
|
+
args: ["nav", { isSignal: true }]
|
|
773
|
+
}],
|
|
774
|
+
listRef: [{
|
|
775
|
+
type: i0.ViewChild,
|
|
776
|
+
args: ["list", { isSignal: true }]
|
|
777
|
+
}],
|
|
778
|
+
moreItemRef: [{
|
|
779
|
+
type: i0.ViewChild,
|
|
780
|
+
args: ["moreItem", { isSignal: true }]
|
|
781
|
+
}],
|
|
438
782
|
mobileNavPopoverRef: [{
|
|
439
783
|
type: i0.ViewChild,
|
|
440
784
|
args: ["mobileNavPopover", {
|