crdx-components 1.0.0 → 1.0.1
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 +1624 -0
- package/fesm2022/crdx-components.mjs.map +1 -0
- package/package.json +19 -14
- package/types/crdx-components.d.ts +749 -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
|
@@ -0,0 +1,1624 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, inject, TemplateRef, Input, Directive, input, EventEmitter, DestroyRef, effect, ViewChild, ContentChildren, Output, signal, ChangeDetectionStrategy, computed, output, HostBinding, ChangeDetectorRef, Injector, forwardRef, contentChild, Injectable } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule, NgTemplateOutlet, NgClass, NgComponentOutlet } from '@angular/common';
|
|
5
|
+
import * as i2 from '@angular/material/table';
|
|
6
|
+
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
|
7
|
+
import * as i3 from '@angular/material/paginator';
|
|
8
|
+
import { MatPaginatorModule, MatPaginator } from '@angular/material/paginator';
|
|
9
|
+
import * as i4 from '@angular/material/progress-spinner';
|
|
10
|
+
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
11
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
12
|
+
import { ActivatedRoute, Router, NavigationStart } from '@angular/router';
|
|
13
|
+
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
14
|
+
import * as i3$1 from '@angular/forms';
|
|
15
|
+
import { ReactiveFormsModule, NgControl, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
16
|
+
import * as i1$1 from '@angular/material/form-field';
|
|
17
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
18
|
+
import * as i2$1 from '@angular/material/input';
|
|
19
|
+
import { MatInputModule } from '@angular/material/input';
|
|
20
|
+
import * as i4$1 from '@angular/material/icon';
|
|
21
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
22
|
+
import * as i2$2 from '@angular/material/select';
|
|
23
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
24
|
+
import * as i1$2 from '@angular/material/checkbox';
|
|
25
|
+
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
26
|
+
import * as i3$2 from '@angular/cdk/scrolling';
|
|
27
|
+
import { ScrollingModule } from '@angular/cdk/scrolling';
|
|
28
|
+
import * as i1$3 from '@angular/material/list';
|
|
29
|
+
import { MatListModule } from '@angular/material/list';
|
|
30
|
+
import * as i1$4 from '@angular/material/menu';
|
|
31
|
+
import { MatMenuModule } from '@angular/material/menu';
|
|
32
|
+
import * as i2$3 from '@angular/material/button';
|
|
33
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
34
|
+
import * as i1$5 from '@angular/material/core';
|
|
35
|
+
import { MatRippleModule } from '@angular/material/core';
|
|
36
|
+
import * as i1$6 from '@angular/material/slide-toggle';
|
|
37
|
+
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
38
|
+
import { DialogRef, DIALOG_DATA, Dialog } from '@angular/cdk/dialog';
|
|
39
|
+
import { Overlay } from '@angular/cdk/overlay';
|
|
40
|
+
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
41
|
+
import { TranslatePipe } from '@ngx-translate/core';
|
|
42
|
+
|
|
43
|
+
class LibUi {
|
|
44
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibUi, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
45
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: LibUi, isStandalone: true, selector: "lib-lib-ui", ngImport: i0, template: "<p>LibUi works!</p>\n", styles: [""] });
|
|
46
|
+
}
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibUi, decorators: [{
|
|
48
|
+
type: Component,
|
|
49
|
+
args: [{ selector: 'lib-lib-ui', imports: [], template: "<p>LibUi works!</p>\n" }]
|
|
50
|
+
}] });
|
|
51
|
+
|
|
52
|
+
const DEFAULT_ICON_BASE_PATH = 'assets/icons';
|
|
53
|
+
const ICON_MENU_FILE = 'icon-menu.svg';
|
|
54
|
+
const LOGO_FILE = 'logo.svg';
|
|
55
|
+
const SMILEY_FILE = 'smiley.svg';
|
|
56
|
+
const ICON_FILE_MAP = Object.freeze({
|
|
57
|
+
CollapseMenu: ICON_MENU_FILE,
|
|
58
|
+
'collapse-menu': ICON_MENU_FILE,
|
|
59
|
+
'icon-menu': ICON_MENU_FILE,
|
|
60
|
+
logo: LOGO_FILE,
|
|
61
|
+
'credix-logo': LOGO_FILE,
|
|
62
|
+
smiley: SMILEY_FILE,
|
|
63
|
+
'error-circle': 'error-circle.svg',
|
|
64
|
+
'info-error': 'info-error.svg',
|
|
65
|
+
'configuration-countable': 'configuration-countable.svg',
|
|
66
|
+
edit: 'edit.svg',
|
|
67
|
+
'edit-table': 'edit-table.svg',
|
|
68
|
+
hub: 'hub.svg',
|
|
69
|
+
logout: 'logout.svg',
|
|
70
|
+
notifications: 'notifications.svg',
|
|
71
|
+
profile: 'profile.svg',
|
|
72
|
+
'profile-user-menu': 'profile-user-menu.svg',
|
|
73
|
+
visibility: 'visibility-eye.svg',
|
|
74
|
+
check: 'success-check_icon.svg',
|
|
75
|
+
'gif-icon-massive': 'gif-icon.svg',
|
|
76
|
+
'background-color-massive': 'background-color-massive.svg',
|
|
77
|
+
'content-edit-massive': 'trailing-icon.svg',
|
|
78
|
+
'edit-massive': 'edit-massive.svg',
|
|
79
|
+
'edit-massive-white': 'edit-white.svg',
|
|
80
|
+
'edit-gray': 'edit-gray.svg',
|
|
81
|
+
'check-update': 'check-update.svg',
|
|
82
|
+
'download-simple': 'download-simple.svg',
|
|
83
|
+
'download-file': 'download-file.svg',
|
|
84
|
+
'content-copy': 'content-copy.svg',
|
|
85
|
+
'add-create': 'add-create.svg',
|
|
86
|
+
'add-create-dark': 'add-create-dark.svg',
|
|
87
|
+
'add-create-dark-icon': 'add-create-dark-icon.svg',
|
|
88
|
+
'add-circle-filled': 'add_circle_filled.svg',
|
|
89
|
+
'add-circle-tonal': 'add_circle_tonal.svg',
|
|
90
|
+
'add-circle-outlined': 'add_circle_outline.svg',
|
|
91
|
+
'add-circle-elevated': 'add_circle_text.svg',
|
|
92
|
+
'add-circle-text': 'add_circle_text.svg',
|
|
93
|
+
});
|
|
94
|
+
function normalizeBasePath(basePath) {
|
|
95
|
+
const targetPath = basePath ?? DEFAULT_ICON_BASE_PATH;
|
|
96
|
+
if (/^(https?:)?\/\//.test(targetPath)) {
|
|
97
|
+
return targetPath.replace(/\/$/, '');
|
|
98
|
+
}
|
|
99
|
+
return targetPath.replace(/\/$/, '');
|
|
100
|
+
}
|
|
101
|
+
const UI_ICON_NAMES = Object.keys(ICON_FILE_MAP);
|
|
102
|
+
function resolveUiIconResource(iconName, options) {
|
|
103
|
+
const fileName = ICON_FILE_MAP[iconName];
|
|
104
|
+
if (!fileName) {
|
|
105
|
+
throw new Error(`Icon "${iconName}" is not registered in ICON_FILE_MAP.`);
|
|
106
|
+
}
|
|
107
|
+
return `${normalizeBasePath(options?.basePath)}/${fileName}`;
|
|
108
|
+
}
|
|
109
|
+
function registerUiIcons(registry, sanitizer, icons = UI_ICON_NAMES, options) {
|
|
110
|
+
const basePath = normalizeBasePath(options?.basePath);
|
|
111
|
+
icons.forEach((iconName) => {
|
|
112
|
+
const fileName = ICON_FILE_MAP[iconName];
|
|
113
|
+
if (!fileName) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
const resourceUrl = `${basePath}/${fileName}`;
|
|
117
|
+
registry.addSvgIcon(iconName, sanitizer.bypassSecurityTrustResourceUrl(resourceUrl));
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
class SharedTableCellTemplateDirective {
|
|
122
|
+
template = inject(TemplateRef);
|
|
123
|
+
legacyKey = '';
|
|
124
|
+
modernKey = '';
|
|
125
|
+
set cellTemplate(value) {
|
|
126
|
+
this.legacyKey = value ?? '';
|
|
127
|
+
}
|
|
128
|
+
set libCellTemplate(value) {
|
|
129
|
+
this.modernKey = value ?? '';
|
|
130
|
+
}
|
|
131
|
+
get key() {
|
|
132
|
+
return this.modernKey || this.legacyKey;
|
|
133
|
+
}
|
|
134
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: SharedTableCellTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
135
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.9", type: SharedTableCellTemplateDirective, isStandalone: true, selector: "ng-template[cellTemplate], ng-template[libCellTemplate]", inputs: { cellTemplate: "cellTemplate", libCellTemplate: "libCellTemplate" }, ngImport: i0 });
|
|
136
|
+
}
|
|
137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: SharedTableCellTemplateDirective, decorators: [{
|
|
138
|
+
type: Directive,
|
|
139
|
+
args: [{
|
|
140
|
+
selector: 'ng-template[cellTemplate], ng-template[libCellTemplate]',
|
|
141
|
+
standalone: true,
|
|
142
|
+
}]
|
|
143
|
+
}], propDecorators: { cellTemplate: [{
|
|
144
|
+
type: Input
|
|
145
|
+
}], libCellTemplate: [{
|
|
146
|
+
type: Input
|
|
147
|
+
}] } });
|
|
148
|
+
|
|
149
|
+
class SharedTableComponent {
|
|
150
|
+
columns = input.required(...(ngDevMode ? [{ debugName: "columns" }] : []));
|
|
151
|
+
data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
152
|
+
caption = input(...(ngDevMode ? [undefined, { debugName: "caption" }] : []));
|
|
153
|
+
emptyState = input('Sin registros disponibles', ...(ngDevMode ? [{ debugName: "emptyState" }] : []));
|
|
154
|
+
loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
155
|
+
showPaginator = input(true, ...(ngDevMode ? [{ debugName: "showPaginator" }] : []));
|
|
156
|
+
pageSize = input(10, ...(ngDevMode ? [{ debugName: "pageSize" }] : []));
|
|
157
|
+
pageSizeOptions = input([5, 10, 20], ...(ngDevMode ? [{ debugName: "pageSizeOptions" }] : []));
|
|
158
|
+
enableRowClick = input(false, ...(ngDevMode ? [{ debugName: "enableRowClick" }] : []));
|
|
159
|
+
totalElements = input(...(ngDevMode ? [undefined, { debugName: "totalElements" }] : []));
|
|
160
|
+
rowClick = new EventEmitter();
|
|
161
|
+
pageChange = new EventEmitter();
|
|
162
|
+
cellTemplatesQuery;
|
|
163
|
+
cellTemplates = {};
|
|
164
|
+
removeScrollSync = null;
|
|
165
|
+
_paginator;
|
|
166
|
+
destroyRef = inject(DestroyRef);
|
|
167
|
+
dataSource = new MatTableDataSource();
|
|
168
|
+
displayedColumns = [];
|
|
169
|
+
constructor() {
|
|
170
|
+
effect(() => {
|
|
171
|
+
const columns = this.columns();
|
|
172
|
+
this.displayedColumns = columns.map((column) => String(column.key));
|
|
173
|
+
});
|
|
174
|
+
effect(() => {
|
|
175
|
+
const rows = this.data();
|
|
176
|
+
this.dataSource.data = rows.slice();
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
set paginator(paginator) {
|
|
180
|
+
this._paginator = paginator;
|
|
181
|
+
// En modo server-side (totalElements definido) NO conectamos al dataSource
|
|
182
|
+
// para que Material no intente paginar los datos localmente
|
|
183
|
+
if (this.totalElements() === undefined) {
|
|
184
|
+
this.dataSource.paginator = paginator ?? null;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
headerWrapRef;
|
|
188
|
+
bodyWrapRef;
|
|
189
|
+
ngAfterViewInit() {
|
|
190
|
+
const header = this.headerWrapRef?.nativeElement;
|
|
191
|
+
const body = this.bodyWrapRef?.nativeElement;
|
|
192
|
+
if (header && body) {
|
|
193
|
+
const onScroll = () => { header.scrollLeft = body.scrollLeft; };
|
|
194
|
+
body.addEventListener('scroll', onScroll);
|
|
195
|
+
this.removeScrollSync = () => body.removeEventListener('scroll', onScroll);
|
|
196
|
+
}
|
|
197
|
+
// Modo server-side: escuchar eventos del paginator y emitirlos hacia arriba
|
|
198
|
+
if (this._paginator && this.totalElements() !== undefined) {
|
|
199
|
+
this._paginator.page.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((event) => {
|
|
200
|
+
this.pageChange.emit({ pageIndex: event.pageIndex, pageSize: event.pageSize });
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
ngAfterContentInit() {
|
|
205
|
+
const rebuildTemplateMap = () => {
|
|
206
|
+
const map = {};
|
|
207
|
+
this.cellTemplatesQuery.forEach((entry) => {
|
|
208
|
+
if (entry.key) {
|
|
209
|
+
map[entry.key] = entry.template;
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
this.cellTemplates = map;
|
|
213
|
+
};
|
|
214
|
+
rebuildTemplateMap();
|
|
215
|
+
this.cellTemplatesQuery.changes
|
|
216
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
217
|
+
.subscribe(() => rebuildTemplateMap());
|
|
218
|
+
}
|
|
219
|
+
ngOnDestroy() {
|
|
220
|
+
this.removeScrollSync?.();
|
|
221
|
+
this.removeScrollSync = null;
|
|
222
|
+
}
|
|
223
|
+
getCellValue(column, row, index) {
|
|
224
|
+
if (column.cell) {
|
|
225
|
+
return column.cell(row, index);
|
|
226
|
+
}
|
|
227
|
+
const key = column.key;
|
|
228
|
+
const fallbackKey = column.key;
|
|
229
|
+
return (row?.[key] ?? row?.[fallbackKey]) ?? '';
|
|
230
|
+
}
|
|
231
|
+
columnId(column) {
|
|
232
|
+
return String(column.key);
|
|
233
|
+
}
|
|
234
|
+
columnTrackBy = (_, column) => column.key;
|
|
235
|
+
resolveTextAlign(column) {
|
|
236
|
+
return column.align ?? 'start';
|
|
237
|
+
}
|
|
238
|
+
resolveWidth(column) {
|
|
239
|
+
return column.width ?? null;
|
|
240
|
+
}
|
|
241
|
+
shouldRenderPaginator() {
|
|
242
|
+
return this.showPaginator();
|
|
243
|
+
}
|
|
244
|
+
onRowClick(event, row) {
|
|
245
|
+
if (!this.enableRowClick())
|
|
246
|
+
return;
|
|
247
|
+
const el = event.target;
|
|
248
|
+
// Evita abrir el side modal si el click fue sobre un elemento interactivo (acciones dentro de la fila)
|
|
249
|
+
if (el?.closest('button, a, input, textarea, select, [role="button"], mat-icon, mat-slide-toggle, mat-checkbox')) {
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
this.rowClick.emit(row);
|
|
253
|
+
}
|
|
254
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: SharedTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
255
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: SharedTableComponent, isStandalone: true, selector: "lib-shared-table, shared-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, emptyState: { classPropertyName: "emptyState", publicName: "emptyState", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, showPaginator: { classPropertyName: "showPaginator", publicName: "showPaginator", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, enableRowClick: { classPropertyName: "enableRowClick", publicName: "enableRowClick", isSignal: true, isRequired: false, transformFunction: null }, totalElements: { classPropertyName: "totalElements", publicName: "totalElements", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rowClick: "rowClick", pageChange: "pageChange" }, queries: [{ propertyName: "cellTemplatesQuery", predicate: SharedTableCellTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "headerWrapRef", first: true, predicate: ["headerWrap"], descendants: true }, { propertyName: "bodyWrapRef", first: true, predicate: ["bodyWrap"], descendants: true }], ngImport: i0, template: "<figure class=\"shared-table\">\r\n <div\r\n class=\"shared-table__container mdc-data-table\"\r\n [class.shared-table__container--no-paginator]=\"!shouldRenderPaginator()\"\r\n >\r\n <!-- Header: scroll sincronizado con el cuerpo, sin barra visible -->\r\n <div class=\"shared-table__header-wrap\" #headerWrap>\r\n <table\r\n mat-table\r\n [dataSource]=\"dataSource\"\r\n class=\"shared-table__mat-table shared-table__mat-table--header\"\r\n >\r\n @for (column of columns(); track columnTrackBy($index, column)) {\r\n <ng-container [matColumnDef]=\"columnId(column)\">\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n [style.text-align]=\"resolveTextAlign(column)\"\r\n [style.width]=\"resolveWidth(column)\"\r\n >\r\n {{ column.header }}\r\n </th>\r\n </ng-container>\r\n }\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n </table>\r\n </div>\r\n <!-- Cuerpo: scroll horizontal aqu\u00ED (barra debajo del header) -->\r\n <div\r\n class=\"shared-table__body-wrap\"\r\n [class.shared-table__body-wrap--loading]=\"loading()\"\r\n #bodyWrap\r\n >\r\n <table\r\n mat-table\r\n [dataSource]=\"dataSource\"\r\n class=\"shared-table__mat-table shared-table__mat-table--body\"\r\n >\r\n @for (column of columns(); track columnTrackBy($index, column)) {\r\n <ng-container [matColumnDef]=\"columnId(column)\">\r\n <td\r\n mat-cell\r\n *matCellDef=\"let row; let i = index\"\r\n [style.text-align]=\"resolveTextAlign(column)\"\r\n [style.width]=\"resolveWidth(column)\"\r\n >\r\n @if (cellTemplates[column.key]) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"cellTemplates[column.key]\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: row,\r\n index: i,\r\n column: column,\r\n }\"\r\n ></ng-container>\r\n } @else {\r\n {{ getCellValue(column, row, i) }}\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\r\n <tr mat-no-data-row>\r\n <td\r\n class=\"shared-table__empty\"\r\n [attr.colspan]=\"displayedColumns.length || 1\"\r\n >\r\n\r\n <span>loading: {{ loading() }}</span>\r\n @if (!loading()) {\r\n {{ emptyState() }}\r\n }\r\n </td>\r\n </tr>\r\n </table>\r\n @if (loading()) {\r\n <div class=\"shared-table__loading-overlay\">\r\n <mat-spinner\r\n class=\"shared-table__loading-spinner\"\r\n [diameter]=\"48\"\r\n [strokeWidth]=\"4\"\r\n ></mat-spinner>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n @if (shouldRenderPaginator()) {\r\n <mat-paginator\r\n class=\"shared-table__paginator\"\r\n [length]=\"totalElements() ?? data().length\"\r\n [pageSize]=\"pageSize()\"\r\n [pageSizeOptions]=\"pageSizeOptions()\"\r\n ></mat-paginator>\r\n }\r\n</figure>\r\n", styles: [":host{display:flex;flex-direction:column;flex:1 1 0;min-height:0;width:100%}.shared-table{width:100%;display:flex;flex-direction:column;margin:0;flex:1 1 0;min-height:0}.shared-table .mat-mdc-paginator{flex-shrink:0}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select{width:fit-content!important;min-width:0;max-width:fit-content!important;flex:0 0 auto!important;--mat-paginator-page-size-select-width: 100%;--mat-paginator-page-size-select-touch-target-height: 100%}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-form-field{position:relative;width:fit-content!important;min-width:0;max-width:fit-content!important}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-form-field,:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-form-field-flex,:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-form-field-subscript-wrapper,:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-form-field-infix,:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-select-trigger,:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-select-value{border:none!important;border-bottom:none!important;box-shadow:none!important;padding-left:0!important;padding-right:0!important}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-text-field-wrapper,:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mdc-text-field,:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mdc-text-field--outlined{padding:0!important}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-form-field-flex{position:relative;width:fit-content!important;min-width:0;max-width:fit-content!important}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-form-field-infix{width:auto!important;min-width:0!important;flex:0 0 auto!important}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-paginator-touch-target{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:5rem!important;max-height:1.625rem!important;box-sizing:border-box!important}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-select-value{margin-right:0!important}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-select-trigger{display:flex!important;min-width:2.0625rem!important;width:max-content!important;height:1.625rem!important;flex-direction:row!important;align-items:center!important;flex-shrink:0;gap:0!important;border:none!important;border-bottom:.0625rem solid var(--pallete-scheme-surface-outline-variant, #C3C7C9)!important;box-shadow:none!important;align-self:stretch}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-select-arrow-wrapper{margin-left:0!important}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mdc-notched-outline,:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mdc-notched-outline__leading,:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mdc-notched-outline__notch,:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mdc-notched-outline__trailing,:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mdc-notched-outline .mat-mdc-notch-piece{border:none!important;border-width:0!important}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mdc-line-ripple{display:none!important}.shared-table__mat-table{width:max-content;min-width:100%;table-layout:auto}.shared-table__caption{margin-bottom:16px;font-weight:600;font-size:1.125rem}.shared-table__empty{text-align:center;padding:24px 16px;color:#6b7280}.shared-table__container{--border-color: #E9E9E9;--table-radius: .25rem;flex:1 1 0;flex-grow:1;width:100%;display:flex;flex-direction:column;min-height:0;overflow:hidden;border-radius:var(--table-radius) var(--table-radius) 0 0}.shared-table__container.shared-table__container--no-paginator{border-radius:var(--table-radius)!important;border-bottom:1px solid var(--pallete-scheme-surface-outline-variant, #C3C7C9)!important}.shared-table__container.shared-table__container--no-paginator .shared-table__body-wrap{border-radius:0 0 var(--table-radius) var(--table-radius)}.shared-table__header-wrap{flex-shrink:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;border-radius:var(--table-radius) var(--table-radius) 0 0}.shared-table__header-wrap::-webkit-scrollbar{display:none}.shared-table__body-wrap{flex:1 1 0;min-height:0;overflow:auto;position:relative}.shared-table__loading-overlay{position:absolute;inset:0;background:#ffffffeb;display:flex;align-items:center;justify-content:center;z-index:9999}::ng-deep .shared-table__loading-spinner,::ng-deep .shared-table__loading-spinner .mat-mdc-circular-progress,::ng-deep .shared-table__loading-spinner .mdc-circular-progress,::ng-deep .shared-table__loading-spinner circle{position:relative;z-index:10000;color:#d32f2f!important;stroke:#d32f2f!important;stroke-opacity:1!important;opacity:1!important}::ng-deep .shared-table__loading-spinner .mdc-circular-progress__indicator,::ng-deep .shared-table__loading-spinner .mdc-circular-progress__indeterminate-outer-circle,::ng-deep .shared-table__loading-spinner .mdc-circular-progress__indeterminate-inner-circle{stroke:#d32f2f!important;stroke-width:6!important}::ng-deep .shared-table__loading-spinner{--mdc-circular-progress-active-indicator-color: #d32f2f !important;--mdc-circular-progress-track-color: rgba(0, 0, 0, .1) !important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i2.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i2.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i2.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i2.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i3.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] });
|
|
256
|
+
}
|
|
257
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: SharedTableComponent, decorators: [{
|
|
258
|
+
type: Component,
|
|
259
|
+
args: [{ selector: 'lib-shared-table, shared-table', standalone: true, imports: [CommonModule, MatTableModule, MatPaginatorModule, MatProgressSpinnerModule], template: "<figure class=\"shared-table\">\r\n <div\r\n class=\"shared-table__container mdc-data-table\"\r\n [class.shared-table__container--no-paginator]=\"!shouldRenderPaginator()\"\r\n >\r\n <!-- Header: scroll sincronizado con el cuerpo, sin barra visible -->\r\n <div class=\"shared-table__header-wrap\" #headerWrap>\r\n <table\r\n mat-table\r\n [dataSource]=\"dataSource\"\r\n class=\"shared-table__mat-table shared-table__mat-table--header\"\r\n >\r\n @for (column of columns(); track columnTrackBy($index, column)) {\r\n <ng-container [matColumnDef]=\"columnId(column)\">\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n [style.text-align]=\"resolveTextAlign(column)\"\r\n [style.width]=\"resolveWidth(column)\"\r\n >\r\n {{ column.header }}\r\n </th>\r\n </ng-container>\r\n }\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n </table>\r\n </div>\r\n <!-- Cuerpo: scroll horizontal aqu\u00ED (barra debajo del header) -->\r\n <div\r\n class=\"shared-table__body-wrap\"\r\n [class.shared-table__body-wrap--loading]=\"loading()\"\r\n #bodyWrap\r\n >\r\n <table\r\n mat-table\r\n [dataSource]=\"dataSource\"\r\n class=\"shared-table__mat-table shared-table__mat-table--body\"\r\n >\r\n @for (column of columns(); track columnTrackBy($index, column)) {\r\n <ng-container [matColumnDef]=\"columnId(column)\">\r\n <td\r\n mat-cell\r\n *matCellDef=\"let row; let i = index\"\r\n [style.text-align]=\"resolveTextAlign(column)\"\r\n [style.width]=\"resolveWidth(column)\"\r\n >\r\n @if (cellTemplates[column.key]) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"cellTemplates[column.key]\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: row,\r\n index: i,\r\n column: column,\r\n }\"\r\n ></ng-container>\r\n } @else {\r\n {{ getCellValue(column, row, i) }}\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\r\n <tr mat-no-data-row>\r\n <td\r\n class=\"shared-table__empty\"\r\n [attr.colspan]=\"displayedColumns.length || 1\"\r\n >\r\n\r\n <span>loading: {{ loading() }}</span>\r\n @if (!loading()) {\r\n {{ emptyState() }}\r\n }\r\n </td>\r\n </tr>\r\n </table>\r\n @if (loading()) {\r\n <div class=\"shared-table__loading-overlay\">\r\n <mat-spinner\r\n class=\"shared-table__loading-spinner\"\r\n [diameter]=\"48\"\r\n [strokeWidth]=\"4\"\r\n ></mat-spinner>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n @if (shouldRenderPaginator()) {\r\n <mat-paginator\r\n class=\"shared-table__paginator\"\r\n [length]=\"totalElements() ?? data().length\"\r\n [pageSize]=\"pageSize()\"\r\n [pageSizeOptions]=\"pageSizeOptions()\"\r\n ></mat-paginator>\r\n }\r\n</figure>\r\n", styles: [":host{display:flex;flex-direction:column;flex:1 1 0;min-height:0;width:100%}.shared-table{width:100%;display:flex;flex-direction:column;margin:0;flex:1 1 0;min-height:0}.shared-table .mat-mdc-paginator{flex-shrink:0}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select{width:fit-content!important;min-width:0;max-width:fit-content!important;flex:0 0 auto!important;--mat-paginator-page-size-select-width: 100%;--mat-paginator-page-size-select-touch-target-height: 100%}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-form-field{position:relative;width:fit-content!important;min-width:0;max-width:fit-content!important}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-form-field,:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-form-field-flex,:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-form-field-subscript-wrapper,:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-form-field-infix,:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-select-trigger,:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-select-value{border:none!important;border-bottom:none!important;box-shadow:none!important;padding-left:0!important;padding-right:0!important}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-text-field-wrapper,:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mdc-text-field,:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mdc-text-field--outlined{padding:0!important}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-form-field-flex{position:relative;width:fit-content!important;min-width:0;max-width:fit-content!important}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-form-field-infix{width:auto!important;min-width:0!important;flex:0 0 auto!important}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-paginator-touch-target{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:5rem!important;max-height:1.625rem!important;box-sizing:border-box!important}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-select-value{margin-right:0!important}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-select-trigger{display:flex!important;min-width:2.0625rem!important;width:max-content!important;height:1.625rem!important;flex-direction:row!important;align-items:center!important;flex-shrink:0;gap:0!important;border:none!important;border-bottom:.0625rem solid var(--pallete-scheme-surface-outline-variant, #C3C7C9)!important;box-shadow:none!important;align-self:stretch}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mat-mdc-select-arrow-wrapper{margin-left:0!important}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mdc-notched-outline,:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mdc-notched-outline__leading,:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mdc-notched-outline__notch,:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mdc-notched-outline__trailing,:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mdc-notched-outline .mat-mdc-notch-piece{border:none!important;border-width:0!important}:host ::ng-deep .shared-table__paginator .mat-mdc-paginator-page-size-select .mdc-line-ripple{display:none!important}.shared-table__mat-table{width:max-content;min-width:100%;table-layout:auto}.shared-table__caption{margin-bottom:16px;font-weight:600;font-size:1.125rem}.shared-table__empty{text-align:center;padding:24px 16px;color:#6b7280}.shared-table__container{--border-color: #E9E9E9;--table-radius: .25rem;flex:1 1 0;flex-grow:1;width:100%;display:flex;flex-direction:column;min-height:0;overflow:hidden;border-radius:var(--table-radius) var(--table-radius) 0 0}.shared-table__container.shared-table__container--no-paginator{border-radius:var(--table-radius)!important;border-bottom:1px solid var(--pallete-scheme-surface-outline-variant, #C3C7C9)!important}.shared-table__container.shared-table__container--no-paginator .shared-table__body-wrap{border-radius:0 0 var(--table-radius) var(--table-radius)}.shared-table__header-wrap{flex-shrink:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;border-radius:var(--table-radius) var(--table-radius) 0 0}.shared-table__header-wrap::-webkit-scrollbar{display:none}.shared-table__body-wrap{flex:1 1 0;min-height:0;overflow:auto;position:relative}.shared-table__loading-overlay{position:absolute;inset:0;background:#ffffffeb;display:flex;align-items:center;justify-content:center;z-index:9999}::ng-deep .shared-table__loading-spinner,::ng-deep .shared-table__loading-spinner .mat-mdc-circular-progress,::ng-deep .shared-table__loading-spinner .mdc-circular-progress,::ng-deep .shared-table__loading-spinner circle{position:relative;z-index:10000;color:#d32f2f!important;stroke:#d32f2f!important;stroke-opacity:1!important;opacity:1!important}::ng-deep .shared-table__loading-spinner .mdc-circular-progress__indicator,::ng-deep .shared-table__loading-spinner .mdc-circular-progress__indeterminate-outer-circle,::ng-deep .shared-table__loading-spinner .mdc-circular-progress__indeterminate-inner-circle{stroke:#d32f2f!important;stroke-width:6!important}::ng-deep .shared-table__loading-spinner{--mdc-circular-progress-active-indicator-color: #d32f2f !important;--mdc-circular-progress-track-color: rgba(0, 0, 0, .1) !important}\n"] }]
|
|
260
|
+
}], ctorParameters: () => [], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], emptyState: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyState", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], showPaginator: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPaginator", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], enableRowClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableRowClick", required: false }] }], totalElements: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalElements", required: false }] }], rowClick: [{
|
|
261
|
+
type: Output
|
|
262
|
+
}], pageChange: [{
|
|
263
|
+
type: Output
|
|
264
|
+
}], cellTemplatesQuery: [{
|
|
265
|
+
type: ContentChildren,
|
|
266
|
+
args: [SharedTableCellTemplateDirective, { descendants: true }]
|
|
267
|
+
}], paginator: [{
|
|
268
|
+
type: ViewChild,
|
|
269
|
+
args: [MatPaginator]
|
|
270
|
+
}], headerWrapRef: [{
|
|
271
|
+
type: ViewChild,
|
|
272
|
+
args: ['headerWrap']
|
|
273
|
+
}], bodyWrapRef: [{
|
|
274
|
+
type: ViewChild,
|
|
275
|
+
args: ['bodyWrap']
|
|
276
|
+
}] } });
|
|
277
|
+
|
|
278
|
+
class SharedBreadcrumbComponent {
|
|
279
|
+
route = inject(ActivatedRoute, { optional: true });
|
|
280
|
+
router = inject(Router, { optional: true });
|
|
281
|
+
parentNavigate = new EventEmitter();
|
|
282
|
+
parentLabel = signal('', ...(ngDevMode ? [{ debugName: "parentLabel" }] : []));
|
|
283
|
+
parentUrl = signal('', ...(ngDevMode ? [{ debugName: "parentUrl" }] : []));
|
|
284
|
+
currentLabel = signal('', ...(ngDevMode ? [{ debugName: "currentLabel" }] : []));
|
|
285
|
+
ngOnInit() {
|
|
286
|
+
const currentRoute = this.route;
|
|
287
|
+
if (!currentRoute) {
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
const parentRoute = currentRoute.parent;
|
|
291
|
+
const parentData = parentRoute?.snapshot.data ?? {};
|
|
292
|
+
const currentData = currentRoute.snapshot.data ?? {};
|
|
293
|
+
const parentLabel = parentData['breadcrumb'] ?? currentData['parentBreadcrumb'] ?? '';
|
|
294
|
+
const parentUrl = parentData['url'] ?? currentData['parentUrl'] ?? '/';
|
|
295
|
+
const currentLabel = currentData['breadcrumb'] ?? '';
|
|
296
|
+
this.parentLabel.set(parentLabel);
|
|
297
|
+
this.parentUrl.set(parentUrl);
|
|
298
|
+
this.currentLabel.set(currentLabel);
|
|
299
|
+
}
|
|
300
|
+
navigateToParent() {
|
|
301
|
+
const target = this.parentUrl();
|
|
302
|
+
if (target) {
|
|
303
|
+
this.parentNavigate.emit(target);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: SharedBreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
307
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: SharedBreadcrumbComponent, isStandalone: true, selector: "lib-breadcrumb, shared-breadcrumb", outputs: { parentNavigate: "parentNavigate" }, ngImport: i0, template: "<nav class=\"shared-breadcrumb\" *ngIf=\"currentLabel() || parentLabel()\">\r\n @if (parentLabel()) {\r\n <button\r\n type=\"button\"\r\n class=\"shared-breadcrumb__parent\"\r\n (click)=\"navigateToParent()\"\r\n >\r\n <span class=\"shared-breadcrumb__parent-label\">{{ parentLabel() }}</span>\r\n </button>\r\n <span class=\"shared-breadcrumb__separator\">/</span>\r\n }\r\n <span class=\"shared-breadcrumb__current\">\r\n <span class=\"shared-breadcrumb__current-label\">{{ currentLabel() }}</span>\r\n </span>\r\n</nav>\r\n", styles: [".shared-breadcrumb{display:flex;align-items:center;gap:.5rem;padding:0;color:var( --breadcrumbs-label-enabled-breadcrumb-enabled-label-text-color, var(--pallete-scheme-surface-on-surface-variant, #434749) );font-family:var(--breadcrumbs-label-enabled-breadcrumb-label-text-font, Heebo);font-size:var(--breadcrumbs-label-enabled-breadcrumb-label-text-size, 14px);font-style:normal;font-weight:var(--breadcrumbs-label-enabled-breadcrumb-label-text-weight, 400);line-height:calc(var(--breadcrumbs-label-enabled-breadcrumb-label-text-line-height, 20) * 1px);letter-spacing:var(--breadcrumbs-label-enabled-breadcrumb-label-text-tracking, .25px)}.shared-breadcrumb__parent{display:inline-flex;align-items:center;gap:.5rem;border:none;background:none;padding:.625rem .75rem;border-radius:100px;position:relative;overflow:hidden;font:inherit;font-weight:var( --breadcrumbs-label-enabled-breadcrumb-label-text-weight, 400 );color:inherit;cursor:pointer;transition:color .15s ease,background-color .15s ease;--breadcrumb-ripple-color: var( --breadcrumbs-label-pressed-breadcrumb-pressed-ripple-color, rgba(24, 28, 30, .08) )}.shared-breadcrumb__parent:after{content:\"\";position:absolute;right:0;bottom:0;width:48px;height:28px;background-color:var(--breadcrumb-ripple-color);-webkit-mask-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='28' viewBox='0 0 48 28' fill='none'><path d='M48 3.12389V28H0C0 12.536 14.7249 0 32.8889 0C38.3368 0 43.4753 1.12771 48 3.12389Z' fill='black'/></svg>\");mask-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='28' viewBox='0 0 48 28' fill='none'><path d='M48 3.12389V28H0C0 12.536 14.7249 0 32.8889 0C38.3368 0 43.4753 1.12771 48 3.12389Z' fill='black'/></svg>\");-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;opacity:0;pointer-events:none}.shared-breadcrumb__parent:hover,.shared-breadcrumb__parent:focus-visible{color:var( --breadcrumbs-label-hovered-breadcrumb-hovered-label-text-color, var(--pallete-scheme-surface-on-surface, #181c1e) );background-color:var( --breadcrumbs-label-hovered-breadcrumb-hovered-state-layer-color, rgba(24, 28, 30, .08) );outline:none}.shared-breadcrumb__parent:focus-visible{outline:calc(var(--breadcrumbs-label-focused-breadcrumb-focused-indicator-weight, 3) * 1px) solid var(--breadcrumbs-label-focused-breadcrumb-focused-indicator-color, #5b5f61);outline-offset:2px}.shared-breadcrumb__parent:active{color:var( --breadcrumbs-label-pressed-breadcrumb-pressed-label-text-color, var(--pallete-scheme-surface-on-surface, #181c1e) );background-color:var( --breadcrumbs-label-pressed-breadcrumb-pressed-state-layer-color, rgba(24, 28, 30, .1) )}.shared-breadcrumb__parent:active:after{opacity:1}.shared-breadcrumb__separator{display:inline-flex;align-items:center;color:var(--breadcrumbs-divider-breadcrumb-divider-color, #181c1e);text-align:center;font-family:var(--breadcrumbs-divider-breadcrumb-divider-text-font, Heebo);font-size:var(--breadcrumbs-divider-breadcrumb-divider-text-size, 14px);font-style:normal;font-weight:var(--breadcrumbs-divider-breadcrumb-divider-text-weight, 400);line-height:calc(var(--breadcrumbs-divider-breadcrumb-divider-text-line-height, 20) * 1px);letter-spacing:var(--breadcrumbs-divider-breadcrumb-divider-text-tracking, .25px)}.shared-breadcrumb__current{display:inline-flex;align-items:center;padding:.625rem .75rem;gap:.5rem;border-radius:100px;position:relative;overflow:hidden;cursor:pointer;font-weight:var( --breadcrumbs-label-selected-breadcrumb-selected-label-text-weight, 700 );color:var( --breadcrumbs-label-selected-breadcrumb-selected-label-hovered-text-color, var(--pallete-scheme-surface-on-surface, #181c1e) );letter-spacing:var(--breadcrumbs-label-selected-breadcrumb-selected-label-text-tracking, .1px);--breadcrumb-ripple-color: var( --breadcrumbs-label-pressed-breadcrumb-pressed-ripple-color, rgba(24, 28, 30, .08) )}.shared-breadcrumb__current:after{content:\"\";position:absolute;right:0;bottom:0;width:48px;height:28px;background-color:var(--breadcrumb-ripple-color);-webkit-mask-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='28' viewBox='0 0 48 28' fill='none'><path d='M48 3.12389V28H0C0 12.536 14.7249 0 32.8889 0C38.3368 0 43.4753 1.12771 48 3.12389Z' fill='black'/></svg>\");mask-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='28' viewBox='0 0 48 28' fill='none'><path d='M48 3.12389V28H0C0 12.536 14.7249 0 32.8889 0C38.3368 0 43.4753 1.12771 48 3.12389Z' fill='black'/></svg>\");-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;opacity:0;pointer-events:none}.shared-breadcrumb__current:hover,.shared-breadcrumb__current:focus-visible{background-color:var( --breadcrumbs-label-hovered-breadcrumb-hovered-state-layer-color, rgba(24, 28, 30, .08) );outline:none}.shared-breadcrumb__current:active{color:var( --breadcrumbs-label-pressed-breadcrumb-pressed-label-text-color, #181c1e );background-color:var( --breadcrumbs-label-pressed-breadcrumb-pressed-state-layer-color, rgba(24, 28, 30, .1) )}.shared-breadcrumb__current:active:after{opacity:1}.shared-breadcrumb__current-label{position:relative;z-index:1;text-align:center;font-size:var(--breadcrumbs-label-enabled-breadcrumb-label-text-size, 14px);font-style:normal;line-height:calc(var(--breadcrumbs-label-enabled-breadcrumb-label-text-line-height, 20) * 1px);letter-spacing:var(--breadcrumbs-label-enabled-breadcrumb-label-text-tracking, .25px);font-weight:inherit}.shared-breadcrumb__parent-label{position:relative;z-index:1}.shared-breadcrumb__current:active .shared-breadcrumb__current-label{font-weight:var( --breadcrumbs-label-enabled-breadcrumb-label-text-weight, 400 )}.shared-breadcrumb__current:hover .shared-breadcrumb__current-label,.shared-breadcrumb__current:focus-visible .shared-breadcrumb__current-label{font-weight:var( --breadcrumbs-label-enabled-breadcrumb-label-text-weight, 400 )}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
308
|
+
}
|
|
309
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: SharedBreadcrumbComponent, decorators: [{
|
|
310
|
+
type: Component,
|
|
311
|
+
args: [{ selector: 'lib-breadcrumb, shared-breadcrumb', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav class=\"shared-breadcrumb\" *ngIf=\"currentLabel() || parentLabel()\">\r\n @if (parentLabel()) {\r\n <button\r\n type=\"button\"\r\n class=\"shared-breadcrumb__parent\"\r\n (click)=\"navigateToParent()\"\r\n >\r\n <span class=\"shared-breadcrumb__parent-label\">{{ parentLabel() }}</span>\r\n </button>\r\n <span class=\"shared-breadcrumb__separator\">/</span>\r\n }\r\n <span class=\"shared-breadcrumb__current\">\r\n <span class=\"shared-breadcrumb__current-label\">{{ currentLabel() }}</span>\r\n </span>\r\n</nav>\r\n", styles: [".shared-breadcrumb{display:flex;align-items:center;gap:.5rem;padding:0;color:var( --breadcrumbs-label-enabled-breadcrumb-enabled-label-text-color, var(--pallete-scheme-surface-on-surface-variant, #434749) );font-family:var(--breadcrumbs-label-enabled-breadcrumb-label-text-font, Heebo);font-size:var(--breadcrumbs-label-enabled-breadcrumb-label-text-size, 14px);font-style:normal;font-weight:var(--breadcrumbs-label-enabled-breadcrumb-label-text-weight, 400);line-height:calc(var(--breadcrumbs-label-enabled-breadcrumb-label-text-line-height, 20) * 1px);letter-spacing:var(--breadcrumbs-label-enabled-breadcrumb-label-text-tracking, .25px)}.shared-breadcrumb__parent{display:inline-flex;align-items:center;gap:.5rem;border:none;background:none;padding:.625rem .75rem;border-radius:100px;position:relative;overflow:hidden;font:inherit;font-weight:var( --breadcrumbs-label-enabled-breadcrumb-label-text-weight, 400 );color:inherit;cursor:pointer;transition:color .15s ease,background-color .15s ease;--breadcrumb-ripple-color: var( --breadcrumbs-label-pressed-breadcrumb-pressed-ripple-color, rgba(24, 28, 30, .08) )}.shared-breadcrumb__parent:after{content:\"\";position:absolute;right:0;bottom:0;width:48px;height:28px;background-color:var(--breadcrumb-ripple-color);-webkit-mask-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='28' viewBox='0 0 48 28' fill='none'><path d='M48 3.12389V28H0C0 12.536 14.7249 0 32.8889 0C38.3368 0 43.4753 1.12771 48 3.12389Z' fill='black'/></svg>\");mask-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='28' viewBox='0 0 48 28' fill='none'><path d='M48 3.12389V28H0C0 12.536 14.7249 0 32.8889 0C38.3368 0 43.4753 1.12771 48 3.12389Z' fill='black'/></svg>\");-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;opacity:0;pointer-events:none}.shared-breadcrumb__parent:hover,.shared-breadcrumb__parent:focus-visible{color:var( --breadcrumbs-label-hovered-breadcrumb-hovered-label-text-color, var(--pallete-scheme-surface-on-surface, #181c1e) );background-color:var( --breadcrumbs-label-hovered-breadcrumb-hovered-state-layer-color, rgba(24, 28, 30, .08) );outline:none}.shared-breadcrumb__parent:focus-visible{outline:calc(var(--breadcrumbs-label-focused-breadcrumb-focused-indicator-weight, 3) * 1px) solid var(--breadcrumbs-label-focused-breadcrumb-focused-indicator-color, #5b5f61);outline-offset:2px}.shared-breadcrumb__parent:active{color:var( --breadcrumbs-label-pressed-breadcrumb-pressed-label-text-color, var(--pallete-scheme-surface-on-surface, #181c1e) );background-color:var( --breadcrumbs-label-pressed-breadcrumb-pressed-state-layer-color, rgba(24, 28, 30, .1) )}.shared-breadcrumb__parent:active:after{opacity:1}.shared-breadcrumb__separator{display:inline-flex;align-items:center;color:var(--breadcrumbs-divider-breadcrumb-divider-color, #181c1e);text-align:center;font-family:var(--breadcrumbs-divider-breadcrumb-divider-text-font, Heebo);font-size:var(--breadcrumbs-divider-breadcrumb-divider-text-size, 14px);font-style:normal;font-weight:var(--breadcrumbs-divider-breadcrumb-divider-text-weight, 400);line-height:calc(var(--breadcrumbs-divider-breadcrumb-divider-text-line-height, 20) * 1px);letter-spacing:var(--breadcrumbs-divider-breadcrumb-divider-text-tracking, .25px)}.shared-breadcrumb__current{display:inline-flex;align-items:center;padding:.625rem .75rem;gap:.5rem;border-radius:100px;position:relative;overflow:hidden;cursor:pointer;font-weight:var( --breadcrumbs-label-selected-breadcrumb-selected-label-text-weight, 700 );color:var( --breadcrumbs-label-selected-breadcrumb-selected-label-hovered-text-color, var(--pallete-scheme-surface-on-surface, #181c1e) );letter-spacing:var(--breadcrumbs-label-selected-breadcrumb-selected-label-text-tracking, .1px);--breadcrumb-ripple-color: var( --breadcrumbs-label-pressed-breadcrumb-pressed-ripple-color, rgba(24, 28, 30, .08) )}.shared-breadcrumb__current:after{content:\"\";position:absolute;right:0;bottom:0;width:48px;height:28px;background-color:var(--breadcrumb-ripple-color);-webkit-mask-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='28' viewBox='0 0 48 28' fill='none'><path d='M48 3.12389V28H0C0 12.536 14.7249 0 32.8889 0C38.3368 0 43.4753 1.12771 48 3.12389Z' fill='black'/></svg>\");mask-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='28' viewBox='0 0 48 28' fill='none'><path d='M48 3.12389V28H0C0 12.536 14.7249 0 32.8889 0C38.3368 0 43.4753 1.12771 48 3.12389Z' fill='black'/></svg>\");-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;opacity:0;pointer-events:none}.shared-breadcrumb__current:hover,.shared-breadcrumb__current:focus-visible{background-color:var( --breadcrumbs-label-hovered-breadcrumb-hovered-state-layer-color, rgba(24, 28, 30, .08) );outline:none}.shared-breadcrumb__current:active{color:var( --breadcrumbs-label-pressed-breadcrumb-pressed-label-text-color, #181c1e );background-color:var( --breadcrumbs-label-pressed-breadcrumb-pressed-state-layer-color, rgba(24, 28, 30, .1) )}.shared-breadcrumb__current:active:after{opacity:1}.shared-breadcrumb__current-label{position:relative;z-index:1;text-align:center;font-size:var(--breadcrumbs-label-enabled-breadcrumb-label-text-size, 14px);font-style:normal;line-height:calc(var(--breadcrumbs-label-enabled-breadcrumb-label-text-line-height, 20) * 1px);letter-spacing:var(--breadcrumbs-label-enabled-breadcrumb-label-text-tracking, .25px);font-weight:inherit}.shared-breadcrumb__parent-label{position:relative;z-index:1}.shared-breadcrumb__current:active .shared-breadcrumb__current-label{font-weight:var( --breadcrumbs-label-enabled-breadcrumb-label-text-weight, 400 )}.shared-breadcrumb__current:hover .shared-breadcrumb__current-label,.shared-breadcrumb__current:focus-visible .shared-breadcrumb__current-label{font-weight:var( --breadcrumbs-label-enabled-breadcrumb-label-text-weight, 400 )}\n"] }]
|
|
312
|
+
}], propDecorators: { parentNavigate: [{
|
|
313
|
+
type: Output
|
|
314
|
+
}] } });
|
|
315
|
+
|
|
316
|
+
class SidebarComponent {
|
|
317
|
+
items = input([], ...(ngDevMode ? [{ debugName: "items" }] : []));
|
|
318
|
+
selectedId = input(null, ...(ngDevMode ? [{ debugName: "selectedId" }] : []));
|
|
319
|
+
showLabels = input(true, ...(ngDevMode ? [{ debugName: "showLabels" }] : []));
|
|
320
|
+
spritePath = input('assets/icons/sprite.svg', ...(ngDevMode ? [{ debugName: "spritePath" }] : []));
|
|
321
|
+
itemSelected = new EventEmitter();
|
|
322
|
+
hasLabels = computed(() => this.showLabels() && this.items().some(({ label }) => !!label), ...(ngDevMode ? [{ debugName: "hasLabels" }] : []));
|
|
323
|
+
onSelect(item) {
|
|
324
|
+
if (item.disabled) {
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
this.itemSelected.emit(item);
|
|
328
|
+
}
|
|
329
|
+
isSelected(item) {
|
|
330
|
+
return item.id === this.selectedId();
|
|
331
|
+
}
|
|
332
|
+
trackById(_index, item) {
|
|
333
|
+
return item.id;
|
|
334
|
+
}
|
|
335
|
+
iconHref(icon) {
|
|
336
|
+
return `${this.spritePath()}#${icon}`;
|
|
337
|
+
}
|
|
338
|
+
accessoryHref(accessoryIcon) {
|
|
339
|
+
return `${this.spritePath()}#${accessoryIcon}`;
|
|
340
|
+
}
|
|
341
|
+
iconRef(item) {
|
|
342
|
+
if (item.iconPath) {
|
|
343
|
+
return item.iconPath;
|
|
344
|
+
}
|
|
345
|
+
if (item.icon) {
|
|
346
|
+
return this.iconHref(item.icon);
|
|
347
|
+
}
|
|
348
|
+
return null;
|
|
349
|
+
}
|
|
350
|
+
accessoryRef(item) {
|
|
351
|
+
if (item.accessoryIconPath) {
|
|
352
|
+
return item.accessoryIconPath;
|
|
353
|
+
}
|
|
354
|
+
if (item.accessoryIcon) {
|
|
355
|
+
return this.accessoryHref(item.accessoryIcon);
|
|
356
|
+
}
|
|
357
|
+
return null;
|
|
358
|
+
}
|
|
359
|
+
isSprite(ref) {
|
|
360
|
+
return !!ref && ref.includes('#');
|
|
361
|
+
}
|
|
362
|
+
shouldShowLabel(item) {
|
|
363
|
+
if (!item.label) {
|
|
364
|
+
return false;
|
|
365
|
+
}
|
|
366
|
+
return this.showLabels();
|
|
367
|
+
}
|
|
368
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: SidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
369
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: SidebarComponent, isStandalone: true, selector: "lib-sidebar", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, selectedId: { classPropertyName: "selectedId", publicName: "selectedId", isSignal: true, isRequired: false, transformFunction: null }, showLabels: { classPropertyName: "showLabels", publicName: "showLabels", isSignal: true, isRequired: false, transformFunction: null }, spritePath: { classPropertyName: "spritePath", publicName: "spritePath", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemSelected: "itemSelected" }, ngImport: i0, template: "<aside class=\"sidebar\" role=\"navigation\" aria-label=\"Navegaci\u00F3n principal\" [class.sidebar--show-labels]=\"hasLabels()\">\r\n <div class=\"sidebar__header\">\r\n <ng-content select=\"[sidebar-header]\"></ng-content>\r\n </div>\r\n\r\n <nav class=\"sidebar__nav\" aria-label=\"Secciones\">\r\n <ul class=\"sidebar__list\">\r\n @for (item of items(); track trackById($index, item)) {\r\n <li\r\n class=\"sidebar__item\"\r\n [class.sidebar__item--selected]=\"isSelected(item)\"\r\n [class.sidebar__item--disabled]=\"item.disabled\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"sidebar__button\"\r\n [class.sidebar__button--expanded]=\"hasLabels()\"\r\n [class.sidebar__button--selected]=\"isSelected(item)\"\r\n [attr.aria-label]=\"item.ariaLabel ?? item.label\"\r\n [attr.aria-current]=\"isSelected(item) ? 'page' : null\"\r\n [attr.title]=\"shouldShowLabel(item) ? null : (item.ariaLabel || item.label)\"\r\n [disabled]=\"item.disabled\"\r\n (click)=\"onSelect(item)\"\r\n >\r\n <span class=\"sidebar__active\" [class.sidebar__active--expanded]=\"hasLabels()\">\r\n @if (iconRef(item); as iconSrc) {\r\n <span class=\"sidebar__icon\" aria-hidden=\"true\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"renderIcon\"\r\n [ngTemplateOutletContext]=\"{ $implicit: iconSrc, svgClass: 'sidebar__icon-svg', imgClass: 'sidebar__icon-img' }\"\r\n ></ng-container>\r\n </span>\r\n }\r\n\r\n @if (shouldShowLabel(item)) {\r\n <span class=\"sidebar__label\">{{ item.label }}</span>\r\n }\r\n\r\n @if (accessoryRef(item); as accessorySrc) {\r\n <span class=\"sidebar__accessory\" aria-hidden=\"true\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"renderIcon\"\r\n [ngTemplateOutletContext]=\"{ $implicit: accessorySrc, svgClass: 'sidebar__accessory-svg', imgClass: 'sidebar__accessory-img' }\"\r\n ></ng-container>\r\n </span>\r\n }\r\n </span>\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n </nav>\r\n\r\n <div class=\"sidebar__footer\">\r\n <ng-content select=\"[sidebar-footer]\"></ng-content>\r\n </div>\r\n\r\n <ng-template #renderIcon let-src let-svgClass=\"svgClass\" let-imgClass=\"imgClass\">\r\n @if (isSprite(src)) {\r\n <svg [attr.class]=\"svgClass\">\r\n <use [attr.href]=\"src\"></use>\r\n </svg>\r\n } @else {\r\n <img [attr.class]=\"imgClass\" [src]=\"src\" alt=\"\" />\r\n }\r\n </ng-template>\r\n</aside>\r\n", styles: [":host{display:block;height:100%}.sidebar{position:relative;display:flex;flex-direction:column;align-items:center;width:calc(var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-container-width, 96) * 1px);min-width:calc(var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-container-width, 96) * 1px);height:100%;padding:calc(var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-item-top-space, 44) * 1px) 0 calc(var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-item-vertical-space, 4) * 1px);box-sizing:border-box;gap:calc(var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-item-vertical-space, 4) * 1px);background-color:var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-container-color, #ebeef0);border-radius:calc(var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-container-shape, 0) * 1px);color:var(--navigation-rail-nav-rail-item-vertical-nav-rail-item-vertical-text-color, #434749);transition:width .28s ease,min-width .28s ease,padding .28s ease}.sidebar--show-labels{align-items:stretch;width:calc(var(--navigation-rail-nav-rail-expanded-nav-rail-expanded-container-width-minimum, 220) * 1px);min-width:calc(var(--navigation-rail-nav-rail-expanded-nav-rail-expanded-container-width-minimum, 220) * 1px)}.sidebar__header,.sidebar__footer{display:flex;justify-content:center;padding-inline:calc(var(--navigation-rail-nav-rail-item-vertical-nav-rail-item-vertical-leading-space, 16) * 1px);width:100%}.sidebar__header{min-height:calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-header-space-minimum, 40) * 1px);align-items:center}.sidebar__header:empty,.sidebar__footer:empty{display:none}.sidebar__nav{flex:1;display:flex;flex-direction:column;width:100%;padding:0 var(--padding-container-main, 16px) 0}.sidebar__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;align-items:center;gap:calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-container-vertical-space, 6) * 1px)}.sidebar--show-labels .sidebar__list{align-items:stretch}.sidebar__item{width:100%;display:flex;align-items:center}.sidebar--show-labels .sidebar__item{justify-content:flex-start}.sidebar__button{position:relative;display:flex;justify-content:center;width:auto;max-width:100%;height:calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-container-height, 64) * 1px);margin:0;padding-inline:0;padding-block:0;border:0;background:none;cursor:pointer;color:var(--navigation-rail-nav-rail-item-common-nav-rail-item-icon-color, #181c1e);text-decoration:none;transition:color .18s ease,height .32s ease,max-width .32s ease,padding .32s ease}.sidebar__button--expanded{align-self:center;width:auto;max-width:100%;height:calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-container-height, 64) * 1px);justify-content:flex-start;padding-inline:0}.sidebar__button:focus-visible{outline:2px solid var(--navigation-rail-nav-rail-item-common-nav-rail-item-focus-indicator, #5b5f61);outline-offset:4px}.sidebar__button:disabled{cursor:default;opacity:.48}.sidebar__active{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-active-indicator-icon-label-space, 8) * 1px);height:calc(var(--navigation-rail-nav-rail-item-vertical-nav-rail-item-vertical-active-indicator-height, 32) * 1px);padding-inline:calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-active-indicator-leading-space, 16) * 1px) calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-active-indicator-trailing-space, 16) * 1px);border-radius:calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-active-indicator-shape, 1000) * 1px);background-color:transparent;transition:background-color .18s ease,color .18s ease,gap .32s cubic-bezier(.4,0,.2,1),padding .32s cubic-bezier(.4,0,.2,1),width .32s cubic-bezier(.4,0,.2,1),max-width .32s cubic-bezier(.4,0,.2,1);max-width:calc(var(--navigation-rail-nav-rail-expanded-nav-rail-expanded-container-width-minimum, 220) * 1px);overflow:hidden}.sidebar__button--expanded .sidebar__active,.sidebar__active--expanded{width:auto;max-width:100%;height:100%;align-items:center;justify-content:flex-start;padding-inline:calc(var(--navigation-rail-nav-rail-item-horizontal-nav-rail-item-horizontal-full-width-leading-space, 16) * 1px);gap:calc(var(--navigation-rail-nav-rail-item-horizontal-nav-rail-item-horizontal-icon-label-space, 8) * 1px)}.sidebar__button:not(:disabled):hover .sidebar__active{background-color:#181c1e14}.sidebar__button:not(:disabled):active .sidebar__active{background-color:#181c1e1f}.sidebar__button--selected .sidebar__active{background-color:var(--navigation-rail-nav-rail-item-common-nav-rail-item-container-selected-color, #e42313);color:var(--navigation-rail-nav-rail-item-common-nav-rail-item-icon-selected-color, #ffffff)}.sidebar__button--selected:not(:disabled):hover .sidebar__active{background-color:#e42313e0}.sidebar__button--selected:not(:disabled):active .sidebar__active{background-color:#e42313c2}.sidebar__icon{display:flex;align-items:center;justify-content:center;width:calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-icon-size, 24) * 1px);height:calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-icon-size, 24) * 1px);color:currentColor}.sidebar__icon-svg,.sidebar__icon-img{width:100%;height:100%}.sidebar__icon-svg{fill:currentColor}.sidebar__icon-img{object-fit:contain}.sidebar__label{flex:1 1 auto;min-width:0;font-size:.8125rem;font-weight:600;letter-spacing:.01em;line-height:1.2;color:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;transition:opacity .2s ease}.sidebar__accessory{display:flex;align-items:center;justify-content:center;width:16px;height:16px;margin-left:auto;color:inherit}.sidebar__accessory-svg,.sidebar__accessory-img{width:100%;height:100%;fill:currentColor}.sidebar__footer{margin-top:auto;align-items:flex-end;padding-bottom:calc(var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-item-vertical-space, 4) * 1px)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
370
|
+
}
|
|
371
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: SidebarComponent, decorators: [{
|
|
372
|
+
type: Component,
|
|
373
|
+
args: [{ selector: 'lib-sidebar', standalone: true, imports: [NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "<aside class=\"sidebar\" role=\"navigation\" aria-label=\"Navegaci\u00F3n principal\" [class.sidebar--show-labels]=\"hasLabels()\">\r\n <div class=\"sidebar__header\">\r\n <ng-content select=\"[sidebar-header]\"></ng-content>\r\n </div>\r\n\r\n <nav class=\"sidebar__nav\" aria-label=\"Secciones\">\r\n <ul class=\"sidebar__list\">\r\n @for (item of items(); track trackById($index, item)) {\r\n <li\r\n class=\"sidebar__item\"\r\n [class.sidebar__item--selected]=\"isSelected(item)\"\r\n [class.sidebar__item--disabled]=\"item.disabled\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"sidebar__button\"\r\n [class.sidebar__button--expanded]=\"hasLabels()\"\r\n [class.sidebar__button--selected]=\"isSelected(item)\"\r\n [attr.aria-label]=\"item.ariaLabel ?? item.label\"\r\n [attr.aria-current]=\"isSelected(item) ? 'page' : null\"\r\n [attr.title]=\"shouldShowLabel(item) ? null : (item.ariaLabel || item.label)\"\r\n [disabled]=\"item.disabled\"\r\n (click)=\"onSelect(item)\"\r\n >\r\n <span class=\"sidebar__active\" [class.sidebar__active--expanded]=\"hasLabels()\">\r\n @if (iconRef(item); as iconSrc) {\r\n <span class=\"sidebar__icon\" aria-hidden=\"true\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"renderIcon\"\r\n [ngTemplateOutletContext]=\"{ $implicit: iconSrc, svgClass: 'sidebar__icon-svg', imgClass: 'sidebar__icon-img' }\"\r\n ></ng-container>\r\n </span>\r\n }\r\n\r\n @if (shouldShowLabel(item)) {\r\n <span class=\"sidebar__label\">{{ item.label }}</span>\r\n }\r\n\r\n @if (accessoryRef(item); as accessorySrc) {\r\n <span class=\"sidebar__accessory\" aria-hidden=\"true\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"renderIcon\"\r\n [ngTemplateOutletContext]=\"{ $implicit: accessorySrc, svgClass: 'sidebar__accessory-svg', imgClass: 'sidebar__accessory-img' }\"\r\n ></ng-container>\r\n </span>\r\n }\r\n </span>\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n </nav>\r\n\r\n <div class=\"sidebar__footer\">\r\n <ng-content select=\"[sidebar-footer]\"></ng-content>\r\n </div>\r\n\r\n <ng-template #renderIcon let-src let-svgClass=\"svgClass\" let-imgClass=\"imgClass\">\r\n @if (isSprite(src)) {\r\n <svg [attr.class]=\"svgClass\">\r\n <use [attr.href]=\"src\"></use>\r\n </svg>\r\n } @else {\r\n <img [attr.class]=\"imgClass\" [src]=\"src\" alt=\"\" />\r\n }\r\n </ng-template>\r\n</aside>\r\n", styles: [":host{display:block;height:100%}.sidebar{position:relative;display:flex;flex-direction:column;align-items:center;width:calc(var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-container-width, 96) * 1px);min-width:calc(var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-container-width, 96) * 1px);height:100%;padding:calc(var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-item-top-space, 44) * 1px) 0 calc(var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-item-vertical-space, 4) * 1px);box-sizing:border-box;gap:calc(var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-item-vertical-space, 4) * 1px);background-color:var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-container-color, #ebeef0);border-radius:calc(var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-container-shape, 0) * 1px);color:var(--navigation-rail-nav-rail-item-vertical-nav-rail-item-vertical-text-color, #434749);transition:width .28s ease,min-width .28s ease,padding .28s ease}.sidebar--show-labels{align-items:stretch;width:calc(var(--navigation-rail-nav-rail-expanded-nav-rail-expanded-container-width-minimum, 220) * 1px);min-width:calc(var(--navigation-rail-nav-rail-expanded-nav-rail-expanded-container-width-minimum, 220) * 1px)}.sidebar__header,.sidebar__footer{display:flex;justify-content:center;padding-inline:calc(var(--navigation-rail-nav-rail-item-vertical-nav-rail-item-vertical-leading-space, 16) * 1px);width:100%}.sidebar__header{min-height:calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-header-space-minimum, 40) * 1px);align-items:center}.sidebar__header:empty,.sidebar__footer:empty{display:none}.sidebar__nav{flex:1;display:flex;flex-direction:column;width:100%;padding:0 var(--padding-container-main, 16px) 0}.sidebar__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;align-items:center;gap:calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-container-vertical-space, 6) * 1px)}.sidebar--show-labels .sidebar__list{align-items:stretch}.sidebar__item{width:100%;display:flex;align-items:center}.sidebar--show-labels .sidebar__item{justify-content:flex-start}.sidebar__button{position:relative;display:flex;justify-content:center;width:auto;max-width:100%;height:calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-container-height, 64) * 1px);margin:0;padding-inline:0;padding-block:0;border:0;background:none;cursor:pointer;color:var(--navigation-rail-nav-rail-item-common-nav-rail-item-icon-color, #181c1e);text-decoration:none;transition:color .18s ease,height .32s ease,max-width .32s ease,padding .32s ease}.sidebar__button--expanded{align-self:center;width:auto;max-width:100%;height:calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-container-height, 64) * 1px);justify-content:flex-start;padding-inline:0}.sidebar__button:focus-visible{outline:2px solid var(--navigation-rail-nav-rail-item-common-nav-rail-item-focus-indicator, #5b5f61);outline-offset:4px}.sidebar__button:disabled{cursor:default;opacity:.48}.sidebar__active{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-active-indicator-icon-label-space, 8) * 1px);height:calc(var(--navigation-rail-nav-rail-item-vertical-nav-rail-item-vertical-active-indicator-height, 32) * 1px);padding-inline:calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-active-indicator-leading-space, 16) * 1px) calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-active-indicator-trailing-space, 16) * 1px);border-radius:calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-active-indicator-shape, 1000) * 1px);background-color:transparent;transition:background-color .18s ease,color .18s ease,gap .32s cubic-bezier(.4,0,.2,1),padding .32s cubic-bezier(.4,0,.2,1),width .32s cubic-bezier(.4,0,.2,1),max-width .32s cubic-bezier(.4,0,.2,1);max-width:calc(var(--navigation-rail-nav-rail-expanded-nav-rail-expanded-container-width-minimum, 220) * 1px);overflow:hidden}.sidebar__button--expanded .sidebar__active,.sidebar__active--expanded{width:auto;max-width:100%;height:100%;align-items:center;justify-content:flex-start;padding-inline:calc(var(--navigation-rail-nav-rail-item-horizontal-nav-rail-item-horizontal-full-width-leading-space, 16) * 1px);gap:calc(var(--navigation-rail-nav-rail-item-horizontal-nav-rail-item-horizontal-icon-label-space, 8) * 1px)}.sidebar__button:not(:disabled):hover .sidebar__active{background-color:#181c1e14}.sidebar__button:not(:disabled):active .sidebar__active{background-color:#181c1e1f}.sidebar__button--selected .sidebar__active{background-color:var(--navigation-rail-nav-rail-item-common-nav-rail-item-container-selected-color, #e42313);color:var(--navigation-rail-nav-rail-item-common-nav-rail-item-icon-selected-color, #ffffff)}.sidebar__button--selected:not(:disabled):hover .sidebar__active{background-color:#e42313e0}.sidebar__button--selected:not(:disabled):active .sidebar__active{background-color:#e42313c2}.sidebar__icon{display:flex;align-items:center;justify-content:center;width:calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-icon-size, 24) * 1px);height:calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-icon-size, 24) * 1px);color:currentColor}.sidebar__icon-svg,.sidebar__icon-img{width:100%;height:100%}.sidebar__icon-svg{fill:currentColor}.sidebar__icon-img{object-fit:contain}.sidebar__label{flex:1 1 auto;min-width:0;font-size:.8125rem;font-weight:600;letter-spacing:.01em;line-height:1.2;color:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;transition:opacity .2s ease}.sidebar__accessory{display:flex;align-items:center;justify-content:center;width:16px;height:16px;margin-left:auto;color:inherit}.sidebar__accessory-svg,.sidebar__accessory-img{width:100%;height:100%;fill:currentColor}.sidebar__footer{margin-top:auto;align-items:flex-end;padding-bottom:calc(var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-item-vertical-space, 4) * 1px)}\n"] }]
|
|
374
|
+
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], selectedId: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedId", required: false }] }], showLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabels", required: false }] }], spritePath: [{ type: i0.Input, args: [{ isSignal: true, alias: "spritePath", required: false }] }], itemSelected: [{
|
|
375
|
+
type: Output
|
|
376
|
+
}] } });
|
|
377
|
+
|
|
378
|
+
class HeaderComponent {
|
|
379
|
+
showLeading = input(true, ...(ngDevMode ? [{ debugName: "showLeading" }] : []));
|
|
380
|
+
leadingIcon = input('icon-menu', ...(ngDevMode ? [{ debugName: "leadingIcon" }] : []));
|
|
381
|
+
leadingIconPath = input(null, ...(ngDevMode ? [{ debugName: "leadingIconPath" }] : []));
|
|
382
|
+
leadingActionLabel = input('Abrir navegación', ...(ngDevMode ? [{ debugName: "leadingActionLabel" }] : []));
|
|
383
|
+
brandLabel = input('Credix', ...(ngDevMode ? [{ debugName: "brandLabel" }] : []));
|
|
384
|
+
brandIcon = input('smiley', ...(ngDevMode ? [{ debugName: "brandIcon" }] : []));
|
|
385
|
+
brandIconPath = input(null, ...(ngDevMode ? [{ debugName: "brandIconPath" }] : []));
|
|
386
|
+
trailingActions = input([
|
|
387
|
+
{ icon: 'search', ariaLabel: 'Abrir buscador' },
|
|
388
|
+
], ...(ngDevMode ? [{ debugName: "trailingActions" }] : []));
|
|
389
|
+
iconBasePath = input('assets/icons', ...(ngDevMode ? [{ debugName: "iconBasePath" }] : []));
|
|
390
|
+
leadingClick = new EventEmitter();
|
|
391
|
+
actionClick = new EventEmitter();
|
|
392
|
+
iconAssetBasePath = computed(() => this.normalizeAssetBasePath(this.iconBasePath()), ...(ngDevMode ? [{ debugName: "iconAssetBasePath" }] : []));
|
|
393
|
+
leadingIconUrl = computed(() => this.resolveIconUrl(this.leadingIcon(), this.leadingIconPath()), ...(ngDevMode ? [{ debugName: "leadingIconUrl" }] : []));
|
|
394
|
+
brandIconUrl = computed(() => this.resolveIconUrl(this.brandIcon(), this.brandIconPath()), ...(ngDevMode ? [{ debugName: "brandIconUrl" }] : []));
|
|
395
|
+
onLeadingClick() {
|
|
396
|
+
this.leadingClick.emit();
|
|
397
|
+
}
|
|
398
|
+
onActionClick(action) {
|
|
399
|
+
this.actionClick.emit(action);
|
|
400
|
+
}
|
|
401
|
+
trackByAction(_index, action) {
|
|
402
|
+
return action.id ?? action.icon;
|
|
403
|
+
}
|
|
404
|
+
actionIconUrl(action) {
|
|
405
|
+
return this.resolveIconUrl(action.icon, action.iconPath ?? null);
|
|
406
|
+
}
|
|
407
|
+
resolveIconUrl(iconName, explicitPath) {
|
|
408
|
+
if (explicitPath) {
|
|
409
|
+
if (explicitPath.includes('#')) {
|
|
410
|
+
const spriteSymbol = explicitPath.split('#')[1];
|
|
411
|
+
if (spriteSymbol) {
|
|
412
|
+
const fallback = this.resolveIconUrl(spriteSymbol, null);
|
|
413
|
+
if (fallback) {
|
|
414
|
+
return fallback;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
return explicitPath;
|
|
419
|
+
}
|
|
420
|
+
if (!iconName) {
|
|
421
|
+
return null;
|
|
422
|
+
}
|
|
423
|
+
if (KNOWN_UI_ICON_NAMES.has(iconName)) {
|
|
424
|
+
return resolveUiIconResource(iconName, {
|
|
425
|
+
basePath: this.iconAssetBasePath(),
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
return `${this.iconAssetBasePath()}/${iconName}.svg`;
|
|
429
|
+
}
|
|
430
|
+
normalizeAssetBasePath(basePath) {
|
|
431
|
+
const targetPath = basePath ?? 'assets/icons';
|
|
432
|
+
if (/^(https?:)?\/\//.test(targetPath)) {
|
|
433
|
+
return targetPath.replace(/\/$/, '');
|
|
434
|
+
}
|
|
435
|
+
return targetPath.replace(/\/$/, '');
|
|
436
|
+
}
|
|
437
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: HeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
438
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: HeaderComponent, isStandalone: true, selector: "lib-header", inputs: { showLeading: { classPropertyName: "showLeading", publicName: "showLeading", isSignal: true, isRequired: false, transformFunction: null }, leadingIcon: { classPropertyName: "leadingIcon", publicName: "leadingIcon", isSignal: true, isRequired: false, transformFunction: null }, leadingIconPath: { classPropertyName: "leadingIconPath", publicName: "leadingIconPath", isSignal: true, isRequired: false, transformFunction: null }, leadingActionLabel: { classPropertyName: "leadingActionLabel", publicName: "leadingActionLabel", isSignal: true, isRequired: false, transformFunction: null }, brandLabel: { classPropertyName: "brandLabel", publicName: "brandLabel", isSignal: true, isRequired: false, transformFunction: null }, brandIcon: { classPropertyName: "brandIcon", publicName: "brandIcon", isSignal: true, isRequired: false, transformFunction: null }, brandIconPath: { classPropertyName: "brandIconPath", publicName: "brandIconPath", isSignal: true, isRequired: false, transformFunction: null }, trailingActions: { classPropertyName: "trailingActions", publicName: "trailingActions", isSignal: true, isRequired: false, transformFunction: null }, iconBasePath: { classPropertyName: "iconBasePath", publicName: "iconBasePath", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { leadingClick: "leadingClick", actionClick: "actionClick" }, ngImport: i0, template: "<header class=\"app-bar\" role=\"banner\">\r\n <div class=\"app-bar__leading\">\r\n @if(showLeading()) {\r\n <button type=\"button\" class=\"app-bar__icon-button app-bar__icon-button--leading\" (click)=\"onLeadingClick()\"\r\n [attr.aria-label]=\"leadingActionLabel()\">\r\n @if (leadingIconUrl(); as leadingIconSrc) {\r\n <img class=\"app-bar__icon\" [src]=\"leadingIconSrc\" alt=\"\" aria-hidden=\"true\" />\r\n }\r\n </button>\r\n }\r\n </div>\r\n <div class=\"app-bar__brand\" role=\"img\" [attr.aria-label]=\"brandLabel()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"47\" height=\"25\" viewBox=\"0 0 47 25\" fill=\"none\">\r\n <path\r\n d=\"M34.0017 2.67521e-05C30.6579 -0.00672338 27.4427 1.26417 25.0377 3.54336C22.6327 5.82255 21.2268 8.93092 21.1179 12.2097C21.1179 12.3304 21.0564 12.5274 21.0564 12.6959C21.0564 14.8068 20.2017 16.8311 18.6803 18.3237C17.1589 19.8163 15.0955 20.6548 12.9439 20.6548C10.7923 20.6548 8.72889 19.8163 7.2075 18.3237C5.68612 16.8311 4.83141 14.8068 4.83141 12.6959C4.83073 12.0678 4.57609 11.4656 4.12335 11.0214C3.67061 10.5773 3.05676 10.3274 2.4165 10.3268C2.09598 10.3218 1.77774 10.3805 1.48091 10.4992C1.18407 10.6179 0.914746 10.7943 0.689116 11.0177C0.463486 11.2411 0.286201 11.5069 0.167908 11.7992C0.0496149 12.0915 -0.00724651 12.4042 0.000738184 12.7186C0.114789 15.972 1.49612 19.0588 3.86027 21.3431C6.22441 23.6274 9.39139 24.9353 12.709 24.9977C16.0266 25.06 19.2423 23.8719 21.6939 21.678C24.1454 19.4842 25.6462 16.4516 25.8871 13.2048C25.9417 13.0487 25.9626 12.8831 25.9486 12.7186C25.9486 10.6078 26.8033 8.58341 28.3247 7.09083C29.8461 5.59826 31.9095 4.75974 34.0611 4.75974C36.2127 4.75974 38.2761 5.59826 39.7975 7.09083C41.3189 8.58341 42.1736 10.6078 42.1736 12.7186C42.1562 13.0399 42.2056 13.3613 42.3189 13.6632C42.4322 13.9651 42.607 14.2412 42.8327 14.4747C43.0583 14.7082 43.3301 14.8941 43.6313 15.0212C43.9326 15.1482 44.2571 15.2138 44.5851 15.2138C44.913 15.2138 45.2375 15.1482 45.5388 15.0212C45.8401 14.8941 46.1119 14.7082 46.3375 14.4747C46.5632 14.2412 46.738 13.9651 46.8513 13.6632C46.9646 13.3613 47.014 13.0399 46.9966 12.7186C46.99 9.34216 45.6178 6.10632 43.1814 3.72165C40.7449 1.33699 37.4433 -0.00153433 34.0017 2.67521e-05Z\"\r\n fill=\"#E42313\" />\r\n <path\r\n d=\"M10.5943 6.75042C10.5937 7.32697 10.4188 7.89037 10.0918 8.36943C9.76482 8.84848 9.30041 9.22168 8.75728 9.44185C8.21414 9.66203 7.61667 9.71929 7.04037 9.60641C6.46407 9.49352 5.93482 9.21556 5.51951 8.80765C5.1042 8.39974 4.82148 7.88019 4.70708 7.31468C4.59268 6.74917 4.65174 6.16307 4.87678 5.63048C5.10183 5.09789 5.48277 4.64271 5.97145 4.32247C6.46013 4.00222 7.03461 3.8313 7.62228 3.8313C8.40773 3.84195 9.15792 4.15302 9.71305 4.69826C10.2682 5.24351 10.5844 5.97984 10.5943 6.75042Z\"\r\n fill=\"#E42313\" />\r\n <path\r\n d=\"M19.3841 6.75044C19.3841 7.52375 19.0709 8.26539 18.5136 8.8122C17.9562 9.35901 17.2003 9.66621 16.412 9.66621C15.6238 9.66621 14.8678 9.35901 14.3104 8.8122C13.7531 8.26539 13.44 7.52375 13.44 6.75044C13.4347 6.36594 13.5079 5.9843 13.6554 5.62802C13.8028 5.27174 14.0215 4.94802 14.2985 4.67596C14.5755 4.4039 14.9052 4.18901 15.2682 4.04394C15.6312 3.89888 16.0201 3.82658 16.412 3.83132C17.1975 3.84196 17.9476 4.15303 18.5028 4.69828C19.0579 5.24352 19.3741 5.97985 19.3841 6.75044Z\"\r\n fill=\"#E42313\" />\r\n </svg>\r\n </div>\r\n\r\n <div class=\"app-bar__actions\">\r\n @for (action of trailingActions(); track trackByAction($index, action)) {\r\n <button type=\"button\" class=\"app-bar__icon-button app-bar__icon-button--trailing\" (click)=\"onActionClick(action)\"\r\n [attr.aria-label]=\"action.ariaLabel\">\r\n @if (actionIconUrl(action); as actionIconSrc) {\r\n <img class=\"app-bar__icon\" [src]=\"actionIconSrc\" alt=\"\" aria-hidden=\"true\" />\r\n }\r\n </button>\r\n }\r\n </div>\r\n</header>", styles: [":host{display:block;width:100%;--bars-common-app-bar-brand-width: 47;--bars-common-app-bar-brand-height: 25}.app-bar{display:grid;grid-template-columns:auto 1fr auto;align-items:center;width:100%;flex-shrink:0;align-self:stretch;height:calc(var(--bars-size-small-app-bar-small-container-height, 64) * 1px);padding:.5rem calc(var(--bars-common-app-bar-right-padding, 4) * 1px) .5rem calc(var(--bars-common-app-bar-left-padding, 4) * 1px);background-color:var(--bars-common-app-bar-container-color, #ebeef0);border-radius:calc(var(--bars-common-app-bar-container-shape, 0) * 1px);box-sizing:border-box;column-gap:calc(var(--bars-common-app-bar-icon-spacing, 0) * 1px)}.app-bar__leading,.app-bar__actions{display:flex;align-items:center}.app-bar__leading{justify-self:start;width:calc(var(--bars-common-app-bar-icon-touch-target-size, 48) * 1px)}.app-bar__actions{justify-self:end;justify-content:flex-end;gap:calc(var(--bars-common-app-bar-icon-spacing, 0) * 1px);min-width:calc(var(--bars-common-app-bar-icon-touch-target-size, 48) * 1px)}.app-bar__actions:empty{min-width:0}.app-bar__brand{justify-self:center;position:relative;width:calc(var(--bars-common-app-bar-brand-width, 47) * 1px);height:calc(var(--bars-common-app-bar-brand-height, 25) * 1px);aspect-ratio:47 / 25;display:flex;align-items:center;justify-content:center;pointer-events:none;color:var(--bars-common-app-bar-central-icon, #e42313)}.app-bar__brand-icon{width:100%;height:100%;aspect-ratio:47 / 25;display:block;object-fit:contain}.app-bar__brand-icon use{width:100%!important;height:100%!important}.app-bar__brand-dot{position:absolute;width:6px;height:6px;border-radius:50%}.app-bar__brand-dot--primary{top:6px;left:6px}.app-bar__brand-dot--secondary{top:3px;left:16px}.app-bar__brand-dot--tertiary{top:8px;left:26px}.app-bar__brand-curve{position:absolute;bottom:0;right:0;width:32px;height:18px;border-bottom:4px solid var(--bars-common-app-bar-central-icon, #e42313);border-right:4px solid var(--bars-common-app-bar-central-icon, #e42313);border-left:0;border-top:0;border-radius:0 0 24px 24px}.app-bar__icon-button{display:flex;align-items:center;justify-content:center;width:48px;height:48px;flex:0 0 auto;border:0;border-radius:calc(var(--icon-buttons-size-small-icon-button-small-container-shape-round, 1000) * 1px);background:transparent;color:var(--bars-common-app-bar-leading-icon, #181c1e);cursor:pointer;transition:background-color .15s ease,color .15s ease}.app-bar__icon-button--trailing{color:var(--bars-common-app-bar-trailing-icon, #434749)}.app-bar__icon-button:hover,.app-bar__icon-button:focus-visible{background-color:#00000014}.app-bar__icon-button:focus-visible{outline:2px solid rgba(0,0,0,.24);outline-offset:2px}.app-bar__icon{font-size:calc(var(--bars-common-app-bar-icon-size, 24) * 1px);width:1em;height:1em;line-height:1;display:block;object-fit:contain}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
439
|
+
}
|
|
440
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: HeaderComponent, decorators: [{
|
|
441
|
+
type: Component,
|
|
442
|
+
args: [{ selector: 'lib-header', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<header class=\"app-bar\" role=\"banner\">\r\n <div class=\"app-bar__leading\">\r\n @if(showLeading()) {\r\n <button type=\"button\" class=\"app-bar__icon-button app-bar__icon-button--leading\" (click)=\"onLeadingClick()\"\r\n [attr.aria-label]=\"leadingActionLabel()\">\r\n @if (leadingIconUrl(); as leadingIconSrc) {\r\n <img class=\"app-bar__icon\" [src]=\"leadingIconSrc\" alt=\"\" aria-hidden=\"true\" />\r\n }\r\n </button>\r\n }\r\n </div>\r\n <div class=\"app-bar__brand\" role=\"img\" [attr.aria-label]=\"brandLabel()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"47\" height=\"25\" viewBox=\"0 0 47 25\" fill=\"none\">\r\n <path\r\n d=\"M34.0017 2.67521e-05C30.6579 -0.00672338 27.4427 1.26417 25.0377 3.54336C22.6327 5.82255 21.2268 8.93092 21.1179 12.2097C21.1179 12.3304 21.0564 12.5274 21.0564 12.6959C21.0564 14.8068 20.2017 16.8311 18.6803 18.3237C17.1589 19.8163 15.0955 20.6548 12.9439 20.6548C10.7923 20.6548 8.72889 19.8163 7.2075 18.3237C5.68612 16.8311 4.83141 14.8068 4.83141 12.6959C4.83073 12.0678 4.57609 11.4656 4.12335 11.0214C3.67061 10.5773 3.05676 10.3274 2.4165 10.3268C2.09598 10.3218 1.77774 10.3805 1.48091 10.4992C1.18407 10.6179 0.914746 10.7943 0.689116 11.0177C0.463486 11.2411 0.286201 11.5069 0.167908 11.7992C0.0496149 12.0915 -0.00724651 12.4042 0.000738184 12.7186C0.114789 15.972 1.49612 19.0588 3.86027 21.3431C6.22441 23.6274 9.39139 24.9353 12.709 24.9977C16.0266 25.06 19.2423 23.8719 21.6939 21.678C24.1454 19.4842 25.6462 16.4516 25.8871 13.2048C25.9417 13.0487 25.9626 12.8831 25.9486 12.7186C25.9486 10.6078 26.8033 8.58341 28.3247 7.09083C29.8461 5.59826 31.9095 4.75974 34.0611 4.75974C36.2127 4.75974 38.2761 5.59826 39.7975 7.09083C41.3189 8.58341 42.1736 10.6078 42.1736 12.7186C42.1562 13.0399 42.2056 13.3613 42.3189 13.6632C42.4322 13.9651 42.607 14.2412 42.8327 14.4747C43.0583 14.7082 43.3301 14.8941 43.6313 15.0212C43.9326 15.1482 44.2571 15.2138 44.5851 15.2138C44.913 15.2138 45.2375 15.1482 45.5388 15.0212C45.8401 14.8941 46.1119 14.7082 46.3375 14.4747C46.5632 14.2412 46.738 13.9651 46.8513 13.6632C46.9646 13.3613 47.014 13.0399 46.9966 12.7186C46.99 9.34216 45.6178 6.10632 43.1814 3.72165C40.7449 1.33699 37.4433 -0.00153433 34.0017 2.67521e-05Z\"\r\n fill=\"#E42313\" />\r\n <path\r\n d=\"M10.5943 6.75042C10.5937 7.32697 10.4188 7.89037 10.0918 8.36943C9.76482 8.84848 9.30041 9.22168 8.75728 9.44185C8.21414 9.66203 7.61667 9.71929 7.04037 9.60641C6.46407 9.49352 5.93482 9.21556 5.51951 8.80765C5.1042 8.39974 4.82148 7.88019 4.70708 7.31468C4.59268 6.74917 4.65174 6.16307 4.87678 5.63048C5.10183 5.09789 5.48277 4.64271 5.97145 4.32247C6.46013 4.00222 7.03461 3.8313 7.62228 3.8313C8.40773 3.84195 9.15792 4.15302 9.71305 4.69826C10.2682 5.24351 10.5844 5.97984 10.5943 6.75042Z\"\r\n fill=\"#E42313\" />\r\n <path\r\n d=\"M19.3841 6.75044C19.3841 7.52375 19.0709 8.26539 18.5136 8.8122C17.9562 9.35901 17.2003 9.66621 16.412 9.66621C15.6238 9.66621 14.8678 9.35901 14.3104 8.8122C13.7531 8.26539 13.44 7.52375 13.44 6.75044C13.4347 6.36594 13.5079 5.9843 13.6554 5.62802C13.8028 5.27174 14.0215 4.94802 14.2985 4.67596C14.5755 4.4039 14.9052 4.18901 15.2682 4.04394C15.6312 3.89888 16.0201 3.82658 16.412 3.83132C17.1975 3.84196 17.9476 4.15303 18.5028 4.69828C19.0579 5.24352 19.3741 5.97985 19.3841 6.75044Z\"\r\n fill=\"#E42313\" />\r\n </svg>\r\n </div>\r\n\r\n <div class=\"app-bar__actions\">\r\n @for (action of trailingActions(); track trackByAction($index, action)) {\r\n <button type=\"button\" class=\"app-bar__icon-button app-bar__icon-button--trailing\" (click)=\"onActionClick(action)\"\r\n [attr.aria-label]=\"action.ariaLabel\">\r\n @if (actionIconUrl(action); as actionIconSrc) {\r\n <img class=\"app-bar__icon\" [src]=\"actionIconSrc\" alt=\"\" aria-hidden=\"true\" />\r\n }\r\n </button>\r\n }\r\n </div>\r\n</header>", styles: [":host{display:block;width:100%;--bars-common-app-bar-brand-width: 47;--bars-common-app-bar-brand-height: 25}.app-bar{display:grid;grid-template-columns:auto 1fr auto;align-items:center;width:100%;flex-shrink:0;align-self:stretch;height:calc(var(--bars-size-small-app-bar-small-container-height, 64) * 1px);padding:.5rem calc(var(--bars-common-app-bar-right-padding, 4) * 1px) .5rem calc(var(--bars-common-app-bar-left-padding, 4) * 1px);background-color:var(--bars-common-app-bar-container-color, #ebeef0);border-radius:calc(var(--bars-common-app-bar-container-shape, 0) * 1px);box-sizing:border-box;column-gap:calc(var(--bars-common-app-bar-icon-spacing, 0) * 1px)}.app-bar__leading,.app-bar__actions{display:flex;align-items:center}.app-bar__leading{justify-self:start;width:calc(var(--bars-common-app-bar-icon-touch-target-size, 48) * 1px)}.app-bar__actions{justify-self:end;justify-content:flex-end;gap:calc(var(--bars-common-app-bar-icon-spacing, 0) * 1px);min-width:calc(var(--bars-common-app-bar-icon-touch-target-size, 48) * 1px)}.app-bar__actions:empty{min-width:0}.app-bar__brand{justify-self:center;position:relative;width:calc(var(--bars-common-app-bar-brand-width, 47) * 1px);height:calc(var(--bars-common-app-bar-brand-height, 25) * 1px);aspect-ratio:47 / 25;display:flex;align-items:center;justify-content:center;pointer-events:none;color:var(--bars-common-app-bar-central-icon, #e42313)}.app-bar__brand-icon{width:100%;height:100%;aspect-ratio:47 / 25;display:block;object-fit:contain}.app-bar__brand-icon use{width:100%!important;height:100%!important}.app-bar__brand-dot{position:absolute;width:6px;height:6px;border-radius:50%}.app-bar__brand-dot--primary{top:6px;left:6px}.app-bar__brand-dot--secondary{top:3px;left:16px}.app-bar__brand-dot--tertiary{top:8px;left:26px}.app-bar__brand-curve{position:absolute;bottom:0;right:0;width:32px;height:18px;border-bottom:4px solid var(--bars-common-app-bar-central-icon, #e42313);border-right:4px solid var(--bars-common-app-bar-central-icon, #e42313);border-left:0;border-top:0;border-radius:0 0 24px 24px}.app-bar__icon-button{display:flex;align-items:center;justify-content:center;width:48px;height:48px;flex:0 0 auto;border:0;border-radius:calc(var(--icon-buttons-size-small-icon-button-small-container-shape-round, 1000) * 1px);background:transparent;color:var(--bars-common-app-bar-leading-icon, #181c1e);cursor:pointer;transition:background-color .15s ease,color .15s ease}.app-bar__icon-button--trailing{color:var(--bars-common-app-bar-trailing-icon, #434749)}.app-bar__icon-button:hover,.app-bar__icon-button:focus-visible{background-color:#00000014}.app-bar__icon-button:focus-visible{outline:2px solid rgba(0,0,0,.24);outline-offset:2px}.app-bar__icon{font-size:calc(var(--bars-common-app-bar-icon-size, 24) * 1px);width:1em;height:1em;line-height:1;display:block;object-fit:contain}\n"] }]
|
|
443
|
+
}], propDecorators: { showLeading: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLeading", required: false }] }], leadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "leadingIcon", required: false }] }], leadingIconPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "leadingIconPath", required: false }] }], leadingActionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "leadingActionLabel", required: false }] }], brandLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandLabel", required: false }] }], brandIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandIcon", required: false }] }], brandIconPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandIconPath", required: false }] }], trailingActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "trailingActions", required: false }] }], iconBasePath: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconBasePath", required: false }] }], leadingClick: [{
|
|
444
|
+
type: Output
|
|
445
|
+
}], actionClick: [{
|
|
446
|
+
type: Output
|
|
447
|
+
}] } });
|
|
448
|
+
const KNOWN_UI_ICON_NAMES = new Set(UI_ICON_NAMES);
|
|
449
|
+
|
|
450
|
+
class LibTextFieldComponent {
|
|
451
|
+
disabledAppliedByInput = false;
|
|
452
|
+
label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
453
|
+
control = input.required(...(ngDevMode ? [{ debugName: "control" }] : []));
|
|
454
|
+
appearance = input('outline', ...(ngDevMode ? [{ debugName: "appearance" }] : []));
|
|
455
|
+
/**
|
|
456
|
+
* @deprecated Use `appearance`. Kept for compatibility.
|
|
457
|
+
*/
|
|
458
|
+
apperance = input(null, ...(ngDevMode ? [{ debugName: "apperance" }] : []));
|
|
459
|
+
suffixIcon = input('', ...(ngDevMode ? [{ debugName: "suffixIcon" }] : []));
|
|
460
|
+
suffixTextIcon = input('', ...(ngDevMode ? [{ debugName: "suffixTextIcon" }] : []));
|
|
461
|
+
prefixIcon = input('', ...(ngDevMode ? [{ debugName: "prefixIcon" }] : []));
|
|
462
|
+
prefixIconSrc = input('', ...(ngDevMode ? [{ debugName: "prefixIconSrc" }] : []));
|
|
463
|
+
/**
|
|
464
|
+
* @deprecated Use `prefixIcon`. Kept for compatibility.
|
|
465
|
+
*/
|
|
466
|
+
preffixIcon = input(null, ...(ngDevMode ? [{ debugName: "preffixIcon" }] : []));
|
|
467
|
+
error = input(null, ...(ngDevMode ? [{ debugName: "error" }] : []));
|
|
468
|
+
errorState = input(null, ...(ngDevMode ? [{ debugName: "errorState" }] : []));
|
|
469
|
+
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : []));
|
|
470
|
+
suffixEvent = output();
|
|
471
|
+
showSuffix = input(false, { ...(ngDevMode ? { debugName: "showSuffix" } : {}), transform: coerceBooleanProperty });
|
|
472
|
+
suffixIconBand = input(false, { ...(ngDevMode ? { debugName: "suffixIconBand" } : {}), transform: coerceBooleanProperty });
|
|
473
|
+
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
474
|
+
autocomplete = input('off', ...(ngDevMode ? [{ debugName: "autocomplete" }] : []));
|
|
475
|
+
fullWidth = input(false, { ...(ngDevMode ? { debugName: "fullWidth" } : {}), transform: coerceBooleanProperty });
|
|
476
|
+
width = input(null, { ...(ngDevMode ? { debugName: "width" } : {}), transform: (value) => {
|
|
477
|
+
if (value == null || value === '') {
|
|
478
|
+
return null;
|
|
479
|
+
}
|
|
480
|
+
return typeof value === 'number' ? `${value}px` : String(value);
|
|
481
|
+
} });
|
|
482
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: coerceBooleanProperty });
|
|
483
|
+
type = input('text', ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
484
|
+
hideRequiredMarker = input(false, { ...(ngDevMode ? { debugName: "hideRequiredMarker" } : {}), transform: coerceBooleanProperty });
|
|
485
|
+
resolvedAppearance = computed(() => {
|
|
486
|
+
const raw = this.apperance() ?? this.appearance();
|
|
487
|
+
if (raw === 'outlined')
|
|
488
|
+
return 'outline';
|
|
489
|
+
if (raw === 'filled')
|
|
490
|
+
return 'fill';
|
|
491
|
+
return raw;
|
|
492
|
+
}, ...(ngDevMode ? [{ debugName: "resolvedAppearance" }] : []));
|
|
493
|
+
resolvedPrefixIcon = computed(() => this.preffixIcon() ?? this.prefixIcon(), ...(ngDevMode ? [{ debugName: "resolvedPrefixIcon" }] : []));
|
|
494
|
+
widthStyle = computed(() => (this.fullWidth() ? '100%' : this.width()), ...(ngDevMode ? [{ debugName: "widthStyle" }] : []));
|
|
495
|
+
shouldShowSuffix = computed(() => this.showSuffix() || (this.suffixIconBand() && (!!this.suffixIcon() || !!this.suffixTextIcon())), ...(ngDevMode ? [{ debugName: "shouldShowSuffix" }] : []));
|
|
496
|
+
shouldShowError = computed(() => {
|
|
497
|
+
const forcedError = this.errorState();
|
|
498
|
+
if (forcedError !== null) {
|
|
499
|
+
return forcedError;
|
|
500
|
+
}
|
|
501
|
+
const control = this.control();
|
|
502
|
+
return control.invalid && (control.dirty || control.touched);
|
|
503
|
+
}, ...(ngDevMode ? [{ debugName: "shouldShowError" }] : []));
|
|
504
|
+
constructor() {
|
|
505
|
+
effect(() => {
|
|
506
|
+
const control = this.control();
|
|
507
|
+
const shouldDisable = this.disabled();
|
|
508
|
+
if (shouldDisable) {
|
|
509
|
+
if (control.enabled) {
|
|
510
|
+
control.disable({ emitEvent: false });
|
|
511
|
+
}
|
|
512
|
+
this.disabledAppliedByInput = true;
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
if (this.disabledAppliedByInput && control.disabled) {
|
|
516
|
+
control.enable({ emitEvent: false });
|
|
517
|
+
}
|
|
518
|
+
this.disabledAppliedByInput = false;
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
pressSuffixEvent() {
|
|
522
|
+
this.suffixEvent.emit();
|
|
523
|
+
}
|
|
524
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibTextFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
525
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: LibTextFieldComponent, isStandalone: true, selector: "lib-text-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, apperance: { classPropertyName: "apperance", publicName: "apperance", isSignal: true, isRequired: false, transformFunction: null }, suffixIcon: { classPropertyName: "suffixIcon", publicName: "suffixIcon", isSignal: true, isRequired: false, transformFunction: null }, suffixTextIcon: { classPropertyName: "suffixTextIcon", publicName: "suffixTextIcon", isSignal: true, isRequired: false, transformFunction: null }, prefixIcon: { classPropertyName: "prefixIcon", publicName: "prefixIcon", isSignal: true, isRequired: false, transformFunction: null }, prefixIconSrc: { classPropertyName: "prefixIconSrc", publicName: "prefixIconSrc", isSignal: true, isRequired: false, transformFunction: null }, preffixIcon: { classPropertyName: "preffixIcon", publicName: "preffixIcon", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, errorState: { classPropertyName: "errorState", publicName: "errorState", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, showSuffix: { classPropertyName: "showSuffix", publicName: "showSuffix", isSignal: true, isRequired: false, transformFunction: null }, suffixIconBand: { classPropertyName: "suffixIconBand", publicName: "suffixIconBand", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, hideRequiredMarker: { classPropertyName: "hideRequiredMarker", publicName: "hideRequiredMarker", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { suffixEvent: "suffixEvent" }, ngImport: i0, template: "<mat-form-field [appearance]=\"resolvedAppearance()\" [style.width]=\"widthStyle() ?? null\" [hideRequiredMarker]=\"hideRequiredMarker()\">\r\n @if(prefixIconSrc()){\r\n <mat-icon\r\n matPrefix\r\n class=\"lib-text-field__prefix-image\"\r\n [svgIcon]=\"prefixIconSrc()\"\r\n (click)=\"pressSuffixEvent()\"\r\n >\r\n {{ prefixIconSrc() }}\r\n </mat-icon>\r\n } @else if(resolvedPrefixIcon()){\r\n <mat-icon matPrefix>\r\n {{ resolvedPrefixIcon() }}\r\n </mat-icon>\r\n }\r\n\r\n <mat-label>{{ label() }}</mat-label>\r\n <input matInput [type]=\"type()\" [formControl]=\"control()\" [placeholder]=\"placeholder()\" [attr.autocomplete]=\"autocomplete()\" />\r\n\r\n @if(shouldShowError() && error()) {\r\n <mat-error>{{ error() }}</mat-error>\r\n }\r\n\r\n @if(hint()) {\r\n <mat-hint>{{ hint() }}</mat-hint>\r\n }\r\n\r\n @if(shouldShowSuffix()) {\r\n <mat-icon\r\n matSuffix\r\n class=\"lib-text-field__icon lib-text-field__icon--suffix\"\r\n [svgIcon]=\"suffixIcon()\"\r\n (click)=\"pressSuffixEvent()\"\r\n >\r\n {{ suffixTextIcon() }}\r\n </mat-icon>\r\n }\r\n</mat-form-field>\r\n", styles: [":host{display:block}.lib-text-field__field{width:100%}.lib-text-field__prefix-image{width:24px;height:24px;font-size:24px;overflow:visible}.lib-text-field__prefix-image svg{width:24px;height:24px}:host[data-state=error] ::ng-deep .mat-mdc-form-field,:host[data-state=error-hover] ::ng-deep .mat-mdc-form-field,:host[data-state=error-focus] ::ng-deep .mat-mdc-form-field{--mdc-outlined-text-field-outline-color: var(--text-fields-outlined-error-outline-outlined-text-field-error-outline-color, #ba1a1a);--mdc-outlined-text-field-hover-outline-color: var(--text-fields-outlined-error-hover-outlined-text-field-error-hover-outline-color, #ba1a1a);--mdc-outlined-text-field-focus-outline-color: var(--text-fields-outlined-error-focus-outlined-text-field-error-focus-outline-color, #ba1a1a);--mdc-outlined-text-field-label-text-color: var(--text-fields-outlined-error-outline-outlined-text-field-error-outline-color, #ba1a1a);--mdc-filled-text-field-active-indicator-color: var(--text-fields-outlined-error-outline-outlined-text-field-error-outline-color, #ba1a1a);--mdc-filled-text-field-focus-active-indicator-color: var(--text-fields-outlined-error-focus-outlined-text-field-error-focus-outline-color, #ba1a1a);--mdc-filled-text-field-label-text-color: var(--text-fields-outlined-error-outline-outlined-text-field-error-outline-color, #ba1a1a)}.lib-text-field__field textarea.mat-mdc-input-element{resize:none}:host ::ng-deep input[type=password]::-ms-reveal,:host ::ng-deep input[type=password]::-ms-clear{display:none}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i1$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
526
|
+
}
|
|
527
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibTextFieldComponent, decorators: [{
|
|
528
|
+
type: Component,
|
|
529
|
+
args: [{ selector: 'lib-text-field', standalone: true, imports: [MatFormFieldModule, MatInputModule, ReactiveFormsModule, MatIconModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-form-field [appearance]=\"resolvedAppearance()\" [style.width]=\"widthStyle() ?? null\" [hideRequiredMarker]=\"hideRequiredMarker()\">\r\n @if(prefixIconSrc()){\r\n <mat-icon\r\n matPrefix\r\n class=\"lib-text-field__prefix-image\"\r\n [svgIcon]=\"prefixIconSrc()\"\r\n (click)=\"pressSuffixEvent()\"\r\n >\r\n {{ prefixIconSrc() }}\r\n </mat-icon>\r\n } @else if(resolvedPrefixIcon()){\r\n <mat-icon matPrefix>\r\n {{ resolvedPrefixIcon() }}\r\n </mat-icon>\r\n }\r\n\r\n <mat-label>{{ label() }}</mat-label>\r\n <input matInput [type]=\"type()\" [formControl]=\"control()\" [placeholder]=\"placeholder()\" [attr.autocomplete]=\"autocomplete()\" />\r\n\r\n @if(shouldShowError() && error()) {\r\n <mat-error>{{ error() }}</mat-error>\r\n }\r\n\r\n @if(hint()) {\r\n <mat-hint>{{ hint() }}</mat-hint>\r\n }\r\n\r\n @if(shouldShowSuffix()) {\r\n <mat-icon\r\n matSuffix\r\n class=\"lib-text-field__icon lib-text-field__icon--suffix\"\r\n [svgIcon]=\"suffixIcon()\"\r\n (click)=\"pressSuffixEvent()\"\r\n >\r\n {{ suffixTextIcon() }}\r\n </mat-icon>\r\n }\r\n</mat-form-field>\r\n", styles: [":host{display:block}.lib-text-field__field{width:100%}.lib-text-field__prefix-image{width:24px;height:24px;font-size:24px;overflow:visible}.lib-text-field__prefix-image svg{width:24px;height:24px}:host[data-state=error] ::ng-deep .mat-mdc-form-field,:host[data-state=error-hover] ::ng-deep .mat-mdc-form-field,:host[data-state=error-focus] ::ng-deep .mat-mdc-form-field{--mdc-outlined-text-field-outline-color: var(--text-fields-outlined-error-outline-outlined-text-field-error-outline-color, #ba1a1a);--mdc-outlined-text-field-hover-outline-color: var(--text-fields-outlined-error-hover-outlined-text-field-error-hover-outline-color, #ba1a1a);--mdc-outlined-text-field-focus-outline-color: var(--text-fields-outlined-error-focus-outlined-text-field-error-focus-outline-color, #ba1a1a);--mdc-outlined-text-field-label-text-color: var(--text-fields-outlined-error-outline-outlined-text-field-error-outline-color, #ba1a1a);--mdc-filled-text-field-active-indicator-color: var(--text-fields-outlined-error-outline-outlined-text-field-error-outline-color, #ba1a1a);--mdc-filled-text-field-focus-active-indicator-color: var(--text-fields-outlined-error-focus-outlined-text-field-error-focus-outline-color, #ba1a1a);--mdc-filled-text-field-label-text-color: var(--text-fields-outlined-error-outline-outlined-text-field-error-outline-color, #ba1a1a)}.lib-text-field__field textarea.mat-mdc-input-element{resize:none}:host ::ng-deep input[type=password]::-ms-reveal,:host ::ng-deep input[type=password]::-ms-clear{display:none}\n"] }]
|
|
530
|
+
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], apperance: [{ type: i0.Input, args: [{ isSignal: true, alias: "apperance", required: false }] }], suffixIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffixIcon", required: false }] }], suffixTextIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffixTextIcon", required: false }] }], prefixIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefixIcon", required: false }] }], prefixIconSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefixIconSrc", required: false }] }], preffixIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "preffixIcon", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], errorState: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorState", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], suffixEvent: [{ type: i0.Output, args: ["suffixEvent"] }], showSuffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSuffix", required: false }] }], suffixIconBand: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffixIconBand", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], hideRequiredMarker: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideRequiredMarker", required: false }] }] } });
|
|
531
|
+
|
|
532
|
+
class LibCheckboxComponent {
|
|
533
|
+
checked = input(false, ...(ngDevMode ? [{ debugName: "checked" }] : []));
|
|
534
|
+
indeterminate = input(false, ...(ngDevMode ? [{ debugName: "indeterminate" }] : []));
|
|
535
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
536
|
+
error = input(false, ...(ngDevMode ? [{ debugName: "error" }] : []));
|
|
537
|
+
/** Id para asociar label (accesibilidad). Si no se pasa, se genera uno interno. */
|
|
538
|
+
labelId = input(null, ...(ngDevMode ? [{ debugName: "labelId" }] : []));
|
|
539
|
+
checkedChange = output();
|
|
540
|
+
indeterminateChange = output();
|
|
541
|
+
get ariaDisabled() {
|
|
542
|
+
return this.disabled() ? true : null;
|
|
543
|
+
}
|
|
544
|
+
ariaChecked = computed(() => {
|
|
545
|
+
if (this.indeterminate())
|
|
546
|
+
return 'mixed';
|
|
547
|
+
return this.checked() ? 'true' : 'false';
|
|
548
|
+
}, ...(ngDevMode ? [{ debugName: "ariaChecked" }] : []));
|
|
549
|
+
onAction(event) {
|
|
550
|
+
event.preventDefault();
|
|
551
|
+
if (this.disabled())
|
|
552
|
+
return;
|
|
553
|
+
if (this.indeterminate()) {
|
|
554
|
+
this.indeterminateChange.emit(false);
|
|
555
|
+
this.checkedChange.emit(true);
|
|
556
|
+
}
|
|
557
|
+
else {
|
|
558
|
+
this.checkedChange.emit(!this.checked());
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
onKeydown(event) {
|
|
562
|
+
if (event.key === ' ' || event.key === 'Enter') {
|
|
563
|
+
event.preventDefault();
|
|
564
|
+
this.onAction(event);
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
onMatCheckboxChange(event) {
|
|
568
|
+
this.checkedChange.emit(event.checked);
|
|
569
|
+
if (event.checked && this.indeterminate()) {
|
|
570
|
+
this.indeterminateChange.emit(false);
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
574
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.9", type: LibCheckboxComponent, isStandalone: true, selector: "lib-checkbox", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, labelId: { classPropertyName: "labelId", publicName: "labelId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkedChange: "checkedChange", indeterminateChange: "indeterminateChange" }, host: { properties: { "attr.aria-disabled": "this.ariaDisabled" } }, ngImport: i0, template: "<div\r\n class=\"lib-checkbox__wrapper\"\r\n [class.lib-checkbox--disabled]=\"disabled()\"\r\n>\r\n <mat-checkbox\r\n [checked]=\"checked()\"\r\n [indeterminate]=\"indeterminate()\"\r\n [disabled]=\"disabled()\"\r\n (change)=\"onMatCheckboxChange($event)\"\r\n >\r\n <ng-content />\r\n </mat-checkbox>\r\n</div>\r\n", styles: [".lib-checkbox__wrapper{position:relative;display:inline-flex}.lib-checkbox__wrapper .mat-mdc-checkbox{position:relative;z-index:1}\n"], dependencies: [{ kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i1$2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
575
|
+
}
|
|
576
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibCheckboxComponent, decorators: [{
|
|
577
|
+
type: Component,
|
|
578
|
+
args: [{ selector: 'lib-checkbox', standalone: true, imports: [MatCheckboxModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"lib-checkbox__wrapper\"\r\n [class.lib-checkbox--disabled]=\"disabled()\"\r\n>\r\n <mat-checkbox\r\n [checked]=\"checked()\"\r\n [indeterminate]=\"indeterminate()\"\r\n [disabled]=\"disabled()\"\r\n (change)=\"onMatCheckboxChange($event)\"\r\n >\r\n <ng-content />\r\n </mat-checkbox>\r\n</div>\r\n", styles: [".lib-checkbox__wrapper{position:relative;display:inline-flex}.lib-checkbox__wrapper .mat-mdc-checkbox{position:relative;z-index:1}\n"] }]
|
|
579
|
+
}], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], labelId: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelId", required: false }] }], checkedChange: [{ type: i0.Output, args: ["checkedChange"] }], indeterminateChange: [{ type: i0.Output, args: ["indeterminateChange"] }], ariaDisabled: [{
|
|
580
|
+
type: HostBinding,
|
|
581
|
+
args: ['attr.aria-disabled']
|
|
582
|
+
}] } });
|
|
583
|
+
|
|
584
|
+
class LibSelectFieldComponent {
|
|
585
|
+
static PANEL_CONTENT_HEIGHT = 240;
|
|
586
|
+
static FILTER_ROW_HEIGHT = 48;
|
|
587
|
+
static OPTION_ROW_HEIGHT = 48;
|
|
588
|
+
cdr = inject(ChangeDetectorRef);
|
|
589
|
+
destroyRef = inject(DestroyRef);
|
|
590
|
+
injector = inject(Injector);
|
|
591
|
+
ngControl = null;
|
|
592
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
593
|
+
appearance = input('outline', ...(ngDevMode ? [{ debugName: "appearance" }] : []));
|
|
594
|
+
placeholder = input('Elegir opción', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
595
|
+
options = input([], ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
596
|
+
mode = input('single', ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
597
|
+
filterable = input(true, { ...(ngDevMode ? { debugName: "filterable" } : {}), transform: coerceBooleanProperty });
|
|
598
|
+
filterPlaceholder = input('Buscar...', ...(ngDevMode ? [{ debugName: "filterPlaceholder" }] : []));
|
|
599
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: coerceBooleanProperty });
|
|
600
|
+
required = input(false, { ...(ngDevMode ? { debugName: "required" } : {}), transform: coerceBooleanProperty });
|
|
601
|
+
width = input(null, ...(ngDevMode ? [{ debugName: "width" }] : []));
|
|
602
|
+
selectAllLabel = input('Seleccionar todos', ...(ngDevMode ? [{ debugName: "selectAllLabel" }] : []));
|
|
603
|
+
widthStyle = computed(() => {
|
|
604
|
+
const v = this.width();
|
|
605
|
+
return v == null || v === '' ? null : typeof v === 'number' ? `${v}px` : String(v);
|
|
606
|
+
}, ...(ngDevMode ? [{ debugName: "widthStyle" }] : []));
|
|
607
|
+
matAppearance = computed(() => this.appearance() === 'filled' ? 'fill' : 'outline', ...(ngDevMode ? [{ debugName: "matAppearance" }] : []));
|
|
608
|
+
valueChange = output();
|
|
609
|
+
panelOpen = signal(false, ...(ngDevMode ? [{ debugName: "panelOpen" }] : []));
|
|
610
|
+
filterTerm = signal('', ...(ngDevMode ? [{ debugName: "filterTerm" }] : []));
|
|
611
|
+
disabledByControl = signal(false, ...(ngDevMode ? [{ debugName: "disabledByControl" }] : []));
|
|
612
|
+
isMultiple = computed(() => this.mode() === 'multiple', ...(ngDevMode ? [{ debugName: "isMultiple" }] : []));
|
|
613
|
+
virtualViewportMaxHeight = computed(() => this.filterable()
|
|
614
|
+
? LibSelectFieldComponent.PANEL_CONTENT_HEIGHT - LibSelectFieldComponent.FILTER_ROW_HEIGHT
|
|
615
|
+
: LibSelectFieldComponent.PANEL_CONTENT_HEIGHT, ...(ngDevMode ? [{ debugName: "virtualViewportMaxHeight" }] : []));
|
|
616
|
+
filteredOptions = computed(() => {
|
|
617
|
+
const opts = this.options();
|
|
618
|
+
const term = this.filterTerm().trim().toLowerCase();
|
|
619
|
+
if (!term)
|
|
620
|
+
return opts;
|
|
621
|
+
return opts.filter((o) => o.label.toLowerCase().includes(term));
|
|
622
|
+
}, ...(ngDevMode ? [{ debugName: "filteredOptions" }] : []));
|
|
623
|
+
virtualRows = computed(() => {
|
|
624
|
+
const rows = this.filteredOptions().map((option) => ({
|
|
625
|
+
kind: 'option',
|
|
626
|
+
option,
|
|
627
|
+
}));
|
|
628
|
+
if (this.isMultiple()) {
|
|
629
|
+
rows.unshift({ kind: 'selectAll' });
|
|
630
|
+
}
|
|
631
|
+
return rows;
|
|
632
|
+
}, ...(ngDevMode ? [{ debugName: "virtualRows" }] : []));
|
|
633
|
+
virtualViewportHeight = computed(() => {
|
|
634
|
+
const rowsCount = this.virtualRows().length;
|
|
635
|
+
const contentHeight = rowsCount * LibSelectFieldComponent.OPTION_ROW_HEIGHT;
|
|
636
|
+
const maxHeight = this.virtualViewportMaxHeight();
|
|
637
|
+
const minHeight = rowsCount > 0 ? LibSelectFieldComponent.OPTION_ROW_HEIGHT : 0;
|
|
638
|
+
return Math.max(minHeight, Math.min(contentHeight, maxHeight));
|
|
639
|
+
}, ...(ngDevMode ? [{ debugName: "virtualViewportHeight" }] : []));
|
|
640
|
+
allSelected = computed(() => {
|
|
641
|
+
if (!this.isMultiple()) {
|
|
642
|
+
return false;
|
|
643
|
+
}
|
|
644
|
+
const opts = this.options();
|
|
645
|
+
const current = this.value();
|
|
646
|
+
if (!Array.isArray(current) || !opts.length) {
|
|
647
|
+
return false;
|
|
648
|
+
}
|
|
649
|
+
const values = opts.map((o) => o.value);
|
|
650
|
+
return values.every((v) => current.includes(v));
|
|
651
|
+
}, ...(ngDevMode ? [{ debugName: "allSelected" }] : []));
|
|
652
|
+
selectedLabels = computed(() => {
|
|
653
|
+
const current = this.value();
|
|
654
|
+
if (!Array.isArray(current) || !current.length) {
|
|
655
|
+
return [];
|
|
656
|
+
}
|
|
657
|
+
const selectedSet = new Set(current);
|
|
658
|
+
return this.options()
|
|
659
|
+
.filter((o) => selectedSet.has(o.value))
|
|
660
|
+
.map((o) => o.label);
|
|
661
|
+
}, ...(ngDevMode ? [{ debugName: "selectedLabels" }] : []));
|
|
662
|
+
multiTriggerLabel = computed(() => {
|
|
663
|
+
const labels = this.selectedLabels();
|
|
664
|
+
if (!labels.length) {
|
|
665
|
+
return '';
|
|
666
|
+
}
|
|
667
|
+
if (labels.length === 1) {
|
|
668
|
+
return labels[0];
|
|
669
|
+
}
|
|
670
|
+
return `${labels[0]} (+${labels.length - 1} items)`;
|
|
671
|
+
}, ...(ngDevMode ? [{ debugName: "multiTriggerLabel" }] : []));
|
|
672
|
+
selectAllIndeterminate = computed(() => {
|
|
673
|
+
if (!this.isMultiple()) {
|
|
674
|
+
return false;
|
|
675
|
+
}
|
|
676
|
+
const opts = this.options();
|
|
677
|
+
const current = this.value();
|
|
678
|
+
if (!Array.isArray(current) || !opts.length) {
|
|
679
|
+
return false;
|
|
680
|
+
}
|
|
681
|
+
const selectedCount = opts.filter((o) => current.includes(o.value)).length;
|
|
682
|
+
return selectedCount > 0 && selectedCount < opts.length;
|
|
683
|
+
}, ...(ngDevMode ? [{ debugName: "selectAllIndeterminate" }] : []));
|
|
684
|
+
value = signal(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
685
|
+
onChange = () => {
|
|
686
|
+
/* assigned by registerOnChange */
|
|
687
|
+
};
|
|
688
|
+
onTouched = () => {
|
|
689
|
+
/* assigned by registerOnTouched */
|
|
690
|
+
};
|
|
691
|
+
ngOnInit() {
|
|
692
|
+
this.ngControl = this.injector.get(NgControl, null);
|
|
693
|
+
if (this.ngControl) {
|
|
694
|
+
this.ngControl.valueAccessor = this;
|
|
695
|
+
}
|
|
696
|
+
if (this.ngControl?.valueChanges) {
|
|
697
|
+
this.ngControl.valueChanges
|
|
698
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
699
|
+
.subscribe(() => this.cdr.markForCheck());
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
onPanelOpenChange(open) {
|
|
703
|
+
this.panelOpen.set(open);
|
|
704
|
+
if (!open)
|
|
705
|
+
this.filterTerm.set('');
|
|
706
|
+
this.cdr.markForCheck();
|
|
707
|
+
}
|
|
708
|
+
onFilterInput(event) {
|
|
709
|
+
const el = event.target;
|
|
710
|
+
this.filterTerm.set(el?.value ?? '');
|
|
711
|
+
}
|
|
712
|
+
onFilterKeydown(event) {
|
|
713
|
+
event.stopPropagation();
|
|
714
|
+
}
|
|
715
|
+
onSelectionChange(change) {
|
|
716
|
+
if (this.isMultiple()) {
|
|
717
|
+
const incoming = Array.isArray(change.value) ? change.value : [];
|
|
718
|
+
const options = this.options().map((o) => o.value);
|
|
719
|
+
const optionSet = new Set(options);
|
|
720
|
+
const hasUnknownValues = incoming.some((v) => !optionSet.has(v));
|
|
721
|
+
// Ignore synthetic values emitted by the auxiliary "select all" option.
|
|
722
|
+
if (hasUnknownValues) {
|
|
723
|
+
this.cdr.markForCheck();
|
|
724
|
+
return;
|
|
725
|
+
}
|
|
726
|
+
const incomingSet = new Set(incoming);
|
|
727
|
+
const normalized = options.filter((v) => incomingSet.has(v));
|
|
728
|
+
this.value.set(normalized);
|
|
729
|
+
this.onChange(normalized);
|
|
730
|
+
this.valueChange.emit(normalized);
|
|
731
|
+
this.cdr.markForCheck();
|
|
732
|
+
return;
|
|
733
|
+
}
|
|
734
|
+
this.value.set(change.value);
|
|
735
|
+
this.onChange(change.value);
|
|
736
|
+
this.valueChange.emit(change.value);
|
|
737
|
+
this.cdr.markForCheck();
|
|
738
|
+
}
|
|
739
|
+
onToggleSelectAll(checked) {
|
|
740
|
+
if (!this.isMultiple()) {
|
|
741
|
+
return;
|
|
742
|
+
}
|
|
743
|
+
const options = this.options();
|
|
744
|
+
const currentValue = this.value();
|
|
745
|
+
const current = Array.isArray(currentValue) ? [...currentValue] : [];
|
|
746
|
+
if (checked) {
|
|
747
|
+
const toAdd = options.map((o) => o.value);
|
|
748
|
+
const set = new Set(current);
|
|
749
|
+
for (const v of toAdd) {
|
|
750
|
+
set.add(v);
|
|
751
|
+
}
|
|
752
|
+
this.value.set(Array.from(set));
|
|
753
|
+
}
|
|
754
|
+
else {
|
|
755
|
+
const toRemove = new Set(options.map((o) => o.value));
|
|
756
|
+
this.value.set(current.filter((v) => !toRemove.has(v)));
|
|
757
|
+
}
|
|
758
|
+
const updated = this.value();
|
|
759
|
+
this.onChange(updated);
|
|
760
|
+
this.valueChange.emit(updated);
|
|
761
|
+
this.cdr.markForCheck();
|
|
762
|
+
}
|
|
763
|
+
onSelectAllCheckedChange(checked) {
|
|
764
|
+
this.onToggleSelectAll(checked);
|
|
765
|
+
}
|
|
766
|
+
onOptionCheckedChange(value, checked) {
|
|
767
|
+
if (!this.isMultiple()) {
|
|
768
|
+
return;
|
|
769
|
+
}
|
|
770
|
+
const currentValue = this.value();
|
|
771
|
+
const current = Array.isArray(currentValue) ? [...currentValue] : [];
|
|
772
|
+
const set = new Set(current);
|
|
773
|
+
if (checked) {
|
|
774
|
+
set.add(value);
|
|
775
|
+
}
|
|
776
|
+
else {
|
|
777
|
+
set.delete(value);
|
|
778
|
+
}
|
|
779
|
+
this.value.set(Array.from(set));
|
|
780
|
+
const updated = this.value();
|
|
781
|
+
this.onChange(updated);
|
|
782
|
+
this.valueChange.emit(updated);
|
|
783
|
+
this.cdr.markForCheck();
|
|
784
|
+
}
|
|
785
|
+
writeValue(value) {
|
|
786
|
+
this.value.set(value);
|
|
787
|
+
this.cdr.markForCheck();
|
|
788
|
+
}
|
|
789
|
+
registerOnChange(fn) {
|
|
790
|
+
this.onChange = fn;
|
|
791
|
+
}
|
|
792
|
+
registerOnTouched(fn) {
|
|
793
|
+
this.onTouched = fn;
|
|
794
|
+
}
|
|
795
|
+
setDisabledState(isDisabled) {
|
|
796
|
+
this.disabledByControl.set(isDisabled);
|
|
797
|
+
this.cdr.markForCheck();
|
|
798
|
+
}
|
|
799
|
+
get displayValue() {
|
|
800
|
+
return this.value();
|
|
801
|
+
}
|
|
802
|
+
toggledAllSelection() {
|
|
803
|
+
if (this.allSelected()) {
|
|
804
|
+
this.onToggleSelectAll(false);
|
|
805
|
+
return;
|
|
806
|
+
}
|
|
807
|
+
this.onToggleSelectAll(true);
|
|
808
|
+
}
|
|
809
|
+
isSelected(value) {
|
|
810
|
+
const current = this.value();
|
|
811
|
+
if (!Array.isArray(current)) {
|
|
812
|
+
return false;
|
|
813
|
+
}
|
|
814
|
+
return current.includes(value);
|
|
815
|
+
}
|
|
816
|
+
trackByVirtualRow(_index, row) {
|
|
817
|
+
return row.kind === 'selectAll' ? '__select-all__' : String(row.option.value);
|
|
818
|
+
}
|
|
819
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibSelectFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
820
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: LibSelectFieldComponent, isStandalone: true, selector: "lib-select-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, filterable: { classPropertyName: "filterable", publicName: "filterable", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, selectAllLabel: { classPropertyName: "selectAllLabel", publicName: "selectAllLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, providers: [
|
|
821
|
+
{
|
|
822
|
+
provide: NG_VALUE_ACCESSOR,
|
|
823
|
+
useExisting: forwardRef(() => LibSelectFieldComponent),
|
|
824
|
+
multi: true,
|
|
825
|
+
},
|
|
826
|
+
], ngImport: i0, template: "<mat-form-field\r\n class=\"lib-select-field__field\"\r\n [appearance]=\"matAppearance()\"\r\n [style.width]=\"widthStyle() ?? null\"\r\n>\r\n @if (label()) {\r\n <mat-label>{{ label() }}</mat-label>\r\n }\r\n <mat-select\r\n [value]=\"displayValue\"\r\n [multiple]=\"isMultiple()\"\r\n [disabled]=\"disabled() || disabledByControl()\"\r\n [required]=\"required()\"\r\n [placeholder]=\"placeholder()\"\r\n panelClass=\"lib-select-field-panel\"\r\n (openedChange)=\"onPanelOpenChange($event)\"\r\n (selectionChange)=\"onSelectionChange($event)\"\r\n >\r\n @if (isMultiple()) {\r\n <mat-select-trigger\r\n >{{ multiTriggerLabel() || placeholder() }}</mat-select-trigger\r\n >\r\n } @if (filterable()) {\r\n <div\r\n class=\"lib-select-field__filter-option\"\r\n (mousedown)=\"$event.stopPropagation()\"\r\n >\r\n <input\r\n #filterInput\r\n class=\"lib-select-field__filter-input\"\r\n type=\"text\"\r\n [placeholder]=\"filterPlaceholder()\"\r\n [value]=\"filterTerm()\"\r\n (mousedown)=\"$event.stopPropagation()\"\r\n (click)=\"$event.stopPropagation()\"\r\n (input)=\"onFilterInput($event)\"\r\n (keydown)=\"onFilterKeydown($event)\"\r\n />\r\n </div>\r\n }\r\n <cdk-virtual-scroll-viewport\r\n class=\"lib-select-field__viewport app-scrollbar-figma\"\r\n [itemSize]=\"48\"\r\n minBufferPx=\"240\"\r\n maxBufferPx=\"240\"\r\n [style.height.px]=\"virtualViewportHeight()\"\r\n >\r\n <div\r\n *cdkVirtualFor=\"let row of virtualRows(); trackBy: trackByVirtualRow\"\r\n class=\"lib-select-field__virtual-row\"\r\n >\r\n @if (row.kind === 'selectAll') {\r\n <div\r\n class=\"lib-select-field__select-all-option\"\r\n role=\"button\"\r\n tabindex=\"0\"\r\n (mousedown)=\"$event.stopPropagation()\"\r\n (click)=\"toggledAllSelection(); $event.stopPropagation()\"\r\n (keydown.enter)=\"toggledAllSelection(); $event.preventDefault(); $event.stopPropagation()\"\r\n (keydown.space)=\"toggledAllSelection(); $event.preventDefault(); $event.stopPropagation()\"\r\n >\r\n <span class=\"lib-select-field__option-row\">\r\n <lib-checkbox\r\n [checked]=\"allSelected()\"\r\n [indeterminate]=\"selectAllIndeterminate()\"\r\n (click)=\"$event.stopPropagation()\"\r\n (checkedChange)=\"onSelectAllCheckedChange($event)\"\r\n />\r\n <span>{{ selectAllLabel() }}</span>\r\n </span>\r\n </div>\r\n } @else {\r\n <mat-option [value]=\"row.option.value\">\r\n @if (isMultiple()) {\r\n <span class=\"lib-select-field__option-row\">\r\n <lib-checkbox\r\n [checked]=\"isSelected(row.option.value)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (checkedChange)=\"onOptionCheckedChange(row.option.value, $event)\"\r\n />\r\n <span>{{ row.option.label }}</span>\r\n </span>\r\n } @else {\r\n {{ row.option.label }}\r\n }\r\n </mat-option>\r\n }\r\n </div>\r\n </cdk-virtual-scroll-viewport>\r\n </mat-select>\r\n <mat-icon class=\"lib-select-field__arrow\" matSuffix>\r\n {{ panelOpen() ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}\r\n </mat-icon>\r\n</mat-form-field>\r\n", styles: [".lib-select-field__field{display:block}:host ::ng-deep .lib-select-field__field .mat-mdc-select-arrow,:host ::ng-deep .lib-select-field__field .mat-mdc-select-arrow-wrapper{display:none!important}:host ::ng-deep .mat-mdc-select-trigger{padding-right:0!important}.lib-select-field__field .mat-mdc-select-arrow-wrapper{display:none!important}.lib-select-field__filter-option{pointer-events:auto;height:auto;padding:0;line-height:0}.lib-select-field__filter-option .mat-pseudo-checkbox{display:none}.lib-select-field__filter-option .lib-select-field__filter-input{width:100%;padding:8px 16px;border:none;outline:none;background:transparent;font-size:14px;box-sizing:border-box}.lib-select-field__multi-trigger-input{width:100%;border:none;outline:none;background:transparent;font:inherit;font-size:14px;color:inherit;box-sizing:border-box;cursor:pointer}.lib-select-field__multi-trigger-input::placeholder{color:#0000006b}.lib-select-field__option-row{display:inline-flex;align-items:center;gap:12px}.lib-select-field__virtual-row{height:48px}.lib-select-field__select-all-option{display:flex;align-items:center;height:100%;padding:0 16px;box-sizing:border-box;cursor:pointer}:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel{overflow:hidden!important}:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport{width:100%;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--Gris-500, #6a7282) var(--Gris-100, #f3f4f6)}:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar{width:10px}:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:start:decrement,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:start:decrement,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:end:increment,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:end:increment,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:start:decrement,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:start:decrement,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:end:increment,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:end:increment,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical:start:decrement,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical:start:decrement,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical:end:increment,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical:end:increment,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal:start:decrement,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal:start:decrement,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal:end:increment,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal:end:increment,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical:decrement,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical:decrement,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical:increment,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical:increment,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal:decrement,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal:decrement,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal:increment,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal:increment,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:decrement,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:decrement,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:increment,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:increment,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:decrement,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:decrement,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:increment,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:increment,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:start,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:start,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:end,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:end,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:start,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:start,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:end,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:end{display:none!important;width:0!important;height:0!important;-webkit-appearance:none!important;appearance:none!important}:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-track,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-track{background:var(--Gris-100, #f3f4f6);border-radius:var(--Corner-Radius-Full, 6.25rem)}:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-thumb,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-thumb{background:var(--Gris-500, #6a7282);border-radius:var(--Corner-Radius-Small, .5rem);min-height:3rem}:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-thumb:hover,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--Gris-500, #6a7282) 80%,black)}:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-thumb:active,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-thumb:active{background:color-mix(in srgb,var(--Gris-500, #6a7282) 65%,black)}:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport .mat-pseudo-checkbox,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport .mat-pseudo-checkbox,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport .mat-mdc-option .mdc-list-item__start,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport .mat-mdc-option .mdc-list-item__start{display:none!important}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2$2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i2$2.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i2$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i3$2.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i3$2.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i3$2.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: LibCheckboxComponent, selector: "lib-checkbox", inputs: ["checked", "indeterminate", "disabled", "error", "labelId"], outputs: ["checkedChange", "indeterminateChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
827
|
+
}
|
|
828
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibSelectFieldComponent, decorators: [{
|
|
829
|
+
type: Component,
|
|
830
|
+
args: [{ selector: 'lib-select-field', standalone: true, imports: [MatFormFieldModule, MatSelectModule, ScrollingModule, MatInputModule, MatIconModule, LibCheckboxComponent], providers: [
|
|
831
|
+
{
|
|
832
|
+
provide: NG_VALUE_ACCESSOR,
|
|
833
|
+
useExisting: forwardRef(() => LibSelectFieldComponent),
|
|
834
|
+
multi: true,
|
|
835
|
+
},
|
|
836
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-form-field\r\n class=\"lib-select-field__field\"\r\n [appearance]=\"matAppearance()\"\r\n [style.width]=\"widthStyle() ?? null\"\r\n>\r\n @if (label()) {\r\n <mat-label>{{ label() }}</mat-label>\r\n }\r\n <mat-select\r\n [value]=\"displayValue\"\r\n [multiple]=\"isMultiple()\"\r\n [disabled]=\"disabled() || disabledByControl()\"\r\n [required]=\"required()\"\r\n [placeholder]=\"placeholder()\"\r\n panelClass=\"lib-select-field-panel\"\r\n (openedChange)=\"onPanelOpenChange($event)\"\r\n (selectionChange)=\"onSelectionChange($event)\"\r\n >\r\n @if (isMultiple()) {\r\n <mat-select-trigger\r\n >{{ multiTriggerLabel() || placeholder() }}</mat-select-trigger\r\n >\r\n } @if (filterable()) {\r\n <div\r\n class=\"lib-select-field__filter-option\"\r\n (mousedown)=\"$event.stopPropagation()\"\r\n >\r\n <input\r\n #filterInput\r\n class=\"lib-select-field__filter-input\"\r\n type=\"text\"\r\n [placeholder]=\"filterPlaceholder()\"\r\n [value]=\"filterTerm()\"\r\n (mousedown)=\"$event.stopPropagation()\"\r\n (click)=\"$event.stopPropagation()\"\r\n (input)=\"onFilterInput($event)\"\r\n (keydown)=\"onFilterKeydown($event)\"\r\n />\r\n </div>\r\n }\r\n <cdk-virtual-scroll-viewport\r\n class=\"lib-select-field__viewport app-scrollbar-figma\"\r\n [itemSize]=\"48\"\r\n minBufferPx=\"240\"\r\n maxBufferPx=\"240\"\r\n [style.height.px]=\"virtualViewportHeight()\"\r\n >\r\n <div\r\n *cdkVirtualFor=\"let row of virtualRows(); trackBy: trackByVirtualRow\"\r\n class=\"lib-select-field__virtual-row\"\r\n >\r\n @if (row.kind === 'selectAll') {\r\n <div\r\n class=\"lib-select-field__select-all-option\"\r\n role=\"button\"\r\n tabindex=\"0\"\r\n (mousedown)=\"$event.stopPropagation()\"\r\n (click)=\"toggledAllSelection(); $event.stopPropagation()\"\r\n (keydown.enter)=\"toggledAllSelection(); $event.preventDefault(); $event.stopPropagation()\"\r\n (keydown.space)=\"toggledAllSelection(); $event.preventDefault(); $event.stopPropagation()\"\r\n >\r\n <span class=\"lib-select-field__option-row\">\r\n <lib-checkbox\r\n [checked]=\"allSelected()\"\r\n [indeterminate]=\"selectAllIndeterminate()\"\r\n (click)=\"$event.stopPropagation()\"\r\n (checkedChange)=\"onSelectAllCheckedChange($event)\"\r\n />\r\n <span>{{ selectAllLabel() }}</span>\r\n </span>\r\n </div>\r\n } @else {\r\n <mat-option [value]=\"row.option.value\">\r\n @if (isMultiple()) {\r\n <span class=\"lib-select-field__option-row\">\r\n <lib-checkbox\r\n [checked]=\"isSelected(row.option.value)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (checkedChange)=\"onOptionCheckedChange(row.option.value, $event)\"\r\n />\r\n <span>{{ row.option.label }}</span>\r\n </span>\r\n } @else {\r\n {{ row.option.label }}\r\n }\r\n </mat-option>\r\n }\r\n </div>\r\n </cdk-virtual-scroll-viewport>\r\n </mat-select>\r\n <mat-icon class=\"lib-select-field__arrow\" matSuffix>\r\n {{ panelOpen() ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}\r\n </mat-icon>\r\n</mat-form-field>\r\n", styles: [".lib-select-field__field{display:block}:host ::ng-deep .lib-select-field__field .mat-mdc-select-arrow,:host ::ng-deep .lib-select-field__field .mat-mdc-select-arrow-wrapper{display:none!important}:host ::ng-deep .mat-mdc-select-trigger{padding-right:0!important}.lib-select-field__field .mat-mdc-select-arrow-wrapper{display:none!important}.lib-select-field__filter-option{pointer-events:auto;height:auto;padding:0;line-height:0}.lib-select-field__filter-option .mat-pseudo-checkbox{display:none}.lib-select-field__filter-option .lib-select-field__filter-input{width:100%;padding:8px 16px;border:none;outline:none;background:transparent;font-size:14px;box-sizing:border-box}.lib-select-field__multi-trigger-input{width:100%;border:none;outline:none;background:transparent;font:inherit;font-size:14px;color:inherit;box-sizing:border-box;cursor:pointer}.lib-select-field__multi-trigger-input::placeholder{color:#0000006b}.lib-select-field__option-row{display:inline-flex;align-items:center;gap:12px}.lib-select-field__virtual-row{height:48px}.lib-select-field__select-all-option{display:flex;align-items:center;height:100%;padding:0 16px;box-sizing:border-box;cursor:pointer}:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel{overflow:hidden!important}:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport{width:100%;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--Gris-500, #6a7282) var(--Gris-100, #f3f4f6)}:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar{width:10px}:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:start:decrement,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:start:decrement,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:end:increment,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:end:increment,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:start:decrement,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:start:decrement,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:end:increment,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:end:increment,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical:start:decrement,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical:start:decrement,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical:end:increment,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical:end:increment,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal:start:decrement,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal:start:decrement,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal:end:increment,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal:end:increment,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical:decrement,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical:decrement,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical:increment,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical:increment,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal:decrement,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal:decrement,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal:increment,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal:increment,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:decrement,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:decrement,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:increment,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:increment,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:decrement,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:decrement,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:increment,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:increment,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:start,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:start,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:end,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:end,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:start,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:start,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:end,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:end{display:none!important;width:0!important;height:0!important;-webkit-appearance:none!important;appearance:none!important}:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-track,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-track{background:var(--Gris-100, #f3f4f6);border-radius:var(--Corner-Radius-Full, 6.25rem)}:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-thumb,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-thumb{background:var(--Gris-500, #6a7282);border-radius:var(--Corner-Radius-Small, .5rem);min-height:3rem}:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-thumb:hover,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--Gris-500, #6a7282) 80%,black)}:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-thumb:active,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-thumb:active{background:color-mix(in srgb,var(--Gris-500, #6a7282) 65%,black)}:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport .mat-pseudo-checkbox,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport .mat-pseudo-checkbox,:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport .mat-mdc-option .mdc-list-item__start,:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport .mat-mdc-option .mdc-list-item__start{display:none!important}\n"] }]
|
|
837
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], filterable: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterable", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], selectAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAllLabel", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
|
|
838
|
+
|
|
839
|
+
class LibListItemComponent {
|
|
840
|
+
items = input([], ...(ngDevMode ? [{ debugName: "items" }] : []));
|
|
841
|
+
selectedIds = input([], ...(ngDevMode ? [{ debugName: "selectedIds" }] : []));
|
|
842
|
+
multiple = input(true, ...(ngDevMode ? [{ debugName: "multiple" }] : []));
|
|
843
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
844
|
+
showCheckbox = input(true, ...(ngDevMode ? [{ debugName: "showCheckbox" }] : []));
|
|
845
|
+
showAvatar = input(true, ...(ngDevMode ? [{ debugName: "showAvatar" }] : []));
|
|
846
|
+
showDividers = input(true, ...(ngDevMode ? [{ debugName: "showDividers" }] : []));
|
|
847
|
+
/** Posición del checkbox: 'leading' (izquierda) o 'trailing' (derecha). Por defecto 'trailing' según diseño Figma. */
|
|
848
|
+
checkboxPosition = input('trailing', ...(ngDevMode ? [{ debugName: "checkboxPosition" }] : []));
|
|
849
|
+
/** Ancho de la lista. Acepta valores CSS (ej: '18.8rem', '300px', '100%'). Si no se pasa, la lista ocupa el ancho disponible. */
|
|
850
|
+
width = input(undefined, ...(ngDevMode ? [{ debugName: "width" }] : []));
|
|
851
|
+
/** Fondo personalizado de la lista/items. Si no se define, usa el fondo por defecto de tokens. */
|
|
852
|
+
backgroundColor = input(undefined, ...(ngDevMode ? [{ debugName: "backgroundColor" }] : []));
|
|
853
|
+
selectionChange = output();
|
|
854
|
+
itemClick = output();
|
|
855
|
+
/** Template para proyectar contenido arriba de la lista (ej: checkbox, filtros) */
|
|
856
|
+
headerTemplate = contentChild('headerTemplate', ...(ngDevMode ? [{ debugName: "headerTemplate" }] : []));
|
|
857
|
+
/** Template para proyectar el contenido personalizado de cada item. Usar: let-item para acceder al item */
|
|
858
|
+
itemTemplate = contentChild('itemTemplate', ...(ngDevMode ? [{ debugName: "itemTemplate" }] : []));
|
|
859
|
+
selectedSet = computed(() => new Set(this.selectedIds()), ...(ngDevMode ? [{ debugName: "selectedSet" }] : []));
|
|
860
|
+
trackById(_index, item) {
|
|
861
|
+
return item.id;
|
|
862
|
+
}
|
|
863
|
+
avatarInitial(item) {
|
|
864
|
+
const explicit = item.avatarText?.trim();
|
|
865
|
+
if (explicit) {
|
|
866
|
+
return explicit.slice(0, 2).toUpperCase();
|
|
867
|
+
}
|
|
868
|
+
const label = item.label?.trim();
|
|
869
|
+
return label ? label.charAt(0).toUpperCase() : '';
|
|
870
|
+
}
|
|
871
|
+
isItemSelected(item) {
|
|
872
|
+
return this.selectedSet().has(item.id);
|
|
873
|
+
}
|
|
874
|
+
onCheckboxChange(item, selected) {
|
|
875
|
+
const current = new Set(this.selectedIds());
|
|
876
|
+
if (this.multiple()) {
|
|
877
|
+
if (selected) {
|
|
878
|
+
current.add(item.id);
|
|
879
|
+
}
|
|
880
|
+
else {
|
|
881
|
+
current.delete(item.id);
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
else {
|
|
885
|
+
this.selectionChange.emit(selected ? [item.id] : []);
|
|
886
|
+
return;
|
|
887
|
+
}
|
|
888
|
+
this.selectionChange.emit([...current]);
|
|
889
|
+
}
|
|
890
|
+
onRowClick(item, _event) {
|
|
891
|
+
if (this.showCheckbox() && !(item.disabled ?? this.disabled())) {
|
|
892
|
+
const isSelected = this.isItemSelected(item);
|
|
893
|
+
this.onCheckboxChange(item, !isSelected);
|
|
894
|
+
}
|
|
895
|
+
this.itemClick.emit(item);
|
|
896
|
+
}
|
|
897
|
+
onItemClick(item) {
|
|
898
|
+
this.itemClick.emit(item);
|
|
899
|
+
}
|
|
900
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
901
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: LibListItemComponent, isStandalone: true, selector: "lib-list-item", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, selectedIds: { classPropertyName: "selectedIds", publicName: "selectedIds", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, showCheckbox: { classPropertyName: "showCheckbox", publicName: "showCheckbox", isSignal: true, isRequired: false, transformFunction: null }, showAvatar: { classPropertyName: "showAvatar", publicName: "showAvatar", isSignal: true, isRequired: false, transformFunction: null }, showDividers: { classPropertyName: "showDividers", publicName: "showDividers", isSignal: true, isRequired: false, transformFunction: null }, checkboxPosition: { classPropertyName: "checkboxPosition", publicName: "checkboxPosition", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, backgroundColor: { classPropertyName: "backgroundColor", publicName: "backgroundColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectionChange: "selectionChange", itemClick: "itemClick" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: ["headerTemplate"], descendants: true, isSignal: true }, { propertyName: "itemTemplate", first: true, predicate: ["itemTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\r\n class=\"ui-list-item__container\"\r\n [style.width]=\"width() ?? '100%'\"\r\n [style.min-width]=\"width() ?? null\"\r\n [style.--lib-list-item-background]=\"backgroundColor() ?? null\"\r\n>\r\n @if (headerTemplate()) {\r\n <div class=\"ui-list-item__header\">\r\n <ng-container [ngTemplateOutlet]=\"headerTemplate()!\" />\r\n </div>\r\n}\r\n<mat-list role=\"list\">\r\n @for (item of items(); track trackById($index, item)) {\r\n <mat-list-item\r\n role=\"listitem\"\r\n class=\"ui-list-option\"\r\n [class.ui-list-item--disabled]=\"item.disabled ?? false\"\r\n [class.ui-list-item--selected]=\"showCheckbox() && isItemSelected(item)\"\r\n [class.ui-list-item--with-divider]=\"showDividers()\"\r\n [disableRipple]=\"true\"\r\n (click)=\"onRowClick(item, $event)\"\r\n >\r\n @if (itemTemplate()) {\r\n <ng-container [ngTemplateOutlet]=\"itemTemplate()!\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\r\n } @else {\r\n <div class=\"ui-list-item\" [class.ui-list-item--with-divider]=\"showDividers()\">\r\n <span class=\"ui-list-item__state-layer\"></span>\r\n\r\n @if (showCheckbox() && checkboxPosition() === 'leading') {\r\n <span class=\"ui-list-item__leading ui-list-item__leading--checkbox\">\r\n <mat-checkbox\r\n [checked]=\"isItemSelected(item)\"\r\n [disabled]=\"item.disabled ?? disabled()\"\r\n (change)=\"onCheckboxChange(item, $event.checked)\"\r\n (click)=\"$event.stopPropagation()\"\r\n />\r\n </span>\r\n }\r\n\r\n @if (showAvatar() && !showCheckbox()) {\r\n <span class=\"ui-list-item__leading\">\r\n @if (item.avatarImage) {\r\n <img\r\n class=\"ui-list-item__avatar-image\"\r\n [src]=\"item.avatarImage\"\r\n [attr.alt]=\"item.avatarAlt || item.label\"\r\n loading=\"lazy\"\r\n />\r\n } @else {\r\n <span class=\"ui-list-item__avatar-text\" aria-hidden=\"true\">\r\n {{ avatarInitial(item) }}\r\n </span>\r\n }\r\n </span>\r\n }\r\n\r\n <span class=\"ui-list-item__content\">\r\n <span class=\"ui-list-item__label\">{{ item.label }}</span>\r\n @if (item.description) {\r\n <span class=\"ui-list-item__description\">{{ item.description }}</span>\r\n }\r\n </span>\r\n\r\n @if (showCheckbox() && checkboxPosition() === 'trailing') {\r\n <span class=\"ui-list-item__trailing ui-list-item__trailing--checkbox\">\r\n <lib-checkbox\r\n [checked]=\"isItemSelected(item)\"\r\n [disabled]=\"item.disabled ?? disabled()\"\r\n (checkedChange)=\"onCheckboxChange(item, $event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n />\r\n </span>\r\n }\r\n </div>\r\n }\r\n </mat-list-item>\r\n }\r\n</mat-list>\r\n</div>\r\n", styles: [":host{display:flex;flex-direction:column;width:100%;min-height:0}.ui-list-item__container{display:flex;flex-direction:column;flex:1 1 0;min-height:0}.ui-list-item__header{padding-bottom:.5rem}:host ::ng-deep .ui-list-option.mdc-list-item{padding:0;min-height:calc(var(--lists-wip-common-typography-one-line-list-item-container-height, 56) * 1px);background-color:var(--lists-wip-common-color-enabled-list-list-item-container-color, var(--app-pallete-scheme-surface-surface-container-lowest, #FFFFFF))}.ui-list-item{display:flex;align-items:center;padding:8px 16px;min-height:calc(var(--lists-wip-common-typography-one-line-list-item-container-height, 56) * 1px);position:relative;width:100%;box-sizing:border-box}:host ::ng-deep mat-list .ui-list-option.ui-list-item--with-divider{border-bottom:calc(var(--divider-enabled-container-divider-thickness, 1) * 1px) solid var(--divider-enabled-container-divider-color, #c3c7c9)}:host ::ng-deep mat-list .ui-list-option.ui-list-item--with-divider:last-child{border-bottom:none}.ui-list-item__content{display:flex;flex-direction:column;justify-content:center;min-height:0;flex:1;min-width:0}.ui-list-item__label{color:var(--lists-wip-common-color-enabled-list-list-item-label-text-color, #181c1e);font-family:var(--date-pickers-docked-enabled-label-text-menu-list-item-label-text-font, Heebo),sans-serif;font-size:calc(var(--date-pickers-docked-enabled-label-text-menu-list-item-label-text-size, 16) * 1px);font-style:normal;font-weight:var(--date-pickers-docked-enabled-label-text-menu-list-item-label-text-weight, 400);line-height:calc(var(--date-pickers-docked-enabled-label-text-menu-list-item-label-text-line-height, 24) * 1px);letter-spacing:calc(var(--date-pickers-docked-enabled-label-text-menu-list-item-label-text-tracking, .5) * 1px)}.ui-list-item__description{line-height:1.25}.ui-list-item__leading--checkbox{display:flex;align-items:center;justify-content:center;flex-shrink:0;align-self:center}.ui-list-item__leading--checkbox .mat-mdc-checkbox{display:flex;align-items:center;justify-content:center}.ui-list-item__leading--checkbox .mat-mdc-checkbox .mdc-checkbox__ripple,.ui-list-item__leading--checkbox .mat-mdc-checkbox .mdc-checkbox__state-layer{inset:50% auto auto 50%!important;transform:translate(-50%,-50%)!important}.ui-list-item__trailing--checkbox{display:flex;align-items:center;justify-content:center;flex-shrink:0;align-self:center;margin-left:auto}.ui-list-item__trailing--checkbox .mat-mdc-checkbox{display:flex;align-items:center;justify-content:center}.ui-list-item__trailing--checkbox .mat-mdc-checkbox .mdc-checkbox__ripple,.ui-list-item__trailing--checkbox .mat-mdc-checkbox .mdc-checkbox__state-layer{inset:50% auto auto 50%!important;transform:translate(-50%,-50%)!important}\n"], dependencies: [{ kind: "ngmodule", type: MatListModule }, { kind: "component", type: i1$3.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i1$3.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i1$2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: LibCheckboxComponent, selector: "lib-checkbox", inputs: ["checked", "indeterminate", "disabled", "error", "labelId"], outputs: ["checkedChange", "indeterminateChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
902
|
+
}
|
|
903
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibListItemComponent, decorators: [{
|
|
904
|
+
type: Component,
|
|
905
|
+
args: [{ selector: 'lib-list-item', standalone: true, imports: [MatListModule, MatCheckboxModule, LibCheckboxComponent, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"ui-list-item__container\"\r\n [style.width]=\"width() ?? '100%'\"\r\n [style.min-width]=\"width() ?? null\"\r\n [style.--lib-list-item-background]=\"backgroundColor() ?? null\"\r\n>\r\n @if (headerTemplate()) {\r\n <div class=\"ui-list-item__header\">\r\n <ng-container [ngTemplateOutlet]=\"headerTemplate()!\" />\r\n </div>\r\n}\r\n<mat-list role=\"list\">\r\n @for (item of items(); track trackById($index, item)) {\r\n <mat-list-item\r\n role=\"listitem\"\r\n class=\"ui-list-option\"\r\n [class.ui-list-item--disabled]=\"item.disabled ?? false\"\r\n [class.ui-list-item--selected]=\"showCheckbox() && isItemSelected(item)\"\r\n [class.ui-list-item--with-divider]=\"showDividers()\"\r\n [disableRipple]=\"true\"\r\n (click)=\"onRowClick(item, $event)\"\r\n >\r\n @if (itemTemplate()) {\r\n <ng-container [ngTemplateOutlet]=\"itemTemplate()!\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\r\n } @else {\r\n <div class=\"ui-list-item\" [class.ui-list-item--with-divider]=\"showDividers()\">\r\n <span class=\"ui-list-item__state-layer\"></span>\r\n\r\n @if (showCheckbox() && checkboxPosition() === 'leading') {\r\n <span class=\"ui-list-item__leading ui-list-item__leading--checkbox\">\r\n <mat-checkbox\r\n [checked]=\"isItemSelected(item)\"\r\n [disabled]=\"item.disabled ?? disabled()\"\r\n (change)=\"onCheckboxChange(item, $event.checked)\"\r\n (click)=\"$event.stopPropagation()\"\r\n />\r\n </span>\r\n }\r\n\r\n @if (showAvatar() && !showCheckbox()) {\r\n <span class=\"ui-list-item__leading\">\r\n @if (item.avatarImage) {\r\n <img\r\n class=\"ui-list-item__avatar-image\"\r\n [src]=\"item.avatarImage\"\r\n [attr.alt]=\"item.avatarAlt || item.label\"\r\n loading=\"lazy\"\r\n />\r\n } @else {\r\n <span class=\"ui-list-item__avatar-text\" aria-hidden=\"true\">\r\n {{ avatarInitial(item) }}\r\n </span>\r\n }\r\n </span>\r\n }\r\n\r\n <span class=\"ui-list-item__content\">\r\n <span class=\"ui-list-item__label\">{{ item.label }}</span>\r\n @if (item.description) {\r\n <span class=\"ui-list-item__description\">{{ item.description }}</span>\r\n }\r\n </span>\r\n\r\n @if (showCheckbox() && checkboxPosition() === 'trailing') {\r\n <span class=\"ui-list-item__trailing ui-list-item__trailing--checkbox\">\r\n <lib-checkbox\r\n [checked]=\"isItemSelected(item)\"\r\n [disabled]=\"item.disabled ?? disabled()\"\r\n (checkedChange)=\"onCheckboxChange(item, $event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n />\r\n </span>\r\n }\r\n </div>\r\n }\r\n </mat-list-item>\r\n }\r\n</mat-list>\r\n</div>\r\n", styles: [":host{display:flex;flex-direction:column;width:100%;min-height:0}.ui-list-item__container{display:flex;flex-direction:column;flex:1 1 0;min-height:0}.ui-list-item__header{padding-bottom:.5rem}:host ::ng-deep .ui-list-option.mdc-list-item{padding:0;min-height:calc(var(--lists-wip-common-typography-one-line-list-item-container-height, 56) * 1px);background-color:var(--lists-wip-common-color-enabled-list-list-item-container-color, var(--app-pallete-scheme-surface-surface-container-lowest, #FFFFFF))}.ui-list-item{display:flex;align-items:center;padding:8px 16px;min-height:calc(var(--lists-wip-common-typography-one-line-list-item-container-height, 56) * 1px);position:relative;width:100%;box-sizing:border-box}:host ::ng-deep mat-list .ui-list-option.ui-list-item--with-divider{border-bottom:calc(var(--divider-enabled-container-divider-thickness, 1) * 1px) solid var(--divider-enabled-container-divider-color, #c3c7c9)}:host ::ng-deep mat-list .ui-list-option.ui-list-item--with-divider:last-child{border-bottom:none}.ui-list-item__content{display:flex;flex-direction:column;justify-content:center;min-height:0;flex:1;min-width:0}.ui-list-item__label{color:var(--lists-wip-common-color-enabled-list-list-item-label-text-color, #181c1e);font-family:var(--date-pickers-docked-enabled-label-text-menu-list-item-label-text-font, Heebo),sans-serif;font-size:calc(var(--date-pickers-docked-enabled-label-text-menu-list-item-label-text-size, 16) * 1px);font-style:normal;font-weight:var(--date-pickers-docked-enabled-label-text-menu-list-item-label-text-weight, 400);line-height:calc(var(--date-pickers-docked-enabled-label-text-menu-list-item-label-text-line-height, 24) * 1px);letter-spacing:calc(var(--date-pickers-docked-enabled-label-text-menu-list-item-label-text-tracking, .5) * 1px)}.ui-list-item__description{line-height:1.25}.ui-list-item__leading--checkbox{display:flex;align-items:center;justify-content:center;flex-shrink:0;align-self:center}.ui-list-item__leading--checkbox .mat-mdc-checkbox{display:flex;align-items:center;justify-content:center}.ui-list-item__leading--checkbox .mat-mdc-checkbox .mdc-checkbox__ripple,.ui-list-item__leading--checkbox .mat-mdc-checkbox .mdc-checkbox__state-layer{inset:50% auto auto 50%!important;transform:translate(-50%,-50%)!important}.ui-list-item__trailing--checkbox{display:flex;align-items:center;justify-content:center;flex-shrink:0;align-self:center;margin-left:auto}.ui-list-item__trailing--checkbox .mat-mdc-checkbox{display:flex;align-items:center;justify-content:center}.ui-list-item__trailing--checkbox .mat-mdc-checkbox .mdc-checkbox__ripple,.ui-list-item__trailing--checkbox .mat-mdc-checkbox .mdc-checkbox__state-layer{inset:50% auto auto 50%!important;transform:translate(-50%,-50%)!important}\n"] }]
|
|
906
|
+
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], selectedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedIds", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], showCheckbox: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCheckbox", required: false }] }], showAvatar: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAvatar", required: false }] }], showDividers: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDividers", required: false }] }], checkboxPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkboxPosition", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], backgroundColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "backgroundColor", required: false }] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], headerTemplate: [{ type: i0.ContentChild, args: ['headerTemplate', { isSignal: true }] }], itemTemplate: [{ type: i0.ContentChild, args: ['itemTemplate', { isSignal: true }] }] } });
|
|
907
|
+
|
|
908
|
+
class LibCheckboxShowcaseComponent {
|
|
909
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibCheckboxShowcaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
910
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: LibCheckboxShowcaseComponent, isStandalone: true, selector: "lib-checkbox-showcase", ngImport: i0, template: "<section class=\"lib-checkbox-showcase\">\r\n <h2 class=\"lib-checkbox-showcase__title\">Checkbox \u2013 estados (tokens Figma)</h2>\r\n\r\n <div class=\"lib-checkbox-showcase__group\">\r\n <h3>Enabled</h3>\r\n <div class=\"lib-checkbox-showcase__row\">\r\n <lib-checkbox>Unselected</lib-checkbox>\r\n <lib-checkbox [checked]=\"true\">Selected</lib-checkbox>\r\n <lib-checkbox [indeterminate]=\"true\">Indeterminate</lib-checkbox>\r\n <lib-checkbox [error]=\"true\">Error (unselected)</lib-checkbox>\r\n <lib-checkbox [checked]=\"true\" [error]=\"true\">Error (selected)</lib-checkbox>\r\n </div>\r\n </div>\r\n\r\n <div class=\"lib-checkbox-showcase__group\">\r\n <h3>Disabled</h3>\r\n <div class=\"lib-checkbox-showcase__row\">\r\n <lib-checkbox [disabled]=\"true\">Unselected</lib-checkbox>\r\n <lib-checkbox [disabled]=\"true\" [checked]=\"true\">Selected</lib-checkbox>\r\n <lib-checkbox [disabled]=\"true\" [indeterminate]=\"true\">Indeterminate</lib-checkbox>\r\n </div>\r\n </div>\r\n\r\n <div class=\"lib-checkbox-showcase__group\">\r\n <h3>Interactive (hover / pressed)</h3>\r\n <p class=\"lib-checkbox-showcase__hint\">\r\n Pasa el mouse y haz click para ver hover / pressed seg\u00FAn tokens de Figma.\r\n </p>\r\n <div class=\"lib-checkbox-showcase__row\">\r\n <lib-checkbox>Unselected (hover / pressed)</lib-checkbox>\r\n <lib-checkbox [checked]=\"true\">Selected (hover / pressed)</lib-checkbox>\r\n <lib-checkbox [indeterminate]=\"true\">Indeterminate (hover / pressed)</lib-checkbox>\r\n </div>\r\n </div>\r\n</section>\r\n\r\n", styles: [".lib-checkbox-showcase{display:flex;flex-direction:column;gap:1.5rem}.lib-checkbox-showcase__title{margin:0 0 .5rem;font-size:1.25rem;font-weight:600}.lib-checkbox-showcase__group{display:flex;flex-direction:column;gap:.5rem}.lib-checkbox-showcase__group>h3{margin:0;font-size:1rem;font-weight:500}.lib-checkbox-showcase__hint{margin:0;font-size:.875rem;color:#696d6f}.lib-checkbox-showcase__row{display:flex;flex-wrap:wrap;align-items:center;gap:1rem 2.5rem}.lib-checkbox-showcase__row lib-checkbox{display:inline-flex;align-items:center;gap:.5rem}\n"], dependencies: [{ kind: "component", type: LibCheckboxComponent, selector: "lib-checkbox", inputs: ["checked", "indeterminate", "disabled", "error", "labelId"], outputs: ["checkedChange", "indeterminateChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
911
|
+
}
|
|
912
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibCheckboxShowcaseComponent, decorators: [{
|
|
913
|
+
type: Component,
|
|
914
|
+
args: [{ selector: 'lib-checkbox-showcase', standalone: true, imports: [LibCheckboxComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<section class=\"lib-checkbox-showcase\">\r\n <h2 class=\"lib-checkbox-showcase__title\">Checkbox \u2013 estados (tokens Figma)</h2>\r\n\r\n <div class=\"lib-checkbox-showcase__group\">\r\n <h3>Enabled</h3>\r\n <div class=\"lib-checkbox-showcase__row\">\r\n <lib-checkbox>Unselected</lib-checkbox>\r\n <lib-checkbox [checked]=\"true\">Selected</lib-checkbox>\r\n <lib-checkbox [indeterminate]=\"true\">Indeterminate</lib-checkbox>\r\n <lib-checkbox [error]=\"true\">Error (unselected)</lib-checkbox>\r\n <lib-checkbox [checked]=\"true\" [error]=\"true\">Error (selected)</lib-checkbox>\r\n </div>\r\n </div>\r\n\r\n <div class=\"lib-checkbox-showcase__group\">\r\n <h3>Disabled</h3>\r\n <div class=\"lib-checkbox-showcase__row\">\r\n <lib-checkbox [disabled]=\"true\">Unselected</lib-checkbox>\r\n <lib-checkbox [disabled]=\"true\" [checked]=\"true\">Selected</lib-checkbox>\r\n <lib-checkbox [disabled]=\"true\" [indeterminate]=\"true\">Indeterminate</lib-checkbox>\r\n </div>\r\n </div>\r\n\r\n <div class=\"lib-checkbox-showcase__group\">\r\n <h3>Interactive (hover / pressed)</h3>\r\n <p class=\"lib-checkbox-showcase__hint\">\r\n Pasa el mouse y haz click para ver hover / pressed seg\u00FAn tokens de Figma.\r\n </p>\r\n <div class=\"lib-checkbox-showcase__row\">\r\n <lib-checkbox>Unselected (hover / pressed)</lib-checkbox>\r\n <lib-checkbox [checked]=\"true\">Selected (hover / pressed)</lib-checkbox>\r\n <lib-checkbox [indeterminate]=\"true\">Indeterminate (hover / pressed)</lib-checkbox>\r\n </div>\r\n </div>\r\n</section>\r\n\r\n", styles: [".lib-checkbox-showcase{display:flex;flex-direction:column;gap:1.5rem}.lib-checkbox-showcase__title{margin:0 0 .5rem;font-size:1.25rem;font-weight:600}.lib-checkbox-showcase__group{display:flex;flex-direction:column;gap:.5rem}.lib-checkbox-showcase__group>h3{margin:0;font-size:1rem;font-weight:500}.lib-checkbox-showcase__hint{margin:0;font-size:.875rem;color:#696d6f}.lib-checkbox-showcase__row{display:flex;flex-wrap:wrap;align-items:center;gap:1rem 2.5rem}.lib-checkbox-showcase__row lib-checkbox{display:inline-flex;align-items:center;gap:.5rem}\n"] }]
|
|
915
|
+
}] });
|
|
916
|
+
|
|
917
|
+
/**
|
|
918
|
+
* @deprecated Prefer `lib-select-field` for new implementations.
|
|
919
|
+
* Kept for compatibility while migrating existing screens.
|
|
920
|
+
*/
|
|
921
|
+
class LibMenuComponent {
|
|
922
|
+
label = input(null, ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
923
|
+
placeholder = input('Seleccionar', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
924
|
+
options = input([], ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
925
|
+
mode = input('single', ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
926
|
+
filterable = input(true, ...(ngDevMode ? [{ debugName: "filterable" }] : []));
|
|
927
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
928
|
+
panelOpen = signal(false, ...(ngDevMode ? [{ debugName: "panelOpen" }] : []));
|
|
929
|
+
filterTerm = signal('', ...(ngDevMode ? [{ debugName: "filterTerm" }] : []));
|
|
930
|
+
disabledByControl = signal(false, ...(ngDevMode ? [{ debugName: "disabledByControl" }] : []));
|
|
931
|
+
valueSignal = signal(null, ...(ngDevMode ? [{ debugName: "valueSignal" }] : []));
|
|
932
|
+
isMultiple = computed(() => this.mode() === 'multiple', ...(ngDevMode ? [{ debugName: "isMultiple" }] : []));
|
|
933
|
+
filteredOptions = computed(() => {
|
|
934
|
+
const opts = this.options();
|
|
935
|
+
const term = this.filterTerm().trim().toLowerCase();
|
|
936
|
+
if (!term)
|
|
937
|
+
return opts;
|
|
938
|
+
return opts.filter((o) => o.label.toLowerCase().includes(term));
|
|
939
|
+
}, ...(ngDevMode ? [{ debugName: "filteredOptions" }] : []));
|
|
940
|
+
triggerLabel = computed(() => {
|
|
941
|
+
const current = this.valueSignal();
|
|
942
|
+
const opts = this.options();
|
|
943
|
+
if (current == null) {
|
|
944
|
+
return this.placeholder();
|
|
945
|
+
}
|
|
946
|
+
if (Array.isArray(current)) {
|
|
947
|
+
if (!current.length)
|
|
948
|
+
return this.placeholder();
|
|
949
|
+
const labels = current
|
|
950
|
+
.map((v) => opts.find((o) => o.value === v)?.label)
|
|
951
|
+
.filter((l) => !!l);
|
|
952
|
+
if (!labels.length)
|
|
953
|
+
return this.placeholder();
|
|
954
|
+
if (labels.length === 1)
|
|
955
|
+
return labels[0];
|
|
956
|
+
const [first, ...rest] = labels;
|
|
957
|
+
return `${first} (+${rest.length})`;
|
|
958
|
+
}
|
|
959
|
+
const match = opts.find((o) => o.value === current);
|
|
960
|
+
return match?.label ?? this.placeholder();
|
|
961
|
+
}, ...(ngDevMode ? [{ debugName: "triggerLabel" }] : []));
|
|
962
|
+
onMenuOpened() {
|
|
963
|
+
this.panelOpen.set(true);
|
|
964
|
+
}
|
|
965
|
+
onMenuClosed() {
|
|
966
|
+
this.panelOpen.set(false);
|
|
967
|
+
this.filterTerm.set('');
|
|
968
|
+
}
|
|
969
|
+
onFilterInput(event) {
|
|
970
|
+
const el = event.target;
|
|
971
|
+
this.filterTerm.set(el?.value ?? '');
|
|
972
|
+
}
|
|
973
|
+
onOptionClick(option, event) {
|
|
974
|
+
if (event) {
|
|
975
|
+
event.stopPropagation();
|
|
976
|
+
event.preventDefault();
|
|
977
|
+
}
|
|
978
|
+
if (this.isMultiple()) {
|
|
979
|
+
const current = this.valueSignal();
|
|
980
|
+
const asArray = Array.isArray(current) ? [...current] : [];
|
|
981
|
+
const index = asArray.findIndex((v) => v === option.value);
|
|
982
|
+
if (index >= 0) {
|
|
983
|
+
asArray.splice(index, 1);
|
|
984
|
+
}
|
|
985
|
+
else {
|
|
986
|
+
asArray.push(option.value);
|
|
987
|
+
}
|
|
988
|
+
const next = asArray;
|
|
989
|
+
this.valueSignal.set(next);
|
|
990
|
+
this.onChange(next);
|
|
991
|
+
}
|
|
992
|
+
else {
|
|
993
|
+
const next = option.value;
|
|
994
|
+
this.valueSignal.set(next);
|
|
995
|
+
this.onChange(next);
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
isSelected(value) {
|
|
999
|
+
const current = this.valueSignal();
|
|
1000
|
+
if (Array.isArray(current)) {
|
|
1001
|
+
return current.includes(value);
|
|
1002
|
+
}
|
|
1003
|
+
return current === value;
|
|
1004
|
+
}
|
|
1005
|
+
// ControlValueAccessor
|
|
1006
|
+
onChange = () => { };
|
|
1007
|
+
onTouched = () => { };
|
|
1008
|
+
writeValue(value) {
|
|
1009
|
+
this.valueSignal.set(value);
|
|
1010
|
+
}
|
|
1011
|
+
registerOnChange(fn) {
|
|
1012
|
+
this.onChange = fn;
|
|
1013
|
+
}
|
|
1014
|
+
registerOnTouched(fn) {
|
|
1015
|
+
this.onTouched = fn;
|
|
1016
|
+
}
|
|
1017
|
+
setDisabledState(isDisabled) {
|
|
1018
|
+
this.disabledByControl.set(isDisabled);
|
|
1019
|
+
}
|
|
1020
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1021
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: LibMenuComponent, isStandalone: true, selector: "lib-menu", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, filterable: { classPropertyName: "filterable", publicName: "filterable", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
1022
|
+
{
|
|
1023
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1024
|
+
useExisting: forwardRef(() => LibMenuComponent),
|
|
1025
|
+
multi: true,
|
|
1026
|
+
},
|
|
1027
|
+
], ngImport: i0, template: "<div class=\"lib-menu\">\r\n <button\r\n mat-button\r\n class=\"lib-menu__trigger\"\r\n [matMenuTriggerFor]=\"menu\"\r\n [disabled]=\"disabled() || disabledByControl()\"\r\n type=\"button\"\r\n >\r\n <span class=\"lib-menu__trigger-label\">\r\n {{ label() || '' }}\r\n </span>\r\n <span class=\"lib-menu__trigger-value\">\r\n {{ triggerLabel() }}\r\n </span>\r\n <mat-icon class=\"lib-menu__trigger-icon\">\r\n {{ panelOpen() ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}\r\n </mat-icon>\r\n </button>\r\n\r\n <mat-menu\r\n #menu=\"matMenu\"\r\n class=\"lib-menu__panel\"\r\n (menuOpened)=\"onMenuOpened()\"\r\n (menuClosed)=\"onMenuClosed()\"\r\n >\r\n @if (filterable()) {\r\n <div class=\"lib-menu__filter\">\r\n <mat-form-field appearance=\"outline\" class=\"lib-menu__filter-field\">\r\n <mat-label>Buscar</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n (input)=\"onFilterInput($event)\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n }\r\n\r\n @for (opt of filteredOptions(); track opt.value) {\r\n @if (isMultiple()) {\r\n <button mat-menu-item (click)=\"onOptionClick(opt, $event)\">\r\n <mat-checkbox\r\n [checked]=\"isSelected(opt.value)\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n {{ opt.label }}\r\n </mat-checkbox>\r\n </button>\r\n } @else {\r\n <button mat-menu-item (click)=\"onOptionClick(opt, $event)\">\r\n <span>{{ opt.label }}</span>\r\n </button>\r\n }\r\n }\r\n </mat-menu>\r\n</div>\r\n\r\n", styles: [".lib-menu{display:inline-flex}.lib-menu__trigger{display:inline-flex;align-items:center;justify-content:space-between;gap:.5rem;min-width:12rem;padding-inline:.75rem;text-transform:none}.lib-menu__trigger-label{font-size:.875rem;color:#0009}.lib-menu__trigger-value{flex:1;text-align:left}.lib-menu__trigger-icon{font-size:20px}.lib-menu__filter{padding:.5rem 1rem .25rem}.lib-menu__filter-field{width:100%}.lib-menu__panel{max-width:20rem}\n"], dependencies: [{ kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1$4.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i1$4.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i1$4.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$3.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i1$2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1028
|
+
}
|
|
1029
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibMenuComponent, decorators: [{
|
|
1030
|
+
type: Component,
|
|
1031
|
+
args: [{ selector: 'lib-menu', standalone: true, imports: [
|
|
1032
|
+
MatMenuModule,
|
|
1033
|
+
MatButtonModule,
|
|
1034
|
+
MatFormFieldModule,
|
|
1035
|
+
MatInputModule,
|
|
1036
|
+
MatIconModule,
|
|
1037
|
+
MatCheckboxModule,
|
|
1038
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1039
|
+
{
|
|
1040
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1041
|
+
useExisting: forwardRef(() => LibMenuComponent),
|
|
1042
|
+
multi: true,
|
|
1043
|
+
},
|
|
1044
|
+
], template: "<div class=\"lib-menu\">\r\n <button\r\n mat-button\r\n class=\"lib-menu__trigger\"\r\n [matMenuTriggerFor]=\"menu\"\r\n [disabled]=\"disabled() || disabledByControl()\"\r\n type=\"button\"\r\n >\r\n <span class=\"lib-menu__trigger-label\">\r\n {{ label() || '' }}\r\n </span>\r\n <span class=\"lib-menu__trigger-value\">\r\n {{ triggerLabel() }}\r\n </span>\r\n <mat-icon class=\"lib-menu__trigger-icon\">\r\n {{ panelOpen() ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}\r\n </mat-icon>\r\n </button>\r\n\r\n <mat-menu\r\n #menu=\"matMenu\"\r\n class=\"lib-menu__panel\"\r\n (menuOpened)=\"onMenuOpened()\"\r\n (menuClosed)=\"onMenuClosed()\"\r\n >\r\n @if (filterable()) {\r\n <div class=\"lib-menu__filter\">\r\n <mat-form-field appearance=\"outline\" class=\"lib-menu__filter-field\">\r\n <mat-label>Buscar</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n (input)=\"onFilterInput($event)\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n }\r\n\r\n @for (opt of filteredOptions(); track opt.value) {\r\n @if (isMultiple()) {\r\n <button mat-menu-item (click)=\"onOptionClick(opt, $event)\">\r\n <mat-checkbox\r\n [checked]=\"isSelected(opt.value)\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n {{ opt.label }}\r\n </mat-checkbox>\r\n </button>\r\n } @else {\r\n <button mat-menu-item (click)=\"onOptionClick(opt, $event)\">\r\n <span>{{ opt.label }}</span>\r\n </button>\r\n }\r\n }\r\n </mat-menu>\r\n</div>\r\n\r\n", styles: [".lib-menu{display:inline-flex}.lib-menu__trigger{display:inline-flex;align-items:center;justify-content:space-between;gap:.5rem;min-width:12rem;padding-inline:.75rem;text-transform:none}.lib-menu__trigger-label{font-size:.875rem;color:#0009}.lib-menu__trigger-value{flex:1;text-align:left}.lib-menu__trigger-icon{font-size:20px}.lib-menu__filter{padding:.5rem 1rem .25rem}.lib-menu__filter-field{width:100%}.lib-menu__panel{max-width:20rem}\n"] }]
|
|
1045
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], filterable: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterable", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
1046
|
+
|
|
1047
|
+
class LibButtonComponent {
|
|
1048
|
+
size = input('medium', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
1049
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
1050
|
+
type = input('button', ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
1051
|
+
fullWidth = input(false, ...(ngDevMode ? [{ debugName: "fullWidth" }] : []));
|
|
1052
|
+
variant = input('filled', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
1053
|
+
shape = input('round', ...(ngDevMode ? [{ debugName: "shape" }] : []));
|
|
1054
|
+
toggle = input(false, ...(ngDevMode ? [{ debugName: "toggle" }] : []));
|
|
1055
|
+
selected = input(false, ...(ngDevMode ? [{ debugName: "selected" }] : []));
|
|
1056
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
1057
|
+
icon = input('', ...(ngDevMode ? [{ debugName: "icon" }] : []));
|
|
1058
|
+
iconPosition = input('leading', ...(ngDevMode ? [{ debugName: "iconPosition" }] : []));
|
|
1059
|
+
contentAlign = input('center', ...(ngDevMode ? [{ debugName: "contentAlign" }] : []));
|
|
1060
|
+
labelClass = input('', ...(ngDevMode ? [{ debugName: "labelClass" }] : []));
|
|
1061
|
+
pressed = input(false, ...(ngDevMode ? [{ debugName: "pressed" }] : []));
|
|
1062
|
+
debugPadding = input(false, ...(ngDevMode ? [{ debugName: "debugPadding" }] : []));
|
|
1063
|
+
isPressed = signal(false, ...(ngDevMode ? [{ debugName: "isPressed" }] : []));
|
|
1064
|
+
/** Si hay label o icon por input, se usa contenido interno; si no, ng-content. */
|
|
1065
|
+
hasInputContent = computed(() => this.label().length > 0 || this.icon().length > 0, ...(ngDevMode ? [{ debugName: "hasInputContent" }] : []));
|
|
1066
|
+
/** contentAlign ya es 'start' | 'center' | 'end'; se usa directo para las clases CSS. */
|
|
1067
|
+
contentAlignNormalized = computed(() => this.contentAlign(), ...(ngDevMode ? [{ debugName: "contentAlignNormalized" }] : []));
|
|
1068
|
+
classes = computed(() => ({
|
|
1069
|
+
'lib-mat-btn': true,
|
|
1070
|
+
'lib-mat-btn--xsmall': this.size() === 'xsmall',
|
|
1071
|
+
'lib-mat-btn--small': this.size() === 'small',
|
|
1072
|
+
'lib-mat-btn--medium': this.size() === 'medium',
|
|
1073
|
+
'lib-mat-btn--large': this.size() === 'large',
|
|
1074
|
+
'lib-mat-btn--xlarge': this.size() === 'xlarge',
|
|
1075
|
+
'lib-mat-btn--full': this.fullWidth(),
|
|
1076
|
+
'lib-mat-btn--variant-filled': this.variant() === 'filled',
|
|
1077
|
+
'lib-mat-btn--variant-outlined': this.variant() === 'outlined',
|
|
1078
|
+
'lib-mat-btn--variant-tonal': this.variant() === 'tonal',
|
|
1079
|
+
'lib-mat-btn--variant-text': this.variant() === 'text',
|
|
1080
|
+
'lib-mat-btn--variant-elevated': this.variant() === 'elevated',
|
|
1081
|
+
'lib-mat-btn--shape-round': this.shape() === 'round',
|
|
1082
|
+
'lib-mat-btn--shape-square': this.shape() === 'square',
|
|
1083
|
+
'lib-mat-btn--toggle': this.toggle(),
|
|
1084
|
+
'lib-mat-btn--selected': this.toggle() && this.selected(),
|
|
1085
|
+
'lib-mat-btn--pressed': this.isPressed() || this.pressed(),
|
|
1086
|
+
'lib-mat-btn--debug-padding': this.debugPadding(),
|
|
1087
|
+
'lib-mat-btn--align-start': this.contentAlignNormalized() === 'start',
|
|
1088
|
+
'lib-mat-btn--align-center': this.contentAlignNormalized() === 'center',
|
|
1089
|
+
'lib-mat-btn--align-end': this.contentAlignNormalized() === 'end',
|
|
1090
|
+
}), ...(ngDevMode ? [{ debugName: "classes" }] : []));
|
|
1091
|
+
onPressStart() {
|
|
1092
|
+
if (!this.disabled())
|
|
1093
|
+
this.isPressed.set(true);
|
|
1094
|
+
}
|
|
1095
|
+
onPressEnd() {
|
|
1096
|
+
this.isPressed.set(false);
|
|
1097
|
+
}
|
|
1098
|
+
onPressCancel() {
|
|
1099
|
+
this.isPressed.set(false);
|
|
1100
|
+
}
|
|
1101
|
+
onKeyDown(event) {
|
|
1102
|
+
if (this.disabled())
|
|
1103
|
+
return;
|
|
1104
|
+
if (event.code === 'Space' || event.code === 'Enter')
|
|
1105
|
+
this.isPressed.set(true);
|
|
1106
|
+
}
|
|
1107
|
+
onKeyUp() {
|
|
1108
|
+
this.isPressed.set(false);
|
|
1109
|
+
}
|
|
1110
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1111
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: LibButtonComponent, isStandalone: true, selector: "lib-button", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, toggle: { classPropertyName: "toggle", publicName: "toggle", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconPosition: { classPropertyName: "iconPosition", publicName: "iconPosition", isSignal: true, isRequired: false, transformFunction: null }, contentAlign: { classPropertyName: "contentAlign", publicName: "contentAlign", isSignal: true, isRequired: false, transformFunction: null }, labelClass: { classPropertyName: "labelClass", publicName: "labelClass", isSignal: true, isRequired: false, transformFunction: null }, pressed: { classPropertyName: "pressed", publicName: "pressed", isSignal: true, isRequired: false, transformFunction: null }, debugPadding: { classPropertyName: "debugPadding", publicName: "debugPadding", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.lib-mat-btn-host--full": "fullWidth()" } }, ngImport: i0, template: "@switch (variant()) {\r\n @case ('filled') {\r\n <button\r\n mat-flat-button\r\n class=\"lib-mat-btn\"\r\n [attr.type]=\"type()\"\r\n [disabled]=\"disabled()\"\r\n [ngClass]=\"classes()\"\r\n [attr.aria-pressed]=\"toggle() ? selected() : null\"\r\n (pointerdown)=\"onPressStart()\"\r\n (pointerup)=\"onPressEnd()\"\r\n (pointerleave)=\"onPressCancel()\"\r\n (pointercancel)=\"onPressCancel()\"\r\n (keydown)=\"onKeyDown($event)\"\r\n (keyup)=\"onKeyUp()\"\r\n (blur)=\"onPressEnd()\"\r\n >\r\n @if (hasInputContent()) {\r\n @if (iconPosition() === 'leading' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n @if (label()) {\r\n <span [class]=\"labelClass()\">{{ label() }}</span>\r\n }\r\n @if (iconPosition() === 'trailing' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n } @else {\r\n <ng-content></ng-content>\r\n }\r\n </button>\r\n }\r\n @case ('outlined') {\r\n <button\r\n mat-stroked-button\r\n class=\"lib-mat-btn\"\r\n [attr.type]=\"type()\"\r\n [disabled]=\"disabled()\"\r\n [ngClass]=\"classes()\"\r\n [attr.aria-pressed]=\"toggle() ? selected() : null\"\r\n (pointerdown)=\"onPressStart()\"\r\n (pointerup)=\"onPressEnd()\"\r\n (pointerleave)=\"onPressCancel()\"\r\n (pointercancel)=\"onPressCancel()\"\r\n (keydown)=\"onKeyDown($event)\"\r\n (keyup)=\"onKeyUp()\"\r\n (blur)=\"onPressEnd()\"\r\n >\r\n @if (hasInputContent()) {\r\n @if (iconPosition() === 'leading' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n @if (label()) {\r\n <span [class]=\"labelClass()\">{{ label() }}</span>\r\n }\r\n @if (iconPosition() === 'trailing' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n } @else {\r\n <ng-content></ng-content>\r\n }\r\n </button>\r\n }\r\n @case ('tonal') {\r\n <button\r\n matButton\r\n appearance=\"tonal\"\r\n class=\"lib-mat-btn lib-mat-btn--variant-tonal\"\r\n [attr.type]=\"type()\"\r\n [disabled]=\"disabled()\"\r\n [ngClass]=\"classes()\"\r\n [attr.aria-pressed]=\"toggle() ? selected() : null\"\r\n (pointerdown)=\"onPressStart()\"\r\n (pointerup)=\"onPressEnd()\"\r\n (pointerleave)=\"onPressCancel()\"\r\n (pointercancel)=\"onPressCancel()\"\r\n (keydown)=\"onKeyDown($event)\"\r\n (keyup)=\"onKeyUp()\"\r\n (blur)=\"onPressEnd()\"\r\n >\r\n @if (hasInputContent()) {\r\n @if (iconPosition() === 'leading' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n @if (label()) {\r\n <span [class]=\"labelClass()\">{{ label() }}</span>\r\n }\r\n @if (iconPosition() === 'trailing' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n } @else {\r\n <ng-content></ng-content>\r\n }\r\n </button>\r\n }\r\n @case ('text') {\r\n <button\r\n mat-button\r\n class=\"lib-mat-btn\"\r\n [attr.type]=\"type()\"\r\n [disabled]=\"disabled()\"\r\n [ngClass]=\"classes()\"\r\n (pointerdown)=\"onPressStart()\"\r\n (pointerup)=\"onPressEnd()\"\r\n (pointerleave)=\"onPressCancel()\"\r\n (pointercancel)=\"onPressCancel()\"\r\n (keydown)=\"onKeyDown($event)\"\r\n (keyup)=\"onKeyUp()\"\r\n (blur)=\"onPressEnd()\"\r\n >\r\n @if (hasInputContent()) {\r\n @if (iconPosition() === 'leading' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n @if (label()) {\r\n <span [class]=\"labelClass()\">{{ label() }}</span>\r\n }\r\n @if (iconPosition() === 'trailing' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n } @else {\r\n <ng-content></ng-content>\r\n }\r\n </button>\r\n }\r\n @case ('elevated') {\r\n <button\r\n mat-raised-button\r\n class=\"lib-mat-btn\"\r\n [attr.type]=\"type()\"\r\n [disabled]=\"disabled()\"\r\n [ngClass]=\"classes()\"\r\n [attr.aria-pressed]=\"toggle() ? selected() : null\"\r\n (pointerdown)=\"onPressStart()\"\r\n (pointerup)=\"onPressEnd()\"\r\n (pointerleave)=\"onPressCancel()\"\r\n (pointercancel)=\"onPressCancel()\"\r\n (keydown)=\"onKeyDown($event)\"\r\n (keyup)=\"onKeyUp()\"\r\n (blur)=\"onPressEnd()\"\r\n >\r\n @if (hasInputContent()) {\r\n @if (iconPosition() === 'leading' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n @if (label()) {\r\n <span [class]=\"labelClass()\">{{ label() }}</span>\r\n }\r\n @if (iconPosition() === 'trailing' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n } @else {\r\n <ng-content></ng-content>\r\n }\r\n </button>\r\n }\r\n @default {\r\n <button\r\n mat-flat-button\r\n class=\"lib-mat-btn\"\r\n [attr.type]=\"type()\"\r\n [disabled]=\"disabled()\"\r\n [ngClass]=\"classes()\"\r\n (pointerdown)=\"onPressStart()\"\r\n (pointerup)=\"onPressEnd()\"\r\n (pointerleave)=\"onPressCancel()\"\r\n (pointercancel)=\"onPressCancel()\"\r\n (keydown)=\"onKeyDown($event)\"\r\n (keyup)=\"onKeyUp()\"\r\n (blur)=\"onPressEnd()\"\r\n >\r\n @if (hasInputContent()) {\r\n @if (iconPosition() === 'leading' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n @if (label()) {\r\n <span [class]=\"labelClass()\">{{ label() }}</span>\r\n }\r\n @if (iconPosition() === 'trailing' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n } @else {\r\n <ng-content></ng-content>\r\n }\r\n </button>\r\n }\r\n}\r\n", styles: [".lib-mat-btn{display:flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;overflow:hidden!important}.lib-mat-btn ::ng-deep .mdc-button__label{overflow:visible!important;position:static!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:var(--lib-mat-btn-gap)!important}.lib-mat-btn ::ng-deep .mdc-button__label>.mat-icon{display:inline-flex!important;align-items:center!important;justify-content:center!important;align-self:center!important;margin:0!important;line-height:1!important;vertical-align:middle!important}.lib-mat-btn ::ng-deep .mdc-button__label>span{display:inline-flex!important;align-items:center!important;line-height:var(--lib-mat-btn-line-height)!important;vertical-align:middle!important}.lib-mat-btn:focus-visible{outline:none;box-shadow:0 0 0 calc(var(--buttons-wip-button-enabled-button-focus-ring-outline-offset, 2) * 1px) var(--buttons-wip-button-enabled-button-focus-ring-indicator-color, #5b5f61),0 0 0 calc((var(--buttons-wip-button-enabled-button-focus-ring-indicator-thickness, 3) + var(--buttons-wip-button-enabled-button-focus-ring-outline-offset, 2)) * 1px) var(--buttons-wip-button-enabled-button-focus-ring-indicator-color, #5b5f61)}.lib-mat-btn.lib-mat-btn--pressed:not([disabled]){border-radius:calc(var(--lib-mat-btn-pressed-radius, var(--buttons-wip-size-medium-button-medium-shape-pressed-morph, 8)) * 1px)}.lib-mat-btn.lib-mat-btn--debug-padding{box-shadow:inset var(--lib-mat-btn-padding-x) 0 0 0 #f009,inset calc(100% - var(--lib-mat-btn-padding-x-right) - 2px) 0 0 0 #0064ff99}.lib-mat-btn__content{position:relative;z-index:0;display:flex;align-items:center;justify-content:center;gap:var(--lib-mat-btn-gap)}.lib-mat-btn--align-start .lib-mat-btn__content,.lib-mat-btn--align-center .lib-mat-btn__content,.lib-mat-btn--align-end .lib-mat-btn__content{width:100%}.lib-mat-btn--align-start .lib-mat-btn__content{justify-content:flex-start}.lib-mat-btn--align-center .lib-mat-btn__content{justify-content:center}.lib-mat-btn--align-end .lib-mat-btn__content{justify-content:flex-end}:host .lib-mat-btn--align-start .mdc-button__label,:host ::ng-deep .lib-mat-btn--align-start .mdc-button__label{width:100%!important;justify-content:flex-start!important}:host .lib-mat-btn--align-center .mdc-button__label,:host ::ng-deep .lib-mat-btn--align-center .mdc-button__label{width:100%!important;justify-content:center!important}:host .lib-mat-btn--align-end .mdc-button__label,:host ::ng-deep .lib-mat-btn--align-end .mdc-button__label{width:100%!important;justify-content:flex-end!important}.lib-mat-btn{--lib-mat-btn-height: calc(var(--buttons-wip-size-medium-button-medium-container-height) * 1px);--lib-mat-btn-padding-x: calc(var(--buttons-wip-size-medium-button-medium-leading-space) * 1px);--lib-mat-btn-padding-x-right: calc(var(--buttons-wip-size-medium-button-medium-leading-space) * 1px);--lib-mat-btn-gap: calc(var(--buttons-wip-size-medium-button-medium-between-icon-label-space) * 1px);--lib-mat-btn-radius-round: calc(var(--buttons-wip-size-medium-button-medium-shape-round, 1000) * 1px);--lib-mat-btn-radius-square: calc(var(--buttons-wip-size-medium-button-medium-shape-square, 12) * 1px);--lib-mat-btn-radius: var(--lib-mat-btn-radius-round);--lib-mat-btn-font-size: calc(var(--buttons-wip-size-medium-button-medium-label-text-size) * 1px);--lib-mat-btn-line-height: calc(var(--buttons-wip-size-medium-button-medium-label-text-line-height) * 1px);--lib-mat-btn-tracking: calc(var(--buttons-wip-size-medium-button-medium-label-text-tracking) * 1px);--lib-mat-btn-icon-size: calc(var(--buttons-wip-size-medium-button-medium-icon-size) * 1px);min-height:var(--lib-mat-btn-height);height:var(--lib-mat-btn-height);padding-left:var(--lib-mat-btn-padding-x)!important;padding-right:var(--lib-mat-btn-padding-x)!important;color:var(--buttons-wip-color-filled-enabled-button-filled-label-color, #fff);font-family:var(--buttons-wip-size-medium-button-medium-label-text-font, Heebo);font-size:var(--lib-mat-btn-font-size);font-style:normal;font-weight:var(--buttons-wip-size-medium-button-medium-label-text-weight, 500);line-height:var(--lib-mat-btn-line-height);letter-spacing:var(--lib-mat-btn-tracking);border-radius:var(--lib-mat-btn-radius)}.lib-mat-btn--variant-outlined{color:var(--buttons-wip-color-outlined-enabled-button-outlined-label-color, #434749)!important}.lib-mat-btn--variant-outlined:focus-visible{color:var(--buttons-wip-color-outlined-focused-button-outlined-focused-label-color, #434749)!important}.lib-mat-btn--variant-outlined .lib-mat-btn__content,.lib-mat-btn--variant-outlined .mdc-button__label{color:inherit!important}.lib-mat-btn--variant-tonal{background-color:var(--buttons-wip-color-tonal-enabled-button-tonal-container-color, #e0e3e5)!important;color:var(--buttons-wip-color-tonal-enabled-button-tonal-label-color, #434749)!important;--mat-button-tonal-ripple-color: var(--buttons-wip-color-tonal-pressed-button-tonal-pressed-ripple-color, rgba(67, 71, 73, .1))}:host ::ng-deep .lib-mat-btn--variant-tonal:hover:not([disabled]) .mat-mdc-button-persistent-ripple:before{background-color:var(--buttons-wip-color-tonal-hovered-button-tonal-hovered-container-state-layer-color, rgba(67, 71, 73, .08))!important;opacity:1!important}:host ::ng-deep .lib-mat-btn--variant-tonal.cdk-program-focused .mat-mdc-button-persistent-ripple:before,:host ::ng-deep .lib-mat-btn--variant-tonal.cdk-keyboard-focused .mat-mdc-button-persistent-ripple:before{background-color:var(--buttons-wip-color-tonal-focused-button-tonal-focused-container-state-layer-color, rgba(67, 71, 73, .1))!important;opacity:1!important}:host ::ng-deep .lib-mat-btn--variant-tonal:active:not([disabled]) .mat-mdc-button-persistent-ripple:before{background-color:var(--buttons-wip-color-tonal-pressed-button-tonal-pressed-container-state-layer-color, rgba(67, 71, 73, .1))!important;opacity:1!important}:host ::ng-deep .lib-mat-btn--variant-tonal .mat-ripple-element{background-color:var(--buttons-wip-color-tonal-pressed-button-tonal-pressed-ripple-color, rgba(67, 71, 73, .1))!important}.lib-mat-btn--full{width:100%}.lib-mat-btn--xsmall{--lib-mat-btn-height: calc(var(--buttons-wip-size-xsmall-button-xsmall-container-height) * 1px);--lib-mat-btn-padding-x: calc(var(--buttons-wip-size-xsmall-button-xsmall-leading-space) * 1px);--lib-mat-btn-padding-x-right: calc(var(--buttons-wip-size-xsmall-button-xsmall-trailing-space) * 1px);--lib-mat-btn-gap: calc(var(--buttons-wip-size-xsmall-button-xsmall-between-icon-label-space) * 1px);--lib-mat-btn-radius-round: calc(var(--buttons-wip-size-xsmall-button-xsmall-shape-round, 1000) * 1px);--lib-mat-btn-radius-square: calc(var(--buttons-wip-size-xsmall-button-xsmall-shape-square, 8) * 1px);--lib-mat-btn-radius: var(--lib-mat-btn-radius-round);--lib-mat-btn-pressed-radius: var(--buttons-wip-size-xsmall-button-xsmall-shape-pressed-morph);--lib-mat-btn-font-size: calc(var(--buttons-wip-size-xsmall-button-xsmall-label-text-size) * 1px);--lib-mat-btn-line-height: calc(var(--buttons-wip-size-xsmall-button-xsmall-label-text-line-height) * 1px);--lib-mat-btn-tracking: calc(var(--buttons-wip-size-xsmall-button-xsmall-label-text-tracking) * 1px);--lib-mat-btn-icon-size: calc(var(--buttons-wip-size-xsmall-button-xsmall-icon-size) * 1px);min-height:var(--lib-mat-btn-height);height:var(--lib-mat-btn-height);padding-left:var(--lib-mat-btn-padding-x)!important;padding-right:var(--lib-mat-btn-padding-x-right)!important;color:var(--buttons-wip-color-filled-enabled-button-filled-label-color, #fff);font-family:var(--buttons-wip-size-xsmall-button-xsmall-label-text-font, Heebo);font-size:var(--lib-mat-btn-font-size);font-style:normal;font-weight:var(--buttons-wip-size-xsmall-button-xsmall-label-text-weight, 500);line-height:var(--lib-mat-btn-line-height);letter-spacing:var(--lib-mat-btn-tracking);border-radius:var(--lib-mat-btn-radius)}.lib-mat-btn--xsmall .mat-icon,.lib-mat-btn--xsmall .mat-mdc-button-touch-target{width:var(--lib-mat-btn-icon-size);height:var(--lib-mat-btn-icon-size);display:flex;align-items:center;justify-content:center}.lib-mat-btn--small{--lib-mat-btn-height: calc(var(--buttons-wip-size-small-button-small-container-height) * 1px);--lib-mat-btn-padding-x: calc(var(--buttons-wip-size-small-button-small-leading-space) * 1px);--lib-mat-btn-padding-x-right: calc(var(--buttons-wip-size-small-button-small-trailing-space) * 1px);--lib-mat-btn-gap: calc(var(--buttons-wip-size-small-button-small-between-icon-label-space) * 1px);--lib-mat-btn-radius-round: calc(var(--buttons-wip-size-small-button-small-shape-round, 1000) * 1px);--lib-mat-btn-radius-square: calc(var(--buttons-wip-size-small-button-small-shape-square, 8) * 1px);--lib-mat-btn-radius: var(--lib-mat-btn-radius-round);--lib-mat-btn-pressed-radius: var(--buttons-wip-size-small-button-small-shape-pressed-morph);--lib-mat-btn-font-size: calc(var(--buttons-wip-size-small-button-small-label-text-size) * 1px);--lib-mat-btn-line-height: calc(var(--buttons-wip-size-small-button-small-label-text-line-height) * 1px);--lib-mat-btn-tracking: calc(var(--buttons-wip-size-small-button-small-label-text-tracking) * 1px);--lib-mat-btn-icon-size: calc(var(--buttons-wip-size-small-button-small-icon-size) * 1px);min-height:var(--lib-mat-btn-height);height:var(--lib-mat-btn-height);padding-left:var(--lib-mat-btn-padding-x)!important;padding-right:var(--lib-mat-btn-padding-x-right)!important;color:var(--buttons-wip-color-filled-enabled-button-filled-label-color, #fff);font-family:var(--buttons-wip-size-small-button-small-label-text-font, Heebo);font-size:var(--lib-mat-btn-font-size);font-style:normal;font-weight:var(--buttons-wip-size-small-button-small-label-text-weight, 500)!important;line-height:var(--lib-mat-btn-line-height);letter-spacing:var(--lib-mat-btn-tracking);border-radius:var(--lib-mat-btn-radius)}.lib-mat-btn--small .mat-icon,.lib-mat-btn--small .mat-mdc-button-touch-target{width:var(--lib-mat-btn-icon-size);height:var(--lib-mat-btn-icon-size);font-size:var(--lib-mat-btn-icon-size);line-height:1;display:flex;align-items:center;justify-content:center}.lib-mat-btn--medium{--lib-mat-btn-height: calc(var(--buttons-wip-size-medium-button-medium-container-height) * 1px);--lib-mat-btn-padding-x: calc(var(--buttons-wip-size-medium-button-medium-leading-space) * 1px);--lib-mat-btn-gap: calc(var(--buttons-wip-size-medium-button-medium-between-icon-label-space) * 1px);--lib-mat-btn-radius-round: calc(var(--buttons-wip-size-medium-button-medium-shape-round, 1000) * 1px);--lib-mat-btn-radius-square: calc(var(--buttons-wip-size-medium-button-medium-shape-square, 12) * 1px);--lib-mat-btn-radius: var(--lib-mat-btn-radius-round);--lib-mat-btn-pressed-radius: var(--buttons-wip-size-medium-button-medium-shape-pressed-morph);--lib-mat-btn-font-size: calc(var(--buttons-wip-size-medium-button-medium-label-text-size) * 1px);--lib-mat-btn-line-height: calc(var(--buttons-wip-size-medium-button-medium-label-text-line-height) * 1px);--lib-mat-btn-tracking: calc(var(--buttons-wip-size-medium-button-medium-label-text-tracking) * 1px);--lib-mat-btn-icon-size: calc(var(--buttons-wip-size-medium-button-medium-icon-size) * 1px);min-height:var(--lib-mat-btn-height);height:var(--lib-mat-btn-height);padding-left:var(--lib-mat-btn-padding-x)!important;padding-right:var(--lib-mat-btn-padding-x-right)!important;color:var(--buttons-wip-color-filled-enabled-button-filled-label-color, #fff);font-family:var(--buttons-wip-size-medium-button-medium-label-text-font, Heebo);font-size:var(--lib-mat-btn-font-size);font-style:normal;font-weight:var(--buttons-wip-size-medium-button-medium-label-text-weight, 500)!important;line-height:var(--lib-mat-btn-line-height);letter-spacing:var(--lib-mat-btn-tracking);border-radius:var(--lib-mat-btn-radius)}.lib-mat-btn--medium .mat-icon,.lib-mat-btn--medium .mat-mdc-button-touch-target{width:var(--lib-mat-btn-icon-size);height:var(--lib-mat-btn-icon-size);font-size:var(--lib-mat-btn-icon-size);line-height:1;display:flex;align-items:center;justify-content:center}.lib-mat-btn--large{--lib-mat-btn-height: calc(var(--buttons-wip-size-large-button-large-container-height) * 1px);--lib-mat-btn-padding-x: calc(var(--buttons-wip-size-large-button-large-leading-space) * 1px);--lib-mat-btn-padding-x-right: calc(var(--buttons-wip-size-large-button-large-trailing-space) * 1px);--lib-mat-btn-gap: calc(var(--buttons-wip-size-large-button-large-between-icon-label-space) * 1px);--lib-mat-btn-radius-round: calc(var(--buttons-wip-size-large-button-large-shape-round, 1000) * 1px);--lib-mat-btn-radius-square: calc(var(--buttons-wip-size-large-button-large-shape-square, 16) * 1px);--lib-mat-btn-radius: var(--lib-mat-btn-radius-round);--lib-mat-btn-pressed-radius: var(--buttons-wip-size-large-button-large-shape-pressed-morph);--lib-mat-btn-font-size: calc(var(--buttons-wip-size-large-button-large-label-text-size) * 1px);--lib-mat-btn-line-height: calc(var(--buttons-wip-size-large-button-large-label-text-line-height) * 1px);--lib-mat-btn-tracking: calc(var(--buttons-wip-size-large-button-large-label-text-tracking) * 1px);--lib-mat-btn-icon-size: calc(var(--buttons-wip-size-large-button-large-icon-size) * 1px);min-height:var(--lib-mat-btn-height);height:var(--lib-mat-btn-height);padding-left:var(--lib-mat-btn-padding-x)!important;padding-right:var(--lib-mat-btn-padding-x-right)!important;color:var(--buttons-wip-color-filled-enabled-button-filled-label-color, #fff);font-family:var(--buttons-wip-size-large-button-large-label-text-font, Heebo);font-size:var(--lib-mat-btn-font-size);font-style:normal;font-weight:var(--buttons-wip-size-large-button-large-label-text-weight, 400)!important;line-height:var(--lib-mat-btn-line-height);letter-spacing:var(--lib-mat-btn-tracking);border-radius:var(--lib-mat-btn-radius)}.lib-mat-btn--large .mat-icon,.lib-mat-btn--large .mat-mdc-button-touch-target{width:var(--lib-mat-btn-icon-size);height:var(--lib-mat-btn-icon-size);font-size:var(--lib-mat-btn-icon-size);line-height:1;display:flex;align-items:center;justify-content:center}.lib-mat-btn--xlarge{--lib-mat-btn-height: calc(var(--buttons-wip-size-xlarge-button-xlarge-container-height) * 1px);--lib-mat-btn-padding-x: calc(var(--buttons-wip-size-xlarge-button-xlarge-leading-space) * 1px);--lib-mat-btn-padding-x-right: calc(var(--buttons-wip-size-xlarge-button-xlarge-trailing-space) * 1px);--lib-mat-btn-gap: calc(var(--buttons-wip-size-xlarge-button-xlarge-between-icon-label-space) * 1px);--lib-mat-btn-radius-round: calc(var(--buttons-wip-size-xlarge-button-xlarge-shape-round, 1000) * 1px);--lib-mat-btn-radius-square: calc(var(--buttons-wip-size-xlarge-button-xlarge-shape-square, 16) * 1px);--lib-mat-btn-radius: var(--lib-mat-btn-radius-round);--lib-mat-btn-pressed-radius: var(--buttons-wip-size-xlarge-button-xlarge-shape-pressed-morph);--lib-mat-btn-font-size: calc(var(--buttons-wip-size-xlarge-button-xlarge-label-text-size) * 1px);--lib-mat-btn-line-height: calc(var(--buttons-wip-size-xlarge-button-xlarge-label-text-line-height) * 1px);--lib-mat-btn-tracking: calc(var(--buttons-wip-size-xlarge-button-xlarge-label-text-tracking) * 1px);--lib-mat-btn-icon-size: calc(var(--buttons-wip-size-xlarge-button-xlarge-icon-size) * 1px);min-height:var(--lib-mat-btn-height);height:var(--lib-mat-btn-height);padding-left:var(--lib-mat-btn-padding-x)!important;padding-right:var(--lib-mat-btn-padding-x-right)!important;color:var(--buttons-wip-color-filled-enabled-button-filled-label-color, #fff);font-family:var(--buttons-wip-size-xlarge-button-xlarge-label-text-font, Heebo);font-size:var(--lib-mat-btn-font-size);font-style:normal;font-weight:var(--buttons-wip-size-xlarge-button-xlarge-label-text-weight, 400)!important;line-height:var(--lib-mat-btn-line-height);letter-spacing:var(--lib-mat-btn-tracking);border-radius:var(--lib-mat-btn-radius)}.lib-mat-btn--xlarge .mat-icon,.lib-mat-btn--xlarge .mat-mdc-button-touch-target{width:var(--lib-mat-btn-icon-size);height:var(--lib-mat-btn-icon-size);font-size:var(--lib-mat-btn-icon-size);line-height:1;display:flex;align-items:center;justify-content:center}.lib-mat-btn--shape-round{--lib-mat-btn-radius: var(--lib-mat-btn-radius-round)}.lib-mat-btn--shape-square{--lib-mat-btn-radius: var(--lib-mat-btn-radius-square)}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$3.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1112
|
+
}
|
|
1113
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibButtonComponent, decorators: [{
|
|
1114
|
+
type: Component,
|
|
1115
|
+
args: [{ selector: 'lib-button', standalone: true, imports: [MatButtonModule, MatIconModule, NgClass], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1116
|
+
'[class.lib-mat-btn-host--full]': 'fullWidth()',
|
|
1117
|
+
}, template: "@switch (variant()) {\r\n @case ('filled') {\r\n <button\r\n mat-flat-button\r\n class=\"lib-mat-btn\"\r\n [attr.type]=\"type()\"\r\n [disabled]=\"disabled()\"\r\n [ngClass]=\"classes()\"\r\n [attr.aria-pressed]=\"toggle() ? selected() : null\"\r\n (pointerdown)=\"onPressStart()\"\r\n (pointerup)=\"onPressEnd()\"\r\n (pointerleave)=\"onPressCancel()\"\r\n (pointercancel)=\"onPressCancel()\"\r\n (keydown)=\"onKeyDown($event)\"\r\n (keyup)=\"onKeyUp()\"\r\n (blur)=\"onPressEnd()\"\r\n >\r\n @if (hasInputContent()) {\r\n @if (iconPosition() === 'leading' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n @if (label()) {\r\n <span [class]=\"labelClass()\">{{ label() }}</span>\r\n }\r\n @if (iconPosition() === 'trailing' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n } @else {\r\n <ng-content></ng-content>\r\n }\r\n </button>\r\n }\r\n @case ('outlined') {\r\n <button\r\n mat-stroked-button\r\n class=\"lib-mat-btn\"\r\n [attr.type]=\"type()\"\r\n [disabled]=\"disabled()\"\r\n [ngClass]=\"classes()\"\r\n [attr.aria-pressed]=\"toggle() ? selected() : null\"\r\n (pointerdown)=\"onPressStart()\"\r\n (pointerup)=\"onPressEnd()\"\r\n (pointerleave)=\"onPressCancel()\"\r\n (pointercancel)=\"onPressCancel()\"\r\n (keydown)=\"onKeyDown($event)\"\r\n (keyup)=\"onKeyUp()\"\r\n (blur)=\"onPressEnd()\"\r\n >\r\n @if (hasInputContent()) {\r\n @if (iconPosition() === 'leading' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n @if (label()) {\r\n <span [class]=\"labelClass()\">{{ label() }}</span>\r\n }\r\n @if (iconPosition() === 'trailing' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n } @else {\r\n <ng-content></ng-content>\r\n }\r\n </button>\r\n }\r\n @case ('tonal') {\r\n <button\r\n matButton\r\n appearance=\"tonal\"\r\n class=\"lib-mat-btn lib-mat-btn--variant-tonal\"\r\n [attr.type]=\"type()\"\r\n [disabled]=\"disabled()\"\r\n [ngClass]=\"classes()\"\r\n [attr.aria-pressed]=\"toggle() ? selected() : null\"\r\n (pointerdown)=\"onPressStart()\"\r\n (pointerup)=\"onPressEnd()\"\r\n (pointerleave)=\"onPressCancel()\"\r\n (pointercancel)=\"onPressCancel()\"\r\n (keydown)=\"onKeyDown($event)\"\r\n (keyup)=\"onKeyUp()\"\r\n (blur)=\"onPressEnd()\"\r\n >\r\n @if (hasInputContent()) {\r\n @if (iconPosition() === 'leading' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n @if (label()) {\r\n <span [class]=\"labelClass()\">{{ label() }}</span>\r\n }\r\n @if (iconPosition() === 'trailing' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n } @else {\r\n <ng-content></ng-content>\r\n }\r\n </button>\r\n }\r\n @case ('text') {\r\n <button\r\n mat-button\r\n class=\"lib-mat-btn\"\r\n [attr.type]=\"type()\"\r\n [disabled]=\"disabled()\"\r\n [ngClass]=\"classes()\"\r\n (pointerdown)=\"onPressStart()\"\r\n (pointerup)=\"onPressEnd()\"\r\n (pointerleave)=\"onPressCancel()\"\r\n (pointercancel)=\"onPressCancel()\"\r\n (keydown)=\"onKeyDown($event)\"\r\n (keyup)=\"onKeyUp()\"\r\n (blur)=\"onPressEnd()\"\r\n >\r\n @if (hasInputContent()) {\r\n @if (iconPosition() === 'leading' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n @if (label()) {\r\n <span [class]=\"labelClass()\">{{ label() }}</span>\r\n }\r\n @if (iconPosition() === 'trailing' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n } @else {\r\n <ng-content></ng-content>\r\n }\r\n </button>\r\n }\r\n @case ('elevated') {\r\n <button\r\n mat-raised-button\r\n class=\"lib-mat-btn\"\r\n [attr.type]=\"type()\"\r\n [disabled]=\"disabled()\"\r\n [ngClass]=\"classes()\"\r\n [attr.aria-pressed]=\"toggle() ? selected() : null\"\r\n (pointerdown)=\"onPressStart()\"\r\n (pointerup)=\"onPressEnd()\"\r\n (pointerleave)=\"onPressCancel()\"\r\n (pointercancel)=\"onPressCancel()\"\r\n (keydown)=\"onKeyDown($event)\"\r\n (keyup)=\"onKeyUp()\"\r\n (blur)=\"onPressEnd()\"\r\n >\r\n @if (hasInputContent()) {\r\n @if (iconPosition() === 'leading' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n @if (label()) {\r\n <span [class]=\"labelClass()\">{{ label() }}</span>\r\n }\r\n @if (iconPosition() === 'trailing' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n } @else {\r\n <ng-content></ng-content>\r\n }\r\n </button>\r\n }\r\n @default {\r\n <button\r\n mat-flat-button\r\n class=\"lib-mat-btn\"\r\n [attr.type]=\"type()\"\r\n [disabled]=\"disabled()\"\r\n [ngClass]=\"classes()\"\r\n (pointerdown)=\"onPressStart()\"\r\n (pointerup)=\"onPressEnd()\"\r\n (pointerleave)=\"onPressCancel()\"\r\n (pointercancel)=\"onPressCancel()\"\r\n (keydown)=\"onKeyDown($event)\"\r\n (keyup)=\"onKeyUp()\"\r\n (blur)=\"onPressEnd()\"\r\n >\r\n @if (hasInputContent()) {\r\n @if (iconPosition() === 'leading' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n @if (label()) {\r\n <span [class]=\"labelClass()\">{{ label() }}</span>\r\n }\r\n @if (iconPosition() === 'trailing' && icon()) {\r\n <mat-icon [svgIcon]=\"icon()\">{{ icon() }}</mat-icon>\r\n }\r\n } @else {\r\n <ng-content></ng-content>\r\n }\r\n </button>\r\n }\r\n}\r\n", styles: [".lib-mat-btn{display:flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;overflow:hidden!important}.lib-mat-btn ::ng-deep .mdc-button__label{overflow:visible!important;position:static!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:var(--lib-mat-btn-gap)!important}.lib-mat-btn ::ng-deep .mdc-button__label>.mat-icon{display:inline-flex!important;align-items:center!important;justify-content:center!important;align-self:center!important;margin:0!important;line-height:1!important;vertical-align:middle!important}.lib-mat-btn ::ng-deep .mdc-button__label>span{display:inline-flex!important;align-items:center!important;line-height:var(--lib-mat-btn-line-height)!important;vertical-align:middle!important}.lib-mat-btn:focus-visible{outline:none;box-shadow:0 0 0 calc(var(--buttons-wip-button-enabled-button-focus-ring-outline-offset, 2) * 1px) var(--buttons-wip-button-enabled-button-focus-ring-indicator-color, #5b5f61),0 0 0 calc((var(--buttons-wip-button-enabled-button-focus-ring-indicator-thickness, 3) + var(--buttons-wip-button-enabled-button-focus-ring-outline-offset, 2)) * 1px) var(--buttons-wip-button-enabled-button-focus-ring-indicator-color, #5b5f61)}.lib-mat-btn.lib-mat-btn--pressed:not([disabled]){border-radius:calc(var(--lib-mat-btn-pressed-radius, var(--buttons-wip-size-medium-button-medium-shape-pressed-morph, 8)) * 1px)}.lib-mat-btn.lib-mat-btn--debug-padding{box-shadow:inset var(--lib-mat-btn-padding-x) 0 0 0 #f009,inset calc(100% - var(--lib-mat-btn-padding-x-right) - 2px) 0 0 0 #0064ff99}.lib-mat-btn__content{position:relative;z-index:0;display:flex;align-items:center;justify-content:center;gap:var(--lib-mat-btn-gap)}.lib-mat-btn--align-start .lib-mat-btn__content,.lib-mat-btn--align-center .lib-mat-btn__content,.lib-mat-btn--align-end .lib-mat-btn__content{width:100%}.lib-mat-btn--align-start .lib-mat-btn__content{justify-content:flex-start}.lib-mat-btn--align-center .lib-mat-btn__content{justify-content:center}.lib-mat-btn--align-end .lib-mat-btn__content{justify-content:flex-end}:host .lib-mat-btn--align-start .mdc-button__label,:host ::ng-deep .lib-mat-btn--align-start .mdc-button__label{width:100%!important;justify-content:flex-start!important}:host .lib-mat-btn--align-center .mdc-button__label,:host ::ng-deep .lib-mat-btn--align-center .mdc-button__label{width:100%!important;justify-content:center!important}:host .lib-mat-btn--align-end .mdc-button__label,:host ::ng-deep .lib-mat-btn--align-end .mdc-button__label{width:100%!important;justify-content:flex-end!important}.lib-mat-btn{--lib-mat-btn-height: calc(var(--buttons-wip-size-medium-button-medium-container-height) * 1px);--lib-mat-btn-padding-x: calc(var(--buttons-wip-size-medium-button-medium-leading-space) * 1px);--lib-mat-btn-padding-x-right: calc(var(--buttons-wip-size-medium-button-medium-leading-space) * 1px);--lib-mat-btn-gap: calc(var(--buttons-wip-size-medium-button-medium-between-icon-label-space) * 1px);--lib-mat-btn-radius-round: calc(var(--buttons-wip-size-medium-button-medium-shape-round, 1000) * 1px);--lib-mat-btn-radius-square: calc(var(--buttons-wip-size-medium-button-medium-shape-square, 12) * 1px);--lib-mat-btn-radius: var(--lib-mat-btn-radius-round);--lib-mat-btn-font-size: calc(var(--buttons-wip-size-medium-button-medium-label-text-size) * 1px);--lib-mat-btn-line-height: calc(var(--buttons-wip-size-medium-button-medium-label-text-line-height) * 1px);--lib-mat-btn-tracking: calc(var(--buttons-wip-size-medium-button-medium-label-text-tracking) * 1px);--lib-mat-btn-icon-size: calc(var(--buttons-wip-size-medium-button-medium-icon-size) * 1px);min-height:var(--lib-mat-btn-height);height:var(--lib-mat-btn-height);padding-left:var(--lib-mat-btn-padding-x)!important;padding-right:var(--lib-mat-btn-padding-x)!important;color:var(--buttons-wip-color-filled-enabled-button-filled-label-color, #fff);font-family:var(--buttons-wip-size-medium-button-medium-label-text-font, Heebo);font-size:var(--lib-mat-btn-font-size);font-style:normal;font-weight:var(--buttons-wip-size-medium-button-medium-label-text-weight, 500);line-height:var(--lib-mat-btn-line-height);letter-spacing:var(--lib-mat-btn-tracking);border-radius:var(--lib-mat-btn-radius)}.lib-mat-btn--variant-outlined{color:var(--buttons-wip-color-outlined-enabled-button-outlined-label-color, #434749)!important}.lib-mat-btn--variant-outlined:focus-visible{color:var(--buttons-wip-color-outlined-focused-button-outlined-focused-label-color, #434749)!important}.lib-mat-btn--variant-outlined .lib-mat-btn__content,.lib-mat-btn--variant-outlined .mdc-button__label{color:inherit!important}.lib-mat-btn--variant-tonal{background-color:var(--buttons-wip-color-tonal-enabled-button-tonal-container-color, #e0e3e5)!important;color:var(--buttons-wip-color-tonal-enabled-button-tonal-label-color, #434749)!important;--mat-button-tonal-ripple-color: var(--buttons-wip-color-tonal-pressed-button-tonal-pressed-ripple-color, rgba(67, 71, 73, .1))}:host ::ng-deep .lib-mat-btn--variant-tonal:hover:not([disabled]) .mat-mdc-button-persistent-ripple:before{background-color:var(--buttons-wip-color-tonal-hovered-button-tonal-hovered-container-state-layer-color, rgba(67, 71, 73, .08))!important;opacity:1!important}:host ::ng-deep .lib-mat-btn--variant-tonal.cdk-program-focused .mat-mdc-button-persistent-ripple:before,:host ::ng-deep .lib-mat-btn--variant-tonal.cdk-keyboard-focused .mat-mdc-button-persistent-ripple:before{background-color:var(--buttons-wip-color-tonal-focused-button-tonal-focused-container-state-layer-color, rgba(67, 71, 73, .1))!important;opacity:1!important}:host ::ng-deep .lib-mat-btn--variant-tonal:active:not([disabled]) .mat-mdc-button-persistent-ripple:before{background-color:var(--buttons-wip-color-tonal-pressed-button-tonal-pressed-container-state-layer-color, rgba(67, 71, 73, .1))!important;opacity:1!important}:host ::ng-deep .lib-mat-btn--variant-tonal .mat-ripple-element{background-color:var(--buttons-wip-color-tonal-pressed-button-tonal-pressed-ripple-color, rgba(67, 71, 73, .1))!important}.lib-mat-btn--full{width:100%}.lib-mat-btn--xsmall{--lib-mat-btn-height: calc(var(--buttons-wip-size-xsmall-button-xsmall-container-height) * 1px);--lib-mat-btn-padding-x: calc(var(--buttons-wip-size-xsmall-button-xsmall-leading-space) * 1px);--lib-mat-btn-padding-x-right: calc(var(--buttons-wip-size-xsmall-button-xsmall-trailing-space) * 1px);--lib-mat-btn-gap: calc(var(--buttons-wip-size-xsmall-button-xsmall-between-icon-label-space) * 1px);--lib-mat-btn-radius-round: calc(var(--buttons-wip-size-xsmall-button-xsmall-shape-round, 1000) * 1px);--lib-mat-btn-radius-square: calc(var(--buttons-wip-size-xsmall-button-xsmall-shape-square, 8) * 1px);--lib-mat-btn-radius: var(--lib-mat-btn-radius-round);--lib-mat-btn-pressed-radius: var(--buttons-wip-size-xsmall-button-xsmall-shape-pressed-morph);--lib-mat-btn-font-size: calc(var(--buttons-wip-size-xsmall-button-xsmall-label-text-size) * 1px);--lib-mat-btn-line-height: calc(var(--buttons-wip-size-xsmall-button-xsmall-label-text-line-height) * 1px);--lib-mat-btn-tracking: calc(var(--buttons-wip-size-xsmall-button-xsmall-label-text-tracking) * 1px);--lib-mat-btn-icon-size: calc(var(--buttons-wip-size-xsmall-button-xsmall-icon-size) * 1px);min-height:var(--lib-mat-btn-height);height:var(--lib-mat-btn-height);padding-left:var(--lib-mat-btn-padding-x)!important;padding-right:var(--lib-mat-btn-padding-x-right)!important;color:var(--buttons-wip-color-filled-enabled-button-filled-label-color, #fff);font-family:var(--buttons-wip-size-xsmall-button-xsmall-label-text-font, Heebo);font-size:var(--lib-mat-btn-font-size);font-style:normal;font-weight:var(--buttons-wip-size-xsmall-button-xsmall-label-text-weight, 500);line-height:var(--lib-mat-btn-line-height);letter-spacing:var(--lib-mat-btn-tracking);border-radius:var(--lib-mat-btn-radius)}.lib-mat-btn--xsmall .mat-icon,.lib-mat-btn--xsmall .mat-mdc-button-touch-target{width:var(--lib-mat-btn-icon-size);height:var(--lib-mat-btn-icon-size);display:flex;align-items:center;justify-content:center}.lib-mat-btn--small{--lib-mat-btn-height: calc(var(--buttons-wip-size-small-button-small-container-height) * 1px);--lib-mat-btn-padding-x: calc(var(--buttons-wip-size-small-button-small-leading-space) * 1px);--lib-mat-btn-padding-x-right: calc(var(--buttons-wip-size-small-button-small-trailing-space) * 1px);--lib-mat-btn-gap: calc(var(--buttons-wip-size-small-button-small-between-icon-label-space) * 1px);--lib-mat-btn-radius-round: calc(var(--buttons-wip-size-small-button-small-shape-round, 1000) * 1px);--lib-mat-btn-radius-square: calc(var(--buttons-wip-size-small-button-small-shape-square, 8) * 1px);--lib-mat-btn-radius: var(--lib-mat-btn-radius-round);--lib-mat-btn-pressed-radius: var(--buttons-wip-size-small-button-small-shape-pressed-morph);--lib-mat-btn-font-size: calc(var(--buttons-wip-size-small-button-small-label-text-size) * 1px);--lib-mat-btn-line-height: calc(var(--buttons-wip-size-small-button-small-label-text-line-height) * 1px);--lib-mat-btn-tracking: calc(var(--buttons-wip-size-small-button-small-label-text-tracking) * 1px);--lib-mat-btn-icon-size: calc(var(--buttons-wip-size-small-button-small-icon-size) * 1px);min-height:var(--lib-mat-btn-height);height:var(--lib-mat-btn-height);padding-left:var(--lib-mat-btn-padding-x)!important;padding-right:var(--lib-mat-btn-padding-x-right)!important;color:var(--buttons-wip-color-filled-enabled-button-filled-label-color, #fff);font-family:var(--buttons-wip-size-small-button-small-label-text-font, Heebo);font-size:var(--lib-mat-btn-font-size);font-style:normal;font-weight:var(--buttons-wip-size-small-button-small-label-text-weight, 500)!important;line-height:var(--lib-mat-btn-line-height);letter-spacing:var(--lib-mat-btn-tracking);border-radius:var(--lib-mat-btn-radius)}.lib-mat-btn--small .mat-icon,.lib-mat-btn--small .mat-mdc-button-touch-target{width:var(--lib-mat-btn-icon-size);height:var(--lib-mat-btn-icon-size);font-size:var(--lib-mat-btn-icon-size);line-height:1;display:flex;align-items:center;justify-content:center}.lib-mat-btn--medium{--lib-mat-btn-height: calc(var(--buttons-wip-size-medium-button-medium-container-height) * 1px);--lib-mat-btn-padding-x: calc(var(--buttons-wip-size-medium-button-medium-leading-space) * 1px);--lib-mat-btn-gap: calc(var(--buttons-wip-size-medium-button-medium-between-icon-label-space) * 1px);--lib-mat-btn-radius-round: calc(var(--buttons-wip-size-medium-button-medium-shape-round, 1000) * 1px);--lib-mat-btn-radius-square: calc(var(--buttons-wip-size-medium-button-medium-shape-square, 12) * 1px);--lib-mat-btn-radius: var(--lib-mat-btn-radius-round);--lib-mat-btn-pressed-radius: var(--buttons-wip-size-medium-button-medium-shape-pressed-morph);--lib-mat-btn-font-size: calc(var(--buttons-wip-size-medium-button-medium-label-text-size) * 1px);--lib-mat-btn-line-height: calc(var(--buttons-wip-size-medium-button-medium-label-text-line-height) * 1px);--lib-mat-btn-tracking: calc(var(--buttons-wip-size-medium-button-medium-label-text-tracking) * 1px);--lib-mat-btn-icon-size: calc(var(--buttons-wip-size-medium-button-medium-icon-size) * 1px);min-height:var(--lib-mat-btn-height);height:var(--lib-mat-btn-height);padding-left:var(--lib-mat-btn-padding-x)!important;padding-right:var(--lib-mat-btn-padding-x-right)!important;color:var(--buttons-wip-color-filled-enabled-button-filled-label-color, #fff);font-family:var(--buttons-wip-size-medium-button-medium-label-text-font, Heebo);font-size:var(--lib-mat-btn-font-size);font-style:normal;font-weight:var(--buttons-wip-size-medium-button-medium-label-text-weight, 500)!important;line-height:var(--lib-mat-btn-line-height);letter-spacing:var(--lib-mat-btn-tracking);border-radius:var(--lib-mat-btn-radius)}.lib-mat-btn--medium .mat-icon,.lib-mat-btn--medium .mat-mdc-button-touch-target{width:var(--lib-mat-btn-icon-size);height:var(--lib-mat-btn-icon-size);font-size:var(--lib-mat-btn-icon-size);line-height:1;display:flex;align-items:center;justify-content:center}.lib-mat-btn--large{--lib-mat-btn-height: calc(var(--buttons-wip-size-large-button-large-container-height) * 1px);--lib-mat-btn-padding-x: calc(var(--buttons-wip-size-large-button-large-leading-space) * 1px);--lib-mat-btn-padding-x-right: calc(var(--buttons-wip-size-large-button-large-trailing-space) * 1px);--lib-mat-btn-gap: calc(var(--buttons-wip-size-large-button-large-between-icon-label-space) * 1px);--lib-mat-btn-radius-round: calc(var(--buttons-wip-size-large-button-large-shape-round, 1000) * 1px);--lib-mat-btn-radius-square: calc(var(--buttons-wip-size-large-button-large-shape-square, 16) * 1px);--lib-mat-btn-radius: var(--lib-mat-btn-radius-round);--lib-mat-btn-pressed-radius: var(--buttons-wip-size-large-button-large-shape-pressed-morph);--lib-mat-btn-font-size: calc(var(--buttons-wip-size-large-button-large-label-text-size) * 1px);--lib-mat-btn-line-height: calc(var(--buttons-wip-size-large-button-large-label-text-line-height) * 1px);--lib-mat-btn-tracking: calc(var(--buttons-wip-size-large-button-large-label-text-tracking) * 1px);--lib-mat-btn-icon-size: calc(var(--buttons-wip-size-large-button-large-icon-size) * 1px);min-height:var(--lib-mat-btn-height);height:var(--lib-mat-btn-height);padding-left:var(--lib-mat-btn-padding-x)!important;padding-right:var(--lib-mat-btn-padding-x-right)!important;color:var(--buttons-wip-color-filled-enabled-button-filled-label-color, #fff);font-family:var(--buttons-wip-size-large-button-large-label-text-font, Heebo);font-size:var(--lib-mat-btn-font-size);font-style:normal;font-weight:var(--buttons-wip-size-large-button-large-label-text-weight, 400)!important;line-height:var(--lib-mat-btn-line-height);letter-spacing:var(--lib-mat-btn-tracking);border-radius:var(--lib-mat-btn-radius)}.lib-mat-btn--large .mat-icon,.lib-mat-btn--large .mat-mdc-button-touch-target{width:var(--lib-mat-btn-icon-size);height:var(--lib-mat-btn-icon-size);font-size:var(--lib-mat-btn-icon-size);line-height:1;display:flex;align-items:center;justify-content:center}.lib-mat-btn--xlarge{--lib-mat-btn-height: calc(var(--buttons-wip-size-xlarge-button-xlarge-container-height) * 1px);--lib-mat-btn-padding-x: calc(var(--buttons-wip-size-xlarge-button-xlarge-leading-space) * 1px);--lib-mat-btn-padding-x-right: calc(var(--buttons-wip-size-xlarge-button-xlarge-trailing-space) * 1px);--lib-mat-btn-gap: calc(var(--buttons-wip-size-xlarge-button-xlarge-between-icon-label-space) * 1px);--lib-mat-btn-radius-round: calc(var(--buttons-wip-size-xlarge-button-xlarge-shape-round, 1000) * 1px);--lib-mat-btn-radius-square: calc(var(--buttons-wip-size-xlarge-button-xlarge-shape-square, 16) * 1px);--lib-mat-btn-radius: var(--lib-mat-btn-radius-round);--lib-mat-btn-pressed-radius: var(--buttons-wip-size-xlarge-button-xlarge-shape-pressed-morph);--lib-mat-btn-font-size: calc(var(--buttons-wip-size-xlarge-button-xlarge-label-text-size) * 1px);--lib-mat-btn-line-height: calc(var(--buttons-wip-size-xlarge-button-xlarge-label-text-line-height) * 1px);--lib-mat-btn-tracking: calc(var(--buttons-wip-size-xlarge-button-xlarge-label-text-tracking) * 1px);--lib-mat-btn-icon-size: calc(var(--buttons-wip-size-xlarge-button-xlarge-icon-size) * 1px);min-height:var(--lib-mat-btn-height);height:var(--lib-mat-btn-height);padding-left:var(--lib-mat-btn-padding-x)!important;padding-right:var(--lib-mat-btn-padding-x-right)!important;color:var(--buttons-wip-color-filled-enabled-button-filled-label-color, #fff);font-family:var(--buttons-wip-size-xlarge-button-xlarge-label-text-font, Heebo);font-size:var(--lib-mat-btn-font-size);font-style:normal;font-weight:var(--buttons-wip-size-xlarge-button-xlarge-label-text-weight, 400)!important;line-height:var(--lib-mat-btn-line-height);letter-spacing:var(--lib-mat-btn-tracking);border-radius:var(--lib-mat-btn-radius)}.lib-mat-btn--xlarge .mat-icon,.lib-mat-btn--xlarge .mat-mdc-button-touch-target{width:var(--lib-mat-btn-icon-size);height:var(--lib-mat-btn-icon-size);font-size:var(--lib-mat-btn-icon-size);line-height:1;display:flex;align-items:center;justify-content:center}.lib-mat-btn--shape-round{--lib-mat-btn-radius: var(--lib-mat-btn-radius-round)}.lib-mat-btn--shape-square{--lib-mat-btn-radius: var(--lib-mat-btn-radius-square)}\n"] }]
|
|
1118
|
+
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], toggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggle", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPosition", required: false }] }], contentAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentAlign", required: false }] }], labelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelClass", required: false }] }], pressed: [{ type: i0.Input, args: [{ isSignal: true, alias: "pressed", required: false }] }], debugPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "debugPadding", required: false }] }] } });
|
|
1119
|
+
|
|
1120
|
+
class LibIconButtonComponent {
|
|
1121
|
+
size = input('small', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
1122
|
+
variant = input('standard', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
1123
|
+
shape = input('round', ...(ngDevMode ? [{ debugName: "shape" }] : []));
|
|
1124
|
+
/** Variante de espacio (padding inline) desde Figma: narrow, default, wide. */
|
|
1125
|
+
space = input('default', ...(ngDevMode ? [{ debugName: "space" }] : []));
|
|
1126
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
1127
|
+
type = input('button', ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
1128
|
+
toggle = input(false, ...(ngDevMode ? [{ debugName: "toggle" }] : []));
|
|
1129
|
+
selected = input(false, ...(ngDevMode ? [{ debugName: "selected" }] : []));
|
|
1130
|
+
classes = computed(() => ({
|
|
1131
|
+
'ui-icon-btn--xsmall': this.size() === 'xsmall',
|
|
1132
|
+
'ui-icon-btn--small': this.size() === 'small',
|
|
1133
|
+
'ui-icon-btn--medium': this.size() === 'medium',
|
|
1134
|
+
'ui-icon-btn--large': this.size() === 'large',
|
|
1135
|
+
'ui-icon-btn--xlarge': this.size() === 'xlarge',
|
|
1136
|
+
'ui-icon-btn--shape-round': this.shape() === 'round',
|
|
1137
|
+
'ui-icon-btn--shape-square': this.shape() === 'square',
|
|
1138
|
+
'ui-icon-btn--space-narrow': this.space() === 'narrow',
|
|
1139
|
+
'ui-icon-btn--space-default': this.space() === 'default',
|
|
1140
|
+
'ui-icon-btn--space-wide': this.space() === 'wide',
|
|
1141
|
+
'ui-icon-btn--variant-filled': this.variant() === 'filled',
|
|
1142
|
+
'ui-icon-btn--variant-tonal': this.variant() === 'tonal',
|
|
1143
|
+
'ui-icon-btn--variant-outlined': this.variant() === 'outlined',
|
|
1144
|
+
'ui-icon-btn--variant-standard': this.variant() === 'standard',
|
|
1145
|
+
'ui-icon-btn--variant-action': this.variant() === 'action',
|
|
1146
|
+
'ui-icon-btn--toggle': this.toggle(),
|
|
1147
|
+
'ui-icon-btn--toggle-selected': this.toggle() && this.selected(),
|
|
1148
|
+
}), ...(ngDevMode ? [{ debugName: "classes" }] : []));
|
|
1149
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibIconButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1150
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.9", type: LibIconButtonComponent, isStandalone: true, selector: "lib-icon-button", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, space: { classPropertyName: "space", publicName: "space", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, toggle: { classPropertyName: "toggle", publicName: "toggle", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<button\r\n class=\"ui-icon-btn\"\r\n [attr.type]=\"type()\"\r\n [disabled]=\"disabled()\"\r\n matRipple\r\n [matRippleDisabled]=\"disabled()\"\r\n [matRippleColor]=\"'var(--ui-icon-btn-ripple-color)'\"\r\n [matRippleCentered]=\"true\"\r\n [ngClass]=\"classes()\"\r\n [attr.aria-pressed]=\"toggle() ? selected() : null\"\r\n>\r\n <span class=\"ui-icon-btn__content\">\r\n <ng-content></ng-content>\r\n </span>\r\n</button>\r\n", styles: [".ui-icon-btn{--ui-icon-btn-size: calc(var(--icon-buttons-size-small-icon-button-small-container-height) * 1px);--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-small-icon-button-small-default-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-small-icon-button-small-default-trailing-space) * 1px);--ui-icon-btn-radius: calc(var(--icon-buttons-icon-button-enabled-icon-button-container-shape-round, var(--app-icon-buttons-icon-button-enabled-icon-button-container-shape-round)) * 1px);--ui-icon-btn-pressed-radius: calc(var(--icon-buttons-icon-button-enabled-icon-button-shape-pressed-morph, var(--app-icon-buttons-icon-button-enabled-icon-button-shape-pressed-morph, 0)) * 1px);--ui-icon-btn-outline-width: calc(var(--icon-buttons-size-small-icon-button-small-outline-width) * 1px);--ui-icon-btn-icon-size: calc(var(--icon-buttons-size-small-icon-button-small-icon-size) * 1px);--ui-icon-btn-border-width: 0;--ui-icon-btn-border-color: transparent;--ui-icon-btn-container-color: var(--icon-buttons-icon-button-enabled-icon-button-container-color, var(--app-icon-buttons-icon-button-enabled-icon-button-container-color));--ui-icon-btn-icon-color: var(--icon-buttons-icon-button-enabled-icon-button-icon-color, var(--app-icon-buttons-icon-button-enabled-icon-button-icon-color));--ui-icon-btn-hover-layer-color: var(--icon-buttons-icon-button-hovered-icon-button-hovered-state-layer-color, var(--app-icon-buttons-icon-button-hovered-icon-button-hovered-state-layer-color, transparent));--ui-icon-btn-focus-layer-color: var(--icon-buttons-icon-button-focused-icon-button-focused-state-layer-color, var(--app-icon-buttons-icon-button-focused-icon-button-focused-state-layer-color, transparent));--ui-icon-btn-focus-layer-opacity: calc(var(--icon-buttons-icon-button-focused-icon-button-focused-state-layer-opacity, var(--app-icon-buttons-icon-button-focused-icon-button-focused-state-layer-opacity, 0)) / 100);--ui-icon-btn-pressed-layer-color: var(--icon-buttons-icon-button-pressed-icon-button-pressed-state-layer-color, var(--app-icon-buttons-icon-button-pressed-icon-button-pressed-state-layer-color, transparent));--ui-icon-btn-ripple-boost: 2.4;--ui-icon-btn-ripple-min-opacity: .18;--ui-icon-btn-ripple-opacity: min( 1, max( var(--ui-icon-btn-ripple-min-opacity), calc(var(--ui-icon-btn-pressed-layer-opacity, 0) * var(--ui-icon-btn-ripple-boost)) ) );--ui-icon-btn-ripple-color: color-mix( in srgb, var(--ui-icon-btn-pressed-layer-color) calc(var(--ui-icon-btn-ripple-opacity) * 100%), transparent );--ui-icon-btn-focus-ring-color: var(--icon-buttons-icon-button-enabled-icon-button-focus-indicator-color, var(--app-icon-buttons-icon-button-enabled-icon-button-focus-indicator-color, transparent));--ui-icon-btn-focus-ring-width: calc(var(--icon-buttons-icon-button-enabled-icon-button-focus-indicator-thickness, var(--app-icon-buttons-icon-button-enabled-icon-button-focus-indicator-thickness, 0)) * 1px);--ui-icon-btn-focus-ring-offset: calc(var(--icon-buttons-icon-button-enabled-icon-button-focus-indicator-offset, var(--app-icon-buttons-icon-button-enabled-icon-button-focus-indicator-offset, 0)) * 1px);--ui-icon-btn-disabled-container-color: var(--icon-buttons-icon-button-disabled-icon-button-disabled-container-color, var(--ui-icon-btn-container-color));--ui-icon-btn-disabled-container-opacity: var(--icon-buttons-icon-button-disabled-icon-button-disabled-container-opacity, 100);--ui-icon-btn-disabled-icon-color: var(--icon-buttons-icon-button-disabled-icon-button-disabled-icon-color, var(--ui-icon-btn-icon-color));--ui-icon-btn-disabled-border-color: var(--ui-icon-btn-border-color);--ui-icon-btn-disabled-border-opacity: var(--icon-buttons-icon-button-disabled-icon-button-disabled-container-opacity, 100);--ui-icon-btn-disabled-opacity: 1;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;height:var(--ui-icon-btn-size);min-width:var(--ui-icon-btn-size);padding-inline-start:var(--ui-icon-btn-padding-inline-start);padding-inline-end:var(--ui-icon-btn-padding-inline-end);border-radius:var(--ui-icon-btn-radius);border-style:solid;border-width:var(--ui-icon-btn-border-width);border-color:var(--ui-icon-btn-border-color);background-color:var(--ui-icon-btn-container-color);color:var(--ui-icon-btn-icon-color);cursor:pointer;overflow:hidden;transition:background-color .15s ease,color .15s ease,border-color .15s ease,box-shadow .15s ease,border-radius .15s ease}.ui-icon-btn:after{content:\"\";position:absolute;inset:0;pointer-events:none;border-radius:inherit;background-color:transparent;opacity:0;transition:opacity .15s ease,background-color .15s ease}.ui-icon-btn__content{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center}.ui-icon-btn mat-icon,.ui-icon-btn .mat-icon,.ui-icon-btn>svg{width:var(--ui-icon-btn-icon-size);height:var(--ui-icon-btn-icon-size);font-size:var(--ui-icon-btn-icon-size);color:currentColor;fill:currentColor;display:inline-flex;align-items:center;justify-content:center;line-height:1}.ui-icon-btn mat-icon svg,.ui-icon-btn .mat-icon svg,.ui-icon-btn>svg{width:100%;height:100%;fill:currentColor}.ui-icon-btn:hover:not(:disabled):after{background-color:var(--ui-icon-btn-hover-layer-color);opacity:var(--ui-icon-btn-hover-layer-opacity)}.ui-icon-btn:focus-visible:not(:disabled):after{background-color:var(--ui-icon-btn-focus-layer-color);opacity:var(--ui-icon-btn-focus-layer-opacity)}.ui-icon-btn:active:not(:disabled):after{background-color:var(--ui-icon-btn-pressed-layer-color);opacity:var(--ui-icon-btn-pressed-layer-opacity)}.ui-icon-btn:active:not(:disabled){border-radius:var(--ui-icon-btn-pressed-radius)}.ui-icon-btn:focus-visible{outline:var(--ui-icon-btn-focus-ring-width) solid var(--ui-icon-btn-focus-ring-color);outline-offset:var(--ui-icon-btn-focus-ring-offset)}.ui-icon-btn:disabled{cursor:not-allowed;background-color:color-mix(in srgb,var(--ui-icon-btn-disabled-container-color) calc(var(--ui-icon-btn-disabled-container-opacity) * 1%),transparent);border-color:color-mix(in srgb,var(--ui-icon-btn-disabled-border-color) calc(var(--ui-icon-btn-disabled-border-opacity) * 1%),transparent);color:color-mix(in srgb,var(--ui-icon-btn-disabled-icon-color) calc(var(--ui-icon-btn-disabled-icon-opacity) * 1%),transparent);opacity:var(--ui-icon-btn-disabled-opacity)}.ui-icon-btn:disabled:after{opacity:0}.ui-icon-btn--xsmall{--ui-icon-btn-size: calc(var(--icon-buttons-size-xsmall-icon-button-xsmall-container-height) * 1px);--ui-icon-btn-icon-size: calc(var(--icon-buttons-size-xsmall-icon-button-xsmall-icon-size) * 1px);--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-xsmall-icon-button-xsmall-default-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-xsmall-icon-button-xsmall-default-trailing-space) * 1px);--ui-icon-btn-outline-width: calc(var(--icon-buttons-size-xsmall-icon-button-xsmall-outline-width) * 1px)}.ui-icon-btn--small{--ui-icon-btn-size: calc(var(--icon-buttons-size-small-icon-button-small-container-height) * 1px);--ui-icon-btn-icon-size: calc(var(--icon-buttons-size-small-icon-button-small-icon-size) * 1px);--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-small-icon-button-small-default-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-small-icon-button-small-default-trailing-space) * 1px);--ui-icon-btn-outline-width: calc(var(--icon-buttons-size-small-icon-button-small-outline-width) * 1px)}.ui-icon-btn--medium{--ui-icon-btn-size: calc(var(--icon-buttons-size-medium-icon-button-medium-container-height) * 1px);--ui-icon-btn-icon-size: calc(var(--icon-buttons-size-medium-icon-button-medium-icon-size) * 1px);--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-medium-icon-button-medium-default-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-medium-icon-button-medium-default-trailing-space) * 1px);--ui-icon-btn-outline-width: calc(var(--icon-buttons-size-medium-icon-button-medium-outline-width) * 1px)}.ui-icon-btn--large{--ui-icon-btn-size: calc(var(--icon-buttons-size-large-icon-button-large-container-height) * 1px);--ui-icon-btn-icon-size: calc(var(--icon-buttons-size-large-icon-button-large-icon-size) * 1px);--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-large-icon-button-large-default-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-large-icon-button-large-default-trailing-space) * 1px);--ui-icon-btn-outline-width: calc(var(--icon-buttons-size-large-icon-button-large-outline-width) * 1px)}.ui-icon-btn--xlarge{--ui-icon-btn-size: calc(var(--icon-buttons-size-xlarge-icon-button-xlarge-container-height) * 1px);--ui-icon-btn-icon-size: calc(var(--icon-buttons-size-xlarge-icon-button-xlarge-icon-size) * 1px);--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-xlarge-icon-button-xlarge-default-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-xlarge-icon-button-xlarge-default-trailing-space) * 1px);--ui-icon-btn-outline-width: calc(var(--icon-buttons-size-xlarge-icon-button-xlarge-outline-width) * 1px)}.ui-icon-btn--xsmall.ui-icon-btn--space-narrow{--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-xsmall-icon-button-xsmall-narrow-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-xsmall-icon-button-xsmall-narrow-trailing-space) * 1px)}.ui-icon-btn--xsmall.ui-icon-btn--space-wide{--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-xsmall-icon-button-xsmall-wide-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-xsmall-icon-button-xsmall-wide-trailing-space) * 1px)}.ui-icon-btn--small.ui-icon-btn--space-narrow{--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-small-icon-button-small-narrow-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-small-icon-button-small-narrow-trailing-space) * 1px)}.ui-icon-btn--small.ui-icon-btn--space-wide{--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-small-icon-button-small-wide-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-small-icon-button-small-wide-trailing-space) * 1px)}.ui-icon-btn--medium.ui-icon-btn--space-narrow{--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-medium-icon-button-medium-narrow-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-medium-icon-button-medium-narrow-trailing-space) * 1px)}.ui-icon-btn--medium.ui-icon-btn--space-wide{--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-medium-icon-button-medium-wide-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-medium-icon-button-medium-wide-trailing-space) * 1px)}.ui-icon-btn--large.ui-icon-btn--space-narrow{--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-large-icon-button-large-narrow-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-large-icon-button-large-narrow-trailing-space) * 1px)}.ui-icon-btn--large.ui-icon-btn--space-wide{--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-large-icon-button-large-wide-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-large-icon-button-large-wide-trailing-space) * 1px)}.ui-icon-btn--xlarge.ui-icon-btn--space-narrow{--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-xlarge-icon-button-xlarge-narrow-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-xlarge-icon-button-xlarge-narrow-trailing-space) * 1px)}.ui-icon-btn--xlarge.ui-icon-btn--space-wide{--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-xlarge-icon-button-xlarge-wide-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-xlarge-icon-button-xlarge-wide-trailing-space) * 1px)}.ui-icon-btn--shape-round{--ui-icon-btn-radius: calc(var(--icon-buttons-icon-button-enabled-icon-button-container-shape-round, var(--app-icon-buttons-icon-button-enabled-icon-button-container-shape-round)) * 1px)}.ui-icon-btn--shape-square{--ui-icon-btn-radius: calc(var(--icon-buttons-icon-button-enabled-icon-button-container-shape-square, var(--app-icon-buttons-icon-button-enabled-icon-button-container-shape-square)) * 1px)}.ui-icon-btn--toggle-selected.ui-icon-btn--shape-round{--ui-icon-btn-radius: calc(var(--icon-buttons-icon-button-enabled-icon-button-selected-container-shape-round, var(--app-icon-buttons-icon-button-enabled-icon-button-selected-container-shape-round)) * 1px)}.ui-icon-btn--toggle-selected.ui-icon-btn--shape-square{--ui-icon-btn-radius: calc(var(--icon-buttons-icon-button-enabled-icon-button-selected-container-shape-square, var(--app-icon-buttons-icon-button-enabled-icon-button-selected-container-shape-square)) * 1px)}.ui-icon-btn--toggle{--ui-icon-btn-container-color: var(--icon-buttons-icon-button-enabled-icon-button-container-color-toggle-unselected, var(--app-icon-buttons-icon-button-enabled-icon-button-container-color-toggle-unselected, var(--ui-icon-btn-container-color)));--ui-icon-btn-icon-color: var(--icon-buttons-icon-button-enabled-icon-button-icon-color-toggle-unselected, var(--app-icon-buttons-icon-button-enabled-icon-button-icon-color-toggle-unselected, var(--ui-icon-btn-icon-color)));--ui-icon-btn-hover-layer-color: var(--icon-buttons-icon-button-hovered-icon-button-hovered-state-layer-color-toggle-unselected, var(--app-icon-buttons-icon-button-hovered-icon-button-hovered-state-layer-color-toggle-unselected, var(--ui-icon-btn-hover-layer-color)));--ui-icon-btn-focus-layer-color: var(--icon-buttons-icon-button-focused-icon-button-focused-state-layer-color-toggle-unselected, var(--app-icon-buttons-icon-button-focused-icon-button-focused-state-layer-color-toggle-unselected, var(--ui-icon-btn-focus-layer-color)));--ui-icon-btn-pressed-layer-color: var(--icon-buttons-icon-button-pressed-icon-button-pressed-state-layer-color-toggle-unselected, var(--app-icon-buttons-icon-button-pressed-icon-button-pressed-state-layer-color-toggle-unselected, var(--ui-icon-btn-pressed-layer-color)))}.ui-icon-btn--toggle-selected{--ui-icon-btn-container-color: var(--icon-buttons-icon-button-enabled-icon-button-container-color-toggle-selected, var(--app-icon-buttons-icon-button-enabled-icon-button-container-color-toggle-selected, var(--ui-icon-btn-container-color)));--ui-icon-btn-icon-color: var(--icon-buttons-icon-button-enabled-icon-button-icon-color-toggle-selected, var(--app-icon-buttons-icon-button-enabled-icon-button-icon-color-toggle-selected, var(--ui-icon-btn-icon-color)));--ui-icon-btn-hover-layer-color: var(--icon-buttons-icon-button-hovered-icon-button-hovered-state-layer-color-toggle-selected, var(--app-icon-buttons-icon-button-hovered-icon-button-hovered-state-layer-color-toggle-selected, var(--ui-icon-btn-hover-layer-color)));--ui-icon-btn-focus-layer-color: var(--icon-buttons-icon-button-focused-icon-button-focused-state-layer-color-toggle-selected, var(--app-icon-buttons-icon-button-focused-icon-button-focused-state-layer-color-toggle-selected, var(--ui-icon-btn-focus-layer-color)));--ui-icon-btn-pressed-layer-color: var(--icon-buttons-icon-button-pressed-icon-button-pressed-state-layer-color-toggle-selected, var(--app-icon-buttons-icon-button-pressed-icon-button-pressed-state-layer-color-toggle-selected, var(--ui-icon-btn-pressed-layer-color)))}.ui-icon-btn--variant-filled{--ui-icon-btn-container-color: var(--icon-buttons-color-filled-enabled-icon-button-filled-container-color);--ui-icon-btn-icon-color: var(--icon-buttons-color-filled-enabled-icon-button-filled-icon-color);--ui-icon-btn-ripple-boost: 2.8;--ui-icon-btn-ripple-min-opacity: .24;--ui-icon-btn-ripple-color: color-mix( in srgb, var(--ui-icon-btn-icon-color) calc(var(--ui-icon-btn-ripple-opacity) * 100%), transparent );--ui-icon-btn-border-width: 0;--ui-icon-btn-border-color: transparent;--ui-icon-btn-hover-layer-color: var(--icon-buttons-color-filled-hovered-icon-button-filled-hovered-state-layer-color);--ui-icon-btn-hover-layer-opacity: calc(var(--icon-buttons-color-filled-hovered-icon-button-filled-hovered-state-layer-opacity) / 100);--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-filled-focused-icon-button-filled-focused-state-layer-color);--ui-icon-btn-focus-layer-opacity: calc(var(--icon-buttons-color-filled-focused-icon-button-filled-focused-state-layer-opacity) / 100);--ui-icon-btn-pressed-layer-color: var(--icon-buttons-color-filled-pressed-icon-button-filled-pressed-state-layer-color);--ui-icon-btn-pressed-layer-opacity: calc(var(--icon-buttons-color-filled-pressed-icon-button-filled-pressed-state-layer-opacity) / 100);--ui-icon-btn-disabled-container-color: var(--icon-buttons-color-filled-disabled-icon-button-filled-disabled-container-color);--ui-icon-btn-disabled-container-opacity: var(--icon-buttons-color-filled-disabled-icon-button-filled-disabled-container-opacity);--ui-icon-btn-disabled-icon-color: var(--icon-buttons-color-filled-disabled-icon-button-filled-disabled-icon-color);--ui-icon-btn-disabled-icon-opacity: var(--icon-buttons-color-filled-disabled-icon-button-filled-disabled-icon-opacity)}.ui-icon-btn--variant-filled.ui-icon-btn--toggle{--ui-icon-btn-container-color: var(--icon-buttons-color-filled-enabled-icon-button-filled-container-color-toggle-unselected);--ui-icon-btn-icon-color: var(--icon-buttons-color-filled-enabled-icon-button-filled-icon-color-toggle-unselected);--ui-icon-btn-hover-layer-color: var(--icon-buttons-color-filled-hovered-icon-button-filled-hovered-state-layer-color-toggle-unselected);--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-filled-focused-icon-button-filled-focused-state-layer-color-toggle-unselected);--ui-icon-btn-pressed-layer-color: var(--icon-buttons-color-filled-pressed-icon-button-filled-pressed-state-layer-color-toggle-unselected)}.ui-icon-btn--variant-filled.ui-icon-btn--toggle-selected{--ui-icon-btn-container-color: var(--icon-buttons-color-filled-enabled-icon-button-filled-container-color-toggle-selected);--ui-icon-btn-icon-color: var(--icon-buttons-color-filled-enabled-icon-button-filled-icon-color-toggle-selected);--ui-icon-btn-hover-layer-color: var(--icon-buttons-color-filled-hovered-icon-button-filled-hovered-state-layer-color-toggle-selected);--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-filled-focused-icon-button-filled-focused-state-layer-color-toggle-selected);--ui-icon-btn-pressed-layer-color: var(--icon-buttons-color-filled-pressed-icon-button-filled-pressed-state-layer-color-toggle-selected)}.ui-icon-btn--variant-tonal{--ui-icon-btn-container-color: var(--icon-buttons-color-tonal-enabled-icon-button-tonal-container-color);--ui-icon-btn-icon-color: var(--icon-buttons-color-tonal-enabled-icon-button-tonal-icon-color);--ui-icon-btn-border-width: 0;--ui-icon-btn-border-color: transparent;--ui-icon-btn-hover-layer-color: var(--icon-buttons-color-tonal-hovered-icon-button-tonal-hovered-state-layer-color);--ui-icon-btn-hover-layer-opacity: calc(var(--icon-buttons-color-tonal-hovered-icon-button-tonal-hovered-state-layer-opacity) / 100);--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-tonal-focused-icon-button-tonal-focused-state-layer-color);--ui-icon-btn-focus-layer-opacity: calc(var(--icon-buttons-color-tonal-focused-icon-button-tonal-focused-state-layer-opacity) / 100);--ui-icon-btn-pressed-layer-color: var(--icon-buttons-color-tonal-pressed-icon-button-tonal-pressed-state-layer-color);--ui-icon-btn-pressed-layer-opacity: calc(var(--icon-buttons-color-tonal-pressed-icon-button-tonal-pressed-state-layer-opacity) / 100);--ui-icon-btn-disabled-container-color: var(--icon-buttons-color-tonal-disabled-icon-button-tonal-disabled-container-color);--ui-icon-btn-disabled-container-opacity: var(--icon-buttons-color-tonal-disabled-icon-button-tonal-disabled-container-opacity);--ui-icon-btn-disabled-icon-color: var(--icon-buttons-color-tonal-disabled-icon-button-tonal-disabled-icon-color);--ui-icon-btn-disabled-icon-opacity: var(--icon-buttons-color-tonal-disabled-icon-button-tonal-disabled-icon-opacity)}.ui-icon-btn--variant-tonal.ui-icon-btn--shape-round{--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-tonal-focused-icon-button-tonal-focused-state-layer-color)}.ui-icon-btn--variant-tonal.ui-icon-btn--toggle{--ui-icon-btn-container-color: var(--icon-buttons-color-tonal-enabled-icon-button-tonal-container-color-toggle-unselected);--ui-icon-btn-icon-color: var(--icon-buttons-color-tonal-enabled-icon-button-tonal-icon-color-toggle-unselected);--ui-icon-btn-hover-layer-color: var(--icon-buttons-color-tonal-hovered-icon-button-tonal-hovered-state-layer-color);--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-tonal-focused-icon-button-tonal-focused-state-layer-color);--ui-icon-btn-pressed-layer-color: var(--icon-buttons-color-tonal-pressed-icon-button-tonal-pressed-state-layer-color-toggle-unselected)}.ui-icon-btn--variant-tonal.ui-icon-btn--toggle-selected{--ui-icon-btn-container-color: var(--icon-buttons-color-tonal-enabled-icon-button-tonal-container-color-toggle-selected);--ui-icon-btn-icon-color: var(--icon-buttons-color-tonal-enabled-icon-button-tonal-icon-color-toggle-selected);--ui-icon-btn-hover-layer-color: var(--icon-buttons-color-tonal-hovered-icon-button-tonal-hovered-state-layer-color-toggle-selected);--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-tonal-focused-icon-button-tonal-focused-state-layer-color-toggle-selected);--ui-icon-btn-pressed-layer-color: var(--icon-buttons-color-tonal-pressed-icon-button-tonal-pressed-state-layer-color-toggle-selected)}.ui-icon-btn--variant-outlined{--ui-icon-btn-container-color: transparent;--ui-icon-btn-icon-color: var(--icon-buttons-color-outlined-enabled-icon-button-outlined-icon-color);--ui-icon-btn-border-width: var(--ui-icon-btn-outline-width);--ui-icon-btn-border-color: var(--icon-buttons-color-outlined-enabled-icon-button-outlined-color);--ui-icon-btn-hover-layer-color: #434749;--ui-icon-btn-hover-layer-opacity: .08;--ui-icon-btn-focus-layer-color: #434749;--ui-icon-btn-focus-layer-opacity: .1;--ui-icon-btn-pressed-layer-color: #434749;--ui-icon-btn-pressed-layer-opacity: .08;--ui-icon-btn-disabled-border-color: var(--icon-buttons-color-outlined-disabled-icon-button-outlined-disabled-outline-color);--ui-icon-btn-disabled-border-opacity: 100;--ui-icon-btn-disabled-container-color: var(--icon-buttons-color-outlined-disabled-icon-button-outlined-disabled-container-color-selected, transparent);--ui-icon-btn-disabled-container-opacity: var(--icon-buttons-color-outlined-disabled-icon-button-outlined-disabled-container-opacity-selected, 0);--ui-icon-btn-disabled-icon-color: var(--icon-buttons-color-outlined-disabled-icon-button-outlined-disabled-icon-color);--ui-icon-btn-disabled-icon-opacity: var(--icon-buttons-color-outlined-disabled-icon-button-outlined-disabled-icon-opacity)}.ui-icon-btn--variant-outlined.ui-icon-btn--toggle{--ui-icon-btn-icon-color: var(--icon-buttons-color-outlined-enabled-icon-button-outlined-icon-color-toggle-unselected);--ui-icon-btn-hover-layer-color: #434749;--ui-icon-btn-focus-layer-color: #434749;--ui-icon-btn-pressed-layer-color: #434749;--ui-icon-btn-hover-layer-opacity: .08;--ui-icon-btn-focus-layer-opacity: .1;--ui-icon-btn-pressed-layer-opacity: .08}.ui-icon-btn--variant-outlined.ui-icon-btn--toggle-selected{--ui-icon-btn-container-color: var(--icon-buttons-color-outlined-enabled-icon-button-container-color-toggle-selected, transparent);--ui-icon-btn-icon-color: var(--icon-buttons-color-outlined-enabled-icon-button-outlined-icon-color-toggle-selected);--ui-icon-btn-hover-layer-color: #434749;--ui-icon-btn-focus-layer-color: #434749;--ui-icon-btn-pressed-layer-color: #434749;--ui-icon-btn-hover-layer-opacity: .08;--ui-icon-btn-focus-layer-opacity: .1;--ui-icon-btn-pressed-layer-opacity: .08}.ui-icon-btn--variant-standard{--ui-icon-btn-container-color: transparent;--ui-icon-btn-icon-color: var(--icon-buttons-color-standard-enabled-icon-button-icon-color);--ui-icon-btn-border-width: 0;--ui-icon-btn-border-color: transparent;--ui-icon-btn-hover-layer-color: var(--icon-buttons-color-standard-hovered-icon-button-hovered-state-layer-color, var(--app-icon-buttons-color-standard-hovered-icon-button-hovered-state-layer-color, rgba(67, 71, 73, .08)));--ui-icon-btn-hover-layer-opacity: 1;--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-standard-focused-icon-button-focused-state-layer-color, var(--app-icon-buttons-color-standard-focused-icon-button-focused-state-layer-color, rgba(67, 71, 73, .08)));--ui-icon-btn-focus-layer-opacity: 1;--ui-icon-btn-pressed-layer-color: var(--icon-buttons-color-standard-pressed-icon-button-pressed-state-layer-color, var(--app-icon-buttons-color-standard-pressed-icon-button-pressed-state-layer-color, rgba(67, 71, 73, .12)));--ui-icon-btn-pressed-layer-opacity: 1;--ui-icon-btn-disabled-icon-color: var(--icon-buttons-color-standard-disabled-icon-button-disabled-icon-color);--ui-icon-btn-disabled-icon-opacity: var(--icon-buttons-color-standard-disabled-icon-button-disabled-opacity);--ui-icon-btn-disabled-opacity: 1}.ui-icon-btn--variant-standard.ui-icon-btn--toggle{--ui-icon-btn-icon-color: var(--icon-buttons-color-standard-enabled-icon-button-icon-color-toggle-unselected);--ui-icon-btn-hover-layer-color: var(--icon-buttons-color-standard-hovered-icon-button-hovered-state-layer-color-toggle-unselected);--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-standard-focused-icon-button-focused-state-layer-color-toggle-unselected);--ui-icon-btn-pressed-layer-color: var(--icon-buttons-color-standard-pressed-icon-button-pressed-state-layer-color-toggle-unselected)}.ui-icon-btn--variant-standard.ui-icon-btn--toggle-selected{--ui-icon-btn-icon-color: var(--icon-buttons-color-standard-enabled-icon-button-icon-color-toggle-selected);--ui-icon-btn-hover-layer-color: var(--icon-buttons-color-standard-hovered-icon-button-hovered-state-layer-color-toggle-selected);--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-standard-focused-icon-button-focused-state-layer-color-toggle-selected);--ui-icon-btn-pressed-layer-color: var(--icon-buttons-color-standard-pressed-icon-button-pressed-state-layer-color-toggle-selected)}.ui-icon-btn--variant-action{--ui-icon-btn-container-color: transparent;--ui-icon-btn-icon-color: var(--icon-buttons-color-action-enabled-icon-button-icon-color);--ui-icon-btn-border-width: 0;--ui-icon-btn-border-color: transparent;--ui-icon-btn-hover-layer-color: var(--icon-buttons-color-action-hovered-icon-button-hovered-state-layer-color, var(--app-icon-buttons-color-action-hovered-icon-button-hovered-state-layer-color, transparent));--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-action-focused-icon-button-focused-state-layer-color, var(--app-icon-buttons-color-action-focused-icon-button-focused-state-layer-color, transparent));--ui-icon-btn-focus-layer-opacity: calc(var(--icon-buttons-color-action-focused-icon-button-focused-state-layer-opacity, var(--app-icon-buttons-color-action-focused-icon-button-focused-state-layer-opacity, 0)) / 100);--ui-icon-btn-pressed-layer-color: var(--icon-buttons-color-action-pressed-icon-button-pressed-state-layer-color, var(--app-icon-buttons-color-action-pressed-icon-button-pressed-state-layer-color, transparent));--ui-icon-btn-disabled-icon-color: var(--icon-buttons-color-action-disabled-icon-button-disabled-icon-color);--ui-icon-btn-disabled-icon-opacity: var(--icon-buttons-color-action-disabled-icon-button-disabled-opacity);--ui-icon-btn-disabled-opacity: 1}.ui-icon-btn--variant-action.ui-icon-btn--toggle,.ui-icon-btn--variant-action.ui-icon-btn--toggle-selected{--ui-icon-btn-hover-layer-color: var(--icon-buttons-color-action-hovered-icon-button-hovered-state-layer-color, var(--app-icon-buttons-color-action-hovered-icon-button-hovered-state-layer-color, transparent));--ui-icon-btn-hover-layer-opacity: calc((var(--icon-buttons-color-action-hovered-icon-button-hovered-state-layer-opacity, var(--app-icon-buttons-color-action-hovered-icon-button-hovered-state-layer-opacity, 0)) * 3) / 100);--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-action-focused-icon-button-focused-state-layer-color, var(--app-icon-buttons-color-action-focused-icon-button-focused-state-layer-color, transparent));--ui-icon-btn-focus-layer-opacity: calc(var(--icon-buttons-color-action-focused-icon-button-focused-state-layer-opacity, var(--app-icon-buttons-color-action-focused-icon-button-focused-state-layer-opacity, 0)) / 100);--ui-icon-btn-pressed-layer-color: var(--icon-buttons-color-action-pressed-icon-button-pressed-state-layer-color, var(--app-icon-buttons-color-action-pressed-icon-button-pressed-state-layer-color, transparent));--ui-icon-btn-pressed-layer-opacity: calc(var(--icon-buttons-color-action-pressed-icon-button-pressed-state-layer-opacity, var(--app-icon-buttons-color-action-pressed-icon-button-pressed-state-layer-opacity, 0)) / 100)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i1$5.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1151
|
+
}
|
|
1152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibIconButtonComponent, decorators: [{
|
|
1153
|
+
type: Component,
|
|
1154
|
+
args: [{ selector: 'lib-icon-button', standalone: true, imports: [NgClass, MatRippleModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\r\n class=\"ui-icon-btn\"\r\n [attr.type]=\"type()\"\r\n [disabled]=\"disabled()\"\r\n matRipple\r\n [matRippleDisabled]=\"disabled()\"\r\n [matRippleColor]=\"'var(--ui-icon-btn-ripple-color)'\"\r\n [matRippleCentered]=\"true\"\r\n [ngClass]=\"classes()\"\r\n [attr.aria-pressed]=\"toggle() ? selected() : null\"\r\n>\r\n <span class=\"ui-icon-btn__content\">\r\n <ng-content></ng-content>\r\n </span>\r\n</button>\r\n", styles: [".ui-icon-btn{--ui-icon-btn-size: calc(var(--icon-buttons-size-small-icon-button-small-container-height) * 1px);--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-small-icon-button-small-default-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-small-icon-button-small-default-trailing-space) * 1px);--ui-icon-btn-radius: calc(var(--icon-buttons-icon-button-enabled-icon-button-container-shape-round, var(--app-icon-buttons-icon-button-enabled-icon-button-container-shape-round)) * 1px);--ui-icon-btn-pressed-radius: calc(var(--icon-buttons-icon-button-enabled-icon-button-shape-pressed-morph, var(--app-icon-buttons-icon-button-enabled-icon-button-shape-pressed-morph, 0)) * 1px);--ui-icon-btn-outline-width: calc(var(--icon-buttons-size-small-icon-button-small-outline-width) * 1px);--ui-icon-btn-icon-size: calc(var(--icon-buttons-size-small-icon-button-small-icon-size) * 1px);--ui-icon-btn-border-width: 0;--ui-icon-btn-border-color: transparent;--ui-icon-btn-container-color: var(--icon-buttons-icon-button-enabled-icon-button-container-color, var(--app-icon-buttons-icon-button-enabled-icon-button-container-color));--ui-icon-btn-icon-color: var(--icon-buttons-icon-button-enabled-icon-button-icon-color, var(--app-icon-buttons-icon-button-enabled-icon-button-icon-color));--ui-icon-btn-hover-layer-color: var(--icon-buttons-icon-button-hovered-icon-button-hovered-state-layer-color, var(--app-icon-buttons-icon-button-hovered-icon-button-hovered-state-layer-color, transparent));--ui-icon-btn-focus-layer-color: var(--icon-buttons-icon-button-focused-icon-button-focused-state-layer-color, var(--app-icon-buttons-icon-button-focused-icon-button-focused-state-layer-color, transparent));--ui-icon-btn-focus-layer-opacity: calc(var(--icon-buttons-icon-button-focused-icon-button-focused-state-layer-opacity, var(--app-icon-buttons-icon-button-focused-icon-button-focused-state-layer-opacity, 0)) / 100);--ui-icon-btn-pressed-layer-color: var(--icon-buttons-icon-button-pressed-icon-button-pressed-state-layer-color, var(--app-icon-buttons-icon-button-pressed-icon-button-pressed-state-layer-color, transparent));--ui-icon-btn-ripple-boost: 2.4;--ui-icon-btn-ripple-min-opacity: .18;--ui-icon-btn-ripple-opacity: min( 1, max( var(--ui-icon-btn-ripple-min-opacity), calc(var(--ui-icon-btn-pressed-layer-opacity, 0) * var(--ui-icon-btn-ripple-boost)) ) );--ui-icon-btn-ripple-color: color-mix( in srgb, var(--ui-icon-btn-pressed-layer-color) calc(var(--ui-icon-btn-ripple-opacity) * 100%), transparent );--ui-icon-btn-focus-ring-color: var(--icon-buttons-icon-button-enabled-icon-button-focus-indicator-color, var(--app-icon-buttons-icon-button-enabled-icon-button-focus-indicator-color, transparent));--ui-icon-btn-focus-ring-width: calc(var(--icon-buttons-icon-button-enabled-icon-button-focus-indicator-thickness, var(--app-icon-buttons-icon-button-enabled-icon-button-focus-indicator-thickness, 0)) * 1px);--ui-icon-btn-focus-ring-offset: calc(var(--icon-buttons-icon-button-enabled-icon-button-focus-indicator-offset, var(--app-icon-buttons-icon-button-enabled-icon-button-focus-indicator-offset, 0)) * 1px);--ui-icon-btn-disabled-container-color: var(--icon-buttons-icon-button-disabled-icon-button-disabled-container-color, var(--ui-icon-btn-container-color));--ui-icon-btn-disabled-container-opacity: var(--icon-buttons-icon-button-disabled-icon-button-disabled-container-opacity, 100);--ui-icon-btn-disabled-icon-color: var(--icon-buttons-icon-button-disabled-icon-button-disabled-icon-color, var(--ui-icon-btn-icon-color));--ui-icon-btn-disabled-border-color: var(--ui-icon-btn-border-color);--ui-icon-btn-disabled-border-opacity: var(--icon-buttons-icon-button-disabled-icon-button-disabled-container-opacity, 100);--ui-icon-btn-disabled-opacity: 1;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;height:var(--ui-icon-btn-size);min-width:var(--ui-icon-btn-size);padding-inline-start:var(--ui-icon-btn-padding-inline-start);padding-inline-end:var(--ui-icon-btn-padding-inline-end);border-radius:var(--ui-icon-btn-radius);border-style:solid;border-width:var(--ui-icon-btn-border-width);border-color:var(--ui-icon-btn-border-color);background-color:var(--ui-icon-btn-container-color);color:var(--ui-icon-btn-icon-color);cursor:pointer;overflow:hidden;transition:background-color .15s ease,color .15s ease,border-color .15s ease,box-shadow .15s ease,border-radius .15s ease}.ui-icon-btn:after{content:\"\";position:absolute;inset:0;pointer-events:none;border-radius:inherit;background-color:transparent;opacity:0;transition:opacity .15s ease,background-color .15s ease}.ui-icon-btn__content{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center}.ui-icon-btn mat-icon,.ui-icon-btn .mat-icon,.ui-icon-btn>svg{width:var(--ui-icon-btn-icon-size);height:var(--ui-icon-btn-icon-size);font-size:var(--ui-icon-btn-icon-size);color:currentColor;fill:currentColor;display:inline-flex;align-items:center;justify-content:center;line-height:1}.ui-icon-btn mat-icon svg,.ui-icon-btn .mat-icon svg,.ui-icon-btn>svg{width:100%;height:100%;fill:currentColor}.ui-icon-btn:hover:not(:disabled):after{background-color:var(--ui-icon-btn-hover-layer-color);opacity:var(--ui-icon-btn-hover-layer-opacity)}.ui-icon-btn:focus-visible:not(:disabled):after{background-color:var(--ui-icon-btn-focus-layer-color);opacity:var(--ui-icon-btn-focus-layer-opacity)}.ui-icon-btn:active:not(:disabled):after{background-color:var(--ui-icon-btn-pressed-layer-color);opacity:var(--ui-icon-btn-pressed-layer-opacity)}.ui-icon-btn:active:not(:disabled){border-radius:var(--ui-icon-btn-pressed-radius)}.ui-icon-btn:focus-visible{outline:var(--ui-icon-btn-focus-ring-width) solid var(--ui-icon-btn-focus-ring-color);outline-offset:var(--ui-icon-btn-focus-ring-offset)}.ui-icon-btn:disabled{cursor:not-allowed;background-color:color-mix(in srgb,var(--ui-icon-btn-disabled-container-color) calc(var(--ui-icon-btn-disabled-container-opacity) * 1%),transparent);border-color:color-mix(in srgb,var(--ui-icon-btn-disabled-border-color) calc(var(--ui-icon-btn-disabled-border-opacity) * 1%),transparent);color:color-mix(in srgb,var(--ui-icon-btn-disabled-icon-color) calc(var(--ui-icon-btn-disabled-icon-opacity) * 1%),transparent);opacity:var(--ui-icon-btn-disabled-opacity)}.ui-icon-btn:disabled:after{opacity:0}.ui-icon-btn--xsmall{--ui-icon-btn-size: calc(var(--icon-buttons-size-xsmall-icon-button-xsmall-container-height) * 1px);--ui-icon-btn-icon-size: calc(var(--icon-buttons-size-xsmall-icon-button-xsmall-icon-size) * 1px);--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-xsmall-icon-button-xsmall-default-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-xsmall-icon-button-xsmall-default-trailing-space) * 1px);--ui-icon-btn-outline-width: calc(var(--icon-buttons-size-xsmall-icon-button-xsmall-outline-width) * 1px)}.ui-icon-btn--small{--ui-icon-btn-size: calc(var(--icon-buttons-size-small-icon-button-small-container-height) * 1px);--ui-icon-btn-icon-size: calc(var(--icon-buttons-size-small-icon-button-small-icon-size) * 1px);--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-small-icon-button-small-default-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-small-icon-button-small-default-trailing-space) * 1px);--ui-icon-btn-outline-width: calc(var(--icon-buttons-size-small-icon-button-small-outline-width) * 1px)}.ui-icon-btn--medium{--ui-icon-btn-size: calc(var(--icon-buttons-size-medium-icon-button-medium-container-height) * 1px);--ui-icon-btn-icon-size: calc(var(--icon-buttons-size-medium-icon-button-medium-icon-size) * 1px);--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-medium-icon-button-medium-default-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-medium-icon-button-medium-default-trailing-space) * 1px);--ui-icon-btn-outline-width: calc(var(--icon-buttons-size-medium-icon-button-medium-outline-width) * 1px)}.ui-icon-btn--large{--ui-icon-btn-size: calc(var(--icon-buttons-size-large-icon-button-large-container-height) * 1px);--ui-icon-btn-icon-size: calc(var(--icon-buttons-size-large-icon-button-large-icon-size) * 1px);--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-large-icon-button-large-default-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-large-icon-button-large-default-trailing-space) * 1px);--ui-icon-btn-outline-width: calc(var(--icon-buttons-size-large-icon-button-large-outline-width) * 1px)}.ui-icon-btn--xlarge{--ui-icon-btn-size: calc(var(--icon-buttons-size-xlarge-icon-button-xlarge-container-height) * 1px);--ui-icon-btn-icon-size: calc(var(--icon-buttons-size-xlarge-icon-button-xlarge-icon-size) * 1px);--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-xlarge-icon-button-xlarge-default-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-xlarge-icon-button-xlarge-default-trailing-space) * 1px);--ui-icon-btn-outline-width: calc(var(--icon-buttons-size-xlarge-icon-button-xlarge-outline-width) * 1px)}.ui-icon-btn--xsmall.ui-icon-btn--space-narrow{--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-xsmall-icon-button-xsmall-narrow-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-xsmall-icon-button-xsmall-narrow-trailing-space) * 1px)}.ui-icon-btn--xsmall.ui-icon-btn--space-wide{--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-xsmall-icon-button-xsmall-wide-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-xsmall-icon-button-xsmall-wide-trailing-space) * 1px)}.ui-icon-btn--small.ui-icon-btn--space-narrow{--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-small-icon-button-small-narrow-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-small-icon-button-small-narrow-trailing-space) * 1px)}.ui-icon-btn--small.ui-icon-btn--space-wide{--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-small-icon-button-small-wide-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-small-icon-button-small-wide-trailing-space) * 1px)}.ui-icon-btn--medium.ui-icon-btn--space-narrow{--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-medium-icon-button-medium-narrow-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-medium-icon-button-medium-narrow-trailing-space) * 1px)}.ui-icon-btn--medium.ui-icon-btn--space-wide{--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-medium-icon-button-medium-wide-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-medium-icon-button-medium-wide-trailing-space) * 1px)}.ui-icon-btn--large.ui-icon-btn--space-narrow{--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-large-icon-button-large-narrow-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-large-icon-button-large-narrow-trailing-space) * 1px)}.ui-icon-btn--large.ui-icon-btn--space-wide{--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-large-icon-button-large-wide-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-large-icon-button-large-wide-trailing-space) * 1px)}.ui-icon-btn--xlarge.ui-icon-btn--space-narrow{--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-xlarge-icon-button-xlarge-narrow-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-xlarge-icon-button-xlarge-narrow-trailing-space) * 1px)}.ui-icon-btn--xlarge.ui-icon-btn--space-wide{--ui-icon-btn-padding-inline-start: calc(var(--icon-buttons-size-xlarge-icon-button-xlarge-wide-leading-space) * 1px);--ui-icon-btn-padding-inline-end: calc(var(--icon-buttons-size-xlarge-icon-button-xlarge-wide-trailing-space) * 1px)}.ui-icon-btn--shape-round{--ui-icon-btn-radius: calc(var(--icon-buttons-icon-button-enabled-icon-button-container-shape-round, var(--app-icon-buttons-icon-button-enabled-icon-button-container-shape-round)) * 1px)}.ui-icon-btn--shape-square{--ui-icon-btn-radius: calc(var(--icon-buttons-icon-button-enabled-icon-button-container-shape-square, var(--app-icon-buttons-icon-button-enabled-icon-button-container-shape-square)) * 1px)}.ui-icon-btn--toggle-selected.ui-icon-btn--shape-round{--ui-icon-btn-radius: calc(var(--icon-buttons-icon-button-enabled-icon-button-selected-container-shape-round, var(--app-icon-buttons-icon-button-enabled-icon-button-selected-container-shape-round)) * 1px)}.ui-icon-btn--toggle-selected.ui-icon-btn--shape-square{--ui-icon-btn-radius: calc(var(--icon-buttons-icon-button-enabled-icon-button-selected-container-shape-square, var(--app-icon-buttons-icon-button-enabled-icon-button-selected-container-shape-square)) * 1px)}.ui-icon-btn--toggle{--ui-icon-btn-container-color: var(--icon-buttons-icon-button-enabled-icon-button-container-color-toggle-unselected, var(--app-icon-buttons-icon-button-enabled-icon-button-container-color-toggle-unselected, var(--ui-icon-btn-container-color)));--ui-icon-btn-icon-color: var(--icon-buttons-icon-button-enabled-icon-button-icon-color-toggle-unselected, var(--app-icon-buttons-icon-button-enabled-icon-button-icon-color-toggle-unselected, var(--ui-icon-btn-icon-color)));--ui-icon-btn-hover-layer-color: var(--icon-buttons-icon-button-hovered-icon-button-hovered-state-layer-color-toggle-unselected, var(--app-icon-buttons-icon-button-hovered-icon-button-hovered-state-layer-color-toggle-unselected, var(--ui-icon-btn-hover-layer-color)));--ui-icon-btn-focus-layer-color: var(--icon-buttons-icon-button-focused-icon-button-focused-state-layer-color-toggle-unselected, var(--app-icon-buttons-icon-button-focused-icon-button-focused-state-layer-color-toggle-unselected, var(--ui-icon-btn-focus-layer-color)));--ui-icon-btn-pressed-layer-color: var(--icon-buttons-icon-button-pressed-icon-button-pressed-state-layer-color-toggle-unselected, var(--app-icon-buttons-icon-button-pressed-icon-button-pressed-state-layer-color-toggle-unselected, var(--ui-icon-btn-pressed-layer-color)))}.ui-icon-btn--toggle-selected{--ui-icon-btn-container-color: var(--icon-buttons-icon-button-enabled-icon-button-container-color-toggle-selected, var(--app-icon-buttons-icon-button-enabled-icon-button-container-color-toggle-selected, var(--ui-icon-btn-container-color)));--ui-icon-btn-icon-color: var(--icon-buttons-icon-button-enabled-icon-button-icon-color-toggle-selected, var(--app-icon-buttons-icon-button-enabled-icon-button-icon-color-toggle-selected, var(--ui-icon-btn-icon-color)));--ui-icon-btn-hover-layer-color: var(--icon-buttons-icon-button-hovered-icon-button-hovered-state-layer-color-toggle-selected, var(--app-icon-buttons-icon-button-hovered-icon-button-hovered-state-layer-color-toggle-selected, var(--ui-icon-btn-hover-layer-color)));--ui-icon-btn-focus-layer-color: var(--icon-buttons-icon-button-focused-icon-button-focused-state-layer-color-toggle-selected, var(--app-icon-buttons-icon-button-focused-icon-button-focused-state-layer-color-toggle-selected, var(--ui-icon-btn-focus-layer-color)));--ui-icon-btn-pressed-layer-color: var(--icon-buttons-icon-button-pressed-icon-button-pressed-state-layer-color-toggle-selected, var(--app-icon-buttons-icon-button-pressed-icon-button-pressed-state-layer-color-toggle-selected, var(--ui-icon-btn-pressed-layer-color)))}.ui-icon-btn--variant-filled{--ui-icon-btn-container-color: var(--icon-buttons-color-filled-enabled-icon-button-filled-container-color);--ui-icon-btn-icon-color: var(--icon-buttons-color-filled-enabled-icon-button-filled-icon-color);--ui-icon-btn-ripple-boost: 2.8;--ui-icon-btn-ripple-min-opacity: .24;--ui-icon-btn-ripple-color: color-mix( in srgb, var(--ui-icon-btn-icon-color) calc(var(--ui-icon-btn-ripple-opacity) * 100%), transparent );--ui-icon-btn-border-width: 0;--ui-icon-btn-border-color: transparent;--ui-icon-btn-hover-layer-color: var(--icon-buttons-color-filled-hovered-icon-button-filled-hovered-state-layer-color);--ui-icon-btn-hover-layer-opacity: calc(var(--icon-buttons-color-filled-hovered-icon-button-filled-hovered-state-layer-opacity) / 100);--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-filled-focused-icon-button-filled-focused-state-layer-color);--ui-icon-btn-focus-layer-opacity: calc(var(--icon-buttons-color-filled-focused-icon-button-filled-focused-state-layer-opacity) / 100);--ui-icon-btn-pressed-layer-color: var(--icon-buttons-color-filled-pressed-icon-button-filled-pressed-state-layer-color);--ui-icon-btn-pressed-layer-opacity: calc(var(--icon-buttons-color-filled-pressed-icon-button-filled-pressed-state-layer-opacity) / 100);--ui-icon-btn-disabled-container-color: var(--icon-buttons-color-filled-disabled-icon-button-filled-disabled-container-color);--ui-icon-btn-disabled-container-opacity: var(--icon-buttons-color-filled-disabled-icon-button-filled-disabled-container-opacity);--ui-icon-btn-disabled-icon-color: var(--icon-buttons-color-filled-disabled-icon-button-filled-disabled-icon-color);--ui-icon-btn-disabled-icon-opacity: var(--icon-buttons-color-filled-disabled-icon-button-filled-disabled-icon-opacity)}.ui-icon-btn--variant-filled.ui-icon-btn--toggle{--ui-icon-btn-container-color: var(--icon-buttons-color-filled-enabled-icon-button-filled-container-color-toggle-unselected);--ui-icon-btn-icon-color: var(--icon-buttons-color-filled-enabled-icon-button-filled-icon-color-toggle-unselected);--ui-icon-btn-hover-layer-color: var(--icon-buttons-color-filled-hovered-icon-button-filled-hovered-state-layer-color-toggle-unselected);--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-filled-focused-icon-button-filled-focused-state-layer-color-toggle-unselected);--ui-icon-btn-pressed-layer-color: var(--icon-buttons-color-filled-pressed-icon-button-filled-pressed-state-layer-color-toggle-unselected)}.ui-icon-btn--variant-filled.ui-icon-btn--toggle-selected{--ui-icon-btn-container-color: var(--icon-buttons-color-filled-enabled-icon-button-filled-container-color-toggle-selected);--ui-icon-btn-icon-color: var(--icon-buttons-color-filled-enabled-icon-button-filled-icon-color-toggle-selected);--ui-icon-btn-hover-layer-color: var(--icon-buttons-color-filled-hovered-icon-button-filled-hovered-state-layer-color-toggle-selected);--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-filled-focused-icon-button-filled-focused-state-layer-color-toggle-selected);--ui-icon-btn-pressed-layer-color: var(--icon-buttons-color-filled-pressed-icon-button-filled-pressed-state-layer-color-toggle-selected)}.ui-icon-btn--variant-tonal{--ui-icon-btn-container-color: var(--icon-buttons-color-tonal-enabled-icon-button-tonal-container-color);--ui-icon-btn-icon-color: var(--icon-buttons-color-tonal-enabled-icon-button-tonal-icon-color);--ui-icon-btn-border-width: 0;--ui-icon-btn-border-color: transparent;--ui-icon-btn-hover-layer-color: var(--icon-buttons-color-tonal-hovered-icon-button-tonal-hovered-state-layer-color);--ui-icon-btn-hover-layer-opacity: calc(var(--icon-buttons-color-tonal-hovered-icon-button-tonal-hovered-state-layer-opacity) / 100);--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-tonal-focused-icon-button-tonal-focused-state-layer-color);--ui-icon-btn-focus-layer-opacity: calc(var(--icon-buttons-color-tonal-focused-icon-button-tonal-focused-state-layer-opacity) / 100);--ui-icon-btn-pressed-layer-color: var(--icon-buttons-color-tonal-pressed-icon-button-tonal-pressed-state-layer-color);--ui-icon-btn-pressed-layer-opacity: calc(var(--icon-buttons-color-tonal-pressed-icon-button-tonal-pressed-state-layer-opacity) / 100);--ui-icon-btn-disabled-container-color: var(--icon-buttons-color-tonal-disabled-icon-button-tonal-disabled-container-color);--ui-icon-btn-disabled-container-opacity: var(--icon-buttons-color-tonal-disabled-icon-button-tonal-disabled-container-opacity);--ui-icon-btn-disabled-icon-color: var(--icon-buttons-color-tonal-disabled-icon-button-tonal-disabled-icon-color);--ui-icon-btn-disabled-icon-opacity: var(--icon-buttons-color-tonal-disabled-icon-button-tonal-disabled-icon-opacity)}.ui-icon-btn--variant-tonal.ui-icon-btn--shape-round{--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-tonal-focused-icon-button-tonal-focused-state-layer-color)}.ui-icon-btn--variant-tonal.ui-icon-btn--toggle{--ui-icon-btn-container-color: var(--icon-buttons-color-tonal-enabled-icon-button-tonal-container-color-toggle-unselected);--ui-icon-btn-icon-color: var(--icon-buttons-color-tonal-enabled-icon-button-tonal-icon-color-toggle-unselected);--ui-icon-btn-hover-layer-color: var(--icon-buttons-color-tonal-hovered-icon-button-tonal-hovered-state-layer-color);--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-tonal-focused-icon-button-tonal-focused-state-layer-color);--ui-icon-btn-pressed-layer-color: var(--icon-buttons-color-tonal-pressed-icon-button-tonal-pressed-state-layer-color-toggle-unselected)}.ui-icon-btn--variant-tonal.ui-icon-btn--toggle-selected{--ui-icon-btn-container-color: var(--icon-buttons-color-tonal-enabled-icon-button-tonal-container-color-toggle-selected);--ui-icon-btn-icon-color: var(--icon-buttons-color-tonal-enabled-icon-button-tonal-icon-color-toggle-selected);--ui-icon-btn-hover-layer-color: var(--icon-buttons-color-tonal-hovered-icon-button-tonal-hovered-state-layer-color-toggle-selected);--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-tonal-focused-icon-button-tonal-focused-state-layer-color-toggle-selected);--ui-icon-btn-pressed-layer-color: var(--icon-buttons-color-tonal-pressed-icon-button-tonal-pressed-state-layer-color-toggle-selected)}.ui-icon-btn--variant-outlined{--ui-icon-btn-container-color: transparent;--ui-icon-btn-icon-color: var(--icon-buttons-color-outlined-enabled-icon-button-outlined-icon-color);--ui-icon-btn-border-width: var(--ui-icon-btn-outline-width);--ui-icon-btn-border-color: var(--icon-buttons-color-outlined-enabled-icon-button-outlined-color);--ui-icon-btn-hover-layer-color: #434749;--ui-icon-btn-hover-layer-opacity: .08;--ui-icon-btn-focus-layer-color: #434749;--ui-icon-btn-focus-layer-opacity: .1;--ui-icon-btn-pressed-layer-color: #434749;--ui-icon-btn-pressed-layer-opacity: .08;--ui-icon-btn-disabled-border-color: var(--icon-buttons-color-outlined-disabled-icon-button-outlined-disabled-outline-color);--ui-icon-btn-disabled-border-opacity: 100;--ui-icon-btn-disabled-container-color: var(--icon-buttons-color-outlined-disabled-icon-button-outlined-disabled-container-color-selected, transparent);--ui-icon-btn-disabled-container-opacity: var(--icon-buttons-color-outlined-disabled-icon-button-outlined-disabled-container-opacity-selected, 0);--ui-icon-btn-disabled-icon-color: var(--icon-buttons-color-outlined-disabled-icon-button-outlined-disabled-icon-color);--ui-icon-btn-disabled-icon-opacity: var(--icon-buttons-color-outlined-disabled-icon-button-outlined-disabled-icon-opacity)}.ui-icon-btn--variant-outlined.ui-icon-btn--toggle{--ui-icon-btn-icon-color: var(--icon-buttons-color-outlined-enabled-icon-button-outlined-icon-color-toggle-unselected);--ui-icon-btn-hover-layer-color: #434749;--ui-icon-btn-focus-layer-color: #434749;--ui-icon-btn-pressed-layer-color: #434749;--ui-icon-btn-hover-layer-opacity: .08;--ui-icon-btn-focus-layer-opacity: .1;--ui-icon-btn-pressed-layer-opacity: .08}.ui-icon-btn--variant-outlined.ui-icon-btn--toggle-selected{--ui-icon-btn-container-color: var(--icon-buttons-color-outlined-enabled-icon-button-container-color-toggle-selected, transparent);--ui-icon-btn-icon-color: var(--icon-buttons-color-outlined-enabled-icon-button-outlined-icon-color-toggle-selected);--ui-icon-btn-hover-layer-color: #434749;--ui-icon-btn-focus-layer-color: #434749;--ui-icon-btn-pressed-layer-color: #434749;--ui-icon-btn-hover-layer-opacity: .08;--ui-icon-btn-focus-layer-opacity: .1;--ui-icon-btn-pressed-layer-opacity: .08}.ui-icon-btn--variant-standard{--ui-icon-btn-container-color: transparent;--ui-icon-btn-icon-color: var(--icon-buttons-color-standard-enabled-icon-button-icon-color);--ui-icon-btn-border-width: 0;--ui-icon-btn-border-color: transparent;--ui-icon-btn-hover-layer-color: var(--icon-buttons-color-standard-hovered-icon-button-hovered-state-layer-color, var(--app-icon-buttons-color-standard-hovered-icon-button-hovered-state-layer-color, rgba(67, 71, 73, .08)));--ui-icon-btn-hover-layer-opacity: 1;--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-standard-focused-icon-button-focused-state-layer-color, var(--app-icon-buttons-color-standard-focused-icon-button-focused-state-layer-color, rgba(67, 71, 73, .08)));--ui-icon-btn-focus-layer-opacity: 1;--ui-icon-btn-pressed-layer-color: var(--icon-buttons-color-standard-pressed-icon-button-pressed-state-layer-color, var(--app-icon-buttons-color-standard-pressed-icon-button-pressed-state-layer-color, rgba(67, 71, 73, .12)));--ui-icon-btn-pressed-layer-opacity: 1;--ui-icon-btn-disabled-icon-color: var(--icon-buttons-color-standard-disabled-icon-button-disabled-icon-color);--ui-icon-btn-disabled-icon-opacity: var(--icon-buttons-color-standard-disabled-icon-button-disabled-opacity);--ui-icon-btn-disabled-opacity: 1}.ui-icon-btn--variant-standard.ui-icon-btn--toggle{--ui-icon-btn-icon-color: var(--icon-buttons-color-standard-enabled-icon-button-icon-color-toggle-unselected);--ui-icon-btn-hover-layer-color: var(--icon-buttons-color-standard-hovered-icon-button-hovered-state-layer-color-toggle-unselected);--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-standard-focused-icon-button-focused-state-layer-color-toggle-unselected);--ui-icon-btn-pressed-layer-color: var(--icon-buttons-color-standard-pressed-icon-button-pressed-state-layer-color-toggle-unselected)}.ui-icon-btn--variant-standard.ui-icon-btn--toggle-selected{--ui-icon-btn-icon-color: var(--icon-buttons-color-standard-enabled-icon-button-icon-color-toggle-selected);--ui-icon-btn-hover-layer-color: var(--icon-buttons-color-standard-hovered-icon-button-hovered-state-layer-color-toggle-selected);--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-standard-focused-icon-button-focused-state-layer-color-toggle-selected);--ui-icon-btn-pressed-layer-color: var(--icon-buttons-color-standard-pressed-icon-button-pressed-state-layer-color-toggle-selected)}.ui-icon-btn--variant-action{--ui-icon-btn-container-color: transparent;--ui-icon-btn-icon-color: var(--icon-buttons-color-action-enabled-icon-button-icon-color);--ui-icon-btn-border-width: 0;--ui-icon-btn-border-color: transparent;--ui-icon-btn-hover-layer-color: var(--icon-buttons-color-action-hovered-icon-button-hovered-state-layer-color, var(--app-icon-buttons-color-action-hovered-icon-button-hovered-state-layer-color, transparent));--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-action-focused-icon-button-focused-state-layer-color, var(--app-icon-buttons-color-action-focused-icon-button-focused-state-layer-color, transparent));--ui-icon-btn-focus-layer-opacity: calc(var(--icon-buttons-color-action-focused-icon-button-focused-state-layer-opacity, var(--app-icon-buttons-color-action-focused-icon-button-focused-state-layer-opacity, 0)) / 100);--ui-icon-btn-pressed-layer-color: var(--icon-buttons-color-action-pressed-icon-button-pressed-state-layer-color, var(--app-icon-buttons-color-action-pressed-icon-button-pressed-state-layer-color, transparent));--ui-icon-btn-disabled-icon-color: var(--icon-buttons-color-action-disabled-icon-button-disabled-icon-color);--ui-icon-btn-disabled-icon-opacity: var(--icon-buttons-color-action-disabled-icon-button-disabled-opacity);--ui-icon-btn-disabled-opacity: 1}.ui-icon-btn--variant-action.ui-icon-btn--toggle,.ui-icon-btn--variant-action.ui-icon-btn--toggle-selected{--ui-icon-btn-hover-layer-color: var(--icon-buttons-color-action-hovered-icon-button-hovered-state-layer-color, var(--app-icon-buttons-color-action-hovered-icon-button-hovered-state-layer-color, transparent));--ui-icon-btn-hover-layer-opacity: calc((var(--icon-buttons-color-action-hovered-icon-button-hovered-state-layer-opacity, var(--app-icon-buttons-color-action-hovered-icon-button-hovered-state-layer-opacity, 0)) * 3) / 100);--ui-icon-btn-focus-layer-color: var(--icon-buttons-color-action-focused-icon-button-focused-state-layer-color, var(--app-icon-buttons-color-action-focused-icon-button-focused-state-layer-color, transparent));--ui-icon-btn-focus-layer-opacity: calc(var(--icon-buttons-color-action-focused-icon-button-focused-state-layer-opacity, var(--app-icon-buttons-color-action-focused-icon-button-focused-state-layer-opacity, 0)) / 100);--ui-icon-btn-pressed-layer-color: var(--icon-buttons-color-action-pressed-icon-button-pressed-state-layer-color, var(--app-icon-buttons-color-action-pressed-icon-button-pressed-state-layer-color, transparent));--ui-icon-btn-pressed-layer-opacity: calc(var(--icon-buttons-color-action-pressed-icon-button-pressed-state-layer-opacity, var(--app-icon-buttons-color-action-pressed-icon-button-pressed-state-layer-opacity, 0)) / 100)}\n"] }]
|
|
1155
|
+
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], space: [{ type: i0.Input, args: [{ isSignal: true, alias: "space", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], toggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggle", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }] } });
|
|
1156
|
+
|
|
1157
|
+
class SlideToggle {
|
|
1158
|
+
checked = input(false, ...(ngDevMode ? [{ debugName: "checked" }] : []));
|
|
1159
|
+
checkedChange = output();
|
|
1160
|
+
onChange(event) {
|
|
1161
|
+
this.checkedChange.emit(event.checked);
|
|
1162
|
+
}
|
|
1163
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: SlideToggle, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1164
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.9", type: SlideToggle, isStandalone: true, selector: "lib-slide-toggle, slide-toggle", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkedChange: "checkedChange" }, ngImport: i0, template: "<mat-slide-toggle [checked]=\"checked()\" [hideIcon]=\"true\" (change)=\"onChange($event)\">\r\n\t<ng-content></ng-content>\r\n</mat-slide-toggle>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i1$6.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }] });
|
|
1165
|
+
}
|
|
1166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: SlideToggle, decorators: [{
|
|
1167
|
+
type: Component,
|
|
1168
|
+
args: [{ selector: 'lib-slide-toggle, slide-toggle', standalone: true, imports: [MatSlideToggleModule], template: "<mat-slide-toggle [checked]=\"checked()\" [hideIcon]=\"true\" (change)=\"onChange($event)\">\r\n\t<ng-content></ng-content>\r\n</mat-slide-toggle>\r\n" }]
|
|
1169
|
+
}], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }], checkedChange: [{ type: i0.Output, args: ["checkedChange"] }] } });
|
|
1170
|
+
|
|
1171
|
+
class CircularProgressStepper {
|
|
1172
|
+
currentStep = input(0, ...(ngDevMode ? [{ debugName: "currentStep" }] : []));
|
|
1173
|
+
totalsStep = input(0, ...(ngDevMode ? [{ debugName: "totalsStep" }] : []));
|
|
1174
|
+
size = input('64px', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
1175
|
+
barWidth = input('10px', ...(ngDevMode ? [{ debugName: "barWidth" }] : []));
|
|
1176
|
+
colorBarProgress = input('#0BC626', ...(ngDevMode ? [{ debugName: "colorBarProgress" }] : []));
|
|
1177
|
+
shadowColorBarProgress = input('#F0F0F0', ...(ngDevMode ? [{ debugName: "shadowColorBarProgress" }] : []));
|
|
1178
|
+
noJsMessage = input('Esta función requiere JavaScript 😢', ...(ngDevMode ? [{ debugName: "noJsMessage" }] : []));
|
|
1179
|
+
animationDuration = input(500, ...(ngDevMode ? [{ debugName: "animationDuration" }] : []));
|
|
1180
|
+
progress = signal(0, ...(ngDevMode ? [{ debugName: "progress" }] : []));
|
|
1181
|
+
isAnimating = signal(false, ...(ngDevMode ? [{ debugName: "isAnimating" }] : []));
|
|
1182
|
+
jsEnabled = signal(true, ...(ngDevMode ? [{ debugName: "jsEnabled" }] : []));
|
|
1183
|
+
progressPercentage = computed(() => `${this.progress()}%`, ...(ngDevMode ? [{ debugName: "progressPercentage" }] : []));
|
|
1184
|
+
constructor() {
|
|
1185
|
+
effect(() => {
|
|
1186
|
+
this.updateProgress();
|
|
1187
|
+
});
|
|
1188
|
+
}
|
|
1189
|
+
updateProgress() {
|
|
1190
|
+
const previousStep = (this.currentStep() > 0) ? this.currentStep() - 1 : 0;
|
|
1191
|
+
const previousProgress = (Math.round(previousStep) / Math.round(this.totalsStep())) * 100;
|
|
1192
|
+
this.progress.set(Math.round(previousProgress));
|
|
1193
|
+
const progress = (Math.round(this.currentStep()) / Math.round(this.totalsStep())) * 100;
|
|
1194
|
+
setTimeout(() => {
|
|
1195
|
+
this.progress.set(Math.round(progress));
|
|
1196
|
+
}, 100);
|
|
1197
|
+
}
|
|
1198
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: CircularProgressStepper, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1199
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: CircularProgressStepper, isStandalone: true, selector: "lib-circular-progress-stepper, circular-progress-stepper", inputs: { currentStep: { classPropertyName: "currentStep", publicName: "currentStep", isSignal: true, isRequired: false, transformFunction: null }, totalsStep: { classPropertyName: "totalsStep", publicName: "totalsStep", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, barWidth: { classPropertyName: "barWidth", publicName: "barWidth", isSignal: true, isRequired: false, transformFunction: null }, colorBarProgress: { classPropertyName: "colorBarProgress", publicName: "colorBarProgress", isSignal: true, isRequired: false, transformFunction: null }, shadowColorBarProgress: { classPropertyName: "shadowColorBarProgress", publicName: "shadowColorBarProgress", isSignal: true, isRequired: false, transformFunction: null }, noJsMessage: { classPropertyName: "noJsMessage", publicName: "noJsMessage", isSignal: true, isRequired: false, transformFunction: null }, animationDuration: { classPropertyName: "animationDuration", publicName: "animationDuration", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\r\n class=\"progressbar\"\r\n [class.no-js]=\"!jsEnabled()\"\r\n [attr.role]=\"jsEnabled() ? 'progressbar' : null\"\r\n [attr.aria-valuemin]=\"0\"\r\n [attr.aria-valuemax]=\"100\"\r\n [attr.aria-busy]=\"isAnimating()\"\r\n [attr.aria-live]=\"jsEnabled() ? 'polite' : null\"\r\n [style.--progress]=\"progressPercentage()\"\r\n [style.--size]=\"size()\"\r\n [style.--bar-width]=\"barWidth()\"\r\n [style.--color-bar-progress]=\"colorBarProgress()\"\r\n [style.--shadow-shadow-bar-progress]=\"shadowColorBarProgress()\">\r\n\r\n <div class=\"progress-content\">\r\n <span class=\"step-text\">Paso</span>\r\n <span class=\"step-number\">{{ `${currentStep()} de ${totalsStep()}` }}</span>\r\n </div>\r\n @if (!jsEnabled()) {\r\n <span>{{ noJsMessage() }}</span>\r\n }\r\n\r\n</div>\r\n", styles: ["@property --progress{syntax: \"<length-percentage>\"; inherits: false; initial-value: 0%;}.progressbar[role=progressbar]{--size: 64px;--bar-width: 10px;--color-bar-progress: #0BC626;--shadow-color-bar-progress: #F0F0F0;width:var(--size);aspect-ratio:1 / 1;position:relative;background:conic-gradient(var(--color-bar-progress),var(--color-bar-progress) var(--progress),var(--shadow-color-bar-progress) 0%);border-radius:50vmax;display:grid;place-items:center;transition:--progress .5s linear}.progressbar[role=progressbar]>span{display:none}.progressbar[role=progressbar]:after{content:\"\";background:#fff;position:absolute;inset:calc(var(--bar-width) / 2);aspect-ratio:1;border-radius:inherit;display:grid;place-items:center;z-index:0}.progressbar:not([role=progressbar]){position:relative;width:var(--size, 132px);aspect-ratio:1 / 1;margin:2rem auto;display:grid;place-items:center;background:#f3f4f6;border-radius:50%}.progressbar:not([role=progressbar]):after{display:none}.progressbar:not([role=progressbar]) span{font-size:1rem;text-align:center;color:#059669;padding:1rem}.progress-content{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.progress-content .step-text{font-size:10px;font-weight:400;color:#3e3e3e}.progress-content .step-number{font-size:12px;font-weight:400;color:#3e3e3e}\n"] });
|
|
1200
|
+
}
|
|
1201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: CircularProgressStepper, decorators: [{
|
|
1202
|
+
type: Component,
|
|
1203
|
+
args: [{ selector: 'lib-circular-progress-stepper, circular-progress-stepper', imports: [], template: "<div\r\n class=\"progressbar\"\r\n [class.no-js]=\"!jsEnabled()\"\r\n [attr.role]=\"jsEnabled() ? 'progressbar' : null\"\r\n [attr.aria-valuemin]=\"0\"\r\n [attr.aria-valuemax]=\"100\"\r\n [attr.aria-busy]=\"isAnimating()\"\r\n [attr.aria-live]=\"jsEnabled() ? 'polite' : null\"\r\n [style.--progress]=\"progressPercentage()\"\r\n [style.--size]=\"size()\"\r\n [style.--bar-width]=\"barWidth()\"\r\n [style.--color-bar-progress]=\"colorBarProgress()\"\r\n [style.--shadow-shadow-bar-progress]=\"shadowColorBarProgress()\">\r\n\r\n <div class=\"progress-content\">\r\n <span class=\"step-text\">Paso</span>\r\n <span class=\"step-number\">{{ `${currentStep()} de ${totalsStep()}` }}</span>\r\n </div>\r\n @if (!jsEnabled()) {\r\n <span>{{ noJsMessage() }}</span>\r\n }\r\n\r\n</div>\r\n", styles: ["@property --progress{syntax: \"<length-percentage>\"; inherits: false; initial-value: 0%;}.progressbar[role=progressbar]{--size: 64px;--bar-width: 10px;--color-bar-progress: #0BC626;--shadow-color-bar-progress: #F0F0F0;width:var(--size);aspect-ratio:1 / 1;position:relative;background:conic-gradient(var(--color-bar-progress),var(--color-bar-progress) var(--progress),var(--shadow-color-bar-progress) 0%);border-radius:50vmax;display:grid;place-items:center;transition:--progress .5s linear}.progressbar[role=progressbar]>span{display:none}.progressbar[role=progressbar]:after{content:\"\";background:#fff;position:absolute;inset:calc(var(--bar-width) / 2);aspect-ratio:1;border-radius:inherit;display:grid;place-items:center;z-index:0}.progressbar:not([role=progressbar]){position:relative;width:var(--size, 132px);aspect-ratio:1 / 1;margin:2rem auto;display:grid;place-items:center;background:#f3f4f6;border-radius:50%}.progressbar:not([role=progressbar]):after{display:none}.progressbar:not([role=progressbar]) span{font-size:1rem;text-align:center;color:#059669;padding:1rem}.progress-content{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.progress-content .step-text{font-size:10px;font-weight:400;color:#3e3e3e}.progress-content .step-number{font-size:12px;font-weight:400;color:#3e3e3e}\n"] }]
|
|
1204
|
+
}], ctorParameters: () => [], propDecorators: { currentStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentStep", required: false }] }], totalsStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalsStep", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], barWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "barWidth", required: false }] }], colorBarProgress: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorBarProgress", required: false }] }], shadowColorBarProgress: [{ type: i0.Input, args: [{ isSignal: true, alias: "shadowColorBarProgress", required: false }] }], noJsMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "noJsMessage", required: false }] }], animationDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "animationDuration", required: false }] }] } });
|
|
1205
|
+
|
|
1206
|
+
class LibSpinnerComponent {
|
|
1207
|
+
diameter = input(48, ...(ngDevMode ? [{ debugName: "diameter" }] : []));
|
|
1208
|
+
strokeWidth = input(4, ...(ngDevMode ? [{ debugName: "strokeWidth" }] : []));
|
|
1209
|
+
color = input('var(--Rojo-400, #e30613)', ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
1210
|
+
ariaLabel = input('Cargando', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
1211
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1212
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.9", type: LibSpinnerComponent, isStandalone: true, selector: "lib-spinner, spinner", inputs: { diameter: { classPropertyName: "diameter", publicName: "diameter", isSignal: true, isRequired: false, transformFunction: null }, strokeWidth: { classPropertyName: "strokeWidth", publicName: "strokeWidth", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<mat-spinner\r\n mode=\"indeterminate\"\r\n class=\"lib-spinner\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [diameter]=\"diameter()\"\r\n [strokeWidth]=\"strokeWidth()\"\r\n [style.--lib-spinner-color]=\"color()\"\r\n></mat-spinner>\r\n\r\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center}:host ::ng-deep .lib-spinner{--mdc-circular-progress-active-indicator-color: var(--lib-spinner-color, var(--Rojo-400, #e30613))}\n"], dependencies: [{ kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] });
|
|
1213
|
+
}
|
|
1214
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibSpinnerComponent, decorators: [{
|
|
1215
|
+
type: Component,
|
|
1216
|
+
args: [{ selector: 'lib-spinner, spinner', standalone: true, imports: [MatProgressSpinnerModule], template: "<mat-spinner\r\n mode=\"indeterminate\"\r\n class=\"lib-spinner\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [diameter]=\"diameter()\"\r\n [strokeWidth]=\"strokeWidth()\"\r\n [style.--lib-spinner-color]=\"color()\"\r\n></mat-spinner>\r\n\r\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center}:host ::ng-deep .lib-spinner{--mdc-circular-progress-active-indicator-color: var(--lib-spinner-color, var(--Rojo-400, #e30613))}\n"] }]
|
|
1217
|
+
}], propDecorators: { diameter: [{ type: i0.Input, args: [{ isSignal: true, alias: "diameter", required: false }] }], strokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "strokeWidth", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
1218
|
+
|
|
1219
|
+
class LibDividerComponent {
|
|
1220
|
+
/** Orientación: horizontal (full width) o vertical (full height). Figma: Horizontal/Full-width, Vertical/Full-width */
|
|
1221
|
+
orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : []));
|
|
1222
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibDividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1223
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.9", type: LibDividerComponent, isStandalone: true, selector: "lib-divider", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\r\n class=\"ui-divider\"\r\n [class.ui-divider--horizontal]=\"orientation() === 'horizontal'\"\r\n [class.ui-divider--vertical]=\"orientation() === 'vertical'\"\r\n role=\"separator\"\r\n [attr.aria-orientation]=\"orientation()\"\r\n></div>\r\n", styles: [":host{display:flex;align-items:stretch}.ui-divider{flex-shrink:0;background:var(--divider-enabled-container-divider-color, #c3c7c9)}.ui-divider--horizontal{width:100%;height:var(--divider-enabled-container-divider-thickness, .0625rem);min-height:.0625rem}.ui-divider--vertical{width:var(--divider-enabled-container-divider-thickness, .0625rem);min-width:.0625rem;align-self:stretch;min-height:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1224
|
+
}
|
|
1225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibDividerComponent, decorators: [{
|
|
1226
|
+
type: Component,
|
|
1227
|
+
args: [{ selector: 'lib-divider', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"ui-divider\"\r\n [class.ui-divider--horizontal]=\"orientation() === 'horizontal'\"\r\n [class.ui-divider--vertical]=\"orientation() === 'vertical'\"\r\n role=\"separator\"\r\n [attr.aria-orientation]=\"orientation()\"\r\n></div>\r\n", styles: [":host{display:flex;align-items:stretch}.ui-divider{flex-shrink:0;background:var(--divider-enabled-container-divider-color, #c3c7c9)}.ui-divider--horizontal{width:100%;height:var(--divider-enabled-container-divider-thickness, .0625rem);min-height:.0625rem}.ui-divider--vertical{width:var(--divider-enabled-container-divider-thickness, .0625rem);min-width:.0625rem;align-self:stretch;min-height:0}\n"] }]
|
|
1228
|
+
}], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }] } });
|
|
1229
|
+
|
|
1230
|
+
class LibTooltipComponent {
|
|
1231
|
+
/** Texto del tooltip. */
|
|
1232
|
+
text = input('Supporting text', ...(ngDevMode ? [{ debugName: "text" }] : []));
|
|
1233
|
+
/** Variante del tooltip según Figma: single-line o multi-line. */
|
|
1234
|
+
type = input('single-line', ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
1235
|
+
/** Ancho máximo opcional para controlar el wrap en multi-line (ej: "12.5rem", "200px"). */
|
|
1236
|
+
maxWidth = input(null, ...(ngDevMode ? [{ debugName: "maxWidth" }] : []));
|
|
1237
|
+
classes = computed(() => ({
|
|
1238
|
+
'ui-tooltip--single-line': this.type() === 'single-line',
|
|
1239
|
+
'ui-tooltip--multi-line': this.type() === 'multi-line',
|
|
1240
|
+
}), ...(ngDevMode ? [{ debugName: "classes" }] : []));
|
|
1241
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1242
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.9", type: LibTooltipComponent, isStandalone: true, selector: "lib-tooltip", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.ui-tooltip-host": "true" } }, ngImport: i0, template: "<div class=\"ui-tooltip\" [ngClass]=\"classes()\" [style.max-width]=\"maxWidth()\">\r\n <span class=\"ui-tooltip__text\">{{ text() }}</span>\r\n</div>\r\n", styles: [":host.ui-tooltip-host{display:inline-flex}.ui-tooltip{display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:4px 8px;border-radius:calc(var(--tooltips-plain-enabled-container-plain-tooltip-container-shape, 4) * 1px);background:var(--tooltips-plain-enabled-container-plain-tooltip-container-color, #2d3133);box-sizing:border-box}.ui-tooltip__text{color:var(--tooltips-plain-enabled-supporting-text-plain-tooltip-supporting-text-color, #eef1f3);font-family:var(--tooltips-plain-enabled-supporting-text-plain-tooltip-supporting-text-font, \"Heebo\"),sans-serif;font-size:var(--tooltips-plain-enabled-supporting-text-plain-tooltip-supporting-text-size, 12px);font-style:normal;font-weight:var(--tooltips-plain-enabled-supporting-text-plain-tooltip-supporting-text-weight, 400);line-height:calc(var(--tooltips-plain-enabled-supporting-text-plain-tooltip-supporting-text-line-height, 16) * 1px);letter-spacing:var(--tooltips-plain-enabled-supporting-text-plain-tooltip-supporting-text-tracking, .4px)}.ui-tooltip--single-line .ui-tooltip__text{white-space:nowrap}.ui-tooltip--multi-line .ui-tooltip__text{white-space:normal}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1243
|
+
}
|
|
1244
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibTooltipComponent, decorators: [{
|
|
1245
|
+
type: Component,
|
|
1246
|
+
args: [{ selector: 'lib-tooltip', standalone: true, imports: [NgClass], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1247
|
+
'[class.ui-tooltip-host]': 'true',
|
|
1248
|
+
}, template: "<div class=\"ui-tooltip\" [ngClass]=\"classes()\" [style.max-width]=\"maxWidth()\">\r\n <span class=\"ui-tooltip__text\">{{ text() }}</span>\r\n</div>\r\n", styles: [":host.ui-tooltip-host{display:inline-flex}.ui-tooltip{display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:4px 8px;border-radius:calc(var(--tooltips-plain-enabled-container-plain-tooltip-container-shape, 4) * 1px);background:var(--tooltips-plain-enabled-container-plain-tooltip-container-color, #2d3133);box-sizing:border-box}.ui-tooltip__text{color:var(--tooltips-plain-enabled-supporting-text-plain-tooltip-supporting-text-color, #eef1f3);font-family:var(--tooltips-plain-enabled-supporting-text-plain-tooltip-supporting-text-font, \"Heebo\"),sans-serif;font-size:var(--tooltips-plain-enabled-supporting-text-plain-tooltip-supporting-text-size, 12px);font-style:normal;font-weight:var(--tooltips-plain-enabled-supporting-text-plain-tooltip-supporting-text-weight, 400);line-height:calc(var(--tooltips-plain-enabled-supporting-text-plain-tooltip-supporting-text-line-height, 16) * 1px);letter-spacing:var(--tooltips-plain-enabled-supporting-text-plain-tooltip-supporting-text-tracking, .4px)}.ui-tooltip--single-line .ui-tooltip__text{white-space:nowrap}.ui-tooltip--multi-line .ui-tooltip__text{white-space:normal}\n"] }]
|
|
1249
|
+
}], propDecorators: { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }] } });
|
|
1250
|
+
|
|
1251
|
+
class LibCardComponent {
|
|
1252
|
+
title = input('Header', ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
1253
|
+
subhead = input('', ...(ngDevMode ? [{ debugName: "subhead" }] : []));
|
|
1254
|
+
variant = input('outlined', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
1255
|
+
state = input('enabled', ...(ngDevMode ? [{ debugName: "state" }] : []));
|
|
1256
|
+
leadingKind = input('avatar', ...(ngDevMode ? [{ debugName: "leadingKind" }] : []));
|
|
1257
|
+
leadingIcon = input('', ...(ngDevMode ? [{ debugName: "leadingIcon" }] : []));
|
|
1258
|
+
/** Tamaño del contenedor leading (Figma suele usar 2.5rem). */
|
|
1259
|
+
leadingContainerSize = input('2.5rem', ...(ngDevMode ? [{ debugName: "leadingContainerSize" }] : []));
|
|
1260
|
+
/** Tamaño del icono leading. */
|
|
1261
|
+
leadingIconSize = input('2.08331rem', ...(ngDevMode ? [{ debugName: "leadingIconSize" }] : []));
|
|
1262
|
+
mediaIcon = input('', ...(ngDevMode ? [{ debugName: "mediaIcon" }] : []));
|
|
1263
|
+
mediaAlt = input('Card media', ...(ngDevMode ? [{ debugName: "mediaAlt" }] : []));
|
|
1264
|
+
showMedia = input(false, ...(ngDevMode ? [{ debugName: "showMedia" }] : []));
|
|
1265
|
+
avatarText = input('', ...(ngDevMode ? [{ debugName: "avatarText" }] : []));
|
|
1266
|
+
width = input('20.5rem', ...(ngDevMode ? [{ debugName: "width" }] : []));
|
|
1267
|
+
/** Alto del card. */
|
|
1268
|
+
height = input('4.5rem', ...(ngDevMode ? [{ debugName: "height" }] : []));
|
|
1269
|
+
/** Si es true, el card toma el 100% del ancho del contenedor padre. */
|
|
1270
|
+
fullWidth = input(false, ...(ngDevMode ? [{ debugName: "fullWidth" }] : []));
|
|
1271
|
+
active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : []));
|
|
1272
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
1273
|
+
cardClick = output();
|
|
1274
|
+
initial = computed(() => {
|
|
1275
|
+
const text = this.avatarText().trim();
|
|
1276
|
+
if (text.length)
|
|
1277
|
+
return text.slice(0, 1).toUpperCase();
|
|
1278
|
+
const title = this.title().trim();
|
|
1279
|
+
return title.length ? title.slice(0, 1).toUpperCase() : 'A';
|
|
1280
|
+
}, ...(ngDevMode ? [{ debugName: "initial" }] : []));
|
|
1281
|
+
hasMedia = computed(() => this.mediaIcon().trim().length > 0, ...(ngDevMode ? [{ debugName: "hasMedia" }] : []));
|
|
1282
|
+
isMediaImage = computed(() => this.mediaIcon().trim().endsWith('.svg'), ...(ngDevMode ? [{ debugName: "isMediaImage" }] : []));
|
|
1283
|
+
hasLeadingIcon = computed(() => this.leadingIcon().trim().length > 0, ...(ngDevMode ? [{ debugName: "hasLeadingIcon" }] : []));
|
|
1284
|
+
isLeadingImage = computed(() => this.leadingIcon().trim().endsWith('.svg'), ...(ngDevMode ? [{ debugName: "isLeadingImage" }] : []));
|
|
1285
|
+
hasSubhead = computed(() => this.subhead().trim().length > 0, ...(ngDevMode ? [{ debugName: "hasSubhead" }] : []));
|
|
1286
|
+
classes = computed(() => ({
|
|
1287
|
+
'ui-card': true,
|
|
1288
|
+
'ui-card--outlined': this.variant() === 'outlined',
|
|
1289
|
+
'ui-card--elevated': this.variant() === 'elevated',
|
|
1290
|
+
'ui-card--filled': this.variant() === 'filled',
|
|
1291
|
+
'ui-card--state-enabled': this.state() === 'enabled',
|
|
1292
|
+
'ui-card--state-hovered': this.state() === 'hovered',
|
|
1293
|
+
'ui-card--state-focused': this.state() === 'focused',
|
|
1294
|
+
'ui-card--state-pressed': this.state() === 'pressed',
|
|
1295
|
+
'ui-card--state-dragged': this.state() === 'dragged',
|
|
1296
|
+
'ui-card--leading-avatar': this.leadingKind() === 'avatar',
|
|
1297
|
+
'ui-card--leading-icon': this.leadingKind() === 'icon',
|
|
1298
|
+
'ui-card--with-media': this.showMedia() && this.hasMedia(),
|
|
1299
|
+
'ui-card--title-emphasized': !this.hasSubhead(),
|
|
1300
|
+
'ui-card--active': this.active(),
|
|
1301
|
+
'ui-card--disabled': this.disabled(),
|
|
1302
|
+
}), ...(ngDevMode ? [{ debugName: "classes" }] : []));
|
|
1303
|
+
onCardClick() {
|
|
1304
|
+
if (this.disabled())
|
|
1305
|
+
return;
|
|
1306
|
+
this.cardClick.emit();
|
|
1307
|
+
}
|
|
1308
|
+
onCardKeydown(event) {
|
|
1309
|
+
if (this.disabled())
|
|
1310
|
+
return;
|
|
1311
|
+
if (event.code === 'Enter' || event.code === 'Space') {
|
|
1312
|
+
event.preventDefault();
|
|
1313
|
+
this.cardClick.emit();
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1317
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: LibCardComponent, isStandalone: true, selector: "lib-card", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subhead: { classPropertyName: "subhead", publicName: "subhead", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, leadingKind: { classPropertyName: "leadingKind", publicName: "leadingKind", isSignal: true, isRequired: false, transformFunction: null }, leadingIcon: { classPropertyName: "leadingIcon", publicName: "leadingIcon", isSignal: true, isRequired: false, transformFunction: null }, leadingContainerSize: { classPropertyName: "leadingContainerSize", publicName: "leadingContainerSize", isSignal: true, isRequired: false, transformFunction: null }, leadingIconSize: { classPropertyName: "leadingIconSize", publicName: "leadingIconSize", isSignal: true, isRequired: false, transformFunction: null }, mediaIcon: { classPropertyName: "mediaIcon", publicName: "mediaIcon", isSignal: true, isRequired: false, transformFunction: null }, mediaAlt: { classPropertyName: "mediaAlt", publicName: "mediaAlt", isSignal: true, isRequired: false, transformFunction: null }, showMedia: { classPropertyName: "showMedia", publicName: "showMedia", isSignal: true, isRequired: false, transformFunction: null }, avatarText: { classPropertyName: "avatarText", publicName: "avatarText", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cardClick: "cardClick" }, host: { properties: { "class.lib-card-host--full-width": "fullWidth()" } }, ngImport: i0, template: "<div\r\n [ngClass]=\"classes()\"\r\n [style.width]=\"fullWidth() ? '100%' : width()\"\r\n [style.min-width]=\"fullWidth() ? '0rem' : width()\"\r\n [style.height]=\"height()\"\r\n [style.min-height]=\"height()\"\r\n [attr.aria-disabled]=\"disabled()\"\r\n role=\"button\"\r\n tabindex=\"0\"\r\n (click)=\"onCardClick()\"\r\n (keydown)=\"onCardKeydown($event)\"\r\n>\r\n <div class=\"ui-card__content\">\r\n @if (leadingKind() === 'icon') {\r\n <div\r\n class=\"ui-card__leading ui-card__leading--icon\"\r\n aria-hidden=\"true\"\r\n [style.width]=\"leadingContainerSize()\"\r\n [style.height]=\"leadingContainerSize()\"\r\n >\r\n @if (hasLeadingIcon()) {\r\n @if (isLeadingImage()) {\r\n <img [src]=\"leadingIcon()\" alt=\"\" [style.width]=\"leadingIconSize()\" [style.height]=\"leadingIconSize()\" />\r\n } @else {\r\n <svg\r\n viewBox=\"0 0 24 24\"\r\n [style.width]=\"leadingIconSize()\"\r\n [style.height]=\"leadingIconSize()\"\r\n >\r\n <g [innerHTML]=\"leadingIcon()\"></g>\r\n </svg>\r\n }\r\n } @else {\r\n <span>{{ initial() }}</span>\r\n }\r\n </div>\r\n } @else {\r\n <div class=\"ui-card__avatar\" aria-hidden=\"true\">\r\n {{ initial() }}\r\n </div>\r\n }\r\n\r\n <div class=\"ui-card__text\">\r\n <p class=\"ui-card__title\">{{ title() }}</p>\r\n @if (subhead()) {\r\n <p class=\"ui-card__subhead\">{{ subhead() }}</p>\r\n }\r\n </div>\r\n </div>\r\n\r\n @if (showMedia()) {\r\n <div class=\"ui-card__media\" [class.ui-card__media--empty]=\"!hasMedia()\">\r\n @if (hasMedia()) {\r\n @if (isMediaImage()) {\r\n <img [src]=\"mediaIcon()\" [alt]=\"mediaAlt()\" />\r\n } @else {\r\n <svg viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" aria-hidden=\"true\">\r\n <g [innerHTML]=\"mediaIcon()\"></g>\r\n </svg>\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n <span class=\"ui-card__state-layer\" aria-hidden=\"true\"></span>\r\n @if (state() === 'focused') {\r\n <span class=\"ui-card__focus-indicator\" aria-hidden=\"true\"></span>\r\n }\r\n</div>\r\n", styles: [":host{display:block}:host(.lib-card-host--full-width){width:100%;min-width:0}.ui-card{display:flex;align-items:stretch;overflow:hidden;border-radius:calc(var(--app-cards-outlined-enabled-container-outlined-card-container-shape, 12) * 1px);color:var(--app-pallete-scheme-surface-on-surface, #181c1e);box-sizing:border-box;cursor:pointer;transition:box-shadow .18s ease,background-color .18s ease,border-color .18s ease;position:relative;isolation:isolate}.ui-card:focus-visible{outline:none}.ui-card:focus-visible .ui-card__focus-indicator{display:block}.ui-card--outlined{border:0;outline:calc(var(--app-cards-outlined-enabled-outline-outlined-card-outline-width, 1) * 1px) solid var(--app-cards-outlined-enabled-outline-outlined-card-outline-color, #c3c7c9);outline-offset:-1px;background:var(--app-cards-outlined-enabled-container-outlined-card-container-color, #f7fafc)}.ui-card--elevated{border:0;background:var(--app-cards-elevated-enabled-container-elevated-card-container-color, #f1f4f6);box-shadow:0 1px 3px 1px #00000026,0 1px 2px #0000004d}.ui-card--filled{border:0;background:var(--app-cards-filled-enabled-container-filled-card-container-color, #e0e3e5)}.ui-card--active{outline-color:var(--app-pallete-scheme-surface-outline-variant, #d4d7db);background:var(--app-pallete-scheme-surface-outline-variant, #d4d7db)}.ui-card--disabled{opacity:.7;cursor:not-allowed}.ui-card__content{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:16px;padding:16px;position:relative;z-index:2}.ui-card__avatar{width:2.5rem;height:2.5rem;flex:0 0 auto;border-radius:100px;display:inline-flex;align-items:center;justify-content:center;background:var(--app-pallete-scheme-primary-primary, #e42313);color:var(--app-pallete-scheme-primary-on-primary, #fff);font-family:var(--app-typescale-title-medium-font, Heebo),sans-serif;font-size:1rem;font-weight:500;line-height:1.5rem;letter-spacing:.00625rem}.ui-card__leading{width:2.5rem;height:2.5rem;flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center}.ui-card__leading--icon img,.ui-card__leading--icon svg{width:2.08331rem;height:2.08331rem;display:block}.ui-card__leading--icon svg{fill:currentColor}.ui-card__text{display:flex;flex-direction:column;gap:4px;min-width:0;color:inherit}.ui-card__title,.ui-card__subhead{margin:0}.ui-card__title{font-family:var(--app-typescale-title-medium-font, Heebo),sans-serif;font-size:calc(var(--app-typescale-title-medium-size, 16) * 1px);font-weight:var(--app-typescale-title-medium-weight, 500);line-height:calc(var(--app-typescale-title-medium-line-height, 24) * 1px);letter-spacing:calc(var(--app-typescale-title-medium-tracking, .15) * 1px)}.ui-card--title-emphasized .ui-card__title{font-weight:var(--app-typescale-title-medium-weight-emphasized, 700)}.ui-card__subhead{font-family:var(--app-typescale-body-medium-font, Heebo),sans-serif;font-size:calc(var(--app-typescale-body-medium-size, 14) * 1px);font-weight:var(--app-typescale-body-medium-weight, 400);line-height:calc(var(--app-typescale-body-medium-line-height, 20) * 1px);letter-spacing:calc(var(--app-typescale-body-medium-tracking, .25) * 1px)}.ui-card__media{width:5rem;flex:0 0 5rem;display:inline-flex;align-items:center;justify-content:center;border-left:1px solid var(--app-pallete-scheme-surface-outline-variant, #c3c7c9);background:var(--app-schemes-surface-container-high, #ebe7e7);position:relative;z-index:2}.ui-card__media img,.ui-card__media svg{width:2.08331rem;height:2.08331rem;display:block}.ui-card__media svg{fill:var(--app-schemes-outline, #b5b5b5)}.ui-card__media--empty{opacity:.45}.ui-card__state-layer{position:absolute;inset:0;pointer-events:none;z-index:1;opacity:0;background:transparent}.ui-card__focus-indicator{display:none;position:absolute;inset:-3px;border-radius:14px;border:3px solid var(--app-cards-outlined-focused-focus-indicator-outlined-card-focus-indicator-color, #5b5f61);pointer-events:none;z-index:3}.ui-card--state-focused .ui-card__focus-indicator{display:block}.ui-card--state-hovered .ui-card__state-layer,.ui-card:hover .ui-card__state-layer,.ui-card--state-focused .ui-card__state-layer,.ui-card--state-pressed .ui-card__state-layer,.ui-card--state-dragged .ui-card__state-layer{opacity:1}.ui-card--outlined.ui-card--state-hovered,.ui-card--outlined:hover{box-shadow:0 1px 2px #0000004d,0 1px 3px 1px #00000026}.ui-card--outlined.ui-card--state-dragged{box-shadow:0 4px 8px 3px #00000026,0 1px 3px #0000004d}.ui-card--elevated.ui-card--state-hovered,.ui-card--elevated:hover{box-shadow:0 2px 6px 2px #00000026,0 1px 2px #0000004d}.ui-card--elevated.ui-card--state-pressed{box-shadow:0 1px 3px 1px #00000026,0 1px 2px #0000004d}.ui-card--elevated.ui-card--state-dragged{box-shadow:0 6px 10px 4px #00000026,0 2px 3px #0000004d}.ui-card--filled.ui-card--state-hovered{box-shadow:0 1px 3px 1px #00000026,0 1px 2px #0000004d}.ui-card--filled.ui-card--state-dragged{box-shadow:0 4px 8px 3px #00000026,0 1px 3px #0000004d}.ui-card--outlined.ui-card--state-hovered .ui-card__state-layer,.ui-card--outlined:hover .ui-card__state-layer{background:#181c1e14}.ui-card--outlined.ui-card--state-focused .ui-card__state-layer,.ui-card--outlined.ui-card--state-pressed .ui-card__state-layer{background:#181c1e1a}.ui-card--outlined.ui-card--state-dragged .ui-card__state-layer{background:#181c1e29}.ui-card--elevated.ui-card--state-hovered .ui-card__state-layer,.ui-card--elevated:hover .ui-card__state-layer{background:#181c1e14}.ui-card--elevated.ui-card--state-focused .ui-card__state-layer,.ui-card--elevated.ui-card--state-pressed .ui-card__state-layer{background:#181c1e1a}.ui-card--elevated.ui-card--state-dragged .ui-card__state-layer{background:#181c1e29}.ui-card--filled.ui-card--state-hovered .ui-card__state-layer,.ui-card--filled:hover .ui-card__state-layer{background:#181c1e14}.ui-card--filled.ui-card--state-focused .ui-card__state-layer,.ui-card--filled.ui-card--state-pressed .ui-card__state-layer{background:#181c1e1a}.ui-card--filled.ui-card--state-dragged .ui-card__state-layer{background:#181c1e29}.ui-card--disabled .ui-card__state-layer{display:none}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1318
|
+
}
|
|
1319
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: LibCardComponent, decorators: [{
|
|
1320
|
+
type: Component,
|
|
1321
|
+
args: [{ selector: 'lib-card', standalone: true, imports: [NgClass], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1322
|
+
'[class.lib-card-host--full-width]': 'fullWidth()',
|
|
1323
|
+
}, template: "<div\r\n [ngClass]=\"classes()\"\r\n [style.width]=\"fullWidth() ? '100%' : width()\"\r\n [style.min-width]=\"fullWidth() ? '0rem' : width()\"\r\n [style.height]=\"height()\"\r\n [style.min-height]=\"height()\"\r\n [attr.aria-disabled]=\"disabled()\"\r\n role=\"button\"\r\n tabindex=\"0\"\r\n (click)=\"onCardClick()\"\r\n (keydown)=\"onCardKeydown($event)\"\r\n>\r\n <div class=\"ui-card__content\">\r\n @if (leadingKind() === 'icon') {\r\n <div\r\n class=\"ui-card__leading ui-card__leading--icon\"\r\n aria-hidden=\"true\"\r\n [style.width]=\"leadingContainerSize()\"\r\n [style.height]=\"leadingContainerSize()\"\r\n >\r\n @if (hasLeadingIcon()) {\r\n @if (isLeadingImage()) {\r\n <img [src]=\"leadingIcon()\" alt=\"\" [style.width]=\"leadingIconSize()\" [style.height]=\"leadingIconSize()\" />\r\n } @else {\r\n <svg\r\n viewBox=\"0 0 24 24\"\r\n [style.width]=\"leadingIconSize()\"\r\n [style.height]=\"leadingIconSize()\"\r\n >\r\n <g [innerHTML]=\"leadingIcon()\"></g>\r\n </svg>\r\n }\r\n } @else {\r\n <span>{{ initial() }}</span>\r\n }\r\n </div>\r\n } @else {\r\n <div class=\"ui-card__avatar\" aria-hidden=\"true\">\r\n {{ initial() }}\r\n </div>\r\n }\r\n\r\n <div class=\"ui-card__text\">\r\n <p class=\"ui-card__title\">{{ title() }}</p>\r\n @if (subhead()) {\r\n <p class=\"ui-card__subhead\">{{ subhead() }}</p>\r\n }\r\n </div>\r\n </div>\r\n\r\n @if (showMedia()) {\r\n <div class=\"ui-card__media\" [class.ui-card__media--empty]=\"!hasMedia()\">\r\n @if (hasMedia()) {\r\n @if (isMediaImage()) {\r\n <img [src]=\"mediaIcon()\" [alt]=\"mediaAlt()\" />\r\n } @else {\r\n <svg viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" aria-hidden=\"true\">\r\n <g [innerHTML]=\"mediaIcon()\"></g>\r\n </svg>\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n <span class=\"ui-card__state-layer\" aria-hidden=\"true\"></span>\r\n @if (state() === 'focused') {\r\n <span class=\"ui-card__focus-indicator\" aria-hidden=\"true\"></span>\r\n }\r\n</div>\r\n", styles: [":host{display:block}:host(.lib-card-host--full-width){width:100%;min-width:0}.ui-card{display:flex;align-items:stretch;overflow:hidden;border-radius:calc(var(--app-cards-outlined-enabled-container-outlined-card-container-shape, 12) * 1px);color:var(--app-pallete-scheme-surface-on-surface, #181c1e);box-sizing:border-box;cursor:pointer;transition:box-shadow .18s ease,background-color .18s ease,border-color .18s ease;position:relative;isolation:isolate}.ui-card:focus-visible{outline:none}.ui-card:focus-visible .ui-card__focus-indicator{display:block}.ui-card--outlined{border:0;outline:calc(var(--app-cards-outlined-enabled-outline-outlined-card-outline-width, 1) * 1px) solid var(--app-cards-outlined-enabled-outline-outlined-card-outline-color, #c3c7c9);outline-offset:-1px;background:var(--app-cards-outlined-enabled-container-outlined-card-container-color, #f7fafc)}.ui-card--elevated{border:0;background:var(--app-cards-elevated-enabled-container-elevated-card-container-color, #f1f4f6);box-shadow:0 1px 3px 1px #00000026,0 1px 2px #0000004d}.ui-card--filled{border:0;background:var(--app-cards-filled-enabled-container-filled-card-container-color, #e0e3e5)}.ui-card--active{outline-color:var(--app-pallete-scheme-surface-outline-variant, #d4d7db);background:var(--app-pallete-scheme-surface-outline-variant, #d4d7db)}.ui-card--disabled{opacity:.7;cursor:not-allowed}.ui-card__content{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:16px;padding:16px;position:relative;z-index:2}.ui-card__avatar{width:2.5rem;height:2.5rem;flex:0 0 auto;border-radius:100px;display:inline-flex;align-items:center;justify-content:center;background:var(--app-pallete-scheme-primary-primary, #e42313);color:var(--app-pallete-scheme-primary-on-primary, #fff);font-family:var(--app-typescale-title-medium-font, Heebo),sans-serif;font-size:1rem;font-weight:500;line-height:1.5rem;letter-spacing:.00625rem}.ui-card__leading{width:2.5rem;height:2.5rem;flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center}.ui-card__leading--icon img,.ui-card__leading--icon svg{width:2.08331rem;height:2.08331rem;display:block}.ui-card__leading--icon svg{fill:currentColor}.ui-card__text{display:flex;flex-direction:column;gap:4px;min-width:0;color:inherit}.ui-card__title,.ui-card__subhead{margin:0}.ui-card__title{font-family:var(--app-typescale-title-medium-font, Heebo),sans-serif;font-size:calc(var(--app-typescale-title-medium-size, 16) * 1px);font-weight:var(--app-typescale-title-medium-weight, 500);line-height:calc(var(--app-typescale-title-medium-line-height, 24) * 1px);letter-spacing:calc(var(--app-typescale-title-medium-tracking, .15) * 1px)}.ui-card--title-emphasized .ui-card__title{font-weight:var(--app-typescale-title-medium-weight-emphasized, 700)}.ui-card__subhead{font-family:var(--app-typescale-body-medium-font, Heebo),sans-serif;font-size:calc(var(--app-typescale-body-medium-size, 14) * 1px);font-weight:var(--app-typescale-body-medium-weight, 400);line-height:calc(var(--app-typescale-body-medium-line-height, 20) * 1px);letter-spacing:calc(var(--app-typescale-body-medium-tracking, .25) * 1px)}.ui-card__media{width:5rem;flex:0 0 5rem;display:inline-flex;align-items:center;justify-content:center;border-left:1px solid var(--app-pallete-scheme-surface-outline-variant, #c3c7c9);background:var(--app-schemes-surface-container-high, #ebe7e7);position:relative;z-index:2}.ui-card__media img,.ui-card__media svg{width:2.08331rem;height:2.08331rem;display:block}.ui-card__media svg{fill:var(--app-schemes-outline, #b5b5b5)}.ui-card__media--empty{opacity:.45}.ui-card__state-layer{position:absolute;inset:0;pointer-events:none;z-index:1;opacity:0;background:transparent}.ui-card__focus-indicator{display:none;position:absolute;inset:-3px;border-radius:14px;border:3px solid var(--app-cards-outlined-focused-focus-indicator-outlined-card-focus-indicator-color, #5b5f61);pointer-events:none;z-index:3}.ui-card--state-focused .ui-card__focus-indicator{display:block}.ui-card--state-hovered .ui-card__state-layer,.ui-card:hover .ui-card__state-layer,.ui-card--state-focused .ui-card__state-layer,.ui-card--state-pressed .ui-card__state-layer,.ui-card--state-dragged .ui-card__state-layer{opacity:1}.ui-card--outlined.ui-card--state-hovered,.ui-card--outlined:hover{box-shadow:0 1px 2px #0000004d,0 1px 3px 1px #00000026}.ui-card--outlined.ui-card--state-dragged{box-shadow:0 4px 8px 3px #00000026,0 1px 3px #0000004d}.ui-card--elevated.ui-card--state-hovered,.ui-card--elevated:hover{box-shadow:0 2px 6px 2px #00000026,0 1px 2px #0000004d}.ui-card--elevated.ui-card--state-pressed{box-shadow:0 1px 3px 1px #00000026,0 1px 2px #0000004d}.ui-card--elevated.ui-card--state-dragged{box-shadow:0 6px 10px 4px #00000026,0 2px 3px #0000004d}.ui-card--filled.ui-card--state-hovered{box-shadow:0 1px 3px 1px #00000026,0 1px 2px #0000004d}.ui-card--filled.ui-card--state-dragged{box-shadow:0 4px 8px 3px #00000026,0 1px 3px #0000004d}.ui-card--outlined.ui-card--state-hovered .ui-card__state-layer,.ui-card--outlined:hover .ui-card__state-layer{background:#181c1e14}.ui-card--outlined.ui-card--state-focused .ui-card__state-layer,.ui-card--outlined.ui-card--state-pressed .ui-card__state-layer{background:#181c1e1a}.ui-card--outlined.ui-card--state-dragged .ui-card__state-layer{background:#181c1e29}.ui-card--elevated.ui-card--state-hovered .ui-card__state-layer,.ui-card--elevated:hover .ui-card__state-layer{background:#181c1e14}.ui-card--elevated.ui-card--state-focused .ui-card__state-layer,.ui-card--elevated.ui-card--state-pressed .ui-card__state-layer{background:#181c1e1a}.ui-card--elevated.ui-card--state-dragged .ui-card__state-layer{background:#181c1e29}.ui-card--filled.ui-card--state-hovered .ui-card__state-layer,.ui-card--filled:hover .ui-card__state-layer{background:#181c1e14}.ui-card--filled.ui-card--state-focused .ui-card__state-layer,.ui-card--filled.ui-card--state-pressed .ui-card__state-layer{background:#181c1e1a}.ui-card--filled.ui-card--state-dragged .ui-card__state-layer{background:#181c1e29}.ui-card--disabled .ui-card__state-layer{display:none}\n"] }]
|
|
1324
|
+
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], subhead: [{ type: i0.Input, args: [{ isSignal: true, alias: "subhead", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], leadingKind: [{ type: i0.Input, args: [{ isSignal: true, alias: "leadingKind", required: false }] }], leadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "leadingIcon", required: false }] }], leadingContainerSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "leadingContainerSize", required: false }] }], leadingIconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "leadingIconSize", required: false }] }], mediaIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "mediaIcon", required: false }] }], mediaAlt: [{ type: i0.Input, args: [{ isSignal: true, alias: "mediaAlt", required: false }] }], showMedia: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMedia", required: false }] }], avatarText: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarText", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], cardClick: [{ type: i0.Output, args: ["cardClick"] }] } });
|
|
1325
|
+
|
|
1326
|
+
class ConfirmModal {
|
|
1327
|
+
dialogRef = inject(DialogRef);
|
|
1328
|
+
data = inject(DIALOG_DATA);
|
|
1329
|
+
listItems = signal(this.data.listItems ?? [], ...(ngDevMode ? [{ debugName: "listItems" }] : []));
|
|
1330
|
+
labelButtonCancel = this.data.labelButtonCancel ?? 'Cancelar';
|
|
1331
|
+
supportingText = this.data.description ?? this.data.content ?? this.data.reference ?? '';
|
|
1332
|
+
isListVariant = this.data.variant === 'list' || this.data.variant === 'scrollable-list';
|
|
1333
|
+
isScrollableList = this.data.variant === 'scrollable-list';
|
|
1334
|
+
topIconName = this.data.topIconName ?? 'check_box';
|
|
1335
|
+
toggleListItem(itemId) {
|
|
1336
|
+
this.listItems.update((items) => items.map((item) => (item.id === itemId ? { ...item, selected: !item.selected } : item)));
|
|
1337
|
+
}
|
|
1338
|
+
onCancel() {
|
|
1339
|
+
this.dialogRef.close(false);
|
|
1340
|
+
}
|
|
1341
|
+
onConfirm() {
|
|
1342
|
+
this.dialogRef.close(true);
|
|
1343
|
+
}
|
|
1344
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ConfirmModal, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1345
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: ConfirmModal, isStandalone: true, selector: "lib-confirm", ngImport: i0, template: "<div\r\n class=\"confirm-modal\"\r\n role=\"dialog\"\r\n aria-modal=\"true\"\r\n aria-labelledby=\"confirm-modal-title\"\r\n [attr.aria-describedby]=\"supportingText || isListVariant ? 'confirm-modal-desc' : null\"\r\n>\r\n <div class=\"confirm-modal__container\">\r\n @if (data.showTopIcon) {\r\n <div class=\"confirm-modal__top-icon\" aria-hidden=\"true\">\r\n <mat-icon>{{ topIconName }}</mat-icon>\r\n </div>\r\n }\r\n\r\n <header class=\"confirm-modal__header\">\r\n <h2 id=\"confirm-modal-title\" class=\"confirm-modal__title\">{{ data.title }}</h2>\r\n @if (supportingText) {\r\n <p id=\"confirm-modal-desc\" class=\"confirm-modal__reference\">{{ supportingText }}</p>\r\n }\r\n </header>\r\n\r\n @if (isListVariant) {\r\n <div\r\n class=\"confirm-modal__list\"\r\n [class.confirm-modal__list--scrollable]=\"isScrollableList\"\r\n [attr.id]=\"!supportingText ? 'confirm-modal-desc' : null\"\r\n >\r\n @for (item of listItems(); track item.id) {\r\n <button type=\"button\" class=\"confirm-modal__list-item\" (click)=\"toggleListItem(item.id)\">\r\n <mat-icon class=\"confirm-modal__list-item-leading-icon\" aria-hidden=\"true\">error_outline</mat-icon>\r\n <span class=\"confirm-modal__list-item-label\">{{ item.label }}</span>\r\n @if (item.amount) {\r\n <span class=\"confirm-modal__list-item-amount\">{{ item.amount }}</span>\r\n }\r\n <mat-icon class=\"confirm-modal__list-item-check\" aria-hidden=\"true\">\r\n {{ item.selected ? 'check_box' : 'check_box_outline_blank' }}\r\n </mat-icon>\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"confirm-modal__actions\">\r\n <lib-button\r\n type=\"button\"\r\n variant=\"text\"\r\n (click)=\"onCancel()\"\r\n [label]=\"labelButtonCancel\"\r\n contentAlign=\"center\"\r\n ></lib-button>\r\n <lib-button\r\n type=\"button\"\r\n variant=\"text\"\r\n (click)=\"onConfirm()\"\r\n [label]=\"data.labelButtonConfirm\"\r\n contentAlign=\"center\"\r\n ></lib-button>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".confirm-modal{--confirm-container-color: var(--app-dialogs-basic-enabled-container-dialog-container-color, #f7fafc);--confirm-container-elevation: var(--app-dialogs-basic-enabled-container-dialog-container-elevation, 6);--confirm-container-shape: var(--app-dialogs-basic-enabled-container-dialog-container-shape, 28);--confirm-headline-color: var(--app-dialogs-basic-enabled-headline-dialog-headline-color, #181c1e);--confirm-headline-font: var(--app-dialogs-basic-enabled-headline-dialog-headline-font, Heebo);--confirm-headline-size: var(--app-dialogs-basic-enabled-headline-dialog-headline-size, 24);--confirm-headline-weight: var(--app-dialogs-basic-enabled-headline-dialog-headline-weight, 400);--confirm-headline-line-height: var(--app-dialogs-basic-enabled-headline-dialog-headline-line-height, 32);--confirm-supporting-color: var(--app-dialogs-basic-enabled-supporting-text-dialog-supporting-text-color, #434749);--confirm-supporting-font: var(--app-dialogs-basic-enabled-supporting-text-dialog-supporting-text-font, Heebo);--confirm-supporting-size: var(--app-dialogs-basic-enabled-supporting-text-dialog-supporting-text-size, 14);--confirm-supporting-weight: var(--app-dialogs-basic-enabled-supporting-text-dialog-supporting-text-weight, 400);--confirm-supporting-line-height: var(--app-dialogs-basic-enabled-supporting-text-dialog-supporting-text-line-height, 20);--confirm-action-color: var(--app-dialogs-basic-enabled-label-text-dialog-action-label-text-color, #e42313);--confirm-action-font: var(--app-dialogs-basic-enabled-label-text-dialog-action-label-text-font, Heebo);--confirm-action-size: var(--app-dialogs-basic-enabled-label-text-dialog-action-label-text-size, 14);--confirm-action-weight: var(--app-dialogs-basic-enabled-label-text-dialog-action-label-text-weight, 500);--confirm-primary: var(--app-colors-rojo-primary-rojo-50, #e42313);--confirm-primary-hover: var(--app-colors-rojo-primary-rojo-40, #bf0600);--confirm-primary-on: var(--app-colors-rojo-primary-rojo-100, #ffffff);--confirm-btn-shape: var(--app-shape-large, 16);display:flex;width:100%;background:var(--confirm-container-color);border-radius:calc(var(--confirm-container-shape) * 1px);box-shadow:0 1px 3px #0000004d,0 4px 8px 3px #00000026;min-width:280px;max-width:560px}.confirm-modal__container{display:flex;padding:1.5rem 1.5rem 1.25rem;flex-direction:column;align-items:flex-start;gap:1.25rem;align-self:stretch;width:100%}.confirm-modal__top-icon{width:100%;display:flex;justify-content:center;color:#5f6368}.confirm-modal__top-icon .mat-icon{width:1.5rem;height:1.5rem;font-size:1.5rem}.confirm-modal__header{display:flex;flex-direction:column;gap:1rem;align-items:flex-start;align-self:stretch;width:100%}.confirm-modal__title{align-self:stretch;color:var(--confirm-headline-color);font-family:var(--confirm-headline-font),var(--app-font-type-brand, Heebo),sans-serif;font-size:calc(var(--confirm-headline-size) * 1px);font-weight:var(--confirm-headline-weight);line-height:calc(var(--confirm-headline-line-height) * 1px);text-align:start;margin:0}.confirm-modal__reference,.confirm-modal__content{align-self:stretch;width:100%;color:var(--confirm-supporting-color);font-family:var(--confirm-supporting-font),var(--app-font-type-plain, Heebo),sans-serif;font-size:calc(var(--confirm-supporting-size) * 1px);font-weight:var(--confirm-supporting-weight);line-height:calc(var(--confirm-supporting-line-height) * 1px);text-align:start;margin:0}.confirm-modal__list{width:100%;border-top:1px solid #c4c7c5;border-bottom:1px solid #c4c7c5}.confirm-modal__list--scrollable{max-height:14rem;overflow-y:auto}.confirm-modal__list-item{width:100%;display:grid;grid-template-columns:2.5rem 1fr auto auto;align-items:center;gap:.75rem;border:0;border-bottom:1px solid #c4c7c5;background:transparent;padding:.75rem 0;text-align:left;cursor:pointer}.confirm-modal__list-item:last-child{border-bottom:0}.confirm-modal__list-item-leading-icon{color:#1f2328;width:1.25rem;height:1.25rem;font-size:1.25rem}.confirm-modal__list-item-label{color:#1d1b20;font-size:1.125rem;line-height:1.5rem;font-weight:400}.confirm-modal__list-item-amount{color:#5f6368;font-size:.75rem;line-height:1rem}.confirm-modal__list-item-check{color:#1f2328;width:1.25rem;height:1.25rem;font-size:1.25rem}.confirm-modal__actions{display:flex;flex-direction:row;align-items:flex-end;align-self:stretch;width:100%;min-width:0;justify-content:flex-end;gap:.5rem}.confirm-modal__actions>*{display:flex;width:auto;align-self:flex-end}.confirm-modal__btn{display:inline-flex;align-items:center;justify-content:center;padding:1rem 1.5rem;min-width:120px;font-family:var(--confirm-action-font),var(--app-font-type-brand, Heebo),sans-serif;font-size:calc(var(--confirm-action-size) * 1px);font-weight:var(--confirm-action-weight);line-height:1.25;border-radius:calc(var(--confirm-btn-shape) * 1px);border:none;cursor:pointer;transition:background-color .2s,color .2s,border-color .2s;box-shadow:none;outline:none}.confirm-modal__btn:focus-visible{outline:2px solid var(--confirm-primary);outline-offset:2px}.confirm-modal__btn--cancel{flex:1;max-width:180px;background:var(--confirm-container-color);color:var(--confirm-action-color);border:1px solid var(--confirm-action-color)}.confirm-modal__btn--cancel:hover,.confirm-modal__btn--cancel:focus,.confirm-modal__btn--cancel:active{background:var(--confirm-container-color);color:var(--confirm-primary-hover);border-color:var(--confirm-primary-hover)}.confirm-modal__btn--confirm{flex:1;max-width:180px;background:var(--confirm-primary);color:var(--confirm-primary-on)}.confirm-modal__btn--confirm:hover,.confirm-modal__btn--confirm:focus,.confirm-modal__btn--confirm:active{background:var(--confirm-primary-hover);color:var(--confirm-primary-on)}\n"], dependencies: [{ kind: "component", type: LibButtonComponent, selector: "lib-button", inputs: ["size", "disabled", "type", "fullWidth", "variant", "shape", "toggle", "selected", "label", "icon", "iconPosition", "contentAlign", "labelClass", "pressed", "debugPadding"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
1346
|
+
}
|
|
1347
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ConfirmModal, decorators: [{
|
|
1348
|
+
type: Component,
|
|
1349
|
+
args: [{ selector: 'lib-confirm', imports: [LibButtonComponent, MatIconModule], template: "<div\r\n class=\"confirm-modal\"\r\n role=\"dialog\"\r\n aria-modal=\"true\"\r\n aria-labelledby=\"confirm-modal-title\"\r\n [attr.aria-describedby]=\"supportingText || isListVariant ? 'confirm-modal-desc' : null\"\r\n>\r\n <div class=\"confirm-modal__container\">\r\n @if (data.showTopIcon) {\r\n <div class=\"confirm-modal__top-icon\" aria-hidden=\"true\">\r\n <mat-icon>{{ topIconName }}</mat-icon>\r\n </div>\r\n }\r\n\r\n <header class=\"confirm-modal__header\">\r\n <h2 id=\"confirm-modal-title\" class=\"confirm-modal__title\">{{ data.title }}</h2>\r\n @if (supportingText) {\r\n <p id=\"confirm-modal-desc\" class=\"confirm-modal__reference\">{{ supportingText }}</p>\r\n }\r\n </header>\r\n\r\n @if (isListVariant) {\r\n <div\r\n class=\"confirm-modal__list\"\r\n [class.confirm-modal__list--scrollable]=\"isScrollableList\"\r\n [attr.id]=\"!supportingText ? 'confirm-modal-desc' : null\"\r\n >\r\n @for (item of listItems(); track item.id) {\r\n <button type=\"button\" class=\"confirm-modal__list-item\" (click)=\"toggleListItem(item.id)\">\r\n <mat-icon class=\"confirm-modal__list-item-leading-icon\" aria-hidden=\"true\">error_outline</mat-icon>\r\n <span class=\"confirm-modal__list-item-label\">{{ item.label }}</span>\r\n @if (item.amount) {\r\n <span class=\"confirm-modal__list-item-amount\">{{ item.amount }}</span>\r\n }\r\n <mat-icon class=\"confirm-modal__list-item-check\" aria-hidden=\"true\">\r\n {{ item.selected ? 'check_box' : 'check_box_outline_blank' }}\r\n </mat-icon>\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"confirm-modal__actions\">\r\n <lib-button\r\n type=\"button\"\r\n variant=\"text\"\r\n (click)=\"onCancel()\"\r\n [label]=\"labelButtonCancel\"\r\n contentAlign=\"center\"\r\n ></lib-button>\r\n <lib-button\r\n type=\"button\"\r\n variant=\"text\"\r\n (click)=\"onConfirm()\"\r\n [label]=\"data.labelButtonConfirm\"\r\n contentAlign=\"center\"\r\n ></lib-button>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".confirm-modal{--confirm-container-color: var(--app-dialogs-basic-enabled-container-dialog-container-color, #f7fafc);--confirm-container-elevation: var(--app-dialogs-basic-enabled-container-dialog-container-elevation, 6);--confirm-container-shape: var(--app-dialogs-basic-enabled-container-dialog-container-shape, 28);--confirm-headline-color: var(--app-dialogs-basic-enabled-headline-dialog-headline-color, #181c1e);--confirm-headline-font: var(--app-dialogs-basic-enabled-headline-dialog-headline-font, Heebo);--confirm-headline-size: var(--app-dialogs-basic-enabled-headline-dialog-headline-size, 24);--confirm-headline-weight: var(--app-dialogs-basic-enabled-headline-dialog-headline-weight, 400);--confirm-headline-line-height: var(--app-dialogs-basic-enabled-headline-dialog-headline-line-height, 32);--confirm-supporting-color: var(--app-dialogs-basic-enabled-supporting-text-dialog-supporting-text-color, #434749);--confirm-supporting-font: var(--app-dialogs-basic-enabled-supporting-text-dialog-supporting-text-font, Heebo);--confirm-supporting-size: var(--app-dialogs-basic-enabled-supporting-text-dialog-supporting-text-size, 14);--confirm-supporting-weight: var(--app-dialogs-basic-enabled-supporting-text-dialog-supporting-text-weight, 400);--confirm-supporting-line-height: var(--app-dialogs-basic-enabled-supporting-text-dialog-supporting-text-line-height, 20);--confirm-action-color: var(--app-dialogs-basic-enabled-label-text-dialog-action-label-text-color, #e42313);--confirm-action-font: var(--app-dialogs-basic-enabled-label-text-dialog-action-label-text-font, Heebo);--confirm-action-size: var(--app-dialogs-basic-enabled-label-text-dialog-action-label-text-size, 14);--confirm-action-weight: var(--app-dialogs-basic-enabled-label-text-dialog-action-label-text-weight, 500);--confirm-primary: var(--app-colors-rojo-primary-rojo-50, #e42313);--confirm-primary-hover: var(--app-colors-rojo-primary-rojo-40, #bf0600);--confirm-primary-on: var(--app-colors-rojo-primary-rojo-100, #ffffff);--confirm-btn-shape: var(--app-shape-large, 16);display:flex;width:100%;background:var(--confirm-container-color);border-radius:calc(var(--confirm-container-shape) * 1px);box-shadow:0 1px 3px #0000004d,0 4px 8px 3px #00000026;min-width:280px;max-width:560px}.confirm-modal__container{display:flex;padding:1.5rem 1.5rem 1.25rem;flex-direction:column;align-items:flex-start;gap:1.25rem;align-self:stretch;width:100%}.confirm-modal__top-icon{width:100%;display:flex;justify-content:center;color:#5f6368}.confirm-modal__top-icon .mat-icon{width:1.5rem;height:1.5rem;font-size:1.5rem}.confirm-modal__header{display:flex;flex-direction:column;gap:1rem;align-items:flex-start;align-self:stretch;width:100%}.confirm-modal__title{align-self:stretch;color:var(--confirm-headline-color);font-family:var(--confirm-headline-font),var(--app-font-type-brand, Heebo),sans-serif;font-size:calc(var(--confirm-headline-size) * 1px);font-weight:var(--confirm-headline-weight);line-height:calc(var(--confirm-headline-line-height) * 1px);text-align:start;margin:0}.confirm-modal__reference,.confirm-modal__content{align-self:stretch;width:100%;color:var(--confirm-supporting-color);font-family:var(--confirm-supporting-font),var(--app-font-type-plain, Heebo),sans-serif;font-size:calc(var(--confirm-supporting-size) * 1px);font-weight:var(--confirm-supporting-weight);line-height:calc(var(--confirm-supporting-line-height) * 1px);text-align:start;margin:0}.confirm-modal__list{width:100%;border-top:1px solid #c4c7c5;border-bottom:1px solid #c4c7c5}.confirm-modal__list--scrollable{max-height:14rem;overflow-y:auto}.confirm-modal__list-item{width:100%;display:grid;grid-template-columns:2.5rem 1fr auto auto;align-items:center;gap:.75rem;border:0;border-bottom:1px solid #c4c7c5;background:transparent;padding:.75rem 0;text-align:left;cursor:pointer}.confirm-modal__list-item:last-child{border-bottom:0}.confirm-modal__list-item-leading-icon{color:#1f2328;width:1.25rem;height:1.25rem;font-size:1.25rem}.confirm-modal__list-item-label{color:#1d1b20;font-size:1.125rem;line-height:1.5rem;font-weight:400}.confirm-modal__list-item-amount{color:#5f6368;font-size:.75rem;line-height:1rem}.confirm-modal__list-item-check{color:#1f2328;width:1.25rem;height:1.25rem;font-size:1.25rem}.confirm-modal__actions{display:flex;flex-direction:row;align-items:flex-end;align-self:stretch;width:100%;min-width:0;justify-content:flex-end;gap:.5rem}.confirm-modal__actions>*{display:flex;width:auto;align-self:flex-end}.confirm-modal__btn{display:inline-flex;align-items:center;justify-content:center;padding:1rem 1.5rem;min-width:120px;font-family:var(--confirm-action-font),var(--app-font-type-brand, Heebo),sans-serif;font-size:calc(var(--confirm-action-size) * 1px);font-weight:var(--confirm-action-weight);line-height:1.25;border-radius:calc(var(--confirm-btn-shape) * 1px);border:none;cursor:pointer;transition:background-color .2s,color .2s,border-color .2s;box-shadow:none;outline:none}.confirm-modal__btn:focus-visible{outline:2px solid var(--confirm-primary);outline-offset:2px}.confirm-modal__btn--cancel{flex:1;max-width:180px;background:var(--confirm-container-color);color:var(--confirm-action-color);border:1px solid var(--confirm-action-color)}.confirm-modal__btn--cancel:hover,.confirm-modal__btn--cancel:focus,.confirm-modal__btn--cancel:active{background:var(--confirm-container-color);color:var(--confirm-primary-hover);border-color:var(--confirm-primary-hover)}.confirm-modal__btn--confirm{flex:1;max-width:180px;background:var(--confirm-primary);color:var(--confirm-primary-on)}.confirm-modal__btn--confirm:hover,.confirm-modal__btn--confirm:focus,.confirm-modal__btn--confirm:active{background:var(--confirm-primary-hover);color:var(--confirm-primary-on)}\n"] }]
|
|
1350
|
+
}] });
|
|
1351
|
+
|
|
1352
|
+
class ConfirmModalStore {
|
|
1353
|
+
dialog = inject(Dialog);
|
|
1354
|
+
overlay = inject(Overlay);
|
|
1355
|
+
dialogState = signal('open', ...(ngDevMode ? [{ debugName: "dialogState" }] : []));
|
|
1356
|
+
router = inject(Router);
|
|
1357
|
+
currentDialogRef;
|
|
1358
|
+
open(title, labelButtonConfirm, reference = '', content = '', width = '19.5rem', labelButtonCancel = 'Cancelar', options = {}) {
|
|
1359
|
+
this.dialogState.set('open');
|
|
1360
|
+
const positionBuilder = this.overlay.position();
|
|
1361
|
+
const strategy = positionBuilder.global().centerHorizontally().centerVertically();
|
|
1362
|
+
this.currentDialogRef = this.dialog.open(ConfirmModal, {
|
|
1363
|
+
width,
|
|
1364
|
+
height: options.height,
|
|
1365
|
+
disableClose: true,
|
|
1366
|
+
autoFocus: false,
|
|
1367
|
+
positionStrategy: strategy,
|
|
1368
|
+
panelClass: 'lib-confirm-modal-panel',
|
|
1369
|
+
backdropClass: 'lib-confirm-modal-backdrop',
|
|
1370
|
+
data: {
|
|
1371
|
+
title: title,
|
|
1372
|
+
reference: reference,
|
|
1373
|
+
content: content,
|
|
1374
|
+
description: options.description,
|
|
1375
|
+
showTopIcon: options.showTopIcon,
|
|
1376
|
+
topIconName: options.topIconName,
|
|
1377
|
+
variant: options.variant,
|
|
1378
|
+
listItems: options.listItems,
|
|
1379
|
+
labelButtonConfirm: labelButtonConfirm,
|
|
1380
|
+
labelButtonCancel: labelButtonCancel,
|
|
1381
|
+
},
|
|
1382
|
+
closeOnNavigation: true
|
|
1383
|
+
});
|
|
1384
|
+
const sub = this.router.events.subscribe(event => {
|
|
1385
|
+
if (event instanceof NavigationStart) {
|
|
1386
|
+
this.close();
|
|
1387
|
+
sub.unsubscribe();
|
|
1388
|
+
}
|
|
1389
|
+
});
|
|
1390
|
+
return this.currentDialogRef;
|
|
1391
|
+
}
|
|
1392
|
+
openBasic(title, confirmLabel, cancelLabel = 'Cancelar') {
|
|
1393
|
+
return this.open(title, confirmLabel, '', '', '19.5rem', cancelLabel);
|
|
1394
|
+
}
|
|
1395
|
+
openWithDescription(title, description, confirmLabel, cancelLabel = 'Cancelar') {
|
|
1396
|
+
return this.open(title, confirmLabel, '', '', '19.5rem', cancelLabel, {
|
|
1397
|
+
description,
|
|
1398
|
+
});
|
|
1399
|
+
}
|
|
1400
|
+
openWithIcon(title, description, confirmLabel, cancelLabel = 'Cancelar', topIconName = 'check_box') {
|
|
1401
|
+
return this.open(title, confirmLabel, '', '', '19.5rem', cancelLabel, {
|
|
1402
|
+
description,
|
|
1403
|
+
showTopIcon: true,
|
|
1404
|
+
topIconName,
|
|
1405
|
+
});
|
|
1406
|
+
}
|
|
1407
|
+
openWithList(title, description, listItems, confirmLabel, cancelLabel = 'Cancelar', showTopIcon = false) {
|
|
1408
|
+
return this.open(title, confirmLabel, '', '', '19.5rem', cancelLabel, {
|
|
1409
|
+
description,
|
|
1410
|
+
showTopIcon,
|
|
1411
|
+
variant: 'list',
|
|
1412
|
+
listItems,
|
|
1413
|
+
});
|
|
1414
|
+
}
|
|
1415
|
+
openWithScrollableList(title, description, listItems, confirmLabel, cancelLabel = 'Cancelar', showTopIcon = false) {
|
|
1416
|
+
return this.open(title, confirmLabel, '', '', '19.5rem', cancelLabel, {
|
|
1417
|
+
description,
|
|
1418
|
+
showTopIcon,
|
|
1419
|
+
variant: 'scrollable-list',
|
|
1420
|
+
listItems,
|
|
1421
|
+
height: 'auto',
|
|
1422
|
+
});
|
|
1423
|
+
}
|
|
1424
|
+
close() {
|
|
1425
|
+
if (this.currentDialogRef) {
|
|
1426
|
+
this.currentDialogRef.close();
|
|
1427
|
+
this.currentDialogRef = undefined;
|
|
1428
|
+
}
|
|
1429
|
+
this.dialogState.set('closed');
|
|
1430
|
+
}
|
|
1431
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ConfirmModalStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1432
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ConfirmModalStore, providedIn: 'root' });
|
|
1433
|
+
}
|
|
1434
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ConfirmModalStore, decorators: [{
|
|
1435
|
+
type: Injectable,
|
|
1436
|
+
args: [{
|
|
1437
|
+
providedIn: 'root'
|
|
1438
|
+
}]
|
|
1439
|
+
}] });
|
|
1440
|
+
|
|
1441
|
+
class SideModal {
|
|
1442
|
+
dialogData = inject(DIALOG_DATA);
|
|
1443
|
+
dialogRef = inject(DialogRef);
|
|
1444
|
+
content = this.dialogData.content;
|
|
1445
|
+
title = this.dialogData.title;
|
|
1446
|
+
footer = this.dialogData.footer;
|
|
1447
|
+
headerConfig = this.dialogData.headerConfig;
|
|
1448
|
+
dialogState = this.dialogData.dialogState;
|
|
1449
|
+
closeDialog() {
|
|
1450
|
+
this.dialogState.set('closed');
|
|
1451
|
+
}
|
|
1452
|
+
shouldShowBack() {
|
|
1453
|
+
return this.headerConfig?.showBackButton?.() ?? false;
|
|
1454
|
+
}
|
|
1455
|
+
onBackClick() {
|
|
1456
|
+
this.headerConfig?.onBack?.();
|
|
1457
|
+
}
|
|
1458
|
+
onAnimationDone(event) {
|
|
1459
|
+
if (event.toState === 'action' || event.toState === 'closed') {
|
|
1460
|
+
this.dialogRef.close(true);
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: SideModal, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1464
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: SideModal, isStandalone: true, selector: "lib-side-modal, app-side-modal", ngImport: i0, template: "<div class=\"container\" [@dialogAnimation]=\"dialogState()\" (@dialogAnimation.done)=\"onAnimationDone($event)\">\r\n <header class=\"side-modal__header\">\r\n <div style=\"display: flex; align-items: center;\">\r\n @if (shouldShowBack()) {\r\n <button type=\"button\" class=\"side-modal__icon-btn\" (click)=\"onBackClick()\" aria-label=\"Volver\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\">\r\n <path d=\"M14 6H3.83L8.41 1.41L7 0L0 7L7 14L8.41 12.59L3.83 8H14V6Z\" fill=\"#434749\" />\r\n </svg>\r\n </button>\r\n }\r\n <h4 class=\"title\">{{title}}</h4>\r\n </div>\r\n\r\n <button type=\"button\" class=\"side-modal__icon-btn\" (click)=\"closeDialog()\" aria-label=\"Cerrar\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\">\r\n <path d=\"M1.4 14L0 12.6L5.6 7L0 1.4L1.4 0L7 5.6L12.6 0L14 1.4L8.4 7L14 12.6L12.6 14L7 8.4L1.4 14Z\"\r\n fill=\"#434749\" />\r\n </svg>\r\n </button>\r\n </header>\r\n\r\n <main class=\"side-modal__content container-content app-scrollbar-figma\">\r\n <ng-container *ngComponentOutlet=\"content\"></ng-container>\r\n </main>\r\n @if (footer) {\r\n <footer class=\"side-modal__footer\">\r\n <ng-container *ngComponentOutlet=\"footer\"></ng-container>\r\n </footer>\r\n }\r\n</div>\r\n", styles: [".container{height:100dvh;width:100%;max-height:100dvh;box-sizing:border-box;background-color:var(--side-sheets-enabled-container-sheet-side-docked-standard-container-color, #f8f9fa);border-radius:8px 0 0 8px;display:flex;flex-direction:column;overflow:hidden;animation:animationDialog .5s ease}.side-modal__header{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:1.5rem;padding:1rem 1rem 0}.title{color:var(--side-sheets-enabled-headline-sheet-side-docked-headline-color, #434749);font-family:var(--side-sheets-enabled-headline-sheet-side-docked-headline-font, \"Heebo\"),sans-serif;font-size:var(--side-sheets-enabled-headline-sheet-side-docked-headline-size, 22px);font-style:normal;font-weight:var(--side-sheets-enabled-headline-sheet-side-docked-headline-weight, 400);line-height:calc(var(--side-sheets-enabled-headline-sheet-side-docked-headline-line-height, 28) * 1px);letter-spacing:var(--side-sheets-enabled-headline-sheet-side-docked-headline-tracking, 0px);margin:0}.side-modal__header button{background-color:transparent;border:none;height:40px;width:40px;min-width:40px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:#696d6f}.side-modal__header button mat-icon{font-size:24px}.side-modal__icon-btn svg{display:block}.side-modal__content{width:100%;box-sizing:border-box;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding-top:0;padding-bottom:0}.side-modal__footer{width:100%;flex:0 0 auto}@keyframes animationDialog{0%{transform:translate(100%)}to{transform:translate(0)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }], animations: [
|
|
1465
|
+
trigger('dialogAnimation', [
|
|
1466
|
+
state('closed', style({ transform: 'translateX(100%)' })),
|
|
1467
|
+
state('open', style({ transform: 'translateX(0)' })),
|
|
1468
|
+
transition('open => closed', [animate('0.5s ease')]),
|
|
1469
|
+
])
|
|
1470
|
+
] });
|
|
1471
|
+
}
|
|
1472
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: SideModal, decorators: [{
|
|
1473
|
+
type: Component,
|
|
1474
|
+
args: [{ selector: 'lib-side-modal, app-side-modal', imports: [CommonModule, NgComponentOutlet], animations: [
|
|
1475
|
+
trigger('dialogAnimation', [
|
|
1476
|
+
state('closed', style({ transform: 'translateX(100%)' })),
|
|
1477
|
+
state('open', style({ transform: 'translateX(0)' })),
|
|
1478
|
+
transition('open => closed', [animate('0.5s ease')]),
|
|
1479
|
+
])
|
|
1480
|
+
], template: "<div class=\"container\" [@dialogAnimation]=\"dialogState()\" (@dialogAnimation.done)=\"onAnimationDone($event)\">\r\n <header class=\"side-modal__header\">\r\n <div style=\"display: flex; align-items: center;\">\r\n @if (shouldShowBack()) {\r\n <button type=\"button\" class=\"side-modal__icon-btn\" (click)=\"onBackClick()\" aria-label=\"Volver\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\">\r\n <path d=\"M14 6H3.83L8.41 1.41L7 0L0 7L7 14L8.41 12.59L3.83 8H14V6Z\" fill=\"#434749\" />\r\n </svg>\r\n </button>\r\n }\r\n <h4 class=\"title\">{{title}}</h4>\r\n </div>\r\n\r\n <button type=\"button\" class=\"side-modal__icon-btn\" (click)=\"closeDialog()\" aria-label=\"Cerrar\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\">\r\n <path d=\"M1.4 14L0 12.6L5.6 7L0 1.4L1.4 0L7 5.6L12.6 0L14 1.4L8.4 7L14 12.6L12.6 14L7 8.4L1.4 14Z\"\r\n fill=\"#434749\" />\r\n </svg>\r\n </button>\r\n </header>\r\n\r\n <main class=\"side-modal__content container-content app-scrollbar-figma\">\r\n <ng-container *ngComponentOutlet=\"content\"></ng-container>\r\n </main>\r\n @if (footer) {\r\n <footer class=\"side-modal__footer\">\r\n <ng-container *ngComponentOutlet=\"footer\"></ng-container>\r\n </footer>\r\n }\r\n</div>\r\n", styles: [".container{height:100dvh;width:100%;max-height:100dvh;box-sizing:border-box;background-color:var(--side-sheets-enabled-container-sheet-side-docked-standard-container-color, #f8f9fa);border-radius:8px 0 0 8px;display:flex;flex-direction:column;overflow:hidden;animation:animationDialog .5s ease}.side-modal__header{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:1.5rem;padding:1rem 1rem 0}.title{color:var(--side-sheets-enabled-headline-sheet-side-docked-headline-color, #434749);font-family:var(--side-sheets-enabled-headline-sheet-side-docked-headline-font, \"Heebo\"),sans-serif;font-size:var(--side-sheets-enabled-headline-sheet-side-docked-headline-size, 22px);font-style:normal;font-weight:var(--side-sheets-enabled-headline-sheet-side-docked-headline-weight, 400);line-height:calc(var(--side-sheets-enabled-headline-sheet-side-docked-headline-line-height, 28) * 1px);letter-spacing:var(--side-sheets-enabled-headline-sheet-side-docked-headline-tracking, 0px);margin:0}.side-modal__header button{background-color:transparent;border:none;height:40px;width:40px;min-width:40px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:#696d6f}.side-modal__header button mat-icon{font-size:24px}.side-modal__icon-btn svg{display:block}.side-modal__content{width:100%;box-sizing:border-box;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding-top:0;padding-bottom:0}.side-modal__footer{width:100%;flex:0 0 auto}@keyframes animationDialog{0%{transform:translate(100%)}to{transform:translate(0)}}\n"] }]
|
|
1481
|
+
}] });
|
|
1482
|
+
|
|
1483
|
+
class SideModalStore {
|
|
1484
|
+
dialog = inject(Dialog);
|
|
1485
|
+
overlay = inject(Overlay);
|
|
1486
|
+
dialogState = signal('open', ...(ngDevMode ? [{ debugName: "dialogState" }] : []));
|
|
1487
|
+
currentDialogRef;
|
|
1488
|
+
router = inject(Router);
|
|
1489
|
+
openSideModal(content, title, width, footer, headerConfig) {
|
|
1490
|
+
this.dialogState.set('open');
|
|
1491
|
+
const positionBuilder = this.overlay.position();
|
|
1492
|
+
const strategy = positionBuilder.global().end();
|
|
1493
|
+
this.currentDialogRef = this.dialog.open(SideModal, {
|
|
1494
|
+
width: width,
|
|
1495
|
+
height: '100%',
|
|
1496
|
+
disableClose: true,
|
|
1497
|
+
hasBackdrop: true,
|
|
1498
|
+
backdropClass: 'lib-side-modal-backdrop',
|
|
1499
|
+
positionStrategy: strategy,
|
|
1500
|
+
data: {
|
|
1501
|
+
title: title,
|
|
1502
|
+
content,
|
|
1503
|
+
dialogState: this.dialogState,
|
|
1504
|
+
footer,
|
|
1505
|
+
headerConfig,
|
|
1506
|
+
},
|
|
1507
|
+
closeOnNavigation: true
|
|
1508
|
+
});
|
|
1509
|
+
const sub = this.router.events.subscribe(event => {
|
|
1510
|
+
if (event instanceof NavigationStart) {
|
|
1511
|
+
this.closeSideModal();
|
|
1512
|
+
sub.unsubscribe();
|
|
1513
|
+
}
|
|
1514
|
+
});
|
|
1515
|
+
return this.currentDialogRef;
|
|
1516
|
+
}
|
|
1517
|
+
isOnAction() {
|
|
1518
|
+
return this.dialogState() === 'action';
|
|
1519
|
+
}
|
|
1520
|
+
closeSideModal(_data) {
|
|
1521
|
+
void _data;
|
|
1522
|
+
if (this.currentDialogRef) {
|
|
1523
|
+
this.currentDialogRef.close();
|
|
1524
|
+
this.currentDialogRef = undefined;
|
|
1525
|
+
}
|
|
1526
|
+
this.dialogState.set('closed');
|
|
1527
|
+
}
|
|
1528
|
+
actionSideModal() {
|
|
1529
|
+
this.dialogState.set('action');
|
|
1530
|
+
}
|
|
1531
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: SideModalStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1532
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: SideModalStore, providedIn: 'root' });
|
|
1533
|
+
}
|
|
1534
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: SideModalStore, decorators: [{
|
|
1535
|
+
type: Injectable,
|
|
1536
|
+
args: [{
|
|
1537
|
+
providedIn: 'root'
|
|
1538
|
+
}]
|
|
1539
|
+
}] });
|
|
1540
|
+
|
|
1541
|
+
class PageFooterActionsComponent {
|
|
1542
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PageFooterActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1543
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: PageFooterActionsComponent, isStandalone: true, selector: "lib-page-footer-actions", ngImport: i0, template: "<div class=\"lib-page-footer-actions\">\r\n <lib-divider orientation=\"horizontal\" />\r\n <div class=\"lib-page-footer-actions__buttons\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n\r\n", styles: [":host{display:block;width:100%}:host-context(.side-modal__content){width:calc(100% + 2rem);margin-left:-1rem;margin-right:-1rem;margin-bottom:-1rem}.lib-page-footer-actions{display:flex;flex-direction:column;align-items:stretch;width:100%}.lib-page-footer-actions__buttons{display:flex;align-items:center;gap:8px;padding:12px 24px 0;justify-content:flex-end}.lib-page-footer-actions__buttons lib-mat-button,.lib-page-footer-actions__buttons .lib-mat-btn{width:auto}\n"], dependencies: [{ kind: "component", type: LibDividerComponent, selector: "lib-divider", inputs: ["orientation"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1544
|
+
}
|
|
1545
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PageFooterActionsComponent, decorators: [{
|
|
1546
|
+
type: Component,
|
|
1547
|
+
args: [{ selector: 'lib-page-footer-actions', standalone: true, imports: [LibDividerComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"lib-page-footer-actions\">\r\n <lib-divider orientation=\"horizontal\" />\r\n <div class=\"lib-page-footer-actions__buttons\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n\r\n", styles: [":host{display:block;width:100%}:host-context(.side-modal__content){width:calc(100% + 2rem);margin-left:-1rem;margin-right:-1rem;margin-bottom:-1rem}.lib-page-footer-actions{display:flex;flex-direction:column;align-items:stretch;width:100%}.lib-page-footer-actions__buttons{display:flex;align-items:center;gap:8px;padding:12px 24px 0;justify-content:flex-end}.lib-page-footer-actions__buttons lib-mat-button,.lib-page-footer-actions__buttons .lib-mat-btn{width:auto}\n"] }]
|
|
1548
|
+
}] });
|
|
1549
|
+
|
|
1550
|
+
class ModalFooterActionsComponent {
|
|
1551
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ModalFooterActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1552
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: ModalFooterActionsComponent, isStandalone: true, selector: "lib-modal-footer-actions", ngImport: i0, template: "<div class=\"lib-modal-footer-actions\">\r\n <lib-divider orientation=\"horizontal\" />\r\n <div class=\"lib-modal-footer-actions__buttons\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n\r\n", styles: [":host{display:block;width:100%}:host-context(.side-modal__content){width:calc(100% + 2rem);margin-left:-1rem;margin-right:-1rem;margin-bottom:-1rem}:host-context(.side-modal__content) .lib-modal-footer-actions__buttons{padding-left:0;padding-right:0}.lib-modal-footer-actions{display:flex;flex-direction:column;align-items:stretch;width:100%;align-self:flex-end;flex:0 0 auto;margin-top:auto;background:var(--side-sheets-enabled-container-sheet-side-docked-standard-container-color, var(--app-side-sheets-enabled-container-sheet-side-docked-standard-container-color, #F7FAFC));z-index:10;position:sticky;bottom:0}.lib-modal-footer-actions__buttons{display:flex;align-items:center;gap:8px;padding:.75rem 1.5rem 1.25rem}.lib-modal-footer-actions__buttons lib-mat-button,.lib-modal-footer-actions__buttons .lib-mat-btn{width:auto}\n"], dependencies: [{ kind: "component", type: LibDividerComponent, selector: "lib-divider", inputs: ["orientation"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1553
|
+
}
|
|
1554
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ModalFooterActionsComponent, decorators: [{
|
|
1555
|
+
type: Component,
|
|
1556
|
+
args: [{ selector: 'lib-modal-footer-actions', standalone: true, imports: [LibDividerComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"lib-modal-footer-actions\">\r\n <lib-divider orientation=\"horizontal\" />\r\n <div class=\"lib-modal-footer-actions__buttons\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n\r\n", styles: [":host{display:block;width:100%}:host-context(.side-modal__content){width:calc(100% + 2rem);margin-left:-1rem;margin-right:-1rem;margin-bottom:-1rem}:host-context(.side-modal__content) .lib-modal-footer-actions__buttons{padding-left:0;padding-right:0}.lib-modal-footer-actions{display:flex;flex-direction:column;align-items:stretch;width:100%;align-self:flex-end;flex:0 0 auto;margin-top:auto;background:var(--side-sheets-enabled-container-sheet-side-docked-standard-container-color, var(--app-side-sheets-enabled-container-sheet-side-docked-standard-container-color, #F7FAFC));z-index:10;position:sticky;bottom:0}.lib-modal-footer-actions__buttons{display:flex;align-items:center;gap:8px;padding:.75rem 1.5rem 1.25rem}.lib-modal-footer-actions__buttons lib-mat-button,.lib-modal-footer-actions__buttons .lib-mat-btn{width:auto}\n"] }]
|
|
1557
|
+
}] });
|
|
1558
|
+
|
|
1559
|
+
class FooterFlowStore {
|
|
1560
|
+
totalSteps = signal(1, ...(ngDevMode ? [{ debugName: "totalSteps" }] : []));
|
|
1561
|
+
currentStep = signal(1, ...(ngDevMode ? [{ debugName: "currentStep" }] : []));
|
|
1562
|
+
setTotalSteps(total) {
|
|
1563
|
+
this.totalSteps.set(Math.max(1, total));
|
|
1564
|
+
if (this.currentStep() > this.totalSteps()) {
|
|
1565
|
+
this.currentStep.set(this.totalSteps());
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
reset() {
|
|
1569
|
+
this.currentStep.set(1);
|
|
1570
|
+
}
|
|
1571
|
+
advance() {
|
|
1572
|
+
if (this.currentStep() < this.totalSteps()) {
|
|
1573
|
+
this.currentStep.update((step) => step + 1);
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
retreat() {
|
|
1577
|
+
if (this.currentStep() > 1) {
|
|
1578
|
+
this.currentStep.update((step) => step - 1);
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: FooterFlowStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1582
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: FooterFlowStore, providedIn: 'root' });
|
|
1583
|
+
}
|
|
1584
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: FooterFlowStore, decorators: [{
|
|
1585
|
+
type: Injectable,
|
|
1586
|
+
args: [{ providedIn: 'root' }]
|
|
1587
|
+
}] });
|
|
1588
|
+
|
|
1589
|
+
class FooterComponent {
|
|
1590
|
+
sideModalStore = inject(SideModalStore);
|
|
1591
|
+
confirmModalStore = inject(ConfirmModalStore);
|
|
1592
|
+
flowStore = inject(FooterFlowStore);
|
|
1593
|
+
primaryLabel = computed(() => this.flowStore.currentStep() < this.flowStore.totalSteps() ? 'NEXT' : 'SAVE', ...(ngDevMode ? [{ debugName: "primaryLabel" }] : []));
|
|
1594
|
+
onCancel() {
|
|
1595
|
+
this.sideModalStore.closeSideModal();
|
|
1596
|
+
}
|
|
1597
|
+
onContinue() {
|
|
1598
|
+
if (this.flowStore.currentStep() < this.flowStore.totalSteps()) {
|
|
1599
|
+
this.flowStore.advance();
|
|
1600
|
+
return;
|
|
1601
|
+
}
|
|
1602
|
+
const dialogRef = this.confirmModalStore.open('¿Guardar cambios?', 'Guardar', '', '', 'max-content', 'Cancelar');
|
|
1603
|
+
dialogRef.closed.subscribe((result) => {
|
|
1604
|
+
if (result === true) {
|
|
1605
|
+
this.sideModalStore.closeSideModal({ step: this.flowStore.totalSteps(), saved: true });
|
|
1606
|
+
}
|
|
1607
|
+
});
|
|
1608
|
+
}
|
|
1609
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: FooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1610
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: FooterComponent, isStandalone: true, selector: "lib-side-modal-footer", ngImport: i0, template: "<lib-modal-footer-actions>\r\n <lib-button\r\n variant=\"outlined\"\r\n size=\"small\"\r\n [label]=\"'Cancelar' | translate\"\r\n (click)=\"onCancel()\"\r\n />\r\n <lib-button\r\n variant=\"filled\"\r\n size=\"small\"\r\n [label]=\"primaryLabel() | translate\"\r\n (click)=\"onContinue()\"\r\n />\r\n</lib-modal-footer-actions>\r\n", dependencies: [{ kind: "component", type: ModalFooterActionsComponent, selector: "lib-modal-footer-actions" }, { kind: "component", type: LibButtonComponent, selector: "lib-button", inputs: ["size", "disabled", "type", "fullWidth", "variant", "shape", "toggle", "selected", "label", "icon", "iconPosition", "contentAlign", "labelClass", "pressed", "debugPadding"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1611
|
+
}
|
|
1612
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: FooterComponent, decorators: [{
|
|
1613
|
+
type: Component,
|
|
1614
|
+
args: [{ selector: 'lib-side-modal-footer', standalone: true, imports: [ModalFooterActionsComponent, LibButtonComponent, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<lib-modal-footer-actions>\r\n <lib-button\r\n variant=\"outlined\"\r\n size=\"small\"\r\n [label]=\"'Cancelar' | translate\"\r\n (click)=\"onCancel()\"\r\n />\r\n <lib-button\r\n variant=\"filled\"\r\n size=\"small\"\r\n [label]=\"primaryLabel() | translate\"\r\n (click)=\"onContinue()\"\r\n />\r\n</lib-modal-footer-actions>\r\n" }]
|
|
1615
|
+
}] });
|
|
1616
|
+
|
|
1617
|
+
const LIB_UI_STYLES_PATH = './lib/styles/index.scss';
|
|
1618
|
+
|
|
1619
|
+
/**
|
|
1620
|
+
* Generated bundle index. Do not edit.
|
|
1621
|
+
*/
|
|
1622
|
+
|
|
1623
|
+
export { CircularProgressStepper, ConfirmModal, ConfirmModalStore, FooterComponent, FooterFlowStore, HeaderComponent, LIB_UI_STYLES_PATH, LibButtonComponent, LibCardComponent, LibCheckboxComponent, LibCheckboxShowcaseComponent, LibDividerComponent, LibIconButtonComponent, LibListItemComponent, LibMenuComponent, LibSelectFieldComponent, LibSpinnerComponent, LibTextFieldComponent, LibTooltipComponent, LibUi, ModalFooterActionsComponent, PageFooterActionsComponent, SharedBreadcrumbComponent, SharedTableCellTemplateDirective, SharedTableComponent, SideModal, SideModalStore, SidebarComponent, SlideToggle, UI_ICON_NAMES, registerUiIcons, resolveUiIconResource };
|
|
1624
|
+
//# sourceMappingURL=crdx-components.mjs.map
|