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.
Files changed (128) hide show
  1. package/.github/workflows/publish.yml +38 -0
  2. package/bun.lock +491 -0
  3. package/crdx-components-1.0.0.tgz +0 -0
  4. package/crdx-components-tokenized-components-1.0.1.tgz +0 -0
  5. package/ng-package.json +12 -0
  6. package/npm +0 -0
  7. package/package.json +33 -0
  8. package/src/index.ts +45 -0
  9. package/src/lib/components/breadcrumb/breadcrumb.component.css +206 -0
  10. package/src/lib/components/breadcrumb/breadcrumb.component.html +15 -0
  11. package/src/lib/components/breadcrumb/breadcrumb.component.ts +47 -0
  12. package/src/lib/components/button/button.css +371 -0
  13. package/src/lib/components/button/button.html +187 -0
  14. package/src/lib/components/button/button.ts +103 -0
  15. package/src/lib/components/card/card.css +285 -0
  16. package/src/lib/components/card/card.html +69 -0
  17. package/src/lib/components/card/card.ts +93 -0
  18. package/src/lib/components/checkbox/checkbox-showcase.component.css +42 -0
  19. package/src/lib/components/checkbox/checkbox-showcase.component.html +36 -0
  20. package/src/lib/components/checkbox/checkbox-showcase.component.ts +13 -0
  21. package/src/lib/components/checkbox/checkbox.css +10 -0
  22. package/src/lib/components/checkbox/checkbox.html +13 -0
  23. package/src/lib/components/checkbox/checkbox.ts +64 -0
  24. package/src/lib/components/circular-progress-stepper/circular-progress-stepper.css +89 -0
  25. package/src/lib/components/circular-progress-stepper/circular-progress-stepper.html +23 -0
  26. package/src/lib/components/circular-progress-stepper/circular-progress-stepper.ts +40 -0
  27. package/src/lib/components/dialogs/alert-modal/alert-modal.css +118 -0
  28. package/src/lib/components/dialogs/alert-modal/alert-modal.html +29 -0
  29. package/src/lib/components/dialogs/alert-modal/alert-modal.ts +28 -0
  30. package/src/lib/components/dialogs/confirm-modal/confirm-modal.css +219 -0
  31. package/src/lib/components/dialogs/confirm-modal/confirm-modal.html +60 -0
  32. package/src/lib/components/dialogs/confirm-modal/confirm-modal.store.ts +139 -0
  33. package/src/lib/components/dialogs/confirm-modal/confirm-modal.ts +63 -0
  34. package/src/lib/components/dialogs/container-custom/container-custom.css +11 -0
  35. package/src/lib/components/dialogs/container-custom/container-custom.html +3 -0
  36. package/src/lib/components/dialogs/container-custom/container-custom.ts +37 -0
  37. package/src/lib/components/dialogs/container-custom/custom-modal.state.ts +57 -0
  38. package/src/lib/components/dialogs/error-modal/error-modal.css +53 -0
  39. package/src/lib/components/dialogs/error-modal/error-modal.html +17 -0
  40. package/src/lib/components/dialogs/error-modal/error-modal.ts +20 -0
  41. package/src/lib/components/dialogs/side-modal/side-modal.css +80 -0
  42. package/src/lib/components/dialogs/side-modal/side-modal.html +30 -0
  43. package/src/lib/components/dialogs/side-modal/side-modal.state.ts +78 -0
  44. package/src/lib/components/dialogs/side-modal/side-modal.ts +50 -0
  45. package/src/lib/components/divider/divider.css +24 -0
  46. package/src/lib/components/divider/divider.html +7 -0
  47. package/src/lib/components/divider/divider.ts +13 -0
  48. package/src/lib/components/footer-actions/footer/footer-flow.store.ts +30 -0
  49. package/src/lib/components/footer-actions/footer/footer.html +14 -0
  50. package/src/lib/components/footer-actions/footer/footer.ts +50 -0
  51. package/src/lib/components/footer-actions/modal-footer-actions/modal-footer-actions.css +44 -0
  52. package/src/lib/components/footer-actions/modal-footer-actions/modal-footer-actions.html +7 -0
  53. package/src/lib/components/footer-actions/modal-footer-actions/modal-footer-actions.ts +12 -0
  54. package/src/lib/components/footer-actions/page-footer-actions/page-footer-actions.css +31 -0
  55. package/src/lib/components/footer-actions/page-footer-actions/page-footer-actions.html +7 -0
  56. package/src/lib/components/footer-actions/page-footer-actions/page-footer-actions.ts +12 -0
  57. package/src/lib/components/form-field/select-field.css +178 -0
  58. package/src/lib/components/form-field/select-field.html +94 -0
  59. package/src/lib/components/form-field/select-field.ts +324 -0
  60. package/src/lib/components/form-field/text-field.css +41 -0
  61. package/src/lib/components/form-field/text-field.html +38 -0
  62. package/src/lib/components/form-field/text-field.ts +102 -0
  63. package/src/lib/components/header/header.css +142 -0
  64. package/src/lib/components/header/header.html +36 -0
  65. package/src/lib/components/header/header.ts +101 -0
  66. package/src/lib/components/icon-button/icon-button.css +445 -0
  67. package/src/lib/components/icon-button/icon-button.html +15 -0
  68. package/src/lib/components/icon-button/icon-button.ts +49 -0
  69. package/src/lib/components/list-item/list-item.css +122 -0
  70. package/src/lib/components/list-item/list-item.html +79 -0
  71. package/src/lib/components/list-item/list-item.ts +104 -0
  72. package/src/lib/components/menu/menu.css +39 -0
  73. package/src/lib/components/menu/menu.html +57 -0
  74. package/src/lib/components/menu/menu.ts +159 -0
  75. package/src/lib/components/shared-table/shared-table-cell-template.directive.ts +25 -0
  76. package/src/lib/components/shared-table/shared-table.component.css +223 -0
  77. package/src/lib/components/shared-table/shared-table.component.html +96 -0
  78. package/src/lib/components/shared-table/shared-table.component.ts +172 -0
  79. package/src/lib/components/sidebar/sidebar.css +234 -0
  80. package/src/lib/components/sidebar/sidebar.html +67 -0
  81. package/src/lib/components/sidebar/sidebar.ts +92 -0
  82. package/src/lib/components/slide-toggle/slide-toggle.css +0 -0
  83. package/src/lib/components/slide-toggle/slide-toggle.html +3 -0
  84. package/src/lib/components/slide-toggle/slide-toggle.ts +18 -0
  85. package/src/lib/components/spinner/spinner.css +9 -0
  86. package/src/lib/components/spinner/spinner.html +9 -0
  87. package/src/lib/components/spinner/spinner.ts +17 -0
  88. package/src/lib/components/tooltip/tooltip.css +32 -0
  89. package/src/lib/components/tooltip/tooltip.html +3 -0
  90. package/src/lib/components/tooltip/tooltip.ts +31 -0
  91. package/src/lib/icons/configuration-countable.svg +8 -0
  92. package/src/lib/icons/edit-table.svg +3 -0
  93. package/src/lib/icons/edit.svg +3 -0
  94. package/src/lib/icons/error-circle.svg +8 -0
  95. package/src/lib/icons/hub.svg +3 -0
  96. package/src/lib/icons/icon-menu.svg +8 -0
  97. package/src/lib/icons/info-error.svg +8 -0
  98. package/src/lib/icons/keyboard_arrow_down.svg +1 -0
  99. package/src/lib/icons/logo.svg +0 -0
  100. package/src/lib/icons/logout.svg +0 -0
  101. package/src/lib/icons/notifications.svg +0 -0
  102. package/src/lib/icons/profile-user-menu.svg +0 -0
  103. package/src/lib/icons/profile.svg +0 -0
  104. package/src/lib/icons/register-icons.ts +101 -0
  105. package/src/lib/icons/visibility.svg +0 -0
  106. package/src/lib/lib-ui/lib-ui.html +1 -0
  107. package/src/lib/lib-ui/lib-ui.scss +0 -0
  108. package/src/lib/lib-ui/lib-ui.ts +9 -0
  109. package/src/lib/styles/generated/_app-tokens.scss +2757 -0
  110. package/src/lib/styles/generated/_md3-tokens.scss +179 -0
  111. package/src/lib/styles/generated/_tokens-avatars.scss +4 -0
  112. package/src/lib/styles/global-material-theme.scss +69 -0
  113. package/src/lib/styles/index.scss +16 -0
  114. package/src/lib/styles/layout.scss +29 -0
  115. package/src/lib/styles/overrides/_index.scss +11 -0
  116. package/src/lib/styles/overrides/_mat-button-overrides.scss +105 -0
  117. package/src/lib/styles/overrides/_mat-checkbox-overrides.scss +49 -0
  118. package/src/lib/styles/overrides/_mat-form-field-overrides.scss +148 -0
  119. package/src/lib/styles/overrides/_mat-icon-button-overrides.scss +20 -0
  120. package/src/lib/styles/overrides/_mat-list-overrides.scss +59 -0
  121. package/src/lib/styles/overrides/_mat-slide-toggle-overrides.scss +33 -0
  122. package/src/lib/styles/overrides/_mat-table-overrides.scss +259 -0
  123. package/src/lib/styles/overrides/_mat-tabs-overrides.scss +116 -0
  124. package/src/lib/styles/scrollbar.scss +40 -0
  125. package/src/lib/styles/text-classes.scss +116 -0
  126. package/src/lib/styles/typography.scss +14 -0
  127. package/tsconfig.json +30 -0
  128. package/tsconfig.lib.json +20 -0
