crdx-components 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/fesm2022/crdx-components.mjs +1960 -0
  2. package/fesm2022/crdx-components.mjs.map +1 -0
  3. package/package.json +28 -23
  4. package/src/lib/styles/index.scss +1 -0
  5. package/src/lib/styles/overrides/_index.scss +2 -4
  6. package/src/lib/styles/overrides/_mat-button-overrides.scss +0 -11
  7. package/src/lib/styles/overrides/_mat-checkbox-overrides.scss +2 -2
  8. package/src/lib/styles/overrides/_mat-radio-overrides.scss +40 -0
  9. package/types/crdx-components.d.ts +811 -0
  10. package/types/crdx-components.d.ts.map +1 -0
  11. package/.github/workflows/publish.yml +0 -38
  12. package/bun.lock +0 -491
  13. package/crdx-components-1.0.0.tgz +0 -0
  14. package/crdx-components-tokenized-components-1.0.1.tgz +0 -0
  15. package/ng-package.json +0 -12
  16. package/npm +0 -0
  17. package/src/index.ts +0 -45
  18. package/src/lib/components/breadcrumb/breadcrumb.component.css +0 -206
  19. package/src/lib/components/breadcrumb/breadcrumb.component.html +0 -15
  20. package/src/lib/components/breadcrumb/breadcrumb.component.ts +0 -47
  21. package/src/lib/components/button/button.css +0 -371
  22. package/src/lib/components/button/button.html +0 -187
  23. package/src/lib/components/button/button.ts +0 -103
  24. package/src/lib/components/card/card.css +0 -285
  25. package/src/lib/components/card/card.html +0 -69
  26. package/src/lib/components/card/card.ts +0 -93
  27. package/src/lib/components/checkbox/checkbox-showcase.component.css +0 -42
  28. package/src/lib/components/checkbox/checkbox-showcase.component.html +0 -36
  29. package/src/lib/components/checkbox/checkbox-showcase.component.ts +0 -13
  30. package/src/lib/components/checkbox/checkbox.css +0 -10
  31. package/src/lib/components/checkbox/checkbox.html +0 -13
  32. package/src/lib/components/checkbox/checkbox.ts +0 -64
  33. package/src/lib/components/circular-progress-stepper/circular-progress-stepper.css +0 -89
  34. package/src/lib/components/circular-progress-stepper/circular-progress-stepper.html +0 -23
  35. package/src/lib/components/circular-progress-stepper/circular-progress-stepper.ts +0 -40
  36. package/src/lib/components/dialogs/alert-modal/alert-modal.css +0 -118
  37. package/src/lib/components/dialogs/alert-modal/alert-modal.html +0 -29
  38. package/src/lib/components/dialogs/alert-modal/alert-modal.ts +0 -28
  39. package/src/lib/components/dialogs/confirm-modal/confirm-modal.css +0 -219
  40. package/src/lib/components/dialogs/confirm-modal/confirm-modal.html +0 -60
  41. package/src/lib/components/dialogs/confirm-modal/confirm-modal.store.ts +0 -139
  42. package/src/lib/components/dialogs/confirm-modal/confirm-modal.ts +0 -63
  43. package/src/lib/components/dialogs/container-custom/container-custom.css +0 -11
  44. package/src/lib/components/dialogs/container-custom/container-custom.html +0 -3
  45. package/src/lib/components/dialogs/container-custom/container-custom.ts +0 -37
  46. package/src/lib/components/dialogs/container-custom/custom-modal.state.ts +0 -57
  47. package/src/lib/components/dialogs/error-modal/error-modal.css +0 -53
  48. package/src/lib/components/dialogs/error-modal/error-modal.html +0 -17
  49. package/src/lib/components/dialogs/error-modal/error-modal.ts +0 -20
  50. package/src/lib/components/dialogs/side-modal/side-modal.css +0 -80
  51. package/src/lib/components/dialogs/side-modal/side-modal.html +0 -30
  52. package/src/lib/components/dialogs/side-modal/side-modal.state.ts +0 -78
  53. package/src/lib/components/dialogs/side-modal/side-modal.ts +0 -50
  54. package/src/lib/components/divider/divider.css +0 -24
  55. package/src/lib/components/divider/divider.html +0 -7
  56. package/src/lib/components/divider/divider.ts +0 -13
  57. package/src/lib/components/footer-actions/footer/footer-flow.store.ts +0 -30
  58. package/src/lib/components/footer-actions/footer/footer.html +0 -14
  59. package/src/lib/components/footer-actions/footer/footer.ts +0 -50
  60. package/src/lib/components/footer-actions/modal-footer-actions/modal-footer-actions.css +0 -44
  61. package/src/lib/components/footer-actions/modal-footer-actions/modal-footer-actions.html +0 -7
  62. package/src/lib/components/footer-actions/modal-footer-actions/modal-footer-actions.ts +0 -12
  63. package/src/lib/components/footer-actions/page-footer-actions/page-footer-actions.css +0 -31
  64. package/src/lib/components/footer-actions/page-footer-actions/page-footer-actions.html +0 -7
  65. package/src/lib/components/footer-actions/page-footer-actions/page-footer-actions.ts +0 -12
  66. package/src/lib/components/form-field/select-field.css +0 -178
  67. package/src/lib/components/form-field/select-field.html +0 -94
  68. package/src/lib/components/form-field/select-field.ts +0 -324
  69. package/src/lib/components/form-field/text-field.css +0 -41
  70. package/src/lib/components/form-field/text-field.html +0 -38
  71. package/src/lib/components/form-field/text-field.ts +0 -102
  72. package/src/lib/components/header/header.css +0 -142
  73. package/src/lib/components/header/header.html +0 -36
  74. package/src/lib/components/header/header.ts +0 -101
  75. package/src/lib/components/icon-button/icon-button.css +0 -445
  76. package/src/lib/components/icon-button/icon-button.html +0 -15
  77. package/src/lib/components/icon-button/icon-button.ts +0 -49
  78. package/src/lib/components/list-item/list-item.css +0 -122
  79. package/src/lib/components/list-item/list-item.html +0 -79
  80. package/src/lib/components/list-item/list-item.ts +0 -104
  81. package/src/lib/components/menu/menu.css +0 -39
  82. package/src/lib/components/menu/menu.html +0 -57
  83. package/src/lib/components/menu/menu.ts +0 -159
  84. package/src/lib/components/shared-table/shared-table-cell-template.directive.ts +0 -25
  85. package/src/lib/components/shared-table/shared-table.component.css +0 -223
  86. package/src/lib/components/shared-table/shared-table.component.html +0 -96
  87. package/src/lib/components/shared-table/shared-table.component.ts +0 -172
  88. package/src/lib/components/sidebar/sidebar.css +0 -234
  89. package/src/lib/components/sidebar/sidebar.html +0 -67
  90. package/src/lib/components/sidebar/sidebar.ts +0 -92
  91. package/src/lib/components/slide-toggle/slide-toggle.css +0 -0
  92. package/src/lib/components/slide-toggle/slide-toggle.html +0 -3
  93. package/src/lib/components/slide-toggle/slide-toggle.ts +0 -18
  94. package/src/lib/components/spinner/spinner.css +0 -9
  95. package/src/lib/components/spinner/spinner.html +0 -9
  96. package/src/lib/components/spinner/spinner.ts +0 -17
  97. package/src/lib/components/tooltip/tooltip.css +0 -32
  98. package/src/lib/components/tooltip/tooltip.html +0 -3
  99. package/src/lib/components/tooltip/tooltip.ts +0 -31
  100. package/src/lib/icons/register-icons.ts +0 -101
  101. package/src/lib/lib-ui/lib-ui.html +0 -1
  102. package/src/lib/lib-ui/lib-ui.scss +0 -0
  103. package/src/lib/lib-ui/lib-ui.ts +0 -9
  104. package/tsconfig.json +0 -30
  105. package/tsconfig.lib.json +0 -20
