@softdin/shared 0.1.3 → 0.2.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/package.json +50 -50
- package/src/components/forms/FormMaximizeButton.vue +143 -143
- package/src/components/navigation/CatalogListPagination.vue +113 -113
- package/src/lib/catalog-pagination.ts +27 -27
- package/src/style.css +278 -278
- package/src/types/auth.ts +147 -146
- package/src/utils/apiError.ts +55 -55
- package/src/utils/connectivity.ts +33 -33
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
export const CATALOG_PAGE_SIZE = 50
|
|
2
|
-
|
|
3
|
-
export type CatalogPageResult<T> = {
|
|
4
|
-
pageItems: T[]
|
|
5
|
-
currentPage: number
|
|
6
|
-
lastPage: number
|
|
7
|
-
total: number
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/** Parte un arreglo en páginas (paginación en memoria). */
|
|
11
|
-
export function paginateCatalogItems<T>(
|
|
12
|
-
items: readonly T[],
|
|
13
|
-
page: number,
|
|
14
|
-
pageSize: number = CATALOG_PAGE_SIZE,
|
|
15
|
-
): CatalogPageResult<T> {
|
|
16
|
-
const total = items.length
|
|
17
|
-
const lastPage = Math.max(1, Math.ceil(total / pageSize) || 1)
|
|
18
|
-
const currentPage = Math.min(Math.max(1, page), lastPage)
|
|
19
|
-
const start = (currentPage - 1) * pageSize
|
|
20
|
-
|
|
21
|
-
return {
|
|
22
|
-
pageItems: items.slice(start, start + pageSize) as T[],
|
|
23
|
-
currentPage,
|
|
24
|
-
lastPage,
|
|
25
|
-
total,
|
|
26
|
-
}
|
|
27
|
-
}
|
|
1
|
+
export const CATALOG_PAGE_SIZE = 50
|
|
2
|
+
|
|
3
|
+
export type CatalogPageResult<T> = {
|
|
4
|
+
pageItems: T[]
|
|
5
|
+
currentPage: number
|
|
6
|
+
lastPage: number
|
|
7
|
+
total: number
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/** Parte un arreglo en páginas (paginación en memoria). */
|
|
11
|
+
export function paginateCatalogItems<T>(
|
|
12
|
+
items: readonly T[],
|
|
13
|
+
page: number,
|
|
14
|
+
pageSize: number = CATALOG_PAGE_SIZE,
|
|
15
|
+
): CatalogPageResult<T> {
|
|
16
|
+
const total = items.length
|
|
17
|
+
const lastPage = Math.max(1, Math.ceil(total / pageSize) || 1)
|
|
18
|
+
const currentPage = Math.min(Math.max(1, page), lastPage)
|
|
19
|
+
const start = (currentPage - 1) * pageSize
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
pageItems: items.slice(start, start + pageSize) as T[],
|
|
23
|
+
currentPage,
|
|
24
|
+
lastPage,
|
|
25
|
+
total,
|
|
26
|
+
}
|
|
27
|
+
}
|
package/src/style.css
CHANGED
|
@@ -1,278 +1,278 @@
|
|
|
1
|
-
@import 'tailwindcss';
|
|
2
|
-
|
|
3
|
-
@theme {
|
|
4
|
-
--color-brand-50: #f0fdf4;
|
|
5
|
-
--color-brand-100: #dcfce7;
|
|
6
|
-
--color-brand-500: #22c55e;
|
|
7
|
-
--color-brand-600: #16a34a;
|
|
8
|
-
--color-brand-700: #15803d;
|
|
9
|
-
--color-brand-800: #166534;
|
|
10
|
-
--color-surface: #f8fafc;
|
|
11
|
-
--color-sidebar: #14532d;
|
|
12
|
-
--color-text: #0f172a;
|
|
13
|
-
--color-text-muted: #64748b;
|
|
14
|
-
--color-panel: #ffffff;
|
|
15
|
-
--color-border: #e2e8f0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
:root {
|
|
19
|
-
--a11y-text-scale: 1;
|
|
20
|
-
--a11y-font-family: system-ui, 'Segoe UI', Roboto, sans-serif;
|
|
21
|
-
--a11y-line-height: 1.5;
|
|
22
|
-
--a11y-letter-spacing: 0;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
html {
|
|
26
|
-
font-size: calc(16px * var(--a11y-text-scale));
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
html,
|
|
30
|
-
body,
|
|
31
|
-
#app {
|
|
32
|
-
height: 100%;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
body {
|
|
36
|
-
margin: 0;
|
|
37
|
-
font-family: var(--a11y-font-family);
|
|
38
|
-
line-height: var(--a11y-line-height);
|
|
39
|
-
letter-spacing: var(--a11y-letter-spacing);
|
|
40
|
-
background: var(--color-surface);
|
|
41
|
-
color: var(--color-text);
|
|
42
|
-
-webkit-font-smoothing: antialiased;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.sr-only {
|
|
46
|
-
position: absolute;
|
|
47
|
-
width: 1px;
|
|
48
|
-
height: 1px;
|
|
49
|
-
padding: 0;
|
|
50
|
-
margin: -1px;
|
|
51
|
-
overflow: hidden;
|
|
52
|
-
clip: rect(0, 0, 0, 0);
|
|
53
|
-
white-space: nowrap;
|
|
54
|
-
border-width: 0;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/* Controles interactivos: cursor que indica acción */
|
|
58
|
-
button:not(:disabled),
|
|
59
|
-
[type='button']:not(:disabled),
|
|
60
|
-
[type='submit']:not(:disabled),
|
|
61
|
-
[type='reset']:not(:disabled),
|
|
62
|
-
select:not(:disabled),
|
|
63
|
-
input[type='checkbox']:not(:disabled),
|
|
64
|
-
input[type='radio']:not(:disabled),
|
|
65
|
-
input[type='file']:not(:disabled),
|
|
66
|
-
input[type='color']:not(:disabled),
|
|
67
|
-
input[type='range']:not(:disabled),
|
|
68
|
-
label[for]:not([aria-disabled='true']),
|
|
69
|
-
label:has(input:not(:disabled)),
|
|
70
|
-
label:has(select:not(:disabled)),
|
|
71
|
-
a[href],
|
|
72
|
-
summary,
|
|
73
|
-
[role='button']:not([aria-disabled='true']):not(:disabled),
|
|
74
|
-
[role='tab']:not([aria-disabled='true']),
|
|
75
|
-
[role='switch']:not(:disabled),
|
|
76
|
-
[role='menuitem']:not([aria-disabled='true']),
|
|
77
|
-
[role='option']:not([aria-disabled='true']) {
|
|
78
|
-
cursor: pointer;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/* Controles deshabilitados o solo lectura */
|
|
82
|
-
button:disabled,
|
|
83
|
-
select:disabled,
|
|
84
|
-
input:disabled,
|
|
85
|
-
textarea:disabled,
|
|
86
|
-
[aria-disabled='true'],
|
|
87
|
-
.input-field-disabled,
|
|
88
|
-
.input-field:disabled,
|
|
89
|
-
.input-field[readonly][disabled] {
|
|
90
|
-
cursor: not-allowed;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/* --- Tema oscuro --- */
|
|
94
|
-
html[data-a11y-theme='dark'] {
|
|
95
|
-
--color-brand-50: #052e16;
|
|
96
|
-
--color-brand-100: #14532d;
|
|
97
|
-
--color-brand-500: #4ade80;
|
|
98
|
-
--color-brand-600: #22c55e;
|
|
99
|
-
--color-brand-700: #16a34a;
|
|
100
|
-
--color-brand-800: #15803d;
|
|
101
|
-
--color-surface: #0b1220;
|
|
102
|
-
--color-sidebar: #052e16;
|
|
103
|
-
--color-text: #e2e8f0;
|
|
104
|
-
--color-text-muted: #94a3b8;
|
|
105
|
-
--color-panel: #111827;
|
|
106
|
-
--color-border: #334155;
|
|
107
|
-
color-scheme: dark;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
html[data-a11y-theme='dark'] body {
|
|
111
|
-
background: var(--color-surface);
|
|
112
|
-
color: var(--color-text);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
html[data-a11y-theme='dark'] .bg-white {
|
|
116
|
-
background-color: var(--color-panel) !important;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
html[data-a11y-theme='dark'] .bg-slate-50,
|
|
120
|
-
html[data-a11y-theme='dark'] .bg-gray-50 {
|
|
121
|
-
background-color: #0f172a !important;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
html[data-a11y-theme='dark'] .bg-slate-100,
|
|
125
|
-
html[data-a11y-theme='dark'] .bg-gray-100 {
|
|
126
|
-
background-color: #1e293b !important;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
html[data-a11y-theme='dark'] .bg-slate-200,
|
|
130
|
-
html[data-a11y-theme='dark'] .bg-gray-200 {
|
|
131
|
-
background-color: #334155 !important;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
html[data-a11y-theme='dark'] .text-slate-900,
|
|
135
|
-
html[data-a11y-theme='dark'] .text-gray-900,
|
|
136
|
-
html[data-a11y-theme='dark'] .text-black {
|
|
137
|
-
color: #f8fafc !important;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
html[data-a11y-theme='dark'] .text-slate-800,
|
|
141
|
-
html[data-a11y-theme='dark'] .text-gray-800 {
|
|
142
|
-
color: #e2e8f0 !important;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
html[data-a11y-theme='dark'] .text-slate-700,
|
|
146
|
-
html[data-a11y-theme='dark'] .text-gray-700 {
|
|
147
|
-
color: #cbd5e1 !important;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
html[data-a11y-theme='dark'] .text-slate-600,
|
|
151
|
-
html[data-a11y-theme='dark'] .text-gray-600 {
|
|
152
|
-
color: #94a3b8 !important;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
html[data-a11y-theme='dark'] .text-slate-500,
|
|
156
|
-
html[data-a11y-theme='dark'] .text-gray-500 {
|
|
157
|
-
color: #94a3b8 !important;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
html[data-a11y-theme='dark'] .text-slate-400,
|
|
161
|
-
html[data-a11y-theme='dark'] .text-gray-400 {
|
|
162
|
-
color: #64748b !important;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
html[data-a11y-theme='dark'] .border-slate-100,
|
|
166
|
-
html[data-a11y-theme='dark'] .border-gray-100,
|
|
167
|
-
html[data-a11y-theme='dark'] .border-slate-200,
|
|
168
|
-
html[data-a11y-theme='dark'] .border-gray-200,
|
|
169
|
-
html[data-a11y-theme='dark'] .divide-slate-100 > :not([hidden]) ~ :not([hidden]),
|
|
170
|
-
html[data-a11y-theme='dark'] .divide-slate-200 > :not([hidden]) ~ :not([hidden]) {
|
|
171
|
-
border-color: var(--color-border) !important;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
html[data-a11y-theme='dark'] .ring-slate-200,
|
|
175
|
-
html[data-a11y-theme='dark'] .ring-gray-200 {
|
|
176
|
-
--tw-ring-color: #334155 !important;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
html[data-a11y-theme='dark'] .shadow-sm,
|
|
180
|
-
html[data-a11y-theme='dark'] .shadow,
|
|
181
|
-
html[data-a11y-theme='dark'] .shadow-md {
|
|
182
|
-
--tw-shadow-color: rgb(0 0 0 / 0.45);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
html[data-a11y-theme='dark'] input:not([type='checkbox']):not([type='radio']),
|
|
186
|
-
html[data-a11y-theme='dark'] select,
|
|
187
|
-
html[data-a11y-theme='dark'] textarea {
|
|
188
|
-
background-color: #0f172a;
|
|
189
|
-
color: #e2e8f0;
|
|
190
|
-
border-color: #475569;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
html[data-a11y-theme='dark'] input:disabled,
|
|
194
|
-
html[data-a11y-theme='dark'] select:disabled,
|
|
195
|
-
html[data-a11y-theme='dark'] textarea:disabled {
|
|
196
|
-
background-color: #1e293b;
|
|
197
|
-
color: #64748b;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/* --- Alto contraste --- */
|
|
201
|
-
html[data-a11y-contrast='high'] {
|
|
202
|
-
--color-surface: #ffffff;
|
|
203
|
-
--color-text: #000000;
|
|
204
|
-
--color-text-muted: #111111;
|
|
205
|
-
--color-panel: #ffffff;
|
|
206
|
-
--color-border: #000000;
|
|
207
|
-
--color-sidebar: #000000;
|
|
208
|
-
--color-brand-500: #006600;
|
|
209
|
-
--color-brand-600: #004d00;
|
|
210
|
-
--color-brand-700: #003300;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
html[data-a11y-theme='dark'][data-a11y-contrast='high'] {
|
|
214
|
-
--color-surface: #000000;
|
|
215
|
-
--color-text: #ffffff;
|
|
216
|
-
--color-text-muted: #ffffff;
|
|
217
|
-
--color-panel: #000000;
|
|
218
|
-
--color-border: #ffffff;
|
|
219
|
-
--color-sidebar: #000000;
|
|
220
|
-
--color-brand-500: #66ff66;
|
|
221
|
-
--color-brand-600: #33ff33;
|
|
222
|
-
--color-brand-700: #00cc00;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
html[data-a11y-contrast='high'] body {
|
|
226
|
-
background: var(--color-surface);
|
|
227
|
-
color: var(--color-text);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
html[data-a11y-contrast='high'] .bg-white,
|
|
231
|
-
html[data-a11y-contrast='high'] .bg-slate-50,
|
|
232
|
-
html[data-a11y-contrast='high'] .bg-slate-100 {
|
|
233
|
-
background-color: var(--color-panel) !important;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
html[data-a11y-contrast='high'] .text-slate-500,
|
|
237
|
-
html[data-a11y-contrast='high'] .text-slate-600,
|
|
238
|
-
html[data-a11y-contrast='high'] .text-gray-500,
|
|
239
|
-
html[data-a11y-contrast='high'] .text-gray-600 {
|
|
240
|
-
color: var(--color-text-muted) !important;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
html[data-a11y-contrast='high'] .border-slate-100,
|
|
244
|
-
html[data-a11y-contrast='high'] .border-slate-200,
|
|
245
|
-
html[data-a11y-contrast='high'] .ring-slate-200 {
|
|
246
|
-
border-color: var(--color-border) !important;
|
|
247
|
-
--tw-ring-color: var(--color-border) !important;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
html[data-a11y-contrast='high'] *:focus-visible {
|
|
251
|
-
outline: 3px solid #0000ff !important;
|
|
252
|
-
outline-offset: 2px !important;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
html[data-a11y-theme='dark'][data-a11y-contrast='high'] *:focus-visible {
|
|
256
|
-
outline-color: #ffff00 !important;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
/* --- Movimiento reducido --- */
|
|
260
|
-
@media (prefers-reduced-motion: reduce) {
|
|
261
|
-
html:not([data-a11y-motion='full']) *,
|
|
262
|
-
html:not([data-a11y-motion='full']) *::before,
|
|
263
|
-
html:not([data-a11y-motion='full']) *::after {
|
|
264
|
-
animation-duration: 0.01ms !important;
|
|
265
|
-
animation-iteration-count: 1 !important;
|
|
266
|
-
transition-duration: 0.01ms !important;
|
|
267
|
-
scroll-behavior: auto !important;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
html[data-a11y-motion='reduce'] *,
|
|
272
|
-
html[data-a11y-motion='reduce'] *::before,
|
|
273
|
-
html[data-a11y-motion='reduce'] *::after {
|
|
274
|
-
animation-duration: 0.01ms !important;
|
|
275
|
-
animation-iteration-count: 1 !important;
|
|
276
|
-
transition-duration: 0.01ms !important;
|
|
277
|
-
scroll-behavior: auto !important;
|
|
278
|
-
}
|
|
1
|
+
@import 'tailwindcss';
|
|
2
|
+
|
|
3
|
+
@theme {
|
|
4
|
+
--color-brand-50: #f0fdf4;
|
|
5
|
+
--color-brand-100: #dcfce7;
|
|
6
|
+
--color-brand-500: #22c55e;
|
|
7
|
+
--color-brand-600: #16a34a;
|
|
8
|
+
--color-brand-700: #15803d;
|
|
9
|
+
--color-brand-800: #166534;
|
|
10
|
+
--color-surface: #f8fafc;
|
|
11
|
+
--color-sidebar: #14532d;
|
|
12
|
+
--color-text: #0f172a;
|
|
13
|
+
--color-text-muted: #64748b;
|
|
14
|
+
--color-panel: #ffffff;
|
|
15
|
+
--color-border: #e2e8f0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:root {
|
|
19
|
+
--a11y-text-scale: 1;
|
|
20
|
+
--a11y-font-family: system-ui, 'Segoe UI', Roboto, sans-serif;
|
|
21
|
+
--a11y-line-height: 1.5;
|
|
22
|
+
--a11y-letter-spacing: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
html {
|
|
26
|
+
font-size: calc(16px * var(--a11y-text-scale));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
html,
|
|
30
|
+
body,
|
|
31
|
+
#app {
|
|
32
|
+
height: 100%;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body {
|
|
36
|
+
margin: 0;
|
|
37
|
+
font-family: var(--a11y-font-family);
|
|
38
|
+
line-height: var(--a11y-line-height);
|
|
39
|
+
letter-spacing: var(--a11y-letter-spacing);
|
|
40
|
+
background: var(--color-surface);
|
|
41
|
+
color: var(--color-text);
|
|
42
|
+
-webkit-font-smoothing: antialiased;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.sr-only {
|
|
46
|
+
position: absolute;
|
|
47
|
+
width: 1px;
|
|
48
|
+
height: 1px;
|
|
49
|
+
padding: 0;
|
|
50
|
+
margin: -1px;
|
|
51
|
+
overflow: hidden;
|
|
52
|
+
clip: rect(0, 0, 0, 0);
|
|
53
|
+
white-space: nowrap;
|
|
54
|
+
border-width: 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Controles interactivos: cursor que indica acción */
|
|
58
|
+
button:not(:disabled),
|
|
59
|
+
[type='button']:not(:disabled),
|
|
60
|
+
[type='submit']:not(:disabled),
|
|
61
|
+
[type='reset']:not(:disabled),
|
|
62
|
+
select:not(:disabled),
|
|
63
|
+
input[type='checkbox']:not(:disabled),
|
|
64
|
+
input[type='radio']:not(:disabled),
|
|
65
|
+
input[type='file']:not(:disabled),
|
|
66
|
+
input[type='color']:not(:disabled),
|
|
67
|
+
input[type='range']:not(:disabled),
|
|
68
|
+
label[for]:not([aria-disabled='true']),
|
|
69
|
+
label:has(input:not(:disabled)),
|
|
70
|
+
label:has(select:not(:disabled)),
|
|
71
|
+
a[href],
|
|
72
|
+
summary,
|
|
73
|
+
[role='button']:not([aria-disabled='true']):not(:disabled),
|
|
74
|
+
[role='tab']:not([aria-disabled='true']),
|
|
75
|
+
[role='switch']:not(:disabled),
|
|
76
|
+
[role='menuitem']:not([aria-disabled='true']),
|
|
77
|
+
[role='option']:not([aria-disabled='true']) {
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Controles deshabilitados o solo lectura */
|
|
82
|
+
button:disabled,
|
|
83
|
+
select:disabled,
|
|
84
|
+
input:disabled,
|
|
85
|
+
textarea:disabled,
|
|
86
|
+
[aria-disabled='true'],
|
|
87
|
+
.input-field-disabled,
|
|
88
|
+
.input-field:disabled,
|
|
89
|
+
.input-field[readonly][disabled] {
|
|
90
|
+
cursor: not-allowed;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* --- Tema oscuro --- */
|
|
94
|
+
html[data-a11y-theme='dark'] {
|
|
95
|
+
--color-brand-50: #052e16;
|
|
96
|
+
--color-brand-100: #14532d;
|
|
97
|
+
--color-brand-500: #4ade80;
|
|
98
|
+
--color-brand-600: #22c55e;
|
|
99
|
+
--color-brand-700: #16a34a;
|
|
100
|
+
--color-brand-800: #15803d;
|
|
101
|
+
--color-surface: #0b1220;
|
|
102
|
+
--color-sidebar: #052e16;
|
|
103
|
+
--color-text: #e2e8f0;
|
|
104
|
+
--color-text-muted: #94a3b8;
|
|
105
|
+
--color-panel: #111827;
|
|
106
|
+
--color-border: #334155;
|
|
107
|
+
color-scheme: dark;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
html[data-a11y-theme='dark'] body {
|
|
111
|
+
background: var(--color-surface);
|
|
112
|
+
color: var(--color-text);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
html[data-a11y-theme='dark'] .bg-white {
|
|
116
|
+
background-color: var(--color-panel) !important;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
html[data-a11y-theme='dark'] .bg-slate-50,
|
|
120
|
+
html[data-a11y-theme='dark'] .bg-gray-50 {
|
|
121
|
+
background-color: #0f172a !important;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
html[data-a11y-theme='dark'] .bg-slate-100,
|
|
125
|
+
html[data-a11y-theme='dark'] .bg-gray-100 {
|
|
126
|
+
background-color: #1e293b !important;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
html[data-a11y-theme='dark'] .bg-slate-200,
|
|
130
|
+
html[data-a11y-theme='dark'] .bg-gray-200 {
|
|
131
|
+
background-color: #334155 !important;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
html[data-a11y-theme='dark'] .text-slate-900,
|
|
135
|
+
html[data-a11y-theme='dark'] .text-gray-900,
|
|
136
|
+
html[data-a11y-theme='dark'] .text-black {
|
|
137
|
+
color: #f8fafc !important;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
html[data-a11y-theme='dark'] .text-slate-800,
|
|
141
|
+
html[data-a11y-theme='dark'] .text-gray-800 {
|
|
142
|
+
color: #e2e8f0 !important;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
html[data-a11y-theme='dark'] .text-slate-700,
|
|
146
|
+
html[data-a11y-theme='dark'] .text-gray-700 {
|
|
147
|
+
color: #cbd5e1 !important;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
html[data-a11y-theme='dark'] .text-slate-600,
|
|
151
|
+
html[data-a11y-theme='dark'] .text-gray-600 {
|
|
152
|
+
color: #94a3b8 !important;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
html[data-a11y-theme='dark'] .text-slate-500,
|
|
156
|
+
html[data-a11y-theme='dark'] .text-gray-500 {
|
|
157
|
+
color: #94a3b8 !important;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
html[data-a11y-theme='dark'] .text-slate-400,
|
|
161
|
+
html[data-a11y-theme='dark'] .text-gray-400 {
|
|
162
|
+
color: #64748b !important;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
html[data-a11y-theme='dark'] .border-slate-100,
|
|
166
|
+
html[data-a11y-theme='dark'] .border-gray-100,
|
|
167
|
+
html[data-a11y-theme='dark'] .border-slate-200,
|
|
168
|
+
html[data-a11y-theme='dark'] .border-gray-200,
|
|
169
|
+
html[data-a11y-theme='dark'] .divide-slate-100 > :not([hidden]) ~ :not([hidden]),
|
|
170
|
+
html[data-a11y-theme='dark'] .divide-slate-200 > :not([hidden]) ~ :not([hidden]) {
|
|
171
|
+
border-color: var(--color-border) !important;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
html[data-a11y-theme='dark'] .ring-slate-200,
|
|
175
|
+
html[data-a11y-theme='dark'] .ring-gray-200 {
|
|
176
|
+
--tw-ring-color: #334155 !important;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
html[data-a11y-theme='dark'] .shadow-sm,
|
|
180
|
+
html[data-a11y-theme='dark'] .shadow,
|
|
181
|
+
html[data-a11y-theme='dark'] .shadow-md {
|
|
182
|
+
--tw-shadow-color: rgb(0 0 0 / 0.45);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
html[data-a11y-theme='dark'] input:not([type='checkbox']):not([type='radio']),
|
|
186
|
+
html[data-a11y-theme='dark'] select,
|
|
187
|
+
html[data-a11y-theme='dark'] textarea {
|
|
188
|
+
background-color: #0f172a;
|
|
189
|
+
color: #e2e8f0;
|
|
190
|
+
border-color: #475569;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
html[data-a11y-theme='dark'] input:disabled,
|
|
194
|
+
html[data-a11y-theme='dark'] select:disabled,
|
|
195
|
+
html[data-a11y-theme='dark'] textarea:disabled {
|
|
196
|
+
background-color: #1e293b;
|
|
197
|
+
color: #64748b;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/* --- Alto contraste --- */
|
|
201
|
+
html[data-a11y-contrast='high'] {
|
|
202
|
+
--color-surface: #ffffff;
|
|
203
|
+
--color-text: #000000;
|
|
204
|
+
--color-text-muted: #111111;
|
|
205
|
+
--color-panel: #ffffff;
|
|
206
|
+
--color-border: #000000;
|
|
207
|
+
--color-sidebar: #000000;
|
|
208
|
+
--color-brand-500: #006600;
|
|
209
|
+
--color-brand-600: #004d00;
|
|
210
|
+
--color-brand-700: #003300;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
html[data-a11y-theme='dark'][data-a11y-contrast='high'] {
|
|
214
|
+
--color-surface: #000000;
|
|
215
|
+
--color-text: #ffffff;
|
|
216
|
+
--color-text-muted: #ffffff;
|
|
217
|
+
--color-panel: #000000;
|
|
218
|
+
--color-border: #ffffff;
|
|
219
|
+
--color-sidebar: #000000;
|
|
220
|
+
--color-brand-500: #66ff66;
|
|
221
|
+
--color-brand-600: #33ff33;
|
|
222
|
+
--color-brand-700: #00cc00;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
html[data-a11y-contrast='high'] body {
|
|
226
|
+
background: var(--color-surface);
|
|
227
|
+
color: var(--color-text);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
html[data-a11y-contrast='high'] .bg-white,
|
|
231
|
+
html[data-a11y-contrast='high'] .bg-slate-50,
|
|
232
|
+
html[data-a11y-contrast='high'] .bg-slate-100 {
|
|
233
|
+
background-color: var(--color-panel) !important;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
html[data-a11y-contrast='high'] .text-slate-500,
|
|
237
|
+
html[data-a11y-contrast='high'] .text-slate-600,
|
|
238
|
+
html[data-a11y-contrast='high'] .text-gray-500,
|
|
239
|
+
html[data-a11y-contrast='high'] .text-gray-600 {
|
|
240
|
+
color: var(--color-text-muted) !important;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
html[data-a11y-contrast='high'] .border-slate-100,
|
|
244
|
+
html[data-a11y-contrast='high'] .border-slate-200,
|
|
245
|
+
html[data-a11y-contrast='high'] .ring-slate-200 {
|
|
246
|
+
border-color: var(--color-border) !important;
|
|
247
|
+
--tw-ring-color: var(--color-border) !important;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
html[data-a11y-contrast='high'] *:focus-visible {
|
|
251
|
+
outline: 3px solid #0000ff !important;
|
|
252
|
+
outline-offset: 2px !important;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
html[data-a11y-theme='dark'][data-a11y-contrast='high'] *:focus-visible {
|
|
256
|
+
outline-color: #ffff00 !important;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/* --- Movimiento reducido --- */
|
|
260
|
+
@media (prefers-reduced-motion: reduce) {
|
|
261
|
+
html:not([data-a11y-motion='full']) *,
|
|
262
|
+
html:not([data-a11y-motion='full']) *::before,
|
|
263
|
+
html:not([data-a11y-motion='full']) *::after {
|
|
264
|
+
animation-duration: 0.01ms !important;
|
|
265
|
+
animation-iteration-count: 1 !important;
|
|
266
|
+
transition-duration: 0.01ms !important;
|
|
267
|
+
scroll-behavior: auto !important;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
html[data-a11y-motion='reduce'] *,
|
|
272
|
+
html[data-a11y-motion='reduce'] *::before,
|
|
273
|
+
html[data-a11y-motion='reduce'] *::after {
|
|
274
|
+
animation-duration: 0.01ms !important;
|
|
275
|
+
animation-iteration-count: 1 !important;
|
|
276
|
+
transition-duration: 0.01ms !important;
|
|
277
|
+
scroll-behavior: auto !important;
|
|
278
|
+
}
|