@c80/ui 1.0.49 → 1.0.50
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/esm2022/index.js +1 -0
- package/esm2022/index.js.map +1 -1
- package/esm2022/lib/snackbar/index.js +2 -0
- package/esm2022/lib/snackbar/index.js.map +1 -0
- package/esm2022/lib/snackbar/snackbar.component.js +52 -0
- package/esm2022/lib/snackbar/snackbar.component.js.map +1 -0
- package/esm2022/lib/snackbar/snackbar.model.js +2 -0
- package/esm2022/lib/snackbar/snackbar.model.js.map +1 -0
- package/esm2022/lib/snackbar/snackbar.service.js +44 -0
- package/esm2022/lib/snackbar/snackbar.service.js.map +1 -0
- package/index.d.ts +1 -0
- package/lib/card-level/card-level.component.d.ts +1 -1
- package/lib/icon/icon.component.d.ts +2 -2
- package/lib/snackbar/index.d.ts +2 -0
- package/lib/snackbar/snackbar.component.d.ts +16 -0
- package/lib/snackbar/snackbar.model.d.ts +11 -0
- package/lib/snackbar/snackbar.service.d.ts +11 -0
- package/package.json +1 -1
package/esm2022/index.js
CHANGED
package/esm2022/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../libs/ui/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC","sourcesContent":["export * from './lib/table';\nexport * from './lib/icon';\nexport * from './lib/stat-card';\nexport * from './lib/card-level';\nexport * from './lib/modal';\nexport * from './lib/select';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../libs/ui/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './lib/table';\nexport * from './lib/icon';\nexport * from './lib/stat-card';\nexport * from './lib/card-level';\nexport * from './lib/modal';\nexport * from './lib/select';\nexport * from './lib/snackbar';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/ui/src/lib/snackbar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export { SnackbarService } from './snackbar.service';\nexport type { SnackbarConfig, SnackbarData } from './snackbar.model';\n"]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Component, computed, signal, ElementRef, inject, Renderer2 } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class SnackbarComponent {
|
|
4
|
+
elementRef = inject(ElementRef);
|
|
5
|
+
renderer = inject(Renderer2);
|
|
6
|
+
data = signal(null, ...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
7
|
+
visible = signal(false, ...(ngDevMode ? [{ debugName: "visible" }] : []));
|
|
8
|
+
timerId;
|
|
9
|
+
panelClasses = computed(() => this.data()?.config.panelClass.join(' ') ?? '', ...(ngDevMode ? [{ debugName: "panelClasses" }] : []));
|
|
10
|
+
show(data) {
|
|
11
|
+
this.clearTimer();
|
|
12
|
+
this.data.set(data);
|
|
13
|
+
this.applyPosition(data.config);
|
|
14
|
+
this.visible.set(true);
|
|
15
|
+
if (data.config.duration > 0) {
|
|
16
|
+
this.timerId = setTimeout(() => this.dismiss(), data.config.duration);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
dismiss() {
|
|
20
|
+
this.visible.set(false);
|
|
21
|
+
this.clearTimer();
|
|
22
|
+
}
|
|
23
|
+
clearTimer() {
|
|
24
|
+
if (this.timerId !== undefined) {
|
|
25
|
+
clearTimeout(this.timerId);
|
|
26
|
+
this.timerId = undefined;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
applyPosition(config) {
|
|
30
|
+
const host = this.elementRef.nativeElement;
|
|
31
|
+
const { verticalPosition, horizontalPosition } = config;
|
|
32
|
+
const positions = ['top', 'bottom', 'left', 'right', 'transform'];
|
|
33
|
+
for (const pos of positions) {
|
|
34
|
+
this.renderer.removeStyle(host, pos);
|
|
35
|
+
}
|
|
36
|
+
this.renderer.setStyle(host, verticalPosition, '1rem');
|
|
37
|
+
if (horizontalPosition === 'center') {
|
|
38
|
+
this.renderer.setStyle(host, 'left', '50%');
|
|
39
|
+
this.renderer.setStyle(host, 'transform', 'translateX(-50%)');
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
this.renderer.setStyle(host, horizontalPosition, '1rem');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: SnackbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
46
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: SnackbarComponent, isStandalone: true, selector: "k-snackbar", ngImport: i0, template: "@if (visible() && data(); as snackData) {\n<div class=\"snackbar\" [class]=\"panelClasses()\">\n <span class=\"snackbar-message\">{{ snackData.message }}</span>\n @if (snackData.action) {\n <button class=\"snackbar-action\" type=\"button\" (click)=\"dismiss()\">\n {{ snackData.action }}\n </button>\n }\n</div>\n}", styles: [":host{position:fixed;z-index:9999;pointer-events:none}.snackbar{display:flex;align-items:center;gap:.75rem;padding:.875rem 1rem;background:#323232;color:#fff;border-radius:.25rem;box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024;pointer-events:auto;animation:slideIn .3s ease-out;min-width:18rem;max-width:35rem}.snackbar-message{flex:1;font-size:.875rem}.snackbar-action{background:transparent;border:none;color:#90caf9;cursor:pointer;font-size:.875rem;font-weight:500;text-transform:uppercase;padding:.25rem .5rem;border-radius:.25rem;transition:background-color .2s}.snackbar-action:hover{background-color:#ffffff1a}.notification-success{background:#4caf50}.notification-error{background:#f44336}@keyframes slideIn{0%{opacity:0;transform:translateY(-1rem)}to{opacity:1;transform:translateY(0)}}\n"] });
|
|
47
|
+
}
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: SnackbarComponent, decorators: [{
|
|
49
|
+
type: Component,
|
|
50
|
+
args: [{ selector: 'k-snackbar', standalone: true, template: "@if (visible() && data(); as snackData) {\n<div class=\"snackbar\" [class]=\"panelClasses()\">\n <span class=\"snackbar-message\">{{ snackData.message }}</span>\n @if (snackData.action) {\n <button class=\"snackbar-action\" type=\"button\" (click)=\"dismiss()\">\n {{ snackData.action }}\n </button>\n }\n</div>\n}", styles: [":host{position:fixed;z-index:9999;pointer-events:none}.snackbar{display:flex;align-items:center;gap:.75rem;padding:.875rem 1rem;background:#323232;color:#fff;border-radius:.25rem;box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024;pointer-events:auto;animation:slideIn .3s ease-out;min-width:18rem;max-width:35rem}.snackbar-message{flex:1;font-size:.875rem}.snackbar-action{background:transparent;border:none;color:#90caf9;cursor:pointer;font-size:.875rem;font-weight:500;text-transform:uppercase;padding:.25rem .5rem;border-radius:.25rem;transition:background-color .2s}.snackbar-action:hover{background-color:#ffffff1a}.notification-success{background:#4caf50}.notification-error{background:#f44336}@keyframes slideIn{0%{opacity:0;transform:translateY(-1rem)}to{opacity:1;transform:translateY(0)}}\n"] }]
|
|
51
|
+
}] });
|
|
52
|
+
//# sourceMappingURL=snackbar.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snackbar.component.js","sourceRoot":"","sources":["../../../../../libs/ui/src/lib/snackbar/snackbar.component.ts","../../../../../libs/ui/src/lib/snackbar/snackbar.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;;AAS3F,MAAM,OAAO,iBAAiB;IACX,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IAChC,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;IAErC,IAAI,GAAG,MAAM,CAAsB,IAAI,gDAAC,CAAC;IACzC,OAAO,GAAG,MAAM,CAAC,KAAK,mDAAC,CAAC;IAEzB,OAAO,CAAiC;IAEvC,YAAY,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,wDAAC,CAAC;IAEvF,IAAI,CAAC,IAAkB;QACrB,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACpB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAEvB,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,CAAC,EAAE,CAAC;YAC7B,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACxE,CAAC;IACH,CAAC;IAED,OAAO;QACL,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACxB,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAEO,UAAU;QAChB,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YAC/B,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC3B,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QAC3B,CAAC;IACH,CAAC;IAEO,aAAa,CAAC,MAA8B;QAClD,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;QAC3C,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAAC;QAExD,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QAClE,KAAK,MAAM,GAAG,IAAI,SAAS,EAAE,CAAC;YAC5B,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QACvC,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAAC;QAEvD,IAAI,kBAAkB,KAAK,QAAQ,EAAE,CAAC;YACpC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;YAC5C,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,WAAW,EAAE,kBAAkB,CAAC,CAAC;QAChE,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,EAAE,MAAM,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;uGAnDU,iBAAiB;2FAAjB,iBAAiB,sECT9B,oUASC;;2FDAY,iBAAiB;kBAN7B,SAAS;+BACE,YAAY,cACV,IAAI","sourcesContent":["import { Component, computed, signal, ElementRef, inject, Renderer2 } from '@angular/core';\nimport type { SnackbarData } from './snackbar.model';\n\n@Component({\n selector: 'k-snackbar',\n standalone: true,\n templateUrl: './snackbar.component.html',\n styleUrl: './snackbar.component.scss',\n})\nexport class SnackbarComponent {\n private readonly elementRef = inject(ElementRef);\n private readonly renderer = inject(Renderer2);\n\n readonly data = signal<SnackbarData | null>(null);\n readonly visible = signal(false);\n\n private timerId?: ReturnType<typeof setTimeout>;\n\n readonly panelClasses = computed(() => this.data()?.config.panelClass.join(' ') ?? '');\n\n show(data: SnackbarData): void {\n this.clearTimer();\n this.data.set(data);\n this.applyPosition(data.config);\n this.visible.set(true);\n\n if (data.config.duration > 0) {\n this.timerId = setTimeout(() => this.dismiss(), data.config.duration);\n }\n }\n\n dismiss(): void {\n this.visible.set(false);\n this.clearTimer();\n }\n\n private clearTimer(): void {\n if (this.timerId !== undefined) {\n clearTimeout(this.timerId);\n this.timerId = undefined;\n }\n }\n\n private applyPosition(config: SnackbarData['config']): void {\n const host = this.elementRef.nativeElement;\n const { verticalPosition, horizontalPosition } = config;\n\n const positions = ['top', 'bottom', 'left', 'right', 'transform'];\n for (const pos of positions) {\n this.renderer.removeStyle(host, pos);\n }\n\n this.renderer.setStyle(host, verticalPosition, '1rem');\n\n if (horizontalPosition === 'center') {\n this.renderer.setStyle(host, 'left', '50%');\n this.renderer.setStyle(host, 'transform', 'translateX(-50%)');\n } else {\n this.renderer.setStyle(host, horizontalPosition, '1rem');\n }\n }\n}\n","@if (visible() && data(); as snackData) {\n<div class=\"snackbar\" [class]=\"panelClasses()\">\n <span class=\"snackbar-message\">{{ snackData.message }}</span>\n @if (snackData.action) {\n <button class=\"snackbar-action\" type=\"button\" (click)=\"dismiss()\">\n {{ snackData.action }}\n </button>\n }\n</div>\n}"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snackbar.model.js","sourceRoot":"","sources":["../../../../../libs/ui/src/lib/snackbar/snackbar.model.ts"],"names":[],"mappings":"","sourcesContent":["export interface SnackbarConfig {\n duration?: number;\n horizontalPosition?: 'left' | 'center' | 'right';\n verticalPosition?: 'top' | 'bottom';\n panelClass?: string[];\n}\n\nexport interface SnackbarData {\n message: string;\n action?: string;\n config: Required<SnackbarConfig>;\n}\n"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Injectable, inject, ApplicationRef, createComponent, EnvironmentInjector, } from '@angular/core';
|
|
2
|
+
import { SnackbarComponent } from './snackbar.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class SnackbarService {
|
|
5
|
+
appRef = inject(ApplicationRef);
|
|
6
|
+
injector = inject(EnvironmentInjector);
|
|
7
|
+
componentRef;
|
|
8
|
+
defaultConfig = {
|
|
9
|
+
duration: 3000,
|
|
10
|
+
horizontalPosition: 'right',
|
|
11
|
+
verticalPosition: 'top',
|
|
12
|
+
panelClass: [],
|
|
13
|
+
};
|
|
14
|
+
open(message, action, config) {
|
|
15
|
+
const mergedConfig = {
|
|
16
|
+
...this.defaultConfig,
|
|
17
|
+
...config,
|
|
18
|
+
panelClass: config?.panelClass ?? this.defaultConfig.panelClass,
|
|
19
|
+
};
|
|
20
|
+
const data = {
|
|
21
|
+
message,
|
|
22
|
+
action,
|
|
23
|
+
config: mergedConfig,
|
|
24
|
+
};
|
|
25
|
+
if (!this.componentRef) {
|
|
26
|
+
this.componentRef = createComponent(SnackbarComponent, {
|
|
27
|
+
environmentInjector: this.injector,
|
|
28
|
+
});
|
|
29
|
+
this.appRef.attachView(this.componentRef.hostView);
|
|
30
|
+
document.body.appendChild(this.componentRef.location.nativeElement);
|
|
31
|
+
}
|
|
32
|
+
this.componentRef.instance.show(data);
|
|
33
|
+
this.componentRef.changeDetectorRef.detectChanges();
|
|
34
|
+
}
|
|
35
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: SnackbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
36
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: SnackbarService, providedIn: 'root' });
|
|
37
|
+
}
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: SnackbarService, decorators: [{
|
|
39
|
+
type: Injectable,
|
|
40
|
+
args: [{
|
|
41
|
+
providedIn: 'root',
|
|
42
|
+
}]
|
|
43
|
+
}] });
|
|
44
|
+
//# sourceMappingURL=snackbar.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snackbar.service.js","sourceRoot":"","sources":["../../../../../libs/ui/src/lib/snackbar/snackbar.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,MAAM,EACN,cAAc,EACd,eAAe,EACf,mBAAmB,GAEpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;;AAMzD,MAAM,OAAO,eAAe;IACT,MAAM,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;IAChC,QAAQ,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;IAChD,YAAY,CAAmC;IAEtC,aAAa,GAA6B;QACzD,QAAQ,EAAE,IAAI;QACd,kBAAkB,EAAE,OAAO;QAC3B,gBAAgB,EAAE,KAAK;QACvB,UAAU,EAAE,EAAE;KACf,CAAC;IAEF,IAAI,CAAC,OAAe,EAAE,MAAe,EAAE,MAAuB;QAC5D,MAAM,YAAY,GAA6B;YAC7C,GAAG,IAAI,CAAC,aAAa;YACrB,GAAG,MAAM;YACT,UAAU,EAAE,MAAM,EAAE,UAAU,IAAI,IAAI,CAAC,aAAa,CAAC,UAAU;SAChE,CAAC;QAEF,MAAM,IAAI,GAAiB;YACzB,OAAO;YACP,MAAM;YACN,MAAM,EAAE,YAAY;SACrB,CAAC;QAEF,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;YACvB,IAAI,CAAC,YAAY,GAAG,eAAe,CAAC,iBAAiB,EAAE;gBACrD,mBAAmB,EAAE,IAAI,CAAC,QAAQ;aACnC,CAAC,CAAC;YAEH,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;YACnD,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;QACtE,CAAC;QAED,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,aAAa,EAAE,CAAC;IACtD,CAAC;uGApCU,eAAe;2GAAf,eAAe,cAFd,MAAM;;2FAEP,eAAe;kBAH3B,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB","sourcesContent":["import {\n Injectable,\n inject,\n ApplicationRef,\n createComponent,\n EnvironmentInjector,\n ComponentRef,\n} from '@angular/core';\nimport { SnackbarComponent } from './snackbar.component';\nimport type { SnackbarConfig, SnackbarData } from './snackbar.model';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SnackbarService {\n private readonly appRef = inject(ApplicationRef);\n private readonly injector = inject(EnvironmentInjector);\n private componentRef?: ComponentRef<SnackbarComponent>;\n\n private readonly defaultConfig: Required<SnackbarConfig> = {\n duration: 3000,\n horizontalPosition: 'right',\n verticalPosition: 'top',\n panelClass: [],\n };\n\n open(message: string, action?: string, config?: SnackbarConfig): void {\n const mergedConfig: Required<SnackbarConfig> = {\n ...this.defaultConfig,\n ...config,\n panelClass: config?.panelClass ?? this.defaultConfig.panelClass,\n };\n\n const data: SnackbarData = {\n message,\n action,\n config: mergedConfig,\n };\n\n if (!this.componentRef) {\n this.componentRef = createComponent(SnackbarComponent, {\n environmentInjector: this.injector,\n });\n\n this.appRef.attachView(this.componentRef.hostView);\n document.body.appendChild(this.componentRef.location.nativeElement);\n }\n\n this.componentRef.instance.show(data);\n this.componentRef.changeDetectorRef.detectChanges();\n }\n}\n"]}
|
package/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare class CardLevelComponent {
|
|
|
8
8
|
get cardWidth(): string;
|
|
9
9
|
isBidirectional: import("@angular/core").Signal<boolean>;
|
|
10
10
|
bidirectionalFillPercent: import("@angular/core").Signal<number>;
|
|
11
|
-
fillDirection: import("@angular/core").Signal<"
|
|
11
|
+
fillDirection: import("@angular/core").Signal<"left" | "right">;
|
|
12
12
|
fillColor: import("@angular/core").Signal<"var(--color-danger)" | "var(--color-warning)" | "var(--color-success)">;
|
|
13
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<CardLevelComponent, never>;
|
|
14
14
|
static ɵcmp: i0.ɵɵComponentDeclaration<CardLevelComponent, "c80-card-level", never, { "cardLevelData": { "alias": "cardLevelData"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ColorType, ButtonType } from './icon.types';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class C80IconComponent {
|
|
4
|
-
readonly icon: import("@angular/core").InputSignal<"
|
|
4
|
+
readonly icon: import("@angular/core").InputSignal<"check" | "cancel" | "edit" | "delete" | "add" | "view" | "get" | "settings" | "schedule" | "refresh" | "checkCircle" | "cancelCircle" | "error" | "queue" | "arrowUp" | "arrowDown" | "toggleOn" | "toggleOff" | "search" | "upload" | "pendingActions" | "playCircle" | "play" | "stop" | "tune" | "visibility" | "visibilityOff" | "close" | "record" | "star" | "xCircle" | "key" | "exclamationTriangle" | "clipboard" | "download" | "shield" | "person" | "envelope" | "infoCircle" | "checkSquare" | "square" | "dashSquare" | "people" | "boxSeam" | "personBadge" | "listTask" | "shuffle" | "cpu" | "box" | "bell" | "message" | "send" | "file" | "folder" | "save" | "print" | "clock" | "calendar" | "timer" | "lock" | "unlock" | "chart" | "table" | "database" | "home" | "menu" | "arrowLeft" | "arrowRight" | "copy" | "filter" | "sort" | "help" | "warning" | "default">;
|
|
5
5
|
readonly color: import("@angular/core").InputSignal<ColorType>;
|
|
6
6
|
readonly customColor: import("@angular/core").InputSignal<string | undefined>;
|
|
7
7
|
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
@@ -14,7 +14,7 @@ export declare class C80IconComponent {
|
|
|
14
14
|
readonly iconClick: import("@angular/core").OutputEmitterRef<Event>;
|
|
15
15
|
readonly iconSize: import("@angular/core").Signal<number>;
|
|
16
16
|
readonly iconColor: import("@angular/core").Signal<string>;
|
|
17
|
-
readonly iconOpacity: import("@angular/core").Signal<
|
|
17
|
+
readonly iconOpacity: import("@angular/core").Signal<0.5 | 0.7 | 1>;
|
|
18
18
|
readonly iconPath: import("@angular/core").Signal<string>;
|
|
19
19
|
readonly additionalShapes: import("@angular/core").Signal<import("@c80/ui").ShapeAttributes[]>;
|
|
20
20
|
onButtonClick(event: Event): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SnackbarData } from './snackbar.model';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SnackbarComponent {
|
|
4
|
+
private readonly elementRef;
|
|
5
|
+
private readonly renderer;
|
|
6
|
+
readonly data: import("@angular/core").WritableSignal<SnackbarData | null>;
|
|
7
|
+
readonly visible: import("@angular/core").WritableSignal<boolean>;
|
|
8
|
+
private timerId?;
|
|
9
|
+
readonly panelClasses: import("@angular/core").Signal<string>;
|
|
10
|
+
show(data: SnackbarData): void;
|
|
11
|
+
dismiss(): void;
|
|
12
|
+
private clearTimer;
|
|
13
|
+
private applyPosition;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SnackbarComponent, "k-snackbar", never, {}, {}, never, never, true, never>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface SnackbarConfig {
|
|
2
|
+
duration?: number;
|
|
3
|
+
horizontalPosition?: 'left' | 'center' | 'right';
|
|
4
|
+
verticalPosition?: 'top' | 'bottom';
|
|
5
|
+
panelClass?: string[];
|
|
6
|
+
}
|
|
7
|
+
export interface SnackbarData {
|
|
8
|
+
message: string;
|
|
9
|
+
action?: string;
|
|
10
|
+
config: Required<SnackbarConfig>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SnackbarConfig } from './snackbar.model';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SnackbarService {
|
|
4
|
+
private readonly appRef;
|
|
5
|
+
private readonly injector;
|
|
6
|
+
private componentRef?;
|
|
7
|
+
private readonly defaultConfig;
|
|
8
|
+
open(message: string, action?: string, config?: SnackbarConfig): void;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SnackbarService>;
|
|
11
|
+
}
|