valtech-components 2.0.721 → 2.0.722

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/lib/version.d.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  * Current version of valtech-components.
3
3
  * This is automatically updated during the publish process.
4
4
  */
5
- export declare const VERSION = "2.0.721";
5
+ export declare const VERSION = "2.0.722";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "2.0.721",
3
+ "version": "2.0.722",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"
@@ -6,15 +6,25 @@
6
6
  * - Wrapper translúcido con bordes redondeados
7
7
  * - Botones pill apilados, full-width
8
8
  * - **Sin colores**: todos los botones neutros (incluido destructive)
9
- * - Adapta automáticamente light/dark via theme tokens de Ionic
9
+ * - Adapta light/dark via prefers-color-scheme con fallbacks explícitos
10
10
  *
11
11
  * Aplicado por default desde ConfirmationDialogService.
12
- * Override añadiendo otra cssClass al alert.
13
12
  */
14
13
 
15
14
  ion-alert.val-alert {
16
- /* Backdrop con blur */
15
+ /* Defaults light mode (variables locales del scope del alert) */
16
+ --val-alert-bg: var(--ion-background-color, #ffffff);
17
+ --val-alert-border: rgba(0, 0, 0, 0.08);
18
+ --val-alert-text: var(--ion-text-color, #000000);
19
+ --val-alert-text-muted: rgba(0, 0, 0, 0.62);
20
+ --val-alert-btn-bg: rgba(0, 0, 0, 0.05);
21
+ --val-alert-btn-bg-hover: rgba(0, 0, 0, 0.08);
22
+ --val-alert-btn-bg-active: rgba(0, 0, 0, 0.12);
23
+ --val-alert-btn-border: rgba(0, 0, 0, 0.06);
24
+
25
+ /* Backdrop */
17
26
  --backdrop-opacity: 0.4;
27
+ --background: var(--val-alert-bg);
18
28
 
19
29
  &::part(backdrop) {
20
30
  background: rgba(0, 0, 0, 0.4);
@@ -22,12 +32,9 @@ ion-alert.val-alert {
22
32
  -webkit-backdrop-filter: blur(8px);
23
33
  }
24
34
 
25
- /* Wrapper — usa theme tokens, adapta light/dark */
26
- --background: var(--ion-background-color, #ffffff);
27
-
28
35
  .alert-wrapper {
29
36
  border-radius: 16px;
30
- border: 1px solid var(--ion-color-step-100, rgba(0, 0, 0, 0.08));
37
+ border: 1px solid var(--val-alert-border);
31
38
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
32
39
  overflow: hidden;
33
40
  backdrop-filter: blur(40px) saturate(180%);
@@ -40,27 +47,26 @@ ion-alert.val-alert {
40
47
  }
41
48
 
42
49
  .alert-title {
43
- color: var(--ion-text-color, #000);
50
+ color: var(--val-alert-text);
44
51
  font-weight: 700;
45
52
  font-size: 17px;
46
53
  line-height: 1.3;
47
54
  }
48
55
 
49
56
  .alert-sub-title {
50
- color: var(--ion-color-step-600, rgba(0, 0, 0, 0.6));
57
+ color: var(--val-alert-text-muted);
51
58
  font-size: 14px;
52
59
  margin-top: 4px;
53
60
  }
54
61
 
55
62
  .alert-message {
56
- color: var(--ion-color-step-700, rgba(0, 0, 0, 0.7));
63
+ color: var(--val-alert-text-muted);
57
64
  font-size: 14px;
58
65
  line-height: 1.4;
59
66
  padding: 0 20px 16px;
60
67
  text-align: center;
61
68
  }
62
69
 
63
- /* Grupo de botones — apilado vertical */
64
70
  .alert-button-group {
65
71
  flex-direction: column !important;
66
72
  padding: 8px;
@@ -69,16 +75,15 @@ ion-alert.val-alert {
69
75
  border-top: none;
70
76
  }
71
77
 
72
- /* Cada botón — pill neutro, sin colores */
73
78
  button.alert-button {
74
79
  flex: 0 0 auto;
75
80
  width: 100%;
76
81
  margin: 0;
77
82
  padding: 14px 20px;
78
83
  border-radius: 12px;
79
- background: var(--ion-color-step-50, rgba(0, 0, 0, 0.04));
80
- border: 1px solid var(--ion-color-step-100, rgba(0, 0, 0, 0.08));
81
- color: var(--ion-text-color, #000);
84
+ background: var(--val-alert-btn-bg);
85
+ border: 1px solid var(--val-alert-btn-border);
86
+ color: var(--val-alert-text);
82
87
  font-weight: 600;
83
88
  font-size: 16px;
84
89
  text-transform: none;
@@ -92,11 +97,11 @@ ion-alert.val-alert {
92
97
  }
93
98
 
94
99
  &:hover {
95
- background: var(--ion-color-step-100, rgba(0, 0, 0, 0.08));
100
+ background: var(--val-alert-btn-bg-hover);
96
101
  }
97
102
 
98
103
  &:active {
99
- background: var(--ion-color-step-150, rgba(0, 0, 0, 0.12));
104
+ background: var(--val-alert-btn-bg-active);
100
105
  }
101
106
 
102
107
  .alert-button-inner {
@@ -106,9 +111,22 @@ ion-alert.val-alert {
106
111
  }
107
112
  }
108
113
 
109
- /* Cancel button: ligeramente menos prominente (font-weight) */
110
114
  button.alert-button.alert-button-role-cancel,
111
115
  button.alert-button[role='cancel'] {
112
116
  font-weight: 500;
113
117
  }
114
118
  }
119
+
120
+ /* Dark mode — overrides explícitos via prefers-color-scheme */
121
+ @media (prefers-color-scheme: dark) {
122
+ ion-alert.val-alert {
123
+ --val-alert-bg: var(--ion-background-color, #1c1c1e);
124
+ --val-alert-border: rgba(255, 255, 255, 0.08);
125
+ --val-alert-text: var(--ion-text-color, #ffffff);
126
+ --val-alert-text-muted: rgba(255, 255, 255, 0.7);
127
+ --val-alert-btn-bg: rgba(255, 255, 255, 0.06);
128
+ --val-alert-btn-bg-hover: rgba(255, 255, 255, 0.12);
129
+ --val-alert-btn-bg-active: rgba(255, 255, 255, 0.18);
130
+ --val-alert-btn-border: rgba(255, 255, 255, 0.06);
131
+ }
132
+ }