@@ -1,93 +0,0 @@
1
- import {
2
- ChangeDetectionStrategy,
3
- Component,
4
- computed,
5
- input,
6
- output,
7
- } from '@angular/core';
8
- import { NgClass } from '@angular/common';
9
-
10
- export type LibCardVariant = 'outlined' | 'elevated' | 'filled';
11
- export type LibCardState = 'enabled' | 'hovered' | 'focused' | 'pressed' | 'dragged';
12
- export type LibCardLeadingKind = 'avatar' | 'icon';
13
-
14
- @Component({
15
- selector: 'lib-card',
16
- standalone: true,
17
- imports: [NgClass],
18
- templateUrl: './card.html',
19
- styleUrl: './card.css',
20
- changeDetection: ChangeDetectionStrategy.OnPush,
21
- host: {
22
- '[class.lib-card-host--full-width]': 'fullWidth()',
23
- },
24
- })
25
- export class LibCardComponent {
26
- title = input('Header');
27
- subhead = input('');
28
- variant = input<LibCardVariant>('outlined');
29
- state = input<LibCardState>('enabled');
30
- leadingKind = input<LibCardLeadingKind>('avatar');
31
- leadingIcon = input<string>('');
32
- /** Tamaño del contenedor leading (Figma suele usar 2.5rem). */
33
- leadingContainerSize = input('2.5rem');
34
- /** Tamaño del icono leading. */
35
- leadingIconSize = input('2.08331rem');
36
- mediaIcon = input<string>('');
37
- mediaAlt = input('Card media');
38
- showMedia = input(false);
39
- avatarText = input('');
40
- width = input('20.5rem');
41
- /** Alto del card. */
42
- height = input('4.5rem');
43
- /** Si es true, el card toma el 100% del ancho del contenedor padre. */
44
- fullWidth = input(false);
45
- active = input(false);
46
- disabled = input(false);
47
-
48
- readonly cardClick = output<void>();
49
-
50
- readonly initial = computed(() => {
51
- const text = this.avatarText().trim();
52
- if (text.length) return text.slice(0, 1).toUpperCase();
53
- const title = this.title().trim();
54
- return title.length ? title.slice(0, 1).toUpperCase() : 'A';
55
- });
56
-
57
- readonly hasMedia = computed(() => this.mediaIcon().trim().length > 0);
58
- readonly isMediaImage = computed(() => this.mediaIcon().trim().endsWith('.svg'));
59
- readonly hasLeadingIcon = computed(() => this.leadingIcon().trim().length > 0);
60
- readonly isLeadingImage = computed(() => this.leadingIcon().trim().endsWith('.svg'));
61
- readonly hasSubhead = computed(() => this.subhead().trim().length > 0);
62
-
63
- readonly classes = computed(() => ({
64
- 'ui-card': true,
65
- 'ui-card--outlined': this.variant() === 'outlined',
66
- 'ui-card--elevated': this.variant() === 'elevated',
67
- 'ui-card--filled': this.variant() === 'filled',
68
- 'ui-card--state-enabled': this.state() === 'enabled',
69
- 'ui-card--state-hovered': this.state() === 'hovered',
70
- 'ui-card--state-focused': this.state() === 'focused',
71
- 'ui-card--state-pressed': this.state() === 'pressed',
72
- 'ui-card--state-dragged': this.state() === 'dragged',
73
- 'ui-card--leading-avatar': this.leadingKind() === 'avatar',
74
- 'ui-card--leading-icon': this.leadingKind() === 'icon',
75
- 'ui-card--with-media': this.showMedia() && this.hasMedia(),
76
- 'ui-card--title-emphasized': !this.hasSubhead(),
77
- 'ui-card--active': this.active(),
78
- 'ui-card--disabled': this.disabled(),
79
- }));
80
-
81
- onCardClick(): void {
82
- if (this.disabled()) return;
83
- this.cardClick.emit();
84
- }
85
-
86
- onCardKeydown(event: KeyboardEvent): void {
87
- if (this.disabled()) return;
88
- if (event.code === 'Enter' || event.code === 'Space') {
89
- event.preventDefault();
90
- this.cardClick.emit();
91
- }
92
- }
93
- }
@@ -1,42 +0,0 @@
1
- .lib-checkbox-showcase {
2
- display: flex;
3
- flex-direction: column;
4
- gap: 1.5rem;
5
- }
6
-
7
- .lib-checkbox-showcase__title {
8
- margin: 0 0 0.5rem;
9
- font-size: 1.25rem;
10
- font-weight: 600;
11
- }
12
-
13
- .lib-checkbox-showcase__group {
14
- display: flex;
15
- flex-direction: column;
16
- gap: 0.5rem;
17
- }
18
-
19
- .lib-checkbox-showcase__group > h3 {
20
- margin: 0;
21
- font-size: 1rem;
22
- font-weight: 500;
23
- }
24
-
25
- .lib-checkbox-showcase__hint {
26
- margin: 0;
27
- font-size: 0.875rem;
28
- color: #696d6f;
29
- }
30
-
31
- .lib-checkbox-showcase__row {
32
- display: flex;
33
- flex-wrap: wrap;
34
- align-items: center;
35
- gap: 1rem 2.5rem;
36
- }
37
-
38
- .lib-checkbox-showcase__row lib-checkbox {
39
- display: inline-flex;
40
- align-items: center;
41
- gap: 0.5rem;
42
- }
@@ -1,36 +0,0 @@
1
- <section class="lib-checkbox-showcase">
2
- <h2 class="lib-checkbox-showcase__title">Checkbox – estados (tokens Figma)</h2>
3
-
4
- <div class="lib-checkbox-showcase__group">
5
- <h3>Enabled</h3>
6
- <div class="lib-checkbox-showcase__row">
7
- <lib-checkbox>Unselected</lib-checkbox>
8
- <lib-checkbox [checked]="true">Selected</lib-checkbox>
9
- <lib-checkbox [indeterminate]="true">Indeterminate</lib-checkbox>
10
- <lib-checkbox [error]="true">Error (unselected)</lib-checkbox>
11
- <lib-checkbox [checked]="true" [error]="true">Error (selected)</lib-checkbox>
12
- </div>
13
- </div>
14
-
15
- <div class="lib-checkbox-showcase__group">
16
- <h3>Disabled</h3>
17
- <div class="lib-checkbox-showcase__row">
18
- <lib-checkbox [disabled]="true">Unselected</lib-checkbox>
19
- <lib-checkbox [disabled]="true" [checked]="true">Selected</lib-checkbox>
20
- <lib-checkbox [disabled]="true" [indeterminate]="true">Indeterminate</lib-checkbox>
21
- </div>
22
- </div>
23
-
24
- <div class="lib-checkbox-showcase__group">
25
- <h3>Interactive (hover / pressed)</h3>
26
- <p class="lib-checkbox-showcase__hint">
27
- Pasa el mouse y haz click para ver hover / pressed según tokens de Figma.
28
- </p>
29
- <div class="lib-checkbox-showcase__row">
30
- <lib-checkbox>Unselected (hover / pressed)</lib-checkbox>
31
- <lib-checkbox [checked]="true">Selected (hover / pressed)</lib-checkbox>
32
- <lib-checkbox [indeterminate]="true">Indeterminate (hover / pressed)</lib-checkbox>
33
- </div>
34
- </div>
35
- </section>
36
-
@@ -1,13 +0,0 @@
1
- import { ChangeDetectionStrategy, Component } from '@angular/core';
2
- import { LibCheckboxComponent } from './checkbox';
3
-
4
- @Component({
5
- selector: 'lib-checkbox-showcase',
6
- standalone: true,
7
- imports: [LibCheckboxComponent],
8
- templateUrl: './checkbox-showcase.component.html',
9
- styleUrls: ['./checkbox-showcase.component.css'],
10
- changeDetection: ChangeDetectionStrategy.OnPush,
11
- })
12
- export class LibCheckboxShowcaseComponent {}
13
-
@@ -1,10 +0,0 @@
1
- /* Wrapper del mat-checkbox; solo ripple nativo de Material */
2
- .lib-checkbox__wrapper {
3
- position: relative;
4
- display: inline-flex;
5
- }
6
-
7
- .lib-checkbox__wrapper .mat-mdc-checkbox {
8
- position: relative;
9
- z-index: 1;
10
- }
@@ -1,13 +0,0 @@
1
- <div
2
- class="lib-checkbox__wrapper"
3
- [class.lib-checkbox--disabled]="disabled()"
4
- >
5
- <mat-checkbox
6
- [checked]="checked()"
7
- [indeterminate]="indeterminate()"
8
- [disabled]="disabled()"
9
- (change)="onMatCheckboxChange($event)"
10
- >
11
- <ng-content />
12
- </mat-checkbox>
13
- </div>
@@ -1,64 +0,0 @@
1
- import {
2
- ChangeDetectionStrategy,
3
- Component,
4
- input,
5
- output,
6
- computed,
7
- HostBinding,
8
- } from '@angular/core';
9
- import { MatCheckboxChange } from '@angular/material/checkbox';
10
- import { MatCheckboxModule } from '@angular/material/checkbox';
11
-
12
- @Component({
13
- selector: 'lib-checkbox',
14
- standalone: true,
15
- imports: [MatCheckboxModule],
16
- templateUrl: './checkbox.html',
17
- styleUrl: './checkbox.css',
18
- changeDetection: ChangeDetectionStrategy.OnPush,
19
- })
20
- export class LibCheckboxComponent {
21
- checked = input(false);
22
- indeterminate = input(false);
23
- disabled = input(false);
24
- error = input(false);
25
- /** Id para asociar label (accesibilidad). Si no se pasa, se genera uno interno. */
26
- labelId = input<string | null>(null);
27
-
28
- readonly checkedChange = output<boolean>();
29
- readonly indeterminateChange = output<boolean>();
30
-
31
- @HostBinding('attr.aria-disabled') get ariaDisabled(): boolean | null {
32
- return this.disabled() ? true : null;
33
- }
34
-
35
- protected readonly ariaChecked = computed(() => {
36
- if (this.indeterminate()) return 'mixed';
37
- return this.checked() ? 'true' : 'false';
38
- });
39
-
40
- protected onAction(event: Event): void {
41
- event.preventDefault();
42
- if (this.disabled()) return;
43
- if (this.indeterminate()) {
44
- this.indeterminateChange.emit(false);
45
- this.checkedChange.emit(true);
46
- } else {
47
- this.checkedChange.emit(!this.checked());
48
- }
49
- }
50
-
51
- protected onKeydown(event: KeyboardEvent): void {
52
- if (event.key === ' ' || event.key === 'Enter') {
53
- event.preventDefault();
54
- this.onAction(event);
55
- }
56
- }
57
-
58
- protected onMatCheckboxChange(event: MatCheckboxChange): void {
59
- this.checkedChange.emit(event.checked);
60
- if (event.checked && this.indeterminate()) {
61
- this.indeterminateChange.emit(false);
62
- }
63
- }
64
- }
@@ -1,89 +0,0 @@
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
-
@@ -1,23 +0,0 @@
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>
@@ -1,40 +0,0 @@
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
- }
@@ -1,118 +0,0 @@
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
- }
@@ -1,29 +0,0 @@
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>
@@ -1,28 +0,0 @@
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
- }