valtech-components 2.0.720 → 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/esm2022/lib/services/confirmation-dialog/confirmation-dialog.service.mjs +3 -10
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +3 -10
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/lib/components/styles/alert.scss +43 -33
package/lib/version.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,20 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* val-alert — Estilo unificado para ion-alert
|
|
2
|
+
* val-alert — Estilo unificado para ion-alert.
|
|
3
3
|
*
|
|
4
4
|
* Inspirado en iOS native UIAlertController:
|
|
5
5
|
* - Backdrop con blur
|
|
6
|
-
* - Wrapper translúcido
|
|
7
|
-
* - Botones pill apilados,
|
|
8
|
-
* -
|
|
6
|
+
* - Wrapper translúcido con bordes redondeados
|
|
7
|
+
* - Botones pill apilados, full-width
|
|
8
|
+
* - **Sin colores**: todos los botones neutros (incluido destructive)
|
|
9
|
+
* - Adapta light/dark via prefers-color-scheme con fallbacks explícitos
|
|
9
10
|
*
|
|
10
11
|
* Aplicado por default desde ConfirmationDialogService.
|
|
11
|
-
* Override añadiendo otra cssClass al alert.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
ion-alert.val-alert {
|
|
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 */
|
|
15
26
|
--backdrop-opacity: 0.4;
|
|
27
|
+
--background: var(--val-alert-bg);
|
|
16
28
|
|
|
17
|
-
/* Backdrop con blur */
|
|
18
29
|
&::part(backdrop) {
|
|
19
30
|
background: rgba(0, 0, 0, 0.4);
|
|
20
31
|
backdrop-filter: blur(8px);
|
|
@@ -22,13 +33,12 @@ ion-alert.val-alert {
|
|
|
22
33
|
}
|
|
23
34
|
|
|
24
35
|
.alert-wrapper {
|
|
25
|
-
background: rgba(28, 28, 30, 0.92);
|
|
26
|
-
backdrop-filter: blur(40px) saturate(180%);
|
|
27
|
-
-webkit-backdrop-filter: blur(40px) saturate(180%);
|
|
28
36
|
border-radius: 16px;
|
|
29
|
-
border: 1px solid
|
|
30
|
-
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.
|
|
37
|
+
border: 1px solid var(--val-alert-border);
|
|
38
|
+
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
|
|
31
39
|
overflow: hidden;
|
|
40
|
+
backdrop-filter: blur(40px) saturate(180%);
|
|
41
|
+
-webkit-backdrop-filter: blur(40px) saturate(180%);
|
|
32
42
|
}
|
|
33
43
|
|
|
34
44
|
.alert-head {
|
|
@@ -37,27 +47,26 @@ ion-alert.val-alert {
|
|
|
37
47
|
}
|
|
38
48
|
|
|
39
49
|
.alert-title {
|
|
40
|
-
color:
|
|
50
|
+
color: var(--val-alert-text);
|
|
41
51
|
font-weight: 700;
|
|
42
52
|
font-size: 17px;
|
|
43
53
|
line-height: 1.3;
|
|
44
54
|
}
|
|
45
55
|
|
|
46
56
|
.alert-sub-title {
|
|
47
|
-
color:
|
|
57
|
+
color: var(--val-alert-text-muted);
|
|
48
58
|
font-size: 14px;
|
|
49
59
|
margin-top: 4px;
|
|
50
60
|
}
|
|
51
61
|
|
|
52
62
|
.alert-message {
|
|
53
|
-
color:
|
|
63
|
+
color: var(--val-alert-text-muted);
|
|
54
64
|
font-size: 14px;
|
|
55
65
|
line-height: 1.4;
|
|
56
66
|
padding: 0 20px 16px;
|
|
57
67
|
text-align: center;
|
|
58
68
|
}
|
|
59
69
|
|
|
60
|
-
/* Grupo de botones */
|
|
61
70
|
.alert-button-group {
|
|
62
71
|
flex-direction: column !important;
|
|
63
72
|
padding: 8px;
|
|
@@ -66,16 +75,15 @@ ion-alert.val-alert {
|
|
|
66
75
|
border-top: none;
|
|
67
76
|
}
|
|
68
77
|
|
|
69
|
-
/* Cada botón */
|
|
70
78
|
button.alert-button {
|
|
71
79
|
flex: 0 0 auto;
|
|
72
80
|
width: 100%;
|
|
73
81
|
margin: 0;
|
|
74
82
|
padding: 14px 20px;
|
|
75
83
|
border-radius: 12px;
|
|
76
|
-
background:
|
|
77
|
-
border: 1px solid
|
|
78
|
-
color:
|
|
84
|
+
background: var(--val-alert-btn-bg);
|
|
85
|
+
border: 1px solid var(--val-alert-btn-border);
|
|
86
|
+
color: var(--val-alert-text);
|
|
79
87
|
font-weight: 600;
|
|
80
88
|
font-size: 16px;
|
|
81
89
|
text-transform: none;
|
|
@@ -89,11 +97,11 @@ ion-alert.val-alert {
|
|
|
89
97
|
}
|
|
90
98
|
|
|
91
99
|
&:hover {
|
|
92
|
-
background:
|
|
100
|
+
background: var(--val-alert-btn-bg-hover);
|
|
93
101
|
}
|
|
94
102
|
|
|
95
103
|
&:active {
|
|
96
|
-
background:
|
|
104
|
+
background: var(--val-alert-btn-bg-active);
|
|
97
105
|
}
|
|
98
106
|
|
|
99
107
|
.alert-button-inner {
|
|
@@ -103,20 +111,22 @@ ion-alert.val-alert {
|
|
|
103
111
|
}
|
|
104
112
|
}
|
|
105
113
|
|
|
106
|
-
/* Botón destructivo: solo el texto en rojo, fondo neutro */
|
|
107
|
-
&.val-alert--destructive button.alert-button[aria-label],
|
|
108
|
-
button.alert-button.alert-button-role-destructive,
|
|
109
|
-
button.alert-button[role='destructive'] {
|
|
110
|
-
color: #ff453a; /* iOS systemRed dark */
|
|
111
|
-
|
|
112
|
-
.alert-button-inner {
|
|
113
|
-
color: #ff453a;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/* Cancel button: ligeramente menos prominente */
|
|
118
114
|
button.alert-button.alert-button-role-cancel,
|
|
119
115
|
button.alert-button[role='cancel'] {
|
|
120
116
|
font-weight: 500;
|
|
121
117
|
}
|
|
122
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
|
+
}
|