codexly-ui 0.0.13 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/codexly-ui.mjs +27 -30
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/index.d.ts +11 -10
- package/package.json +1 -1
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -10880,24 +10880,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
10880
10880
|
args: [ClxStepComponent]
|
|
10881
10881
|
}] } });
|
|
10882
10882
|
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
|
|
10890
|
-
|
|
10891
|
-
const NAV_CHILDREN_WRAPPER = 'grid transition-all duration-300 ease-in-out';
|
|
10892
|
-
const NAV_CHILDREN_INNER = 'overflow-hidden';
|
|
10893
|
-
const NAV_CHILDREN_LIST = 'ml-6 border-l border-slate-700/60 py-1 space-y-0.5';
|
|
10883
|
+
class ClxLayoutService {
|
|
10884
|
+
collapsed = signal(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : []));
|
|
10885
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ClxLayoutService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
10886
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ClxLayoutService });
|
|
10887
|
+
}
|
|
10888
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ClxLayoutService, decorators: [{
|
|
10889
|
+
type: Injectable
|
|
10890
|
+
}] });
|
|
10894
10891
|
|
|
10895
10892
|
class ClxAppLayoutComponent {
|
|
10896
10893
|
_zone = inject(NgZone);
|
|
10897
10894
|
_document = inject(DOCUMENT);
|
|
10895
|
+
_layout = inject(ClxLayoutService);
|
|
10898
10896
|
activeColor = input('indigo', ...(ngDevMode ? [{ debugName: "activeColor" }] : []));
|
|
10899
10897
|
_sidebarOpen = signal(false, ...(ngDevMode ? [{ debugName: "_sidebarOpen" }] : []));
|
|
10900
|
-
_collapsed =
|
|
10898
|
+
_collapsed = this._layout.collapsed;
|
|
10901
10899
|
_isMobile = signal(true, ...(ngDevMode ? [{ debugName: "_isMobile" }] : []));
|
|
10902
10900
|
_showBackdrop = computed(() => this._sidebarOpen() && this._isMobile(), ...(ngDevMode ? [{ debugName: "_showBackdrop" }] : []));
|
|
10903
10901
|
_sidebarCls = computed(() => {
|
|
@@ -10943,13 +10941,7 @@ class ClxAppLayoutComponent {
|
|
|
10943
10941
|
openSidebar() { this._sidebarOpen.set(true); }
|
|
10944
10942
|
closeSidebar() { this._sidebarOpen.set(false); }
|
|
10945
10943
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ClxAppLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10946
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: ClxAppLayoutComponent, isStandalone: true, selector: "clx-app-layout", inputs: { activeColor: { classPropertyName: "activeColor", publicName: "activeColor", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "flex h-screen overflow-hidden" }, providers: [
|
|
10947
|
-
{
|
|
10948
|
-
provide: CLX_LAYOUT_COLLAPSED,
|
|
10949
|
-
useFactory: (self) => self._collapsed,
|
|
10950
|
-
deps: [ClxAppLayoutComponent],
|
|
10951
|
-
},
|
|
10952
|
-
], ngImport: i0, template: `
|
|
10944
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: ClxAppLayoutComponent, isStandalone: true, selector: "clx-app-layout", inputs: { activeColor: { classPropertyName: "activeColor", publicName: "activeColor", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "flex h-screen overflow-hidden" }, providers: [ClxLayoutService], ngImport: i0, template: `
|
|
10953
10945
|
<!-- Mobile backdrop -->
|
|
10954
10946
|
@if (_showBackdrop()) {
|
|
10955
10947
|
<div
|
|
@@ -10999,13 +10991,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
10999
10991
|
selector: 'clx-app-layout',
|
|
11000
10992
|
standalone: true,
|
|
11001
10993
|
imports: [ClxIconComponent],
|
|
11002
|
-
providers: [
|
|
11003
|
-
{
|
|
11004
|
-
provide: CLX_LAYOUT_COLLAPSED,
|
|
11005
|
-
useFactory: (self) => self._collapsed,
|
|
11006
|
-
deps: [ClxAppLayoutComponent],
|
|
11007
|
-
},
|
|
11008
|
-
],
|
|
10994
|
+
providers: [ClxLayoutService],
|
|
11009
10995
|
template: `
|
|
11010
10996
|
<!-- Mobile backdrop -->
|
|
11011
10997
|
@if (_showBackdrop()) {
|
|
@@ -11055,6 +11041,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
11055
11041
|
}]
|
|
11056
11042
|
}], propDecorators: { activeColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeColor", required: false }] }] } });
|
|
11057
11043
|
|
|
11044
|
+
const CLX_MENU_COLOR = new InjectionToken('CLX_MENU_COLOR');
|
|
11045
|
+
// ── Item geometry ──────────────────────────────────────────────────────────────
|
|
11046
|
+
const NAV_ITEM_BASE = 'flex items-center gap-3 w-full text-sm font-medium transition-colors duration-150 cursor-pointer select-none';
|
|
11047
|
+
const NAV_ITEM_L1 = 'px-6 py-3';
|
|
11048
|
+
const NAV_ITEM_L2 = 'pl-4 pr-3 py-2';
|
|
11049
|
+
const NAV_ITEM_IDLE = 'text-slate-400';
|
|
11050
|
+
// ── Children container ─────────────────────────────────────────────────────────
|
|
11051
|
+
const NAV_CHILDREN_WRAPPER = 'grid transition-all duration-300 ease-in-out';
|
|
11052
|
+
const NAV_CHILDREN_INNER = 'overflow-hidden';
|
|
11053
|
+
const NAV_CHILDREN_LIST = 'ml-6 border-l border-slate-700/60 py-1 space-y-0.5';
|
|
11054
|
+
|
|
11058
11055
|
class ClxMenuItemComponent {
|
|
11059
11056
|
label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
11060
11057
|
icon = input('', ...(ngDevMode ? [{ debugName: "icon" }] : []));
|
|
@@ -11062,9 +11059,9 @@ class ClxMenuItemComponent {
|
|
|
11062
11059
|
color = input('indigo', ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
11063
11060
|
nested = input(false, ...(ngDevMode ? [{ debugName: "nested" }] : []));
|
|
11064
11061
|
_menuColorFn = inject(CLX_MENU_COLOR, { optional: true });
|
|
11065
|
-
|
|
11062
|
+
_layout = inject(ClxLayoutService, { optional: true });
|
|
11066
11063
|
_hasParent = !!this._menuColorFn;
|
|
11067
|
-
_collapsed = computed(() => this.
|
|
11064
|
+
_collapsed = computed(() => this._layout?.collapsed() ?? false, ...(ngDevMode ? [{ debugName: "_collapsed" }] : []));
|
|
11068
11065
|
_resolvedColor = computed(() => this._menuColorFn?.() ?? this.color(), ...(ngDevMode ? [{ debugName: "_resolvedColor" }] : []));
|
|
11069
11066
|
_geom = computed(() => {
|
|
11070
11067
|
if (this._collapsed())
|
|
@@ -11136,8 +11133,8 @@ class ClxMenuComponent {
|
|
|
11136
11133
|
icon = input('', ...(ngDevMode ? [{ debugName: "icon" }] : []));
|
|
11137
11134
|
color = input('indigo', ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
11138
11135
|
_isExpanded = signal(false, ...(ngDevMode ? [{ debugName: "_isExpanded" }] : []));
|
|
11139
|
-
|
|
11140
|
-
_collapsed = computed(() => this.
|
|
11136
|
+
_layout = inject(ClxLayoutService, { optional: true });
|
|
11137
|
+
_collapsed = computed(() => this._layout?.collapsed() ?? false, ...(ngDevMode ? [{ debugName: "_collapsed" }] : []));
|
|
11141
11138
|
_childItems;
|
|
11142
11139
|
_childRoutes = [];
|
|
11143
11140
|
_router = inject(Router);
|