orbiq-neural-ui-kit 0.0.3 → 0.0.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, output, computed, Component, signal, model, effect, ViewChild, Directive, EventEmitter, ContentChild, Output, HostListener, Input, InjectionToken, Optional, Inject, ContentChildren, ViewChildren, inject, Injectable, ViewContainerRef, ElementRef } from '@angular/core';
|
|
2
|
+
import { input, output, computed, Component, signal, model, effect, ViewChild, Directive, EventEmitter, ContentChild, Output, HostListener, Input, InjectionToken, Optional, Inject, ContentChildren, ViewChildren, inject, forwardRef, Injectable, ViewContainerRef, ElementRef } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1$1 from '@angular/cdk/overlay';
|
|
@@ -1728,7 +1728,7 @@ class NeuralPopoverPanelComponent {
|
|
|
1728
1728
|
data-slot="content-body"
|
|
1729
1729
|
data-panel
|
|
1730
1730
|
data-motion="instant"
|
|
1731
|
-
class="overflow-hidden rounded-6 bg-surface-elevation-2 shadow-2xl ring-1 ring-black
|
|
1731
|
+
class="overflow-hidden rounded-6 bg-surface-elevation-2 shadow-2xl ring-1 ring-black/5 will-change-[opacity]"
|
|
1732
1732
|
>
|
|
1733
1733
|
<ng-content></ng-content>
|
|
1734
1734
|
</div>
|
|
@@ -1744,7 +1744,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
1744
1744
|
data-slot="content-body"
|
|
1745
1745
|
data-panel
|
|
1746
1746
|
data-motion="instant"
|
|
1747
|
-
class="overflow-hidden rounded-6 bg-surface-elevation-2 shadow-2xl ring-1 ring-black
|
|
1747
|
+
class="overflow-hidden rounded-6 bg-surface-elevation-2 shadow-2xl ring-1 ring-black/5 will-change-[opacity]"
|
|
1748
1748
|
>
|
|
1749
1749
|
<ng-content></ng-content>
|
|
1750
1750
|
</div>
|
|
@@ -5908,106 +5908,129 @@ class NeuralSidebarItemComponent {
|
|
|
5908
5908
|
...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
5909
5909
|
suffix = input('', /* @ts-ignore */
|
|
5910
5910
|
...(ngDevMode ? [{ debugName: "suffix" }] : /* istanbul ignore next */ []));
|
|
5911
|
+
children = input([], /* @ts-ignore */
|
|
5912
|
+
...(ngDevMode ? [{ debugName: "children" }] : /* istanbul ignore next */ []));
|
|
5911
5913
|
hasPrefixSlot = input(false, /* @ts-ignore */
|
|
5912
5914
|
...(ngDevMode ? [{ debugName: "hasPrefixSlot" }] : /* istanbul ignore next */ []));
|
|
5913
5915
|
hasDefaultSlot = input(false, /* @ts-ignore */
|
|
5914
5916
|
...(ngDevMode ? [{ debugName: "hasDefaultSlot" }] : /* istanbul ignore next */ []));
|
|
5915
5917
|
hasSuffixSlot = input(false, /* @ts-ignore */
|
|
5916
5918
|
...(ngDevMode ? [{ debugName: "hasSuffixSlot" }] : /* istanbul ignore next */ []));
|
|
5919
|
+
isExpanded = signal(false, /* @ts-ignore */
|
|
5920
|
+
...(ngDevMode ? [{ debugName: "isExpanded" }] : /* istanbul ignore next */ []));
|
|
5917
5921
|
router = inject(Router, { optional: true });
|
|
5918
5922
|
sidebar = inject(NeuralSidebarComponent, { optional: true });
|
|
5919
5923
|
isCollapsed = computed(() => {
|
|
5920
5924
|
return this.sidebar ? this.sidebar.shouldCollapse() : false;
|
|
5921
5925
|
}, /* @ts-ignore */
|
|
5922
5926
|
...(ngDevMode ? [{ debugName: "isCollapsed" }] : /* istanbul ignore next */ []));
|
|
5927
|
+
hasChildren = computed(() => {
|
|
5928
|
+
return this.children() && this.children().length > 0;
|
|
5929
|
+
}, /* @ts-ignore */
|
|
5930
|
+
...(ngDevMode ? [{ debugName: "hasChildren" }] : /* istanbul ignore next */ []));
|
|
5923
5931
|
tooltipText = computed(() => this.label(), /* @ts-ignore */
|
|
5924
5932
|
...(ngDevMode ? [{ debugName: "tooltipText" }] : /* istanbul ignore next */ []));
|
|
5925
5933
|
resolvedActive = computed(() => {
|
|
5926
5934
|
if (this.active() !== undefined)
|
|
5927
5935
|
return this.active();
|
|
5936
|
+
// Check if any child is active
|
|
5937
|
+
if (this.hasChildren()) {
|
|
5938
|
+
return this.children().some(child => {
|
|
5939
|
+
if (child.active)
|
|
5940
|
+
return true;
|
|
5941
|
+
if (child.to && this.router) {
|
|
5942
|
+
return this.router.isActive(child.to, { paths: 'exact', queryParams: 'ignored', fragment: 'ignored', matrixParams: 'ignored' });
|
|
5943
|
+
}
|
|
5944
|
+
return false;
|
|
5945
|
+
});
|
|
5946
|
+
}
|
|
5928
5947
|
if (!this.to() || !this.router)
|
|
5929
5948
|
return false;
|
|
5930
5949
|
return this.router.isActive(this.to(), { paths: 'exact', queryParams: 'ignored', fragment: 'ignored', matrixParams: 'ignored' });
|
|
5931
5950
|
}, /* @ts-ignore */
|
|
5932
5951
|
...(ngDevMode ? [{ debugName: "resolvedActive" }] : /* istanbul ignore next */ []));
|
|
5933
5952
|
handleClick(event) {
|
|
5934
|
-
|
|
5953
|
+
if (this.hasChildren()) {
|
|
5954
|
+
event.preventDefault();
|
|
5955
|
+
this.isExpanded.set(!this.isExpanded());
|
|
5956
|
+
}
|
|
5935
5957
|
}
|
|
5936
5958
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralSidebarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5937
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralSidebarItemComponent, isStandalone: true, selector: "neural-sidebar-item", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, to: { classPropertyName: "to", publicName: "to", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, hasPrefixSlot: { classPropertyName: "hasPrefixSlot", publicName: "hasPrefixSlot", isSignal: true, isRequired: false, transformFunction: null }, hasDefaultSlot: { classPropertyName: "hasDefaultSlot", publicName: "hasDefaultSlot", isSignal: true, isRequired: false, transformFunction: null }, hasSuffixSlot: { classPropertyName: "hasSuffixSlot", publicName: "hasSuffixSlot", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
5938
|
-
<div
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
<span class="grid shrink-0 place-items-center">
|
|
5959
|
-
<ng-content select="[prefix]"></ng-content>
|
|
5960
|
-
@if (!hasPrefixSlot() && icon()) {
|
|
5961
|
-
<span [class]="icon() + ' size-4'"></span>
|
|
5962
|
-
}
|
|
5963
|
-
</span>
|
|
5964
|
-
<span
|
|
5965
|
-
class="min-w-0 flex-1 transition-all ease-in-out"
|
|
5966
|
-
[class]="
|
|
5967
|
-
isCollapsed()
|
|
5968
|
-
? 'ml-0 w-0 overflow-hidden opacity-0'
|
|
5969
|
-
: 'ml-2 w-auto opacity-100'
|
|
5970
|
-
"
|
|
5959
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralSidebarItemComponent, isStandalone: true, selector: "neural-sidebar-item", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, to: { classPropertyName: "to", publicName: "to", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, children: { classPropertyName: "children", publicName: "children", isSignal: true, isRequired: false, transformFunction: null }, hasPrefixSlot: { classPropertyName: "hasPrefixSlot", publicName: "hasPrefixSlot", isSignal: true, isRequired: false, transformFunction: null }, hasDefaultSlot: { classPropertyName: "hasDefaultSlot", publicName: "hasDefaultSlot", isSignal: true, isRequired: false, transformFunction: null }, hasSuffixSlot: { classPropertyName: "hasSuffixSlot", publicName: "hasSuffixSlot", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
5960
|
+
<div class="flex flex-col">
|
|
5961
|
+
<div
|
|
5962
|
+
data-slot="sidebar-item"
|
|
5963
|
+
[attr.data-state]="resolvedActive() ? 'active' : 'inactive'"
|
|
5964
|
+
class="group/sidebar-item flex h-8 items-center rounded-4 transition-colors cursor-pointer"
|
|
5965
|
+
[class]="
|
|
5966
|
+
resolvedActive()
|
|
5967
|
+
? 'bg-surface-gray-3 text-ink-gray-9 font-medium'
|
|
5968
|
+
: 'text-ink-gray-7 hover:bg-surface-gray-2'
|
|
5969
|
+
"
|
|
5970
|
+
>
|
|
5971
|
+
@if (to() && !hasChildren()) {
|
|
5972
|
+
<a
|
|
5973
|
+
[routerLink]="to()"
|
|
5974
|
+
routerLinkActive="active"
|
|
5975
|
+
#rla="routerLinkActive"
|
|
5976
|
+
[attr.aria-label]="tooltipText() || undefined"
|
|
5977
|
+
[attr.aria-current]="resolvedActive() ? 'page' : undefined"
|
|
5978
|
+
class="flex h-full min-w-0 flex-1 items-center rounded-4 pl-2 focus-visible:ring-0 focus-visible:focus-ring"
|
|
5979
|
+
(click)="handleClick($event)"
|
|
5971
5980
|
>
|
|
5972
|
-
<
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
} @else {
|
|
5981
|
-
<button
|
|
5982
|
-
type="button"
|
|
5983
|
-
[attr.aria-label]="tooltipText() || undefined"
|
|
5984
|
-
class="flex h-full text-left min-w-0 flex-1 items-center rounded-4 pl-2 focus-visible:ring-0 focus-visible:focus-ring"
|
|
5985
|
-
(click)="handleClick($event)"
|
|
5986
|
-
>
|
|
5987
|
-
<span class="grid shrink-0 place-items-center">
|
|
5988
|
-
<ng-content select="[prefix]"></ng-content>
|
|
5989
|
-
@if (!hasPrefixSlot() && icon()) {
|
|
5990
|
-
<span [class]="icon() + ' size-4'"></span>
|
|
5991
|
-
}
|
|
5992
|
-
</span>
|
|
5993
|
-
<span
|
|
5994
|
-
class="min-w-0 flex-1 transition-all ease-in-out"
|
|
5995
|
-
[class]="
|
|
5996
|
-
isCollapsed()
|
|
5997
|
-
? 'ml-0 w-0 overflow-hidden opacity-0'
|
|
5998
|
-
: 'ml-2 w-auto opacity-100'
|
|
5999
|
-
"
|
|
5981
|
+
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
|
|
5982
|
+
</a>
|
|
5983
|
+
} @else {
|
|
5984
|
+
<button
|
|
5985
|
+
type="button"
|
|
5986
|
+
[attr.aria-label]="tooltipText() || undefined"
|
|
5987
|
+
class="flex h-full text-left min-w-0 flex-1 items-center rounded-4 pl-2 focus-visible:ring-0 focus-visible:focus-ring"
|
|
5988
|
+
(click)="handleClick($event)"
|
|
6000
5989
|
>
|
|
6001
|
-
<
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
5990
|
+
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
|
|
5991
|
+
</button>
|
|
5992
|
+
}
|
|
5993
|
+
</div>
|
|
5994
|
+
|
|
5995
|
+
<!-- Nested Children -->
|
|
5996
|
+
@if (hasChildren() && !isCollapsed() && isExpanded()) {
|
|
5997
|
+
<div class="flex flex-col pl-6 mt-0.5 space-y-0.5">
|
|
5998
|
+
@for (child of children(); track child.label) {
|
|
5999
|
+
<neural-sidebar-item
|
|
6000
|
+
[label]="child.label"
|
|
6001
|
+
[icon]="child.icon || ''"
|
|
6002
|
+
[to]="child.to"
|
|
6003
|
+
[active]="child.active"
|
|
6004
|
+
[children]="child.children || []">
|
|
6005
|
+
</neural-sidebar-item>
|
|
6006
|
+
}
|
|
6007
|
+
</div>
|
|
6009
6008
|
}
|
|
6010
|
-
|
|
6009
|
+
</div>
|
|
6010
|
+
|
|
6011
|
+
<!-- Content Template to avoid duplication -->
|
|
6012
|
+
<ng-template #itemContent>
|
|
6013
|
+
<span class="grid shrink-0 place-items-center">
|
|
6014
|
+
<ng-content select="[prefix]"></ng-content>
|
|
6015
|
+
@if (!hasPrefixSlot() && icon()) {
|
|
6016
|
+
<span [class]="icon() + ' size-4.5'"></span>
|
|
6017
|
+
}
|
|
6018
|
+
</span>
|
|
6019
|
+
<span
|
|
6020
|
+
class="min-w-0 flex-1 transition-all ease-in-out"
|
|
6021
|
+
[class]="
|
|
6022
|
+
isCollapsed()
|
|
6023
|
+
? 'ml-0 w-0 overflow-hidden opacity-0'
|
|
6024
|
+
: 'ml-2 w-auto opacity-100'
|
|
6025
|
+
"
|
|
6026
|
+
>
|
|
6027
|
+
<span class="flex min-w-0 items-center">
|
|
6028
|
+
<ng-content></ng-content>
|
|
6029
|
+
@if (!hasDefaultSlot() && label()) {
|
|
6030
|
+
<span class="truncate text-[13px] tracking-wide">{{ label() }}</span>
|
|
6031
|
+
}
|
|
6032
|
+
</span>
|
|
6033
|
+
</span>
|
|
6011
6034
|
<div
|
|
6012
6035
|
data-slot="sidebar-item-suffix"
|
|
6013
6036
|
class="flex shrink-0 items-center transition-all ease-in-out"
|
|
@@ -6015,92 +6038,98 @@ class NeuralSidebarItemComponent {
|
|
|
6015
6038
|
>
|
|
6016
6039
|
<ng-content select="[suffix]"></ng-content>
|
|
6017
6040
|
@if (!hasSuffixSlot() && suffix()) {
|
|
6018
|
-
<span class="mr-2 text-
|
|
6041
|
+
<span class="mr-2 text-xs text-ink-gray-4">{{ suffix() }}</span>
|
|
6042
|
+
}
|
|
6043
|
+
@if (hasChildren()) {
|
|
6044
|
+
<span class="mr-2 transition-transform duration-200" [class.rotate-90]="isExpanded()">
|
|
6045
|
+
<span class="lucide-chevron-right size-3.5 text-ink-gray-4 group-hover/sidebar-item:text-ink-gray-6"></span>
|
|
6046
|
+
</span>
|
|
6019
6047
|
}
|
|
6020
6048
|
</div>
|
|
6021
|
-
</
|
|
6022
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: i1$2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
|
|
6049
|
+
</ng-template>
|
|
6050
|
+
`, isInline: true, dependencies: [{ kind: "component", type: i0.forwardRef(() => NeuralSidebarItemComponent), selector: "neural-sidebar-item", inputs: ["label", "icon", "to", "active", "suffix", "children", "hasPrefixSlot", "hasDefaultSlot", "hasSuffixSlot"] }, { kind: "ngmodule", type: i0.forwardRef(() => CommonModule) }, { kind: "directive", type: i0.forwardRef(() => i1.NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: i0.forwardRef(() => RouterModule) }, { kind: "directive", type: i0.forwardRef(() => i1$2.RouterLink), selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: i0.forwardRef(() => i1$2.RouterLinkActive), selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
|
|
6023
6051
|
}
|
|
6024
6052
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralSidebarItemComponent, decorators: [{
|
|
6025
6053
|
type: Component,
|
|
6026
6054
|
args: [{
|
|
6027
6055
|
selector: 'neural-sidebar-item',
|
|
6028
6056
|
standalone: true,
|
|
6029
|
-
imports: [CommonModule, RouterModule],
|
|
6057
|
+
imports: [CommonModule, RouterModule, forwardRef(() => NeuralSidebarItemComponent)],
|
|
6030
6058
|
template: `
|
|
6031
|
-
<div
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
<span class="grid shrink-0 place-items-center">
|
|
6052
|
-
<ng-content select="[prefix]"></ng-content>
|
|
6053
|
-
@if (!hasPrefixSlot() && icon()) {
|
|
6054
|
-
<span [class]="icon() + ' size-4'"></span>
|
|
6055
|
-
}
|
|
6056
|
-
</span>
|
|
6057
|
-
<span
|
|
6058
|
-
class="min-w-0 flex-1 transition-all ease-in-out"
|
|
6059
|
-
[class]="
|
|
6060
|
-
isCollapsed()
|
|
6061
|
-
? 'ml-0 w-0 overflow-hidden opacity-0'
|
|
6062
|
-
: 'ml-2 w-auto opacity-100'
|
|
6063
|
-
"
|
|
6059
|
+
<div class="flex flex-col">
|
|
6060
|
+
<div
|
|
6061
|
+
data-slot="sidebar-item"
|
|
6062
|
+
[attr.data-state]="resolvedActive() ? 'active' : 'inactive'"
|
|
6063
|
+
class="group/sidebar-item flex h-8 items-center rounded-4 transition-colors cursor-pointer"
|
|
6064
|
+
[class]="
|
|
6065
|
+
resolvedActive()
|
|
6066
|
+
? 'bg-surface-gray-3 text-ink-gray-9 font-medium'
|
|
6067
|
+
: 'text-ink-gray-7 hover:bg-surface-gray-2'
|
|
6068
|
+
"
|
|
6069
|
+
>
|
|
6070
|
+
@if (to() && !hasChildren()) {
|
|
6071
|
+
<a
|
|
6072
|
+
[routerLink]="to()"
|
|
6073
|
+
routerLinkActive="active"
|
|
6074
|
+
#rla="routerLinkActive"
|
|
6075
|
+
[attr.aria-label]="tooltipText() || undefined"
|
|
6076
|
+
[attr.aria-current]="resolvedActive() ? 'page' : undefined"
|
|
6077
|
+
class="flex h-full min-w-0 flex-1 items-center rounded-4 pl-2 focus-visible:ring-0 focus-visible:focus-ring"
|
|
6078
|
+
(click)="handleClick($event)"
|
|
6064
6079
|
>
|
|
6065
|
-
<
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6073
|
-
} @else {
|
|
6074
|
-
<button
|
|
6075
|
-
type="button"
|
|
6076
|
-
[attr.aria-label]="tooltipText() || undefined"
|
|
6077
|
-
class="flex h-full text-left min-w-0 flex-1 items-center rounded-4 pl-2 focus-visible:ring-0 focus-visible:focus-ring"
|
|
6078
|
-
(click)="handleClick($event)"
|
|
6079
|
-
>
|
|
6080
|
-
<span class="grid shrink-0 place-items-center">
|
|
6081
|
-
<ng-content select="[prefix]"></ng-content>
|
|
6082
|
-
@if (!hasPrefixSlot() && icon()) {
|
|
6083
|
-
<span [class]="icon() + ' size-4'"></span>
|
|
6084
|
-
}
|
|
6085
|
-
</span>
|
|
6086
|
-
<span
|
|
6087
|
-
class="min-w-0 flex-1 transition-all ease-in-out"
|
|
6088
|
-
[class]="
|
|
6089
|
-
isCollapsed()
|
|
6090
|
-
? 'ml-0 w-0 overflow-hidden opacity-0'
|
|
6091
|
-
: 'ml-2 w-auto opacity-100'
|
|
6092
|
-
"
|
|
6080
|
+
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
|
|
6081
|
+
</a>
|
|
6082
|
+
} @else {
|
|
6083
|
+
<button
|
|
6084
|
+
type="button"
|
|
6085
|
+
[attr.aria-label]="tooltipText() || undefined"
|
|
6086
|
+
class="flex h-full text-left min-w-0 flex-1 items-center rounded-4 pl-2 focus-visible:ring-0 focus-visible:focus-ring"
|
|
6087
|
+
(click)="handleClick($event)"
|
|
6093
6088
|
>
|
|
6094
|
-
<
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6089
|
+
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
|
|
6090
|
+
</button>
|
|
6091
|
+
}
|
|
6092
|
+
</div>
|
|
6093
|
+
|
|
6094
|
+
<!-- Nested Children -->
|
|
6095
|
+
@if (hasChildren() && !isCollapsed() && isExpanded()) {
|
|
6096
|
+
<div class="flex flex-col pl-6 mt-0.5 space-y-0.5">
|
|
6097
|
+
@for (child of children(); track child.label) {
|
|
6098
|
+
<neural-sidebar-item
|
|
6099
|
+
[label]="child.label"
|
|
6100
|
+
[icon]="child.icon || ''"
|
|
6101
|
+
[to]="child.to"
|
|
6102
|
+
[active]="child.active"
|
|
6103
|
+
[children]="child.children || []">
|
|
6104
|
+
</neural-sidebar-item>
|
|
6105
|
+
}
|
|
6106
|
+
</div>
|
|
6102
6107
|
}
|
|
6103
|
-
|
|
6108
|
+
</div>
|
|
6109
|
+
|
|
6110
|
+
<!-- Content Template to avoid duplication -->
|
|
6111
|
+
<ng-template #itemContent>
|
|
6112
|
+
<span class="grid shrink-0 place-items-center">
|
|
6113
|
+
<ng-content select="[prefix]"></ng-content>
|
|
6114
|
+
@if (!hasPrefixSlot() && icon()) {
|
|
6115
|
+
<span [class]="icon() + ' size-4.5'"></span>
|
|
6116
|
+
}
|
|
6117
|
+
</span>
|
|
6118
|
+
<span
|
|
6119
|
+
class="min-w-0 flex-1 transition-all ease-in-out"
|
|
6120
|
+
[class]="
|
|
6121
|
+
isCollapsed()
|
|
6122
|
+
? 'ml-0 w-0 overflow-hidden opacity-0'
|
|
6123
|
+
: 'ml-2 w-auto opacity-100'
|
|
6124
|
+
"
|
|
6125
|
+
>
|
|
6126
|
+
<span class="flex min-w-0 items-center">
|
|
6127
|
+
<ng-content></ng-content>
|
|
6128
|
+
@if (!hasDefaultSlot() && label()) {
|
|
6129
|
+
<span class="truncate text-[13px] tracking-wide">{{ label() }}</span>
|
|
6130
|
+
}
|
|
6131
|
+
</span>
|
|
6132
|
+
</span>
|
|
6104
6133
|
<div
|
|
6105
6134
|
data-slot="sidebar-item-suffix"
|
|
6106
6135
|
class="flex shrink-0 items-center transition-all ease-in-out"
|
|
@@ -6108,13 +6137,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
6108
6137
|
>
|
|
6109
6138
|
<ng-content select="[suffix]"></ng-content>
|
|
6110
6139
|
@if (!hasSuffixSlot() && suffix()) {
|
|
6111
|
-
<span class="mr-2 text-
|
|
6140
|
+
<span class="mr-2 text-xs text-ink-gray-4">{{ suffix() }}</span>
|
|
6141
|
+
}
|
|
6142
|
+
@if (hasChildren()) {
|
|
6143
|
+
<span class="mr-2 transition-transform duration-200" [class.rotate-90]="isExpanded()">
|
|
6144
|
+
<span class="lucide-chevron-right size-3.5 text-ink-gray-4 group-hover/sidebar-item:text-ink-gray-6"></span>
|
|
6145
|
+
</span>
|
|
6112
6146
|
}
|
|
6113
6147
|
</div>
|
|
6114
|
-
</
|
|
6148
|
+
</ng-template>
|
|
6115
6149
|
`
|
|
6116
6150
|
}]
|
|
6117
|
-
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], to: [{ type: i0.Input, args: [{ isSignal: true, alias: "to", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], suffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffix", required: false }] }], hasPrefixSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasPrefixSlot", required: false }] }], hasDefaultSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasDefaultSlot", required: false }] }], hasSuffixSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasSuffixSlot", required: false }] }] } });
|
|
6151
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], to: [{ type: i0.Input, args: [{ isSignal: true, alias: "to", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], suffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffix", required: false }] }], children: [{ type: i0.Input, args: [{ isSignal: true, alias: "children", required: false }] }], hasPrefixSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasPrefixSlot", required: false }] }], hasDefaultSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasDefaultSlot", required: false }] }], hasSuffixSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasSuffixSlot", required: false }] }] } });
|
|
6118
6152
|
|
|
6119
6153
|
class ToastService {
|
|
6120
6154
|
overlay;
|
|
@@ -8779,13 +8813,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
8779
8813
|
}] });
|
|
8780
8814
|
|
|
8781
8815
|
class NeuralPageHeaderComponent {
|
|
8816
|
+
title = input('', /* @ts-ignore */
|
|
8817
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
8818
|
+
subtitle = input('', /* @ts-ignore */
|
|
8819
|
+
...(ngDevMode ? [{ debugName: "subtitle" }] : /* istanbul ignore next */ []));
|
|
8782
8820
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralPageHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8783
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
8784
|
-
<header
|
|
8785
|
-
class="z-10 flex min-h-12 flex-col justify-center border-b border-outline-gray-2 bg-surface-base px-3 sm:px-5"
|
|
8786
|
-
>
|
|
8821
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralPageHeaderComponent, isStandalone: true, selector: "neural-page-header", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
8822
|
+
<header class="z-10 flex min-h-[56px] flex-col justify-center border-b border-outline-gray-2 bg-surface-base px-4 sm:px-6">
|
|
8787
8823
|
<div class="flex items-center justify-between">
|
|
8788
|
-
|
|
8824
|
+
|
|
8825
|
+
<!-- Left Side (Title & Slots) -->
|
|
8826
|
+
<div class="flex items-center gap-3">
|
|
8827
|
+
<ng-content select="[left]"></ng-content>
|
|
8828
|
+
|
|
8829
|
+
<div class="flex flex-col">
|
|
8830
|
+
@if (title()) {
|
|
8831
|
+
<h2 class="text-base font-semibold text-ink-gray-9 tracking-tight">{{ title() }}</h2>
|
|
8832
|
+
}
|
|
8833
|
+
@if (subtitle()) {
|
|
8834
|
+
<span class="text-xs text-ink-gray-5">{{ subtitle() }}</span>
|
|
8835
|
+
}
|
|
8836
|
+
</div>
|
|
8837
|
+
</div>
|
|
8838
|
+
|
|
8839
|
+
<!-- Right Side (Actions & Slots) -->
|
|
8840
|
+
<div class="flex items-center gap-2">
|
|
8841
|
+
<ng-content select="[right]"></ng-content>
|
|
8842
|
+
</div>
|
|
8843
|
+
|
|
8789
8844
|
</div>
|
|
8790
8845
|
</header>
|
|
8791
8846
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
@@ -8797,16 +8852,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
8797
8852
|
standalone: true,
|
|
8798
8853
|
imports: [CommonModule],
|
|
8799
8854
|
template: `
|
|
8800
|
-
<header
|
|
8801
|
-
class="z-10 flex min-h-12 flex-col justify-center border-b border-outline-gray-2 bg-surface-base px-3 sm:px-5"
|
|
8802
|
-
>
|
|
8855
|
+
<header class="z-10 flex min-h-[56px] flex-col justify-center border-b border-outline-gray-2 bg-surface-base px-4 sm:px-6">
|
|
8803
8856
|
<div class="flex items-center justify-between">
|
|
8804
|
-
|
|
8857
|
+
|
|
8858
|
+
<!-- Left Side (Title & Slots) -->
|
|
8859
|
+
<div class="flex items-center gap-3">
|
|
8860
|
+
<ng-content select="[left]"></ng-content>
|
|
8861
|
+
|
|
8862
|
+
<div class="flex flex-col">
|
|
8863
|
+
@if (title()) {
|
|
8864
|
+
<h2 class="text-base font-semibold text-ink-gray-9 tracking-tight">{{ title() }}</h2>
|
|
8865
|
+
}
|
|
8866
|
+
@if (subtitle()) {
|
|
8867
|
+
<span class="text-xs text-ink-gray-5">{{ subtitle() }}</span>
|
|
8868
|
+
}
|
|
8869
|
+
</div>
|
|
8870
|
+
</div>
|
|
8871
|
+
|
|
8872
|
+
<!-- Right Side (Actions & Slots) -->
|
|
8873
|
+
<div class="flex items-center gap-2">
|
|
8874
|
+
<ng-content select="[right]"></ng-content>
|
|
8875
|
+
</div>
|
|
8876
|
+
|
|
8805
8877
|
</div>
|
|
8806
8878
|
</header>
|
|
8807
8879
|
`
|
|
8808
8880
|
}]
|
|
8809
|
-
}] });
|
|
8881
|
+
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], subtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subtitle", required: false }] }] } });
|
|
8810
8882
|
|
|
8811
8883
|
class NeuralRailComponent {
|
|
8812
8884
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralRailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -12327,7 +12399,7 @@ class NeuralListViewComponent {
|
|
|
12327
12399
|
@if (rows().length) {
|
|
12328
12400
|
@for (row of rows(); track row[rowKey()]) {
|
|
12329
12401
|
<div
|
|
12330
|
-
class="flex border-b border-outline-gray-1 hover:bg-surface-gray-
|
|
12402
|
+
class="flex border-b border-outline-gray-1 hover:bg-surface-gray-2 transition-colors duration-100 cursor-pointer"
|
|
12331
12403
|
[style.height.px]="resolvedOptions().rowHeight || 40"
|
|
12332
12404
|
[class.bg-surface-gray-2]="isSelected(row)"
|
|
12333
12405
|
(click)="onRowClick(row)"
|
|
@@ -12336,7 +12408,7 @@ class NeuralListViewComponent {
|
|
|
12336
12408
|
<div class="flex w-9 shrink-0 items-center justify-center p-2">
|
|
12337
12409
|
<input
|
|
12338
12410
|
type="checkbox"
|
|
12339
|
-
class="
|
|
12411
|
+
class="form-checkbox"
|
|
12340
12412
|
[checked]="isSelected(row)"
|
|
12341
12413
|
(change)="$event.stopPropagation(); toggleRow(row)"
|
|
12342
12414
|
/>
|
|
@@ -12428,7 +12500,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
12428
12500
|
@if (rows().length) {
|
|
12429
12501
|
@for (row of rows(); track row[rowKey()]) {
|
|
12430
12502
|
<div
|
|
12431
|
-
class="flex border-b border-outline-gray-1 hover:bg-surface-gray-
|
|
12503
|
+
class="flex border-b border-outline-gray-1 hover:bg-surface-gray-2 transition-colors duration-100 cursor-pointer"
|
|
12432
12504
|
[style.height.px]="resolvedOptions().rowHeight || 40"
|
|
12433
12505
|
[class.bg-surface-gray-2]="isSelected(row)"
|
|
12434
12506
|
(click)="onRowClick(row)"
|
|
@@ -12437,7 +12509,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
12437
12509
|
<div class="flex w-9 shrink-0 items-center justify-center p-2">
|
|
12438
12510
|
<input
|
|
12439
12511
|
type="checkbox"
|
|
12440
|
-
class="
|
|
12512
|
+
class="form-checkbox"
|
|
12441
12513
|
[checked]="isSelected(row)"
|
|
12442
12514
|
(change)="$event.stopPropagation(); toggleRow(row)"
|
|
12443
12515
|
/>
|