@dubix/ui 0.4.0 → 0.6.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/dist/styles.css CHANGED
@@ -1,5 +1,5 @@
1
1
  @layer dx.base, dx.components;
2
- /* Dubix Design System · @dubix/ui 0.4.0 · generado por scripts/build-css.mjs — no editar a mano.
2
+ /* Dubix Design System · @dubix/ui 0.6.0 · generado por scripts/build-css.mjs — no editar a mano.
3
3
  Requiere @dubix/tokens/tokens.css antes. Las reglas base de .dx-app las emite @dubix/tokens. */
4
4
 
5
5
  /* src/avatar/avatar.css */
@@ -488,6 +488,124 @@
488
488
  }
489
489
  }
490
490
 
491
+ /* src/drawer/drawer.css */
492
+ /* Drawer · DS v1, ítem 17 «Drawer (superpuesto)», con el foco de 04 §E. Pegado al borde derecho y de alto completo, sin
493
+ radio, fondo --dx-bg-raised y --dx-shadow-pop, en --dx-z-drawerOverlay sobre un velo --dx-scrim con --dx-z-scrim. Ancho
494
+ 440px (detail) o 360px (context), nunca más que la ventana. Encabezado 22px 24px 16px en columna con 14px; cuerpo con
495
+ scroll propio y 0 24px 24px; pie 14px 24px 18px. Entra desde la derecha en 200ms. */
496
+ @layer dx.components {
497
+ .dx-drawer__overlay {
498
+ position: fixed;
499
+ inset: 0;
500
+ z-index: var(--dx-z-scrim);
501
+ background: var(--dx-scrim);
502
+ animation: dx-drawer-fade var(--dx-motion-overlay) var(--dx-ease);
503
+ }
504
+
505
+ .dx-drawer {
506
+ --dx-drawer-width: 440px; /* sin token: ancho del drawer de detalle (DS v1, ítem 17) */
507
+ --dx-drawer-header-top: 22px; /* sin token: padding superior del encabezado (DS v1, ítem 17) */
508
+
509
+ position: fixed;
510
+ top: 0;
511
+ right: 0;
512
+ bottom: 0;
513
+ z-index: var(--dx-z-drawerOverlay);
514
+ display: flex;
515
+ flex-direction: column;
516
+ box-sizing: border-box;
517
+ width: var(--dx-drawer-width);
518
+ max-width: 100%;
519
+ background: var(--dx-bg-raised);
520
+ box-shadow: var(--dx-shadow-pop);
521
+ color: var(--dx-fg);
522
+ font-family: var(--dx-font-ui);
523
+ -webkit-font-smoothing: antialiased;
524
+ animation: dx-drawer-in var(--dx-motion-overlay) var(--dx-ease);
525
+ }
526
+
527
+ .dx-drawer[data-width='context'] {
528
+ --dx-drawer-width: 360px; /* sin token: ancho del drawer de contexto (DS v1, ítem 17) */
529
+ }
530
+
531
+ .dx-drawer__header {
532
+ display: flex;
533
+ flex-direction: column;
534
+ gap: var(--dx-space-3_5);
535
+ padding: var(--dx-drawer-header-top) var(--dx-space-6) var(--dx-space-4);
536
+ }
537
+
538
+ .dx-drawer__top {
539
+ display: flex;
540
+ align-items: center;
541
+ justify-content: space-between;
542
+ gap: var(--dx-space-3);
543
+ }
544
+
545
+ .dx-drawer__title {
546
+ min-width: 0;
547
+ margin: 0;
548
+ color: var(--dx-fg);
549
+ font-size: var(--dx-text-xl);
550
+ font-weight: 600;
551
+ line-height: var(--dx-leading-xl);
552
+ letter-spacing: var(--dx-tracking-xl);
553
+ }
554
+
555
+ /* El título recibe el foco por programa al abrir (tabindex -1, fuera del orden de Tab): no es un control, sin anillo. */
556
+ .dx-drawer__title:focus {
557
+ outline: none;
558
+ }
559
+
560
+ .dx-drawer__subtitle {
561
+ margin: 0;
562
+ color: var(--dx-fg-2);
563
+ font-size: var(--dx-text-base);
564
+ line-height: var(--dx-leading-base);
565
+ }
566
+
567
+ .dx-drawer__body {
568
+ flex: 1;
569
+ min-height: 0;
570
+ overflow: auto;
571
+ padding: 0 var(--dx-space-6) var(--dx-space-6);
572
+ }
573
+
574
+ .dx-drawer__footer {
575
+ display: flex;
576
+ align-items: center;
577
+ gap: var(--dx-space-2);
578
+ padding: var(--dx-space-3_5) var(--dx-space-6) var(--dx-space-4_5);
579
+ }
580
+
581
+ @keyframes dx-drawer-fade {
582
+ from {
583
+ opacity: 0;
584
+ }
585
+ }
586
+
587
+ @keyframes dx-drawer-in {
588
+ from {
589
+ opacity: 0;
590
+ transform: translateX(100%);
591
+ }
592
+ }
593
+
594
+ /* Alto contraste: el navegador quita la sombra; un borde izquierdo de sistema separa el panel de la página. */
595
+ @media (forced-colors: active) {
596
+ .dx-drawer {
597
+ border-left: 1px solid CanvasText;
598
+ }
599
+ }
600
+
601
+ @media (prefers-reduced-motion: reduce) {
602
+ .dx-drawer,
603
+ .dx-drawer__overlay {
604
+ animation: none;
605
+ }
606
+ }
607
+ }
608
+
491
609
  /* src/dropdown-menu/dropdown-menu.css */
