@cuby-ui/core 0.0.117 → 0.0.119
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/dialog/dialog.interfaces.d.ts +2 -0
- package/components/dialog/dialogs.component.d.ts +0 -1
- package/esm2020/components/dialog/dialog.component.mjs +2 -2
- package/esm2020/components/dialog/dialog.interfaces.mjs +1 -1
- package/esm2020/components/dialog/dialogs.component.mjs +2 -3
- package/fesm2015/cuby-ui-core.mjs +3 -4
- package/fesm2015/cuby-ui-core.mjs.map +1 -1
- package/fesm2020/cuby-ui-core.mjs +3 -4
- package/fesm2020/cuby-ui-core.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import type { Injector } from '@angular/core';
|
|
1
2
|
import type { CuiPopoverContext } from '@cuby-ui/cdk';
|
|
2
3
|
export type CuiDialogSize = 'xl' | 'auto';
|
|
3
4
|
export interface CuiDialogOptions<I = any> {
|
|
4
5
|
readonly size: CuiDialogSize;
|
|
5
6
|
readonly data: I;
|
|
7
|
+
readonly injector?: Injector;
|
|
6
8
|
}
|
|
7
9
|
export interface CuiDialogContext<I = undefined> extends CuiPopoverContext, CuiDialogOptions<I> {
|
|
8
10
|
}
|
|
@@ -5,7 +5,6 @@ import type { Observable } from 'rxjs';
|
|
|
5
5
|
import type { CuiDialogOptions } from './dialog.interfaces';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class CuiDialogsComponent implements OnInit {
|
|
8
|
-
private readonly injector;
|
|
9
8
|
private readonly destroy$;
|
|
10
9
|
protected readonly dialogs$: Observable<ReadonlyArray<CuiPopover<CuiDialogOptions>>>;
|
|
11
10
|
protected dialogInjectorCache: Map<string, Injector>;
|
|
@@ -62,10 +62,10 @@ export class CuiDialogComponent {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
CuiDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
65
|
-
CuiDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiDialogComponent, selector: "cui-dialog", host: { listeners: { "document:keydown.escape": "onEscape($event)" }, properties: { "attr.data-size": "this.size" } }, hostDirectives: [{ directive: i1.CuiFocusTrapDirective }], ngImport: i0, template: "<ng-container [ngSwitch]=\"contentType\">\n <ng-container *ngSwitchCase=\"ContentType.String\">\n {{ context.content }}\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Template\">\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Component\">\n <div class=\"c-component-container\">\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\n </div>\n </ng-container>\n</ng-container>\n", styles: [":host{box-shadow:0 2px 4px -1px #0000000f,0 4px 6px -1px #0000001a;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;box-sizing:border-box;max-height:calc(100vh -
|
|
65
|
+
CuiDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiDialogComponent, selector: "cui-dialog", host: { listeners: { "document:keydown.escape": "onEscape($event)" }, properties: { "attr.data-size": "this.size" } }, hostDirectives: [{ directive: i1.CuiFocusTrapDirective }], ngImport: i0, template: "<ng-container [ngSwitch]=\"contentType\">\n <ng-container *ngSwitchCase=\"ContentType.String\">\n {{ context.content }}\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Template\">\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Component\">\n <div class=\"c-component-container\">\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\n </div>\n </ng-container>\n</ng-container>\n", styles: [":host{box-shadow:0 2px 4px -1px #0000000f,0 4px 6px -1px #0000001a;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;box-sizing:border-box;max-height:calc(100vh - 40px);width:100%;border-radius:12px;outline:none;background:var(--cui-base-0);font-family:var(--cui-main-font)}:host:last-of-type{z-index:1}:host[data-size=auto]{width:auto}:host[data-size=xl]{max-width:1080px}.c-component-container{display:contents}.c-component-container ::ng-deep>*{display:contents}\n"], dependencies: [{ kind: "directive", type: i2.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
66
66
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogComponent, decorators: [{
|
|
67
67
|
type: Component,
|
|
68
|
-
args: [{ selector: 'cui-dialog', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [CuiFocusTrapDirective], template: "<ng-container [ngSwitch]=\"contentType\">\n <ng-container *ngSwitchCase=\"ContentType.String\">\n {{ context.content }}\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Template\">\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Component\">\n <div class=\"c-component-container\">\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\n </div>\n </ng-container>\n</ng-container>\n", styles: [":host{box-shadow:0 2px 4px -1px #0000000f,0 4px 6px -1px #0000001a;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;box-sizing:border-box;max-height:calc(100vh -
|
|
68
|
+
args: [{ selector: 'cui-dialog', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [CuiFocusTrapDirective], template: "<ng-container [ngSwitch]=\"contentType\">\n <ng-container *ngSwitchCase=\"ContentType.String\">\n {{ context.content }}\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Template\">\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Component\">\n <div class=\"c-component-container\">\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\n </div>\n </ng-container>\n</ng-container>\n", styles: [":host{box-shadow:0 2px 4px -1px #0000000f,0 4px 6px -1px #0000001a;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;box-sizing:border-box;max-height:calc(100vh - 40px);width:100%;border-radius:12px;outline:none;background:var(--cui-base-0);font-family:var(--cui-main-font)}:host:last-of-type{z-index:1}:host[data-size=auto]{width:auto}:host[data-size=xl]{max-width:1080px}.c-component-container{display:contents}.c-component-container ::ng-deep>*{display:contents}\n"] }]
|
|
69
69
|
}], propDecorators: { size: [{
|
|
70
70
|
type: HostBinding,
|
|
71
71
|
args: ['attr.data-size']
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLmludGVyZmFjZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL2NvbXBvbmVudHMvZGlhbG9nL2RpYWxvZy5pbnRlcmZhY2VzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBUT0RPOiDQmNGB0L/QvtC70YzQt9C+0LLQsNGC0Ywg0LIg0LHRg9C00YPRidC10LwgQ3VpU2l6ZS3RgtC40L/
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLmludGVyZmFjZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL2NvbXBvbmVudHMvZGlhbG9nL2RpYWxvZy5pbnRlcmZhY2VzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBUT0RPOiDQmNGB0L/QvtC70YzQt9C+0LLQsNGC0Ywg0LIg0LHRg9C00YPRidC10LwgQ3VpU2l6ZS3RgtC40L/Ri1xuaW1wb3J0IHR5cGUgeyBJbmplY3RvciB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHR5cGUgeyBDdWlQb3BvdmVyQ29udGV4dCB9IGZyb20gJ0BjdWJ5LXVpL2Nkayc7XG5cbmV4cG9ydCB0eXBlIEN1aURpYWxvZ1NpemUgPSAneGwnIHwgJ2F1dG8nO1xuXG5leHBvcnQgaW50ZXJmYWNlIEN1aURpYWxvZ09wdGlvbnM8SSA9IGFueT4ge1xuICByZWFkb25seSBzaXplOiBDdWlEaWFsb2dTaXplO1xuICByZWFkb25seSBkYXRhOiBJO1xuICByZWFkb25seSBpbmplY3Rvcj86IEluamVjdG9yO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIEN1aURpYWxvZ0NvbnRleHQ8SSA9IHVuZGVmaW5lZD4gZXh0ZW5kcyBDdWlQb3BvdmVyQ29udGV4dCwgQ3VpRGlhbG9nT3B0aW9uczxJPiB7fSJdfQ==
|
|
@@ -7,7 +7,6 @@ import * as i1 from "@angular/common";
|
|
|
7
7
|
import * as i2 from "@cuby-ui/cdk";
|
|
8
8
|
export class CuiDialogsComponent {
|
|
9
9
|
constructor() {
|
|
10
|
-
this.injector = inject(Injector);
|
|
11
10
|
this.destroy$ = inject(CuiDestroyService, { self: true });
|
|
12
11
|
this.dialogs$ = inject(CUI_DIALOGS);
|
|
13
12
|
this.dialogInjectorCache = new Map();
|
|
@@ -26,7 +25,7 @@ export class CuiDialogsComponent {
|
|
|
26
25
|
if (!this.dialogInjectorCache.has(dialog.id)) {
|
|
27
26
|
this.dialogInjectorCache.set(dialog.id, Injector.create({
|
|
28
27
|
providers: [{ provide: CUI_DIALOG_CONTEXT, useValue: dialog }],
|
|
29
|
-
parent:
|
|
28
|
+
parent: dialog.injector
|
|
30
29
|
}));
|
|
31
30
|
}
|
|
32
31
|
return this.dialogInjectorCache.get(dialog.id);
|
|
@@ -46,4 +45,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
46
45
|
type: Component,
|
|
47
46
|
args: [{ selector: 'cui-dialogs', changeDetection: ChangeDetectionStrategy.OnPush, providers: [CuiDestroyService], template: "<ng-container *cuiLet=\"dialogs$ | async as dialogs\">\n <ng-container *ngFor=\"let dialog of dialogs; let i = index; trackBy: trackByFn\">\n <ng-container *ngComponentOutlet=\"dialog.component; injector: dialogInjectors[i]\"></ng-container>\n </ng-container>\n <div\n *ngIf=\"dialogs!.length\"\n class=\"c-overlay\"\n ></div>\n</ng-container>\n", styles: [".c-overlay{position:fixed;inset:0;background:var(--cui-base-900);opacity:.3}\n"] }]
|
|
48
47
|
}] });
|
|
49
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
48
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9ncy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL2NvbXBvbmVudHMvZGlhbG9nL2RpYWxvZ3MuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vcH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0RJQUxPR19DT05URVhULCB1c2VWYWx1ZTogZGlhbG9nIH1dLFxuICAgICAgICAgICAgcGFyZW50OiBkaWFsb2cuaW5qZWN0b3JcbiAgICAgICAgICB9KSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdGhpcy5kaWFsb2dJbmplY3RvckNhY2hlLmdldChkaWFsb2cuaWQpITtcbiAgICAgIH0pO1xuXG4gICAgICB0aGlzLmRpYWxvZ0luamVjdG9yQ2FjaGUuZm9yRWFjaCgoXywgZGlhbG9nSWQpID0+IHtcbiAgICAgICAgaWYgKGRpYWxvZ3MuZmluZChkaWFsb2cgPT4gZGlhbG9nLmlkID09PSBkaWFsb2dJZCkpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmRpYWxvZ0luamVjdG9yQ2FjaGUuZGVsZXRlKGRpYWxvZ0lkKTtcbiAgICAgIH0pO1xuICAgIH0pO1xuICB9XG59XG4iLCI8bmctY29udGFpbmVyICpjdWlMZXQ9XCJkaWFsb2dzJCB8IGFzeW5jIGFzIGRpYWxvZ3NcIj5cbiAgPG5nLWNvbnRhaW5lciAqbmdGb3I9XCJsZXQgZGlhbG9nIG9mIGRpYWxvZ3M7IGxldCBpID0gaW5kZXg7IHRyYWNrQnk6IHRyYWNrQnlGblwiPlxuICAgIDxuZy1jb250YWluZXIgKm5nQ29tcG9uZW50T3V0bGV0PVwiZGlhbG9nLmNvbXBvbmVudDsgaW5qZWN0b3I6IGRpYWxvZ0luamVjdG9yc1tpXVwiPjwvbmctY29udGFpbmVyPlxuICA8L25nLWNvbnRhaW5lcj5cbiAgPGRpdlxuICAgICpuZ0lmPVwiZGlhbG9ncyEubGVuZ3RoXCJcbiAgICBjbGFzcz1cImMtb3ZlcmxheVwiXG4gID48L2Rpdj5cbjwvbmctY29udGFpbmVyPlxuIl19
|
|
@@ -723,7 +723,6 @@ const CUI_DIALOG_CONTEXT = new InjectionToken('');
|
|
|
723
723
|
|
|
724
724
|
class CuiDialogsComponent {
|
|
725
725
|
constructor() {
|
|
726
|
-
this.injector = inject(Injector);
|
|
727
726
|
this.destroy$ = inject(CuiDestroyService, { self: true });
|
|
728
727
|
this.dialogs$ = inject(CUI_DIALOGS);
|
|
729
728
|
this.dialogInjectorCache = new Map();
|
|
@@ -742,7 +741,7 @@ class CuiDialogsComponent {
|
|
|
742
741
|
if (!this.dialogInjectorCache.has(dialog.id)) {
|
|
743
742
|
this.dialogInjectorCache.set(dialog.id, Injector.create({
|
|
744
743
|
providers: [{ provide: CUI_DIALOG_CONTEXT, useValue: dialog }],
|
|
745
|
-
parent:
|
|
744
|
+
parent: dialog.injector
|
|
746
745
|
}));
|
|
747
746
|
}
|
|
748
747
|
return this.dialogInjectorCache.get(dialog.id);
|
|
@@ -841,10 +840,10 @@ class CuiDialogComponent {
|
|
|
841
840
|
}
|
|
842
841
|
}
|
|
843
842
|
CuiDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
844
|
-
CuiDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiDialogComponent, selector: "cui-dialog", host: { listeners: { "document:keydown.escape": "onEscape($event)" }, properties: { "attr.data-size": "this.size" } }, hostDirectives: [{ directive: i2.CuiFocusTrapDirective }], ngImport: i0, template: "<ng-container [ngSwitch]=\"contentType\">\n <ng-container *ngSwitchCase=\"ContentType.String\">\n {{ context.content }}\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Template\">\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Component\">\n <div class=\"c-component-container\">\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\n </div>\n </ng-container>\n</ng-container>\n", styles: [":host{box-shadow:0 2px 4px -1px #0000000f,0 4px 6px -1px #0000001a;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;box-sizing:border-box;max-height:calc(100vh -
|
|
843
|
+
CuiDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiDialogComponent, selector: "cui-dialog", host: { listeners: { "document:keydown.escape": "onEscape($event)" }, properties: { "attr.data-size": "this.size" } }, hostDirectives: [{ directive: i2.CuiFocusTrapDirective }], ngImport: i0, template: "<ng-container [ngSwitch]=\"contentType\">\n <ng-container *ngSwitchCase=\"ContentType.String\">\n {{ context.content }}\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Template\">\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Component\">\n <div class=\"c-component-container\">\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\n </div>\n </ng-container>\n</ng-container>\n", styles: [":host{box-shadow:0 2px 4px -1px #0000000f,0 4px 6px -1px #0000001a;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;box-sizing:border-box;max-height:calc(100vh - 40px);width:100%;border-radius:12px;outline:none;background:var(--cui-base-0);font-family:var(--cui-main-font)}:host:last-of-type{z-index:1}:host[data-size=auto]{width:auto}:host[data-size=xl]{max-width:1080px}.c-component-container{display:contents}.c-component-container ::ng-deep>*{display:contents}\n"], dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
845
844
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogComponent, decorators: [{
|
|
846
845
|
type: Component,
|
|
847
|
-
args: [{ selector: 'cui-dialog', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [CuiFocusTrapDirective], template: "<ng-container [ngSwitch]=\"contentType\">\n <ng-container *ngSwitchCase=\"ContentType.String\">\n {{ context.content }}\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Template\">\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Component\">\n <div class=\"c-component-container\">\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\n </div>\n </ng-container>\n</ng-container>\n", styles: [":host{box-shadow:0 2px 4px -1px #0000000f,0 4px 6px -1px #0000001a;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;box-sizing:border-box;max-height:calc(100vh -
|
|
846
|
+
args: [{ selector: 'cui-dialog', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [CuiFocusTrapDirective], template: "<ng-container [ngSwitch]=\"contentType\">\n <ng-container *ngSwitchCase=\"ContentType.String\">\n {{ context.content }}\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Template\">\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Component\">\n <div class=\"c-component-container\">\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\n </div>\n </ng-container>\n</ng-container>\n", styles: [":host{box-shadow:0 2px 4px -1px #0000000f,0 4px 6px -1px #0000001a;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;box-sizing:border-box;max-height:calc(100vh - 40px);width:100%;border-radius:12px;outline:none;background:var(--cui-base-0);font-family:var(--cui-main-font)}:host:last-of-type{z-index:1}:host[data-size=auto]{width:auto}:host[data-size=xl]{max-width:1080px}.c-component-container{display:contents}.c-component-container ::ng-deep>*{display:contents}\n"] }]
|
|
848
847
|
}], propDecorators: { size: [{
|
|
849
848
|
type: HostBinding,
|
|
850
849
|
args: ['attr.data-size']
|