@kirbydesign/extensions-angular 4.5.0 → 5.0.0
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/README.md +10 -3
- package/fesm2022/kirbydesign-extensions-angular-combobox.mjs +5 -5
- package/fesm2022/kirbydesign-extensions-angular-combobox.mjs.map +1 -1
- package/fesm2022/kirbydesign-extensions-angular-sidebar-menu.mjs +176 -144
- package/fesm2022/kirbydesign-extensions-angular-sidebar-menu.mjs.map +1 -1
- package/package.json +1 -1
- package/types/kirbydesign-extensions-angular-combobox.d.ts +1 -1
- package/types/kirbydesign-extensions-angular-sidebar-menu.d.ts +24 -13
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { output, inject, ElementRef, Directive, signal, computed, Injectable, Component, input, forwardRef, ChangeDetectionStrategy, afterNextRender, EventEmitter, effect, Output, Input, NgModule } from '@angular/core';
|
|
3
3
|
import { CdkScrollable } from '@angular/cdk/overlay';
|
|
4
|
+
import { Subject, debounceTime } from 'rxjs';
|
|
5
|
+
import { distinctUntilChanged } from 'rxjs/operators';
|
|
4
6
|
import { DividerComponent } from '@kirbydesign/designsystem/divider';
|
|
5
7
|
import { moveItemInArray, CdkDropList, CdkDrag } from '@angular/cdk/drag-drop';
|
|
6
8
|
import { RouterLink } from '@angular/router';
|
|
@@ -9,9 +11,155 @@ import { ButtonComponent } from '@kirbydesign/designsystem/button';
|
|
|
9
11
|
import * as i1 from '@kirbydesign/designsystem/icon';
|
|
10
12
|
import { IconModule, IconComponent } from '@kirbydesign/designsystem/icon';
|
|
11
13
|
import { BadgeComponent } from '@kirbydesign/designsystem/badge';
|
|
12
|
-
import { Subject, debounceTime } from 'rxjs';
|
|
13
14
|
import { trigger, transition, style, animate, AUTO_STYLE } from '@angular/animations';
|
|
14
|
-
import {
|
|
15
|
+
import { SkeletonLoaderComponent } from '@kirbydesign/extensions-angular/skeleton-loader';
|
|
16
|
+
|
|
17
|
+
class HeightObserverDirective {
|
|
18
|
+
#element;
|
|
19
|
+
#heightChanges;
|
|
20
|
+
#observer;
|
|
21
|
+
constructor() {
|
|
22
|
+
this.heightChange = output();
|
|
23
|
+
this.#element = inject(ElementRef).nativeElement;
|
|
24
|
+
this.#heightChanges = new Subject();
|
|
25
|
+
this.#observer = new ResizeObserver((entries) => {
|
|
26
|
+
this.#heightChanges.next(entries[0].contentRect.height);
|
|
27
|
+
});
|
|
28
|
+
this.#observer.observe(this.#element, { box: 'content-box' });
|
|
29
|
+
this.#heightChanges
|
|
30
|
+
.pipe(debounceTime(50), distinctUntilChanged())
|
|
31
|
+
.subscribe(this.heightChange.emit.bind(this.heightChange));
|
|
32
|
+
}
|
|
33
|
+
ngOnDestroy() {
|
|
34
|
+
this.#observer.unobserve(this.#element);
|
|
35
|
+
this.#observer.disconnect();
|
|
36
|
+
}
|
|
37
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: HeightObserverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
38
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.7", type: HeightObserverDirective, isStandalone: true, selector: "[kirbyXHeightObserver]", outputs: { heightChange: "heightChange" }, ngImport: i0 }); }
|
|
39
|
+
}
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: HeightObserverDirective, decorators: [{
|
|
41
|
+
type: Directive,
|
|
42
|
+
args: [{
|
|
43
|
+
selector: '[kirbyXHeightObserver]',
|
|
44
|
+
}]
|
|
45
|
+
}], ctorParameters: () => [], propDecorators: { heightChange: [{ type: i0.Output, args: ["heightChange"] }] } });
|
|
46
|
+
|
|
47
|
+
class SidebarService {
|
|
48
|
+
#menuHeight = signal(0, ...(ngDevMode ? [{ debugName: "#menuHeight" }] : /* istanbul ignore next */ []));
|
|
49
|
+
#containerHeight = signal(0, ...(ngDevMode ? [{ debugName: "#containerHeight" }] : /* istanbul ignore next */ []));
|
|
50
|
+
#scrollDistance = signal(0, ...(ngDevMode ? [{ debugName: "#scrollDistance" }] : /* istanbul ignore next */ []));
|
|
51
|
+
#scrollableDistance = computed(() => Math.max(0, this.#menuHeight() - this.#containerHeight()), ...(ngDevMode ? [{ debugName: "#scrollableDistance" }] : /* istanbul ignore next */ []));
|
|
52
|
+
#hasScrollbar = computed(() => this.#scrollableDistance() > 0, ...(ngDevMode ? [{ debugName: "#hasScrollbar" }] : /* istanbul ignore next */ []));
|
|
53
|
+
#notAtBottom = computed(() => this.#scrollDistance() < this.#scrollableDistance(), ...(ngDevMode ? [{ debugName: "#notAtBottom" }] : /* istanbul ignore next */ []));
|
|
54
|
+
#showHeaderBottomBorder = computed(() => this.#scrollDistance() > 0, ...(ngDevMode ? [{ debugName: "#showHeaderBottomBorder" }] : /* istanbul ignore next */ []));
|
|
55
|
+
#showFooterTopBorder = computed(() => this.#hasScrollbar() && this.#notAtBottom(), ...(ngDevMode ? [{ debugName: "#showFooterTopBorder" }] : /* istanbul ignore next */ []));
|
|
56
|
+
get showHeaderBottomBorder() {
|
|
57
|
+
return this.#showHeaderBottomBorder;
|
|
58
|
+
}
|
|
59
|
+
get showFooterTopBorder() {
|
|
60
|
+
return this.#showFooterTopBorder;
|
|
61
|
+
}
|
|
62
|
+
set menuHeight(height) {
|
|
63
|
+
this.#menuHeight.set(height);
|
|
64
|
+
}
|
|
65
|
+
set containerHeight(height) {
|
|
66
|
+
this.#containerHeight.set(height);
|
|
67
|
+
}
|
|
68
|
+
set scrollDistance(distance) {
|
|
69
|
+
this.#scrollDistance.set(distance);
|
|
70
|
+
}
|
|
71
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
72
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarService, providedIn: 'root' }); }
|
|
73
|
+
}
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarService, decorators: [{
|
|
75
|
+
type: Injectable,
|
|
76
|
+
args: [{ providedIn: 'root' }]
|
|
77
|
+
}] });
|
|
78
|
+
|
|
79
|
+
class SidebarContainerComponent {
|
|
80
|
+
constructor() {
|
|
81
|
+
this.#sidebarService = inject(SidebarService);
|
|
82
|
+
this.vm = {
|
|
83
|
+
showHeaderBottomBorder: this.#sidebarService.showHeaderBottomBorder,
|
|
84
|
+
showFooterTopBorder: this.#sidebarService.showFooterTopBorder,
|
|
85
|
+
setContainerHeight: this.#setContainerHeight.bind(this),
|
|
86
|
+
setScroll: this.#setScrollDistance.bind(this),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
#sidebarService;
|
|
90
|
+
#setContainerHeight(height) {
|
|
91
|
+
this.#sidebarService.containerHeight = height;
|
|
92
|
+
}
|
|
93
|
+
#setScrollDistance(event) {
|
|
94
|
+
const target = event.target;
|
|
95
|
+
if (target) {
|
|
96
|
+
this.#sidebarService.scrollDistance = target.scrollTop;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
100
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: SidebarContainerComponent, isStandalone: true, selector: "aside[kirby-x-sidebar-container]", ngImport: i0, template: "<div class=\"sidebar-header\" [class.bottom-border]=\"vm.showHeaderBottomBorder()\">\n <ng-content select=\"[slot='header']\"></ng-content>\n</div>\n<div\n kirbyXHeightObserver\n class=\"sidebar-content\"\n cdkScrollable\n (scroll)=\"vm.setScroll($event)\"\n (heightChange)=\"vm.setContainerHeight($event)\"\n>\n <ng-content select=\"[slot='content']\"></ng-content>\n</div>\n<div class=\"sidebar-footer\" [class.top-border]=\"vm.showFooterTopBorder()\">\n <ng-content select=\"[slot='footer']\"></ng-content>\n</div>\n", styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}ion-item-option.primary{background-color:var(--kirby-primary);color:var(--kirby-primary-contrast)}ion-item-option.secondary{background-color:var(--kirby-secondary);color:var(--kirby-secondary-contrast)}ion-item-option.tertiary{background-color:var(--kirby-tertiary);color:var(--kirby-tertiary-contrast)}ion-item-option.success{background-color:var(--kirby-success);color:var(--kirby-success-contrast)}ion-item-option.warning{background-color:var(--kirby-warning);color:var(--kirby-warning-contrast)}ion-item-option.danger{background-color:var(--kirby-danger);color:var(--kirby-danger-contrast)}ion-item-option.white-overlay{background-color:var(--kirby-white-overlay);color:var(--kirby-white-overlay-contrast)}ion-item-option.light{background-color:var(--kirby-light);color:var(--kirby-light-contrast)}ion-item-option.medium{background-color:var(--kirby-medium);color:var(--kirby-medium-contrast)}ion-item-option.dark{background-color:var(--kirby-dark);color:var(--kirby-dark-contrast)}ion-item-option.dark-overlay{background-color:var(--kirby-dark-overlay);color:var(--kirby-dark-overlay-contrast)}:host{--kirby-inputs-background-color: var(--kirby-white-overlay);--kirby-inputs-background-color-hover: var(--kirby-white-overlay-30);--kirby-inputs-background-color-active: var(--kirby-white-overlay-40);--kirby-inputs-color: var(--kirby-white);--kirby-inputs-indicator-background-color: var(--kirby-white);--kirby-inputs-indicator-color: var(--kirby-black);--kirby-inputs-placeholder-color: var(--kirby-white-overlay-50);--kirby-inputs-color-hover: var(--kirby-white-overlay-50);--kirby-inputs-elevation: none;height:100%;height:100dvh;background-color:var(--sidebar-background-color, var(--kirby-tertiary));color:var(--sidebar-color, var(--kirby-tertiary-contrast));display:flex;flex-direction:column;overflow:auto}:host *{scrollbar-width:thin;scrollbar-color:var(--kirby-semi-dark) var(--kirby-tertiary)}:host *::-webkit-scrollbar{width:16px}:host *::-webkit-scrollbar-track{background:transparent}:host *::-webkit-scrollbar-thumb{background-color:#8e8e8e80;border-radius:20px;border:4px solid transparent;background-clip:content-box}.sidebar-content{flex-grow:1;display:flex;flex-direction:column;overflow-y:auto}@supports (scrollbar-gutter: stable){.sidebar-content{overflow:hidden auto;scrollbar-gutter:auto}}.sidebar-header,.sidebar-footer{z-index:1;display:flex;align-items:center;justify-content:center;position:sticky}.sidebar-header.bottom-border{box-shadow:0 4px 10px 2px #1c1c1c4d;transition:opacity .3s}.sidebar-footer.top-border{box-shadow:0 -4px 10px 2px #1c1c1c4d;transition:opacity .3s}\n"], dependencies: [{ kind: "directive", type: HeightObserverDirective, selector: "[kirbyXHeightObserver]", outputs: ["heightChange"] }, { kind: "directive", type: CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }] }); }
|
|
101
|
+
}
|
|
102
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarContainerComponent, decorators: [{
|
|
103
|
+
type: Component,
|
|
104
|
+
args: [{ selector: 'aside[kirby-x-sidebar-container]', imports: [HeightObserverDirective, CdkScrollable], template: "<div class=\"sidebar-header\" [class.bottom-border]=\"vm.showHeaderBottomBorder()\">\n <ng-content select=\"[slot='header']\"></ng-content>\n</div>\n<div\n kirbyXHeightObserver\n class=\"sidebar-content\"\n cdkScrollable\n (scroll)=\"vm.setScroll($event)\"\n (heightChange)=\"vm.setContainerHeight($event)\"\n>\n <ng-content select=\"[slot='content']\"></ng-content>\n</div>\n<div class=\"sidebar-footer\" [class.top-border]=\"vm.showFooterTopBorder()\">\n <ng-content select=\"[slot='footer']\"></ng-content>\n</div>\n", styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}ion-item-option.primary{background-color:var(--kirby-primary);color:var(--kirby-primary-contrast)}ion-item-option.secondary{background-color:var(--kirby-secondary);color:var(--kirby-secondary-contrast)}ion-item-option.tertiary{background-color:var(--kirby-tertiary);color:var(--kirby-tertiary-contrast)}ion-item-option.success{background-color:var(--kirby-success);color:var(--kirby-success-contrast)}ion-item-option.warning{background-color:var(--kirby-warning);color:var(--kirby-warning-contrast)}ion-item-option.danger{background-color:var(--kirby-danger);color:var(--kirby-danger-contrast)}ion-item-option.white-overlay{background-color:var(--kirby-white-overlay);color:var(--kirby-white-overlay-contrast)}ion-item-option.light{background-color:var(--kirby-light);color:var(--kirby-light-contrast)}ion-item-option.medium{background-color:var(--kirby-medium);color:var(--kirby-medium-contrast)}ion-item-option.dark{background-color:var(--kirby-dark);color:var(--kirby-dark-contrast)}ion-item-option.dark-overlay{background-color:var(--kirby-dark-overlay);color:var(--kirby-dark-overlay-contrast)}:host{--kirby-inputs-background-color: var(--kirby-white-overlay);--kirby-inputs-background-color-hover: var(--kirby-white-overlay-30);--kirby-inputs-background-color-active: var(--kirby-white-overlay-40);--kirby-inputs-color: var(--kirby-white);--kirby-inputs-indicator-background-color: var(--kirby-white);--kirby-inputs-indicator-color: var(--kirby-black);--kirby-inputs-placeholder-color: var(--kirby-white-overlay-50);--kirby-inputs-color-hover: var(--kirby-white-overlay-50);--kirby-inputs-elevation: none;height:100%;height:100dvh;background-color:var(--sidebar-background-color, var(--kirby-tertiary));color:var(--sidebar-color, var(--kirby-tertiary-contrast));display:flex;flex-direction:column;overflow:auto}:host *{scrollbar-width:thin;scrollbar-color:var(--kirby-semi-dark) var(--kirby-tertiary)}:host *::-webkit-scrollbar{width:16px}:host *::-webkit-scrollbar-track{background:transparent}:host *::-webkit-scrollbar-thumb{background-color:#8e8e8e80;border-radius:20px;border:4px solid transparent;background-clip:content-box}.sidebar-content{flex-grow:1;display:flex;flex-direction:column;overflow-y:auto}@supports (scrollbar-gutter: stable){.sidebar-content{overflow:hidden auto;scrollbar-gutter:auto}}.sidebar-header,.sidebar-footer{z-index:1;display:flex;align-items:center;justify-content:center;position:sticky}.sidebar-header.bottom-border{box-shadow:0 4px 10px 2px #1c1c1c4d;transition:opacity .3s}.sidebar-footer.top-border{box-shadow:0 -4px 10px 2px #1c1c1c4d;transition:opacity .3s}\n"] }]
|
|
105
|
+
}] });
|
|
106
|
+
|
|
107
|
+
class SidebarComponent {
|
|
108
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
109
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: SidebarComponent, isStandalone: true, selector: "kirby-x-sidebar", ngImport: i0, template: `
|
|
110
|
+
<aside kirby-x-sidebar-container>
|
|
111
|
+
<ng-content select="kirby-x-sidebar-header" slot="header"></ng-content>
|
|
112
|
+
<ng-content slot="content"></ng-content>
|
|
113
|
+
<ng-content select="kirby-x-sidebar-footer" slot="footer"></ng-content>
|
|
114
|
+
</aside>
|
|
115
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SidebarContainerComponent, selector: "aside[kirby-x-sidebar-container]" }] }); }
|
|
116
|
+
}
|
|
117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarComponent, decorators: [{
|
|
118
|
+
type: Component,
|
|
119
|
+
args: [{
|
|
120
|
+
selector: 'kirby-x-sidebar',
|
|
121
|
+
template: `
|
|
122
|
+
<aside kirby-x-sidebar-container>
|
|
123
|
+
<ng-content select="kirby-x-sidebar-header" slot="header"></ng-content>
|
|
124
|
+
<ng-content slot="content"></ng-content>
|
|
125
|
+
<ng-content select="kirby-x-sidebar-footer" slot="footer"></ng-content>
|
|
126
|
+
</aside>
|
|
127
|
+
`,
|
|
128
|
+
imports: [SidebarContainerComponent],
|
|
129
|
+
}]
|
|
130
|
+
}] });
|
|
131
|
+
|
|
132
|
+
class SidebarFooterComponent {
|
|
133
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
134
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: SidebarFooterComponent, isStandalone: true, selector: "kirby-x-sidebar-footer", ngImport: i0, template: '<footer><ng-content></ng-content></footer>', isInline: true, styles: [":host,footer{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%}:host{min-height:80px}\n"] }); }
|
|
135
|
+
}
|
|
136
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarFooterComponent, decorators: [{
|
|
137
|
+
type: Component,
|
|
138
|
+
args: [{ selector: 'kirby-x-sidebar-footer', template: '<footer><ng-content></ng-content></footer>', styles: [":host,footer{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%}:host{min-height:80px}\n"] }]
|
|
139
|
+
}] });
|
|
140
|
+
|
|
141
|
+
class SidebarHeaderComponent {
|
|
142
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
143
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: SidebarHeaderComponent, isStandalone: true, selector: "kirby-x-sidebar-header", ngImport: i0, template: `
|
|
144
|
+
<header>
|
|
145
|
+
<span class="sidebar-logo"><ng-content select="[slot='logo']"></ng-content></span>
|
|
146
|
+
<div class="action-bar">
|
|
147
|
+
<ng-content select="[slot='action']"></ng-content>
|
|
148
|
+
</div>
|
|
149
|
+
</header>
|
|
150
|
+
`, isInline: true, styles: [":host,header{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%}:host::ng-deep [slot=logo]{display:inline-flex}:host::ng-deep [slot=logo] img,:host::ng-deep img[slot=logo]{object-fit:contain;max-width:100%;max-height:100%}.sidebar-logo{display:flex;align-items:center;height:50px;margin:var(--kirby-spacing-l) var(--kirby-spacing-m)}.action-bar{display:flex;flex-direction:row;align-items:center;justify-content:center;box-sizing:border-box;width:100%}.action-bar:has([slot=action]){padding:0 var(--kirby-spacing-xs) var(--kirby-spacing-xs)}\n"] }); }
|
|
151
|
+
}
|
|
152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarHeaderComponent, decorators: [{
|
|
153
|
+
type: Component,
|
|
154
|
+
args: [{ selector: 'kirby-x-sidebar-header', template: `
|
|
155
|
+
<header>
|
|
156
|
+
<span class="sidebar-logo"><ng-content select="[slot='logo']"></ng-content></span>
|
|
157
|
+
<div class="action-bar">
|
|
158
|
+
<ng-content select="[slot='action']"></ng-content>
|
|
159
|
+
</div>
|
|
160
|
+
</header>
|
|
161
|
+
`, styles: [":host,header{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%}:host::ng-deep [slot=logo]{display:inline-flex}:host::ng-deep [slot=logo] img,:host::ng-deep img[slot=logo]{object-fit:contain;max-width:100%;max-height:100%}.sidebar-logo{display:flex;align-items:center;height:50px;margin:var(--kirby-spacing-l) var(--kirby-spacing-m)}.action-bar{display:flex;flex-direction:row;align-items:center;justify-content:center;box-sizing:border-box;width:100%}.action-bar:has([slot=action]){padding:0 var(--kirby-spacing-xs) var(--kirby-spacing-xs)}\n"] }]
|
|
162
|
+
}] });
|
|
15
163
|
|
|
16
164
|
/**
|
|
17
165
|
* the HTMLElement.scrollIntoViewIfNecessary is non-standard and not supported in all browsers (e.g. firefox),
|
|
@@ -387,101 +535,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
|
|
|
387
535
|
`, imports: [MenuItemListComponent], styles: ["nav{padding:0 var(--kirby-spacing-xxs)}\n"] }]
|
|
388
536
|
}], ctorParameters: () => [] });
|
|
389
537
|
|
|
390
|
-
class HeightObserverDirective {
|
|
391
|
-
#element;
|
|
392
|
-
#heightChanges;
|
|
393
|
-
#observer;
|
|
394
|
-
constructor() {
|
|
395
|
-
this.heightChange = output();
|
|
396
|
-
this.#element = inject(ElementRef).nativeElement;
|
|
397
|
-
this.#heightChanges = new Subject();
|
|
398
|
-
this.#observer = new ResizeObserver((entries) => {
|
|
399
|
-
this.#heightChanges.next(entries[0].contentRect.height);
|
|
400
|
-
});
|
|
401
|
-
this.#observer.observe(this.#element, { box: 'content-box' });
|
|
402
|
-
this.#heightChanges
|
|
403
|
-
.pipe(debounceTime(50), distinctUntilChanged())
|
|
404
|
-
.subscribe(this.heightChange.emit.bind(this.heightChange));
|
|
405
|
-
}
|
|
406
|
-
ngOnDestroy() {
|
|
407
|
-
this.#observer.unobserve(this.#element);
|
|
408
|
-
this.#observer.disconnect();
|
|
409
|
-
}
|
|
410
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: HeightObserverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
411
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.7", type: HeightObserverDirective, isStandalone: true, selector: "[kirbyXHeightObserver]", outputs: { heightChange: "heightChange" }, ngImport: i0 }); }
|
|
412
|
-
}
|
|
413
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: HeightObserverDirective, decorators: [{
|
|
414
|
-
type: Directive,
|
|
415
|
-
args: [{
|
|
416
|
-
selector: '[kirbyXHeightObserver]',
|
|
417
|
-
}]
|
|
418
|
-
}], ctorParameters: () => [], propDecorators: { heightChange: [{ type: i0.Output, args: ["heightChange"] }] } });
|
|
419
|
-
|
|
420
|
-
class SidebarService {
|
|
421
|
-
#menuHeight = signal(0, ...(ngDevMode ? [{ debugName: "#menuHeight" }] : /* istanbul ignore next */ []));
|
|
422
|
-
#containerHeight = signal(0, ...(ngDevMode ? [{ debugName: "#containerHeight" }] : /* istanbul ignore next */ []));
|
|
423
|
-
#scrollDistance = signal(0, ...(ngDevMode ? [{ debugName: "#scrollDistance" }] : /* istanbul ignore next */ []));
|
|
424
|
-
#scrollableDistance = computed(() => Math.max(0, this.#menuHeight() - this.#containerHeight()), ...(ngDevMode ? [{ debugName: "#scrollableDistance" }] : /* istanbul ignore next */ []));
|
|
425
|
-
#hasScrollbar = computed(() => this.#scrollableDistance() > 0, ...(ngDevMode ? [{ debugName: "#hasScrollbar" }] : /* istanbul ignore next */ []));
|
|
426
|
-
#notAtBottom = computed(() => this.#scrollDistance() < this.#scrollableDistance(), ...(ngDevMode ? [{ debugName: "#notAtBottom" }] : /* istanbul ignore next */ []));
|
|
427
|
-
#showHeaderBottomBorder = computed(() => this.#scrollDistance() > 0, ...(ngDevMode ? [{ debugName: "#showHeaderBottomBorder" }] : /* istanbul ignore next */ []));
|
|
428
|
-
#showFooterTopBorder = computed(() => this.#hasScrollbar() && this.#notAtBottom(), ...(ngDevMode ? [{ debugName: "#showFooterTopBorder" }] : /* istanbul ignore next */ []));
|
|
429
|
-
get showHeaderBottomBorder() {
|
|
430
|
-
return this.#showHeaderBottomBorder;
|
|
431
|
-
}
|
|
432
|
-
get showFooterTopBorder() {
|
|
433
|
-
return this.#showFooterTopBorder;
|
|
434
|
-
}
|
|
435
|
-
set menuHeight(height) {
|
|
436
|
-
this.#menuHeight.set(height);
|
|
437
|
-
}
|
|
438
|
-
set containerHeight(height) {
|
|
439
|
-
this.#containerHeight.set(height);
|
|
440
|
-
}
|
|
441
|
-
set scrollDistance(distance) {
|
|
442
|
-
this.#scrollDistance.set(distance);
|
|
443
|
-
}
|
|
444
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
445
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarService, providedIn: 'root' }); }
|
|
446
|
-
}
|
|
447
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarService, decorators: [{
|
|
448
|
-
type: Injectable,
|
|
449
|
-
args: [{ providedIn: 'root' }]
|
|
450
|
-
}] });
|
|
451
|
-
|
|
452
538
|
class SidebarMenuComponent {
|
|
453
|
-
constructor() {
|
|
454
|
-
this.#sidebarService = inject(SidebarService);
|
|
455
|
-
this.vm = {
|
|
456
|
-
showHeaderBottomBorder: this.#sidebarService.showHeaderBottomBorder,
|
|
457
|
-
showFooterTopBorder: this.#sidebarService.showFooterTopBorder,
|
|
458
|
-
setContainerHeight: this.#setContainerHeight.bind(this),
|
|
459
|
-
setMenuHeight: this.#setMenuHeight.bind(this),
|
|
460
|
-
setScroll: this.#setScrollDistance.bind(this),
|
|
461
|
-
};
|
|
462
|
-
}
|
|
463
539
|
#sidebarService;
|
|
464
|
-
#setContainerHeight(height) {
|
|
465
|
-
this.#sidebarService.containerHeight = height;
|
|
466
|
-
}
|
|
467
|
-
#setMenuHeight(height) {
|
|
468
|
-
this.#sidebarService.menuHeight = height;
|
|
469
|
-
}
|
|
470
|
-
#setScrollDistance(event) {
|
|
471
|
-
const target = event.target;
|
|
472
|
-
if (target) {
|
|
473
|
-
this.#sidebarService.scrollDistance = target.scrollTop;
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
477
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: SidebarMenuComponent, isStandalone: true, selector: "aside[kirby-x-sidebar-menu]", ngImport: i0, template: "<div class=\"sidebar-header\" [class.bottom-border]=\"vm.showHeaderBottomBorder()\">\n <ng-content select=\"[slot='header']\"></ng-content>\n</div>\n<div\n kirbyXHeightObserver\n class=\"sidebar-content\"\n cdkScrollable\n (scroll)=\"vm.setScroll($event)\"\n (heightChange)=\"vm.setContainerHeight($event)\"\n>\n <kirby-x-menu-container\n kirbyXHeightObserver\n (heightChange)=\"vm.setMenuHeight($event)\"\n ></kirby-x-menu-container>\n</div>\n<div class=\"sidebar-footer\" [class.top-border]=\"vm.showFooterTopBorder()\">\n <ng-content select=\"[slot='footer']\"></ng-content>\n</div>\n", styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}ion-item-option.primary{background-color:var(--kirby-primary);color:var(--kirby-primary-contrast)}ion-item-option.secondary{background-color:var(--kirby-secondary);color:var(--kirby-secondary-contrast)}ion-item-option.tertiary{background-color:var(--kirby-tertiary);color:var(--kirby-tertiary-contrast)}ion-item-option.success{background-color:var(--kirby-success);color:var(--kirby-success-contrast)}ion-item-option.warning{background-color:var(--kirby-warning);color:var(--kirby-warning-contrast)}ion-item-option.danger{background-color:var(--kirby-danger);color:var(--kirby-danger-contrast)}ion-item-option.white-overlay{background-color:var(--kirby-white-overlay);color:var(--kirby-white-overlay-contrast)}ion-item-option.light{background-color:var(--kirby-light);color:var(--kirby-light-contrast)}ion-item-option.medium{background-color:var(--kirby-medium);color:var(--kirby-medium-contrast)}ion-item-option.dark{background-color:var(--kirby-dark);color:var(--kirby-dark-contrast)}ion-item-option.dark-overlay{background-color:var(--kirby-dark-overlay);color:var(--kirby-dark-overlay-contrast)}:host{--kirby-inputs-background-color: var(--kirby-white-overlay);--kirby-inputs-background-color-hover: var(--kirby-white-overlay-30);--kirby-inputs-background-color-active: var(--kirby-white-overlay-40);--kirby-inputs-color: var(--kirby-white);--kirby-inputs-indicator-background-color: var(--kirby-white);--kirby-inputs-indicator-color: var(--kirby-black);--kirby-inputs-placeholder-color: var(--kirby-white-overlay-50);--kirby-inputs-color-hover: var(--kirby-white-overlay-50);--kirby-inputs-elevation: none;height:100%;height:100dvh;background-color:var(--sidebar-background-color, var(--kirby-tertiary));color:var(--sidebar-color, var(--kirby-tertiary-contrast));display:flex;flex-direction:column;overflow:auto}:host *{scrollbar-width:thin;scrollbar-color:var(--kirby-semi-dark) var(--kirby-tertiary)}:host *::-webkit-scrollbar{width:16px}:host *::-webkit-scrollbar-track{background:transparent}:host *::-webkit-scrollbar-thumb{background-color:#8e8e8e80;border-radius:20px;border:4px solid transparent;background-clip:content-box}.sidebar-content{flex-grow:1;display:flex;flex-direction:column;overflow-y:auto}@supports (scrollbar-gutter: stable){.sidebar-content{overflow:hidden auto;scrollbar-gutter:auto}}.sidebar-header,.sidebar-footer{z-index:1;display:flex;align-items:center;justify-content:center;position:sticky}.sidebar-header.bottom-border{box-shadow:0 4px 10px 2px #1c1c1c4d;transition:opacity .3s}.sidebar-footer.top-border{box-shadow:0 -4px 10px 2px #1c1c1c4d;transition:opacity .3s}\n"], dependencies: [{ kind: "directive", type: HeightObserverDirective, selector: "[kirbyXHeightObserver]", outputs: ["heightChange"] }, { kind: "component", type: MenuContainerComponent, selector: "kirby-x-menu-container" }, { kind: "directive", type: CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }] }); }
|
|
478
|
-
}
|
|
479
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarMenuComponent, decorators: [{
|
|
480
|
-
type: Component,
|
|
481
|
-
args: [{ selector: 'aside[kirby-x-sidebar-menu]', imports: [HeightObserverDirective, MenuContainerComponent, CdkScrollable], template: "<div class=\"sidebar-header\" [class.bottom-border]=\"vm.showHeaderBottomBorder()\">\n <ng-content select=\"[slot='header']\"></ng-content>\n</div>\n<div\n kirbyXHeightObserver\n class=\"sidebar-content\"\n cdkScrollable\n (scroll)=\"vm.setScroll($event)\"\n (heightChange)=\"vm.setContainerHeight($event)\"\n>\n <kirby-x-menu-container\n kirbyXHeightObserver\n (heightChange)=\"vm.setMenuHeight($event)\"\n ></kirby-x-menu-container>\n</div>\n<div class=\"sidebar-footer\" [class.top-border]=\"vm.showFooterTopBorder()\">\n <ng-content select=\"[slot='footer']\"></ng-content>\n</div>\n", styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}ion-item-option.primary{background-color:var(--kirby-primary);color:var(--kirby-primary-contrast)}ion-item-option.secondary{background-color:var(--kirby-secondary);color:var(--kirby-secondary-contrast)}ion-item-option.tertiary{background-color:var(--kirby-tertiary);color:var(--kirby-tertiary-contrast)}ion-item-option.success{background-color:var(--kirby-success);color:var(--kirby-success-contrast)}ion-item-option.warning{background-color:var(--kirby-warning);color:var(--kirby-warning-contrast)}ion-item-option.danger{background-color:var(--kirby-danger);color:var(--kirby-danger-contrast)}ion-item-option.white-overlay{background-color:var(--kirby-white-overlay);color:var(--kirby-white-overlay-contrast)}ion-item-option.light{background-color:var(--kirby-light);color:var(--kirby-light-contrast)}ion-item-option.medium{background-color:var(--kirby-medium);color:var(--kirby-medium-contrast)}ion-item-option.dark{background-color:var(--kirby-dark);color:var(--kirby-dark-contrast)}ion-item-option.dark-overlay{background-color:var(--kirby-dark-overlay);color:var(--kirby-dark-overlay-contrast)}:host{--kirby-inputs-background-color: var(--kirby-white-overlay);--kirby-inputs-background-color-hover: var(--kirby-white-overlay-30);--kirby-inputs-background-color-active: var(--kirby-white-overlay-40);--kirby-inputs-color: var(--kirby-white);--kirby-inputs-indicator-background-color: var(--kirby-white);--kirby-inputs-indicator-color: var(--kirby-black);--kirby-inputs-placeholder-color: var(--kirby-white-overlay-50);--kirby-inputs-color-hover: var(--kirby-white-overlay-50);--kirby-inputs-elevation: none;height:100%;height:100dvh;background-color:var(--sidebar-background-color, var(--kirby-tertiary));color:var(--sidebar-color, var(--kirby-tertiary-contrast));display:flex;flex-direction:column;overflow:auto}:host *{scrollbar-width:thin;scrollbar-color:var(--kirby-semi-dark) var(--kirby-tertiary)}:host *::-webkit-scrollbar{width:16px}:host *::-webkit-scrollbar-track{background:transparent}:host *::-webkit-scrollbar-thumb{background-color:#8e8e8e80;border-radius:20px;border:4px solid transparent;background-clip:content-box}.sidebar-content{flex-grow:1;display:flex;flex-direction:column;overflow-y:auto}@supports (scrollbar-gutter: stable){.sidebar-content{overflow:hidden auto;scrollbar-gutter:auto}}.sidebar-header,.sidebar-footer{z-index:1;display:flex;align-items:center;justify-content:center;position:sticky}.sidebar-header.bottom-border{box-shadow:0 4px 10px 2px #1c1c1c4d;transition:opacity .3s}.sidebar-footer.top-border{box-shadow:0 -4px 10px 2px #1c1c1c4d;transition:opacity .3s}\n"] }]
|
|
482
|
-
}] });
|
|
483
|
-
|
|
484
|
-
class SidebarComponent {
|
|
485
540
|
#stateService;
|
|
486
541
|
set menuItems(menuItems) {
|
|
487
542
|
this.#stateService.menuItems = menuItems;
|
|
@@ -498,7 +553,11 @@ class SidebarComponent {
|
|
|
498
553
|
set autoCollapse(value) {
|
|
499
554
|
this.#stateService.autoCollapse = value;
|
|
500
555
|
}
|
|
556
|
+
setMenuHeight(height) {
|
|
557
|
+
this.#sidebarService.menuHeight = height;
|
|
558
|
+
}
|
|
501
559
|
constructor() {
|
|
560
|
+
this.#sidebarService = inject(SidebarService);
|
|
502
561
|
this.#stateService = inject(MenuStateService);
|
|
503
562
|
this.menuItemsChange = new EventEmitter();
|
|
504
563
|
this.selectedItemChange = new EventEmitter();
|
|
@@ -513,26 +572,22 @@ class SidebarComponent {
|
|
|
513
572
|
effect(() => this.expandedItemsChange.emit(this.#stateService.expandedItems()));
|
|
514
573
|
effect(() => this.checkedItemsChange.emit(this.#stateService.checkedItems()));
|
|
515
574
|
}
|
|
516
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type:
|
|
517
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type:
|
|
518
|
-
<
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
`, isInline: true, dependencies: [{ kind: "component", type:
|
|
575
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
576
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: SidebarMenuComponent, isStandalone: true, selector: "kirby-x-sidebar-menu", inputs: { menuItems: "menuItems", selectedItem: "selectedItem", expandedItems: "expandedItems", checkedItems: "checkedItems", autoCollapse: "autoCollapse" }, outputs: { menuItemsChange: "menuItemsChange", selectedItemChange: "selectedItemChange", expandedItemsChange: "expandedItemsChange", checkedItemsChange: "checkedItemsChange", expandChange: "expandChange", checkChange: "checkChange", itemReorder: "itemReorder", itemSelect: "itemSelect" }, ngImport: i0, template: `
|
|
577
|
+
<kirby-x-menu-container
|
|
578
|
+
kirbyXHeightObserver
|
|
579
|
+
(heightChange)="setMenuHeight($event)"
|
|
580
|
+
></kirby-x-menu-container>
|
|
581
|
+
`, isInline: true, styles: [":host{display:flex;flex-direction:column;width:100%}\n"], dependencies: [{ kind: "component", type: MenuContainerComponent, selector: "kirby-x-menu-container" }, { kind: "directive", type: HeightObserverDirective, selector: "[kirbyXHeightObserver]", outputs: ["heightChange"] }] }); }
|
|
523
582
|
}
|
|
524
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type:
|
|
583
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarMenuComponent, decorators: [{
|
|
525
584
|
type: Component,
|
|
526
|
-
args: [{
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
</aside>
|
|
533
|
-
`,
|
|
534
|
-
imports: [SidebarMenuComponent],
|
|
535
|
-
}]
|
|
585
|
+
args: [{ selector: 'kirby-x-sidebar-menu', template: `
|
|
586
|
+
<kirby-x-menu-container
|
|
587
|
+
kirbyXHeightObserver
|
|
588
|
+
(heightChange)="setMenuHeight($event)"
|
|
589
|
+
></kirby-x-menu-container>
|
|
590
|
+
`, imports: [MenuContainerComponent, HeightObserverDirective], styles: [":host{display:flex;flex-direction:column;width:100%}\n"] }]
|
|
536
591
|
}], ctorParameters: () => [], propDecorators: { menuItems: [{
|
|
537
592
|
type: Input
|
|
538
593
|
}], selectedItem: [{
|
|
@@ -561,42 +616,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
|
|
|
561
616
|
type: Output
|
|
562
617
|
}] } });
|
|
563
618
|
|
|
564
|
-
class
|
|
565
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type:
|
|
566
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type:
|
|
567
|
-
}
|
|
568
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarFooterComponent, decorators: [{
|
|
569
|
-
type: Component,
|
|
570
|
-
args: [{ selector: 'kirby-x-sidebar-footer', template: '<footer><ng-content></ng-content></footer>', styles: [":host,footer{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%}:host{min-height:80px}\n"] }]
|
|
571
|
-
}] });
|
|
572
|
-
|
|
573
|
-
class SidebarHeaderComponent {
|
|
574
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
575
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: SidebarHeaderComponent, isStandalone: true, selector: "kirby-x-sidebar-header", ngImport: i0, template: `
|
|
576
|
-
<header>
|
|
577
|
-
<span class="sidebar-logo"><ng-content select="[slot='logo']"></ng-content></span>
|
|
578
|
-
<div class="action-bar">
|
|
579
|
-
<ng-content select="[slot='action']"></ng-content>
|
|
580
|
-
</div>
|
|
581
|
-
</header>
|
|
582
|
-
`, isInline: true, styles: [":host,header{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%}:host::ng-deep [slot=logo]{display:inline-flex}:host::ng-deep [slot=logo] img,:host::ng-deep img[slot=logo]{object-fit:contain;max-width:100%;max-height:100%}.sidebar-logo{display:flex;align-items:center;height:50px;margin:var(--kirby-spacing-l) var(--kirby-spacing-m)}.action-bar{display:flex;flex-direction:row;align-items:center;justify-content:center;box-sizing:border-box;width:100%}.action-bar:has([slot=action]){padding:0 var(--kirby-spacing-xs) var(--kirby-spacing-xs)}\n"] }); }
|
|
619
|
+
class SidebarMenuLoaderComponent {
|
|
620
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarMenuLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
621
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: SidebarMenuLoaderComponent, isStandalone: true, selector: "kirby-x-sidebar-menu-loader", ngImport: i0, template: "<kirby-x-skeleton-loader theme=\"dark\" class=\"skeleton-loader\"></kirby-x-skeleton-loader>\n<kirby-x-skeleton-loader theme=\"dark\" class=\"skeleton-loader\"></kirby-x-skeleton-loader>\n<kirby-x-skeleton-loader theme=\"dark\" class=\"skeleton-loader\"></kirby-x-skeleton-loader>\n<kirby-x-skeleton-loader theme=\"dark\" class=\"skeleton-loader\"></kirby-x-skeleton-loader>\n<kirby-x-skeleton-loader theme=\"dark\" class=\"skeleton-loader\"></kirby-x-skeleton-loader>\n", styles: [":host{display:flex;padding:0 var(--kirby-spacing-xxs, 8px);flex-direction:column;align-items:center;gap:var(--kirby-spacing-xxxs, 4px);flex:1 0 0;align-self:stretch}.skeleton-loader{height:var(--kirby-spacing-xl);align-self:stretch}\n"], dependencies: [{ kind: "component", type: SkeletonLoaderComponent, selector: "kirby-x-skeleton-loader", inputs: ["theme", "shape"] }] }); }
|
|
583
622
|
}
|
|
584
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type:
|
|
623
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarMenuLoaderComponent, decorators: [{
|
|
585
624
|
type: Component,
|
|
586
|
-
args: [{ selector: 'kirby-x-sidebar-
|
|
587
|
-
<header>
|
|
588
|
-
<span class="sidebar-logo"><ng-content select="[slot='logo']"></ng-content></span>
|
|
589
|
-
<div class="action-bar">
|
|
590
|
-
<ng-content select="[slot='action']"></ng-content>
|
|
591
|
-
</div>
|
|
592
|
-
</header>
|
|
593
|
-
`, styles: [":host,header{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%}:host::ng-deep [slot=logo]{display:inline-flex}:host::ng-deep [slot=logo] img,:host::ng-deep img[slot=logo]{object-fit:contain;max-width:100%;max-height:100%}.sidebar-logo{display:flex;align-items:center;height:50px;margin:var(--kirby-spacing-l) var(--kirby-spacing-m)}.action-bar{display:flex;flex-direction:row;align-items:center;justify-content:center;box-sizing:border-box;width:100%}.action-bar:has([slot=action]){padding:0 var(--kirby-spacing-xs) var(--kirby-spacing-xs)}\n"] }]
|
|
625
|
+
args: [{ selector: 'kirby-x-sidebar-menu-loader', imports: [SkeletonLoaderComponent], template: "<kirby-x-skeleton-loader theme=\"dark\" class=\"skeleton-loader\"></kirby-x-skeleton-loader>\n<kirby-x-skeleton-loader theme=\"dark\" class=\"skeleton-loader\"></kirby-x-skeleton-loader>\n<kirby-x-skeleton-loader theme=\"dark\" class=\"skeleton-loader\"></kirby-x-skeleton-loader>\n<kirby-x-skeleton-loader theme=\"dark\" class=\"skeleton-loader\"></kirby-x-skeleton-loader>\n<kirby-x-skeleton-loader theme=\"dark\" class=\"skeleton-loader\"></kirby-x-skeleton-loader>\n", styles: [":host{display:flex;padding:0 var(--kirby-spacing-xxs, 8px);flex-direction:column;align-items:center;gap:var(--kirby-spacing-xxxs, 4px);flex:1 0 0;align-self:stretch}.skeleton-loader{height:var(--kirby-spacing-xl);align-self:stretch}\n"] }]
|
|
594
626
|
}] });
|
|
595
627
|
|
|
596
628
|
class SidebarModule {
|
|
597
629
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
598
630
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.7", ngImport: i0, type: SidebarModule, imports: [SidebarComponent, SidebarFooterComponent, SidebarHeaderComponent], exports: [SidebarComponent, SidebarFooterComponent, SidebarHeaderComponent] }); }
|
|
599
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarModule
|
|
631
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarModule }); }
|
|
600
632
|
}
|
|
601
633
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SidebarModule, decorators: [{
|
|
602
634
|
type: NgModule,
|
|
@@ -610,5 +642,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
|
|
|
610
642
|
* Generated bundle index. Do not edit.
|
|
611
643
|
*/
|
|
612
644
|
|
|
613
|
-
export { SidebarComponent, SidebarFooterComponent, SidebarHeaderComponent, SidebarModule };
|
|
645
|
+
export { SidebarComponent, SidebarFooterComponent, SidebarHeaderComponent, SidebarMenuComponent, SidebarMenuLoaderComponent, SidebarModule };
|
|
614
646
|
//# sourceMappingURL=kirbydesign-extensions-angular-sidebar-menu.mjs.map
|