492
610
  /* DropdownMenu · DS v1 n.º 15 y .menu / .mi de D2.1. Contenedor: ancho mínimo --dx-size-menu-min, padding 6px, radio
493
611
  --dx-radius-lg, fondo --dx-bg-raised, --dx-shadow-pop y --dx-z-menu. Ítem: 36px de alto, padding 0 10px, gap 10px, radio
@@ -912,6 +1030,411 @@
912
1030
  }
913
1031
  }
914
1032
 
1033
+ /* src/pagination/pagination.css */
1034
+ /* Pagination · pie de tabla de D2 (el table-foot del DS v1): rango a la izquierda, Anterior, páginas y Siguiente a la derecha.
1035
+ Los botones son Button ghost sm; estas reglas solo tocan las clases propias que Pagination les suma. */
1036
+ @layer dx.components {
1037
+ .dx-pagination {
1038
+ container: dx-pagination / inline-size;
1039
+ display: flex;
1040
+ flex-wrap: wrap;
1041
+ align-items: center;
1042
+ justify-content: space-between;
1043
+ column-gap: var(--dx-space-4);
1044
+ box-sizing: border-box;
1045
+ min-width: 0;
1046
+ min-height: var(--dx-size-table-foot);
1047
+ margin: 0;
1048
+ color: var(--dx-fg-2);
1049
+ font-family: var(--dx-font-ui);
1050
+ font-feature-settings: var(--dx-features-ui);
1051
+ font-size: var(--dx-text-sm);
1052
+ }
1053
+
1054
+ .dx-pagination__range {
1055
+ margin: 0;
1056
+ color: var(--dx-fg-2);
1057
+ font-size: var(--dx-text-sm);
1058
+ font-variant-numeric: tabular-nums;
1059
+ white-space: nowrap;
1060
+ }
1061
+
1062
+ .dx-pagination__controls {
1063
+ display: flex;
1064
+ align-items: center;
1065
+ gap: var(--dx-space-1);
1066
+ margin-left: auto;
1067
+ }
1068
+
1069
+ .dx-pagination__pages {
1070
+ display: flex;
1071
+ align-items: center;
1072
+ gap: var(--dx-space-1);
1073
+ }
1074
+
1075
+ /* Cada página: un cuadrado de 32px como mínimo, que crece con números de más de dos cifras. */
1076
+ .dx-pagination__page {
1077
+ min-width: var(--dx-size-control-sm);
1078
+ padding: 0 var(--dx-space-1_5);
1079
+ font-variant-numeric: tabular-nums;
1080
+ }
1081
+
1082
+ /* La actual: fondo seleccionado, texto pleno y 600. Sigue enfocable; el hover de ghost no la cambia (el [data-variant]
1083
+ iguala la especificidad del hover de Button y gana por orden). */
1084
+ .dx-pagination__page[aria-current="page"],
1085
+ .dx-pagination__page[aria-current="page"][data-variant]:is(:hover, :active) {
1086
+ background-color: var(--dx-bg-selected);
1087
+ color: var(--dx-fg);
1088
+ font-weight: 600;
1089
+ }
1090
+
1091
+ .dx-pagination__ellipsis {
1092
+ display: inline-flex;
1093
+ align-items: center;
1094
+ justify-content: center;
1095
+ min-width: var(--dx-size-control-sm);
1096
+ color: var(--dx-fg-3);
1097
+ user-select: none;
1098
+ }
1099
+
1100
+ .dx-pagination__status {
1101
+ display: none;
1102
+ padding: 0 var(--dx-space-1);
1103
+ color: var(--dx-fg-2);
1104
+ font-variant-numeric: tabular-nums;
1105
+ white-space: nowrap;
1106
+ }
1107
+
1108
+ /* Angosto (contenedor de menos de 480px, sin token: un @container no acepta var()): sin números; «3 de 13» entre las
1109
+ flechas, y Anterior y Siguiente solo con el chevron (el texto queda para lectores, así el nombre accesible no cambia). */
1110
+ @container dx-pagination (width < 480px) {
1111
+ .dx-pagination__pages {
1112
+ display: none;
1113
+ }
1114
+
1115
+ .dx-pagination__status {
1116
+ display: inline;
1117
+ }
1118
+
1119
+ .dx-pagination__step {
1120
+ position: relative;
1121
+ width: var(--dx-size-control-sm);
1122
+ padding: 0;
1123
+ }
1124
+
1125
+ .dx-pagination__label {
1126
+ position: absolute;
1127
+ width: 1px;
1128
+ height: 1px;
1129
+ margin: -1px;
1130
+ padding: 0;
1131
+ overflow: hidden;
1132
+ clip-path: inset(50%);
1133
+ white-space: nowrap;
1134
+ border: 0;
1135
+ }
1136
+ }
1137
+
1138
+ /* Alto contraste: el fondo seleccionado desaparece; la actual va con los colores de sistema de la selección. */
1139
+ @media (forced-colors: active) {
1140
+ .dx-pagination__page[aria-current="page"],
1141
+ .dx-pagination__page[aria-current="page"][data-variant]:is(:hover, :active) {
1142
+ border-color: Highlight;
1143
+ background-color: Highlight;
1144
+ color: HighlightText;
1145
+ forced-color-adjust: none;
1146
+ }
1147
+ }
1148
+ }
1149
+
1150
+ /* src/search-input/search-input.css */
1151
+ /* SearchInput · Search md del DS v1. Es un Input (dx-input: alto, radio, borde, foco, error, deshabilitado y alto contraste
1152
+ salen de input.css) con fondo hundido y, cuando hay texto, un IconButton xs para limpiar adentro, a la derecha. */
1153
+ @layer dx.components {
1154
+ .dx-search-input {
1155
+ --dx-search-input-clear-inset: 5px; /* sin token: distancia del botón para limpiar al borde derecho del campo (DS v1) */
1156
+
1157
+ position: relative;
1158
+ }
1159
+
1160
+ /* El selector con > le gana a .dx-input sin depender del orden de styles.css. El borde se queda: --dx-bg-sunken contra
1161
+ --dx-bg-app no llega a 3:1, y el borde es lo que marca el control. */
1162
+ .dx-search-input > .dx-search-input__field {
1163
+ /* lugar para el botón (28px a 5px del borde) más el gap del campo, siempre: el texto no salta cuando el botón aparece */
1164
+ padding-right: calc(var(--dx-search-input-clear-inset) + var(--dx-size-control-xs) + var(--dx-space-2));
1165
+ background: var(--dx-bg-sunken);
1166
+ }
1167
+
1168
+ /* Sin la «x» nativa de WebKit (habría dos) ni su lupa decorativa. */
1169
+ .dx-search-input__field > input::-webkit-search-cancel-button,
1170
+ .dx-search-input__field > input::-webkit-search-decoration {
1171
+ display: none;
1172
+ appearance: none;
1173
+ }
1174
+
1175
+ /* [data-size] (Button siempre lo pone) sube la especificidad sobre el margin de .dx-btn. Centrado en el alto del campo. */
1176
+ .dx-search-input__clear[data-size] {
1177
+ position: absolute;
1178
+ inset-block: 0;
1179
+ right: var(--dx-search-input-clear-inset);
1180
+ margin-block: auto;
1181
+ }
1182
+ }
1183
+
1184
+ /* src/select/select.css */
1185
+ /* Select · DS v1 («con refinamiento antes de formalizar»; la lista sigue a DropdownMenu). Disparador: los valores de Input md
1186
+ (alto --dx-size-control-md, radio --dx-radius-md, fondo --dx-bg-app, borde --dx-border-input como sombra interior, padding
1187
+ 12px/10px, --dx-text-ui) con un chevron de 16px en --dx-fg-3. Foco por teclado y abierto (data-state="open" de Radix):
1188
+ --dx-shadow-focus, como el foco de Input; error y deshabilitado, también como Input. Lista: la caja de DropdownMenu
1189
+ (padding 6px, --dx-radius-lg, --dx-bg-raised, --dx-shadow-pop, que trae su borde de 1px, y --dx-z-menu), con ancho mínimo
1190
+ el del disparador. Ítem: los valores del ítem de DropdownMenu (36px, padding 0 10px, gap 10px, --dx-text-base),
1191
+ resaltado en --dx-bg-selected y la marca de la opción elegida a la derecha. Radix copia el z-index del contenido a su
1192
+ contenedor posicionado, así que basta declararlo acá. */
1193
+ @layer dx.components {
1194
+ .dx-select {
1195
+ --dx-select-pl: 12px; /* sin token: padding izquierdo de los campos en D2.1 (el de Input) */
1196
+ --dx-select-pr: 10px; /* sin token: padding derecho de los campos en D2.1 (el de Input) */
1197
+
1198
+ box-sizing: border-box;
1199
+ display: flex;
1200
+ align-items: center;
1201
+ gap: var(--dx-space-2);
1202
+ width: 100%;
1203
+ height: var(--dx-size-control-md);
1204
+ margin: 0;
1205
+ padding: 0 var(--dx-select-pr) 0 var(--dx-select-pl);
1206
+ border: 0;
1207
+ border-radius: var(--dx-radius-md);
1208
+ background: var(--dx-bg-app);
1209
+ /* el borde es una sombra interior: el foco y el error la cambian sin mover nada */
1210
+ box-shadow: inset 0 0 0 1px var(--dx-border-input);
1211
+ color: var(--dx-fg);
1212
+ font-family: var(--dx-font-ui);
1213
+ font-feature-settings: var(--dx-features-ui);
1214
+ font-size: var(--dx-text-ui);
1215
+ line-height: var(--dx-leading-ui);
1216
+ text-align: start;
1217
+ outline: none;
1218
+ appearance: none;
1219
+ cursor: pointer;
1220
+ transition: box-shadow var(--dx-motion-fast) var(--dx-ease);
1221
+ }
1222
+
1223
+ .dx-select__value {
1224
+ flex: 1;
1225
+ min-width: 0;
1226
+ overflow: hidden;
1227
+ text-overflow: ellipsis;
1228
+ white-space: nowrap;
1229
+ }
1230
+
1231
+ /* Sin opción elegida: el placeholder, en el color del de Input. */
1232
+ .dx-select[data-placeholder] .dx-select__value {
1233
+ color: var(--dx-fg-3);
1234
+ }
1235
+
1236
+ .dx-select__icon {
1237
+ display: inline-flex;
1238
+ flex-shrink: 0;
1239
+ width: var(--dx-size-icon);
1240
+ height: var(--dx-size-icon);
1241
+ color: var(--dx-fg-3);
1242
+ }
1243
+
1244
+ .dx-select__icon > svg {
1245
+ width: 100%;
1246
+ height: 100%;
1247
+ }
1248
+
1249
+ /* Foco por teclado y lista abierta: el foco interior del DS, como Input. */
1250
+ .dx-select:focus-visible,
1251
+ .dx-select[data-state="open"] {
1252
+ box-shadow: var(--dx-shadow-focus);
1253
+ }
1254
+
1255
+ /* Error, como Input: borde --dx-danger-mark y halo de 3px. */
1256
+ .dx-select[aria-invalid="true"] {
1257
+ box-shadow:
1258
+ inset 0 0 0 1px var(--dx-danger-mark),
1259
+ 0 0 0 3px color-mix(in srgb, var(--dx-danger-mark) 18%, transparent);
1260
+ }
1261
+
1262
+ /* Error con foco o abierto: el borde sigue rojo y el halo pasa a un anillo de --dx-ring (WCAG 2.4.7), como Input. */
1263
+ .dx-select[aria-invalid="true"]:focus-visible,
1264
+ .dx-select[aria-invalid="true"][data-state="open"] {
1265
+ box-shadow:
1266
+ inset 0 0 0 1px var(--dx-danger-mark),
1267
+ 0 0 0 2px var(--dx-ring);
1268
+ }
1269
+
1270
+ /* Deshabilitado (el Select o un <fieldset disabled>): opacidad .45, como Input. */
1271
+ .dx-select:disabled {
1272
+ opacity: 0.45;
1273
+ cursor: not-allowed;
1274
+ }
1275
+
1276
+ .dx-select__content {
1277
+ --dx-select-content-max: 360px; /* sin token: ancho y alto máximos de la lista (ticket de Select, 27/10) */
1278
+
1279
+ z-index: var(--dx-z-menu);
1280
+ box-sizing: border-box;
1281
+ /* min-width (el ancho del disparador) y max-height (hasta el borde de la ventana) usan variables de Radix: van en el
1282
+ style del contenido, en Select.tsx, porque check:css solo admite tokens y variables locales. */
1283
+ max-width: var(--dx-select-content-max);
1284
+ padding: var(--dx-space-1_5);
1285
+ border-radius: var(--dx-radius-lg);
1286
+ background: var(--dx-bg-raised);
1287
+ box-shadow: var(--dx-shadow-pop);
1288
+ color: var(--dx-fg);
1289
+ font-family: var(--dx-font-ui);
1290
+ -webkit-font-smoothing: antialiased;
1291
+ animation: dx-select-in var(--dx-motion-fast) var(--dx-ease);
1292
+ }
1293
+
1294
+ .dx-select__scroll {
1295
+ display: flex;
1296
+ flex: none;
1297
+ align-items: center;
1298
+ justify-content: center;
1299
+ height: var(--dx-space-6);
1300
+ color: var(--dx-fg-3);
1301
+ cursor: default;
1302
+ }
1303
+
1304
+ .dx-select__scroll > svg {
1305
+ width: var(--dx-size-icon);
1306
+ height: var(--dx-size-icon);
1307
+ }
1308
+
1309
+ .dx-select__label {
1310
+ padding: var(--dx-space-1_5) var(--dx-space-2_5) var(--dx-space-2);
1311
+ color: var(--dx-fg);
1312
+ font-size: var(--dx-text-sm);
1313
+ font-weight: 600;
1314
+ line-height: var(--dx-leading-sm);
1315
+ }
1316
+
1317
+ .dx-select__item {
1318
+ display: flex;
1319
+ align-items: center;
1320
+ gap: var(--dx-space-2_5);
1321
+ box-sizing: border-box;
1322
+ height: var(--dx-space-9);
1323
+ padding: 0 var(--dx-space-2_5);
1324
+ border-radius: var(--dx-radius-md);
1325
+ color: var(--dx-fg);
1326
+ font-size: var(--dx-text-base);
1327
+ line-height: var(--dx-leading-base);
1328
+ cursor: pointer;
1329
+ outline: none;
1330
+ user-select: none;
1331
+ }
1332
+
1333
+ .dx-select__item[data-highlighted] {
1334
+ background: var(--dx-bg-selected);
1335
+ }
1336
+
1337
+ /* Deshabilitado: al .45 y sin resaltado (Radix no lo enfoca con el teclado; con el mouse tampoco se pinta). */
1338
+ .dx-select__item[data-disabled] {
1339
+ background: transparent;
1340
+ opacity: 0.45;
1341
+ cursor: not-allowed;
1342
+ }
1343
+
1344
+ .dx-select__text {
1345
+ flex: 1;
1346
+ min-width: 0;
1347
+ overflow: hidden;
1348
+ text-overflow: ellipsis;
1349
+ white-space: nowrap;
1350
+ }
1351
+
1352
+ /* La marca de la opción elegida: 16px, a la derecha y en el color del texto, como en DropdownMenuRadioItem. */
1353
+ .dx-select__mark {
1354
+ display: inline-flex;
1355
+ flex: none;
1356
+ width: var(--dx-size-icon);
1357
+ height: var(--dx-size-icon);
1358
+ color: var(--dx-fg);
1359
+ }
1360
+
1361
+ .dx-select__mark svg {
1362
+ width: 100%;
1363
+ height: 100%;
1364
+ }
1365
+
1366
+ .dx-select__separator {
1367
+ height: 1px;
1368
+ margin: var(--dx-space-1_5) 0;
1369
+ background: var(--dx-border);
1370
+ }
1371
+
1372
+ @keyframes dx-select-in {
1373
+ from {
1374
+ opacity: 0;
1375
+ }
1376
+ }
1377
+
1378
+ /* Alto contraste: el navegador quita las sombras, así que el borde, el foco y el error del disparador pasan a outline (como
1379
+ Input), un contorno separa la lista de la página y el ítem resaltado usa Highlight/HighlightText (la marca es
1380
+ currentColor, así que se ve). */
1381
+ @media (forced-colors: active) {
1382
+ .dx-select {
1383
+ outline: 1px solid CanvasText;
1384
+ outline-offset: -1px;
1385
+ }
1386
+
1387
+ .dx-select:focus-visible,
1388
+ .dx-select[data-state="open"] {
1389
+ outline: 2px solid Highlight;
1390
+ outline-offset: -2px;
1391
+ }
1392
+
1393
+ .dx-select[aria-invalid="true"] {
1394
+ outline: 2px dashed LinkText;
1395
+ outline-offset: -2px;
1396
+ }
1397
+
1398
+ .dx-select[aria-invalid="true"]:focus-visible,
1399
+ .dx-select[aria-invalid="true"][data-state="open"] {
1400
+ outline-color: Highlight;
1401
+ }
1402
+
1403
+ .dx-select:disabled {
1404
+ outline-color: GrayText;
1405
+ }
1406
+
1407
+ /* El outline va en el style de la lista (Radix pone outline: none en línea): acá solo se define. */
1408
+ .dx-select__content {
1409
+ --dx-select-content-outline: 1px solid CanvasText;
1410
+ }
1411
+
1412
+ .dx-select__item[data-highlighted] {
1413
+ background: Highlight;
1414
+ color: HighlightText;
1415
+ }
1416
+
1417
+ /* La marca toma el color del ítem: CanvasText en reposo, HighlightText sobre el resaltado. */
1418
+ .dx-select__mark {
1419
+ color: inherit;
1420
+ }
1421
+
1422
+ .dx-select__item[data-disabled] {
1423
+ color: GrayText;
1424
+ }
1425
+ }
1426
+
1427
+ @media (prefers-reduced-motion: reduce) {
1428
+ .dx-select {
1429
+ transition: none;
1430
+ }
1431
+
1432
+ .dx-select__content {
1433
+ animation: none;
1434
+ }
1435
+ }
1436
+ }
1437
+
915
1438
  /* src/sidebar/sidebar.css */