@@ -0,0 +1,89 @@
1
+ @property --progress {
2
+ syntax: "<length-percentage>";
3
+ inherits: false;
4
+ initial-value: 0%;
5
+ }
6
+
7
+ .progressbar[role="progressbar"] {
8
+ --size: 64px;
9
+ --bar-width: 10px;
10
+ --color-bar-progress: #0BC626;
11
+ --shadow-color-bar-progress: #F0F0F0;
12
+
13
+ width: var(--size);
14
+ aspect-ratio: 1 / 1;
15
+ position: relative;
16
+ background: conic-gradient(
17
+ var(--color-bar-progress),
18
+ var(--color-bar-progress) var(--progress),
19
+ var(--shadow-color-bar-progress) 0%
20
+ );
21
+ border-radius: 50vmax;
22
+ display: grid;
23
+ place-items: center;
24
+ transition: --progress 500ms linear;
25
+ }
26
+
27
+ .progressbar[role="progressbar"] > span {
28
+ display: none;
29
+ }
30
+
31
+ .progressbar[role="progressbar"]::after {
32
+ content: '';
33
+ background: white;
34
+ position: absolute;
35
+ inset: calc(var(--bar-width) / 2);
36
+ aspect-ratio: 1;
37
+ border-radius: inherit;
38
+ display: grid;
39
+ place-items: center;
40
+ z-index: 0;
41
+ }
42
+
43
+ .progressbar:not([role="progressbar"]) {
44
+ position: relative;
45
+ width: var(--size, 132px);
46
+ aspect-ratio: 1 / 1;
47
+ margin: 2rem auto;
48
+ display: grid;
49
+ place-items: center;
50
+ background:
51
+ #f3f4f6;
52
+ border-radius: 50%;
53
+ }
54
+
55
+ .progressbar:not([role="progressbar"])::after {
56
+ display: none;
57
+ }
58
+
59
+ .progressbar:not([role="progressbar"]) span {
60
+ font-size: 1rem;
61
+ text-align: center;
62
+ color: #059669;
63
+ padding: 1rem;
64
+ }
65
+
66
+
67
+ .progress-content {
68
+ position: absolute;
69
+ inset: 0;
70
+ z-index: 1;
71
+ display: flex;
72
+ flex-direction: column;
73
+ align-items: center;
74
+ justify-content: center;
75
+ text-align: center;
76
+ }
77
+
78
+ .progress-content .step-text {
79
+ font-size: 10px;
80
+ font-weight: 400;
81
+ color: #3E3E3E;
82
+ }
83
+
84
+ .progress-content .step-number {
85
+ font-size: 12px;
86
+ font-weight: 400;
87
+ color: #3E3E3E;
88
+ }
89
+
@@ -0,0 +1,23 @@
1
+ <div
2
+ class="progressbar"
3
+ [class.no-js]="!jsEnabled()"
4
+ [attr.role]="jsEnabled() ? 'progressbar' : null"
5
+ [attr.aria-valuemin]="0"
6
+ [attr.aria-valuemax]="100"
7
+ [attr.aria-busy]="isAnimating()"
8
+ [attr.aria-live]="jsEnabled() ? 'polite' : null"
9
+ [style.--progress]="progressPercentage()"
10
+ [style.--size]="size()"
11
+ [style.--bar-width]="barWidth()"
12
+ [style.--color-bar-progress]="colorBarProgress()"
13
+ [style.--shadow-shadow-bar-progress]="shadowColorBarProgress()">
14
+
15
+ <div class="progress-content">
16
+ <span class="step-text">Paso</span>
17
+ <span class="step-number">{{ `${currentStep()} de ${totalsStep()}` }}</span>
18
+ </div>
19
+ @if (!jsEnabled()) {
20
+ <span>{{ noJsMessage() }}</span>
21
+ }
22
+
23
+ </div>
@@ -0,0 +1,40 @@
1
+ import { Component, computed, effect, input, signal } from '@angular/core';
2
+
3
+ @Component({
4
+ selector: 'lib-circular-progress-stepper, circular-progress-stepper',
5
+ imports: [],
6
+ templateUrl: './circular-progress-stepper.html',
7
+ styleUrl: './circular-progress-stepper.css',
8
+ })
9
+ export class CircularProgressStepper {
10
+ currentStep = input<number>(0);
11
+ totalsStep = input<number>(0);
12
+ size = input<string>('64px');
13
+ barWidth = input<string>('10px');
14
+ colorBarProgress = input<string>('#0BC626');
15
+ shadowColorBarProgress = input<string>('#F0F0F0');
16
+ noJsMessage = input<string>('Esta función requiere JavaScript 😢');
17
+ animationDuration = input<number>(500);
18
+
19
+ progress = signal<number>(0);
20
+ isAnimating = signal<boolean>(false);
21
+ jsEnabled = signal<boolean>(true);
22
+ progressPercentage = computed(() => `${this.progress()}%`);
23
+
24
+
25
+ constructor() {
26
+ effect(() => {
27
+ this.updateProgress();
28
+ });
29
+ }
30
+
31
+ updateProgress(): void {
32
+ const previousStep = (this.currentStep() > 0) ? this.currentStep() - 1 : 0;
33
+ const previousProgress = (Math.round(previousStep) / Math.round(this.totalsStep())) * 100;
34
+ this.progress.set(Math.round(previousProgress));
35
+ const progress = (Math.round(this.currentStep()) / Math.round(this.totalsStep())) * 100;
36
+ setTimeout(() => {
37
+ this.progress.set(Math.round(progress));
38
+ }, 100);
39
+ }
40
+ }
@@ -0,0 +1,118 @@
1
+ .container {
2
+ --color: #FFFFFF;
3
+ --message-color: #3E3E3E;
4
+ --message-font-size: 32px;
5
+ --message-font-weight: 700;
6
+
7
+ background-color: var(--color);
8
+ padding: 40px 48px;
9
+ border-radius: 8px;
10
+ display: flex;
11
+ flex-direction: column;
12
+ gap: 40px;
13
+ text-align: center;
14
+ }
15
+
16
+ .container .message {
17
+ display: flex;
18
+ flex-direction: column;
19
+ gap: 24px;
20
+ align-items: center;
21
+ justify-content: center;
22
+ white-space: pre-line;
23
+ }
24
+
25
+ .container .message mat-icon {
26
+ display: flex;
27
+ font-size: 90px;
28
+ width: 90px;
29
+ height: 90px;
30
+ color: red;
31
+ justify-content: center;
32
+ align-items: center;
33
+ }
34
+
35
+ .container .extraBlock {
36
+ display: flex;
37
+ flex-direction: column;
38
+ justify-content: center;
39
+ gap: 8px;
40
+ }
41
+
42
+ .container .extraBlock.left {
43
+ align-items: flex-start;
44
+ }
45
+
46
+ .container .extraBlock.center {
47
+ align-items: center;
48
+ }
49
+
50
+ .container .extraBlock-content {
51
+ display: flex;
52
+ flex-wrap: wrap;
53
+ max-width: 100%;
54
+ color: var(--message-color);
55
+ font-size: 16px;
56
+ font-style: normal;
57
+ font-weight: 400;
58
+ line-height: normal;
59
+ gap: 8px;
60
+ }
61
+
62
+ .container .extraBlock-content.left {
63
+ justify-content: start;
64
+ padding-left: 16px;
65
+ }
66
+
67
+ .container .extraBlock-content.center {
68
+ justify-content: center;
69
+ }
70
+
71
+ .container .extra-block .word {
72
+ white-space: nowrap;
73
+ }
74
+
75
+ .container .extraBlock-content .separator {
76
+ color: #D2D2D2;
77
+ }
78
+
79
+ .container .title {
80
+ color: var(--message-color);
81
+ text-align: center;
82
+ font-size: var(--message-font-size);
83
+ font-style: normal;
84
+ font-weight: var(--message-font-weight);
85
+ line-height: normal;
86
+ }
87
+
88
+ .container .subtitle {
89
+ color: var(--message-color);
90
+ font-style: normal;
91
+ font-weight: var(--message-font-weight);
92
+ line-height: normal;
93
+ }
94
+
95
+ .container .content {
96
+ width: 712px;
97
+ color: var(--message-color);
98
+ text-align: center;
99
+ font-size: 16px;
100
+ font-style: normal;
101
+ font-weight: 400;
102
+ line-height: normal;
103
+ }
104
+
105
+ .container .actions {
106
+ display: flex;
107
+ flex-direction: row;
108
+ justify-content: center;
109
+ gap: 32px;
110
+ }
111
+
112
+ .container .actions button {
113
+ width: 120px;
114
+ height: 56px;
115
+ font-size: 16px;
116
+ font-weight: 500;
117
+ border-radius: 16px;
118
+ }
@@ -0,0 +1,29 @@
1
+ <div class="container">
2
+ <div class="message">
3
+ <mat-icon class="tab-icon" fontSet="material-icons-outlined" [ngStyle]="{'color': data.color}">info</mat-icon>
4
+ <p class="title">{{data.title}}</p>
5
+ @if(data.content){
6
+ <p class="content">{{data.content}}</p>
7
+ }
8
+ </div>
9
+ @if(data.extraBlock){
10
+ <div class="extraBlock" [ngClass]="data.subtitleAlign">
11
+ <p class="subtitle">{{data.subtitle}}</p>
12
+ <div class="extraBlock-content" [ngClass]="data.subtitleAlign">
13
+ <ng-container *ngFor="let word of data.extraBlock; let last = last">
14
+ <span class="word">{{ word }}</span>
15
+ <span *ngIf="!last" class="separator">|</span>
16
+ </ng-container>
17
+ </div>
18
+ </div>
19
+ }
20
+
21
+ <div class="actions">
22
+ @if(data.labelButtonCancel){
23
+ <button matButton="outlined" (click)="onCancel()">{{data.labelButtonCancel}}</button>
24
+ }
25
+ <button matButton="filled" fontSet="material-icons-outlined"
26
+ (click)="onConfirm()">{{data.labelButtonConfirm}}</button>
27
+
28
+ </div>
29
+ </div>
@@ -0,0 +1,28 @@
1
+ import { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';
2
+ import { CommonModule } from '@angular/common';
3
+ import { Component, inject } from '@angular/core';
4
+ import { MatButton } from '@angular/material/button';
5
+ import { MatIcon } from '@angular/material/icon';
6
+
7
+ @Component({
8
+ selector: 'lib-alert-modal, app-alert',
9
+ templateUrl: './alert-modal.html',
10
+ imports: [MatButton, MatIcon, CommonModule],
11
+ styleUrl: './alert-modal.css'
12
+ })
13
+ export class AlertModal {
14
+ readonly dialogRef = inject(DialogRef);
15
+ readonly data = inject(DIALOG_DATA);
16
+ readonly labelButtonCancel = 'Entendido';
17
+
18
+ onConfirm(): void {
19
+ this.dialogRef.close(true);
20
+
21
+ }
22
+ onCancel(): void {
23
+ this.dialogRef.close(false);
24
+
25
+ }
26
+
27
+
28
+ }
@@ -0,0 +1,219 @@
1
+ /*
2
+ * Confirm modal — Diseño desde Figma Tokens (node 323-2101).
3
+ * Tokens: --app-dialogs-basic-*, --app-colors-*, --app-font-*, --app-shape-*.
4
+ */
5
+ .confirm-modal {
6
+ --confirm-container-color: var(--app-dialogs-basic-enabled-container-dialog-container-color, #f7fafc);
7
+ --confirm-container-elevation: var(--app-dialogs-basic-enabled-container-dialog-container-elevation, 6);
8
+ --confirm-container-shape: var(--app-dialogs-basic-enabled-container-dialog-container-shape, 28);
9
+ --confirm-headline-color: var(--app-dialogs-basic-enabled-headline-dialog-headline-color, #181c1e);
10
+ --confirm-headline-font: var(--app-dialogs-basic-enabled-headline-dialog-headline-font, Heebo);
11
+ --confirm-headline-size: var(--app-dialogs-basic-enabled-headline-dialog-headline-size, 24);
12
+ --confirm-headline-weight: var(--app-dialogs-basic-enabled-headline-dialog-headline-weight, 400);
13
+ --confirm-headline-line-height: var(--app-dialogs-basic-enabled-headline-dialog-headline-line-height, 32);
14
+ --confirm-supporting-color: var(--app-dialogs-basic-enabled-supporting-text-dialog-supporting-text-color, #434749);
15
+ --confirm-supporting-font: var(--app-dialogs-basic-enabled-supporting-text-dialog-supporting-text-font, Heebo);
16
+ --confirm-supporting-size: var(--app-dialogs-basic-enabled-supporting-text-dialog-supporting-text-size, 14);
17
+ --confirm-supporting-weight: var(--app-dialogs-basic-enabled-supporting-text-dialog-supporting-text-weight, 400);
18
+ --confirm-supporting-line-height: var(--app-dialogs-basic-enabled-supporting-text-dialog-supporting-text-line-height, 20);
19
+ --confirm-action-color: var(--app-dialogs-basic-enabled-label-text-dialog-action-label-text-color, #e42313);
20
+ --confirm-action-font: var(--app-dialogs-basic-enabled-label-text-dialog-action-label-text-font, Heebo);
21
+ --confirm-action-size: var(--app-dialogs-basic-enabled-label-text-dialog-action-label-text-size, 14);
22
+ --confirm-action-weight: var(--app-dialogs-basic-enabled-label-text-dialog-action-label-text-weight, 500);
23
+ --confirm-primary: var(--app-colors-rojo-primary-rojo-50, #e42313);
24
+ --confirm-primary-hover: var(--app-colors-rojo-primary-rojo-40, #bf0600);
25
+ --confirm-primary-on: var(--app-colors-rojo-primary-rojo-100, #ffffff);
26
+ --confirm-btn-shape: var(--app-shape-large, 16);
27
+
28
+ display: flex;
29
+ width: 100%;
30
+ background: var(--confirm-container-color);
31
+ border-radius: calc(var(--confirm-container-shape) * 1px);
32
+ box-shadow:
33
+ 0 1px 3px 0 rgba(0, 0, 0, 0.3),
34
+ 0 4px 8px 3px rgba(0, 0, 0, 0.15);
35
+ min-width: 280px;
36
+ max-width: 560px;
37
+ }
38
+
39
+ .confirm-modal__container {
40
+ display: flex;
41
+ padding: 1.5rem 1.5rem 1.25rem 1.5rem;
42
+ flex-direction: column;
43
+ align-items: flex-start;
44
+ gap: 1.25rem;
45
+ align-self: stretch;
46
+ width: 100%;
47
+ }
48
+
49
+ .confirm-modal__top-icon {
50
+ width: 100%;
51
+ display: flex;
52
+ justify-content: center;
53
+ color: #5f6368;
54
+ }
55
+
56
+ .confirm-modal__top-icon .mat-icon {
57
+ width: 1.5rem;
58
+ height: 1.5rem;
59
+ font-size: 1.5rem;
60
+ }
61
+
62
+ .confirm-modal__header {
63
+ display: flex;
64
+ flex-direction: column;
65
+ gap: 1rem;
66
+ align-items: flex-start;
67
+ align-self: stretch;
68
+ width: 100%;
69
+ }
70
+
71
+ .confirm-modal__title {
72
+ align-self: stretch;
73
+ color: var(--confirm-headline-color);
74
+ font-family: var(--confirm-headline-font), var(--app-font-type-brand, Heebo), sans-serif;
75
+ font-size: calc(var(--confirm-headline-size) * 1px);
76
+ font-weight: var(--confirm-headline-weight);
77
+ line-height: calc(var(--confirm-headline-line-height) * 1px);
78
+ text-align: start;
79
+ margin: 0;
80
+ }
81
+
82
+ .confirm-modal__reference,
83
+ .confirm-modal__content {
84
+ align-self: stretch;
85
+ width: 100%;
86
+ color: var(--confirm-supporting-color);
87
+ font-family: var(--confirm-supporting-font), var(--app-font-type-plain, Heebo), sans-serif;
88
+ font-size: calc(var(--confirm-supporting-size) * 1px);
89
+ font-weight: var(--confirm-supporting-weight);
90
+ line-height: calc(var(--confirm-supporting-line-height) * 1px);
91
+ text-align: start;
92
+ margin: 0;
93
+ }
94
+
95
+ .confirm-modal__list {
96
+ width: 100%;
97
+ border-top: 1px solid #c4c7c5;
98
+ border-bottom: 1px solid #c4c7c5;
99
+ }
100
+
101
+ .confirm-modal__list--scrollable {
102
+ max-height: 14rem;
103
+ overflow-y: auto;
104
+ }
105
+
106
+ .confirm-modal__list-item {
107
+ width: 100%;
108
+ display: grid;
109
+ grid-template-columns: 2.5rem 1fr auto auto;
110
+ align-items: center;
111
+ gap: 0.75rem;
112
+ border: 0;
113
+ border-bottom: 1px solid #c4c7c5;
114
+ background: transparent;
115
+ padding: 0.75rem 0;
116
+ text-align: left;
117
+ cursor: pointer;
118
+ }
119
+
120
+ .confirm-modal__list-item:last-child {
121
+ border-bottom: 0;
122
+ }
123
+
124
+ .confirm-modal__list-item-leading-icon {
125
+ color: #1f2328;
126
+ width: 1.25rem;
127
+ height: 1.25rem;
128
+ font-size: 1.25rem;
129
+ }
130
+
131
+ .confirm-modal__list-item-label {
132
+ color: #1d1b20;
133
+ font-size: 1.125rem;
134
+ line-height: 1.5rem;
135
+ font-weight: 400;
136
+ }
137
+
138
+ .confirm-modal__list-item-amount {
139
+ color: #5f6368;
140
+ font-size: 0.75rem;
141
+ line-height: 1rem;
142
+ }
143
+
144
+ .confirm-modal__list-item-check {
145
+ color: #1f2328;
146
+ width: 1.25rem;
147
+ height: 1.25rem;
148
+ font-size: 1.25rem;
149
+ }
150
+
151
+ .confirm-modal__actions {
152
+ display: flex;
153
+ flex-direction: row;
154
+ align-items: flex-end;
155
+ align-self: stretch;
156
+ width: 100%;
157
+ min-width: 0;
158
+ justify-content: flex-end;
159
+ gap: 0.5rem;
160
+ }
161
+
162
+ .confirm-modal__actions > * {
163
+ display: flex;
164
+ width: auto;
165
+ align-self: flex-end;
166
+ }
167
+
168
+ .confirm-modal__btn {
169
+ display: inline-flex;
170
+ align-items: center;
171
+ justify-content: center;
172
+ padding: 1rem 1.5rem;
173
+ min-width: 120px;
174
+ font-family: var(--confirm-action-font), var(--app-font-type-brand, Heebo), sans-serif;
175
+ font-size: calc(var(--confirm-action-size) * 1px);
176
+ font-weight: var(--confirm-action-weight);
177
+ line-height: 1.25;
178
+ border-radius: calc(var(--confirm-btn-shape) * 1px);
179
+ border: none;
180
+ cursor: pointer;
181
+ transition: background-color 0.2s, color 0.2s, border-color 0.2s;
182
+ box-shadow: none;
183
+ outline: none;
184
+ }
185
+
186
+ .confirm-modal__btn:focus-visible {
187
+ outline: 2px solid var(--confirm-primary);
188
+ outline-offset: 2px;
189
+ }
190
+
191
+ .confirm-modal__btn--cancel {
192
+ flex: 1;
193
+ max-width: 180px;
194
+ background: var(--confirm-container-color);
195
+ color: var(--confirm-action-color);
196
+ border: 1px solid var(--confirm-action-color);
197
+ }
198
+
199
+ .confirm-modal__btn--cancel:hover,
200
+ .confirm-modal__btn--cancel:focus,
201
+ .confirm-modal__btn--cancel:active {
202
+ background: var(--confirm-container-color);
203
+ color: var(--confirm-primary-hover);
204
+ border-color: var(--confirm-primary-hover);
205
+ }
206
+
207
+ .confirm-modal__btn--confirm {
208
+ flex: 1;
209
+ max-width: 180px;
210
+ background: var(--confirm-primary);
211
+ color: var(--confirm-primary-on);
212
+ }
213
+
214
+ .confirm-modal__btn--confirm:hover,
215
+ .confirm-modal__btn--confirm:focus,
216
+ .confirm-modal__btn--confirm:active {
217
+ background: var(--confirm-primary-hover);
218
+ color: var(--confirm-primary-on);
219
+ }
@@ -0,0 +1,60 @@
1
+ <div
2
+ class="confirm-modal"
3
+ role="dialog"
4
+ aria-modal="true"
5
+ aria-labelledby="confirm-modal-title"
6
+ [attr.aria-describedby]="supportingText || isListVariant ? 'confirm-modal-desc' : null"
7
+ >
8
+ <div class="confirm-modal__container">
9
+ @if (data.showTopIcon) {
10
+ <div class="confirm-modal__top-icon" aria-hidden="true">
11
+ <mat-icon>{{ topIconName }}</mat-icon>
12
+ </div>
13
+ }
14
+
15
+ <header class="confirm-modal__header">
16
+ <h2 id="confirm-modal-title" class="confirm-modal__title">{{ data.title }}</h2>
17
+ @if (supportingText) {
18
+ <p id="confirm-modal-desc" class="confirm-modal__reference">{{ supportingText }}</p>
19
+ }
20
+ </header>
21
+
22
+ @if (isListVariant) {
23
+ <div
24
+ class="confirm-modal__list"
25
+ [class.confirm-modal__list--scrollable]="isScrollableList"
26
+ [attr.id]="!supportingText ? 'confirm-modal-desc' : null"
27
+ >
28
+ @for (item of listItems(); track item.id) {
29
+ <button type="button" class="confirm-modal__list-item" (click)="toggleListItem(item.id)">
30
+ <mat-icon class="confirm-modal__list-item-leading-icon" aria-hidden="true">error_outline</mat-icon>
31
+ <span class="confirm-modal__list-item-label">{{ item.label }}</span>
32
+ @if (item.amount) {
33
+ <span class="confirm-modal__list-item-amount">{{ item.amount }}</span>
34
+ }
35
+ <mat-icon class="confirm-modal__list-item-check" aria-hidden="true">
36
+ {{ item.selected ? 'check_box' : 'check_box_outline_blank' }}
37
+ </mat-icon>
38
+ </button>
39
+ }
40
+ </div>
41
+ }
42
+
43
+ <div class="confirm-modal__actions">
44
+ <lib-button
45
+ type="button"
46
+ variant="text"
47
+ (click)="onCancel()"
48
+ [label]="labelButtonCancel"
49
+ contentAlign="center"
50
+ ></lib-button>
51
+ <lib-button
52
+ type="button"
53
+ variant="text"
54
+ (click)="onConfirm()"
55
+ [label]="data.labelButtonConfirm"
56
+ contentAlign="center"
57
+ ></lib-button>
58
+ </div>
59
+ </div>
60
+ </div>