codexly-ui 0.0.14 → 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 -23
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/index.d.ts +6 -10
- package/package.json +1 -1
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -10880,25 +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 =
|
|
10901
|
-
collapsed = this._collapsed;
|
|
10898
|
+
_collapsed = this._layout.collapsed;
|
|
10902
10899
|
_isMobile = signal(true, ...(ngDevMode ? [{ debugName: "_isMobile" }] : []));
|
|
10903
10900
|
_showBackdrop = computed(() => this._sidebarOpen() && this._isMobile(), ...(ngDevMode ? [{ debugName: "_showBackdrop" }] : []));
|
|
10904
10901
|
_sidebarCls = computed(() => {
|
|
@@ -10944,9 +10941,7 @@ class ClxAppLayoutComponent {
|
|
|
10944
10941
|
openSidebar() { this._sidebarOpen.set(true); }
|
|
10945
10942
|
closeSidebar() { this._sidebarOpen.set(false); }
|
|
10946
10943
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ClxAppLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10947
|
-
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: [
|
|
10948
|
-
{ provide: CLX_LAYOUT_REF, useExisting: ClxAppLayoutComponent },
|
|
10949
|
-
], 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: `
|
|
10950
10945
|
<!-- Mobile backdrop -->
|
|
10951
10946
|
@if (_showBackdrop()) {
|
|
10952
10947
|
<div
|
|
@@ -10996,9 +10991,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
10996
10991
|
selector: 'clx-app-layout',
|
|
10997
10992
|
standalone: true,
|
|
10998
10993
|
imports: [ClxIconComponent],
|
|
10999
|
-
providers: [
|
|
11000
|
-
{ provide: CLX_LAYOUT_REF, useExisting: ClxAppLayoutComponent },
|
|
11001
|
-
],
|
|
10994
|
+
providers: [ClxLayoutService],
|
|
11002
10995
|
template: `
|
|
11003
10996
|
<!-- Mobile backdrop -->
|
|
11004
10997
|
@if (_showBackdrop()) {
|
|
@@ -11048,6 +11041,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
11048
11041
|
}]
|
|
11049
11042
|
}], propDecorators: { activeColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeColor", required: false }] }] } });
|
|
11050
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
|
+
|
|
11051
11055
|
class ClxMenuItemComponent {
|
|
11052
11056
|
label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
11053
11057
|
icon = input('', ...(ngDevMode ? [{ debugName: "icon" }] : []));
|
|
@@ -11055,9 +11059,9 @@ class ClxMenuItemComponent {
|
|
|
11055
11059
|
color = input('indigo', ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
11056
11060
|
nested = input(false, ...(ngDevMode ? [{ debugName: "nested" }] : []));
|
|
11057
11061
|
_menuColorFn = inject(CLX_MENU_COLOR, { optional: true });
|
|
11058
|
-
|
|
11062
|
+
_layout = inject(ClxLayoutService, { optional: true });
|
|
11059
11063
|
_hasParent = !!this._menuColorFn;
|
|
11060
|
-
_collapsed = computed(() => this.
|
|
11064
|
+
_collapsed = computed(() => this._layout?.collapsed() ?? false, ...(ngDevMode ? [{ debugName: "_collapsed" }] : []));
|
|
11061
11065
|
_resolvedColor = computed(() => this._menuColorFn?.() ?? this.color(), ...(ngDevMode ? [{ debugName: "_resolvedColor" }] : []));
|
|
11062
11066
|
_geom = computed(() => {
|
|
11063
11067
|
if (this._collapsed())
|
|
@@ -11129,8 +11133,8 @@ class ClxMenuComponent {
|
|
|
11129
11133
|
icon = input('', ...(ngDevMode ? [{ debugName: "icon" }] : []));
|
|
11130
11134
|
color = input('indigo', ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
11131
11135
|
_isExpanded = signal(false, ...(ngDevMode ? [{ debugName: "_isExpanded" }] : []));
|
|
11132
|
-
|
|
11133
|
-
_collapsed = computed(() => this.
|
|
11136
|
+
_layout = inject(ClxLayoutService, { optional: true });
|
|
11137
|
+
_collapsed = computed(() => this._layout?.collapsed() ?? false, ...(ngDevMode ? [{ debugName: "_collapsed" }] : []));
|
|
11134
11138
|
_childItems;
|
|
11135
11139
|
_childRoutes = [];
|
|
11136
11140
|
_router = inject(Router);
|