crdx-components 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/crdx-components.mjs +1960 -0
- package/fesm2022/crdx-components.mjs.map +1 -0
- package/package.json +28 -23
- package/src/lib/styles/index.scss +1 -0
- package/src/lib/styles/overrides/_index.scss +2 -4
- package/src/lib/styles/overrides/_mat-button-overrides.scss +0 -11
- package/src/lib/styles/overrides/_mat-checkbox-overrides.scss +2 -2
- package/src/lib/styles/overrides/_mat-radio-overrides.scss +40 -0
- package/types/crdx-components.d.ts +811 -0
- package/types/crdx-components.d.ts.map +1 -0
- package/.github/workflows/publish.yml +0 -38
- package/bun.lock +0 -491
- package/crdx-components-1.0.0.tgz +0 -0
- package/crdx-components-tokenized-components-1.0.1.tgz +0 -0
- package/ng-package.json +0 -12
- package/npm +0 -0
- package/src/index.ts +0 -45
- package/src/lib/components/breadcrumb/breadcrumb.component.css +0 -206
- package/src/lib/components/breadcrumb/breadcrumb.component.html +0 -15
- package/src/lib/components/breadcrumb/breadcrumb.component.ts +0 -47
- package/src/lib/components/button/button.css +0 -371
- package/src/lib/components/button/button.html +0 -187
- package/src/lib/components/button/button.ts +0 -103
- package/src/lib/components/card/card.css +0 -285
- package/src/lib/components/card/card.html +0 -69
- package/src/lib/components/card/card.ts +0 -93
- package/src/lib/components/checkbox/checkbox-showcase.component.css +0 -42
- package/src/lib/components/checkbox/checkbox-showcase.component.html +0 -36
- package/src/lib/components/checkbox/checkbox-showcase.component.ts +0 -13
- package/src/lib/components/checkbox/checkbox.css +0 -10
- package/src/lib/components/checkbox/checkbox.html +0 -13
- package/src/lib/components/checkbox/checkbox.ts +0 -64
- package/src/lib/components/circular-progress-stepper/circular-progress-stepper.css +0 -89
- package/src/lib/components/circular-progress-stepper/circular-progress-stepper.html +0 -23
- package/src/lib/components/circular-progress-stepper/circular-progress-stepper.ts +0 -40
- package/src/lib/components/dialogs/alert-modal/alert-modal.css +0 -118
- package/src/lib/components/dialogs/alert-modal/alert-modal.html +0 -29
- package/src/lib/components/dialogs/alert-modal/alert-modal.ts +0 -28
- package/src/lib/components/dialogs/confirm-modal/confirm-modal.css +0 -219
- package/src/lib/components/dialogs/confirm-modal/confirm-modal.html +0 -60
- package/src/lib/components/dialogs/confirm-modal/confirm-modal.store.ts +0 -139
- package/src/lib/components/dialogs/confirm-modal/confirm-modal.ts +0 -63
- package/src/lib/components/dialogs/container-custom/container-custom.css +0 -11
- package/src/lib/components/dialogs/container-custom/container-custom.html +0 -3
- package/src/lib/components/dialogs/container-custom/container-custom.ts +0 -37
- package/src/lib/components/dialogs/container-custom/custom-modal.state.ts +0 -57
- package/src/lib/components/dialogs/error-modal/error-modal.css +0 -53
- package/src/lib/components/dialogs/error-modal/error-modal.html +0 -17
- package/src/lib/components/dialogs/error-modal/error-modal.ts +0 -20
- package/src/lib/components/dialogs/side-modal/side-modal.css +0 -80
- package/src/lib/components/dialogs/side-modal/side-modal.html +0 -30
- package/src/lib/components/dialogs/side-modal/side-modal.state.ts +0 -78
- package/src/lib/components/dialogs/side-modal/side-modal.ts +0 -50
- package/src/lib/components/divider/divider.css +0 -24
- package/src/lib/components/divider/divider.html +0 -7
- package/src/lib/components/divider/divider.ts +0 -13
- package/src/lib/components/footer-actions/footer/footer-flow.store.ts +0 -30
- package/src/lib/components/footer-actions/footer/footer.html +0 -14
- package/src/lib/components/footer-actions/footer/footer.ts +0 -50
- package/src/lib/components/footer-actions/modal-footer-actions/modal-footer-actions.css +0 -44
- package/src/lib/components/footer-actions/modal-footer-actions/modal-footer-actions.html +0 -7
- package/src/lib/components/footer-actions/modal-footer-actions/modal-footer-actions.ts +0 -12
- package/src/lib/components/footer-actions/page-footer-actions/page-footer-actions.css +0 -31
- package/src/lib/components/footer-actions/page-footer-actions/page-footer-actions.html +0 -7
- package/src/lib/components/footer-actions/page-footer-actions/page-footer-actions.ts +0 -12
- package/src/lib/components/form-field/select-field.css +0 -178
- package/src/lib/components/form-field/select-field.html +0 -94
- package/src/lib/components/form-field/select-field.ts +0 -324
- package/src/lib/components/form-field/text-field.css +0 -41
- package/src/lib/components/form-field/text-field.html +0 -38
- package/src/lib/components/form-field/text-field.ts +0 -102
- package/src/lib/components/header/header.css +0 -142
- package/src/lib/components/header/header.html +0 -36
- package/src/lib/components/header/header.ts +0 -101
- package/src/lib/components/icon-button/icon-button.css +0 -445
- package/src/lib/components/icon-button/icon-button.html +0 -15
- package/src/lib/components/icon-button/icon-button.ts +0 -49
- package/src/lib/components/list-item/list-item.css +0 -122
- package/src/lib/components/list-item/list-item.html +0 -79
- package/src/lib/components/list-item/list-item.ts +0 -104
- package/src/lib/components/menu/menu.css +0 -39
- package/src/lib/components/menu/menu.html +0 -57
- package/src/lib/components/menu/menu.ts +0 -159
- package/src/lib/components/shared-table/shared-table-cell-template.directive.ts +0 -25
- package/src/lib/components/shared-table/shared-table.component.css +0 -223
- package/src/lib/components/shared-table/shared-table.component.html +0 -96
- package/src/lib/components/shared-table/shared-table.component.ts +0 -172
- package/src/lib/components/sidebar/sidebar.css +0 -234
- package/src/lib/components/sidebar/sidebar.html +0 -67
- package/src/lib/components/sidebar/sidebar.ts +0 -92
- package/src/lib/components/slide-toggle/slide-toggle.css +0 -0
- package/src/lib/components/slide-toggle/slide-toggle.html +0 -3
- package/src/lib/components/slide-toggle/slide-toggle.ts +0 -18
- package/src/lib/components/spinner/spinner.css +0 -9
- package/src/lib/components/spinner/spinner.html +0 -9
- package/src/lib/components/spinner/spinner.ts +0 -17
- package/src/lib/components/tooltip/tooltip.css +0 -32
- package/src/lib/components/tooltip/tooltip.html +0 -3
- package/src/lib/components/tooltip/tooltip.ts +0 -31
- package/src/lib/icons/register-icons.ts +0 -101
- package/src/lib/lib-ui/lib-ui.html +0 -1
- package/src/lib/lib-ui/lib-ui.scss +0 -0
- package/src/lib/lib-ui/lib-ui.ts +0 -9
- package/tsconfig.json +0 -30
- package/tsconfig.lib.json +0 -20
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
@switch (variant()) {
|
|
2
|
-
@case ('filled') {
|
|
3
|
-
<button
|
|
4
|
-
mat-flat-button
|
|
5
|
-
class="lib-mat-btn"
|
|
6
|
-
[attr.type]="type()"
|
|
7
|
-
[disabled]="disabled()"
|
|
8
|
-
[ngClass]="classes()"
|
|
9
|
-
[attr.aria-pressed]="toggle() ? selected() : null"
|
|
10
|
-
(pointerdown)="onPressStart()"
|
|
11
|
-
(pointerup)="onPressEnd()"
|
|
12
|
-
(pointerleave)="onPressCancel()"
|
|
13
|
-
(pointercancel)="onPressCancel()"
|
|
14
|
-
(keydown)="onKeyDown($event)"
|
|
15
|
-
(keyup)="onKeyUp()"
|
|
16
|
-
(blur)="onPressEnd()"
|
|
17
|
-
>
|
|
18
|
-
@if (hasInputContent()) {
|
|
19
|
-
@if (iconPosition() === 'leading' && icon()) {
|
|
20
|
-
<mat-icon [svgIcon]="icon()">{{ icon() }}</mat-icon>
|
|
21
|
-
}
|
|
22
|
-
@if (label()) {
|
|
23
|
-
<span [class]="labelClass()">{{ label() }}</span>
|
|
24
|
-
}
|
|
25
|
-
@if (iconPosition() === 'trailing' && icon()) {
|
|
26
|
-
<mat-icon [svgIcon]="icon()">{{ icon() }}</mat-icon>
|
|
27
|
-
}
|
|
28
|
-
} @else {
|
|
29
|
-
<ng-content></ng-content>
|
|
30
|
-
}
|
|
31
|
-
</button>
|
|
32
|
-
}
|
|
33
|
-
@case ('outlined') {
|
|
34
|
-
<button
|
|
35
|
-
mat-stroked-button
|
|
36
|
-
class="lib-mat-btn"
|
|
37
|
-
[attr.type]="type()"
|
|
38
|
-
[disabled]="disabled()"
|
|
39
|
-
[ngClass]="classes()"
|
|
40
|
-
[attr.aria-pressed]="toggle() ? selected() : null"
|
|
41
|
-
(pointerdown)="onPressStart()"
|
|
42
|
-
(pointerup)="onPressEnd()"
|
|
43
|
-
(pointerleave)="onPressCancel()"
|
|
44
|
-
(pointercancel)="onPressCancel()"
|
|
45
|
-
(keydown)="onKeyDown($event)"
|
|
46
|
-
(keyup)="onKeyUp()"
|
|
47
|
-
(blur)="onPressEnd()"
|
|
48
|
-
>
|
|
49
|
-
@if (hasInputContent()) {
|
|
50
|
-
@if (iconPosition() === 'leading' && icon()) {
|
|
51
|
-
<mat-icon [svgIcon]="icon()">{{ icon() }}</mat-icon>
|
|
52
|
-
}
|
|
53
|
-
@if (label()) {
|
|
54
|
-
<span [class]="labelClass()">{{ label() }}</span>
|
|
55
|
-
}
|
|
56
|
-
@if (iconPosition() === 'trailing' && icon()) {
|
|
57
|
-
<mat-icon [svgIcon]="icon()">{{ icon() }}</mat-icon>
|
|
58
|
-
}
|
|
59
|
-
} @else {
|
|
60
|
-
<ng-content></ng-content>
|
|
61
|
-
}
|
|
62
|
-
</button>
|
|
63
|
-
}
|
|
64
|
-
@case ('tonal') {
|
|
65
|
-
<button
|
|
66
|
-
matButton
|
|
67
|
-
appearance="tonal"
|
|
68
|
-
class="lib-mat-btn lib-mat-btn--variant-tonal"
|
|
69
|
-
[attr.type]="type()"
|
|
70
|
-
[disabled]="disabled()"
|
|
71
|
-
[ngClass]="classes()"
|
|
72
|
-
[attr.aria-pressed]="toggle() ? selected() : null"
|
|
73
|
-
(pointerdown)="onPressStart()"
|
|
74
|
-
(pointerup)="onPressEnd()"
|
|
75
|
-
(pointerleave)="onPressCancel()"
|
|
76
|
-
(pointercancel)="onPressCancel()"
|
|
77
|
-
(keydown)="onKeyDown($event)"
|
|
78
|
-
(keyup)="onKeyUp()"
|
|
79
|
-
(blur)="onPressEnd()"
|
|
80
|
-
>
|
|
81
|
-
@if (hasInputContent()) {
|
|
82
|
-
@if (iconPosition() === 'leading' && icon()) {
|
|
83
|
-
<mat-icon [svgIcon]="icon()">{{ icon() }}</mat-icon>
|
|
84
|
-
}
|
|
85
|
-
@if (label()) {
|
|
86
|
-
<span [class]="labelClass()">{{ label() }}</span>
|
|
87
|
-
}
|
|
88
|
-
@if (iconPosition() === 'trailing' && icon()) {
|
|
89
|
-
<mat-icon [svgIcon]="icon()">{{ icon() }}</mat-icon>
|
|
90
|
-
}
|
|
91
|
-
} @else {
|
|
92
|
-
<ng-content></ng-content>
|
|
93
|
-
}
|
|
94
|
-
</button>
|
|
95
|
-
}
|
|
96
|
-
@case ('text') {
|
|
97
|
-
<button
|
|
98
|
-
mat-button
|
|
99
|
-
class="lib-mat-btn"
|
|
100
|
-
[attr.type]="type()"
|
|
101
|
-
[disabled]="disabled()"
|
|
102
|
-
[ngClass]="classes()"
|
|
103
|
-
(pointerdown)="onPressStart()"
|
|
104
|
-
(pointerup)="onPressEnd()"
|
|
105
|
-
(pointerleave)="onPressCancel()"
|
|
106
|
-
(pointercancel)="onPressCancel()"
|
|
107
|
-
(keydown)="onKeyDown($event)"
|
|
108
|
-
(keyup)="onKeyUp()"
|
|
109
|
-
(blur)="onPressEnd()"
|
|
110
|
-
>
|
|
111
|
-
@if (hasInputContent()) {
|
|
112
|
-
@if (iconPosition() === 'leading' && icon()) {
|
|
113
|
-
<mat-icon [svgIcon]="icon()">{{ icon() }}</mat-icon>
|
|
114
|
-
}
|
|
115
|
-
@if (label()) {
|
|
116
|
-
<span [class]="labelClass()">{{ label() }}</span>
|
|
117
|
-
}
|
|
118
|
-
@if (iconPosition() === 'trailing' && icon()) {
|
|
119
|
-
<mat-icon [svgIcon]="icon()">{{ icon() }}</mat-icon>
|
|
120
|
-
}
|
|
121
|
-
} @else {
|
|
122
|
-
<ng-content></ng-content>
|
|
123
|
-
}
|
|
124
|
-
</button>
|
|
125
|
-
}
|
|
126
|
-
@case ('elevated') {
|
|
127
|
-
<button
|
|
128
|
-
mat-raised-button
|
|
129
|
-
class="lib-mat-btn"
|
|
130
|
-
[attr.type]="type()"
|
|
131
|
-
[disabled]="disabled()"
|
|
132
|
-
[ngClass]="classes()"
|
|
133
|
-
[attr.aria-pressed]="toggle() ? selected() : null"
|
|
134
|
-
(pointerdown)="onPressStart()"
|
|
135
|
-
(pointerup)="onPressEnd()"
|
|
136
|
-
(pointerleave)="onPressCancel()"
|
|
137
|
-
(pointercancel)="onPressCancel()"
|
|
138
|
-
(keydown)="onKeyDown($event)"
|
|
139
|
-
(keyup)="onKeyUp()"
|
|
140
|
-
(blur)="onPressEnd()"
|
|
141
|
-
>
|
|
142
|
-
@if (hasInputContent()) {
|
|
143
|
-
@if (iconPosition() === 'leading' && icon()) {
|
|
144
|
-
<mat-icon [svgIcon]="icon()">{{ icon() }}</mat-icon>
|
|
145
|
-
}
|
|
146
|
-
@if (label()) {
|
|
147
|
-
<span [class]="labelClass()">{{ label() }}</span>
|
|
148
|
-
}
|
|
149
|
-
@if (iconPosition() === 'trailing' && icon()) {
|
|
150
|
-
<mat-icon [svgIcon]="icon()">{{ icon() }}</mat-icon>
|
|
151
|
-
}
|
|
152
|
-
} @else {
|
|
153
|
-
<ng-content></ng-content>
|
|
154
|
-
}
|
|
155
|
-
</button>
|
|
156
|
-
}
|
|
157
|
-
@default {
|
|
158
|
-
<button
|
|
159
|
-
mat-flat-button
|
|
160
|
-
class="lib-mat-btn"
|
|
161
|
-
[attr.type]="type()"
|
|
162
|
-
[disabled]="disabled()"
|
|
163
|
-
[ngClass]="classes()"
|
|
164
|
-
(pointerdown)="onPressStart()"
|
|
165
|
-
(pointerup)="onPressEnd()"
|
|
166
|
-
(pointerleave)="onPressCancel()"
|
|
167
|
-
(pointercancel)="onPressCancel()"
|
|
168
|
-
(keydown)="onKeyDown($event)"
|
|
169
|
-
(keyup)="onKeyUp()"
|
|
170
|
-
(blur)="onPressEnd()"
|
|
171
|
-
>
|
|
172
|
-
@if (hasInputContent()) {
|
|
173
|
-
@if (iconPosition() === 'leading' && icon()) {
|
|
174
|
-
<mat-icon [svgIcon]="icon()">{{ icon() }}</mat-icon>
|
|
175
|
-
}
|
|
176
|
-
@if (label()) {
|
|
177
|
-
<span [class]="labelClass()">{{ label() }}</span>
|
|
178
|
-
}
|
|
179
|
-
@if (iconPosition() === 'trailing' && icon()) {
|
|
180
|
-
<mat-icon [svgIcon]="icon()">{{ icon() }}</mat-icon>
|
|
181
|
-
}
|
|
182
|
-
} @else {
|
|
183
|
-
<ng-content></ng-content>
|
|
184
|
-
}
|
|
185
|
-
</button>
|
|
186
|
-
}
|
|
187
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChangeDetectionStrategy,
|
|
3
|
-
Component,
|
|
4
|
-
computed,
|
|
5
|
-
input,
|
|
6
|
-
signal,
|
|
7
|
-
} from '@angular/core';
|
|
8
|
-
import { NgClass } from '@angular/common';
|
|
9
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
10
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
11
|
-
|
|
12
|
-
export type LibButtonSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
|
13
|
-
|
|
14
|
-
export type LibButtonVariant = 'filled' | 'outlined' | 'tonal' | 'text' | 'elevated';
|
|
15
|
-
|
|
16
|
-
export type LibButtonShape = 'round' | 'square';
|
|
17
|
-
|
|
18
|
-
export type LibButtonIconPosition = 'leading' | 'trailing';
|
|
19
|
-
|
|
20
|
-
export type LibButtonContentAlign = 'start' | 'center' | 'end';
|
|
21
|
-
|
|
22
|
-
@Component({
|
|
23
|
-
selector: 'lib-button',
|
|
24
|
-
standalone: true,
|
|
25
|
-
imports: [MatButtonModule, MatIconModule, NgClass],
|
|
26
|
-
templateUrl: './button.html',
|
|
27
|
-
styleUrl: './button.css',
|
|
28
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
29
|
-
host: {
|
|
30
|
-
'[class.lib-mat-btn-host--full]': 'fullWidth()',
|
|
31
|
-
},
|
|
32
|
-
})
|
|
33
|
-
export class LibButtonComponent {
|
|
34
|
-
size = input<LibButtonSize>('medium');
|
|
35
|
-
disabled = input(false);
|
|
36
|
-
type = input<'button' | 'submit' | 'reset'>('button');
|
|
37
|
-
fullWidth = input(false);
|
|
38
|
-
variant = input<LibButtonVariant>('filled');
|
|
39
|
-
shape = input<LibButtonShape>('round');
|
|
40
|
-
toggle = input(false);
|
|
41
|
-
selected = input(false);
|
|
42
|
-
label = input<string>('');
|
|
43
|
-
icon = input<string>('');
|
|
44
|
-
iconPosition = input<LibButtonIconPosition>('leading');
|
|
45
|
-
contentAlign = input<LibButtonContentAlign>('center');
|
|
46
|
-
labelClass = input<string>('');
|
|
47
|
-
pressed = input<boolean>(false);
|
|
48
|
-
debugPadding = input<boolean>(false);
|
|
49
|
-
readonly isPressed = signal(false);
|
|
50
|
-
|
|
51
|
-
/** Si hay label o icon por input, se usa contenido interno; si no, ng-content. */
|
|
52
|
-
readonly hasInputContent = computed(
|
|
53
|
-
() => this.label().length > 0 || this.icon().length > 0
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
/** contentAlign ya es 'start' | 'center' | 'end'; se usa directo para las clases CSS. */
|
|
57
|
-
private readonly contentAlignNormalized = computed(() => this.contentAlign());
|
|
58
|
-
|
|
59
|
-
readonly classes = computed(() => ({
|
|
60
|
-
'lib-mat-btn': true,
|
|
61
|
-
'lib-mat-btn--xsmall': this.size() === 'xsmall',
|
|
62
|
-
'lib-mat-btn--small': this.size() === 'small',
|
|
63
|
-
'lib-mat-btn--medium': this.size() === 'medium',
|
|
64
|
-
'lib-mat-btn--large': this.size() === 'large',
|
|
65
|
-
'lib-mat-btn--xlarge': this.size() === 'xlarge',
|
|
66
|
-
'lib-mat-btn--full': this.fullWidth(),
|
|
67
|
-
'lib-mat-btn--variant-filled': this.variant() === 'filled',
|
|
68
|
-
'lib-mat-btn--variant-outlined': this.variant() === 'outlined',
|
|
69
|
-
'lib-mat-btn--variant-tonal': this.variant() === 'tonal',
|
|
70
|
-
'lib-mat-btn--variant-text': this.variant() === 'text',
|
|
71
|
-
'lib-mat-btn--variant-elevated': this.variant() === 'elevated',
|
|
72
|
-
'lib-mat-btn--shape-round': this.shape() === 'round',
|
|
73
|
-
'lib-mat-btn--shape-square': this.shape() === 'square',
|
|
74
|
-
'lib-mat-btn--toggle': this.toggle(),
|
|
75
|
-
'lib-mat-btn--selected': this.toggle() && this.selected(),
|
|
76
|
-
'lib-mat-btn--pressed': this.isPressed() || this.pressed(),
|
|
77
|
-
'lib-mat-btn--debug-padding': this.debugPadding(),
|
|
78
|
-
'lib-mat-btn--align-start': this.contentAlignNormalized() === 'start',
|
|
79
|
-
'lib-mat-btn--align-center': this.contentAlignNormalized() === 'center',
|
|
80
|
-
'lib-mat-btn--align-end': this.contentAlignNormalized() === 'end',
|
|
81
|
-
}));
|
|
82
|
-
|
|
83
|
-
onPressStart(): void {
|
|
84
|
-
if (!this.disabled()) this.isPressed.set(true);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
onPressEnd(): void {
|
|
88
|
-
this.isPressed.set(false);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
onPressCancel(): void {
|
|
92
|
-
this.isPressed.set(false);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
onKeyDown(event: KeyboardEvent): void {
|
|
96
|
-
if (this.disabled()) return;
|
|
97
|
-
if (event.code === 'Space' || event.code === 'Enter') this.isPressed.set(true);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
onKeyUp(): void {
|
|
101
|
-
this.isPressed.set(false);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
@@ -1,285 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
:host(.lib-card-host--full-width) {
|
|
6
|
-
width: 100%;
|
|
7
|
-
min-width: 0;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.ui-card {
|
|
11
|
-
display: flex;
|
|
12
|
-
align-items: stretch;
|
|
13
|
-
overflow: hidden;
|
|
14
|
-
border-radius: calc(var(--app-cards-outlined-enabled-container-outlined-card-container-shape, 12) * 1px);
|
|
15
|
-
color: var(--app-pallete-scheme-surface-on-surface, #181c1e);
|
|
16
|
-
box-sizing: border-box;
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
transition: box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
|
|
19
|
-
position: relative;
|
|
20
|
-
isolation: isolate;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.ui-card:focus-visible {
|
|
24
|
-
outline: none;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.ui-card:focus-visible .ui-card__focus-indicator {
|
|
28
|
-
display: block;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.ui-card--outlined {
|
|
32
|
-
border: 0;
|
|
33
|
-
outline: calc(var(--app-cards-outlined-enabled-outline-outlined-card-outline-width, 1) * 1px) solid
|
|
34
|
-
var(--app-cards-outlined-enabled-outline-outlined-card-outline-color, #c3c7c9);
|
|
35
|
-
outline-offset: -1px;
|
|
36
|
-
background: var(--app-cards-outlined-enabled-container-outlined-card-container-color, #f7fafc);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.ui-card--elevated {
|
|
40
|
-
border: 0;
|
|
41
|
-
background: var(--app-cards-elevated-enabled-container-elevated-card-container-color, #f1f4f6);
|
|
42
|
-
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.ui-card--filled {
|
|
46
|
-
border: 0;
|
|
47
|
-
background: var(--app-cards-filled-enabled-container-filled-card-container-color, #e0e3e5);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.ui-card--active {
|
|
51
|
-
outline-color: var(--app-pallete-scheme-surface-outline-variant, #d4d7db);
|
|
52
|
-
background: var(--app-pallete-scheme-surface-outline-variant, #d4d7db);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.ui-card--disabled {
|
|
56
|
-
opacity: 0.7;
|
|
57
|
-
cursor: not-allowed;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.ui-card__content {
|
|
61
|
-
flex: 1 1 auto;
|
|
62
|
-
min-width: 0;
|
|
63
|
-
display: flex;
|
|
64
|
-
align-items: center;
|
|
65
|
-
gap: 16px;
|
|
66
|
-
padding: 16px;
|
|
67
|
-
position: relative;
|
|
68
|
-
z-index: 2;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.ui-card__avatar {
|
|
72
|
-
width: 2.5rem;
|
|
73
|
-
height: 2.5rem;
|
|
74
|
-
flex: 0 0 auto;
|
|
75
|
-
border-radius: 100px;
|
|
76
|
-
display: inline-flex;
|
|
77
|
-
align-items: center;
|
|
78
|
-
justify-content: center;
|
|
79
|
-
background: var(--app-pallete-scheme-primary-primary, #e42313);
|
|
80
|
-
color: var(--app-pallete-scheme-primary-on-primary, #fff);
|
|
81
|
-
font-family: var(--app-typescale-title-medium-font, Heebo), sans-serif;
|
|
82
|
-
font-size: 1rem;
|
|
83
|
-
font-weight: 500;
|
|
84
|
-
line-height: 1.5rem;
|
|
85
|
-
letter-spacing: 0.00625rem;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.ui-card__leading {
|
|
89
|
-
width: 2.5rem;
|
|
90
|
-
height: 2.5rem;
|
|
91
|
-
flex: 0 0 auto;
|
|
92
|
-
display: inline-flex;
|
|
93
|
-
align-items: center;
|
|
94
|
-
justify-content: center;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.ui-card__leading--icon img,
|
|
98
|
-
.ui-card__leading--icon svg {
|
|
99
|
-
width: 2.08331rem;
|
|
100
|
-
height: 2.08331rem;
|
|
101
|
-
display: block;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.ui-card__leading--icon svg {
|
|
105
|
-
fill: currentColor;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.ui-card__text {
|
|
109
|
-
display: flex;
|
|
110
|
-
flex-direction: column;
|
|
111
|
-
gap: 4px;
|
|
112
|
-
min-width: 0;
|
|
113
|
-
color: inherit;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.ui-card__title,
|
|
117
|
-
.ui-card__subhead {
|
|
118
|
-
margin: 0;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.ui-card__title {
|
|
122
|
-
font-family: var(--app-typescale-title-medium-font, Heebo), sans-serif;
|
|
123
|
-
font-size: calc(var(--app-typescale-title-medium-size, 16) * 1px);
|
|
124
|
-
font-weight: var(--app-typescale-title-medium-weight, 500);
|
|
125
|
-
line-height: calc(var(--app-typescale-title-medium-line-height, 24) * 1px);
|
|
126
|
-
letter-spacing: calc(var(--app-typescale-title-medium-tracking, 0.15) * 1px);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.ui-card--title-emphasized .ui-card__title {
|
|
130
|
-
font-weight: var(--app-typescale-title-medium-weight-emphasized, 700);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.ui-card__subhead {
|
|
134
|
-
font-family: var(--app-typescale-body-medium-font, Heebo), sans-serif;
|
|
135
|
-
font-size: calc(var(--app-typescale-body-medium-size, 14) * 1px);
|
|
136
|
-
font-weight: var(--app-typescale-body-medium-weight, 400);
|
|
137
|
-
line-height: calc(var(--app-typescale-body-medium-line-height, 20) * 1px);
|
|
138
|
-
letter-spacing: calc(var(--app-typescale-body-medium-tracking, 0.25) * 1px);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.ui-card__media {
|
|
142
|
-
width: 5rem;
|
|
143
|
-
flex: 0 0 5rem;
|
|
144
|
-
display: inline-flex;
|
|
145
|
-
align-items: center;
|
|
146
|
-
justify-content: center;
|
|
147
|
-
border-left: 1px solid var(--app-pallete-scheme-surface-outline-variant, #c3c7c9);
|
|
148
|
-
background: var(--app-schemes-surface-container-high, #ebe7e7);
|
|
149
|
-
position: relative;
|
|
150
|
-
z-index: 2;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.ui-card__media img,
|
|
154
|
-
.ui-card__media svg {
|
|
155
|
-
width: 2.08331rem;
|
|
156
|
-
height: 2.08331rem;
|
|
157
|
-
display: block;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.ui-card__media svg {
|
|
161
|
-
fill: var(--app-schemes-outline, #b5b5b5);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.ui-card__media--empty {
|
|
165
|
-
opacity: 0.45;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.ui-card__state-layer {
|
|
169
|
-
position: absolute;
|
|
170
|
-
inset: 0;
|
|
171
|
-
pointer-events: none;
|
|
172
|
-
z-index: 1;
|
|
173
|
-
opacity: 0;
|
|
174
|
-
background: transparent;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.ui-card__focus-indicator {
|
|
178
|
-
display: none;
|
|
179
|
-
position: absolute;
|
|
180
|
-
inset: -3px;
|
|
181
|
-
border-radius: 14px;
|
|
182
|
-
border: 3px solid var(--app-cards-outlined-focused-focus-indicator-outlined-card-focus-indicator-color, #5b5f61);
|
|
183
|
-
pointer-events: none;
|
|
184
|
-
z-index: 3;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.ui-card--state-focused .ui-card__focus-indicator {
|
|
188
|
-
display: block;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.ui-card--state-hovered .ui-card__state-layer,
|
|
192
|
-
.ui-card:hover .ui-card__state-layer {
|
|
193
|
-
opacity: 1;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.ui-card--state-focused .ui-card__state-layer,
|
|
197
|
-
.ui-card--state-pressed .ui-card__state-layer,
|
|
198
|
-
.ui-card--state-dragged .ui-card__state-layer {
|
|
199
|
-
opacity: 1;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.ui-card--outlined.ui-card--state-hovered,
|
|
203
|
-
.ui-card--outlined:hover {
|
|
204
|
-
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.ui-card--outlined.ui-card--state-dragged {
|
|
208
|
-
box-shadow: 0 4px 8px 3px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.3);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.ui-card--elevated.ui-card--state-hovered,
|
|
212
|
-
.ui-card--elevated:hover {
|
|
213
|
-
box-shadow: 0 2px 6px 2px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.ui-card--elevated.ui-card--state-pressed {
|
|
217
|
-
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.ui-card--elevated.ui-card--state-dragged {
|
|
221
|
-
box-shadow: 0 6px 10px 4px rgba(0, 0, 0, 0.15), 0 2px 3px rgba(0, 0, 0, 0.3);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.ui-card--filled.ui-card--state-hovered {
|
|
225
|
-
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
.ui-card--filled.ui-card--state-dragged {
|
|
229
|
-
box-shadow: 0 4px 8px 3px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.3);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.ui-card--outlined.ui-card--state-hovered .ui-card__state-layer,
|
|
233
|
-
.ui-card--outlined:hover .ui-card__state-layer {
|
|
234
|
-
background: rgba(24, 28, 30, 0.08);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.ui-card--outlined.ui-card--state-focused .ui-card__state-layer {
|
|
238
|
-
background: rgba(24, 28, 30, 0.1);
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.ui-card--outlined.ui-card--state-pressed .ui-card__state-layer {
|
|
242
|
-
background: rgba(24, 28, 30, 0.1);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.ui-card--outlined.ui-card--state-dragged .ui-card__state-layer {
|
|
246
|
-
background: rgba(24, 28, 30, 0.16);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.ui-card--elevated.ui-card--state-hovered .ui-card__state-layer,
|
|
250
|
-
.ui-card--elevated:hover .ui-card__state-layer {
|
|
251
|
-
background: rgba(24, 28, 30, 0.08);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.ui-card--elevated.ui-card--state-focused .ui-card__state-layer {
|
|
255
|
-
background: rgba(24, 28, 30, 0.1);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.ui-card--elevated.ui-card--state-pressed .ui-card__state-layer {
|
|
259
|
-
background: rgba(24, 28, 30, 0.1);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.ui-card--elevated.ui-card--state-dragged .ui-card__state-layer {
|
|
263
|
-
background: rgba(24, 28, 30, 0.16);
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.ui-card--filled.ui-card--state-hovered .ui-card__state-layer,
|
|
267
|
-
.ui-card--filled:hover .ui-card__state-layer {
|
|
268
|
-
background: rgba(24, 28, 30, 0.08);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
.ui-card--filled.ui-card--state-focused .ui-card__state-layer {
|
|
272
|
-
background: rgba(24, 28, 30, 0.1);
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
.ui-card--filled.ui-card--state-pressed .ui-card__state-layer {
|
|
276
|
-
background: rgba(24, 28, 30, 0.1);
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
.ui-card--filled.ui-card--state-dragged .ui-card__state-layer {
|
|
280
|
-
background: rgba(24, 28, 30, 0.16);
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
.ui-card--disabled .ui-card__state-layer {
|
|
284
|
-
display: none;
|
|
285
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<div
|
|
2
|
-
[ngClass]="classes()"
|
|
3
|
-
[style.width]="fullWidth() ? '100%' : width()"
|
|
4
|
-
[style.min-width]="fullWidth() ? '0rem' : width()"
|
|
5
|
-
[style.height]="height()"
|
|
6
|
-
[style.min-height]="height()"
|
|
7
|
-
[attr.aria-disabled]="disabled()"
|
|
8
|
-
role="button"
|
|
9
|
-
tabindex="0"
|
|
10
|
-
(click)="onCardClick()"
|
|
11
|
-
(keydown)="onCardKeydown($event)"
|
|
12
|
-
>
|
|
13
|
-
<div class="ui-card__content">
|
|
14
|
-
@if (leadingKind() === 'icon') {
|
|
15
|
-
<div
|
|
16
|
-
class="ui-card__leading ui-card__leading--icon"
|
|
17
|
-
aria-hidden="true"
|
|
18
|
-
[style.width]="leadingContainerSize()"
|
|
19
|
-
[style.height]="leadingContainerSize()"
|
|
20
|
-
>
|
|
21
|
-
@if (hasLeadingIcon()) {
|
|
22
|
-
@if (isLeadingImage()) {
|
|
23
|
-
<img [src]="leadingIcon()" alt="" [style.width]="leadingIconSize()" [style.height]="leadingIconSize()" />
|
|
24
|
-
} @else {
|
|
25
|
-
<svg
|
|
26
|
-
viewBox="0 0 24 24"
|
|
27
|
-
[style.width]="leadingIconSize()"
|
|
28
|
-
[style.height]="leadingIconSize()"
|
|
29
|
-
>
|
|
30
|
-
<g [innerHTML]="leadingIcon()"></g>
|
|
31
|
-
</svg>
|
|
32
|
-
}
|
|
33
|
-
} @else {
|
|
34
|
-
<span>{{ initial() }}</span>
|
|
35
|
-
}
|
|
36
|
-
</div>
|
|
37
|
-
} @else {
|
|
38
|
-
<div class="ui-card__avatar" aria-hidden="true">
|
|
39
|
-
{{ initial() }}
|
|
40
|
-
</div>
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
<div class="ui-card__text">
|
|
44
|
-
<p class="ui-card__title">{{ title() }}</p>
|
|
45
|
-
@if (subhead()) {
|
|
46
|
-
<p class="ui-card__subhead">{{ subhead() }}</p>
|
|
47
|
-
}
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
|
|
51
|
-
@if (showMedia()) {
|
|
52
|
-
<div class="ui-card__media" [class.ui-card__media--empty]="!hasMedia()">
|
|
53
|
-
@if (hasMedia()) {
|
|
54
|
-
@if (isMediaImage()) {
|
|
55
|
-
<img [src]="mediaIcon()" [alt]="mediaAlt()" />
|
|
56
|
-
} @else {
|
|
57
|
-
<svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true">
|
|
58
|
-
<g [innerHTML]="mediaIcon()"></g>
|
|
59
|
-
</svg>
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
</div>
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
<span class="ui-card__state-layer" aria-hidden="true"></span>
|
|
66
|
-
@if (state() === 'focused') {
|
|
67
|
-
<span class="ui-card__focus-indicator" aria-hidden="true"></span>
|
|
68
|
-
}
|
|
69
|
-
</div>
|