@cuby-ui/core 0.0.216 → 0.0.218
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/components/index.d.ts +2 -0
- package/components/layout/index.d.ts +1 -0
- package/components/layout/layout.component.d.ts +6 -0
- package/components/sidebar/index.d.ts +7 -0
- package/components/sidebar/sidebar-container/index.d.ts +1 -0
- package/components/sidebar/sidebar-container/sidebar-container.component.d.ts +9 -0
- package/components/sidebar/sidebar-header/index.d.ts +1 -0
- package/components/sidebar/sidebar-header/sidebar-header.component.d.ts +12 -0
- package/components/sidebar/sidebar-navigation/index.d.ts +1 -0
- package/components/sidebar/sidebar-navigation/sidebar-navigation.component.d.ts +9 -0
- package/components/sidebar/sidebar-navigation-container/index.d.ts +1 -0
- package/components/sidebar/sidebar-navigation-container/sidebar-navigation-container.component.d.ts +8 -0
- package/components/sidebar/sidebar-navigation-item/index.d.ts +1 -0
- package/components/sidebar/sidebar-navigation-item/sidebar-navigation-item.component.d.ts +9 -0
- package/components/sidebar/sidebar.options.d.ts +4 -0
- package/components/sidebar/sidebar.service.d.ts +13 -0
- package/esm2022/components/index.mjs +3 -1
- package/esm2022/components/layout/index.mjs +2 -0
- package/esm2022/components/layout/layout.component.mjs +16 -0
- package/esm2022/components/sidebar/index.mjs +7 -0
- package/esm2022/components/sidebar/sidebar-container/index.mjs +2 -0
- package/esm2022/components/sidebar/sidebar-container/sidebar-container.component.mjs +29 -0
- package/esm2022/components/sidebar/sidebar-header/index.mjs +2 -0
- package/esm2022/components/sidebar/sidebar-header/sidebar-header.component.mjs +27 -0
- package/esm2022/components/sidebar/sidebar-navigation/index.mjs +2 -0
- package/esm2022/components/sidebar/sidebar-navigation/sidebar-navigation.component.mjs +16 -0
- package/esm2022/components/sidebar/sidebar-navigation-container/index.mjs +2 -0
- package/esm2022/components/sidebar/sidebar-navigation-container/sidebar-navigation-container.component.mjs +16 -0
- package/esm2022/components/sidebar/sidebar-navigation-item/index.mjs +2 -0
- package/esm2022/components/sidebar/sidebar-navigation-item/sidebar-navigation-item.component.mjs +21 -0
- package/esm2022/components/sidebar/sidebar.options.mjs +2 -0
- package/esm2022/components/sidebar/sidebar.service.mjs +31 -0
- package/fesm2022/cuby-ui-core.mjs +174 -44
- package/fesm2022/cuby-ui-core.mjs.map +1 -1
- package/package.json +3 -3
- package/styles/theme.scss +12 -1
- package/styles/variables/colors.scss +12 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy, inject, Renderer2, input, model, effect, Directive, InjectionToken, Input, HostBinding, ChangeDetectorRef, ElementRef, ViewChild, EventEmitter, Output, NgModule, Injector, Injectable, SkipSelf, Optional, DestroyRef, NgZone, signal, TemplateRef, ContentChildren, HostListener, Self, INJECTOR, forwardRef, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, inject, Renderer2, input, model, effect, Directive, InjectionToken, Input, HostBinding, ChangeDetectorRef, ElementRef, ViewChild, EventEmitter, Output, NgModule, Injector, Injectable, SkipSelf, Optional, DestroyRef, NgZone, signal, TemplateRef, ContentChildren, HostListener, Self, INJECTOR, forwardRef, ViewContainerRef, computed } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule, DOCUMENT, NgForOf, NgIf, NgComponentOutlet } from '@angular/common';
|
|
4
|
+
import { CommonModule, DOCUMENT, NgForOf, NgIf, NgComponentOutlet, NgTemplateOutlet } from '@angular/common';
|
|
5
5
|
import * as i1$1 from '@cuby-ui/cdk';
|
|
6
|
-
import { CUI_WINDOW, cuiCreateToken, cuiCreateTokenFromFactory, CuiDestroyService, CuiFilterPipe, CuiLetDirective, CuiPopoverService, cuiProvide, CUI_ANIMATION_FRAME, cuiZonefree, EMPTY_CLIENT_RECT, cuiInjectElement, CUI_LOCAL_STORAGE, CUI_IS_WEBKIT, CuiItemDirective, CuiActiveZone, CuiFocusTrapDirective, cuiGetElementObscures, CUI_IS_MOBILE, CuiHoveredService, cuiPure, cuiPointToClientRect, cuiClamp, cuiPx, cuiIfMap, cuiIsPresent, cuiTypedFromEvent, cuiZonefreeScheduler, cuiZoneOptimized, cuiIsNativeFocused, CuiClickOutsideDirective, CuiTargetDirective, cuiGetClosestFocusable, CuiTime, CuiAutoResizingDirective } from '@cuby-ui/cdk';
|
|
6
|
+
import { CUI_WINDOW, cuiCreateToken, cuiCreateTokenFromFactory, CuiDestroyService, CuiFilterPipe, CuiLetDirective, CuiPopoverService, cuiProvide, CUI_ANIMATION_FRAME, cuiZonefree, EMPTY_CLIENT_RECT, cuiInjectElement, CUI_LOCAL_STORAGE, CUI_IS_WEBKIT, CuiItemDirective, CuiActiveZone, CuiFocusTrapDirective, cuiGetElementObscures, CUI_IS_MOBILE, CuiHoveredService, cuiPure, cuiPointToClientRect, cuiClamp, cuiPx, cuiIfMap, cuiIsPresent, cuiTypedFromEvent, cuiZonefreeScheduler, cuiZoneOptimized, cuiIsNativeFocused, CuiClickOutsideDirective, CuiTargetDirective, cuiGetClosestFocusable, CuiTime, CuiDimensionsObserverDirective, CuiAutoResizingDirective } from '@cuby-ui/cdk';
|
|
7
7
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
8
8
|
import { cuiIsIcon, CUI_ICONS } from '@cuby-ui/icons';
|
|
9
9
|
import { BehaviorSubject, takeUntil, Observable, merge, distinctUntilChanged, startWith, map, finalize, Subject, switchMap, of, delay, repeat, filter, tap, takeWhile, fromEvent, debounce, timer, skip, take, catchError, throwError } from 'rxjs';
|
|
@@ -3620,6 +3620,176 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3620
3620
|
}]
|
|
3621
3621
|
}] });
|
|
3622
3622
|
|
|
3623
|
+
const IS_SIDEBAR_OPENED_STORAGE_KEY = 'is-sidebar-opened';
|
|
3624
|
+
|
|
3625
|
+
class CuiRenderDynamicComponentsService {
|
|
3626
|
+
constructor() {
|
|
3627
|
+
this.dynamicComponentsSignal = signal([]);
|
|
3628
|
+
this.dynamicComponents = this.dynamicComponentsSignal.asReadonly();
|
|
3629
|
+
}
|
|
3630
|
+
open(dynamicComponent) {
|
|
3631
|
+
this.dynamicComponentsSignal.update((prevDynamicComponents) => [...prevDynamicComponents, dynamicComponent]);
|
|
3632
|
+
}
|
|
3633
|
+
closeLast() {
|
|
3634
|
+
this.dynamicComponentsSignal.update((prevDynamicComponents) => prevDynamicComponents.slice(0, -1));
|
|
3635
|
+
}
|
|
3636
|
+
closeAllExceptFirst() {
|
|
3637
|
+
this.dynamicComponentsSignal.update((prevDynamicComponents) => {
|
|
3638
|
+
const firstDynamicComponent = prevDynamicComponents[0];
|
|
3639
|
+
return firstDynamicComponent ? [firstDynamicComponent] : [];
|
|
3640
|
+
});
|
|
3641
|
+
}
|
|
3642
|
+
closeAll() {
|
|
3643
|
+
this.dynamicComponentsSignal.set([]);
|
|
3644
|
+
}
|
|
3645
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiRenderDynamicComponentsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3646
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiRenderDynamicComponentsService }); }
|
|
3647
|
+
}
|
|
3648
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiRenderDynamicComponentsService, decorators: [{
|
|
3649
|
+
type: Injectable
|
|
3650
|
+
}] });
|
|
3651
|
+
|
|
3652
|
+
class CuiRenderDynamicComponentsComponent {
|
|
3653
|
+
constructor() {
|
|
3654
|
+
this.renderDynamicComponentsService = inject(CuiRenderDynamicComponentsService);
|
|
3655
|
+
this.dynamicComponents = this.renderDynamicComponentsService.dynamicComponents;
|
|
3656
|
+
}
|
|
3657
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiRenderDynamicComponentsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3658
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiRenderDynamicComponentsComponent, isStandalone: true, selector: "cui-render-dynamic-components", ngImport: i0, template: "@for (dynamicComponent of dynamicComponents(); let isLast = $last; track $index) {\r\n <div\r\n class=\"container\"\r\n [class.container_hidden]=\"!isLast\"\r\n >\r\n <ng-container *ngComponentOutlet=\"dynamicComponent.component; inputs: dynamicComponent.inputs\" />\r\n </div>\r\n}\r\n", styles: [":host{display:contents}.container{display:contents}.container_hidden{display:none}\n"], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3659
|
+
}
|
|
3660
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiRenderDynamicComponentsComponent, decorators: [{
|
|
3661
|
+
type: Component,
|
|
3662
|
+
args: [{ selector: 'cui-render-dynamic-components', imports: [NgComponentOutlet], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@for (dynamicComponent of dynamicComponents(); let isLast = $last; track $index) {\r\n <div\r\n class=\"container\"\r\n [class.container_hidden]=\"!isLast\"\r\n >\r\n <ng-container *ngComponentOutlet=\"dynamicComponent.component; inputs: dynamicComponent.inputs\" />\r\n </div>\r\n}\r\n", styles: [":host{display:contents}.container{display:contents}.container_hidden{display:none}\n"] }]
|
|
3663
|
+
}] });
|
|
3664
|
+
|
|
3665
|
+
class CuiSidebarService extends CuiRenderDynamicComponentsService {
|
|
3666
|
+
constructor() {
|
|
3667
|
+
super(...arguments);
|
|
3668
|
+
this.localStorage = inject(CUI_LOCAL_STORAGE);
|
|
3669
|
+
this.isOpenedSignal = signal(this.localStorage.getItem(IS_SIDEBAR_OPENED_STORAGE_KEY) === 'true');
|
|
3670
|
+
this.widthSignal = signal(0);
|
|
3671
|
+
this.isOpened = this.isOpenedSignal.asReadonly();
|
|
3672
|
+
this.width = this.widthSignal.asReadonly();
|
|
3673
|
+
}
|
|
3674
|
+
switch() {
|
|
3675
|
+
this.isOpenedSignal.update((value) => !value);
|
|
3676
|
+
this.localStorage.setItem(IS_SIDEBAR_OPENED_STORAGE_KEY, this.isOpenedSignal().toString());
|
|
3677
|
+
}
|
|
3678
|
+
setWidth(value) {
|
|
3679
|
+
this.widthSignal.set(value);
|
|
3680
|
+
}
|
|
3681
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiSidebarService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3682
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiSidebarService, providedIn: 'root' }); }
|
|
3683
|
+
}
|
|
3684
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiSidebarService, decorators: [{
|
|
3685
|
+
type: Injectable,
|
|
3686
|
+
args: [{
|
|
3687
|
+
providedIn: 'root'
|
|
3688
|
+
}]
|
|
3689
|
+
}] });
|
|
3690
|
+
|
|
3691
|
+
class CuiSidebarHeaderComponent {
|
|
3692
|
+
constructor() {
|
|
3693
|
+
this.document = inject(DOCUMENT);
|
|
3694
|
+
this.sidebarService = inject(CuiSidebarService);
|
|
3695
|
+
this.isOpened = this.sidebarService.isOpened;
|
|
3696
|
+
this.buttonIcon = computed(() => this.isOpened() ? 'cuiIconChevronsLeft' : 'cuiIconChevronsRight');
|
|
3697
|
+
this.headerSlot = input.required();
|
|
3698
|
+
}
|
|
3699
|
+
onSwitch(event) {
|
|
3700
|
+
event.stopPropagation();
|
|
3701
|
+
this.document.body.click();
|
|
3702
|
+
this.sidebarService.switch();
|
|
3703
|
+
}
|
|
3704
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiSidebarHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3705
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: CuiSidebarHeaderComponent, isStandalone: true, selector: "header[cuiSidebarHeader]", inputs: { headerSlot: { classPropertyName: "headerSlot", publicName: "headerSlot", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<ng-container [ngTemplateOutlet]=\"headerSlot()\" [ngTemplateOutletContext]=\"{ $implicit: isOpened() }\" />\r\n<button type=\"button\" class=\"button\" [class.button_opened]=\"isOpened()\" (click)=\"onSwitch($event)\">\r\n <cui-svg [icon]=\"buttonIcon()\" color=\"var(--cui-base-500)\" />\r\n</button>", styles: [":host{display:flex;gap:8px;align-items:center;padding:8px 12px 22px;position:relative;border-bottom:1px solid var(--cui-base-200);margin-bottom:21px}.button{padding:6px;position:absolute;bottom:0;transform:translateY(calc(50% + .5px));display:flex;border-radius:50%;background:var(--cui-base-100)}.button_opened{right:0}\n"], dependencies: [{ kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3706
|
+
}
|
|
3707
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiSidebarHeaderComponent, decorators: [{
|
|
3708
|
+
type: Component,
|
|
3709
|
+
args: [{ selector: 'header[cuiSidebarHeader]', imports: [CuiSvgModule, NgTemplateOutlet], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngTemplateOutlet]=\"headerSlot()\" [ngTemplateOutletContext]=\"{ $implicit: isOpened() }\" />\r\n<button type=\"button\" class=\"button\" [class.button_opened]=\"isOpened()\" (click)=\"onSwitch($event)\">\r\n <cui-svg [icon]=\"buttonIcon()\" color=\"var(--cui-base-500)\" />\r\n</button>", styles: [":host{display:flex;gap:8px;align-items:center;padding:8px 12px 22px;position:relative;border-bottom:1px solid var(--cui-base-200);margin-bottom:21px}.button{padding:6px;position:absolute;bottom:0;transform:translateY(calc(50% + .5px));display:flex;border-radius:50%;background:var(--cui-base-100)}.button_opened{right:0}\n"] }]
|
|
3710
|
+
}] });
|
|
3711
|
+
|
|
3712
|
+
class CuiSidebarContainerComponent {
|
|
3713
|
+
constructor() {
|
|
3714
|
+
this.sidebarService = inject(CuiSidebarService);
|
|
3715
|
+
this.isOpened = this.sidebarService.isOpened;
|
|
3716
|
+
}
|
|
3717
|
+
onResize(width) {
|
|
3718
|
+
this.sidebarService.setWidth(width);
|
|
3719
|
+
}
|
|
3720
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiSidebarContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3721
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: CuiSidebarContainerComponent, isStandalone: true, selector: "cui-sidebar-container", host: { listeners: { "cuiResizeObserver": "onResize($event.width)" }, properties: { "class._opened": "isOpened()" } }, hostDirectives: [{ directive: i1$1.CuiDimensionsObserverDirective, outputs: ["cuiResizeObserver", "cuiResizeObserver"] }], ngImport: i0, template: "<ng-content />\r\n", styles: [":host{padding:16px 7.5px 8px 8px;position:fixed;top:0;bottom:0;left:0;display:flex;flex-direction:column;border-right:.5px solid var(--cui-base-200);background:var(--cui-base-50)}:host._opened{width:240px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3722
|
+
}
|
|
3723
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiSidebarContainerComponent, decorators: [{
|
|
3724
|
+
type: Component,
|
|
3725
|
+
args: [{ selector: 'cui-sidebar-container', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
|
|
3726
|
+
{
|
|
3727
|
+
directive: CuiDimensionsObserverDirective,
|
|
3728
|
+
outputs: ['cuiResizeObserver']
|
|
3729
|
+
}
|
|
3730
|
+
], host: {
|
|
3731
|
+
'(cuiResizeObserver)': 'onResize($event.width)',
|
|
3732
|
+
'[class._opened]': 'isOpened()'
|
|
3733
|
+
}, template: "<ng-content />\r\n", styles: [":host{padding:16px 7.5px 8px 8px;position:fixed;top:0;bottom:0;left:0;display:flex;flex-direction:column;border-right:.5px solid var(--cui-base-200);background:var(--cui-base-50)}:host._opened{width:240px}\n"] }]
|
|
3734
|
+
}] });
|
|
3735
|
+
|
|
3736
|
+
class CuiSidebarNavigationComponent {
|
|
3737
|
+
constructor() {
|
|
3738
|
+
this.links = input.required();
|
|
3739
|
+
this.slot = input.required();
|
|
3740
|
+
}
|
|
3741
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiSidebarNavigationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3742
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiSidebarNavigationComponent, isStandalone: true, selector: "cui-sidebar-navigation", inputs: { links: { classPropertyName: "links", publicName: "links", isSignal: true, isRequired: true, transformFunction: null }, slot: { classPropertyName: "slot", publicName: "slot", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<nav class=\"nav\">\r\n <ul class=\"list\">\r\n @for (link of links(); track link.text; let isLast = $last) {\r\n <ng-container [ngTemplateOutlet]=\"slot()\" [ngTemplateOutletContext]=\"{ $implicit: link, isLast }\" />\r\n }\r\n </ul>\r\n</nav>", styles: [".nav{flex:1}.list{display:flex;flex-direction:column;gap:4px;height:100%}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3743
|
+
}
|
|
3744
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiSidebarNavigationComponent, decorators: [{
|
|
3745
|
+
type: Component,
|
|
3746
|
+
args: [{ selector: 'cui-sidebar-navigation', imports: [NgTemplateOutlet], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav class=\"nav\">\r\n <ul class=\"list\">\r\n @for (link of links(); track link.text; let isLast = $last) {\r\n <ng-container [ngTemplateOutlet]=\"slot()\" [ngTemplateOutletContext]=\"{ $implicit: link, isLast }\" />\r\n }\r\n </ul>\r\n</nav>", styles: [".nav{flex:1}.list{display:flex;flex-direction:column;gap:4px;height:100%}\n"] }]
|
|
3747
|
+
}] });
|
|
3748
|
+
|
|
3749
|
+
class CuiSidebarNavigationItemComponent {
|
|
3750
|
+
constructor() {
|
|
3751
|
+
this.text = input.required();
|
|
3752
|
+
this.icon = input();
|
|
3753
|
+
this.active = input();
|
|
3754
|
+
this.isOpen = input();
|
|
3755
|
+
}
|
|
3756
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiSidebarNavigationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3757
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiSidebarNavigationItemComponent, isStandalone: true, selector: "[cuiSidebarNavigationItem]", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class._active": "active()" } }, ngImport: i0, template: "@if (icon(); as icon) {\r\n<cui-svg [icon]=\"icon\" color=\"var(--cui-base-500)\" />\r\n}\r\n@if (isOpen()) {\r\n{{ text() }}\r\n}", styles: [":host{padding:8px 12px;display:flex;gap:12px;width:100%;border-radius:8px}:host:active{background:var(--cui-base-100)}@media (hover: hover){:host:hover{background:var(--cui-base-100)}}:host._active{background:var(--cui-base-100)}\n"], dependencies: [{ kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3758
|
+
}
|
|
3759
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiSidebarNavigationItemComponent, decorators: [{
|
|
3760
|
+
type: Component,
|
|
3761
|
+
args: [{ selector: '[cuiSidebarNavigationItem]', imports: [CuiSvgModule], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
3762
|
+
'[class._active]': 'active()'
|
|
3763
|
+
}, template: "@if (icon(); as icon) {\r\n<cui-svg [icon]=\"icon\" color=\"var(--cui-base-500)\" />\r\n}\r\n@if (isOpen()) {\r\n{{ text() }}\r\n}", styles: [":host{padding:8px 12px;display:flex;gap:12px;width:100%;border-radius:8px}:host:active{background:var(--cui-base-100)}@media (hover: hover){:host:hover{background:var(--cui-base-100)}}:host._active{background:var(--cui-base-100)}\n"] }]
|
|
3764
|
+
}] });
|
|
3765
|
+
|
|
3766
|
+
class CuiSidebarNavigationContainerComponent {
|
|
3767
|
+
constructor() {
|
|
3768
|
+
this.slot = input.required();
|
|
3769
|
+
this.title = input();
|
|
3770
|
+
}
|
|
3771
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiSidebarNavigationContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3772
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiSidebarNavigationContainerComponent, isStandalone: true, selector: "cui-sidebar-navigation-container", inputs: { slot: { classPropertyName: "slot", publicName: "slot", isSignal: true, isRequired: true, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (title(); as title) {\r\n <h3 class=\"title\">{{ title }}</h3>\r\n}\r\n\r\n<ng-container [ngTemplateOutlet]=\"slot()\" />\r\n", styles: [":host{display:flex;flex-direction:column;gap:4px}.title{padding:8px 12px;font-weight:400;font-size:14px;line-height:20px;color:var(--cui-base-500);text-transform:uppercase}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3773
|
+
}
|
|
3774
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiSidebarNavigationContainerComponent, decorators: [{
|
|
3775
|
+
type: Component,
|
|
3776
|
+
args: [{ selector: 'cui-sidebar-navigation-container', imports: [NgTemplateOutlet], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (title(); as title) {\r\n <h3 class=\"title\">{{ title }}</h3>\r\n}\r\n\r\n<ng-container [ngTemplateOutlet]=\"slot()\" />\r\n", styles: [":host{display:flex;flex-direction:column;gap:4px}.title{padding:8px 12px;font-weight:400;font-size:14px;line-height:20px;color:var(--cui-base-500);text-transform:uppercase}\n"] }]
|
|
3777
|
+
}] });
|
|
3778
|
+
|
|
3779
|
+
class CuiLayoutComponent {
|
|
3780
|
+
constructor() {
|
|
3781
|
+
this.sidebarWidth = input.required();
|
|
3782
|
+
}
|
|
3783
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3784
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: CuiLayoutComponent, isStandalone: true, selector: "cui-layout", inputs: { sidebarWidth: { classPropertyName: "sidebarWidth", publicName: "sidebarWidth", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "style.marginLeft.px": "sidebarWidth()" } }, ngImport: i0, template: "<div class=\"content\">\r\n <ng-content />\r\n</div>\r\n", styles: [":host{--maxWidth: 1320px;--horizontalPadding: 24px;--verticalPadding: 0;position:relative;display:block;min-height:100vh}:host .content{padding:var(--verticalPadding) var(--horizontalPadding);margin:0 auto;max-width:var(--maxWidth)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3785
|
+
}
|
|
3786
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiLayoutComponent, decorators: [{
|
|
3787
|
+
type: Component,
|
|
3788
|
+
args: [{ selector: 'cui-layout', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
3789
|
+
'[style.marginLeft.px]': 'sidebarWidth()'
|
|
3790
|
+
}, template: "<div class=\"content\">\r\n <ng-content />\r\n</div>\r\n", styles: [":host{--maxWidth: 1320px;--horizontalPadding: 24px;--verticalPadding: 0;position:relative;display:block;min-height:100vh}:host .content{padding:var(--verticalPadding) var(--horizontalPadding);margin:0 auto;max-width:var(--maxWidth)}\n"] }]
|
|
3791
|
+
}] });
|
|
3792
|
+
|
|
3623
3793
|
const CUI_TAB_ACTIVATE = 'cui-tab-activate';
|
|
3624
3794
|
class CuiTabComponent {
|
|
3625
3795
|
constructor() {
|
|
@@ -3764,46 +3934,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3764
3934
|
}]
|
|
3765
3935
|
}] });
|
|
3766
3936
|
|
|
3767
|
-
class CuiRenderDynamicComponentsService {
|
|
3768
|
-
constructor() {
|
|
3769
|
-
this.dynamicComponentsSignal = signal([]);
|
|
3770
|
-
this.dynamicComponents = this.dynamicComponentsSignal.asReadonly();
|
|
3771
|
-
}
|
|
3772
|
-
open(dynamicComponent) {
|
|
3773
|
-
this.dynamicComponentsSignal.update((prevDynamicComponents) => [...prevDynamicComponents, dynamicComponent]);
|
|
3774
|
-
}
|
|
3775
|
-
closeLast() {
|
|
3776
|
-
this.dynamicComponentsSignal.update((prevDynamicComponents) => prevDynamicComponents.slice(0, -1));
|
|
3777
|
-
}
|
|
3778
|
-
closeAllExceptFirst() {
|
|
3779
|
-
this.dynamicComponentsSignal.update((prevDynamicComponents) => {
|
|
3780
|
-
const firstDynamicComponent = prevDynamicComponents[0];
|
|
3781
|
-
return firstDynamicComponent ? [firstDynamicComponent] : [];
|
|
3782
|
-
});
|
|
3783
|
-
}
|
|
3784
|
-
closeAll() {
|
|
3785
|
-
this.dynamicComponentsSignal.set([]);
|
|
3786
|
-
}
|
|
3787
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiRenderDynamicComponentsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3788
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiRenderDynamicComponentsService }); }
|
|
3789
|
-
}
|
|
3790
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiRenderDynamicComponentsService, decorators: [{
|
|
3791
|
-
type: Injectable
|
|
3792
|
-
}] });
|
|
3793
|
-
|
|
3794
|
-
class CuiRenderDynamicComponentsComponent {
|
|
3795
|
-
constructor() {
|
|
3796
|
-
this.renderDynamicComponentsService = inject(CuiRenderDynamicComponentsService);
|
|
3797
|
-
this.dynamicComponents = this.renderDynamicComponentsService.dynamicComponents;
|
|
3798
|
-
}
|
|
3799
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiRenderDynamicComponentsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3800
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiRenderDynamicComponentsComponent, isStandalone: true, selector: "cui-render-dynamic-components", ngImport: i0, template: "@for (dynamicComponent of dynamicComponents(); let isLast = $last; track $index) {\r\n <div\r\n class=\"container\"\r\n [class.container_hidden]=\"!isLast\"\r\n >\r\n <ng-container *ngComponentOutlet=\"dynamicComponent.component; inputs: dynamicComponent.inputs\" />\r\n </div>\r\n}\r\n", styles: [":host{display:contents}.container{display:contents}.container_hidden{display:none}\n"], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3801
|
-
}
|
|
3802
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiRenderDynamicComponentsComponent, decorators: [{
|
|
3803
|
-
type: Component,
|
|
3804
|
-
args: [{ selector: 'cui-render-dynamic-components', imports: [NgComponentOutlet], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@for (dynamicComponent of dynamicComponents(); let isLast = $last; track $index) {\r\n <div\r\n class=\"container\"\r\n [class.container_hidden]=\"!isLast\"\r\n >\r\n <ng-container *ngComponentOutlet=\"dynamicComponent.component; inputs: dynamicComponent.inputs\" />\r\n </div>\r\n}\r\n", styles: [":host{display:contents}.container{display:contents}.container_hidden{display:none}\n"] }]
|
|
3805
|
-
}] });
|
|
3806
|
-
|
|
3807
3937
|
const cuiXNdjsonInterceptor = (request, next) => {
|
|
3808
3938
|
if (request.headers.get('Content-Type') !== 'application/x-ndjson') {
|
|
3809
3939
|
return next(request);
|
|
@@ -3863,5 +3993,5 @@ const cuiLoaderInterceptor = (request, next) => {
|
|
|
3863
3993
|
* Generated bundle index. Do not edit.
|
|
3864
3994
|
*/
|
|
3865
3995
|
|
|
3866
|
-
export { AngularOutsideLoaderService, CUI_ALERTS, CUI_ALERT_CONTEXT, CUI_ALERT_DEFAULT_OPTIONS, CUI_ALERT_OPTIONS, CUI_ANIMATIONS_DEFAULT_DURATION, CUI_BANNER_DEFAULT_OPTIONS, CUI_BANNER_OPTIONS, CUI_BUTTON_DEFAULT_OPTIONS, CUI_BUTTON_OPTIONS, CUI_DEFAULT_THEME, CUI_DIALOGS, CUI_DIALOG_CONTEXT, CUI_DIALOG_DEFAULT_OPTIONS, CUI_DIALOG_OPTIONS, CUI_INPUT_TIME_DEFAULT_OPTIONS, CUI_INPUT_TIME_OPTIONS, CUI_NOTIFICATION_DEFAULT_OPTIONS, CUI_NOTIFICATION_ICONS, CUI_NOTIFICATION_ICON_OPTIONS, CUI_NOTIFICATION_ICON_OPTIONS_DEFAULT_MODE, CUI_NOTIFICATION_ICON_OPTIONS_LIGHT_MODE, CUI_NOTIFICATION_OPTIONS, CUI_ROOT_SELECTOR, CUI_TAB_ACTIVATE, CUI_TEXT_FIELD_CONTROLLER, CUI_TEXT_FIELD_ICON_LEFT, CUI_TEXT_FIELD_ID, CUI_TEXT_FIELD_IS_ERROR, CUI_TEXT_FIELD_PLACEHOLDER, CUI_TEXT_FIELD_SIZE, CUI_TEXT_FILED_CONTROLLER_PROVIDER, CUI_THEME, CUI_THEME_STORAGE_DEFAULT_KEY, CUI_THEME_STORAGE_KEY, CUI_TOOLTIP_COMPONENT, CUI_TOOLTIP_DEFAULT_OPTIONS, CUI_TOOLTIP_DIRECTIONS, CUI_TOOLTIP_OPTIONS, CUI_TOOLTIP_PROVIDERS, CuiAccordionComponent, CuiAccordionDirective, CuiAccordionItemComponent, CuiAccordionModule, CuiAlertComponent, CuiAlertModule, CuiAlertService, CuiAlertsComponent, CuiBadgeComponent, CuiBadgeModule, CuiBannerComponent, CuiBannerModule, CuiBreadcrumbComponent, CuiBreadcrumbsComponent, CuiBreadcrumbsModule, CuiButtonComponent, CuiButtonGroupComponent, CuiButtonGroupModule, CuiButtonModule, CuiCheckboxComponent, CuiCheckboxModule, CuiContextMenuComponent, CuiContextMenuModule, CuiDialogActionsComponent, CuiDialogComponent, CuiDialogHeaderComponent, CuiDialogModule, CuiDialogService, CuiDialogsComponent, CuiDropdownDirective, CuiDropdownWrapperComponent, CuiFormFieldComponent, CuiFormFieldModule, CuiHintComponent, CuiHintModule, CuiIconButtonComponent, CuiIconButtonModule, CuiInputModule, CuiInputNumberComponent, CuiInputNumberModule, CuiInputPasswordComponent, CuiInputPasswordModule, CuiInputTextComponent, CuiInputTimeComponent, CuiInputTimeModule, CuiLabelComponent, CuiLabelModule, CuiLetterBoxComponent, CuiNotificationComponent, CuiNotificationModule, CuiPositionService, CuiRadioComponent, CuiRadioModule, CuiRenderDynamicComponentsComponent, CuiRenderDynamicComponentsService, CuiRootComponent, CuiRootModule, CuiSelectComponent, CuiSelectModule, CuiSvgComponent, CuiSvgModule, CuiTabComponent, CuiTabsComponent, CuiTabsModule, CuiTextFieldController, CuiTextFieldControllerModule, CuiTextFieldIconLeftDirective, CuiTextFieldIdDirective, CuiTextFieldIsErrorDirective, CuiTextFieldPlaceholderDirective, CuiTextFieldSizeDirective, CuiTextareaComponent, CuiTextareaModule, CuiThemeService, CuiToggleComponent, CuiToggleModule, CuiTooltip, CuiTooltipComponent, CuiTooltipDescribe, CuiTooltipDirective, CuiTooltipDriver, CuiTooltipHost, CuiTooltipHover, CuiTooltipManual, CuiTooltipOptionsDirective, CuiTooltipOverflow, CuiTooltipPointer, CuiTooltipPosition, CuiTooltipService, CuiTooltipUnstyled, CuiTooltipUnstyledComponent, CuiTooltips, CuiVisualViewportService, LoaderService, LoadingState, cuiGetDuration, cuiIsObscured, cuiLoaderInterceptor, cuiOverrideOptions, cuiRemoveSpaces, cuiReplace, cuiToAnimationOptions, cuiTooltipOptionsProvider, cuiXNdjsonInterceptor };
|
|
3996
|
+
export { AngularOutsideLoaderService, CUI_ALERTS, CUI_ALERT_CONTEXT, CUI_ALERT_DEFAULT_OPTIONS, CUI_ALERT_OPTIONS, CUI_ANIMATIONS_DEFAULT_DURATION, CUI_BANNER_DEFAULT_OPTIONS, CUI_BANNER_OPTIONS, CUI_BUTTON_DEFAULT_OPTIONS, CUI_BUTTON_OPTIONS, CUI_DEFAULT_THEME, CUI_DIALOGS, CUI_DIALOG_CONTEXT, CUI_DIALOG_DEFAULT_OPTIONS, CUI_DIALOG_OPTIONS, CUI_INPUT_TIME_DEFAULT_OPTIONS, CUI_INPUT_TIME_OPTIONS, CUI_NOTIFICATION_DEFAULT_OPTIONS, CUI_NOTIFICATION_ICONS, CUI_NOTIFICATION_ICON_OPTIONS, CUI_NOTIFICATION_ICON_OPTIONS_DEFAULT_MODE, CUI_NOTIFICATION_ICON_OPTIONS_LIGHT_MODE, CUI_NOTIFICATION_OPTIONS, CUI_ROOT_SELECTOR, CUI_TAB_ACTIVATE, CUI_TEXT_FIELD_CONTROLLER, CUI_TEXT_FIELD_ICON_LEFT, CUI_TEXT_FIELD_ID, CUI_TEXT_FIELD_IS_ERROR, CUI_TEXT_FIELD_PLACEHOLDER, CUI_TEXT_FIELD_SIZE, CUI_TEXT_FILED_CONTROLLER_PROVIDER, CUI_THEME, CUI_THEME_STORAGE_DEFAULT_KEY, CUI_THEME_STORAGE_KEY, CUI_TOOLTIP_COMPONENT, CUI_TOOLTIP_DEFAULT_OPTIONS, CUI_TOOLTIP_DIRECTIONS, CUI_TOOLTIP_OPTIONS, CUI_TOOLTIP_PROVIDERS, CuiAccordionComponent, CuiAccordionDirective, CuiAccordionItemComponent, CuiAccordionModule, CuiAlertComponent, CuiAlertModule, CuiAlertService, CuiAlertsComponent, CuiBadgeComponent, CuiBadgeModule, CuiBannerComponent, CuiBannerModule, CuiBreadcrumbComponent, CuiBreadcrumbsComponent, CuiBreadcrumbsModule, CuiButtonComponent, CuiButtonGroupComponent, CuiButtonGroupModule, CuiButtonModule, CuiCheckboxComponent, CuiCheckboxModule, CuiContextMenuComponent, CuiContextMenuModule, CuiDialogActionsComponent, CuiDialogComponent, CuiDialogHeaderComponent, CuiDialogModule, CuiDialogService, CuiDialogsComponent, CuiDropdownDirective, CuiDropdownWrapperComponent, CuiFormFieldComponent, CuiFormFieldModule, CuiHintComponent, CuiHintModule, CuiIconButtonComponent, CuiIconButtonModule, CuiInputModule, CuiInputNumberComponent, CuiInputNumberModule, CuiInputPasswordComponent, CuiInputPasswordModule, CuiInputTextComponent, CuiInputTimeComponent, CuiInputTimeModule, CuiLabelComponent, CuiLabelModule, CuiLayoutComponent, CuiLetterBoxComponent, CuiNotificationComponent, CuiNotificationModule, CuiPositionService, CuiRadioComponent, CuiRadioModule, CuiRenderDynamicComponentsComponent, CuiRenderDynamicComponentsService, CuiRootComponent, CuiRootModule, CuiSelectComponent, CuiSelectModule, CuiSidebarContainerComponent, CuiSidebarHeaderComponent, CuiSidebarNavigationComponent, CuiSidebarNavigationContainerComponent, CuiSidebarNavigationItemComponent, CuiSidebarService, CuiSvgComponent, CuiSvgModule, CuiTabComponent, CuiTabsComponent, CuiTabsModule, CuiTextFieldController, CuiTextFieldControllerModule, CuiTextFieldIconLeftDirective, CuiTextFieldIdDirective, CuiTextFieldIsErrorDirective, CuiTextFieldPlaceholderDirective, CuiTextFieldSizeDirective, CuiTextareaComponent, CuiTextareaModule, CuiThemeService, CuiToggleComponent, CuiToggleModule, CuiTooltip, CuiTooltipComponent, CuiTooltipDescribe, CuiTooltipDirective, CuiTooltipDriver, CuiTooltipHost, CuiTooltipHover, CuiTooltipManual, CuiTooltipOptionsDirective, CuiTooltipOverflow, CuiTooltipPointer, CuiTooltipPosition, CuiTooltipService, CuiTooltipUnstyled, CuiTooltipUnstyledComponent, CuiTooltips, CuiVisualViewportService, LoaderService, LoadingState, cuiGetDuration, cuiIsObscured, cuiLoaderInterceptor, cuiOverrideOptions, cuiRemoveSpaces, cuiReplace, cuiToAnimationOptions, cuiTooltipOptionsProvider, cuiXNdjsonInterceptor };
|
|
3867
3997
|
//# sourceMappingURL=cuby-ui-core.mjs.map
|