crdx-components 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish.yml +38 -0
- package/bun.lock +491 -0
- package/crdx-components-1.0.0.tgz +0 -0
- package/crdx-components-tokenized-components-1.0.1.tgz +0 -0
- package/ng-package.json +12 -0
- package/npm +0 -0
- package/package.json +33 -0
- package/src/index.ts +45 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.css +206 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.html +15 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.ts +47 -0
- package/src/lib/components/button/button.css +371 -0
- package/src/lib/components/button/button.html +187 -0
- package/src/lib/components/button/button.ts +103 -0
- package/src/lib/components/card/card.css +285 -0
- package/src/lib/components/card/card.html +69 -0
- package/src/lib/components/card/card.ts +93 -0
- package/src/lib/components/checkbox/checkbox-showcase.component.css +42 -0
- package/src/lib/components/checkbox/checkbox-showcase.component.html +36 -0
- package/src/lib/components/checkbox/checkbox-showcase.component.ts +13 -0
- package/src/lib/components/checkbox/checkbox.css +10 -0
- package/src/lib/components/checkbox/checkbox.html +13 -0
- package/src/lib/components/checkbox/checkbox.ts +64 -0
- package/src/lib/components/circular-progress-stepper/circular-progress-stepper.css +89 -0
- package/src/lib/components/circular-progress-stepper/circular-progress-stepper.html +23 -0
- package/src/lib/components/circular-progress-stepper/circular-progress-stepper.ts +40 -0
- package/src/lib/components/dialogs/alert-modal/alert-modal.css +118 -0
- package/src/lib/components/dialogs/alert-modal/alert-modal.html +29 -0
- package/src/lib/components/dialogs/alert-modal/alert-modal.ts +28 -0
- package/src/lib/components/dialogs/confirm-modal/confirm-modal.css +219 -0
- package/src/lib/components/dialogs/confirm-modal/confirm-modal.html +60 -0
- package/src/lib/components/dialogs/confirm-modal/confirm-modal.store.ts +139 -0
- package/src/lib/components/dialogs/confirm-modal/confirm-modal.ts +63 -0
- package/src/lib/components/dialogs/container-custom/container-custom.css +11 -0
- package/src/lib/components/dialogs/container-custom/container-custom.html +3 -0
- package/src/lib/components/dialogs/container-custom/container-custom.ts +37 -0
- package/src/lib/components/dialogs/container-custom/custom-modal.state.ts +57 -0
- package/src/lib/components/dialogs/error-modal/error-modal.css +53 -0
- package/src/lib/components/dialogs/error-modal/error-modal.html +17 -0
- package/src/lib/components/dialogs/error-modal/error-modal.ts +20 -0
- package/src/lib/components/dialogs/side-modal/side-modal.css +80 -0
- package/src/lib/components/dialogs/side-modal/side-modal.html +30 -0
- package/src/lib/components/dialogs/side-modal/side-modal.state.ts +78 -0
- package/src/lib/components/dialogs/side-modal/side-modal.ts +50 -0
- package/src/lib/components/divider/divider.css +24 -0
- package/src/lib/components/divider/divider.html +7 -0
- package/src/lib/components/divider/divider.ts +13 -0
- package/src/lib/components/footer-actions/footer/footer-flow.store.ts +30 -0
- package/src/lib/components/footer-actions/footer/footer.html +14 -0
- package/src/lib/components/footer-actions/footer/footer.ts +50 -0
- package/src/lib/components/footer-actions/modal-footer-actions/modal-footer-actions.css +44 -0
- package/src/lib/components/footer-actions/modal-footer-actions/modal-footer-actions.html +7 -0
- package/src/lib/components/footer-actions/modal-footer-actions/modal-footer-actions.ts +12 -0
- package/src/lib/components/footer-actions/page-footer-actions/page-footer-actions.css +31 -0
- package/src/lib/components/footer-actions/page-footer-actions/page-footer-actions.html +7 -0
- package/src/lib/components/footer-actions/page-footer-actions/page-footer-actions.ts +12 -0
- package/src/lib/components/form-field/select-field.css +178 -0
- package/src/lib/components/form-field/select-field.html +94 -0
- package/src/lib/components/form-field/select-field.ts +324 -0
- package/src/lib/components/form-field/text-field.css +41 -0
- package/src/lib/components/form-field/text-field.html +38 -0
- package/src/lib/components/form-field/text-field.ts +102 -0
- package/src/lib/components/header/header.css +142 -0
- package/src/lib/components/header/header.html +36 -0
- package/src/lib/components/header/header.ts +101 -0
- package/src/lib/components/icon-button/icon-button.css +445 -0
- package/src/lib/components/icon-button/icon-button.html +15 -0
- package/src/lib/components/icon-button/icon-button.ts +49 -0
- package/src/lib/components/list-item/list-item.css +122 -0
- package/src/lib/components/list-item/list-item.html +79 -0
- package/src/lib/components/list-item/list-item.ts +104 -0
- package/src/lib/components/menu/menu.css +39 -0
- package/src/lib/components/menu/menu.html +57 -0
- package/src/lib/components/menu/menu.ts +159 -0
- package/src/lib/components/shared-table/shared-table-cell-template.directive.ts +25 -0
- package/src/lib/components/shared-table/shared-table.component.css +223 -0
- package/src/lib/components/shared-table/shared-table.component.html +96 -0
- package/src/lib/components/shared-table/shared-table.component.ts +172 -0
- package/src/lib/components/sidebar/sidebar.css +234 -0
- package/src/lib/components/sidebar/sidebar.html +67 -0
- package/src/lib/components/sidebar/sidebar.ts +92 -0
- package/src/lib/components/slide-toggle/slide-toggle.css +0 -0
- package/src/lib/components/slide-toggle/slide-toggle.html +3 -0
- package/src/lib/components/slide-toggle/slide-toggle.ts +18 -0
- package/src/lib/components/spinner/spinner.css +9 -0
- package/src/lib/components/spinner/spinner.html +9 -0
- package/src/lib/components/spinner/spinner.ts +17 -0
- package/src/lib/components/tooltip/tooltip.css +32 -0
- package/src/lib/components/tooltip/tooltip.html +3 -0
- package/src/lib/components/tooltip/tooltip.ts +31 -0
- package/src/lib/icons/configuration-countable.svg +8 -0
- package/src/lib/icons/edit-table.svg +3 -0
- package/src/lib/icons/edit.svg +3 -0
- package/src/lib/icons/error-circle.svg +8 -0
- package/src/lib/icons/hub.svg +3 -0
- package/src/lib/icons/icon-menu.svg +8 -0
- package/src/lib/icons/info-error.svg +8 -0
- package/src/lib/icons/keyboard_arrow_down.svg +1 -0
- package/src/lib/icons/logo.svg +0 -0
- package/src/lib/icons/logout.svg +0 -0
- package/src/lib/icons/notifications.svg +0 -0
- package/src/lib/icons/profile-user-menu.svg +0 -0
- package/src/lib/icons/profile.svg +0 -0
- package/src/lib/icons/register-icons.ts +101 -0
- package/src/lib/icons/visibility.svg +0 -0
- package/src/lib/lib-ui/lib-ui.html +1 -0
- package/src/lib/lib-ui/lib-ui.scss +0 -0
- package/src/lib/lib-ui/lib-ui.ts +9 -0
- package/src/lib/styles/generated/_app-tokens.scss +2757 -0
- package/src/lib/styles/generated/_md3-tokens.scss +179 -0
- package/src/lib/styles/generated/_tokens-avatars.scss +4 -0
- package/src/lib/styles/global-material-theme.scss +69 -0
- package/src/lib/styles/index.scss +16 -0
- package/src/lib/styles/layout.scss +29 -0
- package/src/lib/styles/overrides/_index.scss +11 -0
- package/src/lib/styles/overrides/_mat-button-overrides.scss +105 -0
- package/src/lib/styles/overrides/_mat-checkbox-overrides.scss +49 -0
- package/src/lib/styles/overrides/_mat-form-field-overrides.scss +148 -0
- package/src/lib/styles/overrides/_mat-icon-button-overrides.scss +20 -0
- package/src/lib/styles/overrides/_mat-list-overrides.scss +59 -0
- package/src/lib/styles/overrides/_mat-slide-toggle-overrides.scss +33 -0
- package/src/lib/styles/overrides/_mat-table-overrides.scss +259 -0
- package/src/lib/styles/overrides/_mat-tabs-overrides.scss +116 -0
- package/src/lib/styles/scrollbar.scss +40 -0
- package/src/lib/styles/text-classes.scss +116 -0
- package/src/lib/styles/typography.scss +14 -0
- package/tsconfig.json +30 -0
- package/tsconfig.lib.json +20 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'lib-divider',
|
|
5
|
+
standalone: true,
|
|
6
|
+
templateUrl: './divider.html',
|
|
7
|
+
styleUrl: './divider.css',
|
|
8
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9
|
+
})
|
|
10
|
+
export class LibDividerComponent {
|
|
11
|
+
/** Orientación: horizontal (full width) o vertical (full height). Figma: Horizontal/Full-width, Vertical/Full-width */
|
|
12
|
+
orientation = input<'horizontal' | 'vertical'>('horizontal');
|
|
13
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Injectable, signal } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Injectable({ providedIn: 'root' })
|
|
4
|
+
export class FooterFlowStore {
|
|
5
|
+
readonly totalSteps = signal(1);
|
|
6
|
+
readonly currentStep = signal(1);
|
|
7
|
+
|
|
8
|
+
setTotalSteps(total: number): void {
|
|
9
|
+
this.totalSteps.set(Math.max(1, total));
|
|
10
|
+
if (this.currentStep() > this.totalSteps()) {
|
|
11
|
+
this.currentStep.set(this.totalSteps());
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
reset(): void {
|
|
16
|
+
this.currentStep.set(1);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
advance(): void {
|
|
20
|
+
if (this.currentStep() < this.totalSteps()) {
|
|
21
|
+
this.currentStep.update((step) => step + 1);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
retreat(): void {
|
|
26
|
+
if (this.currentStep() > 1) {
|
|
27
|
+
this.currentStep.update((step) => step - 1);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<lib-modal-footer-actions>
|
|
2
|
+
<lib-button
|
|
3
|
+
variant="outlined"
|
|
4
|
+
size="small"
|
|
5
|
+
[label]="'Cancelar' | translate"
|
|
6
|
+
(click)="onCancel()"
|
|
7
|
+
/>
|
|
8
|
+
<lib-button
|
|
9
|
+
variant="filled"
|
|
10
|
+
size="small"
|
|
11
|
+
[label]="primaryLabel() | translate"
|
|
12
|
+
(click)="onContinue()"
|
|
13
|
+
/>
|
|
14
|
+
</lib-modal-footer-actions>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';
|
|
2
|
+
import { ConfirmModalStore } from '../../dialogs/confirm-modal/confirm-modal.store';
|
|
3
|
+
import { LibButtonComponent } from '../../button/button';
|
|
4
|
+
import { ModalFooterActionsComponent } from '../modal-footer-actions/modal-footer-actions';
|
|
5
|
+
import { SideModalStore } from '../../dialogs/side-modal/side-modal.state';
|
|
6
|
+
import { TranslatePipe } from '@ngx-translate/core';
|
|
7
|
+
import { FooterFlowStore } from './footer-flow.store';
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
selector: 'lib-side-modal-footer',
|
|
11
|
+
standalone: true,
|
|
12
|
+
imports: [ModalFooterActionsComponent, LibButtonComponent, TranslatePipe],
|
|
13
|
+
templateUrl: './footer.html',
|
|
14
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
|
+
})
|
|
16
|
+
export class FooterComponent {
|
|
17
|
+
private readonly sideModalStore = inject(SideModalStore);
|
|
18
|
+
private readonly confirmModalStore = inject(ConfirmModalStore);
|
|
19
|
+
private readonly flowStore = inject(FooterFlowStore);
|
|
20
|
+
|
|
21
|
+
readonly primaryLabel = computed(() =>
|
|
22
|
+
this.flowStore.currentStep() < this.flowStore.totalSteps() ? 'NEXT' : 'SAVE'
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
onCancel(): void {
|
|
26
|
+
this.sideModalStore.closeSideModal();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
onContinue(): void {
|
|
30
|
+
if (this.flowStore.currentStep() < this.flowStore.totalSteps()) {
|
|
31
|
+
this.flowStore.advance();
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const dialogRef = this.confirmModalStore.open(
|
|
36
|
+
'¿Guardar cambios?',
|
|
37
|
+
'Guardar',
|
|
38
|
+
'',
|
|
39
|
+
'',
|
|
40
|
+
'max-content',
|
|
41
|
+
'Cancelar',
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
dialogRef.closed.subscribe((result: unknown) => {
|
|
45
|
+
if (result === true) {
|
|
46
|
+
this.sideModalStore.closeSideModal({ step: this.flowStore.totalSteps(), saved: true });
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
width: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
:host-context(.side-modal__content) {
|
|
8
|
+
width: calc(100% + 2rem);
|
|
9
|
+
margin-left: -1rem;
|
|
10
|
+
margin-right: -1rem;
|
|
11
|
+
margin-bottom: -1rem;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:host-context(.side-modal__content) .lib-modal-footer-actions__buttons {
|
|
15
|
+
padding-left: 0;
|
|
16
|
+
padding-right: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.lib-modal-footer-actions {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
align-items: stretch;
|
|
23
|
+
width: 100%;
|
|
24
|
+
align-self: flex-end;
|
|
25
|
+
flex: 0 0 auto;
|
|
26
|
+
margin-top: auto;
|
|
27
|
+
background: var(--side-sheets-enabled-container-sheet-side-docked-standard-container-color,
|
|
28
|
+
var(--app-side-sheets-enabled-container-sheet-side-docked-standard-container-color, #F7FAFC));
|
|
29
|
+
z-index: 10;
|
|
30
|
+
position: sticky;
|
|
31
|
+
bottom: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.lib-modal-footer-actions__buttons {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
gap: 8px;
|
|
38
|
+
padding: 0.75rem 1.5rem 1.25rem;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.lib-modal-footer-actions__buttons lib-mat-button,
|
|
42
|
+
.lib-modal-footer-actions__buttons .lib-mat-btn {
|
|
43
|
+
width: auto;
|
|
44
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { LibDividerComponent } from '../../divider/divider';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'lib-modal-footer-actions',
|
|
6
|
+
standalone: true,
|
|
7
|
+
imports: [LibDividerComponent],
|
|
8
|
+
templateUrl: './modal-footer-actions.html',
|
|
9
|
+
styleUrl: './modal-footer-actions.css',
|
|
10
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11
|
+
})
|
|
12
|
+
export class ModalFooterActionsComponent {}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
width: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
:host-context(.side-modal__content) {
|
|
7
|
+
width: calc(100% + 2rem);
|
|
8
|
+
margin-left: -1rem;
|
|
9
|
+
margin-right: -1rem;
|
|
10
|
+
margin-bottom: -1rem;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.lib-page-footer-actions {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
align-items: stretch;
|
|
17
|
+
width: 100%;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.lib-page-footer-actions__buttons {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: 8px;
|
|
24
|
+
padding: 12px 24px 0;
|
|
25
|
+
justify-content: flex-end;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.lib-page-footer-actions__buttons lib-mat-button,
|
|
29
|
+
.lib-page-footer-actions__buttons .lib-mat-btn {
|
|
30
|
+
width: auto;
|
|
31
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { LibDividerComponent } from '../../divider/divider';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'lib-page-footer-actions',
|
|
6
|
+
standalone: true,
|
|
7
|
+
imports: [LibDividerComponent],
|
|
8
|
+
templateUrl: './page-footer-actions.html',
|
|
9
|
+
styleUrl: './page-footer-actions.css',
|
|
10
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11
|
+
})
|
|
12
|
+
export class PageFooterActionsComponent {}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
.lib-select-field__field {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
:host ::ng-deep .lib-select-field__field .mat-mdc-select-arrow,
|
|
6
|
+
:host ::ng-deep .lib-select-field__field .mat-mdc-select-arrow-wrapper {
|
|
7
|
+
display: none !important;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:host ::ng-deep .mat-mdc-select-trigger {
|
|
11
|
+
padding-right: 0 !important;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.lib-select-field__field .mat-mdc-select-arrow-wrapper {
|
|
15
|
+
display: none !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.lib-select-field__filter-option {
|
|
19
|
+
pointer-events: auto;
|
|
20
|
+
height: auto;
|
|
21
|
+
padding: 0;
|
|
22
|
+
line-height: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.lib-select-field__filter-option .mat-pseudo-checkbox {
|
|
26
|
+
display: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.lib-select-field__filter-option .lib-select-field__filter-input {
|
|
30
|
+
width: 100%;
|
|
31
|
+
padding: 8px 16px;
|
|
32
|
+
border: none;
|
|
33
|
+
outline: none;
|
|
34
|
+
background: transparent;
|
|
35
|
+
font-size: 14px;
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
.lib-select-field__multi-trigger-input {
|
|
41
|
+
width: 100%;
|
|
42
|
+
border: none;
|
|
43
|
+
outline: none;
|
|
44
|
+
background: transparent;
|
|
45
|
+
font: inherit;
|
|
46
|
+
font-size: 14px;
|
|
47
|
+
color: inherit;
|
|
48
|
+
box-sizing: border-box;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.lib-select-field__multi-trigger-input::placeholder {
|
|
53
|
+
color: rgba(0, 0, 0, 0.42);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.lib-select-field__option-row {
|
|
57
|
+
display: inline-flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
gap: 12px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.lib-select-field__virtual-row {
|
|
63
|
+
height: 48px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.lib-select-field__select-all-option {
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
height: 100%;
|
|
70
|
+
padding: 0 16px;
|
|
71
|
+
box-sizing: border-box;
|
|
72
|
+
cursor: pointer;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel,
|
|
77
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel {
|
|
78
|
+
overflow: hidden !important;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport,
|
|
82
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport {
|
|
83
|
+
width: 100%;
|
|
84
|
+
overflow-x: hidden;
|
|
85
|
+
overflow-y: auto;
|
|
86
|
+
scrollbar-width: thin;
|
|
87
|
+
scrollbar-color: var(--Gris-500, #6a7282) var(--Gris-100, #f3f4f6);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar,
|
|
91
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar {
|
|
92
|
+
width: 10px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button,
|
|
96
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button,
|
|
97
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button,
|
|
98
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button,
|
|
99
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical,
|
|
100
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical,
|
|
101
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal,
|
|
102
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal,
|
|
103
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:start:decrement,
|
|
104
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:start:decrement,
|
|
105
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:end:increment,
|
|
106
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:end:increment,
|
|
107
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:start:decrement,
|
|
108
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:start:decrement,
|
|
109
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:end:increment,
|
|
110
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:end:increment,
|
|
111
|
+
: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,
|
|
112
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical:start:decrement,
|
|
113
|
+
: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,
|
|
114
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical:end:increment,
|
|
115
|
+
: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,
|
|
116
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal:start:decrement,
|
|
117
|
+
: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,
|
|
118
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal:end:increment,
|
|
119
|
+
: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,
|
|
120
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical:decrement,
|
|
121
|
+
: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,
|
|
122
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:vertical:increment,
|
|
123
|
+
: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,
|
|
124
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal:decrement,
|
|
125
|
+
: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,
|
|
126
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:single-button:horizontal:increment,
|
|
127
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:decrement,
|
|
128
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:decrement,
|
|
129
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:increment,
|
|
130
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:increment,
|
|
131
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:decrement,
|
|
132
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:decrement,
|
|
133
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:increment,
|
|
134
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:increment,
|
|
135
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:start,
|
|
136
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:start,
|
|
137
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:end,
|
|
138
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:vertical:end,
|
|
139
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:start,
|
|
140
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:start,
|
|
141
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:end,
|
|
142
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-button:horizontal:end {
|
|
143
|
+
display: none !important;
|
|
144
|
+
width: 0 !important;
|
|
145
|
+
height: 0 !important;
|
|
146
|
+
-webkit-appearance: none !important;
|
|
147
|
+
appearance: none !important;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-track,
|
|
151
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-track {
|
|
152
|
+
background: var(--Gris-100, #f3f4f6);
|
|
153
|
+
border-radius: var(--Corner-Radius-Full, 6.25rem);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-thumb,
|
|
157
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-thumb {
|
|
158
|
+
background: var(--Gris-500, #6a7282);
|
|
159
|
+
border-radius: var(--Corner-Radius-Small, 0.5rem);
|
|
160
|
+
min-height: 3rem;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-thumb:hover,
|
|
164
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-thumb:hover {
|
|
165
|
+
background: color-mix(in srgb, var(--Gris-500, #6a7282) 80%, black);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-thumb:active,
|
|
169
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport::-webkit-scrollbar-thumb:active {
|
|
170
|
+
background: color-mix(in srgb, var(--Gris-500, #6a7282) 65%, black);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
:host ::ng-deep .cdk-overlay-container .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport .mat-pseudo-checkbox,
|
|
174
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport .mat-pseudo-checkbox,
|
|
175
|
+
: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,
|
|
176
|
+
:host ::ng-deep .mat-mdc-select-panel.lib-select-field-panel .lib-select-field__viewport .mat-mdc-option .mdc-list-item__start {
|
|
177
|
+
display: none !important;
|
|
178
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<mat-form-field
|
|
2
|
+
class="lib-select-field__field"
|
|
3
|
+
[appearance]="matAppearance()"
|
|
4
|
+
[style.width]="widthStyle() ?? null"
|
|
5
|
+
>
|
|
6
|
+
@if (label()) {
|
|
7
|
+
<mat-label>{{ label() }}</mat-label>
|
|
8
|
+
}
|
|
9
|
+
<mat-select
|
|
10
|
+
[value]="displayValue"
|
|
11
|
+
[multiple]="isMultiple()"
|
|
12
|
+
[disabled]="disabled() || disabledByControl()"
|
|
13
|
+
[required]="required()"
|
|
14
|
+
[placeholder]="placeholder()"
|
|
15
|
+
panelClass="lib-select-field-panel"
|
|
16
|
+
(openedChange)="onPanelOpenChange($event)"
|
|
17
|
+
(selectionChange)="onSelectionChange($event)"
|
|
18
|
+
>
|
|
19
|
+
@if (isMultiple()) {
|
|
20
|
+
<mat-select-trigger
|
|
21
|
+
>{{ multiTriggerLabel() || placeholder() }}</mat-select-trigger
|
|
22
|
+
>
|
|
23
|
+
} @if (filterable()) {
|
|
24
|
+
<div
|
|
25
|
+
class="lib-select-field__filter-option"
|
|
26
|
+
(mousedown)="$event.stopPropagation()"
|
|
27
|
+
>
|
|
28
|
+
<input
|
|
29
|
+
#filterInput
|
|
30
|
+
class="lib-select-field__filter-input"
|
|
31
|
+
type="text"
|
|
32
|
+
[placeholder]="filterPlaceholder()"
|
|
33
|
+
[value]="filterTerm()"
|
|
34
|
+
(mousedown)="$event.stopPropagation()"
|
|
35
|
+
(click)="$event.stopPropagation()"
|
|
36
|
+
(input)="onFilterInput($event)"
|
|
37
|
+
(keydown)="onFilterKeydown($event)"
|
|
38
|
+
/>
|
|
39
|
+
</div>
|
|
40
|
+
}
|
|
41
|
+
<cdk-virtual-scroll-viewport
|
|
42
|
+
class="lib-select-field__viewport app-scrollbar-figma"
|
|
43
|
+
[itemSize]="48"
|
|
44
|
+
minBufferPx="240"
|
|
45
|
+
maxBufferPx="240"
|
|
46
|
+
[style.height.px]="virtualViewportHeight()"
|
|
47
|
+
>
|
|
48
|
+
<div
|
|
49
|
+
*cdkVirtualFor="let row of virtualRows(); trackBy: trackByVirtualRow"
|
|
50
|
+
class="lib-select-field__virtual-row"
|
|
51
|
+
>
|
|
52
|
+
@if (row.kind === 'selectAll') {
|
|
53
|
+
<div
|
|
54
|
+
class="lib-select-field__select-all-option"
|
|
55
|
+
role="button"
|
|
56
|
+
tabindex="0"
|
|
57
|
+
(mousedown)="$event.stopPropagation()"
|
|
58
|
+
(click)="toggledAllSelection(); $event.stopPropagation()"
|
|
59
|
+
(keydown.enter)="toggledAllSelection(); $event.preventDefault(); $event.stopPropagation()"
|
|
60
|
+
(keydown.space)="toggledAllSelection(); $event.preventDefault(); $event.stopPropagation()"
|
|
61
|
+
>
|
|
62
|
+
<span class="lib-select-field__option-row">
|
|
63
|
+
<lib-checkbox
|
|
64
|
+
[checked]="allSelected()"
|
|
65
|
+
[indeterminate]="selectAllIndeterminate()"
|
|
66
|
+
(click)="$event.stopPropagation()"
|
|
67
|
+
(checkedChange)="onSelectAllCheckedChange($event)"
|
|
68
|
+
/>
|
|
69
|
+
<span>{{ selectAllLabel() }}</span>
|
|
70
|
+
</span>
|
|
71
|
+
</div>
|
|
72
|
+
} @else {
|
|
73
|
+
<mat-option [value]="row.option.value">
|
|
74
|
+
@if (isMultiple()) {
|
|
75
|
+
<span class="lib-select-field__option-row">
|
|
76
|
+
<lib-checkbox
|
|
77
|
+
[checked]="isSelected(row.option.value)"
|
|
78
|
+
(click)="$event.stopPropagation()"
|
|
79
|
+
(checkedChange)="onOptionCheckedChange(row.option.value, $event)"
|
|
80
|
+
/>
|
|
81
|
+
<span>{{ row.option.label }}</span>
|
|
82
|
+
</span>
|
|
83
|
+
} @else {
|
|
84
|
+
{{ row.option.label }}
|
|
85
|
+
}
|
|
86
|
+
</mat-option>
|
|
87
|
+
}
|
|
88
|
+
</div>
|
|
89
|
+
</cdk-virtual-scroll-viewport>
|
|
90
|
+
</mat-select>
|
|
91
|
+
<mat-icon class="lib-select-field__arrow" matSuffix>
|
|
92
|
+
{{ panelOpen() ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}
|
|
93
|
+
</mat-icon>
|
|
94
|
+
</mat-form-field>
|