@ferrlabs/ui-ng 1.44.3 → 1.44.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8202,6 +8202,42 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8202
8202
|
}]
|
|
8203
8203
|
}
|
|
8204
8204
|
});
|
|
8205
|
+
function parse(url) {
|
|
8206
|
+
const [path, query = ""] = url.split("#")[0].split("?");
|
|
8207
|
+
return {
|
|
8208
|
+
path,
|
|
8209
|
+
query: new URLSearchParams(query)
|
|
8210
|
+
};
|
|
8211
|
+
}
|
|
8212
|
+
function containsPath(current, target) {
|
|
8213
|
+
if (target === "/") return current === "/";
|
|
8214
|
+
return current === target || current.startsWith(`${target}/`);
|
|
8215
|
+
}
|
|
8216
|
+
function containsQuery(current, target) {
|
|
8217
|
+
for (const [key, value] of target) if (current.get(key) !== value) return false;
|
|
8218
|
+
return true;
|
|
8219
|
+
}
|
|
8220
|
+
function activeNavItemId(groups, currentUrl) {
|
|
8221
|
+
const current = parse(currentUrl);
|
|
8222
|
+
let bestId = null;
|
|
8223
|
+
let bestPathLength = -1;
|
|
8224
|
+
let bestQuerySize = -1;
|
|
8225
|
+
for (const group of groups) for (const item of group.items) {
|
|
8226
|
+
if (!item.href) continue;
|
|
8227
|
+
const target = parse(item.href);
|
|
8228
|
+
if (!containsPath(current.path, target.path)) continue;
|
|
8229
|
+
if (!containsQuery(current.query, target.query)) continue;
|
|
8230
|
+
const querySize = [...target.query].length;
|
|
8231
|
+
const longer = target.path.length > bestPathLength;
|
|
8232
|
+
const moreSpecific = target.path.length === bestPathLength && querySize > bestQuerySize;
|
|
8233
|
+
if (longer || moreSpecific) {
|
|
8234
|
+
bestId = item.id;
|
|
8235
|
+
bestPathLength = target.path.length;
|
|
8236
|
+
bestQuerySize = querySize;
|
|
8237
|
+
}
|
|
8238
|
+
}
|
|
8239
|
+
return bestId;
|
|
8240
|
+
}
|
|
8205
8241
|
const SHELL_CONTEXT = new InjectionToken("SHELL_CONTEXT");
|
|
8206
8242
|
var ShellComponent = class ShellComponent {
|
|
8207
8243
|
constructor() {
|
|
@@ -8216,13 +8252,10 @@ var ShellComponent = class ShellComponent {
|
|
|
8216
8252
|
this.navigate = output();
|
|
8217
8253
|
this.search = output();
|
|
8218
8254
|
this.sanitizer = inject(DomSanitizer);
|
|
8255
|
+
this.activeItemId = computed(() => activeNavItemId(this.sections(), this.currentPath()), ...ngDevMode ? [{ debugName: "activeItemId" }] : /* istanbul ignore next */ []);
|
|
8219
8256
|
}
|
|
8220
8257
|
isActive(item) {
|
|
8221
|
-
|
|
8222
|
-
if (!href) return false;
|
|
8223
|
-
const path = this.currentPath();
|
|
8224
|
-
if (href === "/") return path === "/";
|
|
8225
|
-
return path === href || path.startsWith(`${href}/`);
|
|
8258
|
+
return item.href !== void 0 && item.id === this.activeItemId();
|
|
8226
8259
|
}
|
|
8227
8260
|
onSelect(item) {
|
|
8228
8261
|
if (item.href) this.navigate.emit(item.href);
|
|
@@ -11652,7 +11685,7 @@ var ProjectSwitcherComponent = class ProjectSwitcherComponent {
|
|
|
11652
11685
|
}
|
|
11653
11686
|
`,
|
|
11654
11687
|
isInline: true,
|
|
11655
|
-
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: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}.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;font-size:12px;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 10px 10px}:host(.flr-ps--compact) .flr-ps__brand{justify-content:center;padding:8px}:host(.flr-ps--compact) .flr-ps__brand:hover{background:transparent}:host(.flr-ps--compact) .flr-ps__monogram{width:100%;height:100%;border-radius:12px;transition:background .14s ease}: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:10px}
|
|
11688
|
+
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: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}.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;font-size:12px;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 10px 10px}:host(.flr-ps--compact) .flr-ps__brand{justify-content:center;padding:8px}:host(.flr-ps--compact) .flr-ps__brand:hover{background:transparent}:host(.flr-ps--compact) .flr-ps__monogram{width:100%;height:100%;border-radius:12px;transition:background .14s ease}: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:10px}.flr-ps__monogram{display:flex;align-items:center;justify-content:center;width:34px;height:34px;flex:none;border-radius:10px;background:var(--color-app-bg-2, #f4f4f2);color:var(--color-ink, #1e293b);font-family:var(--font-display, \"Fraunces\", Georgia, ui-serif, serif);font-weight:700;font-size:15px}.flr-ps__trigger-icon,.flr-ps__item-icon{display:inline-flex;align-items:center;flex-shrink:0}.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:10px;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:6px;background:var(--color-app-bg-2, #f8fafc);color:var(--color-ink, #0f172a);outline:none;box-sizing:border-box}.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:6px;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:6px;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,:host(.flr-ps--compact) .flr-ps__monogram,.flr-ps__item,.flr-ps__footer-btn{transition:none}}\n"],
|
|
11656
11689
|
dependencies: [{
|
|
11657
11690
|
kind: "component",
|
|
11658
11691
|
type: SiteCardComponent,
|
|
@@ -11807,7 +11840,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
11807
11840
|
</div>
|
|
11808
11841
|
}
|
|
11809
11842
|
`,
|
|
11810
|
-
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: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}.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;font-size:12px;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 10px 10px}:host(.flr-ps--compact) .flr-ps__brand{justify-content:center;padding:8px}:host(.flr-ps--compact) .flr-ps__brand:hover{background:transparent}:host(.flr-ps--compact) .flr-ps__monogram{width:100%;height:100%;border-radius:12px;transition:background .14s ease}: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:10px}
|
|
11843
|
+
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: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}.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;font-size:12px;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 10px 10px}:host(.flr-ps--compact) .flr-ps__brand{justify-content:center;padding:8px}:host(.flr-ps--compact) .flr-ps__brand:hover{background:transparent}:host(.flr-ps--compact) .flr-ps__monogram{width:100%;height:100%;border-radius:12px;transition:background .14s ease}: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:10px}.flr-ps__monogram{display:flex;align-items:center;justify-content:center;width:34px;height:34px;flex:none;border-radius:10px;background:var(--color-app-bg-2, #f4f4f2);color:var(--color-ink, #1e293b);font-family:var(--font-display, \"Fraunces\", Georgia, ui-serif, serif);font-weight:700;font-size:15px}.flr-ps__trigger-icon,.flr-ps__item-icon{display:inline-flex;align-items:center;flex-shrink:0}.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:10px;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:6px;background:var(--color-app-bg-2, #f8fafc);color:var(--color-ink, #0f172a);outline:none;box-sizing:border-box}.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:6px;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:6px;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,:host(.flr-ps--compact) .flr-ps__monogram,.flr-ps__item,.flr-ps__footer-btn{transition:none}}\n"]
|
|
11811
11844
|
}]
|
|
11812
11845
|
}],
|
|
11813
11846
|
ctorParameters: () => [],
|