@sd-angular/core 19.0.0-beta.37 → 19.0.0-beta.38
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/assets/scss/core/bootstrap.scss +17 -0
- package/components/avatar/src/avatar.component.d.ts +2 -1
- package/components/button/src/button.component.d.ts +7 -8
- package/components/document-builder/index.d.ts +1 -0
- package/components/document-builder/src/document-builder.component.d.ts +3 -42
- package/components/document-builder/src/document-builder.model.d.ts +3 -14
- package/components/document-builder/src/plugins/ck-comment/ck-comment.plugin.d.ts +43 -0
- package/components/document-builder/src/plugins/ck-comment/ck-comment.plugin.model.d.ts +50 -0
- package/components/document-builder/src/plugins/index.d.ts +2 -1
- package/fesm2022/sd-angular-core-components-avatar.mjs +15 -13
- package/fesm2022/sd-angular-core-components-avatar.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-button.mjs +24 -21
- package/fesm2022/sd-angular-core-components-button.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-document-builder.mjs +729 -255
- package/fesm2022/sd-angular-core-components-document-builder.mjs.map +1 -1
- package/fesm2022/sd-angular-core-modules-layout.mjs +1 -1
- package/fesm2022/sd-angular-core-modules-layout.mjs.map +1 -1
- package/package.json +67 -67
- package/sd-angular-core-19.0.0-beta.38.tgz +0 -0
- package/components/document-builder/src/plugins/comment/comment.plugin.d.ts +0 -4
- package/sd-angular-core-19.0.0-beta.37.tgz +0 -0
|
@@ -81,6 +81,23 @@
|
|
|
81
81
|
.fs-#{$i} {
|
|
82
82
|
font-size: #{$i}px !important;
|
|
83
83
|
}
|
|
84
|
+
|
|
85
|
+
// Gap
|
|
86
|
+
.gap-#{$i} {
|
|
87
|
+
gap: #{$i}px !important;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.gap-y-#{$i} {
|
|
91
|
+
row-gap: #{$i}px !important;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.gap-x-#{$i} {
|
|
95
|
+
column-gap: #{$i}px !important;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.flex-1 {
|
|
100
|
+
flex: 1;
|
|
84
101
|
}
|
|
85
102
|
|
|
86
103
|
.w-full {
|
|
@@ -4,11 +4,12 @@ export declare class SdAvatar implements OnInit {
|
|
|
4
4
|
#private;
|
|
5
5
|
src: string | undefined | null;
|
|
6
6
|
size: number;
|
|
7
|
+
name: string;
|
|
7
8
|
isUrl: boolean;
|
|
8
9
|
initials: string;
|
|
9
10
|
bgColor: string;
|
|
10
11
|
ngOnInit(): void;
|
|
11
12
|
handleError(): void;
|
|
12
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdAvatar, never>;
|
|
13
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdAvatar, "sd-avatar", never, { "src": { "alias": "src"; "required": true; }; "size": { "alias": "size"; "required": false; }; }, {}, never, never, true, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdAvatar, "sd-avatar", never, { "src": { "alias": "src"; "required": true; }; "size": { "alias": "size"; "required": false; }; "name": { "alias": "name"; "required": false; }; }, {}, never, never, true, never>;
|
|
14
15
|
}
|
|
@@ -2,16 +2,17 @@ import { OnDestroy, OnInit } from '@angular/core';
|
|
|
2
2
|
import { SdBaseSecureComponent } from '@sd-angular/core/components/base';
|
|
3
3
|
import { SdColor } from '@sd-angular/core/utilities/models';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
type
|
|
6
|
-
type
|
|
7
|
-
type
|
|
5
|
+
export type SdButtonFontSet = 'material-icons' | 'material-icons-outlined' | 'material-icons-round' | 'material-icons-sharp' | 'material-symbols-outlined';
|
|
6
|
+
export type SdButtonType = 'fill' | 'light' | 'outline' | 'link';
|
|
7
|
+
export type SdButtonSize = 'sm' | 'md' | 'lg';
|
|
8
8
|
export declare class SdButton extends SdBaseSecureComponent implements OnInit, OnDestroy {
|
|
9
9
|
#private;
|
|
10
|
+
private el;
|
|
10
11
|
autoIdInput: import("@angular/core").InputSignal<string | null | undefined>;
|
|
11
|
-
type: import("@angular/core").InputSignalWithTransform<
|
|
12
|
+
type: import("@angular/core").InputSignalWithTransform<SdButtonType, SdButtonType | null | undefined>;
|
|
12
13
|
color: import("@angular/core").InputSignalWithTransform<SdColor, SdColor | null | undefined>;
|
|
13
|
-
size: import("@angular/core").InputSignalWithTransform<
|
|
14
|
-
fontSet: import("@angular/core").InputSignalWithTransform<
|
|
14
|
+
size: import("@angular/core").InputSignalWithTransform<SdButtonSize, SdButtonSize | null | undefined>;
|
|
15
|
+
fontSet: import("@angular/core").InputSignalWithTransform<SdButtonFontSet, SdButtonFontSet | null | undefined>;
|
|
15
16
|
title: import("@angular/core").InputSignal<string | null | undefined>;
|
|
16
17
|
width: import("@angular/core").InputSignal<string | null | undefined>;
|
|
17
18
|
tooltip: import("@angular/core").InputSignal<string | null | undefined>;
|
|
@@ -30,10 +31,8 @@ export declare class SdButton extends SdBaseSecureComponent implements OnInit, O
|
|
|
30
31
|
click: import("@angular/core").OutputEmitterRef<Event>;
|
|
31
32
|
constructor();
|
|
32
33
|
ngOnInit(): void;
|
|
33
|
-
onHostClick(event: Event): void;
|
|
34
34
|
onInternalClick(event: Event): void;
|
|
35
35
|
ngOnDestroy(): void;
|
|
36
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdButton, never>;
|
|
37
37
|
static ɵcmp: i0.ɵɵComponentDeclaration<SdButton, "sd-button", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fontSet": { "alias": "fontSet"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "prefixIcon": { "alias": "prefixIcon"; "required": false; "isSignal": true; }; "suffixIcon": { "alias": "suffixIcon"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, { "click": "click"; }, never, never, true, never>;
|
|
38
38
|
}
|
|
39
|
-
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import { ClassicEditor, ModelRange } from 'ckeditor5';
|
|
3
|
-
import {
|
|
3
|
+
import { CkCommentPlugin } from './plugins';
|
|
4
|
+
import { SdDocumentBuilderHeading, SdDocumentBuilderOption, SdDocumentBuilderVariable, SdEditorConfig } from './document-builder.model';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class SdDocumentBuilder {
|
|
6
7
|
#private;
|
|
@@ -30,47 +31,7 @@ export declare class SdDocumentBuilder {
|
|
|
30
31
|
*/
|
|
31
32
|
scroll: (id: string) => void;
|
|
32
33
|
};
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Lấy tất cả comments trong document
|
|
36
|
-
* @returns Danh sách tất cả comments
|
|
37
|
-
*/
|
|
38
|
-
all: () => SdDocumentBuilderComment[];
|
|
39
|
-
/**
|
|
40
|
-
* Thêm comment vào vùng text đang được chọn
|
|
41
|
-
* @param comment - Dữ liệu comment
|
|
42
|
-
* @param data - Dữ liệu extra data
|
|
43
|
-
* @returns SdDocumentBuilderComment hoặc null nếu không có text được chọn
|
|
44
|
-
*/
|
|
45
|
-
add: <T = any>(range: ModelRange, comment: string, args?: {
|
|
46
|
-
markerIdExternal?: string | number;
|
|
47
|
-
data?: T;
|
|
48
|
-
}) => SdDocumentBuilderComment<T> | null;
|
|
49
|
-
/**
|
|
50
|
-
* Cập nhật nội dung comment
|
|
51
|
-
* @param markerId - ID của marker
|
|
52
|
-
* @param commentData - Dữ liệu mới
|
|
53
|
-
* @returns Comment đã cập nhật hoặc null
|
|
54
|
-
*/
|
|
55
|
-
update: <T = any>(markerId: string, comment: string, data?: T) => SdDocumentBuilderComment<T> | null;
|
|
56
|
-
/**
|
|
57
|
-
* Lấy chi tiết comment theo markerId
|
|
58
|
-
* @param markerId - ID của marker
|
|
59
|
-
* @returns Comment hoặc null
|
|
60
|
-
*/
|
|
61
|
-
detail: (markerId: string) => SdDocumentBuilderComment | null;
|
|
62
|
-
/**
|
|
63
|
-
* Xóa comment theo markerId
|
|
64
|
-
* @param markerId - ID của marker cần xóa
|
|
65
|
-
* @returns true nếu xóa thành công, false nếu không tìm thấy
|
|
66
|
-
*/
|
|
67
|
-
remove: (markerId: string) => boolean;
|
|
68
|
-
/**
|
|
69
|
-
* Scroll đến vị trí comment
|
|
70
|
-
* @param markerId - ID của marker cần scroll tới
|
|
71
|
-
*/
|
|
72
|
-
scroll: (markerId: string) => void;
|
|
73
|
-
};
|
|
34
|
+
getCommentPluginAPI(): CkCommentPlugin | null;
|
|
74
35
|
variable: {
|
|
75
36
|
/**
|
|
76
37
|
* Lấy tất cả variabes trong document
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { EditorConfig, EventInfo, ModelDocumentSelection,
|
|
1
|
+
import { EditorConfig, EventInfo, ModelDocumentSelection, ViewDataTransfer } from 'ckeditor5';
|
|
2
|
+
import { CkCommentConfig } from './plugins/ck-comment/ck-comment.plugin.model';
|
|
2
3
|
export type SdEditorConfig = EditorConfig & {
|
|
3
4
|
getOption?: () => SdDocumentBuilderOption;
|
|
4
5
|
};
|
|
5
6
|
export interface SdDocumentBuilderOption {
|
|
6
7
|
onDropVariable?: (variable: SdDocumentBuilderVariable, dropIndex: number) => boolean | Promise<boolean | SdDocumentBuilderVariable>;
|
|
7
|
-
|
|
8
|
-
onSelectComment?: (markerId: string) => void;
|
|
8
|
+
comment?: CkCommentConfig;
|
|
9
9
|
onSelection?: (selection: ModelDocumentSelection, $event: EventInfo<string, unknown>) => void;
|
|
10
10
|
onOrientation?: (orientation: 'PORTRAIT' | 'LANDSCAPE') => void;
|
|
11
11
|
onPaste?: (data: SdPasteEventData) => void | Promise<void>;
|
|
@@ -18,17 +18,6 @@ export interface SdDocumentBuilderVariable<T = any> {
|
|
|
18
18
|
display: string;
|
|
19
19
|
data?: T;
|
|
20
20
|
}
|
|
21
|
-
export interface SdDocumentBuilderSelectedComment {
|
|
22
|
-
range: ModelRange;
|
|
23
|
-
selectedText: string;
|
|
24
|
-
}
|
|
25
|
-
export interface SdDocumentBuilderComment<T = any> {
|
|
26
|
-
markerId: string;
|
|
27
|
-
selectedText: string;
|
|
28
|
-
comment?: string;
|
|
29
|
-
createdAt?: Date;
|
|
30
|
-
data?: T;
|
|
31
|
-
}
|
|
32
21
|
export interface SdDocumentBuilderHeading {
|
|
33
22
|
id: string;
|
|
34
23
|
text: string;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Plugin, ContextualBalloon } from 'ckeditor5';
|
|
2
|
+
import { CkComment, CkCommentConfig, CkCommentColors } from './ck-comment.plugin.model';
|
|
3
|
+
export declare class CkCommentPlugin extends Plugin {
|
|
4
|
+
#private;
|
|
5
|
+
static get pluginName(): string;
|
|
6
|
+
static get requires(): (typeof ContextualBalloon)[];
|
|
7
|
+
static readonly PENDING_MARKER_ID = "__pending_comment__";
|
|
8
|
+
static readonly DEFAULT_SEARCH_RANGE = 5;
|
|
9
|
+
static readonly DEFAULT_COLORS: CkCommentColors;
|
|
10
|
+
init(): void;
|
|
11
|
+
/**
|
|
12
|
+
* Thiết lập config với callbacks
|
|
13
|
+
*/
|
|
14
|
+
setConfig(config: CkCommentConfig): void;
|
|
15
|
+
/**
|
|
16
|
+
* Thêm comment và tạo marker
|
|
17
|
+
*/
|
|
18
|
+
addComment(comment: CkComment): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Xóa comment theo id
|
|
21
|
+
*/
|
|
22
|
+
removeComment(id: string | number): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Chọn comment theo id - chỉ thêm class highlight, không bôi đen text
|
|
25
|
+
*/
|
|
26
|
+
selectComment(id: string | number, scrollIntoView?: boolean): void;
|
|
27
|
+
/**
|
|
28
|
+
* Thiết lập tất cả comments (khôi phục từ dữ liệu)
|
|
29
|
+
*/
|
|
30
|
+
setComments(comments: CkComment[]): void;
|
|
31
|
+
/**
|
|
32
|
+
* Lấy tất cả comments
|
|
33
|
+
*/
|
|
34
|
+
get comments(): CkComment[];
|
|
35
|
+
/**
|
|
36
|
+
* Thiết lập pending highlight cho selection (khi user đang nhập nội dung comment)
|
|
37
|
+
*/
|
|
38
|
+
setPendingSelection(startPath: number[], endPath: number[]): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Xóa pending highlight và fire onCancelPending callback
|
|
41
|
+
*/
|
|
42
|
+
clearPendingSelection(): void;
|
|
43
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ModelRange } from 'ckeditor5';
|
|
2
|
+
/**
|
|
3
|
+
* Comment status based on text changes
|
|
4
|
+
*/
|
|
5
|
+
export type CkCommentStatus = 'normal' | 'modified' | 'broken';
|
|
6
|
+
/**
|
|
7
|
+
* Color configuration for comment markers
|
|
8
|
+
*/
|
|
9
|
+
export interface CkCommentColors {
|
|
10
|
+
marker?: string;
|
|
11
|
+
markerSelected?: string;
|
|
12
|
+
markerPending?: string;
|
|
13
|
+
markerModified?: string;
|
|
14
|
+
markerBroken?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Comment data structure for CkCommentPlugin
|
|
18
|
+
*/
|
|
19
|
+
export interface CkComment<T = any> {
|
|
20
|
+
id: string | number;
|
|
21
|
+
startPath: number[];
|
|
22
|
+
endPath: number[];
|
|
23
|
+
originalText: string;
|
|
24
|
+
currentText: string;
|
|
25
|
+
status: CkCommentStatus;
|
|
26
|
+
data?: T;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Config for CkCommentPlugin
|
|
30
|
+
*/
|
|
31
|
+
export interface CkCommentConfig {
|
|
32
|
+
onPendingComment?: (comment: CkComment) => void;
|
|
33
|
+
onAddComment?: (comment: CkComment) => void;
|
|
34
|
+
onSelectComment?: (id: string | number) => void;
|
|
35
|
+
onRemoveComment?: (id: string | number) => void;
|
|
36
|
+
onChange?: (comments: CkComment[]) => void;
|
|
37
|
+
onCancelPending?: () => void;
|
|
38
|
+
searchRange?: number;
|
|
39
|
+
debug?: boolean;
|
|
40
|
+
colors?: CkCommentColors;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Data returned when user selects text for comment
|
|
44
|
+
*/
|
|
45
|
+
export interface CkCommentSelection {
|
|
46
|
+
range: ModelRange;
|
|
47
|
+
startPath: number[];
|
|
48
|
+
endPath: number[];
|
|
49
|
+
text: string;
|
|
50
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from './heading/heading.plugin';
|
|
2
|
-
export * from './comment/comment.plugin';
|
|
3
2
|
export * from './variable/variable.plugin';
|
|
4
3
|
export * from './table-custom';
|
|
5
4
|
export * from './image-upload/image-upload.plugin';
|
|
@@ -8,3 +7,5 @@ export * from './page-orientation/page-orientation.plugin';
|
|
|
8
7
|
export * from './paste-handler';
|
|
9
8
|
export * from './highlight-range/highlight-range.plugin';
|
|
10
9
|
export * from './block-space/block-space.plugin';
|
|
10
|
+
export * from './ck-comment/ck-comment.plugin';
|
|
11
|
+
export * from './ck-comment/ck-comment.plugin.model';
|
|
@@ -5,6 +5,7 @@ import { Input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
|
5
5
|
class SdAvatar {
|
|
6
6
|
src;
|
|
7
7
|
size = 32;
|
|
8
|
+
name = '';
|
|
8
9
|
isUrl = false;
|
|
9
10
|
initials = '';
|
|
10
11
|
bgColor = '#ccc';
|
|
@@ -12,18 +13,16 @@ class SdAvatar {
|
|
|
12
13
|
this.#init();
|
|
13
14
|
}
|
|
14
15
|
#init = () => {
|
|
15
|
-
if (!this.src) {
|
|
16
|
-
this.isUrl = false;
|
|
17
|
-
this.initials = '?';
|
|
18
|
-
this.bgColor = '#bdc3c7';
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
16
|
// Kiểm tra xem src có phải là URL (http, https, data:image, hoặc path /)
|
|
22
17
|
const urlPattern = /^(http|https|data:image|\/)/;
|
|
23
|
-
this.isUrl = urlPattern.test(this.src);
|
|
24
|
-
if (!this.isUrl) {
|
|
25
|
-
this.
|
|
26
|
-
this.
|
|
18
|
+
this.isUrl = urlPattern.test(this.src || '');
|
|
19
|
+
if (this.name || !this.isUrl) {
|
|
20
|
+
this.bgColor = this.#generateColor(this.name || this.src || '');
|
|
21
|
+
this.initials = this.#getInitials(this.name || this.src || '');
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
this.bgColor = '#bdc3c7';
|
|
25
|
+
this.initials = '?';
|
|
27
26
|
}
|
|
28
27
|
};
|
|
29
28
|
handleError() {
|
|
@@ -31,13 +30,14 @@ class SdAvatar {
|
|
|
31
30
|
this.#init();
|
|
32
31
|
}
|
|
33
32
|
#getInitials = (name) => {
|
|
34
|
-
return name
|
|
33
|
+
return (name
|
|
35
34
|
.trim()
|
|
36
35
|
.split(' ')
|
|
36
|
+
.filter(Boolean)
|
|
37
37
|
.map(n => n[0])
|
|
38
38
|
.join('')
|
|
39
39
|
.toUpperCase()
|
|
40
|
-
.substring(0, 2);
|
|
40
|
+
.substring(0, 2) || '');
|
|
41
41
|
};
|
|
42
42
|
#generateColor = (name) => {
|
|
43
43
|
const colors = [
|
|
@@ -68,7 +68,7 @@ class SdAvatar {
|
|
|
68
68
|
return colors[Math.abs(hash) % colors.length];
|
|
69
69
|
};
|
|
70
70
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdAvatar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
71
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: SdAvatar, isStandalone: true, selector: "sd-avatar", inputs: { src: "src", size: "size" }, ngImport: i0, template: "<div class=\"sd-avatar\" [style.width.px]=\"size\" [style.height.px]=\"size\" [style.line-height.px]=\"size\" [style.backgroundColor]=\"bgColor\">\r\n @if (isUrl) {\r\n <img [src]=\"src\" (error)=\"handleError()\" alt=\"avatar\" />\r\n } @else {\r\n <span class=\"sd-avatar-text\" [style.fontSize.px]=\"size / 2.5\">\r\n {{ initials }}\r\n </span>\r\n }\r\n</div>\r\n", styles: [".sd-avatar{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;overflow:hidden;color:#fff;font-weight:500;-webkit-user-select:none;user-select:none;background-size:cover}.sd-avatar img{width:100%;height:100%;object-fit:cover}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
71
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: SdAvatar, isStandalone: true, selector: "sd-avatar", inputs: { src: "src", size: "size", name: "name" }, ngImport: i0, template: "<div class=\"sd-avatar\" [style.width.px]=\"size\" [style.height.px]=\"size\" [style.line-height.px]=\"size\" [style.backgroundColor]=\"bgColor\">\r\n @if (isUrl) {\r\n <img [src]=\"src\" (error)=\"handleError()\" alt=\"avatar\" />\r\n } @else {\r\n <span class=\"sd-avatar-text\" [style.fontSize.px]=\"size / 2.5\">\r\n {{ initials }}\r\n </span>\r\n }\r\n</div>\r\n", styles: [".sd-avatar{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;overflow:hidden;color:#fff;font-weight:500;-webkit-user-select:none;user-select:none;background-size:cover}.sd-avatar img{width:100%;height:100%;object-fit:cover}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
72
72
|
}
|
|
73
73
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdAvatar, decorators: [{
|
|
74
74
|
type: Component,
|
|
@@ -78,6 +78,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
78
78
|
args: [{ required: true }]
|
|
79
79
|
}], size: [{
|
|
80
80
|
type: Input
|
|
81
|
+
}], name: [{
|
|
82
|
+
type: Input
|
|
81
83
|
}] } });
|
|
82
84
|
|
|
83
85
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-angular-core-components-avatar.mjs","sources":["../../../projects/sd-angular/components/avatar/src/avatar.component.ts","../../../projects/sd-angular/components/avatar/src/avatar.component.html","../../../projects/sd-angular/components/avatar/sd-angular-core-components-avatar.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, Input,
|
|
1
|
+
{"version":3,"file":"sd-angular-core-components-avatar.mjs","sources":["../../../projects/sd-angular/components/avatar/src/avatar.component.ts","../../../projects/sd-angular/components/avatar/src/avatar.component.html","../../../projects/sd-angular/components/avatar/sd-angular-core-components-avatar.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sd-avatar',\r\n standalone: true,\r\n imports: [CommonModule],\r\n templateUrl: './avatar.component.html',\r\n styleUrls: ['./avatar.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class SdAvatar implements OnInit {\r\n @Input({ required: true }) src: string | undefined | null;\r\n @Input() size: number = 32;\r\n @Input() name: string = '';\r\n\r\n isUrl: boolean = false;\r\n initials: string = '';\r\n bgColor: string = '#ccc';\r\n\r\n ngOnInit(): void {\r\n this.#init();\r\n }\r\n\r\n #init = () => {\r\n // Kiểm tra xem src có phải là URL (http, https, data:image, hoặc path /)\r\n const urlPattern = /^(http|https|data:image|\\/)/;\r\n this.isUrl = urlPattern.test(this.src || '');\r\n if (this.name || !this.isUrl) {\r\n this.bgColor = this.#generateColor(this.name || this.src || '');\r\n this.initials = this.#getInitials(this.name || this.src || '');\r\n } else {\r\n this.bgColor = '#bdc3c7';\r\n this.initials = '?';\r\n }\r\n };\r\n\r\n handleError() {\r\n this.src = undefined; // Nếu ảnh lỗi, chuyển sang hiển thị initials\r\n this.#init();\r\n }\r\n\r\n #getInitials = (name: string): string => {\r\n return (\r\n name\r\n .trim()\r\n .split(' ')\r\n .filter(Boolean)\r\n .map(n => n[0])\r\n .join('')\r\n .toUpperCase()\r\n .substring(0, 2) || ''\r\n );\r\n };\r\n\r\n #generateColor = (name: string): string => {\r\n const colors = [\r\n '#1abc9c',\r\n '#2ecc71',\r\n '#3498db',\r\n '#9b59b6',\r\n '#34495e',\r\n '#16a085',\r\n '#27ae60',\r\n '#2980b9',\r\n '#8e44ad',\r\n '#2c3e50',\r\n '#f1c40f',\r\n '#e67e22',\r\n '#e74c3c',\r\n '#95a5a6',\r\n '#f39c12',\r\n '#d35400',\r\n '#c0392b',\r\n '#bdc3c7',\r\n '#7f8c8d',\r\n ];\r\n let hash = 0;\r\n for (let i = 0; i < name.length; i++) {\r\n hash = name.charCodeAt(i) + ((hash << 5) - hash);\r\n }\r\n return colors[Math.abs(hash) % colors.length];\r\n };\r\n}\r\n","<div class=\"sd-avatar\" [style.width.px]=\"size\" [style.height.px]=\"size\" [style.line-height.px]=\"size\" [style.backgroundColor]=\"bgColor\">\r\n @if (isUrl) {\r\n <img [src]=\"src\" (error)=\"handleError()\" alt=\"avatar\" />\r\n } @else {\r\n <span class=\"sd-avatar-text\" [style.fontSize.px]=\"size / 2.5\">\r\n {{ initials }}\r\n </span>\r\n }\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAWa,QAAQ,CAAA;AACQ,IAAA,GAAG;IACrB,IAAI,GAAW,EAAE;IACjB,IAAI,GAAW,EAAE;IAE1B,KAAK,GAAY,KAAK;IACtB,QAAQ,GAAW,EAAE;IACrB,OAAO,GAAW,MAAM;IAExB,QAAQ,GAAA;QACN,IAAI,CAAC,KAAK,EAAE;IACd;IAEA,KAAK,GAAG,MAAK;;QAEX,MAAM,UAAU,GAAG,6BAA6B;AAChD,QAAA,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC;QAC5C,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;AAC5B,YAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC;AAC/D,YAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC;QAChE;aAAO;AACL,YAAA,IAAI,CAAC,OAAO,GAAG,SAAS;AACxB,YAAA,IAAI,CAAC,QAAQ,GAAG,GAAG;QACrB;AACF,IAAA,CAAC;IAED,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,GAAG,GAAG,SAAS,CAAC;QACrB,IAAI,CAAC,KAAK,EAAE;IACd;AAEA,IAAA,YAAY,GAAG,CAAC,IAAY,KAAY;AACtC,QAAA,QACE;AACG,aAAA,IAAI;aACJ,KAAK,CAAC,GAAG;aACT,MAAM,CAAC,OAAO;aACd,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aACb,IAAI,CAAC,EAAE;AACP,aAAA,WAAW;aACX,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE;AAE5B,IAAA,CAAC;AAED,IAAA,cAAc,GAAG,CAAC,IAAY,KAAY;AACxC,QAAA,MAAM,MAAM,GAAG;YACb,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;SACV;QACD,IAAI,IAAI,GAAG,CAAC;AACZ,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACpC,YAAA,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC;QAClD;AACA,QAAA,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;AAC/C,IAAA,CAAC;wGAvEU,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAR,QAAQ,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,EAAA,GAAA,EAAA,KAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECXrB,kYASA,EAAA,MAAA,EAAA,CAAA,iQAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDHY,YAAY,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAKX,QAAQ,EAAA,UAAA,EAAA,CAAA;kBARpB,SAAS;+BACE,WAAW,EAAA,UAAA,EACT,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,CAAC,EAAA,eAAA,EAGN,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,kYAAA,EAAA,MAAA,EAAA,CAAA,iQAAA,CAAA,EAAA;8BAGpB,GAAG,EAAA,CAAA;sBAA7B,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAChB,IAAI,EAAA,CAAA;sBAAZ;gBACQ,IAAI,EAAA,CAAA;sBAAZ;;;AEdH;;AAEG;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i1 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { input, booleanAttribute, computed, output, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
+
import { inject, ElementRef, input, booleanAttribute, computed, output, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
5
5
|
import * as i3 from '@angular/material/button';
|
|
6
6
|
import { MatButtonModule } from '@angular/material/button';
|
|
7
7
|
import * as i2 from '@angular/material/icon';
|
|
@@ -17,35 +17,36 @@ import { throttleTime, filter } from 'rxjs/operators';
|
|
|
17
17
|
/* eslint-disable @angular-eslint/no-input-rename */
|
|
18
18
|
class SdButton extends SdBaseSecureComponent {
|
|
19
19
|
// ==========================================
|
|
20
|
-
// 1.
|
|
21
|
-
//
|
|
20
|
+
// 1. INJECTS
|
|
21
|
+
// ==========================================
|
|
22
|
+
el = inject(ElementRef);
|
|
23
|
+
// ==========================================
|
|
24
|
+
// 2. SIGNAL INPUTS (Bảo mật 100% với Null/Undefined)
|
|
22
25
|
// ==========================================
|
|
23
26
|
autoIdInput = input(undefined, { alias: 'autoId' });
|
|
24
27
|
type = input('light', {
|
|
25
|
-
transform: value => value || 'light'
|
|
28
|
+
transform: (value) => value || 'light'
|
|
26
29
|
});
|
|
27
30
|
color = input('secondary', {
|
|
28
|
-
transform: value => value || 'secondary'
|
|
31
|
+
transform: (value) => value || 'secondary'
|
|
29
32
|
});
|
|
30
33
|
size = input('sm', {
|
|
31
|
-
transform: value => value || 'sm'
|
|
34
|
+
transform: (value) => value || 'sm'
|
|
32
35
|
});
|
|
33
36
|
fontSet = input('material-icons', {
|
|
34
|
-
transform: value => value || 'material-icons'
|
|
37
|
+
transform: (value) => value || 'material-icons'
|
|
35
38
|
});
|
|
36
|
-
// Các thẻ chuỗi văn bản hoặc icon mặc định không có cũng không sao
|
|
37
39
|
title = input(undefined);
|
|
38
40
|
width = input(undefined);
|
|
39
41
|
tooltip = input(undefined);
|
|
40
42
|
prefixIcon = input(undefined);
|
|
41
43
|
suffixIcon = input(undefined);
|
|
42
|
-
// booleanAttribute tự động biến '', null, undefined thành boolean chuẩn
|
|
43
44
|
disabled = input(false, { transform: booleanAttribute });
|
|
44
45
|
loading = input(false, { transform: booleanAttribute });
|
|
45
46
|
// ==========================================
|
|
46
|
-
//
|
|
47
|
+
// 3. COMPUTED STATE
|
|
47
48
|
// ==========================================
|
|
48
|
-
autoId = computed(() =>
|
|
49
|
+
autoId = computed(() => this.autoIdInput() ? `button-${this.autoIdInput()}` : undefined);
|
|
49
50
|
buttonClasses = computed(() => ({
|
|
50
51
|
'c-square': (this.prefixIcon() || this.suffixIcon()) && !this.title(),
|
|
51
52
|
'c-sm': this.size() === 'sm',
|
|
@@ -54,13 +55,23 @@ class SdButton extends SdBaseSecureComponent {
|
|
|
54
55
|
'c-disabled': this.disabled(),
|
|
55
56
|
}));
|
|
56
57
|
// ==========================================
|
|
57
|
-
//
|
|
58
|
+
// 4. OUTPUT & RXJS STREAMS
|
|
58
59
|
// ==========================================
|
|
59
60
|
click = output();
|
|
60
61
|
#clickSubject = new Subject();
|
|
61
62
|
#subscription = new Subscription();
|
|
62
63
|
constructor() {
|
|
63
64
|
super();
|
|
65
|
+
// Kỹ thuật Đánh chặn sự kiện (Capture Phase)
|
|
66
|
+
// Tóm sống mọi sự kiện click ngay khi nó vừa chạm vào component
|
|
67
|
+
this.el.nativeElement.addEventListener('click', (event) => {
|
|
68
|
+
if (this.disabled() || this.loading()) {
|
|
69
|
+
// Nghiền nát sự kiện, không cho Angular phát (click) ra component cha
|
|
70
|
+
event.preventDefault();
|
|
71
|
+
event.stopPropagation();
|
|
72
|
+
event.stopImmediatePropagation();
|
|
73
|
+
}
|
|
74
|
+
}, { capture: true });
|
|
64
75
|
}
|
|
65
76
|
ngOnInit() {
|
|
66
77
|
this.#subscription.add(this.#clickSubject
|
|
@@ -69,13 +80,6 @@ class SdButton extends SdBaseSecureComponent {
|
|
|
69
80
|
this.click.emit(event);
|
|
70
81
|
}));
|
|
71
82
|
}
|
|
72
|
-
// Chặn sự kiện nổi bọt ở cấp độ Host
|
|
73
|
-
onHostClick(event) {
|
|
74
|
-
if (this.disabled() || this.loading()) {
|
|
75
|
-
event.preventDefault();
|
|
76
|
-
event.stopImmediatePropagation();
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
83
|
// Nhận click từ thẻ button con bên trong
|
|
80
84
|
onInternalClick(event) {
|
|
81
85
|
event.stopPropagation();
|
|
@@ -88,7 +92,7 @@ class SdButton extends SdBaseSecureComponent {
|
|
|
88
92
|
this.#subscription.unsubscribe();
|
|
89
93
|
}
|
|
90
94
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
91
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: SdButton, isStandalone: true, selector: "sd-button", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fontSet: { classPropertyName: "fontSet", publicName: "fontSet", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, prefixIcon: { classPropertyName: "prefixIcon", publicName: "prefixIcon", isSignal: true, isRequired: false, transformFunction: null }, suffixIcon: { classPropertyName: "suffixIcon", publicName: "suffixIcon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { click: "click" }, host: { listeners: { "click": "onHostClick($event)" }, properties: { "class.sd-disabled": "disabled()", "class.sd-loading": "loading()", "attr.disabled": "disabled() ? \"true\" : null" } }, usesInheritance: true, ngImport: i0, template: "@let btnType = type();\n@let btnLoad = loading();\n@let btnTitle = title();\n@let pIcon = prefixIcon();\n@let sIcon = suffixIcon();\n@let fSet = fontSet();\n\n@if (btnType === 'fill') {\n <button\n mat-flat-button\n class=\"c-button c-fill\"\n [ngClass]=\"buttonClasses()\"\n [disabled]=\"disabled()\"\n [color]=\"color()\"\n [attr.data-autoId]=\"autoId()\"\n [style.width]=\"width()\"\n [matTooltip]=\"tooltip() || ''\"\n matTooltipPosition=\"above\"\n (click)=\"onInternalClick($event)\">\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container>\n </button>\n} @else if (btnType === 'light') {\n <button\n mat-flat-button\n class=\"c-button c-light\"\n [ngClass]=\"buttonClasses()\"\n [disabled]=\"disabled()\"\n [color]=\"color()\"\n [attr.data-autoId]=\"autoId()\"\n [style.width]=\"width()\"\n [matTooltip]=\"tooltip() || ''\"\n matTooltipPosition=\"above\"\n (click)=\"onInternalClick($event)\">\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container>\n </button>\n} @else if (btnType === 'outline') {\n <button\n mat-stroked-button\n class=\"c-button c-outline\"\n [ngClass]=\"buttonClasses()\"\n [disabled]=\"disabled()\"\n [color]=\"color()\"\n [attr.data-autoId]=\"autoId()\"\n [style.width]=\"width()\"\n [matTooltip]=\"tooltip() || ''\"\n matTooltipPosition=\"above\"\n (click)=\"onInternalClick($event)\">\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container>\n </button>\n} @else if (btnType === 'link') {\n <button\n mat-button\n class=\"c-button c-link\"\n [ngClass]=\"buttonClasses()\"\n [disabled]=\"disabled()\"\n [color]=\"color()\"\n [attr.data-autoId]=\"autoId()\"\n [style.width]=\"width()\"\n [matTooltip]=\"tooltip() || ''\"\n matTooltipPosition=\"above\"\n (click)=\"onInternalClick($event)\">\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container>\n </button>\n}\n\n<ng-template #contentTpl>\n <div class=\"c-button-content-wrapper\">\n @if (btnLoad) {\n <mat-spinner mode=\"indeterminate\" diameter=\"18\" strokeWidth=\"2\" class=\"c-spinner\"></mat-spinner>\n } @else if (pIcon) {\n <mat-icon [fontSet]=\"fSet\" class=\"c-icon-prefix\">{{ pIcon }}</mat-icon>\n }\n\n @if (btnTitle) {\n <span class=\"c-title\" [class.ml-8]=\"btnLoad || pIcon\" [class.mr-8]=\"sIcon && !btnLoad\">\n {{ btnTitle }}\n </span>\n }\n\n @if (sIcon && !btnLoad) {\n <mat-icon [fontSet]=\"fSet\" class=\"c-icon-suffix\">{{ sIcon }}</mat-icon>\n }\n\n @if (!btnTitle && !pIcon && !btnLoad && sIcon) {\n <mat-icon [fontSet]=\"fSet\">{{ sIcon }}</mat-icon>\n }\n </div>\n</ng-template>\n", styles: [".text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-light{color:var(--sd-light)!important}.bg-light{background:var(--sd-light)!important}.border-light{border-color:var(--sd-light)!important}.text-dark{color:var(--sd-dark)!important}.bg-dark{background:var(--sd-dark)!important}.border-dark{border-color:var(--sd-dark)!important}.text-black500{color:var(--sd-black500)!important}.bg-black500{background:var(--sd-black500)!important}.border-black500{border-color:var(--sd-black500)!important}.text-black400{color:var(--sd-black400)!important}.bg-black400{background:var(--sd-black400)!important}.border-black400{border-color:var(--sd-black400)!important}.text-black300{color:var(--sd-black300)!important}.bg-black300{background:var(--sd-black300)!important}.border-black300{border-color:var(--sd-black300)!important}.text-black200{color:var(--sd-black200)!important}.bg-black200{background:var(--sd-black200)!important}.border-black200{border-color:var(--sd-black200)!important}.text-black100{color:var(--sd-black100)!important}.bg-black100{background:var(--sd-black100)!important}.border-black100{border-color:var(--sd-black100)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}:host{display:inline-block;pointer-events:auto}:host.sd-disabled{cursor:not-allowed}:host.sd-loading{cursor:wait}:host ::ng-deep button.c-button{pointer-events:auto;min-width:auto}:host ::ng-deep button.c-button .mat-button-wrapper,:host ::ng-deep button.c-button .mdc-button__label{display:flex;align-items:center;justify-content:center;width:100%}:host ::ng-deep button.c-button[disabled],:host ::ng-deep button.c-button.mat-button-disabled{pointer-events:none;color:#a6a6a6!important;background-color:#e9e9e9!important}:host ::ng-deep button.c-button.c-square{min-width:auto!important;padding:0!important}:host ::ng-deep button.c-button.c-sm{font-size:14px!important;height:32px;line-height:20px!important;padding:2px 12px!important;font-weight:400}:host ::ng-deep button.c-button.c-sm mat-icon{height:16px!important;width:16px!important;font-size:16px!important}:host ::ng-deep button.c-button.c-sm.c-square{width:32px!important;min-width:auto!important;padding:0!important}:host ::ng-deep button.c-button.c-md{font-size:16px;height:40px;line-height:20px;padding:2px 16px!important;font-weight:400}:host ::ng-deep button.c-button.c-md mat-icon{height:16px!important;width:16px!important;font-size:16px!important}:host ::ng-deep button.c-button.c-md.c-square{width:40px!important;min-width:auto!important;padding:0!important}:host ::ng-deep button.c-button.c-lg{font-size:16px!important;line-height:20px!important;padding:2px 16px!important;height:48px}:host ::ng-deep button.c-button.c-lg.c-square{width:48px!important;min-width:auto!important;padding:0!important}:host ::ng-deep button.c-button:focus{outline:none}:host ::ng-deep button.c-button.c-disabled{opacity:.5}:host ::ng-deep button.c-button.c-fill.mat-mdc-unelevated-button.mat-primary{background-color:var(--sd-primary);color:#fff}:host ::ng-deep button.c-button.c-fill.mat-mdc-unelevated-button.mat-info{background-color:var(--sd-info);color:#fff}:host ::ng-deep button.c-button.c-fill.mat-mdc-unelevated-button.mat-success{background-color:var(--sd-success);color:#fff}:host ::ng-deep button.c-button.c-fill.mat-mdc-unelevated-button.mat-warning{background-color:var(--sd-warning);color:#fff}:host ::ng-deep button.c-button.c-fill.mat-mdc-unelevated-button.mat-error{background-color:var(--sd-error);color:#fff}:host ::ng-deep button.c-button.c-fill.mat-mdc-unelevated-button.mat-secondary{background-color:#000!important;color:#fff}:host ::ng-deep button.c-button.c-fill .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:#fff!important}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-primary{background-color:var(--sd-primary-light);color:var(--sd-primary)}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-primary .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-primary)!important}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-info{background-color:var(--sd-info-light);color:var(--sd-info)}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-info .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-info)!important}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-success{background-color:var(--sd-success-light);color:var(--sd-success)}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-success .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-success)!important}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-warning{background-color:var(--sd-warning-light);color:var(--sd-warning)}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-warning .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-warning)!important}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-error{background-color:var(--sd-error-light);color:var(--sd-error)}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-error .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-error)!important}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-secondary{background-color:var(--sd-secondary-light);color:#000!important}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-secondary .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:#000!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button{border-color:#d3d3d3}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-primary{color:var(--sd-primary)}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-primary .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-primary)!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-info{color:var(--sd-info)}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-info .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-info)!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-success{color:var(--sd-success)}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-success .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-success)!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-warning{color:var(--sd-warning)}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-warning .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-warning)!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-error{color:var(--sd-error)}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-error .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-error)!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-secondary{color:#000!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-secondary .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:#000!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-button-disabled{background:transparent!important}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-primary{color:var(--sd-primary)}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-primary .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-primary)!important}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-info{color:var(--sd-info)}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-info .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-info)!important}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-success{color:var(--sd-success)}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-success .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-success)!important}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-warning{color:var(--sd-warning)}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-warning .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-warning)!important}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-error{color:var(--sd-error)}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-error .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-error)!important}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-secondary{color:#000!important}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-secondary .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:#000!important}:host ::ng-deep .c-button-content-wrapper{display:flex;align-items:center;justify-content:center;width:100%;pointer-events:none}:host ::ng-deep .c-spinner{display:inline-block}:host.sd-loading ::ng-deep button.c-button{pointer-events:none;opacity:.85}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
95
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: SdButton, isStandalone: true, selector: "sd-button", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fontSet: { classPropertyName: "fontSet", publicName: "fontSet", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, prefixIcon: { classPropertyName: "prefixIcon", publicName: "prefixIcon", isSignal: true, isRequired: false, transformFunction: null }, suffixIcon: { classPropertyName: "suffixIcon", publicName: "suffixIcon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { click: "click" }, host: { properties: { "class.sd-disabled": "disabled()", "class.sd-loading": "loading()", "attr.disabled": "disabled() ? \"true\" : null" } }, usesInheritance: true, ngImport: i0, template: "@let btnType = type();\n@let btnLoad = loading();\n@let btnTitle = title();\n@let pIcon = prefixIcon();\n@let sIcon = suffixIcon();\n@let fSet = fontSet();\n\n@if (btnType === 'fill') {\n <button\n mat-flat-button\n class=\"c-button c-fill\"\n [ngClass]=\"buttonClasses()\"\n [disabled]=\"disabled()\"\n [color]=\"color()\"\n [attr.data-autoId]=\"autoId()\"\n [style.width]=\"width()\"\n [matTooltip]=\"tooltip() || ''\"\n matTooltipPosition=\"above\"\n (click)=\"onInternalClick($event)\">\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container>\n </button>\n} @else if (btnType === 'light') {\n <button\n mat-flat-button\n class=\"c-button c-light\"\n [ngClass]=\"buttonClasses()\"\n [disabled]=\"disabled()\"\n [color]=\"color()\"\n [attr.data-autoId]=\"autoId()\"\n [style.width]=\"width()\"\n [matTooltip]=\"tooltip() || ''\"\n matTooltipPosition=\"above\"\n (click)=\"onInternalClick($event)\">\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container>\n </button>\n} @else if (btnType === 'outline') {\n <button\n mat-stroked-button\n class=\"c-button c-outline\"\n [ngClass]=\"buttonClasses()\"\n [disabled]=\"disabled()\"\n [color]=\"color()\"\n [attr.data-autoId]=\"autoId()\"\n [style.width]=\"width()\"\n [matTooltip]=\"tooltip() || ''\"\n matTooltipPosition=\"above\"\n (click)=\"onInternalClick($event)\">\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container>\n </button>\n} @else if (btnType === 'link') {\n <button\n mat-button\n class=\"c-button c-link\"\n [ngClass]=\"buttonClasses()\"\n [disabled]=\"disabled()\"\n [color]=\"color()\"\n [attr.data-autoId]=\"autoId()\"\n [style.width]=\"width()\"\n [matTooltip]=\"tooltip() || ''\"\n matTooltipPosition=\"above\"\n (click)=\"onInternalClick($event)\">\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container>\n </button>\n}\n\n<ng-template #contentTpl>\n <div class=\"c-button-content-wrapper\">\n @if (btnLoad) {\n <mat-spinner mode=\"indeterminate\" diameter=\"18\" strokeWidth=\"2\" class=\"c-spinner\"></mat-spinner>\n } @else if (pIcon) {\n <mat-icon [fontSet]=\"fSet\" class=\"c-icon-prefix\">{{ pIcon }}</mat-icon>\n }\n\n @if (btnTitle) {\n <span class=\"c-title\" [class.ml-8]=\"btnLoad || pIcon\" [class.mr-8]=\"sIcon && !btnLoad\">\n {{ btnTitle }}\n </span>\n }\n\n @if (sIcon && !btnLoad) {\n <mat-icon [fontSet]=\"fSet\" class=\"c-icon-suffix\">{{ sIcon }}</mat-icon>\n }\n\n @if (!btnTitle && !pIcon && !btnLoad && sIcon) {\n <mat-icon [fontSet]=\"fSet\">{{ sIcon }}</mat-icon>\n }\n </div>\n</ng-template>\n", styles: [".text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-light{color:var(--sd-light)!important}.bg-light{background:var(--sd-light)!important}.border-light{border-color:var(--sd-light)!important}.text-dark{color:var(--sd-dark)!important}.bg-dark{background:var(--sd-dark)!important}.border-dark{border-color:var(--sd-dark)!important}.text-black500{color:var(--sd-black500)!important}.bg-black500{background:var(--sd-black500)!important}.border-black500{border-color:var(--sd-black500)!important}.text-black400{color:var(--sd-black400)!important}.bg-black400{background:var(--sd-black400)!important}.border-black400{border-color:var(--sd-black400)!important}.text-black300{color:var(--sd-black300)!important}.bg-black300{background:var(--sd-black300)!important}.border-black300{border-color:var(--sd-black300)!important}.text-black200{color:var(--sd-black200)!important}.bg-black200{background:var(--sd-black200)!important}.border-black200{border-color:var(--sd-black200)!important}.text-black100{color:var(--sd-black100)!important}.bg-black100{background:var(--sd-black100)!important}.border-black100{border-color:var(--sd-black100)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}:host{display:inline-block;pointer-events:auto}:host.sd-disabled{cursor:not-allowed}:host.sd-loading{cursor:wait}:host ::ng-deep button.c-button{pointer-events:auto;min-width:auto}:host ::ng-deep button.c-button .mat-button-wrapper,:host ::ng-deep button.c-button .mdc-button__label{display:flex;align-items:center;justify-content:center;width:100%}:host ::ng-deep button.c-button[disabled],:host ::ng-deep button.c-button.mat-button-disabled{pointer-events:none;color:#a6a6a6!important;background-color:#e9e9e9!important}:host ::ng-deep button.c-button.c-square{min-width:auto!important;padding:0!important}:host ::ng-deep button.c-button.c-sm{font-size:14px!important;height:32px;line-height:20px!important;padding:2px 12px!important;font-weight:400}:host ::ng-deep button.c-button.c-sm mat-icon{height:16px!important;width:16px!important;font-size:16px!important}:host ::ng-deep button.c-button.c-sm.c-square{width:32px!important;min-width:auto!important;padding:0!important}:host ::ng-deep button.c-button.c-md{font-size:16px;height:40px;line-height:20px;padding:2px 16px!important;font-weight:400}:host ::ng-deep button.c-button.c-md mat-icon{height:16px!important;width:16px!important;font-size:16px!important}:host ::ng-deep button.c-button.c-md.c-square{width:40px!important;min-width:auto!important;padding:0!important}:host ::ng-deep button.c-button.c-lg{font-size:16px!important;line-height:20px!important;padding:2px 16px!important;height:48px}:host ::ng-deep button.c-button.c-lg.c-square{width:48px!important;min-width:auto!important;padding:0!important}:host ::ng-deep button.c-button:focus{outline:none}:host ::ng-deep button.c-button.c-disabled{opacity:.5}:host ::ng-deep button.c-button.c-fill.mat-mdc-unelevated-button.mat-primary{background-color:var(--sd-primary);color:#fff}:host ::ng-deep button.c-button.c-fill.mat-mdc-unelevated-button.mat-info{background-color:var(--sd-info);color:#fff}:host ::ng-deep button.c-button.c-fill.mat-mdc-unelevated-button.mat-success{background-color:var(--sd-success);color:#fff}:host ::ng-deep button.c-button.c-fill.mat-mdc-unelevated-button.mat-warning{background-color:var(--sd-warning);color:#fff}:host ::ng-deep button.c-button.c-fill.mat-mdc-unelevated-button.mat-error{background-color:var(--sd-error);color:#fff}:host ::ng-deep button.c-button.c-fill.mat-mdc-unelevated-button.mat-secondary{background-color:#000!important;color:#fff}:host ::ng-deep button.c-button.c-fill .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:#fff!important}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-primary{background-color:var(--sd-primary-light);color:var(--sd-primary)}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-primary .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-primary)!important}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-info{background-color:var(--sd-info-light);color:var(--sd-info)}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-info .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-info)!important}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-success{background-color:var(--sd-success-light);color:var(--sd-success)}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-success .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-success)!important}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-warning{background-color:var(--sd-warning-light);color:var(--sd-warning)}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-warning .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-warning)!important}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-error{background-color:var(--sd-error-light);color:var(--sd-error)}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-error .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-error)!important}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-secondary{background-color:var(--sd-secondary-light);color:#000!important}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-secondary .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:#000!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button{border-color:#d3d3d3}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-primary{color:var(--sd-primary)}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-primary .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-primary)!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-info{color:var(--sd-info)}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-info .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-info)!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-success{color:var(--sd-success)}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-success .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-success)!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-warning{color:var(--sd-warning)}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-warning .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-warning)!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-error{color:var(--sd-error)}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-error .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-error)!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-secondary{color:#000!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-secondary .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:#000!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-button-disabled{background:transparent!important}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-primary{color:var(--sd-primary)}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-primary .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-primary)!important}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-info{color:var(--sd-info)}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-info .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-info)!important}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-success{color:var(--sd-success)}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-success .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-success)!important}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-warning{color:var(--sd-warning)}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-warning .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-warning)!important}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-error{color:var(--sd-error)}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-error .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-error)!important}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-secondary{color:#000!important}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-secondary .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:#000!important}:host ::ng-deep .c-button-content-wrapper{display:flex;align-items:center;justify-content:center;width:100%;pointer-events:none}:host ::ng-deep .c-spinner{display:inline-block}:host.sd-loading ::ng-deep button.c-button{pointer-events:none;opacity:.85}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
92
96
|
}
|
|
93
97
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdButton, decorators: [{
|
|
94
98
|
type: Component,
|
|
@@ -96,7 +100,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
96
100
|
'[class.sd-disabled]': 'disabled()',
|
|
97
101
|
'[class.sd-loading]': 'loading()',
|
|
98
102
|
'[attr.disabled]': 'disabled() ? "true" : null',
|
|
99
|
-
'(click)': 'onHostClick($event)',
|
|
100
103
|
}, template: "@let btnType = type();\n@let btnLoad = loading();\n@let btnTitle = title();\n@let pIcon = prefixIcon();\n@let sIcon = suffixIcon();\n@let fSet = fontSet();\n\n@if (btnType === 'fill') {\n <button\n mat-flat-button\n class=\"c-button c-fill\"\n [ngClass]=\"buttonClasses()\"\n [disabled]=\"disabled()\"\n [color]=\"color()\"\n [attr.data-autoId]=\"autoId()\"\n [style.width]=\"width()\"\n [matTooltip]=\"tooltip() || ''\"\n matTooltipPosition=\"above\"\n (click)=\"onInternalClick($event)\">\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container>\n </button>\n} @else if (btnType === 'light') {\n <button\n mat-flat-button\n class=\"c-button c-light\"\n [ngClass]=\"buttonClasses()\"\n [disabled]=\"disabled()\"\n [color]=\"color()\"\n [attr.data-autoId]=\"autoId()\"\n [style.width]=\"width()\"\n [matTooltip]=\"tooltip() || ''\"\n matTooltipPosition=\"above\"\n (click)=\"onInternalClick($event)\">\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container>\n </button>\n} @else if (btnType === 'outline') {\n <button\n mat-stroked-button\n class=\"c-button c-outline\"\n [ngClass]=\"buttonClasses()\"\n [disabled]=\"disabled()\"\n [color]=\"color()\"\n [attr.data-autoId]=\"autoId()\"\n [style.width]=\"width()\"\n [matTooltip]=\"tooltip() || ''\"\n matTooltipPosition=\"above\"\n (click)=\"onInternalClick($event)\">\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container>\n </button>\n} @else if (btnType === 'link') {\n <button\n mat-button\n class=\"c-button c-link\"\n [ngClass]=\"buttonClasses()\"\n [disabled]=\"disabled()\"\n [color]=\"color()\"\n [attr.data-autoId]=\"autoId()\"\n [style.width]=\"width()\"\n [matTooltip]=\"tooltip() || ''\"\n matTooltipPosition=\"above\"\n (click)=\"onInternalClick($event)\">\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container>\n </button>\n}\n\n<ng-template #contentTpl>\n <div class=\"c-button-content-wrapper\">\n @if (btnLoad) {\n <mat-spinner mode=\"indeterminate\" diameter=\"18\" strokeWidth=\"2\" class=\"c-spinner\"></mat-spinner>\n } @else if (pIcon) {\n <mat-icon [fontSet]=\"fSet\" class=\"c-icon-prefix\">{{ pIcon }}</mat-icon>\n }\n\n @if (btnTitle) {\n <span class=\"c-title\" [class.ml-8]=\"btnLoad || pIcon\" [class.mr-8]=\"sIcon && !btnLoad\">\n {{ btnTitle }}\n </span>\n }\n\n @if (sIcon && !btnLoad) {\n <mat-icon [fontSet]=\"fSet\" class=\"c-icon-suffix\">{{ sIcon }}</mat-icon>\n }\n\n @if (!btnTitle && !pIcon && !btnLoad && sIcon) {\n <mat-icon [fontSet]=\"fSet\">{{ sIcon }}</mat-icon>\n }\n </div>\n</ng-template>\n", styles: [".text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-light{color:var(--sd-light)!important}.bg-light{background:var(--sd-light)!important}.border-light{border-color:var(--sd-light)!important}.text-dark{color:var(--sd-dark)!important}.bg-dark{background:var(--sd-dark)!important}.border-dark{border-color:var(--sd-dark)!important}.text-black500{color:var(--sd-black500)!important}.bg-black500{background:var(--sd-black500)!important}.border-black500{border-color:var(--sd-black500)!important}.text-black400{color:var(--sd-black400)!important}.bg-black400{background:var(--sd-black400)!important}.border-black400{border-color:var(--sd-black400)!important}.text-black300{color:var(--sd-black300)!important}.bg-black300{background:var(--sd-black300)!important}.border-black300{border-color:var(--sd-black300)!important}.text-black200{color:var(--sd-black200)!important}.bg-black200{background:var(--sd-black200)!important}.border-black200{border-color:var(--sd-black200)!important}.text-black100{color:var(--sd-black100)!important}.bg-black100{background:var(--sd-black100)!important}.border-black100{border-color:var(--sd-black100)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}:host{display:inline-block;pointer-events:auto}:host.sd-disabled{cursor:not-allowed}:host.sd-loading{cursor:wait}:host ::ng-deep button.c-button{pointer-events:auto;min-width:auto}:host ::ng-deep button.c-button .mat-button-wrapper,:host ::ng-deep button.c-button .mdc-button__label{display:flex;align-items:center;justify-content:center;width:100%}:host ::ng-deep button.c-button[disabled],:host ::ng-deep button.c-button.mat-button-disabled{pointer-events:none;color:#a6a6a6!important;background-color:#e9e9e9!important}:host ::ng-deep button.c-button.c-square{min-width:auto!important;padding:0!important}:host ::ng-deep button.c-button.c-sm{font-size:14px!important;height:32px;line-height:20px!important;padding:2px 12px!important;font-weight:400}:host ::ng-deep button.c-button.c-sm mat-icon{height:16px!important;width:16px!important;font-size:16px!important}:host ::ng-deep button.c-button.c-sm.c-square{width:32px!important;min-width:auto!important;padding:0!important}:host ::ng-deep button.c-button.c-md{font-size:16px;height:40px;line-height:20px;padding:2px 16px!important;font-weight:400}:host ::ng-deep button.c-button.c-md mat-icon{height:16px!important;width:16px!important;font-size:16px!important}:host ::ng-deep button.c-button.c-md.c-square{width:40px!important;min-width:auto!important;padding:0!important}:host ::ng-deep button.c-button.c-lg{font-size:16px!important;line-height:20px!important;padding:2px 16px!important;height:48px}:host ::ng-deep button.c-button.c-lg.c-square{width:48px!important;min-width:auto!important;padding:0!important}:host ::ng-deep button.c-button:focus{outline:none}:host ::ng-deep button.c-button.c-disabled{opacity:.5}:host ::ng-deep button.c-button.c-fill.mat-mdc-unelevated-button.mat-primary{background-color:var(--sd-primary);color:#fff}:host ::ng-deep button.c-button.c-fill.mat-mdc-unelevated-button.mat-info{background-color:var(--sd-info);color:#fff}:host ::ng-deep button.c-button.c-fill.mat-mdc-unelevated-button.mat-success{background-color:var(--sd-success);color:#fff}:host ::ng-deep button.c-button.c-fill.mat-mdc-unelevated-button.mat-warning{background-color:var(--sd-warning);color:#fff}:host ::ng-deep button.c-button.c-fill.mat-mdc-unelevated-button.mat-error{background-color:var(--sd-error);color:#fff}:host ::ng-deep button.c-button.c-fill.mat-mdc-unelevated-button.mat-secondary{background-color:#000!important;color:#fff}:host ::ng-deep button.c-button.c-fill .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:#fff!important}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-primary{background-color:var(--sd-primary-light);color:var(--sd-primary)}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-primary .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-primary)!important}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-info{background-color:var(--sd-info-light);color:var(--sd-info)}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-info .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-info)!important}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-success{background-color:var(--sd-success-light);color:var(--sd-success)}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-success .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-success)!important}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-warning{background-color:var(--sd-warning-light);color:var(--sd-warning)}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-warning .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-warning)!important}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-error{background-color:var(--sd-error-light);color:var(--sd-error)}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-error .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-error)!important}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-secondary{background-color:var(--sd-secondary-light);color:#000!important}:host ::ng-deep button.c-button.c-light.mat-mdc-unelevated-button.mat-secondary .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:#000!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button{border-color:#d3d3d3}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-primary{color:var(--sd-primary)}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-primary .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-primary)!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-info{color:var(--sd-info)}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-info .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-info)!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-success{color:var(--sd-success)}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-success .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-success)!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-warning{color:var(--sd-warning)}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-warning .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-warning)!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-error{color:var(--sd-error)}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-error .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-error)!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-secondary{color:#000!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-secondary .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:#000!important}:host ::ng-deep button.c-button.c-outline.mat-mdc-outlined-button.mat-button-disabled{background:transparent!important}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-primary{color:var(--sd-primary)}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-primary .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-primary)!important}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-info{color:var(--sd-info)}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-info .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-info)!important}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-success{color:var(--sd-success)}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-success .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-success)!important}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-warning{color:var(--sd-warning)}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-warning .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-warning)!important}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-error{color:var(--sd-error)}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-error .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:var(--sd-error)!important}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-secondary{color:#000!important}:host ::ng-deep button.c-button.c-link.mat-mdc-button.mat-secondary .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic circle{stroke:#000!important}:host ::ng-deep .c-button-content-wrapper{display:flex;align-items:center;justify-content:center;width:100%;pointer-events:none}:host ::ng-deep .c-spinner{display:inline-block}:host.sd-loading ::ng-deep button.c-button{pointer-events:none;opacity:.85}\n"] }]
|
|
101
104
|
}], ctorParameters: () => [] });
|
|
102
105
|
|