@ferrlabs/ui-ng 1.68.4 → 1.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -2
- package/fesm2022/ferrlabs-ui-ng.mjs +201 -95
- package/fesm2022/ferrlabs-ui-ng.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ferrlabs-ui-ng.d.ts +16 -18
- package/types/ferrlabs-ui-ng.d.ts.map +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DOCUMENT, Location, NgTemplateOutlet, isPlatformBrowser } from "@angular/common";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
import { ChangeDetectionStrategy, Component, DestroyRef, Directive, ElementRef, Injectable, InjectionToken, Injector, LOCALE_ID, PLATFORM_ID, ViewContainerRef, ViewEncapsulation, afterNextRender, afterRenderEffect, booleanAttribute, computed, contentChildren, effect, forwardRef, inject, input, linkedSignal, makeEnvironmentProviders, model, numberAttribute, output, signal, untracked, viewChild, viewChildren } from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, Directive, ElementRef, Injectable, InjectionToken, Injector, LOCALE_ID, PLATFORM_ID, ViewContainerRef, ViewEncapsulation, afterNextRender, afterRenderEffect, booleanAttribute, computed, contentChildren, effect, forwardRef, inject, input, linkedSignal, makeEnvironmentProviders, model, numberAttribute, output, provideEnvironmentInitializer, signal, untracked, viewChild, viewChildren } from "@angular/core";
|
|
4
4
|
import * as i1 from "@angular/forms";
|
|
5
5
|
import { FormsModule, NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
6
6
|
import * as i1$2 from "@angular/cdk/overlay";
|
|
@@ -10,7 +10,7 @@ import { A11yModule, FocusKeyManager, LiveAnnouncer } from "@angular/cdk/a11y";
|
|
|
10
10
|
import { TemplatePortal } from "@angular/cdk/portal";
|
|
11
11
|
import { BreakpointObserver } from "@angular/cdk/layout";
|
|
12
12
|
import { toSignal } from "@angular/core/rxjs-interop";
|
|
13
|
-
import {
|
|
13
|
+
import { Meta, Title } from "@angular/platform-browser";
|
|
14
14
|
const SIZE$6 = {
|
|
15
15
|
sm: {
|
|
16
16
|
minHeight: "calc(var(--control-height, 40px) - 8px)",
|
|
@@ -9564,6 +9564,7 @@ function attributesAreSafe(raw) {
|
|
|
9564
9564
|
return rest.replaceAll("/", " ").trim() === "";
|
|
9565
9565
|
}
|
|
9566
9566
|
function isTrustedIconMarkup(markup) {
|
|
9567
|
+
if (!markup) return false;
|
|
9567
9568
|
if (NON_HTML_WHITESPACE.test(markup)) return false;
|
|
9568
9569
|
const value = markup.trim();
|
|
9569
9570
|
if (!value.startsWith("<svg") || !value.endsWith("</svg>")) return false;
|
|
@@ -9580,6 +9581,71 @@ function isTrustedIconMarkup(markup) {
|
|
|
9580
9581
|
}
|
|
9581
9582
|
return !value.slice(cursor).includes("<");
|
|
9582
9583
|
}
|
|
9584
|
+
function parseTrustedIcon(markup, parse) {
|
|
9585
|
+
return isTrustedIconMarkup(markup) ? parse(markup) : null;
|
|
9586
|
+
}
|
|
9587
|
+
var IconMarkupDirective = class IconMarkupDirective {
|
|
9588
|
+
constructor() {
|
|
9589
|
+
this.flrIconMarkup = input(...ngDevMode ? [void 0, { debugName: "flrIconMarkup" }] : /* istanbul ignore next */ []);
|
|
9590
|
+
this.host = inject(ElementRef);
|
|
9591
|
+
this.document = inject(DOCUMENT);
|
|
9592
|
+
effect(() => {
|
|
9593
|
+
const icon = parseTrustedIcon(this.flrIconMarkup(), (markup) => this.parse(markup));
|
|
9594
|
+
this.host.nativeElement.replaceChildren(...icon ? [icon] : []);
|
|
9595
|
+
});
|
|
9596
|
+
}
|
|
9597
|
+
parse(markup) {
|
|
9598
|
+
const template = this.document.createElement("template");
|
|
9599
|
+
template.innerHTML = markup;
|
|
9600
|
+
return template.content.firstElementChild;
|
|
9601
|
+
}
|
|
9602
|
+
static {
|
|
9603
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
9604
|
+
minVersion: "12.0.0",
|
|
9605
|
+
version: "22.3.0",
|
|
9606
|
+
ngImport: i0,
|
|
9607
|
+
type: IconMarkupDirective,
|
|
9608
|
+
deps: [],
|
|
9609
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
9610
|
+
});
|
|
9611
|
+
}
|
|
9612
|
+
static {
|
|
9613
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
9614
|
+
minVersion: "17.1.0",
|
|
9615
|
+
version: "22.3.0",
|
|
9616
|
+
type: IconMarkupDirective,
|
|
9617
|
+
isStandalone: true,
|
|
9618
|
+
selector: "[flrIconMarkup]",
|
|
9619
|
+
inputs: { flrIconMarkup: {
|
|
9620
|
+
classPropertyName: "flrIconMarkup",
|
|
9621
|
+
publicName: "flrIconMarkup",
|
|
9622
|
+
isSignal: true,
|
|
9623
|
+
isRequired: false,
|
|
9624
|
+
transformFunction: null
|
|
9625
|
+
} },
|
|
9626
|
+
ngImport: i0
|
|
9627
|
+
});
|
|
9628
|
+
}
|
|
9629
|
+
};
|
|
9630
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
9631
|
+
minVersion: "12.0.0",
|
|
9632
|
+
version: "22.3.0",
|
|
9633
|
+
ngImport: i0,
|
|
9634
|
+
type: IconMarkupDirective,
|
|
9635
|
+
decorators: [{
|
|
9636
|
+
type: Directive,
|
|
9637
|
+
args: [{ selector: "[flrIconMarkup]" }]
|
|
9638
|
+
}],
|
|
9639
|
+
ctorParameters: () => [],
|
|
9640
|
+
propDecorators: { flrIconMarkup: [{
|
|
9641
|
+
type: i0.Input,
|
|
9642
|
+
args: [{
|
|
9643
|
+
isSignal: true,
|
|
9644
|
+
alias: "flrIconMarkup",
|
|
9645
|
+
required: false
|
|
9646
|
+
}]
|
|
9647
|
+
}] }
|
|
9648
|
+
});
|
|
9583
9649
|
var RailToggleComponent = class RailToggleComponent {
|
|
9584
9650
|
constructor() {
|
|
9585
9651
|
this.collapsed = model(false, ...ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []);
|
|
@@ -9758,8 +9824,8 @@ var ShellComponent = class ShellComponent {
|
|
|
9758
9824
|
this.crumbs = computed(() => resolveCrumbs(this.breadcrumb()), ...ngDevMode ? [{ debugName: "crumbs" }] : /* istanbul ignore next */ []);
|
|
9759
9825
|
this.navigate = output();
|
|
9760
9826
|
this.search = output();
|
|
9761
|
-
this.sanitizer = inject(DomSanitizer);
|
|
9762
9827
|
this.activeItemId = computed(() => activeNavItemId(this.sections(), this.currentPath()), ...ngDevMode ? [{ debugName: "activeItemId" }] : /* istanbul ignore next */ []);
|
|
9828
|
+
this.isIcon = isTrustedIconMarkup;
|
|
9763
9829
|
effect(() => {
|
|
9764
9830
|
this.currentPath();
|
|
9765
9831
|
this.narrow();
|
|
@@ -9793,9 +9859,6 @@ var ShellComponent = class ShellComponent {
|
|
|
9793
9859
|
event.preventDefault();
|
|
9794
9860
|
this.navigate.emit(href);
|
|
9795
9861
|
}
|
|
9796
|
-
trustedIcon(markup) {
|
|
9797
|
-
return isTrustedIconMarkup(markup) ? this.sanitizer.bypassSecurityTrustHtml(markup) : null;
|
|
9798
|
-
}
|
|
9799
9862
|
onKeydown(event) {
|
|
9800
9863
|
if (!this.searchEnabled()) return;
|
|
9801
9864
|
if ((event.key === "k" || event.key === "K") && (event.metaKey || event.ctrlKey) && !event.altKey && !event.shiftKey) {
|
|
@@ -9956,9 +10019,8 @@ var ShellComponent = class ShellComponent {
|
|
|
9956
10019
|
>
|
|
9957
10020
|
@if (item.icon) {
|
|
9958
10021
|
<span item-icon>
|
|
9959
|
-
@
|
|
9960
|
-
|
|
9961
|
-
<span [innerHTML]="icon"></span>
|
|
10022
|
+
@if (isIcon(item.icon)) {
|
|
10023
|
+
<span [flrIconMarkup]="item.icon"></span>
|
|
9962
10024
|
} @else {
|
|
9963
10025
|
{{ item.icon }}
|
|
9964
10026
|
}
|
|
@@ -10100,6 +10162,12 @@ var ShellComponent = class ShellComponent {
|
|
|
10100
10162
|
"expandLabel"
|
|
10101
10163
|
],
|
|
10102
10164
|
outputs: ["collapsedChange"]
|
|
10165
|
+
},
|
|
10166
|
+
{
|
|
10167
|
+
kind: "directive",
|
|
10168
|
+
type: IconMarkupDirective,
|
|
10169
|
+
selector: "[flrIconMarkup]",
|
|
10170
|
+
inputs: ["flrIconMarkup"]
|
|
10103
10171
|
}
|
|
10104
10172
|
],
|
|
10105
10173
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
@@ -10120,7 +10188,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
10120
10188
|
SidebarComponent,
|
|
10121
10189
|
SidebarSectionComponent,
|
|
10122
10190
|
SidebarItemComponent,
|
|
10123
|
-
RailToggleComponent
|
|
10191
|
+
RailToggleComponent,
|
|
10192
|
+
IconMarkupDirective
|
|
10124
10193
|
],
|
|
10125
10194
|
providers: [{
|
|
10126
10195
|
provide: SHELL_CONTEXT,
|
|
@@ -10160,9 +10229,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
10160
10229
|
>
|
|
10161
10230
|
@if (item.icon) {
|
|
10162
10231
|
<span item-icon>
|
|
10163
|
-
@
|
|
10164
|
-
|
|
10165
|
-
<span [innerHTML]="icon"></span>
|
|
10232
|
+
@if (isIcon(item.icon)) {
|
|
10233
|
+
<span [flrIconMarkup]="item.icon"></span>
|
|
10166
10234
|
} @else {
|
|
10167
10235
|
{{ item.icon }}
|
|
10168
10236
|
}
|
|
@@ -12353,7 +12421,6 @@ function keyTargetIndex(key, index, count) {
|
|
|
12353
12421
|
}
|
|
12354
12422
|
var SegmentedComponent = class SegmentedComponent {
|
|
12355
12423
|
constructor() {
|
|
12356
|
-
this.sanitizer = inject(DomSanitizer);
|
|
12357
12424
|
this.options = input.required(...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
12358
12425
|
this.value = model.required(...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
12359
12426
|
this.iconOnly = input(false, ...ngDevMode ? [{ debugName: "iconOnly" }] : /* istanbul ignore next */ []);
|
|
@@ -12374,6 +12441,7 @@ var SegmentedComponent = class SegmentedComponent {
|
|
|
12374
12441
|
this.thumb = viewChild.required("thumb", ...ngDevMode ? [{ debugName: "thumb" }] : /* istanbul ignore next */ []);
|
|
12375
12442
|
this.buttons = viewChildren("optionButton", ...ngDevMode ? [{ debugName: "buttons" }] : /* istanbul ignore next */ []);
|
|
12376
12443
|
this.selectedIndex = computed(() => this.options().findIndex((o) => o.value === this.value()), ...ngDevMode ? [{ debugName: "selectedIndex" }] : /* istanbul ignore next */ []);
|
|
12444
|
+
this.isIcon = isTrustedIconMarkup;
|
|
12377
12445
|
afterRenderEffect(() => this.placeThumb(this.selectedIndex()));
|
|
12378
12446
|
const destroyRef = inject(DestroyRef);
|
|
12379
12447
|
afterNextRender(() => {
|
|
@@ -12382,9 +12450,6 @@ var SegmentedComponent = class SegmentedComponent {
|
|
|
12382
12450
|
destroyRef.onDestroy(() => observer.disconnect());
|
|
12383
12451
|
});
|
|
12384
12452
|
}
|
|
12385
|
-
trustedIcon(markup) {
|
|
12386
|
-
return markup && isTrustedIconMarkup(markup) ? this.sanitizer.bypassSecurityTrustHtml(markup) : null;
|
|
12387
|
-
}
|
|
12388
12453
|
select(option) {
|
|
12389
12454
|
this.value.set(option.value);
|
|
12390
12455
|
}
|
|
@@ -12504,8 +12569,14 @@ var SegmentedComponent = class SegmentedComponent {
|
|
|
12504
12569
|
}
|
|
12505
12570
|
],
|
|
12506
12571
|
ngImport: i0,
|
|
12507
|
-
template: "<div\n #group\n class=\"flr-seg\"\n [attr.role]=\"inMenu() ? 'group' : 'radiogroup'\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n>\n <span #thumb class=\"flr-seg__thumb\" aria-hidden=\"true\" hidden></span>\n @for (option of options(); track option.value; let i = $index) {\n @let selected = option.value === value();\n <button\n #optionButton\n type=\"button\"\n [attr.role]=\"inMenu() ? 'menuitemradio' : 'radio'\"\n class=\"flr-seg__option\"\n [class.flr-seg__option--selected]=\"selected\"\n [class.flr-seg__option--icon-only]=\"iconOnly() && option.icon\"\n [attr.aria-checked]=\"selected\"\n [attr.aria-label]=\"iconOnly() && option.icon ? option.label : null\"\n [attr.title]=\"iconOnly() && option.icon ? option.label : null\"\n [tabindex]=\"selected ? 0 : -1\"\n (click)=\"select(option)\"\n (keydown)=\"handleKeydown($event, i)\"\n >\n @
|
|
12572
|
+
template: "<div\n #group\n class=\"flr-seg\"\n [attr.role]=\"inMenu() ? 'group' : 'radiogroup'\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n>\n <span #thumb class=\"flr-seg__thumb\" aria-hidden=\"true\" hidden></span>\n @for (option of options(); track option.value; let i = $index) {\n @let selected = option.value === value();\n <button\n #optionButton\n type=\"button\"\n [attr.role]=\"inMenu() ? 'menuitemradio' : 'radio'\"\n class=\"flr-seg__option\"\n [class.flr-seg__option--selected]=\"selected\"\n [class.flr-seg__option--icon-only]=\"iconOnly() && option.icon\"\n [attr.aria-checked]=\"selected\"\n [attr.aria-label]=\"iconOnly() && option.icon ? option.label : null\"\n [attr.title]=\"iconOnly() && option.icon ? option.label : null\"\n [tabindex]=\"selected ? 0 : -1\"\n (click)=\"select(option)\"\n (keydown)=\"handleKeydown($event, i)\"\n >\n @if (isIcon(option.icon)) {\n <span class=\"flr-seg__icon\" aria-hidden=\"true\" [flrIconMarkup]=\"option.icon\"></span>\n }\n @if (!iconOnly() || !isIcon(option.icon)) {\n <span>{{ option.label }}</span>\n }\n </button>\n }\n</div>\n",
|
|
12508
12573
|
styles: [":host{display:inline-block}.flr-seg{--flr-seg-tint: var(--flr-seg-selected-bg, var(--color-accent, #1e293b));--flr-seg-ink: var( --flr-seg-selected-ink, var(--color-on-accent, oklch(from var(--flr-seg-tint) clamp(0, (.564 - l) * 1000, 1) 0 0)) );--flr-seg-pole: oklch(from var(--color-ink, #1e293b) clamp(0, (l - .6) * 1000, 1) 0 0);--flr-seg-probe: color-mix(in oklab, var(--flr-seg-tint) 40%, var(--flr-seg-pole));--flr-seg-rim: oklch( from var(--flr-seg-probe) clamp(0, (l - .5) * 1000, 1) 0 0 / calc(clamp(0, (l - .34) * 1000, 1)*clamp(0, (.76 - l) * 1000, 1)/2) );--flr-seg-edge: var(--flr-seg-selected-rule, var(--flr-seg-rim));position:relative;display:inline-flex;overflow:hidden;gap:2px;padding:var(--flr-seg-pad, 4px);border:1px solid var(--color-rule, rgba(30, 41, 59, .14));border-radius:var(--radius-card, 16px);corner-shape:var(--corner-shape, round);background:var(--color-app-bg-2, #f1f5f9)}.flr-seg__thumb{position:absolute;top:var(--flr-seg-pad, 4px);bottom:var(--flr-seg-pad, 4px);left:0;box-sizing:border-box;border:1px solid var(--flr-seg-edge);border-radius:var(--radius-control, 8px);corner-shape:var(--corner-shape, round);background:var(--flr-seg-tint);box-shadow:0 1px 2px #1e293b1f;pointer-events:none}.flr-seg__thumb[hidden]{display:none}.flr-seg__thumb--animated{transition:transform .26s cubic-bezier(.3,0,0,1),width .26s cubic-bezier(.3,0,0,1)}@media(prefers-reduced-motion:reduce){.flr-seg__thumb--animated{transition:none}}.flr-seg__option{position:relative;display:inline-flex;align-items:center;gap:6px;height:var(--flr-seg-size, 30px);padding:0 12px;border:0;border-radius:var(--radius-control, 8px);corner-shape:var(--corner-shape, round);background:transparent;color:var(--color-ink-3, #64748b);font:inherit;font-size:13px;cursor:pointer;transition:color .12s ease,background-color .12s ease}.flr-seg__option:hover{color:var(--color-ink, #1e293b)}.flr-seg__option:focus-visible{outline:2px solid var(--color-ink, #1e293b);outline-offset:-2px}.flr-seg__option--selected:focus-visible{outline-color:var(--flr-seg-ink);outline-offset:-3px}.flr-seg__option--selected,.flr-seg__option--selected:hover{color:var(--flr-seg-ink)}.flr-seg__thumb[hidden]~.flr-seg__option--selected{background:var(--flr-seg-tint);box-shadow:inset 0 0 0 1px var(--flr-seg-edge)}@media(forced-colors:active){.flr-seg__thumb{border-color:Highlight;background:Highlight;forced-color-adjust:none}.flr-seg__option--selected,.flr-seg__option--selected:hover{color:HighlightText;forced-color-adjust:none}.flr-seg__thumb[hidden]~.flr-seg__option--selected{background:Highlight;box-shadow:none}}.flr-seg__option--icon-only{width:var(--flr-seg-size, 30px);padding:0;justify-content:center}.flr-seg__icon{display:inline-flex}.flr-seg__icon ::ng-deep svg{width:16px;height:16px}\n"],
|
|
12574
|
+
dependencies: [{
|
|
12575
|
+
kind: "directive",
|
|
12576
|
+
type: IconMarkupDirective,
|
|
12577
|
+
selector: "[flrIconMarkup]",
|
|
12578
|
+
inputs: ["flrIconMarkup"]
|
|
12579
|
+
}],
|
|
12509
12580
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
12510
12581
|
});
|
|
12511
12582
|
}
|
|
@@ -12520,7 +12591,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
12520
12591
|
args: [{
|
|
12521
12592
|
selector: "flr-segmented",
|
|
12522
12593
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12523
|
-
|
|
12594
|
+
imports: [IconMarkupDirective],
|
|
12595
|
+
template: "<div\n #group\n class=\"flr-seg\"\n [attr.role]=\"inMenu() ? 'group' : 'radiogroup'\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n>\n <span #thumb class=\"flr-seg__thumb\" aria-hidden=\"true\" hidden></span>\n @for (option of options(); track option.value; let i = $index) {\n @let selected = option.value === value();\n <button\n #optionButton\n type=\"button\"\n [attr.role]=\"inMenu() ? 'menuitemradio' : 'radio'\"\n class=\"flr-seg__option\"\n [class.flr-seg__option--selected]=\"selected\"\n [class.flr-seg__option--icon-only]=\"iconOnly() && option.icon\"\n [attr.aria-checked]=\"selected\"\n [attr.aria-label]=\"iconOnly() && option.icon ? option.label : null\"\n [attr.title]=\"iconOnly() && option.icon ? option.label : null\"\n [tabindex]=\"selected ? 0 : -1\"\n (click)=\"select(option)\"\n (keydown)=\"handleKeydown($event, i)\"\n >\n @if (isIcon(option.icon)) {\n <span class=\"flr-seg__icon\" aria-hidden=\"true\" [flrIconMarkup]=\"option.icon\"></span>\n }\n @if (!iconOnly() || !isIcon(option.icon)) {\n <span>{{ option.label }}</span>\n }\n </button>\n }\n</div>\n",
|
|
12524
12596
|
styles: [":host{display:inline-block}.flr-seg{--flr-seg-tint: var(--flr-seg-selected-bg, var(--color-accent, #1e293b));--flr-seg-ink: var( --flr-seg-selected-ink, var(--color-on-accent, oklch(from var(--flr-seg-tint) clamp(0, (.564 - l) * 1000, 1) 0 0)) );--flr-seg-pole: oklch(from var(--color-ink, #1e293b) clamp(0, (l - .6) * 1000, 1) 0 0);--flr-seg-probe: color-mix(in oklab, var(--flr-seg-tint) 40%, var(--flr-seg-pole));--flr-seg-rim: oklch( from var(--flr-seg-probe) clamp(0, (l - .5) * 1000, 1) 0 0 / calc(clamp(0, (l - .34) * 1000, 1)*clamp(0, (.76 - l) * 1000, 1)/2) );--flr-seg-edge: var(--flr-seg-selected-rule, var(--flr-seg-rim));position:relative;display:inline-flex;overflow:hidden;gap:2px;padding:var(--flr-seg-pad, 4px);border:1px solid var(--color-rule, rgba(30, 41, 59, .14));border-radius:var(--radius-card, 16px);corner-shape:var(--corner-shape, round);background:var(--color-app-bg-2, #f1f5f9)}.flr-seg__thumb{position:absolute;top:var(--flr-seg-pad, 4px);bottom:var(--flr-seg-pad, 4px);left:0;box-sizing:border-box;border:1px solid var(--flr-seg-edge);border-radius:var(--radius-control, 8px);corner-shape:var(--corner-shape, round);background:var(--flr-seg-tint);box-shadow:0 1px 2px #1e293b1f;pointer-events:none}.flr-seg__thumb[hidden]{display:none}.flr-seg__thumb--animated{transition:transform .26s cubic-bezier(.3,0,0,1),width .26s cubic-bezier(.3,0,0,1)}@media(prefers-reduced-motion:reduce){.flr-seg__thumb--animated{transition:none}}.flr-seg__option{position:relative;display:inline-flex;align-items:center;gap:6px;height:var(--flr-seg-size, 30px);padding:0 12px;border:0;border-radius:var(--radius-control, 8px);corner-shape:var(--corner-shape, round);background:transparent;color:var(--color-ink-3, #64748b);font:inherit;font-size:13px;cursor:pointer;transition:color .12s ease,background-color .12s ease}.flr-seg__option:hover{color:var(--color-ink, #1e293b)}.flr-seg__option:focus-visible{outline:2px solid var(--color-ink, #1e293b);outline-offset:-2px}.flr-seg__option--selected:focus-visible{outline-color:var(--flr-seg-ink);outline-offset:-3px}.flr-seg__option--selected,.flr-seg__option--selected:hover{color:var(--flr-seg-ink)}.flr-seg__thumb[hidden]~.flr-seg__option--selected{background:var(--flr-seg-tint);box-shadow:inset 0 0 0 1px var(--flr-seg-edge)}@media(forced-colors:active){.flr-seg__thumb{border-color:Highlight;background:Highlight;forced-color-adjust:none}.flr-seg__option--selected,.flr-seg__option--selected:hover{color:HighlightText;forced-color-adjust:none}.flr-seg__thumb[hidden]~.flr-seg__option--selected{background:Highlight;box-shadow:none}}.flr-seg__option--icon-only{width:var(--flr-seg-size, 30px);padding:0;justify-content:center}.flr-seg__icon{display:inline-flex}.flr-seg__icon ::ng-deep svg{width:16px;height:16px}\n"]
|
|
12525
12597
|
}]
|
|
12526
12598
|
}],
|
|
@@ -12600,11 +12672,28 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
12600
12672
|
}
|
|
12601
12673
|
});
|
|
12602
12674
|
const THEME_STORAGE_KEY = "flr-theme";
|
|
12603
|
-
const
|
|
12675
|
+
const THEME_DARK_QUERY = "(prefers-color-scheme: dark)";
|
|
12676
|
+
const THEME_PREFERENCES = [
|
|
12604
12677
|
"system",
|
|
12605
12678
|
"light",
|
|
12606
12679
|
"dark"
|
|
12607
12680
|
];
|
|
12681
|
+
function parseThemePreference(value) {
|
|
12682
|
+
return THEME_PREFERENCES.find((preference) => preference === value) ?? "system";
|
|
12683
|
+
}
|
|
12684
|
+
function resolveTheme(preference, systemDark) {
|
|
12685
|
+
if (preference !== "system") return preference;
|
|
12686
|
+
return systemDark ? "dark" : "light";
|
|
12687
|
+
}
|
|
12688
|
+
const THEME_PREPAINT_SCRIPT = [
|
|
12689
|
+
"(function(){",
|
|
12690
|
+
"var s=null,d=false;",
|
|
12691
|
+
`try{s=localStorage.getItem(${JSON.stringify(THEME_STORAGE_KEY)})}catch(e){}`,
|
|
12692
|
+
`try{d=matchMedia(${JSON.stringify(THEME_DARK_QUERY)}).matches}catch(e){}`,
|
|
12693
|
+
`var p=${JSON.stringify(THEME_PREFERENCES)}.indexOf(s)<0?"system":s;`,
|
|
12694
|
+
"if(p===\"dark\"||(p===\"system\"&&d))document.documentElement.setAttribute(\"data-theme\",\"dark\")",
|
|
12695
|
+
"})()"
|
|
12696
|
+
].join("");
|
|
12608
12697
|
var ThemeService = class ThemeService {
|
|
12609
12698
|
constructor() {
|
|
12610
12699
|
this.document = inject(DOCUMENT);
|
|
@@ -12612,12 +12701,8 @@ var ThemeService = class ThemeService {
|
|
|
12612
12701
|
this.systemDark = signal(false, ...ngDevMode ? [{ debugName: "systemDark" }] : /* istanbul ignore next */ []);
|
|
12613
12702
|
this.stored = signal(this.read(), ...ngDevMode ? [{ debugName: "stored" }] : /* istanbul ignore next */ []);
|
|
12614
12703
|
this.preference = this.stored.asReadonly();
|
|
12615
|
-
this.resolved = computed(() => {
|
|
12616
|
-
|
|
12617
|
-
if (preference !== "system") return preference;
|
|
12618
|
-
return this.systemDark() ? "dark" : "light";
|
|
12619
|
-
}, ...ngDevMode ? [{ debugName: "resolved" }] : /* istanbul ignore next */ []);
|
|
12620
|
-
const query = this.window?.matchMedia?.("(prefers-color-scheme: dark)");
|
|
12704
|
+
this.resolved = computed(() => resolveTheme(this.stored(), this.systemDark()), ...ngDevMode ? [{ debugName: "resolved" }] : /* istanbul ignore next */ []);
|
|
12705
|
+
const query = this.window?.matchMedia?.(THEME_DARK_QUERY);
|
|
12621
12706
|
if (query) {
|
|
12622
12707
|
this.systemDark.set(query.matches);
|
|
12623
12708
|
const follow = (event) => {
|
|
@@ -12640,8 +12725,7 @@ var ThemeService = class ThemeService {
|
|
|
12640
12725
|
}
|
|
12641
12726
|
read() {
|
|
12642
12727
|
try {
|
|
12643
|
-
|
|
12644
|
-
return PREFERENCES$1.find((preference) => preference === value) ?? "system";
|
|
12728
|
+
return parseThemePreference(this.window?.localStorage.getItem(THEME_STORAGE_KEY));
|
|
12645
12729
|
} catch {
|
|
12646
12730
|
return "system";
|
|
12647
12731
|
}
|
|
@@ -12705,7 +12789,7 @@ var UserMenuThemeComponent = class UserMenuThemeComponent {
|
|
|
12705
12789
|
this.theme = inject(ThemeService);
|
|
12706
12790
|
this.host = inject(ElementRef);
|
|
12707
12791
|
this.menu = inject(MenuComponent, { optional: true });
|
|
12708
|
-
this.moon =
|
|
12792
|
+
this.moon = USER_MENU_GLYPHS.moon;
|
|
12709
12793
|
this.options = computed(() => {
|
|
12710
12794
|
const labels = this.labels();
|
|
12711
12795
|
return PREFERENCES.map((value) => ({
|
|
@@ -12765,7 +12849,7 @@ var UserMenuThemeComponent = class UserMenuThemeComponent {
|
|
|
12765
12849
|
useExisting: forwardRef(() => UserMenuThemeComponent)
|
|
12766
12850
|
}],
|
|
12767
12851
|
ngImport: i0,
|
|
12768
|
-
template: "<span class=\"flr-um-theme__icon\" aria-hidden=\"true\" [
|
|
12852
|
+
template: "<span class=\"flr-um-theme__icon\" aria-hidden=\"true\" [flrIconMarkup]=\"moon\"></span>\n<span class=\"flr-um-theme__label\">{{ labels().theme }}</span>\n<flr-segmented\n [iconOnly]=\"true\"\n [inMenu]=\"true\"\n [options]=\"options()\"\n [value]=\"theme.preference()\"\n [aria-label]=\"labels().theme\"\n (valueChange)=\"choose($event)\"\n/>\n",
|
|
12769
12853
|
styles: [":host{display:flex;align-items:center;gap:10px;min-height:36px;padding:2px 6px 2px 12px;font-size:14px;font-family:var(--font-mono, \"DM Mono\", ui-monospace, monospace);color:var(--color-ink-2, #475569)}.flr-um-theme__icon{display:inline-flex;flex-shrink:0}.flr-um-theme__icon ::ng-deep svg{width:16px;height:16px;display:block}.flr-um-theme__label{flex:1;min-width:0}flr-segmented{--flr-seg-size: 24px;--flr-seg-pad: 2px}@media(pointer:coarse){flr-segmented{--flr-seg-size: 44px}}\n"],
|
|
12770
12854
|
dependencies: [{
|
|
12771
12855
|
kind: "component",
|
|
@@ -12781,6 +12865,11 @@ var UserMenuThemeComponent = class UserMenuThemeComponent {
|
|
|
12781
12865
|
"aria-describedby"
|
|
12782
12866
|
],
|
|
12783
12867
|
outputs: ["valueChange"]
|
|
12868
|
+
}, {
|
|
12869
|
+
kind: "directive",
|
|
12870
|
+
type: IconMarkupDirective,
|
|
12871
|
+
selector: "[flrIconMarkup]",
|
|
12872
|
+
inputs: ["flrIconMarkup"]
|
|
12784
12873
|
}],
|
|
12785
12874
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
12786
12875
|
});
|
|
@@ -12796,7 +12885,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
12796
12885
|
args: [{
|
|
12797
12886
|
selector: "flr-user-menu-theme",
|
|
12798
12887
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12799
|
-
imports: [SegmentedComponent],
|
|
12888
|
+
imports: [SegmentedComponent, IconMarkupDirective],
|
|
12800
12889
|
providers: [{
|
|
12801
12890
|
provide: MENU_FOCUSABLE,
|
|
12802
12891
|
useExisting: forwardRef(() => UserMenuThemeComponent)
|
|
@@ -12806,7 +12895,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
12806
12895
|
"(keydown)": "onKeydown($event)",
|
|
12807
12896
|
"(focusin)": "onFocusin()"
|
|
12808
12897
|
},
|
|
12809
|
-
template: "<span class=\"flr-um-theme__icon\" aria-hidden=\"true\" [
|
|
12898
|
+
template: "<span class=\"flr-um-theme__icon\" aria-hidden=\"true\" [flrIconMarkup]=\"moon\"></span>\n<span class=\"flr-um-theme__label\">{{ labels().theme }}</span>\n<flr-segmented\n [iconOnly]=\"true\"\n [inMenu]=\"true\"\n [options]=\"options()\"\n [value]=\"theme.preference()\"\n [aria-label]=\"labels().theme\"\n (valueChange)=\"choose($event)\"\n/>\n",
|
|
12810
12899
|
styles: [":host{display:flex;align-items:center;gap:10px;min-height:36px;padding:2px 6px 2px 12px;font-size:14px;font-family:var(--font-mono, \"DM Mono\", ui-monospace, monospace);color:var(--color-ink-2, #475569)}.flr-um-theme__icon{display:inline-flex;flex-shrink:0}.flr-um-theme__icon ::ng-deep svg{width:16px;height:16px;display:block}.flr-um-theme__label{flex:1;min-width:0}flr-segmented{--flr-seg-size: 24px;--flr-seg-pad: 2px}@media(pointer:coarse){flr-segmented{--flr-seg-size: 44px}}\n"]
|
|
12811
12900
|
}]
|
|
12812
12901
|
}],
|
|
@@ -12839,7 +12928,6 @@ var UserMenuComponent = class UserMenuComponent {
|
|
|
12839
12928
|
this.labels = input({}, ...ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []);
|
|
12840
12929
|
this.select = output();
|
|
12841
12930
|
this.localeChange = output();
|
|
12842
|
-
this.sanitizer = inject(DomSanitizer);
|
|
12843
12931
|
this.injector = inject(Injector);
|
|
12844
12932
|
this.shell = inject(SHELL_CONTEXT, { optional: true });
|
|
12845
12933
|
this.inRail = this.shell !== null;
|
|
@@ -12872,19 +12960,11 @@ var UserMenuComponent = class UserMenuComponent {
|
|
|
12872
12960
|
...danger.map((item, index) => this.itemRow(item, index === 0 || !!item.separatorAbove))
|
|
12873
12961
|
];
|
|
12874
12962
|
}, ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
|
|
12875
|
-
this.glyphs =
|
|
12876
|
-
globe: this.sanitizer.bypassSecurityTrustHtml(USER_MENU_GLYPHS.globe),
|
|
12877
|
-
chevronRight: this.sanitizer.bypassSecurityTrustHtml(USER_MENU_GLYPHS.chevronRight),
|
|
12878
|
-
chevronLeft: this.sanitizer.bypassSecurityTrustHtml(USER_MENU_GLYPHS.chevronLeft),
|
|
12879
|
-
check: this.sanitizer.bypassSecurityTrustHtml(USER_MENU_GLYPHS.check)
|
|
12880
|
-
};
|
|
12963
|
+
this.glyphs = USER_MENU_GLYPHS;
|
|
12881
12964
|
this.menu = viewChild(MenuComponent, ...ngDevMode ? [{ debugName: "menu" }] : /* istanbul ignore next */ []);
|
|
12882
12965
|
this.languageRow = viewChild("languageRow", ...ngDevMode ? [{ debugName: "languageRow" }] : /* istanbul ignore next */ []);
|
|
12883
12966
|
this.localeRows = viewChildren("localeRow", ...ngDevMode ? [{ debugName: "localeRows" }] : /* istanbul ignore next */ []);
|
|
12884
12967
|
}
|
|
12885
|
-
trustedIcon(markup) {
|
|
12886
|
-
return markup && isTrustedIconMarkup(markup) ? this.sanitizer.bypassSecurityTrustHtml(markup) : null;
|
|
12887
|
-
}
|
|
12888
12968
|
onOpenChange(open) {
|
|
12889
12969
|
this.open.set(open);
|
|
12890
12970
|
if (!open) {
|
|
@@ -12916,7 +12996,7 @@ var UserMenuComponent = class UserMenuComponent {
|
|
|
12916
12996
|
key: `item:${item.id ?? item.label}`,
|
|
12917
12997
|
separatorAbove,
|
|
12918
12998
|
item,
|
|
12919
|
-
icon:
|
|
12999
|
+
icon: isTrustedIconMarkup(item.icon) ? item.icon : null
|
|
12920
13000
|
};
|
|
12921
13001
|
}
|
|
12922
13002
|
focusOnceRendered(target) {
|
|
@@ -13037,7 +13117,7 @@ var UserMenuComponent = class UserMenuComponent {
|
|
|
13037
13117
|
}
|
|
13038
13118
|
],
|
|
13039
13119
|
ngImport: i0,
|
|
13040
|
-
template: "<flr-menu\n [align]=\"inRail ? 'start' : 'end'\"\n [direction]=\"inRail ? 'up' : 'down'\"\n [block]=\"inRail\"\n [minWidth]=\"264\"\n [open]=\"open()\"\n (openChange)=\"onOpenChange($event)\"\n>\n <button\n flr-menu-trigger\n type=\"button\"\n class=\"flr-um__trigger\"\n [class.flr-um__trigger--rail]=\"inRail\"\n [class.flr-um__trigger--compact]=\"compact()\"\n [title]=\"name()\"\n >\n <flr-avatar\n [attr.aria-hidden]=\"nameShown() || null\"\n [name]=\"name()\"\n [src]=\"avatarSrc()\"\n [accent]=\"accent()\"\n [size]=\"inRail ? 30 : 28\"\n />\n @if (inRail) {\n @if (!compact()) {\n <span class=\"flr-um__identity\">\n <span class=\"flr-um__name\">{{ name() }}</span>\n @if (email()) {\n <span class=\"mono flr-um__email\">{{ email() }}</span>\n }\n </span>\n <span class=\"flr-um__chev flr-um__chev--up\" aria-hidden=\"true\">▾</span>\n }\n } @else {\n @if (showName()) {\n <span class=\"flr-um__name\">{{ name() }}</span>\n }\n <span class=\"flr-um__chev\" aria-hidden=\"true\">▾</span>\n }\n </button>\n\n <div flr-menu-content role=\"none\" (keydown.escape)=\"onEscape($event)\">\n @if (view() === 'language') {\n <div class=\"flr-um__view flr-um__view--forward\">\n <flr-menu-item [keepOpen]=\"true\" (selected)=\"showMain()\">\n <span\n menu-item-icon\n class=\"flr-um__glyph\"\n aria-hidden=\"true\"\n [
|
|
13120
|
+
template: "<flr-menu\n [align]=\"inRail ? 'start' : 'end'\"\n [direction]=\"inRail ? 'up' : 'down'\"\n [block]=\"inRail\"\n [minWidth]=\"264\"\n [open]=\"open()\"\n (openChange)=\"onOpenChange($event)\"\n>\n <button\n flr-menu-trigger\n type=\"button\"\n class=\"flr-um__trigger\"\n [class.flr-um__trigger--rail]=\"inRail\"\n [class.flr-um__trigger--compact]=\"compact()\"\n [title]=\"name()\"\n >\n <flr-avatar\n [attr.aria-hidden]=\"nameShown() || null\"\n [name]=\"name()\"\n [src]=\"avatarSrc()\"\n [accent]=\"accent()\"\n [size]=\"inRail ? 30 : 28\"\n />\n @if (inRail) {\n @if (!compact()) {\n <span class=\"flr-um__identity\">\n <span class=\"flr-um__name\">{{ name() }}</span>\n @if (email()) {\n <span class=\"mono flr-um__email\">{{ email() }}</span>\n }\n </span>\n <span class=\"flr-um__chev flr-um__chev--up\" aria-hidden=\"true\">▾</span>\n }\n } @else {\n @if (showName()) {\n <span class=\"flr-um__name\">{{ name() }}</span>\n }\n <span class=\"flr-um__chev\" aria-hidden=\"true\">▾</span>\n }\n </button>\n\n <div flr-menu-content role=\"none\" (keydown.escape)=\"onEscape($event)\">\n @if (view() === 'language') {\n <div class=\"flr-um__view flr-um__view--forward\">\n <flr-menu-item [keepOpen]=\"true\" (selected)=\"showMain()\">\n <span\n menu-item-icon\n class=\"flr-um__glyph\"\n aria-hidden=\"true\"\n [flrIconMarkup]=\"glyphs.chevronLeft\"\n ></span>\n {{ text().language }}\n </flr-menu-item>\n <flr-menu-separator />\n @for (option of locales(); track option.code) {\n <flr-menu-item\n #localeRow\n [keepOpen]=\"true\"\n [checked]=\"option.code === locale()\"\n (selected)=\"chooseLocale(option.code)\"\n >\n <span [attr.lang]=\"option.code\">{{ option.label }}</span>\n @if (option.code === locale()) {\n <span\n menu-item-shortcut\n class=\"flr-um__glyph\"\n aria-hidden=\"true\"\n [flrIconMarkup]=\"glyphs.check\"\n ></span>\n }\n </flr-menu-item>\n }\n </div>\n } @else {\n <div class=\"flr-um__view\" [class.flr-um__view--back]=\"returned()\">\n <div class=\"flr-um__header\">\n <flr-avatar\n aria-hidden=\"true\"\n [name]=\"name()\"\n [src]=\"avatarSrc()\"\n [accent]=\"accent()\"\n [size]=\"32\"\n />\n <div class=\"flr-um__header-text\">\n <div class=\"flr-um__header-name\">{{ name() }}</div>\n @if (email()) {\n <div class=\"mono flr-um__header-email\">{{ email() }}</div>\n }\n </div>\n </div>\n <flr-menu-separator />\n @for (row of rows(); track row.key) {\n @if (row.separatorAbove) {\n <flr-menu-separator />\n }\n @switch (row.kind) {\n @case ('theme') {\n <flr-user-menu-theme [labels]=\"text()\" />\n }\n @case ('language') {\n <flr-menu-item #languageRow [keepOpen]=\"true\" (selected)=\"showLanguages()\">\n <span\n menu-item-icon\n class=\"flr-um__glyph\"\n aria-hidden=\"true\"\n [flrIconMarkup]=\"glyphs.globe\"\n ></span>\n {{ text().language }}\n <span menu-item-shortcut class=\"flr-um__current\">\n @if (currentLocale(); as current) {\n <span [attr.lang]=\"current.code\">{{ current.label }}</span>\n }\n <span\n class=\"flr-um__glyph\"\n aria-hidden=\"true\"\n [flrIconMarkup]=\"glyphs.chevronRight\"\n ></span>\n </span>\n </flr-menu-item>\n }\n @case ('item') {\n <flr-menu-item\n [href]=\"row.item.href ?? null\"\n [destructive]=\"row.item.danger ?? false\"\n (selected)=\"select.emit(row.item)\"\n >\n @if (row.icon) {\n <span menu-item-icon aria-hidden=\"true\" [flrIconMarkup]=\"row.icon\"></span>\n } @else if (row.item.icon) {\n <span menu-item-icon aria-hidden=\"true\">{{ row.item.icon }}</span>\n }\n {{ row.item.label }}\n @if (row.item.shortcut) {\n <kbd menu-item-shortcut class=\"flr-um__kbd\">{{ row.item.shortcut }}</kbd>\n }\n </flr-menu-item>\n }\n }\n }\n </div>\n }\n </div>\n</flr-menu>\n",
|
|
13041
13121
|
styles: [":host{display:inline-flex}:host(.flr-um--rail){display:flex;width:100%}.flr-um__trigger{display:inline-flex;align-items:center;gap:8px;background:transparent;border:none;padding:4px 8px;margin:0;cursor:pointer;color:inherit;font:inherit;border-radius:var(--radius-card, 16px);corner-shape:var(--corner-shape, round);transition:background .14s ease}.flr-um__trigger:hover{background:var(--color-app-nav-hover, rgba(30, 41, 59, .03))}.flr-um__name{font-size:13px;color:var(--color-ink-2, #475569);font-family:var(--font-display, \"Fraunces\", Georgia, ui-serif, serif);max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.flr-um__chev{color:var(--color-ink-3, #64748b);font-size:10px;opacity:.7;margin-left:2px}.flr-um__trigger--rail{width:100%;gap:10px;padding:8px;text-align:left}.flr-um__trigger--compact{justify-content:center;padding:6px 0}.flr-um__identity{display:flex;flex-direction:column;flex:1;min-width:0;gap:2px}.flr-um__trigger--rail .flr-um__name{max-width:none;color:var(--color-ink, #1e293b)}.flr-um__email{font-size:11px;color:var(--color-ink-3, #64748b);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.flr-um__chev--up{transform:rotate(180deg)}.flr-um__view--forward{animation:flr-um-forward .16s ease-out}.flr-um__view--back{animation:flr-um-back .16s ease-out}@keyframes flr-um-forward{0%{opacity:0;transform:translate(12px)}}@keyframes flr-um-back{0%{opacity:0;transform:translate(-12px)}}@media(prefers-reduced-motion:reduce){.flr-um__view--forward,.flr-um__view--back{animation:none}}.flr-um__header{display:flex;align-items:center;gap:10px;padding:6px 12px 8px}.flr-um__header-text{flex:1;min-width:0}.flr-um__header-name{font-size:13px;font-weight:500;color:var(--color-ink, #1e293b);font-family:var(--font-display, \"Fraunces\", Georgia, ui-serif, serif);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.flr-um__header-email{font-size:11px;color:var(--color-ink-3, #64748b);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.flr-um__glyph{display:inline-flex}.flr-um__glyph ::ng-deep svg{width:16px;height:16px;display:block}.flr-um__kbd{display:inline-block;min-width:20px;padding:1px 5px;border:1px solid var(--color-rule, rgba(30, 41, 59, .14));border-radius:calc(var(--radius-control, 8px) / 2);font:inherit;line-height:16px;text-align:center;color:var(--color-ink-3, #64748b)}.flr-um__current{display:inline-flex;align-items:center;gap:4px;font-size:12px}\n"],
|
|
13042
13122
|
dependencies: [
|
|
13043
13123
|
{
|
|
@@ -13084,6 +13164,12 @@ var UserMenuComponent = class UserMenuComponent {
|
|
|
13084
13164
|
"alt"
|
|
13085
13165
|
]
|
|
13086
13166
|
},
|
|
13167
|
+
{
|
|
13168
|
+
kind: "directive",
|
|
13169
|
+
type: IconMarkupDirective,
|
|
13170
|
+
selector: "[flrIconMarkup]",
|
|
13171
|
+
inputs: ["flrIconMarkup"]
|
|
13172
|
+
},
|
|
13087
13173
|
{
|
|
13088
13174
|
kind: "component",
|
|
13089
13175
|
type: UserMenuThemeComponent,
|
|
@@ -13110,10 +13196,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
13110
13196
|
MenuItemComponent,
|
|
13111
13197
|
MenuSeparatorComponent,
|
|
13112
13198
|
AvatarComponent,
|
|
13199
|
+
IconMarkupDirective,
|
|
13113
13200
|
UserMenuThemeComponent
|
|
13114
13201
|
],
|
|
13115
13202
|
host: { "[class.flr-um--rail]": "inRail" },
|
|
13116
|
-
template: "<flr-menu\n [align]=\"inRail ? 'start' : 'end'\"\n [direction]=\"inRail ? 'up' : 'down'\"\n [block]=\"inRail\"\n [minWidth]=\"264\"\n [open]=\"open()\"\n (openChange)=\"onOpenChange($event)\"\n>\n <button\n flr-menu-trigger\n type=\"button\"\n class=\"flr-um__trigger\"\n [class.flr-um__trigger--rail]=\"inRail\"\n [class.flr-um__trigger--compact]=\"compact()\"\n [title]=\"name()\"\n >\n <flr-avatar\n [attr.aria-hidden]=\"nameShown() || null\"\n [name]=\"name()\"\n [src]=\"avatarSrc()\"\n [accent]=\"accent()\"\n [size]=\"inRail ? 30 : 28\"\n />\n @if (inRail) {\n @if (!compact()) {\n <span class=\"flr-um__identity\">\n <span class=\"flr-um__name\">{{ name() }}</span>\n @if (email()) {\n <span class=\"mono flr-um__email\">{{ email() }}</span>\n }\n </span>\n <span class=\"flr-um__chev flr-um__chev--up\" aria-hidden=\"true\">▾</span>\n }\n } @else {\n @if (showName()) {\n <span class=\"flr-um__name\">{{ name() }}</span>\n }\n <span class=\"flr-um__chev\" aria-hidden=\"true\">▾</span>\n }\n </button>\n\n <div flr-menu-content role=\"none\" (keydown.escape)=\"onEscape($event)\">\n @if (view() === 'language') {\n <div class=\"flr-um__view flr-um__view--forward\">\n <flr-menu-item [keepOpen]=\"true\" (selected)=\"showMain()\">\n <span\n menu-item-icon\n class=\"flr-um__glyph\"\n aria-hidden=\"true\"\n [
|
|
13203
|
+
template: "<flr-menu\n [align]=\"inRail ? 'start' : 'end'\"\n [direction]=\"inRail ? 'up' : 'down'\"\n [block]=\"inRail\"\n [minWidth]=\"264\"\n [open]=\"open()\"\n (openChange)=\"onOpenChange($event)\"\n>\n <button\n flr-menu-trigger\n type=\"button\"\n class=\"flr-um__trigger\"\n [class.flr-um__trigger--rail]=\"inRail\"\n [class.flr-um__trigger--compact]=\"compact()\"\n [title]=\"name()\"\n >\n <flr-avatar\n [attr.aria-hidden]=\"nameShown() || null\"\n [name]=\"name()\"\n [src]=\"avatarSrc()\"\n [accent]=\"accent()\"\n [size]=\"inRail ? 30 : 28\"\n />\n @if (inRail) {\n @if (!compact()) {\n <span class=\"flr-um__identity\">\n <span class=\"flr-um__name\">{{ name() }}</span>\n @if (email()) {\n <span class=\"mono flr-um__email\">{{ email() }}</span>\n }\n </span>\n <span class=\"flr-um__chev flr-um__chev--up\" aria-hidden=\"true\">▾</span>\n }\n } @else {\n @if (showName()) {\n <span class=\"flr-um__name\">{{ name() }}</span>\n }\n <span class=\"flr-um__chev\" aria-hidden=\"true\">▾</span>\n }\n </button>\n\n <div flr-menu-content role=\"none\" (keydown.escape)=\"onEscape($event)\">\n @if (view() === 'language') {\n <div class=\"flr-um__view flr-um__view--forward\">\n <flr-menu-item [keepOpen]=\"true\" (selected)=\"showMain()\">\n <span\n menu-item-icon\n class=\"flr-um__glyph\"\n aria-hidden=\"true\"\n [flrIconMarkup]=\"glyphs.chevronLeft\"\n ></span>\n {{ text().language }}\n </flr-menu-item>\n <flr-menu-separator />\n @for (option of locales(); track option.code) {\n <flr-menu-item\n #localeRow\n [keepOpen]=\"true\"\n [checked]=\"option.code === locale()\"\n (selected)=\"chooseLocale(option.code)\"\n >\n <span [attr.lang]=\"option.code\">{{ option.label }}</span>\n @if (option.code === locale()) {\n <span\n menu-item-shortcut\n class=\"flr-um__glyph\"\n aria-hidden=\"true\"\n [flrIconMarkup]=\"glyphs.check\"\n ></span>\n }\n </flr-menu-item>\n }\n </div>\n } @else {\n <div class=\"flr-um__view\" [class.flr-um__view--back]=\"returned()\">\n <div class=\"flr-um__header\">\n <flr-avatar\n aria-hidden=\"true\"\n [name]=\"name()\"\n [src]=\"avatarSrc()\"\n [accent]=\"accent()\"\n [size]=\"32\"\n />\n <div class=\"flr-um__header-text\">\n <div class=\"flr-um__header-name\">{{ name() }}</div>\n @if (email()) {\n <div class=\"mono flr-um__header-email\">{{ email() }}</div>\n }\n </div>\n </div>\n <flr-menu-separator />\n @for (row of rows(); track row.key) {\n @if (row.separatorAbove) {\n <flr-menu-separator />\n }\n @switch (row.kind) {\n @case ('theme') {\n <flr-user-menu-theme [labels]=\"text()\" />\n }\n @case ('language') {\n <flr-menu-item #languageRow [keepOpen]=\"true\" (selected)=\"showLanguages()\">\n <span\n menu-item-icon\n class=\"flr-um__glyph\"\n aria-hidden=\"true\"\n [flrIconMarkup]=\"glyphs.globe\"\n ></span>\n {{ text().language }}\n <span menu-item-shortcut class=\"flr-um__current\">\n @if (currentLocale(); as current) {\n <span [attr.lang]=\"current.code\">{{ current.label }}</span>\n }\n <span\n class=\"flr-um__glyph\"\n aria-hidden=\"true\"\n [flrIconMarkup]=\"glyphs.chevronRight\"\n ></span>\n </span>\n </flr-menu-item>\n }\n @case ('item') {\n <flr-menu-item\n [href]=\"row.item.href ?? null\"\n [destructive]=\"row.item.danger ?? false\"\n (selected)=\"select.emit(row.item)\"\n >\n @if (row.icon) {\n <span menu-item-icon aria-hidden=\"true\" [flrIconMarkup]=\"row.icon\"></span>\n } @else if (row.item.icon) {\n <span menu-item-icon aria-hidden=\"true\">{{ row.item.icon }}</span>\n }\n {{ row.item.label }}\n @if (row.item.shortcut) {\n <kbd menu-item-shortcut class=\"flr-um__kbd\">{{ row.item.shortcut }}</kbd>\n }\n </flr-menu-item>\n }\n }\n }\n </div>\n }\n </div>\n</flr-menu>\n",
|
|
13117
13204
|
styles: [":host{display:inline-flex}:host(.flr-um--rail){display:flex;width:100%}.flr-um__trigger{display:inline-flex;align-items:center;gap:8px;background:transparent;border:none;padding:4px 8px;margin:0;cursor:pointer;color:inherit;font:inherit;border-radius:var(--radius-card, 16px);corner-shape:var(--corner-shape, round);transition:background .14s ease}.flr-um__trigger:hover{background:var(--color-app-nav-hover, rgba(30, 41, 59, .03))}.flr-um__name{font-size:13px;color:var(--color-ink-2, #475569);font-family:var(--font-display, \"Fraunces\", Georgia, ui-serif, serif);max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.flr-um__chev{color:var(--color-ink-3, #64748b);font-size:10px;opacity:.7;margin-left:2px}.flr-um__trigger--rail{width:100%;gap:10px;padding:8px;text-align:left}.flr-um__trigger--compact{justify-content:center;padding:6px 0}.flr-um__identity{display:flex;flex-direction:column;flex:1;min-width:0;gap:2px}.flr-um__trigger--rail .flr-um__name{max-width:none;color:var(--color-ink, #1e293b)}.flr-um__email{font-size:11px;color:var(--color-ink-3, #64748b);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.flr-um__chev--up{transform:rotate(180deg)}.flr-um__view--forward{animation:flr-um-forward .16s ease-out}.flr-um__view--back{animation:flr-um-back .16s ease-out}@keyframes flr-um-forward{0%{opacity:0;transform:translate(12px)}}@keyframes flr-um-back{0%{opacity:0;transform:translate(-12px)}}@media(prefers-reduced-motion:reduce){.flr-um__view--forward,.flr-um__view--back{animation:none}}.flr-um__header{display:flex;align-items:center;gap:10px;padding:6px 12px 8px}.flr-um__header-text{flex:1;min-width:0}.flr-um__header-name{font-size:13px;font-weight:500;color:var(--color-ink, #1e293b);font-family:var(--font-display, \"Fraunces\", Georgia, ui-serif, serif);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.flr-um__header-email{font-size:11px;color:var(--color-ink-3, #64748b);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.flr-um__glyph{display:inline-flex}.flr-um__glyph ::ng-deep svg{width:16px;height:16px;display:block}.flr-um__kbd{display:inline-block;min-width:20px;padding:1px 5px;border:1px solid var(--color-rule, rgba(30, 41, 59, .14));border-radius:calc(var(--radius-control, 8px) / 2);font:inherit;line-height:16px;text-align:center;color:var(--color-ink-3, #64748b)}.flr-um__current{display:inline-flex;align-items:center;gap:4px;font-size:12px}\n"]
|
|
13118
13205
|
}]
|
|
13119
13206
|
}],
|
|
@@ -13212,6 +13299,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
13212
13299
|
}]
|
|
13213
13300
|
}
|
|
13214
13301
|
});
|
|
13302
|
+
function provideTheme() {
|
|
13303
|
+
return provideEnvironmentInitializer(() => {
|
|
13304
|
+
inject(ThemeService);
|
|
13305
|
+
});
|
|
13306
|
+
}
|
|
13215
13307
|
const DEFAULT_APPS = [
|
|
13216
13308
|
{
|
|
13217
13309
|
id: "ferrlabs",
|
|
@@ -13733,7 +13825,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
13733
13825
|
var ProjectSwitcherComponent = class ProjectSwitcherComponent {
|
|
13734
13826
|
constructor() {
|
|
13735
13827
|
this.hostEl = inject(ElementRef);
|
|
13736
|
-
this.sanitizer = inject(DomSanitizer);
|
|
13737
13828
|
this.shell = inject(SHELL_CONTEXT, { optional: true });
|
|
13738
13829
|
this.searchInput = viewChild("searchInput", ...ngDevMode ? [{ debugName: "searchInput" }] : /* istanbul ignore next */ []);
|
|
13739
13830
|
this.current = input(null, ...ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []);
|
|
@@ -13763,6 +13854,7 @@ var ProjectSwitcherComponent = class ProjectSwitcherComponent {
|
|
|
13763
13854
|
this.compact = computed(() => this.variant() === "brand" && (this.shell?.collapsed() ?? false), ...ngDevMode ? [{ debugName: "compact" }] : /* istanbul ignore next */ []);
|
|
13764
13855
|
this.monogram = computed(() => Array.from(this.displayedLabel().trim())[0]?.toLocaleUpperCase() ?? "", ...ngDevMode ? [{ debugName: "monogram" }] : /* istanbul ignore next */ []);
|
|
13765
13856
|
this.displayedMeta = computed(() => this.current()?.meta ?? this.placeholder()?.meta ?? "", ...ngDevMode ? [{ debugName: "displayedMeta" }] : /* istanbul ignore next */ []);
|
|
13857
|
+
this.isIcon = isTrustedIconMarkup;
|
|
13766
13858
|
effect(() => {
|
|
13767
13859
|
this.query();
|
|
13768
13860
|
this.open();
|
|
@@ -13774,9 +13866,6 @@ var ProjectSwitcherComponent = class ProjectSwitcherComponent {
|
|
|
13774
13866
|
if (el) setTimeout(() => el.focus(), 0);
|
|
13775
13867
|
});
|
|
13776
13868
|
}
|
|
13777
|
-
trustedIcon(markup) {
|
|
13778
|
-
return markup && isTrustedIconMarkup(markup) ? this.sanitizer.bypassSecurityTrustHtml(markup) : null;
|
|
13779
|
-
}
|
|
13780
13869
|
toggle() {
|
|
13781
13870
|
this.open.set(!this.open());
|
|
13782
13871
|
}
|
|
@@ -13937,10 +14026,9 @@ var ProjectSwitcherComponent = class ProjectSwitcherComponent {
|
|
|
13937
14026
|
(click)="toggle()"
|
|
13938
14027
|
>
|
|
13939
14028
|
@if (displayedIcon()) {
|
|
13940
|
-
@let icon = trustedIcon(displayedIcon());
|
|
13941
14029
|
<span class="flr-ps__trigger-icon">
|
|
13942
|
-
@if (
|
|
13943
|
-
<span [
|
|
14030
|
+
@if (isIcon(displayedIcon())) {
|
|
14031
|
+
<span [flrIconMarkup]="displayedIcon()"></span>
|
|
13944
14032
|
} @else {
|
|
13945
14033
|
{{ displayedIcon() }}
|
|
13946
14034
|
}
|
|
@@ -13959,10 +14047,9 @@ var ProjectSwitcherComponent = class ProjectSwitcherComponent {
|
|
|
13959
14047
|
} @else {
|
|
13960
14048
|
<flr-site-card [label]="displayedLabel()" (select)="toggle()">
|
|
13961
14049
|
@if (displayedIcon()) {
|
|
13962
|
-
@let icon = trustedIcon(displayedIcon());
|
|
13963
14050
|
<span site-card-icon class="flr-ps__trigger-icon">
|
|
13964
|
-
@if (
|
|
13965
|
-
<span [
|
|
14051
|
+
@if (isIcon(displayedIcon())) {
|
|
14052
|
+
<span [flrIconMarkup]="displayedIcon()"></span>
|
|
13966
14053
|
} @else {
|
|
13967
14054
|
{{ displayedIcon() }}
|
|
13968
14055
|
}
|
|
@@ -14005,10 +14092,9 @@ var ProjectSwitcherComponent = class ProjectSwitcherComponent {
|
|
|
14005
14092
|
(mouseenter)="highlight.set(idx)"
|
|
14006
14093
|
(click)="onSelect(item)"
|
|
14007
14094
|
>
|
|
14008
|
-
@let itemIcon = trustedIcon(item.icon);
|
|
14009
14095
|
<span class="flr-ps__item-icon">
|
|
14010
|
-
@if (
|
|
14011
|
-
<span [
|
|
14096
|
+
@if (isIcon(item.icon)) {
|
|
14097
|
+
<span [flrIconMarkup]="item.icon"></span>
|
|
14012
14098
|
} @else {
|
|
14013
14099
|
{{ item.icon }}
|
|
14014
14100
|
}
|
|
@@ -14050,21 +14136,30 @@ var ProjectSwitcherComponent = class ProjectSwitcherComponent {
|
|
|
14050
14136
|
`,
|
|
14051
14137
|
isInline: true,
|
|
14052
14138
|
styles: [":host{display:block;position:relative}:host(.flr-ps--brand){display:flex;flex:1;min-width:0;align-self:stretch;height:100%}.flr-ps__brand{display:flex;align-items:center;gap:10px;width:100%;height:100%;box-sizing:border-box;padding:0 18px;margin:0;border:none;border-radius:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;overflow:hidden;transition:padding .22s ease,gap .22s ease,background .14s ease}.flr-ps__brand:hover{background:var(--color-app-nav-hover, rgba(30, 41, 59, .03))}.flr-ps__brand-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;overflow:hidden;transition:flex-grow .22s ease,opacity .14s ease}.flr-ps__brand-label{font-family:var(--font-display, \"Fraunces\", Georgia, ui-serif, serif);font-weight:700;font-size:15px;line-height:1.1;color:var(--color-ink, #1e293b);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.flr-ps__brand-meta{font-size:11px;line-height:1.1;color:var(--color-ink-3, #64748b);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.flr-ps__brand-chev{flex-shrink:0;max-width:1em;overflow:hidden;font-size:12px;transition:max-width .22s ease,opacity .14s ease;opacity:.7;color:var(--color-ink-3, #64748b)}:host(.flr-ps--brand) .flr-ps__panel{left:0;right:0;top:100%;border-radius:0 0 var(--radius-card, 16px) var(--radius-card, 16px);corner-shape:var(--corner-shape, round)}:host(.flr-ps--compact) .flr-ps__brand{gap:0;padding:8px}:host(.flr-ps--compact) .flr-ps__brand-text{flex-grow:0;opacity:0}:host(.flr-ps--compact) .flr-ps__brand-chev{max-width:0;opacity:0}:host(.flr-ps--compact) .flr-ps__brand:hover{background:transparent}:host(.flr-ps--compact) .flr-ps__monogram{width:var(--flr-ps-compact-size, 48px);margin-right:0;border-radius:var(--radius-modal, 24px);corner-shape:var(--corner-shape, round);opacity:1}:host(.flr-ps--compact) .flr-ps__brand:hover .flr-ps__monogram{background:var(--color-app-nav-active, rgba(30, 41, 59, .06))}:host(.flr-ps--compact) .flr-ps__panel{left:calc(100% + 10px);right:auto;top:8px;width:280px;border-radius:var(--radius-modal, 24px);corner-shape:var(--corner-shape, round)}.flr-ps__monogram{display:flex;align-items:center;justify-content:center;width:0;height:100%;margin-right:-10px;overflow:hidden;opacity:0;flex:none;border-radius:var(--radius-card, 16px);corner-shape:var(--corner-shape, round);background:var(--color-app-bg-2, #f1f5f9);color:var(--color-ink, #1e293b);font-family:var(--font-display, \"Fraunces\", Georgia, ui-serif, serif);font-weight:700;font-size:15px;transition:width .22s ease,margin-right .22s ease,opacity .14s ease,border-radius .22s ease,background .14s ease}.flr-ps__trigger-icon,.flr-ps__item-icon{display:inline-flex;align-items:center;flex-shrink:0}.flr-ps__brand .flr-ps__trigger-icon{margin-inline:auto}.flr-ps__trigger-icon ::ng-deep svg:not([width]),.flr-ps__item-icon ::ng-deep svg:not([width]){width:18px;height:18px;display:block}.flr-ps__panel{position:absolute;top:calc(100% + 4px);left:12px;right:12px;background:var(--color-card, #fff);border:1px solid var(--color-rule, rgba(30, 41, 59, .14));border-radius:var(--radius-modal, 24px);corner-shape:var(--corner-shape, round);box-shadow:0 10px 30px #0f172a24;padding:6px;z-index:60;display:flex;flex-direction:column;gap:2px;max-height:360px;animation:flr-ps-in .14s ease-out}@keyframes flr-ps-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}.flr-ps__title{font-family:var(--font-mono, \"DM Mono\", ui-monospace, monospace);padding:6px 10px 4px;font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--color-ink-3, #64748b)}.flr-ps__search-wrap{padding:0 6px 6px}.flr-ps__search{width:100%;padding:6px 10px;font-size:13px;border:1px solid var(--color-rule, #e2e8f0);border-radius:var(--radius-control, 8px);corner-shape:var(--corner-shape, round);background:var(--color-app-bg-2, #f8fafc);color:var(--color-ink, #0f172a);outline:none;box-sizing:border-box}.flr-ps__search::placeholder{color:var(--color-ink-3, #5d6b80);opacity:1}.flr-ps__list{overflow-y:auto;max-height:260px;display:flex;flex-direction:column;gap:1px}.flr-ps__empty{padding:12px 10px;font-size:12px;color:var(--color-ink-3, #94a3b8);text-align:center}.flr-ps__item{width:100%;padding:8px 10px;display:flex;align-items:center;gap:10px;background:transparent;border:none;border-radius:var(--radius-control, 8px);corner-shape:var(--corner-shape, round);cursor:pointer;color:var(--color-ink, #0f172a);text-align:left;transition:background 80ms}.flr-ps__item--hl{background:var(--color-app-nav-hover, rgba(30, 41, 59, .06))}.flr-ps__item-body{flex:1;min-width:0}.flr-ps__item-label{display:block;font-size:13px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.flr-ps__item-label--current{font-weight:600}.flr-ps__item-meta{display:block;font-size:11px;color:var(--color-ink-3, #94a3b8);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.flr-ps__check{color:var(--color-ink-3, #64748b);font-size:11px;flex-shrink:0}.flr-ps__sep{height:1px;background:var(--color-rule, rgba(30, 41, 59, .1));margin:4px -6px}.flr-ps__footer-btn{width:100%;padding:8px 10px;display:flex;align-items:center;gap:10px;background:transparent;border:none;border-radius:var(--radius-control, 8px);corner-shape:var(--corner-shape, round);cursor:pointer;color:var(--color-ink-2, #475569);text-align:left;font-size:13px;transition:background 80ms}.flr-ps__footer-btn:hover{background:var(--color-app-nav-hover, rgba(30, 41, 59, .06))}.flr-ps__footer-label{flex:1}@media(prefers-reduced-motion:reduce){.flr-ps__brand,.flr-ps__brand-text,.flr-ps__brand-chev,.flr-ps__monogram,.flr-ps__item,.flr-ps__footer-btn{transition:none}}\n"],
|
|
14053
|
-
dependencies: [
|
|
14054
|
-
|
|
14055
|
-
|
|
14056
|
-
|
|
14057
|
-
|
|
14058
|
-
|
|
14059
|
-
|
|
14060
|
-
|
|
14061
|
-
|
|
14062
|
-
|
|
14063
|
-
|
|
14064
|
-
|
|
14065
|
-
|
|
14066
|
-
|
|
14067
|
-
|
|
14139
|
+
dependencies: [
|
|
14140
|
+
{
|
|
14141
|
+
kind: "component",
|
|
14142
|
+
type: SiteCardComponent,
|
|
14143
|
+
selector: "flr-site-card",
|
|
14144
|
+
inputs: [
|
|
14145
|
+
"label",
|
|
14146
|
+
"showChevron",
|
|
14147
|
+
"interactive"
|
|
14148
|
+
],
|
|
14149
|
+
outputs: ["select"]
|
|
14150
|
+
},
|
|
14151
|
+
{
|
|
14152
|
+
kind: "directive",
|
|
14153
|
+
type: IconPlayDirective,
|
|
14154
|
+
selector: "[flrIconPlay]"
|
|
14155
|
+
},
|
|
14156
|
+
{
|
|
14157
|
+
kind: "directive",
|
|
14158
|
+
type: IconMarkupDirective,
|
|
14159
|
+
selector: "[flrIconMarkup]",
|
|
14160
|
+
inputs: ["flrIconMarkup"]
|
|
14161
|
+
}
|
|
14162
|
+
],
|
|
14068
14163
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
14069
14164
|
});
|
|
14070
14165
|
}
|
|
@@ -14079,7 +14174,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
14079
14174
|
args: [{
|
|
14080
14175
|
selector: "flr-project-switcher",
|
|
14081
14176
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
14082
|
-
imports: [
|
|
14177
|
+
imports: [
|
|
14178
|
+
SiteCardComponent,
|
|
14179
|
+
IconPlayDirective,
|
|
14180
|
+
IconMarkupDirective
|
|
14181
|
+
],
|
|
14083
14182
|
host: {
|
|
14084
14183
|
"(document:mousedown)": "onDocumentDown($event)",
|
|
14085
14184
|
"(document:keydown.escape)": "close()",
|
|
@@ -14097,10 +14196,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
14097
14196
|
(click)="toggle()"
|
|
14098
14197
|
>
|
|
14099
14198
|
@if (displayedIcon()) {
|
|
14100
|
-
@let icon = trustedIcon(displayedIcon());
|
|
14101
14199
|
<span class="flr-ps__trigger-icon">
|
|
14102
|
-
@if (
|
|
14103
|
-
<span [
|
|
14200
|
+
@if (isIcon(displayedIcon())) {
|
|
14201
|
+
<span [flrIconMarkup]="displayedIcon()"></span>
|
|
14104
14202
|
} @else {
|
|
14105
14203
|
{{ displayedIcon() }}
|
|
14106
14204
|
}
|
|
@@ -14119,10 +14217,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
14119
14217
|
} @else {
|
|
14120
14218
|
<flr-site-card [label]="displayedLabel()" (select)="toggle()">
|
|
14121
14219
|
@if (displayedIcon()) {
|
|
14122
|
-
@let icon = trustedIcon(displayedIcon());
|
|
14123
14220
|
<span site-card-icon class="flr-ps__trigger-icon">
|
|
14124
|
-
@if (
|
|
14125
|
-
<span [
|
|
14221
|
+
@if (isIcon(displayedIcon())) {
|
|
14222
|
+
<span [flrIconMarkup]="displayedIcon()"></span>
|
|
14126
14223
|
} @else {
|
|
14127
14224
|
{{ displayedIcon() }}
|
|
14128
14225
|
}
|
|
@@ -14165,10 +14262,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
14165
14262
|
(mouseenter)="highlight.set(idx)"
|
|
14166
14263
|
(click)="onSelect(item)"
|
|
14167
14264
|
>
|
|
14168
|
-
@let itemIcon = trustedIcon(item.icon);
|
|
14169
14265
|
<span class="flr-ps__item-icon">
|
|
14170
|
-
@if (
|
|
14171
|
-
<span [
|
|
14266
|
+
@if (isIcon(item.icon)) {
|
|
14267
|
+
<span [flrIconMarkup]="item.icon"></span>
|
|
14172
14268
|
} @else {
|
|
14173
14269
|
{{ item.icon }}
|
|
14174
14270
|
}
|
|
@@ -16028,8 +16124,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
16028
16124
|
var SiteNavbarComponent = class SiteNavbarComponent {
|
|
16029
16125
|
constructor() {
|
|
16030
16126
|
this.chrome = inject(SITE_CHROME);
|
|
16031
|
-
this.
|
|
16032
|
-
this.logo = this.sanitizer.bypassSecurityTrustHtml(isTrustedIconMarkup(this.chrome.logoSvg) ? this.chrome.logoSvg : "");
|
|
16127
|
+
this.logo = this.chrome.logoSvg;
|
|
16033
16128
|
this.locale = resolveSiteLocale(this.chrome, inject(LOCALE_ID));
|
|
16034
16129
|
this.wordmark = this.chrome.wordmark;
|
|
16035
16130
|
this.wordmarkAccent = this.chrome.wordmarkAccent ?? "";
|
|
@@ -16080,7 +16175,7 @@ var SiteNavbarComponent = class SiteNavbarComponent {
|
|
|
16080
16175
|
<header class="nav" [class.nav--scrolled]="scrolled()">
|
|
16081
16176
|
<div class="nav__container">
|
|
16082
16177
|
<a [href]="homeHref" class="nav__brand" translate="no">
|
|
16083
|
-
<span class="nav__logo" [
|
|
16178
|
+
<span class="nav__logo" [flrIconMarkup]="logo"></span>
|
|
16084
16179
|
<!-- prettier-ignore -->
|
|
16085
16180
|
<span class="nav__wordmark">{{ wordmark }}@if (wordmarkAccent) {<span class="nav__wordmark-accent">{{ wordmarkAccent }}</span>}</span>
|
|
16086
16181
|
</a>
|
|
@@ -16125,7 +16220,7 @@ var SiteNavbarComponent = class SiteNavbarComponent {
|
|
|
16125
16220
|
<div class="nav__mobile">
|
|
16126
16221
|
<div class="nav__container nav__mobile-bar">
|
|
16127
16222
|
<a [href]="homeHref" class="nav__brand" translate="no">
|
|
16128
|
-
<span class="nav__logo" [
|
|
16223
|
+
<span class="nav__logo" [flrIconMarkup]="logo"></span>
|
|
16129
16224
|
<!-- prettier-ignore -->
|
|
16130
16225
|
<span class="nav__wordmark">{{ wordmark }}@if (wordmarkAccent) {<span class="nav__wordmark-accent">{{ wordmarkAccent }}</span>}</span>
|
|
16131
16226
|
</a>
|
|
@@ -16169,6 +16264,11 @@ var SiteNavbarComponent = class SiteNavbarComponent {
|
|
|
16169
16264
|
"current",
|
|
16170
16265
|
"label"
|
|
16171
16266
|
]
|
|
16267
|
+
}, {
|
|
16268
|
+
kind: "directive",
|
|
16269
|
+
type: IconMarkupDirective,
|
|
16270
|
+
selector: "[flrIconMarkup]",
|
|
16271
|
+
inputs: ["flrIconMarkup"]
|
|
16172
16272
|
}],
|
|
16173
16273
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
16174
16274
|
});
|
|
@@ -16184,13 +16284,13 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
16184
16284
|
args: [{
|
|
16185
16285
|
selector: "flr-site-navbar",
|
|
16186
16286
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16187
|
-
imports: [SiteLocalePickerComponent],
|
|
16287
|
+
imports: [SiteLocalePickerComponent, IconMarkupDirective],
|
|
16188
16288
|
host: { "(window:scroll)": "onScroll()" },
|
|
16189
16289
|
template: `
|
|
16190
16290
|
<header class="nav" [class.nav--scrolled]="scrolled()">
|
|
16191
16291
|
<div class="nav__container">
|
|
16192
16292
|
<a [href]="homeHref" class="nav__brand" translate="no">
|
|
16193
|
-
<span class="nav__logo" [
|
|
16293
|
+
<span class="nav__logo" [flrIconMarkup]="logo"></span>
|
|
16194
16294
|
<!-- prettier-ignore -->
|
|
16195
16295
|
<span class="nav__wordmark">{{ wordmark }}@if (wordmarkAccent) {<span class="nav__wordmark-accent">{{ wordmarkAccent }}</span>}</span>
|
|
16196
16296
|
</a>
|
|
@@ -16235,7 +16335,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
16235
16335
|
<div class="nav__mobile">
|
|
16236
16336
|
<div class="nav__container nav__mobile-bar">
|
|
16237
16337
|
<a [href]="homeHref" class="nav__brand" translate="no">
|
|
16238
|
-
<span class="nav__logo" [
|
|
16338
|
+
<span class="nav__logo" [flrIconMarkup]="logo"></span>
|
|
16239
16339
|
<!-- prettier-ignore -->
|
|
16240
16340
|
<span class="nav__wordmark">{{ wordmark }}@if (wordmarkAccent) {<span class="nav__wordmark-accent">{{ wordmarkAccent }}</span>}</span>
|
|
16241
16341
|
</a>
|
|
@@ -16275,8 +16375,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
16275
16375
|
var SiteFooterComponent = class SiteFooterComponent {
|
|
16276
16376
|
constructor() {
|
|
16277
16377
|
this.chrome = inject(SITE_CHROME);
|
|
16278
|
-
this.
|
|
16279
|
-
this.logo = this.sanitizer.bypassSecurityTrustHtml(isTrustedIconMarkup(this.chrome.logoSvg) ? this.chrome.logoSvg : "");
|
|
16378
|
+
this.logo = this.chrome.logoSvg;
|
|
16280
16379
|
this.wordmark = this.chrome.wordmark;
|
|
16281
16380
|
this.wordmarkAccent = this.chrome.wordmarkAccent ?? "";
|
|
16282
16381
|
this.locale = resolveSiteLocale(this.chrome, inject(LOCALE_ID));
|
|
@@ -16314,7 +16413,7 @@ var SiteFooterComponent = class SiteFooterComponent {
|
|
|
16314
16413
|
<div class="footer__grid">
|
|
16315
16414
|
<div class="footer__brand">
|
|
16316
16415
|
<div class="footer__brand-row" translate="no">
|
|
16317
|
-
<span class="footer__logo" [
|
|
16416
|
+
<span class="footer__logo" [flrIconMarkup]="logo"></span>
|
|
16318
16417
|
<!-- prettier-ignore -->
|
|
16319
16418
|
<span class="footer__wordmark">{{ wordmark }}@if (wordmarkAccent) {<span class="footer__wordmark-accent">{{ wordmarkAccent }}</span>}</span>
|
|
16320
16419
|
</div>
|
|
@@ -16359,6 +16458,12 @@ var SiteFooterComponent = class SiteFooterComponent {
|
|
|
16359
16458
|
`,
|
|
16360
16459
|
isInline: true,
|
|
16361
16460
|
styles: [".footer{padding:96px 0 48px;border-top:1px solid var(--paper-rule, var(--color-rule, rgba(30, 41, 59, .14)));background:var(--paper, var(--color-paper, #f8fafc));color:var(--paper-ink, var(--color-ink, #1e293b))}.footer__grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,2fr);gap:64px}.footer__brand-row{display:flex;align-items:center;gap:14px;color:var(--accent, #1e293b)}.footer__logo ::ng-deep svg{display:block;width:36px;height:36px}.footer__wordmark{font-family:var(--font-display, \"Fraunces\", Georgia, ui-serif, serif);font-weight:900;font-size:36px;letter-spacing:-.03em;color:var(--paper-ink, var(--color-ink, #1e293b))}.footer__wordmark-accent{color:var(--accent, #1e293b)}.footer__colophon{font-family:var(--font-display, \"Fraunces\", Georgia, ui-serif, serif);font-style:italic;font-size:18px;line-height:1.5;color:var(--paper-ink-2, var(--color-ink-2, #475569));margin:24px 0 0;max-width:380px}.footer__back{display:inline-flex;align-items:center;min-height:44px;margin-top:10px;font-size:12px;letter-spacing:.06em;color:var(--paper-ink-2, var(--color-ink-2, #475569));text-decoration:none;transition:color .16s ease}.footer__back:hover{color:var(--accent, #1e293b)}.footer__cols{display:grid;grid-template-columns:repeat(3,1fr);gap:24px}.footer__col-title{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--paper-ink-3, var(--color-ink-3, #64748b));margin-bottom:4px}.footer__col-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column}.footer__link{display:inline-flex;align-items:center;min-height:44px;font-size:14px;color:var(--paper-ink-2, var(--color-ink-2, #475569));text-decoration:none;transition:color .16s ease}.footer__link:hover{color:var(--paper-ink, var(--color-ink, #1e293b))}.footer__bottom{margin-top:80px;padding-top:24px;border-top:1px solid var(--paper-rule, var(--color-rule, rgba(30, 41, 59, .14)));display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px}.footer__bottom-text{font-size:11px;letter-spacing:.06em;color:var(--paper-ink-3, var(--color-ink-3, #64748b))}@media(max-width:880px){.footer__grid{grid-template-columns:1fr;gap:48px}.footer__cols{grid-template-columns:1fr 1fr}}\n"],
|
|
16461
|
+
dependencies: [{
|
|
16462
|
+
kind: "directive",
|
|
16463
|
+
type: IconMarkupDirective,
|
|
16464
|
+
selector: "[flrIconMarkup]",
|
|
16465
|
+
inputs: ["flrIconMarkup"]
|
|
16466
|
+
}],
|
|
16362
16467
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
16363
16468
|
});
|
|
16364
16469
|
}
|
|
@@ -16373,13 +16478,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
16373
16478
|
args: [{
|
|
16374
16479
|
selector: "flr-site-footer",
|
|
16375
16480
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16481
|
+
imports: [IconMarkupDirective],
|
|
16376
16482
|
template: `
|
|
16377
16483
|
<footer class="footer">
|
|
16378
16484
|
<div class="container">
|
|
16379
16485
|
<div class="footer__grid">
|
|
16380
16486
|
<div class="footer__brand">
|
|
16381
16487
|
<div class="footer__brand-row" translate="no">
|
|
16382
|
-
<span class="footer__logo" [
|
|
16488
|
+
<span class="footer__logo" [flrIconMarkup]="logo"></span>
|
|
16383
16489
|
<!-- prettier-ignore -->
|
|
16384
16490
|
<span class="footer__wordmark">{{ wordmark }}@if (wordmarkAccent) {<span class="footer__wordmark-accent">{{ wordmarkAccent }}</span>}</span>
|
|
16385
16491
|
</div>
|
|
@@ -19363,6 +19469,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
19363
19469
|
}]
|
|
19364
19470
|
}
|
|
19365
19471
|
});
|
|
19366
|
-
export { ACCESS_PICKER_LABELS_EN, ACCESS_PICKER_LABELS_FR, ALL_SITE_LOCALES, AccessPickerComponent, AnnotatedTextareaComponent, AppRailComponent, AppSwitcherComponent, AvatarComponent, BannerComponent, BarChartComponent, BrandDropdownComponent, ButtonComponent, CONTACT_FORM_LABELS_EN, CONTACT_FORM_LABELS_FR, CONTACT_KINDS, CONTACT_PRODUCTS, CardComponent, CardHeaderComponent, CheckboxComponent, ComboboxComponent, ComparisonTableComponent, ConnectionCardComponent, ContactFormComponent, ContainerComponent, CopyIconComponent, DEFAULT_APPS, DEFAULT_LOCALE, DEFAULT_PAGE_SIZE, DEFAULT_PAGINATION_LABELS, DEFAULT_USER_MENU_LABELS, DividerComponent, DrawerComponent, EmptyStateComponent, ErrorStateComponent, FieldComponent, InputComponent, LOCALE_CATALOG, LoadingStateComponent, LogoMarkComponent, MENU_FOCUSABLE, MenuComponent, MenuItemComponent, MenuLabelComponent, MenuSeparatorComponent, ModalComponent, MultiSelectComponent, PageHeaderComponent, PaginationComponent, ProgressBarComponent, ProjectSwitcherComponent, RadioComponent, RadioGroupComponent, RailToggleComponent, SHELL_CONTEXT, SITE_CHROME, SITE_LOCALES, SearchFieldComponent, SectionComponent, SegmentedComponent, SelectComponent, ShellComponent, SidebarComponent, SidebarItemComponent, SidebarSectionComponent, SiteCardComponent, SiteFooterComponent, SiteLocaleBannerComponent, SiteLocalePickerComponent, SiteNavbarComponent, SiteShellComponent, SiteSwitcherComponent, SkeletonComponent, SpinnerComponent, SplitterComponent, SplitterPaneComponent, StatComponent, StatusBarsComponent, SubmitComponent, SwitchComponent, THEME_STORAGE_KEY, TabComponent, TabsComponent, TagComponent, TextareaComponent, ThemeService, ToastContainerComponent, ToastService, TreeSelectComponent, UserMenuComponent, WAITLIST_FORM_LABELS_EN, WAITLIST_FORM_LABELS_FR, WaitlistFormComponent, accountUrl, brandApps, entitledApps, hiddenAppsFromPreferences, injectSitePath, isSiteLocale, localeBase, localeEntry, localeSwitchHref, marketingUrl, matchSiteLocale, orgCreateUrl, paged, provideSiteChrome, readContactPrefill, readRuntimeEnv, resolveLocale, resolveSiteLocale, runtimeUrl, siteLocales, stripLocalePrefix, switcherState, toLocaleOptions, userMenuItems, withHiddenApps, withLocaleBase };
|
|
19472
|
+
export { ACCESS_PICKER_LABELS_EN, ACCESS_PICKER_LABELS_FR, ALL_SITE_LOCALES, AccessPickerComponent, AnnotatedTextareaComponent, AppRailComponent, AppSwitcherComponent, AvatarComponent, BannerComponent, BarChartComponent, BrandDropdownComponent, ButtonComponent, CONTACT_FORM_LABELS_EN, CONTACT_FORM_LABELS_FR, CONTACT_KINDS, CONTACT_PRODUCTS, CardComponent, CardHeaderComponent, CheckboxComponent, ComboboxComponent, ComparisonTableComponent, ConnectionCardComponent, ContactFormComponent, ContainerComponent, CopyIconComponent, DEFAULT_APPS, DEFAULT_LOCALE, DEFAULT_PAGE_SIZE, DEFAULT_PAGINATION_LABELS, DEFAULT_USER_MENU_LABELS, DividerComponent, DrawerComponent, EmptyStateComponent, ErrorStateComponent, FieldComponent, InputComponent, LOCALE_CATALOG, LoadingStateComponent, LogoMarkComponent, MENU_FOCUSABLE, MenuComponent, MenuItemComponent, MenuLabelComponent, MenuSeparatorComponent, ModalComponent, MultiSelectComponent, PageHeaderComponent, PaginationComponent, ProgressBarComponent, ProjectSwitcherComponent, RadioComponent, RadioGroupComponent, RailToggleComponent, SHELL_CONTEXT, SITE_CHROME, SITE_LOCALES, SearchFieldComponent, SectionComponent, SegmentedComponent, SelectComponent, ShellComponent, SidebarComponent, SidebarItemComponent, SidebarSectionComponent, SiteCardComponent, SiteFooterComponent, SiteLocaleBannerComponent, SiteLocalePickerComponent, SiteNavbarComponent, SiteShellComponent, SiteSwitcherComponent, SkeletonComponent, SpinnerComponent, SplitterComponent, SplitterPaneComponent, StatComponent, StatusBarsComponent, SubmitComponent, SwitchComponent, THEME_PREPAINT_SCRIPT, THEME_STORAGE_KEY, TabComponent, TabsComponent, TagComponent, TextareaComponent, ThemeService, ToastContainerComponent, ToastService, TreeSelectComponent, UserMenuComponent, WAITLIST_FORM_LABELS_EN, WAITLIST_FORM_LABELS_FR, WaitlistFormComponent, accountUrl, brandApps, entitledApps, hiddenAppsFromPreferences, injectSitePath, isSiteLocale, localeBase, localeEntry, localeSwitchHref, marketingUrl, matchSiteLocale, orgCreateUrl, paged, provideSiteChrome, provideTheme, readContactPrefill, readRuntimeEnv, resolveLocale, resolveSiteLocale, runtimeUrl, siteLocales, stripLocalePrefix, switcherState, toLocaleOptions, userMenuItems, withHiddenApps, withLocaleBase };
|
|
19367
19473
|
|
|
19368
19474
|
//# sourceMappingURL=ferrlabs-ui-ng.mjs.map
|