@koobiq/components 18.33.0 → 18.34.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/actions-panel/actions-panel-config.d.ts +4 -3
- package/actions-panel/actions-panel-container.scss +0 -6
- package/actions-panel/actions-panel-ref.d.ts +13 -0
- package/actions-panel/actions-panel.d.ts +1 -7
- package/clamped-text/clamped-text.d.ts +61 -0
- package/clamped-text/clamped-text.scss +17 -0
- package/clamped-text/constants.d.ts +14 -0
- package/clamped-text/index.d.ts +3 -0
- package/clamped-text/module.d.ts +7 -0
- package/content-panel/content-panel-aside.scss +9 -0
- package/content-panel/content-panel-body.scss +9 -0
- package/content-panel/content-panel-container.scss +32 -0
- package/content-panel/content-panel-footer.scss +5 -0
- package/content-panel/content-panel-header.scss +30 -0
- package/content-panel/content-panel-tokens.scss +9 -0
- package/content-panel/content-panel.d.ts +149 -0
- package/content-panel/content-panel.scss +25 -0
- package/content-panel/index.d.ts +3 -0
- package/content-panel/module.d.ts +7 -0
- package/content-panel/resizable.d.ts +70 -0
- package/core/locales/en-US.d.ts +4 -0
- package/core/locales/es-LA.d.ts +4 -0
- package/core/locales/fa-IR.d.ts +4 -0
- package/core/locales/locale-service.d.ts +28 -0
- package/core/locales/pt-BR.d.ts +4 -0
- package/core/locales/ru-RU.d.ts +4 -0
- package/core/locales/tk-TM.d.ts +4 -0
- package/core/locales/types.d.ts +5 -0
- package/core/locales/zh-CN.d.ts +4 -0
- package/core/styles/common/_select.scss +6 -3
- package/datepicker/calendar.component.d.ts +1 -1
- package/datepicker/datepicker-input.directive.d.ts +1 -1
- package/datepicker/datepicker-toggle.component.d.ts +1 -1
- package/datepicker/datepicker.component.d.ts +2 -2
- package/dynamic-translation/dynamic-translation.d.ts +72 -0
- package/dynamic-translation/index.d.ts +2 -0
- package/dynamic-translation/module.d.ts +7 -0
- package/esm2022/actions-panel/actions-panel-config.mjs +1 -1
- package/esm2022/actions-panel/actions-panel-container.mjs +7 -7
- package/esm2022/actions-panel/actions-panel-ref.mjs +17 -1
- package/esm2022/actions-panel/actions-panel.mjs +34 -24
- package/esm2022/button-toggle/button-toggle.component.mjs +9 -9
- package/esm2022/clamped-text/clamped-text.mjs +202 -0
- package/esm2022/clamped-text/constants.mjs +20 -0
- package/esm2022/clamped-text/index.mjs +4 -0
- package/esm2022/clamped-text/koobiq-components-clamped-text.mjs +5 -0
- package/esm2022/clamped-text/module.mjs +19 -0
- package/esm2022/content-panel/content-panel.mjs +432 -0
- package/esm2022/content-panel/index.mjs +4 -0
- package/esm2022/content-panel/koobiq-components-content-panel.mjs +5 -0
- package/esm2022/content-panel/module.mjs +42 -0
- package/esm2022/content-panel/resizable.mjs +138 -0
- package/esm2022/core/locales/en-US.mjs +5 -1
- package/esm2022/core/locales/es-LA.mjs +5 -1
- package/esm2022/core/locales/fa-IR.mjs +5 -1
- package/esm2022/core/locales/pt-BR.mjs +5 -1
- package/esm2022/core/locales/ru-RU.mjs +5 -1
- package/esm2022/core/locales/tk-TM.mjs +5 -1
- package/esm2022/core/locales/types.mjs +1 -1
- package/esm2022/core/locales/zh-CN.mjs +5 -1
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/datepicker/calendar-header.component.mjs +5 -2
- package/esm2022/datepicker/calendar.component.mjs +9 -9
- package/esm2022/datepicker/datepicker-input.directive.mjs +1 -1
- package/esm2022/datepicker/datepicker-toggle.component.mjs +8 -8
- package/esm2022/datepicker/datepicker.component.mjs +3 -3
- package/esm2022/dropdown/dropdown.component.mjs +3 -3
- package/esm2022/dynamic-translation/dynamic-translation.mjs +175 -0
- package/esm2022/dynamic-translation/index.mjs +3 -0
- package/esm2022/dynamic-translation/koobiq-components-dynamic-translation.mjs +5 -0
- package/esm2022/dynamic-translation/module.mjs +25 -0
- package/esm2022/file-upload/file-drop.mjs +1 -1
- package/esm2022/file-upload/multiple-file-upload.component.mjs +11 -11
- package/esm2022/file-upload/single-file-upload.component.mjs +11 -11
- package/esm2022/filter-bar/filter-refresher.mjs +5 -5
- package/esm2022/filter-bar/filter-reset.mjs +3 -3
- package/esm2022/filter-bar/filter-search.mjs +11 -11
- package/esm2022/filter-bar/filters.mjs +3 -3
- package/esm2022/filter-bar/pipe-add.mjs +5 -5
- package/esm2022/filter-bar/pipes/base-pipe.mjs +2 -2
- package/esm2022/filter-bar/pipes/pipe-button.mjs +7 -7
- package/esm2022/filter-bar/pipes/pipe-date.mjs +9 -1
- package/esm2022/filter-bar/pipes/pipe-datetime.mjs +9 -1
- package/esm2022/filter-bar/pipes/pipe-multi-select.mjs +4 -10
- package/esm2022/filter-bar/pipes/pipe-multi-tree-select.mjs +10 -9
- package/esm2022/filter-bar/pipes/pipe-readonly.mjs +7 -7
- package/esm2022/filter-bar/pipes/pipe-select.mjs +3 -4
- package/esm2022/filter-bar/pipes/pipe-text.mjs +8 -2
- package/esm2022/filter-bar/pipes/pipe-tree-select.mjs +9 -3
- package/esm2022/form-field/cleaner.mjs +16 -11
- package/esm2022/form-field/fieldset.mjs +2 -2
- package/esm2022/form-field/form-field.mjs +5 -5
- package/esm2022/form-field/password-hint.mjs +14 -3
- package/esm2022/form-field/password-toggle.mjs +45 -10
- package/esm2022/form-field/reactive-password-hint.mjs +18 -17
- package/esm2022/form-field/stepper.mjs +9 -9
- package/esm2022/icon/icon-button.component.mjs +2 -2
- package/esm2022/input/input-number.mjs +15 -10
- package/esm2022/markdown/markdown.component.mjs +3 -3
- package/esm2022/modal/modal.component.mjs +14 -14
- package/esm2022/modal/modal.directive.mjs +7 -5
- package/esm2022/navbar/navbar-item.component.mjs +3 -3
- package/esm2022/popover/popover-confirm.component.mjs +3 -3
- package/esm2022/popover/popover.component.mjs +3 -3
- package/esm2022/scrollbar/scrollbar.component.mjs +5 -5
- package/esm2022/select/select.component.mjs +24 -11
- package/esm2022/sidebar/sidebar.component.mjs +46 -27
- package/esm2022/sidepanel/sidepanel-container.component.mjs +15 -4
- package/esm2022/sidepanel/sidepanel-directives.mjs +5 -5
- package/esm2022/sidepanel/sidepanel-ref.mjs +8 -6
- package/esm2022/splitter/splitter.component.mjs +1 -1
- package/esm2022/tabs/tab-body.component.mjs +3 -3
- package/esm2022/tabs/tab-group.component.mjs +27 -27
- package/esm2022/tabs/tab.component.mjs +4 -4
- package/esm2022/tags/tag-input.mjs +2 -2
- package/esm2022/tags/tag-list.component.mjs +13 -13
- package/esm2022/textarea/textarea.component.mjs +6 -4
- package/esm2022/timepicker/timepicker.directive.mjs +1 -1
- package/esm2022/timezone/timezone-select.component.mjs +3 -3
- package/esm2022/tooltip/tooltip.component.mjs +3 -3
- package/esm2022/tree/tree-selection.component.mjs +4 -4
- package/esm2022/tree-select/tree-select.component.mjs +11 -9
- package/esm2022/username/constants.mjs +25 -0
- package/esm2022/username/index.mjs +6 -0
- package/esm2022/username/koobiq-components-username.mjs +5 -0
- package/esm2022/username/module.mjs +35 -0
- package/esm2022/username/types.mjs +32 -0
- package/esm2022/username/username.mjs +129 -0
- package/esm2022/username/username.pipe.mjs +92 -0
- package/fesm2022/koobiq-components-actions-panel.mjs +56 -31
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +8 -8
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +242 -0
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -0
- package/fesm2022/koobiq-components-content-panel.mjs +612 -0
- package/fesm2022/koobiq-components-content-panel.mjs.map +1 -0
- package/fesm2022/koobiq-components-core.mjs +29 -1
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +21 -18
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +2 -2
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-dynamic-translation.mjs +204 -0
- package/fesm2022/koobiq-components-dynamic-translation.mjs.map +1 -0
- package/fesm2022/koobiq-components-file-upload.mjs +20 -20
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +75 -58
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +100 -49
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +2 -2
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +14 -9
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-markdown.mjs +2 -2
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +19 -17
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +2 -2
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +4 -4
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-scrollbar.mjs +4 -4
- package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +23 -10
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +45 -26
- package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +24 -12
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +31 -31
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +13 -13
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +5 -3
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +2 -2
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +2 -2
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +10 -8
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +3 -3
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +308 -0
- package/fesm2022/koobiq-components-username.mjs.map +1 -0
- package/file-upload/_file-upload-theme.scss +1 -1
- package/file-upload/file-drop.d.ts +1 -1
- package/file-upload/multiple-file-upload.component.d.ts +1 -1
- package/file-upload/single-file-upload.component.d.ts +2 -2
- package/filter-bar/pipes/pipe-date.d.ts +3 -1
- package/filter-bar/pipes/pipe-datetime.d.ts +3 -1
- package/filter-bar/pipes/pipe-multi-select.d.ts +0 -1
- package/filter-bar/pipes/pipe-multi-tree-select.d.ts +3 -2
- package/filter-bar/pipes/pipe-select.d.ts +0 -1
- package/filter-bar/pipes/pipe-tree-select.d.ts +3 -2
- package/form-field/_form-field-theme.scss +27 -18
- package/form-field/cleaner.d.ts +4 -2
- package/form-field/cleaner.scss +6 -2
- package/form-field/form-field.scss +5 -1
- package/form-field/password-hint.d.ts +7 -0
- package/form-field/password-toggle.d.ts +23 -3
- package/form-field/password-toggle.scss +4 -8
- package/form-field/reactive-password-hint.d.ts +1 -0
- package/icon/_icon-button-theme.scss +8 -2
- package/modal/modal.component.d.ts +6 -6
- package/package.json +28 -4
- package/popover/popover-confirm.component.d.ts +1 -1
- package/popover/popover.component.d.ts +2 -2
- package/schematics/ng-add/index.js +3 -3
- package/scrollbar/scrollbar.component.d.ts +4 -4
- package/select/select.component.d.ts +14 -2
- package/sidebar/sidebar.component.d.ts +31 -5
- package/sidepanel/sidepanel-container.component.d.ts +9 -0
- package/sidepanel/sidepanel-ref.d.ts +3 -3
- package/splitter/splitter.component.d.ts +2 -2
- package/tabs/tab-group.component.d.ts +1 -1
- package/tabs/tab.component.d.ts +1 -1
- package/tags/tag-input.d.ts +1 -1
- package/tags/tag-list.component.d.ts +1 -1
- package/timepicker/timepicker.directive.d.ts +1 -1
- package/tooltip/tooltip.component.d.ts +2 -2
- package/tree/tree-selection.component.d.ts +1 -1
- package/tree-select/tree-select.component.d.ts +1 -1
- package/username/constants.d.ts +15 -0
- package/username/index.d.ts +5 -0
- package/username/module.d.ts +8 -0
- package/username/types.d.ts +62 -0
- package/username/username-tokens.scss +6 -0
- package/username/username.d.ts +68 -0
- package/username/username.pipe.d.ts +23 -0
- package/username/username.scss +107 -0
|
@@ -0,0 +1,612 @@
|
|
|
1
|
+
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { inject, ElementRef, Directive, NgZone, DestroyRef, input, output, computed, afterNextRender, Component, ChangeDetectionStrategy, ViewEncapsulation, viewChild, Renderer2, contentChild, booleanAttribute, numberAttribute, signal, NgModule } from '@angular/core';
|
|
4
|
+
import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
5
|
+
import * as i1 from '@koobiq/components/button';
|
|
6
|
+
import { KbqButtonStyles, KbqButtonModule } from '@koobiq/components/button';
|
|
7
|
+
import { KbqAnimationDurations, KbqAnimationCurves, KbqComponentColors } from '@koobiq/components/core';
|
|
8
|
+
import * as i2 from '@koobiq/components/icon';
|
|
9
|
+
import { KbqIconModule } from '@koobiq/components/icon';
|
|
10
|
+
import * as i3 from '@koobiq/components/scrollbar';
|
|
11
|
+
import { KbqScrollbar, KbqScrollbarModule } from '@koobiq/components/scrollbar';
|
|
12
|
+
import { SizeL } from '@koobiq/design-tokens';
|
|
13
|
+
import { DOCUMENT } from '@angular/common';
|
|
14
|
+
import { fromEvent } from 'rxjs';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @docs-private
|
|
18
|
+
*
|
|
19
|
+
* Directive (container) sets whether the element is resizable.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
*
|
|
23
|
+
* ```html
|
|
24
|
+
* <div kbqResizable>
|
|
25
|
+
* <div [kbqResizer]="[1, 0]"></div>
|
|
26
|
+
* </div>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
class KbqResizable {
|
|
30
|
+
constructor() {
|
|
31
|
+
/**
|
|
32
|
+
* @docs-private
|
|
33
|
+
*/
|
|
34
|
+
this.elementRef = inject(ElementRef);
|
|
35
|
+
}
|
|
36
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqResizable, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
37
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: KbqResizable, isStandalone: true, selector: "[kbqResizable]", host: { classAttribute: "kbq-resizable" }, exportAs: ["kbqResizable"], ngImport: i0 }); }
|
|
38
|
+
}
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqResizable, decorators: [{
|
|
40
|
+
type: Directive,
|
|
41
|
+
args: [{
|
|
42
|
+
standalone: true,
|
|
43
|
+
selector: '[kbqResizable]',
|
|
44
|
+
exportAs: 'kbqResizable',
|
|
45
|
+
host: {
|
|
46
|
+
class: 'kbq-resizable'
|
|
47
|
+
}
|
|
48
|
+
}]
|
|
49
|
+
}] });
|
|
50
|
+
/**
|
|
51
|
+
* @docs-private
|
|
52
|
+
*
|
|
53
|
+
* Directive which defines element resizing direction.
|
|
54
|
+
*/
|
|
55
|
+
class KbqResizer {
|
|
56
|
+
constructor() {
|
|
57
|
+
this.elementRef = inject(ElementRef);
|
|
58
|
+
this.resizable = inject(KbqResizable);
|
|
59
|
+
this.zone = inject(NgZone);
|
|
60
|
+
this.document = inject(DOCUMENT);
|
|
61
|
+
this.destroyRef = inject(DestroyRef);
|
|
62
|
+
this.x = NaN;
|
|
63
|
+
this.y = NaN;
|
|
64
|
+
this.width = 0;
|
|
65
|
+
this.height = 0;
|
|
66
|
+
/**
|
|
67
|
+
* Direction of element resizing.
|
|
68
|
+
*/
|
|
69
|
+
this.direction = input.required({ alias: 'kbqResizer' });
|
|
70
|
+
/**
|
|
71
|
+
* Emits the new size of the element after resizing.
|
|
72
|
+
*/
|
|
73
|
+
this.sizeChange = output();
|
|
74
|
+
/**
|
|
75
|
+
* @docs-private
|
|
76
|
+
*/
|
|
77
|
+
this.cursor = computed(() => {
|
|
78
|
+
const [x, y] = this.direction();
|
|
79
|
+
if (!x) {
|
|
80
|
+
return 'ns-resize';
|
|
81
|
+
}
|
|
82
|
+
if (!y) {
|
|
83
|
+
return 'ew-resize';
|
|
84
|
+
}
|
|
85
|
+
if (x * y > 0) {
|
|
86
|
+
return 'nwse-resize';
|
|
87
|
+
}
|
|
88
|
+
return 'nesw-resize';
|
|
89
|
+
});
|
|
90
|
+
afterNextRender(() => {
|
|
91
|
+
this.zone.runOutsideAngular(() => {
|
|
92
|
+
fromEvent(this.elementRef.nativeElement, 'pointerdown')
|
|
93
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
94
|
+
.subscribe((event) => this.handleElementPointerDown(event));
|
|
95
|
+
fromEvent(this.document, 'pointermove')
|
|
96
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
97
|
+
.subscribe((event) => this.handleDocumentPointerMove(event));
|
|
98
|
+
fromEvent(this.document, 'pointerup')
|
|
99
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
100
|
+
.subscribe((event) => this.handleDocumentPointerUp(event));
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
handleElementPointerDown(event) {
|
|
105
|
+
event.preventDefault();
|
|
106
|
+
this.x = event.x;
|
|
107
|
+
this.y = event.y;
|
|
108
|
+
const element = this.resizable.elementRef.nativeElement;
|
|
109
|
+
this.width = element.clientWidth;
|
|
110
|
+
this.height = element.clientHeight;
|
|
111
|
+
}
|
|
112
|
+
handleDocumentPointerMove(event) {
|
|
113
|
+
if (!event.buttons)
|
|
114
|
+
return this.handleDocumentPointerUp(event);
|
|
115
|
+
this.updateSize(event);
|
|
116
|
+
}
|
|
117
|
+
handleDocumentPointerUp(_event) {
|
|
118
|
+
this.x = NaN;
|
|
119
|
+
}
|
|
120
|
+
updateSize({ x, y }) {
|
|
121
|
+
if (Number.isNaN(this.x))
|
|
122
|
+
return;
|
|
123
|
+
const { style } = this.resizable.elementRef.nativeElement;
|
|
124
|
+
const [directionX, directionY] = this.direction();
|
|
125
|
+
const width = this.width + directionX * (x - this.x);
|
|
126
|
+
const height = this.height + directionY * (y - this.y);
|
|
127
|
+
if (directionX)
|
|
128
|
+
style.width = `${width}px`;
|
|
129
|
+
if (directionY)
|
|
130
|
+
style.height = `${height}px`;
|
|
131
|
+
this.sizeChange.emit({ width, height });
|
|
132
|
+
}
|
|
133
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqResizer, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
134
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: KbqResizer, isStandalone: true, selector: "[kbqResizer]", inputs: { direction: { classPropertyName: "direction", publicName: "kbqResizer", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { sizeChange: "sizeChange" }, host: { properties: { "style.cursor": "cursor()" }, classAttribute: "kbq-resizer" }, exportAs: ["kbqResizer"], ngImport: i0 }); }
|
|
135
|
+
}
|
|
136
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqResizer, decorators: [{
|
|
137
|
+
type: Directive,
|
|
138
|
+
args: [{
|
|
139
|
+
standalone: true,
|
|
140
|
+
selector: '[kbqResizer]',
|
|
141
|
+
exportAs: 'kbqResizer',
|
|
142
|
+
host: {
|
|
143
|
+
class: 'kbq-resizer',
|
|
144
|
+
'[style.cursor]': 'cursor()'
|
|
145
|
+
}
|
|
146
|
+
}]
|
|
147
|
+
}], ctorParameters: () => [] });
|
|
148
|
+
|
|
149
|
+
const KBQ_CONTENT_PANEL_CONTAINER_CONTENT_ANIMATION = trigger('contentAnimation', [
|
|
150
|
+
state('false', style({ 'margin-right': 0 })),
|
|
151
|
+
state('true', style({ 'margin-right': '{{ marginRight }}px' }), { params: { marginRight: 0 } }),
|
|
152
|
+
transition('true => false', [animate(`${KbqAnimationDurations.Entering} ${KbqAnimationCurves.AccelerationCurve}`)]),
|
|
153
|
+
transition('false => true', [animate(`${KbqAnimationDurations.Exiting} ${KbqAnimationCurves.DecelerationCurve}`)])
|
|
154
|
+
]);
|
|
155
|
+
const KBQ_CONTENT_PANEL_CONTAINER_PANEL_ANIMATION = trigger('panelAnimation', [
|
|
156
|
+
transition(':enter', [
|
|
157
|
+
style({ transform: 'translateX(100%)' }),
|
|
158
|
+
animate(`${KbqAnimationDurations.Entering} ${KbqAnimationCurves.DecelerationCurve}`, style({ transform: 'translateX(0%)' }))
|
|
159
|
+
]),
|
|
160
|
+
transition(':leave', [
|
|
161
|
+
animate(`${KbqAnimationDurations.Exiting} ${KbqAnimationCurves.AccelerationCurve}`, style({ transform: 'translateX(100%)' }))
|
|
162
|
+
])
|
|
163
|
+
]);
|
|
164
|
+
class KbqContentPanelAside {
|
|
165
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqContentPanelAside, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
166
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: KbqContentPanelAside, isStandalone: true, selector: "kbq-content-panel-aside", host: { classAttribute: "kbq-content-panel-aside" }, exportAs: ["kbqContentPanelAside"], ngImport: i0, template: `
|
|
167
|
+
<ng-content />
|
|
168
|
+
`, isInline: true, styles: [".kbq-content-panel-aside{display:flex;flex-direction:column;gap:var(--kbq-size-s);padding:var(--kbq-size-l) var(--kbq-size-m);border-top-left-radius:inherit;border-bottom-left-radius:inherit;border-right:inherit}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
169
|
+
}
|
|
170
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqContentPanelAside, decorators: [{
|
|
171
|
+
type: Component,
|
|
172
|
+
args: [{ standalone: true, selector: 'kbq-content-panel-aside', exportAs: 'kbqContentPanelAside', template: `
|
|
173
|
+
<ng-content />
|
|
174
|
+
`, host: {
|
|
175
|
+
class: 'kbq-content-panel-aside'
|
|
176
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: [".kbq-content-panel-aside{display:flex;flex-direction:column;gap:var(--kbq-size-s);padding:var(--kbq-size-l) var(--kbq-size-m);border-top-left-radius:inherit;border-bottom-left-radius:inherit;border-right:inherit}\n"] }]
|
|
177
|
+
}] });
|
|
178
|
+
class KbqContentPanelHeaderTitle {
|
|
179
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqContentPanelHeaderTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
180
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: KbqContentPanelHeaderTitle, isStandalone: true, selector: "[kbqContentPanelHeaderTitle]", host: { classAttribute: "kbq-content-panel-header-title" }, exportAs: ["kbqContentPanelHeaderTitle"], ngImport: i0 }); }
|
|
181
|
+
}
|
|
182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqContentPanelHeaderTitle, decorators: [{
|
|
183
|
+
type: Directive,
|
|
184
|
+
args: [{
|
|
185
|
+
standalone: true,
|
|
186
|
+
selector: '[kbqContentPanelHeaderTitle]',
|
|
187
|
+
exportAs: 'kbqContentPanelHeaderTitle',
|
|
188
|
+
host: {
|
|
189
|
+
class: 'kbq-content-panel-header-title'
|
|
190
|
+
}
|
|
191
|
+
}]
|
|
192
|
+
}] });
|
|
193
|
+
class KbqContentPanelHeaderActions {
|
|
194
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqContentPanelHeaderActions, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
195
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: KbqContentPanelHeaderActions, isStandalone: true, selector: "[kbqContentPanelHeaderActions]", host: { classAttribute: "kbq-content-panel-header-actions" }, exportAs: ["kbqContentPanelHeaderActions"], ngImport: i0 }); }
|
|
196
|
+
}
|
|
197
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqContentPanelHeaderActions, decorators: [{
|
|
198
|
+
type: Directive,
|
|
199
|
+
args: [{
|
|
200
|
+
standalone: true,
|
|
201
|
+
selector: '[kbqContentPanelHeaderActions]',
|
|
202
|
+
exportAs: 'kbqContentPanelHeaderActions',
|
|
203
|
+
host: {
|
|
204
|
+
class: 'kbq-content-panel-header-actions'
|
|
205
|
+
}
|
|
206
|
+
}]
|
|
207
|
+
}] });
|
|
208
|
+
class KbqContentPanelHeader {
|
|
209
|
+
constructor() {
|
|
210
|
+
/**
|
|
211
|
+
* @docs-private
|
|
212
|
+
*/
|
|
213
|
+
this.contentPanelContainer = inject(KbqContentPanelContainer);
|
|
214
|
+
/**
|
|
215
|
+
* @docs-private
|
|
216
|
+
*/
|
|
217
|
+
this.buttonStyles = KbqButtonStyles;
|
|
218
|
+
/**
|
|
219
|
+
* @docs-private
|
|
220
|
+
*/
|
|
221
|
+
this.componentColors = KbqComponentColors;
|
|
222
|
+
}
|
|
223
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqContentPanelHeader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
224
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: KbqContentPanelHeader, isStandalone: true, selector: "kbq-content-panel-header", host: { classAttribute: "kbq-content-panel-header" }, ngImport: i0, template: `
|
|
225
|
+
<div class="kbq-content-panel-header__wrapper">
|
|
226
|
+
<ng-content select="[kbqContentPanelHeaderTitle]" />
|
|
227
|
+
<div class="kbq-content-panel-header__actions">
|
|
228
|
+
<ng-content select="[kbqContentPanelHeaderActions]" />
|
|
229
|
+
@if (!contentPanelContainer.disableClose()) {
|
|
230
|
+
<button
|
|
231
|
+
class="kbq-content-panel-header__close-button"
|
|
232
|
+
kbq-button
|
|
233
|
+
type="button"
|
|
234
|
+
[color]="componentColors.Contrast"
|
|
235
|
+
[kbqStyle]="buttonStyles.Transparent"
|
|
236
|
+
(click)="contentPanelContainer.close()"
|
|
237
|
+
>
|
|
238
|
+
<i kbq-icon="kbq-xmark_16"></i>
|
|
239
|
+
</button>
|
|
240
|
+
}
|
|
241
|
+
</div>
|
|
242
|
+
</div>
|
|
243
|
+
<ng-content />
|
|
244
|
+
`, isInline: true, styles: [".kbq-content-panel-header{display:flex;flex-direction:column;padding:var(--kbq-size-l) var(--kbq-content-panel-vertical-padding)}.kbq-content-panel-header .kbq-content-panel-header__wrapper{display:flex;justify-content:space-between}.kbq-content-panel-header .kbq-content-panel-header__actions{display:flex;justify-content:flex-end}.kbq-content-panel-header .kbq-content-panel-header__close-button{margin-left:var(--kbq-size-m)}.kbq-content-panel-header .kbq-content-panel-header-title{font-size:var(--kbq-typography-title-font-size);font-style:var(--kbq-typography-title-font-style);font-weight:var(--kbq-typography-title-font-weight);line-height:var(--kbq-typography-title-line-height);font-family:var(--kbq-typography-title-font-family);text-transform:var(--kbq-typography-title-text-transform);font-feature-settings:var(--kbq-typography-title-font-feature-settings);letter-spacing:var(--kbq-typography-title-letter-spacing)}.kbq-content-panel-header .kbq-content-panel-header-actions{display:flex;gap:var(--kbq-size-s)}\n"], dependencies: [{ kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i2.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
245
|
+
}
|
|
246
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqContentPanelHeader, decorators: [{
|
|
247
|
+
type: Component,
|
|
248
|
+
args: [{ standalone: true, imports: [KbqButtonModule, KbqIconModule], selector: 'kbq-content-panel-header', host: {
|
|
249
|
+
class: 'kbq-content-panel-header'
|
|
250
|
+
}, template: `
|
|
251
|
+
<div class="kbq-content-panel-header__wrapper">
|
|
252
|
+
<ng-content select="[kbqContentPanelHeaderTitle]" />
|
|
253
|
+
<div class="kbq-content-panel-header__actions">
|
|
254
|
+
<ng-content select="[kbqContentPanelHeaderActions]" />
|
|
255
|
+
@if (!contentPanelContainer.disableClose()) {
|
|
256
|
+
<button
|
|
257
|
+
class="kbq-content-panel-header__close-button"
|
|
258
|
+
kbq-button
|
|
259
|
+
type="button"
|
|
260
|
+
[color]="componentColors.Contrast"
|
|
261
|
+
[kbqStyle]="buttonStyles.Transparent"
|
|
262
|
+
(click)="contentPanelContainer.close()"
|
|
263
|
+
>
|
|
264
|
+
<i kbq-icon="kbq-xmark_16"></i>
|
|
265
|
+
</button>
|
|
266
|
+
}
|
|
267
|
+
</div>
|
|
268
|
+
</div>
|
|
269
|
+
<ng-content />
|
|
270
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: [".kbq-content-panel-header{display:flex;flex-direction:column;padding:var(--kbq-size-l) var(--kbq-content-panel-vertical-padding)}.kbq-content-panel-header .kbq-content-panel-header__wrapper{display:flex;justify-content:space-between}.kbq-content-panel-header .kbq-content-panel-header__actions{display:flex;justify-content:flex-end}.kbq-content-panel-header .kbq-content-panel-header__close-button{margin-left:var(--kbq-size-m)}.kbq-content-panel-header .kbq-content-panel-header-title{font-size:var(--kbq-typography-title-font-size);font-style:var(--kbq-typography-title-font-style);font-weight:var(--kbq-typography-title-font-weight);line-height:var(--kbq-typography-title-line-height);font-family:var(--kbq-typography-title-font-family);text-transform:var(--kbq-typography-title-text-transform);font-feature-settings:var(--kbq-typography-title-font-feature-settings);letter-spacing:var(--kbq-typography-title-letter-spacing)}.kbq-content-panel-header .kbq-content-panel-header-actions{display:flex;gap:var(--kbq-size-s)}\n"] }]
|
|
271
|
+
}] });
|
|
272
|
+
class KbqContentPanelBody {
|
|
273
|
+
constructor() {
|
|
274
|
+
/**
|
|
275
|
+
* @docs-private
|
|
276
|
+
*/
|
|
277
|
+
this.scrollbar = viewChild.required(KbqScrollbar);
|
|
278
|
+
}
|
|
279
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqContentPanelBody, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
280
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.13", type: KbqContentPanelBody, isStandalone: true, selector: "kbq-content-panel-body", host: { classAttribute: "kbq-content-panel-body" }, viewQueries: [{ propertyName: "scrollbar", first: true, predicate: KbqScrollbar, descendants: true, isSignal: true }], exportAs: ["kbqContentPanelBody"], ngImport: i0, template: `
|
|
281
|
+
<kbq-scrollbar class="kbq-content-panel-body__content">
|
|
282
|
+
<ng-content />
|
|
283
|
+
</kbq-scrollbar>
|
|
284
|
+
`, isInline: true, styles: [".kbq-content-panel-body{overflow:hidden;flex-grow:1}.kbq-content-panel-body .kbq-content-panel-body__content{padding:0 var(--kbq-content-panel-vertical-padding);height:100%}\n"], dependencies: [{ kind: "ngmodule", type: KbqScrollbarModule }, { kind: "component", type: i3.KbqScrollbar, selector: "kbq-scrollbar, [kbq-scrollbar]", inputs: ["initializationTarget", "options", "events", "defer"], outputs: ["onInitialize", "onUpdate", "onDestroy", "onScroll"], exportAs: ["kbqScrollbar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
285
|
+
}
|
|
286
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqContentPanelBody, decorators: [{
|
|
287
|
+
type: Component,
|
|
288
|
+
args: [{ standalone: true, imports: [KbqScrollbarModule], selector: 'kbq-content-panel-body', exportAs: 'kbqContentPanelBody', host: {
|
|
289
|
+
class: 'kbq-content-panel-body'
|
|
290
|
+
}, template: `
|
|
291
|
+
<kbq-scrollbar class="kbq-content-panel-body__content">
|
|
292
|
+
<ng-content />
|
|
293
|
+
</kbq-scrollbar>
|
|
294
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: [".kbq-content-panel-body{overflow:hidden;flex-grow:1}.kbq-content-panel-body .kbq-content-panel-body__content{padding:0 var(--kbq-content-panel-vertical-padding);height:100%}\n"] }]
|
|
295
|
+
}] });
|
|
296
|
+
class KbqContentPanelFooter {
|
|
297
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqContentPanelFooter, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
298
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: KbqContentPanelFooter, isStandalone: true, selector: "kbq-content-panel-footer", host: { classAttribute: "kbq-content-panel-footer" }, ngImport: i0, template: `
|
|
299
|
+
<ng-content />
|
|
300
|
+
`, isInline: true, styles: [".kbq-content-panel-footer{display:flex;gap:var(--kbq-size-l);padding:var(--kbq-size-l) var(--kbq-content-panel-vertical-padding)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
301
|
+
}
|
|
302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqContentPanelFooter, decorators: [{
|
|
303
|
+
type: Component,
|
|
304
|
+
args: [{ standalone: true, selector: 'kbq-content-panel-footer', host: {
|
|
305
|
+
class: 'kbq-content-panel-footer'
|
|
306
|
+
}, template: `
|
|
307
|
+
<ng-content />
|
|
308
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: [".kbq-content-panel-footer{display:flex;gap:var(--kbq-size-l);padding:var(--kbq-size-l) var(--kbq-content-panel-vertical-padding)}\n"] }]
|
|
309
|
+
}] });
|
|
310
|
+
class KbqContentPanel {
|
|
311
|
+
constructor() {
|
|
312
|
+
this.destroyRef = inject(DestroyRef);
|
|
313
|
+
this.renderer = inject(Renderer2);
|
|
314
|
+
this.elementRef = inject(ElementRef);
|
|
315
|
+
this.contentPanelBody = contentChild(KbqContentPanelBody);
|
|
316
|
+
afterNextRender(() => this.handleContentBodyScroll());
|
|
317
|
+
}
|
|
318
|
+
handleContentBodyScroll() {
|
|
319
|
+
const contentPanelBody = this.contentPanelBody();
|
|
320
|
+
if (!contentPanelBody)
|
|
321
|
+
return;
|
|
322
|
+
contentPanelBody
|
|
323
|
+
.scrollbar()
|
|
324
|
+
.onScroll.pipe(takeUntilDestroyed(this.destroyRef))
|
|
325
|
+
.subscribe(([instance]) => {
|
|
326
|
+
const { scrollTop, scrollHeight, clientHeight } = instance.elements().scrollOffsetElement;
|
|
327
|
+
this.setupContentHeaderShadow(scrollTop >= 1);
|
|
328
|
+
this.setupContentFooterShadow(scrollHeight - (scrollTop + clientHeight) >= 1);
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
setupContentHeaderShadow(shouldShowShadow) {
|
|
332
|
+
const className = 'kbq-content-panel_header-with-shadow';
|
|
333
|
+
if (shouldShowShadow) {
|
|
334
|
+
this.renderer.addClass(this.elementRef.nativeElement, className);
|
|
335
|
+
}
|
|
336
|
+
else {
|
|
337
|
+
this.renderer.removeClass(this.elementRef.nativeElement, className);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
setupContentFooterShadow(shouldShowShadow) {
|
|
341
|
+
const className = 'kbq-content-panel_footer-with-shadow';
|
|
342
|
+
if (shouldShowShadow) {
|
|
343
|
+
this.renderer.addClass(this.elementRef.nativeElement, className);
|
|
344
|
+
}
|
|
345
|
+
else {
|
|
346
|
+
this.renderer.removeClass(this.elementRef.nativeElement, className);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqContentPanel, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
350
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.13", type: KbqContentPanel, isStandalone: true, selector: "kbq-content-panel", host: { classAttribute: "kbq-content-panel" }, queries: [{ propertyName: "contentPanelBody", first: true, predicate: KbqContentPanelBody, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
351
|
+
<ng-content select="kbq-content-panel-aside" />
|
|
352
|
+
<div class="kbq-content-panel__content">
|
|
353
|
+
<ng-content select="kbq-content-panel-header" />
|
|
354
|
+
<ng-content select="kbq-content-panel-body" />
|
|
355
|
+
<ng-content select="kbq-content-panel-footer" />
|
|
356
|
+
</div>
|
|
357
|
+
`, isInline: true, styles: [".kbq-content-panel-container{--kbq-content-panel-resizer-width: var(--kbq-size-l);--kbq-content-panel-border-radius: var(--kbq-size-l);--kbq-content-panel-background-color: var(--kbq-background-card);--kbq-content-panel-border: var(--kbq-size-border-width) solid var(--kbq-line-contrast-less);--kbq-content-panel-header-overflow-box-shadow: var(--kbq-shadow-overflow-normal-bottom);--kbq-content-panel-footer-overflow-box-shadow: var(--kbq-shadow-overflow-normal-top);--kbq-content-panel-vertical-padding: var(--kbq-size-xxl)}\n", ".kbq-content-panel{display:flex;border-radius:var(--kbq-content-panel-border-radius);background-color:var(--kbq-content-panel-background-color);border:var(--kbq-content-panel-border);height:100%;box-sizing:border-box;position:relative}.kbq-content-panel.kbq-content-panel_header-with-shadow .kbq-content-panel-header{box-shadow:var(--kbq-content-panel-header-overflow-box-shadow)}.kbq-content-panel.kbq-content-panel_footer-with-shadow .kbq-content-panel-footer{box-shadow:var(--kbq-content-panel-footer-overflow-box-shadow)}.kbq-content-panel .kbq-content-panel__content{display:flex;flex:1;flex-direction:column;border-top-right-radius:inherit;border-bottom-right-radius:inherit}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
358
|
+
}
|
|
359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqContentPanel, decorators: [{
|
|
360
|
+
type: Component,
|
|
361
|
+
args: [{ standalone: true, selector: 'kbq-content-panel', host: {
|
|
362
|
+
class: 'kbq-content-panel'
|
|
363
|
+
}, template: `
|
|
364
|
+
<ng-content select="kbq-content-panel-aside" />
|
|
365
|
+
<div class="kbq-content-panel__content">
|
|
366
|
+
<ng-content select="kbq-content-panel-header" />
|
|
367
|
+
<ng-content select="kbq-content-panel-body" />
|
|
368
|
+
<ng-content select="kbq-content-panel-footer" />
|
|
369
|
+
</div>
|
|
370
|
+
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".kbq-content-panel-container{--kbq-content-panel-resizer-width: var(--kbq-size-l);--kbq-content-panel-border-radius: var(--kbq-size-l);--kbq-content-panel-background-color: var(--kbq-background-card);--kbq-content-panel-border: var(--kbq-size-border-width) solid var(--kbq-line-contrast-less);--kbq-content-panel-header-overflow-box-shadow: var(--kbq-shadow-overflow-normal-bottom);--kbq-content-panel-footer-overflow-box-shadow: var(--kbq-shadow-overflow-normal-top);--kbq-content-panel-vertical-padding: var(--kbq-size-xxl)}\n", ".kbq-content-panel{display:flex;border-radius:var(--kbq-content-panel-border-radius);background-color:var(--kbq-content-panel-background-color);border:var(--kbq-content-panel-border);height:100%;box-sizing:border-box;position:relative}.kbq-content-panel.kbq-content-panel_header-with-shadow .kbq-content-panel-header{box-shadow:var(--kbq-content-panel-header-overflow-box-shadow)}.kbq-content-panel.kbq-content-panel_footer-with-shadow .kbq-content-panel-footer{box-shadow:var(--kbq-content-panel-footer-overflow-box-shadow)}.kbq-content-panel .kbq-content-panel__content{display:flex;flex:1;flex-direction:column;border-top-right-radius:inherit;border-bottom-right-radius:inherit}\n"] }]
|
|
371
|
+
}], ctorParameters: () => [] });
|
|
372
|
+
class KbqContentPanelContainer {
|
|
373
|
+
constructor() {
|
|
374
|
+
/**
|
|
375
|
+
* Whether the content panel is opened.
|
|
376
|
+
*
|
|
377
|
+
* @default false
|
|
378
|
+
*/
|
|
379
|
+
this.opened = input(false, { transform: booleanAttribute });
|
|
380
|
+
/**
|
|
381
|
+
* Emits event when the content panel opened state is changed.
|
|
382
|
+
*/
|
|
383
|
+
this.openedChange = output();
|
|
384
|
+
/**
|
|
385
|
+
* Whether the content panel can not be closed by clicking on the close button or pressing the ESCAPE key.
|
|
386
|
+
*
|
|
387
|
+
* @default false
|
|
388
|
+
*/
|
|
389
|
+
this.disableClose = input(false, { transform: booleanAttribute });
|
|
390
|
+
/**
|
|
391
|
+
* Whether the content panel can not be closed by pressing the ESCAPE key.
|
|
392
|
+
*/
|
|
393
|
+
this.disableCloseByEscape = input(this.disableClose(), { transform: booleanAttribute });
|
|
394
|
+
/**
|
|
395
|
+
* Whether the content panel resizer is disabled.
|
|
396
|
+
*/
|
|
397
|
+
this.disableResizer = input(false, { transform: booleanAttribute });
|
|
398
|
+
/**
|
|
399
|
+
* Minimum width of the `KbqContentPanel`.
|
|
400
|
+
*
|
|
401
|
+
* @default 480
|
|
402
|
+
*/
|
|
403
|
+
this.minWidth = input(480, { transform: numberAttribute });
|
|
404
|
+
/**
|
|
405
|
+
* Width of the `KbqContentPanel`.
|
|
406
|
+
*
|
|
407
|
+
* @default 640
|
|
408
|
+
*/
|
|
409
|
+
this.width = input(640, { transform: numberAttribute });
|
|
410
|
+
/**
|
|
411
|
+
* Max width of the `KbqContentPanel`.
|
|
412
|
+
*
|
|
413
|
+
* @default 800
|
|
414
|
+
*/
|
|
415
|
+
this.maxWidth = input(800, { transform: numberAttribute });
|
|
416
|
+
/**
|
|
417
|
+
* @docs-private
|
|
418
|
+
*/
|
|
419
|
+
this.openedState = signal(this.opened());
|
|
420
|
+
/**
|
|
421
|
+
* @docs-private
|
|
422
|
+
*/
|
|
423
|
+
this.widthState = signal(this.width());
|
|
424
|
+
/**
|
|
425
|
+
* Whether the content panel is opened.
|
|
426
|
+
*/
|
|
427
|
+
this.isOpened = computed(() => this.openedState());
|
|
428
|
+
/**
|
|
429
|
+
* @docs-private
|
|
430
|
+
*/
|
|
431
|
+
this.contentAnimationState = computed(() => {
|
|
432
|
+
return {
|
|
433
|
+
value: this.openedState(),
|
|
434
|
+
params: { marginRight: this.widthState() + (parseInt(SizeL) || 16) }
|
|
435
|
+
};
|
|
436
|
+
});
|
|
437
|
+
// TODO: Should use linked signal
|
|
438
|
+
toObservable(this.opened)
|
|
439
|
+
.pipe(takeUntilDestroyed())
|
|
440
|
+
.subscribe((opened) => {
|
|
441
|
+
this.openedState.set(opened);
|
|
442
|
+
});
|
|
443
|
+
// TODO: Should use linked signal
|
|
444
|
+
toObservable(this.width)
|
|
445
|
+
.pipe(takeUntilDestroyed())
|
|
446
|
+
.subscribe((width) => {
|
|
447
|
+
this.widthState.set(width);
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Toggles the content panel opened state.
|
|
452
|
+
*/
|
|
453
|
+
toggle() {
|
|
454
|
+
this.openedState.update((state) => !state);
|
|
455
|
+
this.openedChange.emit(this.openedState());
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* Opens the content panel.
|
|
459
|
+
*/
|
|
460
|
+
open() {
|
|
461
|
+
if (this.openedState())
|
|
462
|
+
return;
|
|
463
|
+
this.openedState.set(true);
|
|
464
|
+
this.openedChange.emit(this.openedState());
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Closes the content panel.
|
|
468
|
+
*/
|
|
469
|
+
close() {
|
|
470
|
+
if (!this.openedState())
|
|
471
|
+
return;
|
|
472
|
+
this.openedState.set(false);
|
|
473
|
+
this.openedChange.emit(this.openedState());
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* @docs-private
|
|
477
|
+
*/
|
|
478
|
+
handleResizerDBLClick(event) {
|
|
479
|
+
event.preventDefault();
|
|
480
|
+
this.widthState.set(this.width());
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* @docs-private
|
|
484
|
+
*/
|
|
485
|
+
handleResizerSizeChange({ width }) {
|
|
486
|
+
if (width > this.maxWidth())
|
|
487
|
+
return this.widthState.set(this.maxWidth());
|
|
488
|
+
if (width < this.minWidth())
|
|
489
|
+
return this.widthState.set(this.minWidth());
|
|
490
|
+
this.widthState.set(width);
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* @docs-private
|
|
494
|
+
*/
|
|
495
|
+
handleEscapeKeydown(event) {
|
|
496
|
+
if (!this.openedState() || this.disableClose() || this.disableCloseByEscape())
|
|
497
|
+
return;
|
|
498
|
+
event.preventDefault();
|
|
499
|
+
event.stopPropagation();
|
|
500
|
+
this.close();
|
|
501
|
+
}
|
|
502
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqContentPanelContainer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
503
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: KbqContentPanelContainer, isStandalone: true, selector: "kbq-content-panel-container", inputs: { opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null }, disableClose: { classPropertyName: "disableClose", publicName: "disableClose", isSignal: true, isRequired: false, transformFunction: null }, disableCloseByEscape: { classPropertyName: "disableCloseByEscape", publicName: "disableCloseByEscape", isSignal: true, isRequired: false, transformFunction: null }, disableResizer: { classPropertyName: "disableResizer", publicName: "disableResizer", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openedChange: "openedChange" }, host: { listeners: { "keydown.escape": "handleEscapeKeydown($event)" }, properties: { "class.kbq-content-panel-container__opened": "openedState()" }, classAttribute: "kbq-content-panel-container" }, exportAs: ["kbqContentPanelContainer"], ngImport: i0, template: `
|
|
504
|
+
<kbq-scrollbar class="kbq-content-panel-container__content" [@contentAnimation]="contentAnimationState()">
|
|
505
|
+
<ng-content />
|
|
506
|
+
</kbq-scrollbar>
|
|
507
|
+
@if (openedState()) {
|
|
508
|
+
<div
|
|
509
|
+
class="kbq-content-panel-container__panel"
|
|
510
|
+
kbqResizable
|
|
511
|
+
@panelAnimation
|
|
512
|
+
[style.min-width.px]="minWidth()"
|
|
513
|
+
[style.width.px]="widthState()"
|
|
514
|
+
[style.max-width.px]="maxWidth()"
|
|
515
|
+
>
|
|
516
|
+
@if (!disableResizer()) {
|
|
517
|
+
<div
|
|
518
|
+
class="kbq-content-panel-container__panel-resizer"
|
|
519
|
+
[kbqResizer]="[-1, 0]"
|
|
520
|
+
(sizeChange)="handleResizerSizeChange($event)"
|
|
521
|
+
(dblclick)="handleResizerDBLClick($event)"
|
|
522
|
+
></div>
|
|
523
|
+
}
|
|
524
|
+
<ng-content select="kbq-content-panel" />
|
|
525
|
+
</div>
|
|
526
|
+
}
|
|
527
|
+
`, isInline: true, styles: [".kbq-content-panel-container{display:flex;gap:var(--kbq-size-l);overflow:hidden;position:relative;box-sizing:border-box;height:100%}.kbq-content-panel-container .kbq-content-panel-container__content{flex-grow:1;height:100%}.kbq-content-panel-container .kbq-content-panel-container__panel{position:absolute;right:0;top:0;padding:0 var(--kbq-size-s) var(--kbq-size-s) 0;display:flex;height:100%;box-sizing:border-box}.kbq-content-panel-container .kbq-content-panel-container__panel-resizer{position:absolute;top:0;left:calc(var(--kbq-content-panel-resizer-width) / -2);width:var(--kbq-content-panel-resizer-width);height:100%;z-index:2}\n"], dependencies: [{ kind: "directive", type: KbqResizable, selector: "[kbqResizable]", exportAs: ["kbqResizable"] }, { kind: "directive", type: KbqResizer, selector: "[kbqResizer]", inputs: ["kbqResizer"], outputs: ["sizeChange"], exportAs: ["kbqResizer"] }, { kind: "ngmodule", type: KbqScrollbarModule }, { kind: "component", type: i3.KbqScrollbar, selector: "kbq-scrollbar, [kbq-scrollbar]", inputs: ["initializationTarget", "options", "events", "defer"], outputs: ["onInitialize", "onUpdate", "onDestroy", "onScroll"], exportAs: ["kbqScrollbar"] }], animations: [
|
|
528
|
+
KBQ_CONTENT_PANEL_CONTAINER_CONTENT_ANIMATION,
|
|
529
|
+
KBQ_CONTENT_PANEL_CONTAINER_PANEL_ANIMATION
|
|
530
|
+
], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
531
|
+
}
|
|
532
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqContentPanelContainer, decorators: [{
|
|
533
|
+
type: Component,
|
|
534
|
+
args: [{ standalone: true, imports: [KbqResizable, KbqResizer, KbqScrollbarModule], selector: 'kbq-content-panel-container', exportAs: 'kbqContentPanelContainer', host: {
|
|
535
|
+
class: 'kbq-content-panel-container',
|
|
536
|
+
'[class.kbq-content-panel-container__opened]': 'openedState()',
|
|
537
|
+
'(keydown.escape)': 'handleEscapeKeydown($event)'
|
|
538
|
+
}, template: `
|
|
539
|
+
<kbq-scrollbar class="kbq-content-panel-container__content" [@contentAnimation]="contentAnimationState()">
|
|
540
|
+
<ng-content />
|
|
541
|
+
</kbq-scrollbar>
|
|
542
|
+
@if (openedState()) {
|
|
543
|
+
<div
|
|
544
|
+
class="kbq-content-panel-container__panel"
|
|
545
|
+
kbqResizable
|
|
546
|
+
@panelAnimation
|
|
547
|
+
[style.min-width.px]="minWidth()"
|
|
548
|
+
[style.width.px]="widthState()"
|
|
549
|
+
[style.max-width.px]="maxWidth()"
|
|
550
|
+
>
|
|
551
|
+
@if (!disableResizer()) {
|
|
552
|
+
<div
|
|
553
|
+
class="kbq-content-panel-container__panel-resizer"
|
|
554
|
+
[kbqResizer]="[-1, 0]"
|
|
555
|
+
(sizeChange)="handleResizerSizeChange($event)"
|
|
556
|
+
(dblclick)="handleResizerDBLClick($event)"
|
|
557
|
+
></div>
|
|
558
|
+
}
|
|
559
|
+
<ng-content select="kbq-content-panel" />
|
|
560
|
+
</div>
|
|
561
|
+
}
|
|
562
|
+
`, animations: [
|
|
563
|
+
KBQ_CONTENT_PANEL_CONTAINER_CONTENT_ANIMATION,
|
|
564
|
+
KBQ_CONTENT_PANEL_CONTAINER_PANEL_ANIMATION
|
|
565
|
+
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".kbq-content-panel-container{display:flex;gap:var(--kbq-size-l);overflow:hidden;position:relative;box-sizing:border-box;height:100%}.kbq-content-panel-container .kbq-content-panel-container__content{flex-grow:1;height:100%}.kbq-content-panel-container .kbq-content-panel-container__panel{position:absolute;right:0;top:0;padding:0 var(--kbq-size-s) var(--kbq-size-s) 0;display:flex;height:100%;box-sizing:border-box}.kbq-content-panel-container .kbq-content-panel-container__panel-resizer{position:absolute;top:0;left:calc(var(--kbq-content-panel-resizer-width) / -2);width:var(--kbq-content-panel-resizer-width);height:100%;z-index:2}\n"] }]
|
|
566
|
+
}], ctorParameters: () => [] });
|
|
567
|
+
|
|
568
|
+
const COMPONENTS = [
|
|
569
|
+
KbqContentPanelContainer,
|
|
570
|
+
KbqContentPanel,
|
|
571
|
+
KbqContentPanelAside,
|
|
572
|
+
KbqContentPanelHeader,
|
|
573
|
+
KbqContentPanelHeaderTitle,
|
|
574
|
+
KbqContentPanelHeaderActions,
|
|
575
|
+
KbqContentPanelBody,
|
|
576
|
+
KbqContentPanelFooter
|
|
577
|
+
];
|
|
578
|
+
class KbqContentPanelModule {
|
|
579
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqContentPanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
580
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: KbqContentPanelModule, imports: [KbqContentPanelContainer,
|
|
581
|
+
KbqContentPanel,
|
|
582
|
+
KbqContentPanelAside,
|
|
583
|
+
KbqContentPanelHeader,
|
|
584
|
+
KbqContentPanelHeaderTitle,
|
|
585
|
+
KbqContentPanelHeaderActions,
|
|
586
|
+
KbqContentPanelBody,
|
|
587
|
+
KbqContentPanelFooter], exports: [KbqContentPanelContainer,
|
|
588
|
+
KbqContentPanel,
|
|
589
|
+
KbqContentPanelAside,
|
|
590
|
+
KbqContentPanelHeader,
|
|
591
|
+
KbqContentPanelHeaderTitle,
|
|
592
|
+
KbqContentPanelHeaderActions,
|
|
593
|
+
KbqContentPanelBody,
|
|
594
|
+
KbqContentPanelFooter] }); }
|
|
595
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqContentPanelModule, imports: [KbqContentPanelContainer,
|
|
596
|
+
KbqContentPanelHeader,
|
|
597
|
+
KbqContentPanelBody] }); }
|
|
598
|
+
}
|
|
599
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqContentPanelModule, decorators: [{
|
|
600
|
+
type: NgModule,
|
|
601
|
+
args: [{
|
|
602
|
+
imports: COMPONENTS,
|
|
603
|
+
exports: COMPONENTS
|
|
604
|
+
}]
|
|
605
|
+
}] });
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* Generated bundle index. Do not edit.
|
|
609
|
+
*/
|
|
610
|
+
|
|
611
|
+
export { KbqContentPanel, KbqContentPanelAside, KbqContentPanelBody, KbqContentPanelContainer, KbqContentPanelFooter, KbqContentPanelHeader, KbqContentPanelHeaderActions, KbqContentPanelHeaderTitle, KbqContentPanelModule, KbqResizable, KbqResizer };
|
|
612
|
+
//# sourceMappingURL=koobiq-components-content-panel.mjs.map
|