916
1439
  /* Sidebar · barra lateral expandida de D2.1 (.side). Fondo --dx-bg-side sin borde, --dx-size-sidebar de ancho, alto completo y
917
1440
  padding 12px, en columna: encabezado (fila de 32px con logo y acciones, y la línea de la organización), navegación con
@@ -1859,6 +2382,161 @@
1859
2382
  }
1860
2383
  }
1861
2384
 
2385
+ /* src/toast/toast.css */
2386
+ /* Toast · DS v1 n.º 19. Invertido como Tooltip: en claro, fondo --dx-fg y texto --dx-bg-app (el «panel» del prototipo);
2387
+ en oscuro, fondo --dx-bg-raised y texto --dx-fg. Abajo y centrado, una línea de --dx-text-sm (13,5px) con elipsis,
2388
+ padding 10px 14px, separación 10px, radio --dx-radius-md (el prototipo dibuja 10px; el token más cercano es 8),
2389
+ --dx-shadow-pop y --dx-z-toast. Entra y sale en --dx-motion-overlay con --dx-ease, solo opacidad y transform. */
2390
+ @layer dx.components {
2391
+ /* La lista de Radix (un <ol> fijo a lo ancho): no recibe el puntero, solo el toast; así no tapa lo que está debajo. */
2392
+ .dx-toast__viewport {
2393
+ --dx-toast-bottom: 22px; /* sin token: distancia al borde inferior de la ventana (DS v1 n.º 19) */
2394
+
2395
+ position: fixed;
2396
+ inset-inline: 0;
2397
+ bottom: var(--dx-toast-bottom);
2398
+ z-index: var(--dx-z-toast);
2399
+ display: flex;
2400
+ flex-direction: column;
2401
+ align-items: center;
2402
+ margin: 0;
2403
+ padding: 0;
2404
+ list-style: none;
2405
+ pointer-events: none;
2406
+ outline: none;
2407
+ }
2408
+
2409
+ .dx-toast {
2410
+ --dx-toast-bg: var(--dx-fg);
2411
+ --dx-toast-fg: var(--dx-bg-app);
2412
+ --dx-toast-shift: 8px; /* sin token: recorrido vertical de la entrada y la salida */
2413
+ --dx-toast-hover-mix: 14%; /* sin token: fondo de la acción y del cerrar con hover, sobre el fondo invertido */
2414
+
2415
+ box-sizing: border-box;
2416
+ display: flex;
2417
+ align-items: center;
2418
+ gap: var(--dx-space-2_5);
2419
+ max-width: calc(100% - var(--dx-space-12));
2420
+ padding: var(--dx-space-2_5) var(--dx-space-3_5);
2421
+ border-radius: var(--dx-radius-md);
2422
+ background: var(--dx-toast-bg);
2423
+ box-shadow: var(--dx-shadow-pop);
2424
+ color: var(--dx-toast-fg);
2425
+ font-family: var(--dx-font-ui);
2426
+ font-size: var(--dx-text-sm);
2427
+ line-height: var(--dx-leading-sm);
2428
+ white-space: nowrap;
2429
+ pointer-events: auto;
2430
+ -webkit-font-smoothing: antialiased;
2431
+ }
2432
+
2433
+ /* El tema lo fija un ancestro (.dark o data-theme="dark", como en @dubix/tokens); :where() no suma especificidad. */
2434
+ :where(.dark, [data-theme="dark"]) .dx-toast {
2435
+ --dx-toast-bg: var(--dx-bg-raised);
2436
+ --dx-toast-fg: var(--dx-fg);
2437
+ }
2438
+
2439
+ .dx-toast[data-state="open"] {
2440
+ animation: dx-toast-in var(--dx-motion-overlay) var(--dx-ease);
2441
+ }
2442
+
2443
+ .dx-toast[data-state="closed"] {
2444
+ animation: dx-toast-out var(--dx-motion-overlay) var(--dx-ease) forwards;
2445
+ }
2446
+
2447
+ .dx-toast:focus-visible {
2448
+ outline: 2px solid var(--dx-ring);
2449
+ outline-offset: 2px;
2450
+ }
2451
+
2452
+ .dx-toast__icon {
2453
+ display: inline-flex;
2454
+ flex: none;
2455
+ }
2456
+
2457
+ .dx-toast__icon > svg {
2458
+ width: var(--dx-size-icon);
2459
+ height: var(--dx-size-icon);
2460
+ }
2461
+
2462
+ .dx-toast__message {
2463
+ min-width: 0;
2464
+ overflow: hidden;
2465
+ text-overflow: ellipsis;
2466
+ }
2467
+
2468
+ .dx-toast__action,
2469
+ .dx-toast__close {
2470
+ flex: none;
2471
+ margin: 0;
2472
+ border: 0;
2473
+ border-radius: var(--dx-radius-sm);
2474
+ background: transparent;
2475
+ color: inherit;
2476
+ font: inherit;
2477
+ cursor: pointer;
2478
+ }
2479
+
2480
+ .dx-toast__action {
2481
+ padding: var(--dx-space-0_5) var(--dx-space-1_5);
2482
+ font-weight: 600;
2483
+ }
2484
+
2485
+ .dx-toast__close {
2486
+ display: inline-flex;
2487
+ align-items: center;
2488
+ justify-content: center;
2489
+ width: var(--dx-space-5);
2490
+ height: var(--dx-space-5);
2491
+ padding: 0;
2492
+ }
2493
+
2494
+ .dx-toast__close > svg {
2495
+ width: var(--dx-size-icon-sm);
2496
+ height: var(--dx-size-icon-sm);
2497
+ }
2498
+
2499
+ .dx-toast__action:hover,
2500
+ .dx-toast__close:hover {
2501
+ background: color-mix(in srgb, var(--dx-toast-fg) var(--dx-toast-hover-mix), transparent);
2502
+ }
2503
+
2504
+ .dx-toast__action:focus-visible,
2505
+ .dx-toast__close:focus-visible {
2506
+ outline: 2px solid var(--dx-ring);
2507
+ outline-offset: 1px;
2508
+ }
2509
+
2510
+ @keyframes dx-toast-in {
2511
+ from {
2512
+ opacity: 0;
2513
+ transform: translateY(var(--dx-toast-shift));
2514
+ }
2515
+ }
2516
+
2517
+ @keyframes dx-toast-out {
2518
+ to {
2519
+ opacity: 0;
2520
+ transform: translateY(var(--dx-toast-shift));
2521
+ }
2522
+ }
2523
+
2524
+ /* Alto contraste: el navegador quita la sombra (y con ella el borde de 1px de --dx-shadow-pop); un contorno de sistema
2525
+ separa el toast de la página sin cambiar su tamaño. */
2526
+ @media (forced-colors: active) {
2527
+ .dx-toast {
2528
+ outline: 1px solid CanvasText;
2529
+ }
2530
+ }
2531
+
2532
+ /* Sin movimiento: sin animación, y Radix desmonta al cerrar sin esperar la salida. */
2533
+ @media (prefers-reduced-motion: reduce) {
2534
+ .dx-toast[data-state] {
2535
+ animation: none;
2536
+ }
2537
+ }
2538
+ }
2539
+
1862
2540
  /* src/tooltip/tooltip.css */
1863
2541
  /* Tooltip · DS v1 n.º 13 y .tt de D2.1. Invertido en claro (fondo --dx-fg, texto --dx-bg-app) y elevado en oscuro
1864
2542
  (fondo --dx-bg-raised, texto --dx-fg). Una línea de --dx-text-xs, padding 6px 10px, radio --dx-radius-sm (D2.1 dibuja