@directo-ui/astro 1.1.0 → 1.3.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/README.md +2 -0
- package/components.css +475 -2
- package/index.d.ts +10 -0
- package/index.js +9 -0
- package/package.json +15 -7
- package/src/components/Autocomplete.astro +106 -0
- package/src/components/DataTable.astro +136 -0
- package/src/components/DateRangePicker.astro +105 -0
- package/src/components/Drawer.astro +40 -0
- package/src/components/FileUpload.astro +152 -0
- package/src/components/FilterBar.astro +66 -0
- package/src/components/Sidebar.astro +64 -0
- package/src/components/Timeline.astro +25 -0
- package/src/components/WariClientDetails.astro +87 -0
- package/src/components/WariClientSearch.astro +88 -0
- package/src/components/WariPassengerField.astro +84 -0
- package/src/components/WariRoute.astro +49 -0
- package/src/components/WariStepper.astro +9 -4
- package/src/components/WariSwitchList.astro +86 -8
- package/src/components/WariTripAttributes.astro +1 -1
- package/src/files.d.ts +27 -0
- package/src/files.js +52 -0
- package/src/modal.d.ts +3 -3
- package/src/modal.js +50 -39
- package/src/wari/motion.d.ts +14 -0
- package/src/wari/motion.js +60 -0
- package/src/wari/route-client.d.ts +10 -0
- package/src/wari/route-client.js +270 -0
- package/src/wari/route.d.ts +48 -0
- package/src/wari/route.js +71 -0
- package/src/wari/trip-client.js +152 -4
- package/src/wari/trip.d.ts +51 -0
- package/src/wari/trip.js +64 -4
- package/wari.d.ts +8 -2
- package/wari.js +6 -1
package/README.md
CHANGED
|
@@ -29,6 +29,8 @@ import { WariStatusSelect, MultiSelect, StatusTag, WariSchedule, WariTripAttribu
|
|
|
29
29
|
---
|
|
30
30
|
<WariStatusSelect name="estado" value={['libre']} />
|
|
31
31
|
<StatusTag status="aceptado" />
|
|
32
|
+
<WariClientSearch action="/clientes" createHref="/clientes/nuevo" /> <!-- o escucha ds-search / ds-create; carga: aria-busy="true" -->
|
|
33
|
+
<WariClientDetails name="Mori Suarez, Victor Manuel (VIP)" phone="985985985" /> <!-- ds-rates / ds-info / ds-edit -->
|
|
32
34
|
<WariTripAttributes name="trip" /> <!-- envía trip.service, trip.mode, trip.extras, trip.vehicles, trip.payment -->
|
|
33
35
|
<WariSchedule date="2026-05-27" time="23:50" dateName="fecha" timeName="hora" />
|
|
34
36
|
```
|
package/components.css
CHANGED
|
@@ -74,6 +74,7 @@
|
|
|
74
74
|
html body[data-scroll-locked] { margin-right: 0 !important; }
|
|
75
75
|
}
|
|
76
76
|
html:has(dialog.ds-dialog[open]), html:has(dialog.ds-sheet[open]) { overflow: hidden; }
|
|
77
|
+
html:has(dialog.ds-drawer[open]) { overflow: hidden; }
|
|
77
78
|
|
|
78
79
|
[class^="ds-"], [class*=" ds-"] { box-sizing: border-box; }
|
|
79
80
|
/* The hidden attribute must win over component display values. */
|
|
@@ -1119,8 +1120,9 @@ dialog.ds-sheet[open] { animation: ds-sheet-up 280ms var(--ds-ease-out) both; }
|
|
|
1119
1120
|
display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; min-height: 36px; padding: 6px 12px;
|
|
1120
1121
|
color: #676F88; font: 500 14px/1.2 var(--ds-font-sans); letter-spacing: -.02em; cursor: pointer;
|
|
1121
1122
|
}
|
|
1122
|
-
.ds-wswitch
|
|
1123
|
-
.ds-
|
|
1123
|
+
.ds-wswitch-item { display: flex; flex: 1; flex-direction: column; min-width: 0; }
|
|
1124
|
+
.ds-wswitch-item + .ds-wswitch-item { border-top: 1px solid var(--ds-border-secondary, #DADBDE); }
|
|
1125
|
+
.ds-wswitches[data-orientation="horizontal"] > .ds-wswitch-item + .ds-wswitch-item { border-top: 0; border-left: 1px solid var(--ds-border-secondary, #DADBDE); }
|
|
1124
1126
|
.ds-wswitch:has(input:checked) { color: var(--ds-text-primary); }
|
|
1125
1127
|
.ds-wswitch:has(input:disabled) { opacity: .5; cursor: not-allowed; }
|
|
1126
1128
|
.dark .ds-wswitch, [data-theme="dark"] .ds-wswitch { color: var(--ds-text-secondary); }
|
|
@@ -1157,3 +1159,474 @@ dialog.ds-sheet[open] { animation: ds-sheet-up 280ms var(--ds-ease-out) both; }
|
|
|
1157
1159
|
.ds-wselect .ds-wselect-list { padding-block: 0; }
|
|
1158
1160
|
.ds-multiselect .ds-multiselect-list { padding: 8px; }
|
|
1159
1161
|
.ds-wselect .ds-wselect-option, .ds-multiselect .ds-multiselect-option, .ds-multiselect .ds-multiselect-empty { margin: 0; }
|
|
1162
|
+
|
|
1163
|
+
/* ==========================================================================
|
|
1164
|
+
Wari: Cliente / usuario (WariClientSearch)
|
|
1165
|
+
========================================================================== */
|
|
1166
|
+
.ds-wcard[data-hover="lift"] { transition: box-shadow var(--ds-duration-base, 200ms) var(--ds-ease-out); }
|
|
1167
|
+
.ds-wcard[data-hover="lift"]:hover, .ds-wcard[data-hover="lift"]:focus-within { box-shadow: 0 8px 36px rgb(0 0 0 / .17); }
|
|
1168
|
+
.ds-wclient .ds-wcard-header { padding-left: 8px; padding-right: 4px; gap: 10px; }
|
|
1169
|
+
.ds-wclient .ds-wcard-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1170
|
+
.ds-wcard-action {
|
|
1171
|
+
display: inline-flex; flex: none; align-items: center; gap: 4px; height: 32px; padding: 0 4px; border: 0; border-radius: 8px;
|
|
1172
|
+
color: var(--ds-bg-brand-primary); background: transparent; font: 500 14px/1 var(--ds-font-sans); text-decoration: none; cursor: pointer;
|
|
1173
|
+
transition: background-color var(--ds-duration-fast);
|
|
1174
|
+
}
|
|
1175
|
+
.ds-wcard-action:hover { background: color-mix(in srgb, var(--ds-bg-brand-primary) 8%, transparent); }
|
|
1176
|
+
.ds-wcard-action:focus-visible { outline: 2px solid var(--ds-bg-brand-primary); outline-offset: 1px; }
|
|
1177
|
+
.ds-wcard-action > svg { width: 16px; height: 16px; flex: none; }
|
|
1178
|
+
.ds-wsearch { margin: 0; }
|
|
1179
|
+
.ds-wsearch .ds-input-shell { min-height: 34px; padding: 0 8px; border: 1px solid var(--ds-border-secondary, #DADBDE); background: var(--ds-bg-primary); }
|
|
1180
|
+
.ds-wsearch .ds-input-shell:hover { border-color: var(--ds-color-neutral-400); }
|
|
1181
|
+
.ds-wsearch .ds-input-shell:focus-within { border-color: var(--ds-bg-brand-primary); box-shadow: 0 0 0 1px var(--ds-bg-brand-primary); }
|
|
1182
|
+
.ds-wsearch .ds-input-shell > svg { flex: none; width: 24px; height: 24px; color: #676F88; }
|
|
1183
|
+
.ds-wsearch .ds-input-shell > input { height: 32px; font-size: 14px; letter-spacing: -.02em; }
|
|
1184
|
+
.ds-wsearch .ds-input-shell > input::placeholder { color: #676F88; }
|
|
1185
|
+
.ds-wsearch .ds-input-shell > input::-webkit-search-cancel-button { cursor: pointer; }
|
|
1186
|
+
.ds-wclient-results:empty { display: none; }
|
|
1187
|
+
|
|
1188
|
+
/* Cliente / usuario: estados (enfocado fino como en Figma, cargando) */
|
|
1189
|
+
.ds-wsearch .ds-input-shell:focus-within { box-shadow: none; }
|
|
1190
|
+
.ds-wclient-progress {
|
|
1191
|
+
position: relative; height: 8px; overflow: hidden; border-radius: 8px; background: #D0EDFF;
|
|
1192
|
+
}
|
|
1193
|
+
.ds-wclient-progress::after {
|
|
1194
|
+
content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 24%; border-radius: 4px; background: #73C9FF;
|
|
1195
|
+
animation: ds-wclient-progress 1.2s ease-in-out infinite;
|
|
1196
|
+
}
|
|
1197
|
+
@keyframes ds-wclient-progress { from { transform: translateX(-100%); } to { transform: translateX(420%); } }
|
|
1198
|
+
@media (prefers-reduced-motion: reduce) { .ds-wclient-progress::after { animation: none; width: 40%; } }
|
|
1199
|
+
.dark .ds-wclient-progress, [data-theme="dark"] .ds-wclient-progress { background: rgb(115 201 255 / .18); }
|
|
1200
|
+
|
|
1201
|
+
/* Ficha del cliente elegido (WariClientDetails) */
|
|
1202
|
+
.ds-wclient-details { display: flex; flex-direction: column; gap: 12px; min-width: 0; color: var(--ds-text-secondary, #474D59); font-family: var(--ds-font-sans); }
|
|
1203
|
+
.ds-wclient-summary { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
|
|
1204
|
+
.ds-wclient-banner {
|
|
1205
|
+
--ds-wclient-tone: #B1510C; --ds-wclient-tone-bg: #FDF1C8;
|
|
1206
|
+
display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 12px;
|
|
1207
|
+
border: 1px solid var(--ds-wclient-tone-border, var(--ds-wclient-tone)); border-left-width: 5px; border-radius: 4px;
|
|
1208
|
+
color: var(--ds-wclient-tone); background: var(--ds-wclient-tone-bg); font-size: 14px; line-height: 1.5; letter-spacing: -.02em;
|
|
1209
|
+
}
|
|
1210
|
+
/* Sin VIP (Figma "Usuario VIP / sin VIP"): texto azul oscuro, borde celeste. */
|
|
1211
|
+
.ds-wclient-banner[data-tone="info"] { --ds-wclient-tone: #11278F; --ds-wclient-tone-bg: #E8F6FF; --ds-wclient-tone-border: #73C9FF; }
|
|
1212
|
+
.ds-wclient-banner[data-tone="neutral"] { --ds-wclient-tone: #474D59; --ds-wclient-tone-bg: #F2F4FA; }
|
|
1213
|
+
.dark .ds-wclient-banner, [data-theme="dark"] .ds-wclient-banner {
|
|
1214
|
+
color: color-mix(in srgb, var(--ds-wclient-tone) 45%, #fff); background: color-mix(in srgb, var(--ds-wclient-tone) 20%, transparent);
|
|
1215
|
+
}
|
|
1216
|
+
.ds-wclient-name { margin: 0; overflow: hidden; font-size: 16px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
|
|
1217
|
+
.ds-wclient-company { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1218
|
+
.ds-wclient-phone { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; color: inherit; text-decoration: underline; text-underline-offset: 2px; }
|
|
1219
|
+
.ds-wclient-phone > svg { flex: none; width: 16px; height: 16px; }
|
|
1220
|
+
.ds-wclient-phone:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 2px; }
|
|
1221
|
+
.ds-wclient-actions { display: flex; flex: none; flex-direction: column; gap: 4px; }
|
|
1222
|
+
.ds-wclient-actions > div { display: flex; gap: 4px; }
|
|
1223
|
+
.ds-wclient-rates {
|
|
1224
|
+
height: 32px; padding: 0 14px; border: 0; border-radius: 8px; color: #F2F4FA; background: var(--ds-bg-brand-primary);
|
|
1225
|
+
font: 500 14px/1 var(--ds-font-sans); cursor: pointer;
|
|
1226
|
+
}
|
|
1227
|
+
.ds-wclient-rates:hover { background: var(--ds-color-primary-600, #0843C2); }
|
|
1228
|
+
.ds-wclient-icon {
|
|
1229
|
+
display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px;
|
|
1230
|
+
color: var(--ds-bg-brand-primary); background: #E8F6FF; cursor: pointer;
|
|
1231
|
+
}
|
|
1232
|
+
.ds-wclient-icon:hover { background: #D0EDFF; }
|
|
1233
|
+
.ds-wclient-icon > svg { width: 16px; height: 16px; }
|
|
1234
|
+
.dark .ds-wclient-icon, [data-theme="dark"] .ds-wclient-icon { background: rgb(64 123 255 / .18); color: #A9C1F7; }
|
|
1235
|
+
.ds-wclient-rates:focus-visible, .ds-wclient-icon:focus-visible { outline: 2px solid var(--ds-bg-brand-primary); outline-offset: 2px; }
|
|
1236
|
+
.ds-wclient-rates:disabled, .ds-wclient-icon:disabled { opacity: .5; cursor: not-allowed; }
|
|
1237
|
+
|
|
1238
|
+
/* Panel de campos de la cuenta: campos compactos con fondo blanco sobre gris */
|
|
1239
|
+
.ds-wclient-fields {
|
|
1240
|
+
display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; border-radius: 8px; background: #E3E7F1;
|
|
1241
|
+
}
|
|
1242
|
+
.dark .ds-wclient-fields, [data-theme="dark"] .ds-wclient-fields { background: var(--ds-bg-secondary); }
|
|
1243
|
+
.ds-wclient-fields .ds-input { gap: 2px; }
|
|
1244
|
+
.ds-wclient-fields .ds-input > label { color: #474D59; font-size: 12px; font-weight: 400; }
|
|
1245
|
+
.dark .ds-wclient-fields .ds-input > label, [data-theme="dark"] .ds-wclient-fields .ds-input > label { color: var(--ds-text-secondary); }
|
|
1246
|
+
.ds-wclient-fields .ds-input-shell { min-height: 26px; padding: 0 4px 0 8px; border: 1px solid transparent; background: var(--ds-bg-primary); }
|
|
1247
|
+
.ds-wclient-fields .ds-input-shell > input, .ds-wclient-fields .ds-input-shell > select { height: 24px; font-size: 14px; }
|
|
1248
|
+
.ds-wclient-fields .ds-wselect .ds-input-shell { min-height: 26px; padding-left: 8px; border-color: transparent; }
|
|
1249
|
+
.ds-wclient-fields .ds-wselect-value { font-size: 14px; }
|
|
1250
|
+
.ds-wclient-fields .ds-wselect-caret svg { width: 16px; height: 16px; }
|
|
1251
|
+
|
|
1252
|
+
/* Observaciones de solo lectura */
|
|
1253
|
+
.ds-wclient-notes { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
|
|
1254
|
+
.ds-wclient-notes > span > em { color: #11278F; font-style: normal; }
|
|
1255
|
+
.dark .ds-wclient-notes > span > em, [data-theme="dark"] .ds-wclient-notes > span > em { color: #A9C1F7; }
|
|
1256
|
+
.ds-wclient-notes > p {
|
|
1257
|
+
margin: 0; min-height: 64px; padding: 12px; border: 1px solid var(--ds-border-secondary, #DADBDE); border-radius: 8px;
|
|
1258
|
+
color: var(--ds-text-secondary, #474D59); white-space: pre-wrap;
|
|
1259
|
+
}
|
|
1260
|
+
.ds-wclient-fields:empty { display: none; }
|
|
1261
|
+
.ds-wclient-progress[data-ds-progress] { display: none; }
|
|
1262
|
+
.ds-wclient[aria-busy="true"] .ds-wclient-progress[data-ds-progress] { display: block; }
|
|
1263
|
+
/* Párrafos propios: no heredan márgenes de estilos de texto de la página (p. ej. `.prose p`). */
|
|
1264
|
+
.ds-wclient-details .ds-wclient-name, .ds-wclient-details .ds-wclient-notes > p { margin: 0; }
|
|
1265
|
+
.ds-wclient-banner .ds-wclient-phone { color: inherit; text-decoration: underline; }
|
|
1266
|
+
|
|
1267
|
+
/* Extras desplegables (Booster: descripción, cantidad y nota al activarlo) */
|
|
1268
|
+
.ds-wswitch-panel { display: flex; flex-direction: column; gap: 8px; padding: 0 12px 12px; }
|
|
1269
|
+
.ds-wswitch-panel[hidden] { display: none; }
|
|
1270
|
+
.ds-wswitch-desc { margin: -4px 0 0; color: #474D59; font-size: 14px; line-height: 1.5; letter-spacing: -.02em; }
|
|
1271
|
+
.dark .ds-wswitch-desc, [data-theme="dark"] .ds-wswitch-desc { color: var(--ds-text-secondary); }
|
|
1272
|
+
.ds-wswitch-note {
|
|
1273
|
+
margin: 0; padding: 8px 16px; border-radius: 8px; color: #fff; background: #2C313A; box-shadow: 0 8px 36px rgb(0 0 0 / .17);
|
|
1274
|
+
font-size: 12px; line-height: 1.5; letter-spacing: -.01em;
|
|
1275
|
+
}
|
|
1276
|
+
.dark .ds-wswitch-note, [data-theme="dark"] .ds-wswitch-note { background: #3A4152; }
|
|
1277
|
+
|
|
1278
|
+
/* Contador con botones con borde (variante del diseño del Booster) */
|
|
1279
|
+
.ds-wstepper[data-variant="outlined"] .ds-input-shell { min-height: 48px; padding: 8px; gap: 8px; border: 0; }
|
|
1280
|
+
.ds-wstepper[data-variant="outlined"] .ds-wstepper-button {
|
|
1281
|
+
width: 32px; height: 32px; border: 1px solid var(--ds-bg-brand-primary); border-radius: 8px; color: var(--ds-bg-brand-primary);
|
|
1282
|
+
background: transparent;
|
|
1283
|
+
}
|
|
1284
|
+
.ds-wstepper[data-variant="outlined"] .ds-wstepper-button:hover:not(:disabled) { background: color-mix(in srgb, var(--ds-bg-brand-primary) 8%, transparent); }
|
|
1285
|
+
.ds-wstepper[data-variant="outlined"] .ds-wstepper-button:disabled { border-color: #DADBDE; color: #B8BDC9; }
|
|
1286
|
+
.ds-wstepper[data-variant="outlined"] .ds-input-shell > input { color: #474D59; }
|
|
1287
|
+
.dark .ds-wstepper[data-variant="outlined"] .ds-input-shell > input, [data-theme="dark"] .ds-wstepper[data-variant="outlined"] .ds-input-shell > input { color: var(--ds-text-primary); }
|
|
1288
|
+
/* El aviso y la descripción de los extras no heredan colores ni márgenes de estilos de texto de la página (p. ej. `.prose p`). */
|
|
1289
|
+
.ds-wswitches .ds-wswitch-note { margin: 0; color: #fff; }
|
|
1290
|
+
.ds-wswitches .ds-wswitch-desc { margin: -4px 0 0; color: #474D59; }
|
|
1291
|
+
.dark .ds-wswitches .ds-wswitch-desc, [data-theme="dark"] .ds-wswitches .ds-wswitch-desc { color: var(--ds-text-secondary); }
|
|
1292
|
+
/* Títulos y textos propios de Wari: ignoran estilos de texto de la página (`.prose h3`, `.prose p`…). */
|
|
1293
|
+
.ds-wcard-header > .ds-wcard-title, .ds-wschedule-header > .ds-wschedule-title { margin: 0; color: inherit; font: 500 16px/1.5 var(--ds-font-sans); letter-spacing: -.02em; }
|
|
1294
|
+
.ds-wclient-banner > .ds-wclient-name { margin: 0; color: inherit; font-size: 16px; font-weight: 500; line-height: 1.5; }
|
|
1295
|
+
.ds-wclient-details .ds-wclient-notes > p { color: var(--ds-text-secondary, #474D59); }
|
|
1296
|
+
|
|
1297
|
+
/* Extras con una opción por unidad (Carseat: una edad por carseat, + para agregar, papelera para quitar) */
|
|
1298
|
+
.ds-wswitch-units { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 8px; background: #F2F4FA; }
|
|
1299
|
+
.dark .ds-wswitch-units, [data-theme="dark"] .ds-wswitch-units { background: var(--ds-bg-secondary); }
|
|
1300
|
+
.ds-wswitch-unit { display: flex; align-items: flex-start; gap: 8px; }
|
|
1301
|
+
.ds-wswitch-unit > .ds-wselect { flex: 1; min-width: 0; }
|
|
1302
|
+
.ds-wswitch-unit .ds-wselect .ds-input-shell { min-height: 32px; }
|
|
1303
|
+
.ds-wswitch-unit-button {
|
|
1304
|
+
display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; margin-top: 1px; padding: 0;
|
|
1305
|
+
border: 1px solid var(--ds-bg-brand-primary); border-radius: 8px; color: var(--ds-bg-brand-primary); background: var(--ds-bg-primary); cursor: pointer;
|
|
1306
|
+
}
|
|
1307
|
+
.ds-wswitch-unit-button:hover { background: color-mix(in srgb, var(--ds-bg-brand-primary) 8%, var(--ds-bg-primary)); }
|
|
1308
|
+
.ds-wswitch-unit-button:focus-visible { outline: 2px solid var(--ds-bg-brand-primary); outline-offset: 2px; }
|
|
1309
|
+
.ds-wswitch-unit-button:disabled { border-color: #DADBDE; color: #B8BDC9; cursor: not-allowed; }
|
|
1310
|
+
.ds-wswitch-unit-button > svg { width: 16px; height: 16px; }
|
|
1311
|
+
|
|
1312
|
+
/* Extras con campos propios (Carga: peso aproximado y valor estimado) */
|
|
1313
|
+
.ds-wswitch-fields { display: flex; gap: 8px; padding: 12px; border-radius: 8px; background: #F2F4FA; }
|
|
1314
|
+
.dark .ds-wswitch-fields, [data-theme="dark"] .ds-wswitch-fields { background: var(--ds-bg-secondary); }
|
|
1315
|
+
.ds-wswitch-fields .ds-wswitch-field {
|
|
1316
|
+
flex: 1; min-width: 0; height: 32px; margin: 0; padding: 0 8px; border: 1px solid var(--ds-border-secondary, #DADBDE); border-radius: 8px;
|
|
1317
|
+
color: var(--ds-text-secondary, #474D59); background: var(--ds-bg-primary); font: 400 14px/1 var(--ds-font-sans); letter-spacing: -.02em; outline: none;
|
|
1318
|
+
transition: border-color var(--ds-duration-fast);
|
|
1319
|
+
}
|
|
1320
|
+
.ds-wswitch-fields .ds-wswitch-field[data-fixed="true"] { flex: none; }
|
|
1321
|
+
.ds-wswitch-fields .ds-wswitch-field::placeholder { color: var(--ds-text-placeholder, #8A92A6); opacity: 1; }
|
|
1322
|
+
.ds-wswitch-fields .ds-wswitch-field:hover:not(:disabled) { border-color: var(--ds-color-neutral-400); }
|
|
1323
|
+
.ds-wswitch-fields .ds-wswitch-field:focus-visible { border-color: var(--ds-bg-brand-primary); }
|
|
1324
|
+
.ds-wswitch-fields .ds-wswitch-field:disabled { background: var(--ds-bg-secondary); cursor: not-allowed; }
|
|
1325
|
+
|
|
1326
|
+
/* ==========================================================================
|
|
1327
|
+
Wari: Rutas (WariRoute) — paradas reordenables, pasajeros, peajes e invertir
|
|
1328
|
+
========================================================================== */
|
|
1329
|
+
.ds-wroute .ds-wcard-header { gap: 12px; }
|
|
1330
|
+
.ds-wroute .ds-wcard-title { flex: none; }
|
|
1331
|
+
.ds-wroute-header-spacer { flex: 1; }
|
|
1332
|
+
.ds-wroute-pill, .ds-wroute-link, .ds-wroute-add, .ds-wroute-toll-add, .ds-wroute-stop-passenger {
|
|
1333
|
+
display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border: 0; border-radius: 8px;
|
|
1334
|
+
background: transparent; font: 500 14px/1 var(--ds-font-sans); letter-spacing: -.02em; cursor: pointer; white-space: nowrap;
|
|
1335
|
+
transition: background-color var(--ds-duration-fast);
|
|
1336
|
+
}
|
|
1337
|
+
.ds-wroute-pill { color: var(--ds-bg-brand-primary); background: #E8F6FF; }
|
|
1338
|
+
.ds-wroute-pill:hover { background: #D0EDFF; }
|
|
1339
|
+
.ds-wroute-link, .ds-wroute-add { color: var(--ds-bg-brand-primary); }
|
|
1340
|
+
.ds-wroute-link:hover, .ds-wroute-add:hover, .ds-wroute-stop-passenger:hover, .ds-wroute-toll-add:hover {
|
|
1341
|
+
background: color-mix(in srgb, var(--ds-bg-brand-primary) 8%, transparent);
|
|
1342
|
+
}
|
|
1343
|
+
.ds-wroute-toll-add { height: 28px; padding: 0 8px; color: var(--ds-text-primary); }
|
|
1344
|
+
.ds-wroute-stop-passenger { height: 28px; color: var(--ds-text-secondary, #474D59); font-weight: 500; }
|
|
1345
|
+
.ds-wroute :is(.ds-wroute-pill, .ds-wroute-link, .ds-wroute-add, .ds-wroute-toll-add, .ds-wroute-stop-passenger) > svg { flex: none; width: 16px; height: 16px; }
|
|
1346
|
+
.ds-wroute :is(button):focus-visible, .ds-wroute input:focus-visible { outline: 2px solid var(--ds-bg-brand-primary); outline-offset: 1px; }
|
|
1347
|
+
.ds-wroute :is(button):disabled { opacity: .45; cursor: not-allowed; }
|
|
1348
|
+
.dark .ds-wroute-pill, [data-theme="dark"] .ds-wroute-pill { background: rgb(64 123 255 / .16); color: #A9C1F7; }
|
|
1349
|
+
|
|
1350
|
+
/* Inputs propios (sin borde, sobre fondos grises) */
|
|
1351
|
+
.ds-wroute input.ds-wroute-input {
|
|
1352
|
+
min-width: 0; height: 28px; margin: 0; padding: 0 4px; border: 0; border-radius: 6px; outline: none;
|
|
1353
|
+
color: var(--ds-text-primary); background: transparent; font: 400 14px/1 var(--ds-font-sans); letter-spacing: -.02em;
|
|
1354
|
+
}
|
|
1355
|
+
.ds-wroute input.ds-wroute-input::placeholder { color: #8A92A6; opacity: 1; }
|
|
1356
|
+
.ds-wroute input.ds-wroute-input.ds-wroute-input-sm { font-size: 12px; }
|
|
1357
|
+
|
|
1358
|
+
/* Pasajero (ruta completa o de una parada) */
|
|
1359
|
+
.ds-wroute-passenger-block { display: flex; flex-direction: column; gap: 4px; padding-left: 40px; }
|
|
1360
|
+
.ds-wroute-passenger { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 8px; border-radius: 8px; background: #E3E7F1; }
|
|
1361
|
+
.ds-wroute-passenger > label { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; color: #676F88; }
|
|
1362
|
+
.ds-wroute-passenger > label > svg { flex: none; width: 16px; height: 16px; }
|
|
1363
|
+
.ds-wroute-passenger .ds-wroute-input { flex: 1; font-size: 12px; }
|
|
1364
|
+
.ds-wroute-clear { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; color: #474D59; background: transparent; cursor: pointer; }
|
|
1365
|
+
.ds-wroute-clear:hover { background: rgb(0 0 0 / .06); }
|
|
1366
|
+
.ds-wroute-clear > svg { width: 16px; height: 16px; }
|
|
1367
|
+
.ds-wroute-info { margin: 0; padding: 8px 16px; border-radius: 8px; color: #11278F; background: #CEDCFA; font: 400 12px/1.5 var(--ds-font-sans); }
|
|
1368
|
+
.dark .ds-wroute .ds-wroute-passenger, [data-theme="dark"] .ds-wroute .ds-wroute-passenger { background: var(--ds-bg-tertiary, #2A2F3A); }
|
|
1369
|
+
.dark .ds-wroute-passenger > label, [data-theme="dark"] .ds-wroute-passenger > label, .dark .ds-wroute-clear, [data-theme="dark"] .ds-wroute-clear { color: var(--ds-text-secondary); }
|
|
1370
|
+
.dark .ds-wroute-info, [data-theme="dark"] .ds-wroute-info { color: #CFDEFC; background: rgb(64 123 255 / .2); }
|
|
1371
|
+
|
|
1372
|
+
/* Paradas */
|
|
1373
|
+
.ds-wroute-stops { display: flex; flex-direction: column; gap: 12px; max-height: var(--ds-wroute-max-height, 340px); margin: 0; padding: 0 4px 0 0; overflow-y: auto; list-style: none; scrollbar-width: thin; scrollbar-color: #DADBDE transparent; }
|
|
1374
|
+
.ds-wroute-stop { display: flex; align-items: flex-start; gap: 8px; }
|
|
1375
|
+
.ds-wroute-stop[data-dragging="true"] { opacity: .45; }
|
|
1376
|
+
.ds-wroute-stop[data-drop="true"] > .ds-wroute-stop-box { box-shadow: 0 -2px 0 var(--ds-bg-brand-primary); }
|
|
1377
|
+
.ds-wroute-handle, .ds-wroute-remove {
|
|
1378
|
+
display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px;
|
|
1379
|
+
color: var(--ds-bg-brand-primary); background: transparent; cursor: grab;
|
|
1380
|
+
}
|
|
1381
|
+
.ds-wroute-handle:active { cursor: grabbing; }
|
|
1382
|
+
.ds-wroute-remove { background: #F2F4FA; cursor: pointer; }
|
|
1383
|
+
.ds-wroute-remove:hover { background: #E3E7F1; }
|
|
1384
|
+
.ds-wroute-handle > svg, .ds-wroute-remove > svg { width: 18px; height: 18px; }
|
|
1385
|
+
.ds-wroute-stop-box { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; padding: 4px 8px 4px 0; border-radius: 8px; background: #F2F4FA; }
|
|
1386
|
+
.dark .ds-wroute-stop-box, [data-theme="dark"] .ds-wroute-stop-box, .dark .ds-wroute-remove, [data-theme="dark"] .ds-wroute-remove { background: var(--ds-bg-secondary); }
|
|
1387
|
+
.ds-wroute-stop-main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding-bottom: 4px; border-bottom: 1px solid #DADBDE; }
|
|
1388
|
+
.ds-wroute-address { display: flex; flex: 1 1 220px; align-items: center; gap: 8px; min-width: 0; padding-left: 12px; }
|
|
1389
|
+
.ds-wroute-address > .ds-wroute-input { flex: 1; }
|
|
1390
|
+
.ds-wroute-address > svg { flex: none; width: 16px; height: 16px; color: var(--ds-bg-brand-primary); }
|
|
1391
|
+
.ds-wroute-zone { display: inline-flex; align-items: center; gap: 4px; padding: 0 12px; color: #676F88; font: 400 12px/1.5 var(--ds-font-sans); white-space: nowrap; }
|
|
1392
|
+
.ds-wroute-zone > strong { color: #11278F; font-weight: 500; }
|
|
1393
|
+
.ds-wroute-price { padding: 0 12px; color: var(--ds-text-primary); font: 500 12px/1.5 var(--ds-font-sans); white-space: nowrap; }
|
|
1394
|
+
.dark .ds-wroute-zone > strong, [data-theme="dark"] .ds-wroute-zone > strong { color: #A9C1F7; }
|
|
1395
|
+
.ds-wroute-stop-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding-left: 32px; }
|
|
1396
|
+
.ds-wroute-stop-extra > .ds-wroute-input { flex: 1 1 200px; }
|
|
1397
|
+
.ds-wroute-stop-box .ds-wroute-passenger { margin-left: 32px; background: #E3E7F1; }
|
|
1398
|
+
|
|
1399
|
+
/* Agregar destino y peajes */
|
|
1400
|
+
.ds-wroute-add { align-self: flex-start; margin-left: 32px; }
|
|
1401
|
+
.ds-wroute-tolls { display: flex; flex-direction: column; gap: 8px; width: min(331px, 100%); margin-left: 40px; padding: 8px 12px; border-radius: 8px; background: #F2F4FA; }
|
|
1402
|
+
.dark .ds-wroute-tolls, [data-theme="dark"] .ds-wroute-tolls { background: var(--ds-bg-secondary); }
|
|
1403
|
+
.ds-wroute-toll { display: flex; align-items: center; gap: 12px; color: var(--ds-text-secondary, #474D59); font: 400 14px/1.5 var(--ds-font-sans); }
|
|
1404
|
+
.ds-wroute-toll > label { width: 56px; flex: none; }
|
|
1405
|
+
.ds-wroute-toll > input.ds-wroute-input { flex: 1; height: 32px; padding: 0 8px; border: 1px solid #DADBDE; border-radius: 8px; background: var(--ds-bg-primary); }
|
|
1406
|
+
.ds-wroute-toll > .ds-wroute-clear { width: 24px; height: 24px; }
|
|
1407
|
+
.ds-wroute-toll-add { align-self: flex-start; }
|
|
1408
|
+
|
|
1409
|
+
/* Invertir: cargando y éxito */
|
|
1410
|
+
.ds-wroute-status { display: flex; flex-direction: column; gap: 8px; color: #2F6BF2; font: 400 14px/1.5 var(--ds-font-sans); }
|
|
1411
|
+
.ds-wroute-success {
|
|
1412
|
+
margin: 0 16px 0 40px; padding: 8px 16px; border-radius: 8px; color: #166534; background: #DCFCE7; box-shadow: 0 8px 36px rgb(0 0 0 / .17);
|
|
1413
|
+
font: 400 12px/1.5 var(--ds-font-sans);
|
|
1414
|
+
}
|
|
1415
|
+
.dark .ds-wroute-success, [data-theme="dark"] .ds-wroute-success { color: #A7F3C4; background: rgb(22 101 52 / .35); }
|
|
1416
|
+
/* Párrafos y listas propias: ignoran estilos de texto de la página (`.prose p`, `.prose ul`…). */
|
|
1417
|
+
.ds-wroute .ds-wroute-info, .ds-wroute .ds-wroute-success { margin-top: 0; margin-bottom: 0; }
|
|
1418
|
+
.ds-wroute .ds-wroute-stops { margin: 0; padding-left: 0; }
|
|
1419
|
+
.ds-wroute .ds-wroute-stops > li { margin: 0; }
|
|
1420
|
+
@media (max-width: 560px) {
|
|
1421
|
+
.ds-wroute-passenger-block, .ds-wroute-tolls { margin-left: 0; padding-left: 0; }
|
|
1422
|
+
.ds-wroute-passenger { flex-wrap: wrap; }
|
|
1423
|
+
.ds-wroute .ds-wcard-header { flex-wrap: wrap; }
|
|
1424
|
+
}
|
|
1425
|
+
.dark .ds-wroute-stop-main, [data-theme="dark"] .ds-wroute-stop-main { border-bottom-color: var(--ds-border-primary); }
|
|
1426
|
+
.dark .ds-wroute-toll > input.ds-wroute-input, [data-theme="dark"] .ds-wroute-toll > input.ds-wroute-input { border-color: var(--ds-border-primary); }
|
|
1427
|
+
.ds-wroute :is(.ds-wroute-add, .ds-wroute-toll-add) > svg path { stroke: var(--ds-bg-primary, #fff); }
|
|
1428
|
+
|
|
1429
|
+
/* Wari Rutas: movimiento (deslizar al reordenar, aparecer y desvanecer lo hacen motion.ts; aquí los estados) */
|
|
1430
|
+
.ds-wroute-stop-box { transition: background-color var(--ds-duration-fast, .15s) ease, box-shadow .2s ease, transform .2s ease; }
|
|
1431
|
+
.ds-wroute-stop:hover > .ds-wroute-stop-box { background: #ECEFF7; }
|
|
1432
|
+
.ds-wroute-stop:focus-within > .ds-wroute-stop-box { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ds-bg-brand-primary) 45%, transparent); }
|
|
1433
|
+
.dark .ds-wroute-stop:hover > .ds-wroute-stop-box, [data-theme="dark"] .ds-wroute-stop:hover > .ds-wroute-stop-box { background: var(--ds-bg-tertiary); }
|
|
1434
|
+
.ds-wroute-stop[data-dragging="true"] { opacity: 1; }
|
|
1435
|
+
.ds-wroute-stop[data-dragging="true"] > .ds-wroute-stop-box { opacity: .55; transform: scale(.985); box-shadow: 0 0 0 1px var(--ds-bg-brand-primary); }
|
|
1436
|
+
.ds-wroute-stop[data-drop="true"] > .ds-wroute-stop-box { box-shadow: 0 -3px 0 var(--ds-bg-brand-primary); transform: translateY(3px); }
|
|
1437
|
+
.ds-wroute-handle { transition: background-color .15s ease, transform .15s ease; }
|
|
1438
|
+
.ds-wroute-handle:hover { background: color-mix(in srgb, var(--ds-bg-brand-primary) 10%, transparent); }
|
|
1439
|
+
.ds-wroute-remove, .ds-wroute-clear { transition: background-color .15s ease, color .15s ease, transform .15s ease; }
|
|
1440
|
+
.ds-wroute-remove:hover { color: #C2410C; }
|
|
1441
|
+
.ds-wroute :is(.ds-wroute-pill, .ds-wroute-link, .ds-wroute-add, .ds-wroute-toll-add, .ds-wroute-stop-passenger, .ds-wroute-handle, .ds-wroute-remove, .ds-wroute-clear) { transition-property: background-color, color, transform; transition-duration: .15s; }
|
|
1442
|
+
.ds-wroute :is(.ds-wroute-pill, .ds-wroute-link, .ds-wroute-add, .ds-wroute-toll-add, .ds-wroute-stop-passenger, .ds-wroute-remove, .ds-wroute-clear):active:not(:disabled) { transform: scale(.95); }
|
|
1443
|
+
.ds-wroute-link > svg { transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
|
|
1444
|
+
.ds-wroute-link:hover:not(:disabled) > svg { transform: rotate(180deg); }
|
|
1445
|
+
.ds-wroute :is(.ds-wroute-add, .ds-wroute-toll-add) > svg { transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
|
|
1446
|
+
.ds-wroute :is(.ds-wroute-add, .ds-wroute-toll-add):hover:not(:disabled) > svg { transform: rotate(90deg); }
|
|
1447
|
+
.ds-wroute input.ds-wroute-input { transition: background-color .15s ease, box-shadow .15s ease; }
|
|
1448
|
+
.ds-wroute .ds-wroute-toll > input.ds-wroute-input { transition: border-color .15s ease, box-shadow .15s ease; }
|
|
1449
|
+
.ds-wroute .ds-wroute-toll > input.ds-wroute-input:focus { border-color: var(--ds-bg-brand-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ds-bg-brand-primary) 18%, transparent); outline: none; }
|
|
1450
|
+
.ds-wroute-status { animation: ds-wroute-fade .25s ease both; }
|
|
1451
|
+
.ds-wroute-success { animation: ds-wroute-toast 3s cubic-bezier(.2, .8, .2, 1) both; }
|
|
1452
|
+
@keyframes ds-wroute-fade { from { opacity: 0; } to { opacity: 1; } }
|
|
1453
|
+
@keyframes ds-wroute-toast {
|
|
1454
|
+
0% { opacity: 0; transform: translateY(-8px) scale(.97); }
|
|
1455
|
+
8%, 88% { opacity: 1; transform: none; }
|
|
1456
|
+
100% { opacity: 0; transform: translateY(-4px); }
|
|
1457
|
+
}
|
|
1458
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1459
|
+
.ds-wroute *, .ds-wroute *::before, .ds-wroute *::after { transition: none !important; animation-duration: .01ms !important; }
|
|
1460
|
+
.ds-wroute-success { animation: none; }
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
/* Pasajero (WariPassengerField): nombre y número en una fila gris, ⓧ para vaciarla y barra de carga debajo. */
|
|
1464
|
+
.ds-wpassenger {
|
|
1465
|
+
display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 4px; border-radius: 8px;
|
|
1466
|
+
color: #676F88; background: #E3E7F1; font-family: var(--ds-font-sans);
|
|
1467
|
+
}
|
|
1468
|
+
.ds-wpassenger-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
|
|
1469
|
+
.ds-wpassenger-field { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; padding: 4px 8px; border-radius: 8px; cursor: text; }
|
|
1470
|
+
.ds-wpassenger-field > svg { flex: none; width: 16px; height: 16px; margin: 4px; }
|
|
1471
|
+
.ds-wpassenger input.ds-wpassenger-input {
|
|
1472
|
+
flex: 1; min-width: 0; height: 24px; margin: 0; padding: 0; border: 0; outline: none; color: #474D59; background: transparent;
|
|
1473
|
+
caret-color: var(--ds-bg-brand-primary, #0A50E6); font: 400 12px/1.5 var(--ds-font-sans); letter-spacing: -.5px; text-overflow: ellipsis;
|
|
1474
|
+
}
|
|
1475
|
+
.ds-wpassenger input.ds-wpassenger-input::placeholder { color: #676F88; opacity: 1; }
|
|
1476
|
+
.ds-wpassenger-field:focus-within { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ds-bg-brand-primary, #0A50E6) 35%, transparent); }
|
|
1477
|
+
.ds-wpassenger-field:has(input:focus-visible) { box-shadow: inset 0 0 0 2px var(--ds-bg-brand-primary, #0A50E6); }
|
|
1478
|
+
.ds-wpassenger-clear {
|
|
1479
|
+
display: inline-flex; flex: none; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0;
|
|
1480
|
+
border-radius: 8px; color: #676F88; background: transparent; cursor: pointer; transition: background-color .15s ease, color .15s ease, transform .15s ease;
|
|
1481
|
+
}
|
|
1482
|
+
.ds-wpassenger-clear > svg { width: 16px; height: 16px; }
|
|
1483
|
+
.ds-wpassenger-clear:hover:not(:disabled) { color: #474D59; background: rgb(0 0 0 / .06); }
|
|
1484
|
+
.ds-wpassenger-clear:active:not(:disabled) { transform: scale(.92); }
|
|
1485
|
+
.ds-wpassenger-clear:focus-visible { outline: 2px solid var(--ds-bg-brand-primary, #0A50E6); outline-offset: 1px; }
|
|
1486
|
+
.ds-wpassenger :disabled { opacity: .5; cursor: not-allowed; }
|
|
1487
|
+
.ds-wpassenger-progress { animation: ds-wroute-fade .2s ease both; }
|
|
1488
|
+
.ds-wpassenger-progress[data-ds-progress] { display: none; }
|
|
1489
|
+
.ds-wpassenger[aria-busy="true"] .ds-wpassenger-progress[data-ds-progress] { display: block; }
|
|
1490
|
+
.ds-wpassenger-field > svg[hidden] { display: none; }
|
|
1491
|
+
@media (max-width: 480px) { .ds-wpassenger-row { flex-wrap: wrap; } .ds-wpassenger-field { flex-basis: calc(100% - 42px); } }
|
|
1492
|
+
.dark .ds-wpassenger, [data-theme="dark"] .ds-wpassenger { color: var(--ds-text-secondary); background: var(--ds-bg-tertiary, #2A2F3A); }
|
|
1493
|
+
.dark .ds-wpassenger input.ds-wpassenger-input, [data-theme="dark"] .ds-wpassenger input.ds-wpassenger-input { color: var(--ds-text-primary); }
|
|
1494
|
+
.dark .ds-wpassenger input.ds-wpassenger-input::placeholder, [data-theme="dark"] .ds-wpassenger input.ds-wpassenger-input::placeholder { color: var(--ds-text-tertiary, #8A92A6); }
|
|
1495
|
+
.dark .ds-wpassenger-clear, [data-theme="dark"] .ds-wpassenger-clear { color: var(--ds-text-secondary); }
|
|
1496
|
+
|
|
1497
|
+
/* Tables, filters and navigation */
|
|
1498
|
+
.ds-data-table, .ds-filter-bar, .ds-sidebar, .ds-timeline, .ds-date-range, .ds-file-upload {
|
|
1499
|
+
color: var(--ds-text-primary);
|
|
1500
|
+
font: 400 14px/1.5 var(--ds-font-sans);
|
|
1501
|
+
}
|
|
1502
|
+
.ds-data-table { display: grid; gap: 12px; min-inline-size: 0; }
|
|
1503
|
+
.ds-data-scroll { overflow: auto; border: 1px solid var(--ds-border-secondary); border-radius: 12px; }
|
|
1504
|
+
.ds-data-scroll:focus-visible, .ds-sort-button:focus-visible, .ds-filter-chip:focus-visible,
|
|
1505
|
+
.ds-sidebar a:focus-visible, .ds-file-upload input:focus-visible {
|
|
1506
|
+
outline: 2px solid var(--ds-border-focus);
|
|
1507
|
+
outline-offset: 2px;
|
|
1508
|
+
}
|
|
1509
|
+
.ds-data-table table { width: 100%; border-collapse: collapse; text-align: start; background: var(--ds-bg-primary); }
|
|
1510
|
+
.ds-data-table caption { padding: 12px 16px; text-align: start; font-weight: 700; background: var(--ds-bg-primary); }
|
|
1511
|
+
.ds-data-table th, .ds-data-table td { padding: 12px 16px; text-align: start; border-block-start: 1px solid var(--ds-border-secondary); }
|
|
1512
|
+
.ds-data-table th { background: var(--ds-bg-secondary); font-weight: 600; }
|
|
1513
|
+
.ds-data-table td a { color: var(--ds-text-link); }
|
|
1514
|
+
.ds-sort-button { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-align: start; }
|
|
1515
|
+
.ds-sort-button span { margin-inline-start: 4px; color: var(--ds-text-link); }
|
|
1516
|
+
.ds-filter-bar { display: grid; min-inline-size: 0; gap: 12px; }
|
|
1517
|
+
.ds-filter-fields, .ds-filter-active, .ds-date-range-fields { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
|
|
1518
|
+
.ds-filter-fields > *, .ds-date-range-fields > * { flex: 1 1 155px; min-inline-size: 0; }
|
|
1519
|
+
.ds-filter-active { align-items: center; gap: 8px; }
|
|
1520
|
+
.ds-filter-chip {
|
|
1521
|
+
display: inline-flex; align-items: center; gap: 8px; min-height: 32px; max-width: 100%;
|
|
1522
|
+
padding: 4px 10px; overflow-wrap: anywhere; border: 1px solid var(--ds-border-primary); border-radius: 20px;
|
|
1523
|
+
color: var(--ds-text-primary); background: var(--ds-bg-secondary); font: inherit; cursor: pointer; text-decoration: none;
|
|
1524
|
+
}
|
|
1525
|
+
.ds-filter-chip:hover { background: var(--ds-bg-secondary-hover); }
|
|
1526
|
+
.ds-sidebar { display: grid; gap: 16px; width: 100%; max-width: 260px; padding: 12px; background: var(--ds-bg-primary); }
|
|
1527
|
+
.ds-sidebar p { margin: 0 0 4px; padding-inline: 8px; color: var(--ds-text-secondary); font-weight: 600; }
|
|
1528
|
+
.ds-sidebar ul { display: grid; gap: 2px; list-style: none; padding: 0; margin: 0; }
|
|
1529
|
+
.ds-sidebar ul ul { margin-inline-start: 12px; }
|
|
1530
|
+
.ds-sidebar a { display: block; padding: 8px; color: var(--ds-text-primary); border-radius: 6px; text-decoration: none; }
|
|
1531
|
+
.ds-sidebar a:hover { background: var(--ds-bg-primary-hover); }
|
|
1532
|
+
.ds-sidebar a[aria-current="page"] { background: var(--ds-bg-brand-secondary); color: var(--ds-text-brand-primary); font-weight: 700; }
|
|
1533
|
+
|
|
1534
|
+
/* Drawer (Radix or native dialog) */
|
|
1535
|
+
.ds-drawer-overlay { position: fixed; inset: 0; z-index: 1200; background: var(--ds-overlay); }
|
|
1536
|
+
.ds-drawer {
|
|
1537
|
+
position: fixed; inset: 0 0 0 auto; z-index: 1201; margin: 0; padding: 0; width: min(100%, 440px);
|
|
1538
|
+
height: 100%; max-width: none; max-height: none; border: 0; border-inline-start: 1px solid var(--ds-border-secondary);
|
|
1539
|
+
background: var(--ds-bg-primary); color: var(--ds-text-primary); font: 400 14px/1.5 var(--ds-font-sans);
|
|
1540
|
+
}
|
|
1541
|
+
.ds-drawer[data-side="start"] { inset: 0 auto 0 0; border-inline-start: 0; border-inline-end: 1px solid var(--ds-border-secondary); }
|
|
1542
|
+
.ds-drawer:not(dialog), dialog.ds-drawer[open] { display: flex; flex-direction: column; }
|
|
1543
|
+
.ds-drawer::backdrop { background: var(--ds-overlay); }
|
|
1544
|
+
.ds-drawer-header {
|
|
1545
|
+
display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 24px;
|
|
1546
|
+
border-block-end: 1px solid var(--ds-border-secondary);
|
|
1547
|
+
}
|
|
1548
|
+
.ds-drawer-header h2 { margin: 0; font-size: 20px; }
|
|
1549
|
+
.ds-drawer-body { flex: 1; min-height: 0; overflow: auto; padding: 24px; }
|
|
1550
|
+
|
|
1551
|
+
/* Timeline and form fields */
|
|
1552
|
+
.ds-timeline { list-style: none; margin: 0; padding-inline-start: 0; }
|
|
1553
|
+
.ds-timeline li { position: relative; display: grid; gap: 2px; padding: 0 0 18px 18px; margin-inline-start: 6px; }
|
|
1554
|
+
.ds-timeline li:not(:last-child) { border-inline-start: 1px solid var(--ds-border-primary); }
|
|
1555
|
+
.ds-timeline li:last-child { border-inline-start: 1px solid transparent; padding-block-end: 0; }
|
|
1556
|
+
.ds-timeline li::before {
|
|
1557
|
+
content: ""; position: absolute; inset-inline-start: -5px; inset-block-start: 5px; width: 9px; height: 9px;
|
|
1558
|
+
border-radius: 50%; background: var(--ds-bg-brand-primary);
|
|
1559
|
+
}
|
|
1560
|
+
.ds-timeline time, .ds-timeline li > span { color: var(--ds-text-secondary); }
|
|
1561
|
+
.ds-date-range { padding: 0; margin: 0; border: 0; min-inline-size: 0; }
|
|
1562
|
+
.ds-date-range legend { padding: 0; margin-block-end: 6px; font-weight: 600; }
|
|
1563
|
+
.ds-file-upload { display: grid; gap: 8px; min-inline-size: 0; }
|
|
1564
|
+
.ds-file-upload label { font-weight: 600; }
|
|
1565
|
+
.ds-file-upload input { max-width: 100%; font: inherit; }
|
|
1566
|
+
.ds-file-upload [role="status"] { color: var(--ds-text-error-tertiary); }
|
|
1567
|
+
.ds-file-upload [role="status"]:empty { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
|
|
1568
|
+
.ds-file-upload ul { list-style: none; padding: 0; margin: 0; }
|
|
1569
|
+
.ds-file-upload li { display: flex; gap: 10px; align-items: center; padding-block: 6px; border-block-start: 1px solid var(--ds-border-secondary); }
|
|
1570
|
+
.ds-file-upload img { flex: none; width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }
|
|
1571
|
+
.ds-file-upload li > span { flex: 1; overflow-wrap: anywhere; }
|
|
1572
|
+
|
|
1573
|
+
/* Operational components: attributes added in 1.3 */
|
|
1574
|
+
.ds-data-table[data-density="compact"] th, .ds-data-table[data-density="compact"] td { padding: 6px 12px; }
|
|
1575
|
+
.ds-data-table [data-align="center"] { text-align: center; }
|
|
1576
|
+
.ds-data-table [data-align="end"] { text-align: end; font-variant-numeric: tabular-nums; }
|
|
1577
|
+
.ds-data-table[data-sticky-header] thead th { position: sticky; inset-block-start: 0; z-index: 1; }
|
|
1578
|
+
.ds-data-table tr[data-clickable] { cursor: pointer; transition: background-color var(--ds-duration-fast, .15s) ease; }
|
|
1579
|
+
.ds-data-table tr[data-clickable]:hover > td { background: var(--ds-bg-primary-hover); }
|
|
1580
|
+
.ds-data-table tr[data-clickable]:focus-visible { outline: 2px solid var(--ds-border-focus); outline-offset: -2px; }
|
|
1581
|
+
.ds-filter-bar { margin: 0; }
|
|
1582
|
+
.ds-filter-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; }
|
|
1583
|
+
.ds-filter-count { color: var(--ds-text-secondary); margin-inline-end: 4px; }
|
|
1584
|
+
.ds-filter-chip[aria-pressed="true"] { border-color: var(--ds-bg-brand-primary); background: var(--ds-bg-brand-secondary); color: var(--ds-text-brand-primary); }
|
|
1585
|
+
.ds-drawer[data-size="sm"] { width: min(100%, 360px); }
|
|
1586
|
+
.ds-drawer[data-size="lg"] { width: min(100%, 640px); }
|
|
1587
|
+
.ds-drawer-header h2 { line-height: 1.3; }
|
|
1588
|
+
.ds-drawer-description { margin: 4px 0 0; color: var(--ds-text-secondary); }
|
|
1589
|
+
.ds-drawer-footer { display: flex; justify-content: end; flex-wrap: wrap; gap: 8px; padding: 16px 24px; border-block-start: 1px solid var(--ds-border-secondary); }
|
|
1590
|
+
.ds-drawer:not(dialog)[data-state="open"], dialog.ds-drawer[open] { animation: ds-drawer-in 260ms var(--ds-ease-out) both; }
|
|
1591
|
+
.ds-drawer[data-side="start"]:not(dialog)[data-state="open"], dialog.ds-drawer[data-side="start"][open] { animation-name: ds-drawer-in-start; }
|
|
1592
|
+
.ds-drawer:not(dialog)[data-state="closed"] { animation: ds-drawer-out 180ms ease-in both; }
|
|
1593
|
+
.ds-drawer[data-side="start"]:not(dialog)[data-state="closed"] { animation-name: ds-drawer-out-start; }
|
|
1594
|
+
.ds-drawer-overlay[data-state="open"], dialog.ds-drawer[open]::backdrop { animation: ds-wroute-fade 200ms ease both; }
|
|
1595
|
+
.ds-drawer-overlay[data-state="closed"] { animation: ds-drawer-fade-out 180ms ease-in both; }
|
|
1596
|
+
@keyframes ds-drawer-in { from { transform: translateX(100%); } to { transform: none; } }
|
|
1597
|
+
@keyframes ds-drawer-in-start { from { transform: translateX(-100%); } to { transform: none; } }
|
|
1598
|
+
@keyframes ds-drawer-out { to { transform: translateX(100%); } }
|
|
1599
|
+
@keyframes ds-drawer-out-start { to { transform: translateX(-100%); } }
|
|
1600
|
+
@keyframes ds-drawer-fade-out { to { opacity: 0; } }
|
|
1601
|
+
.ds-file-upload { border-radius: 12px; transition: outline-color .15s ease, background-color .15s ease; }
|
|
1602
|
+
.ds-file-upload[data-dragging] { outline: 2px dashed var(--ds-bg-brand-primary); outline-offset: 6px; background: color-mix(in srgb, var(--ds-bg-brand-primary) 6%, transparent); }
|
|
1603
|
+
.ds-file-upload[data-disabled] { opacity: .6; }
|
|
1604
|
+
.ds-file-upload > small { color: var(--ds-text-secondary); }
|
|
1605
|
+
.ds-file-upload li > small { flex: none; color: var(--ds-text-secondary); font-variant-numeric: tabular-nums; }
|
|
1606
|
+
.ds-timeline[data-empty] { margin: 0; color: var(--ds-text-secondary); }
|
|
1607
|
+
.ds-timeline[data-density="compact"] li { padding-block-end: 10px; }
|
|
1608
|
+
.ds-timeline li[data-variant="info"]::before { background: var(--ds-bg-brand-primary); }
|
|
1609
|
+
.ds-timeline li[data-variant="success"]::before { background: var(--ds-fg-success-primary); }
|
|
1610
|
+
.ds-timeline li[data-variant="warning"]::before { background: var(--ds-fg-warning-primary); }
|
|
1611
|
+
.ds-timeline li[data-variant="error"]::before { background: var(--ds-fg-error-primary); }
|
|
1612
|
+
.ds-timeline li[aria-current="step"]::before { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ds-bg-brand-primary) 25%, transparent); }
|
|
1613
|
+
.ds-timeline li[aria-current="step"] > strong { color: var(--ds-text-brand-primary); }
|
|
1614
|
+
.ds-date-range-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-block-end: 12px; }
|
|
1615
|
+
.ds-date-range-error { margin: 6px 0 0; color: var(--ds-text-error-tertiary); font-size: 13px; }
|
|
1616
|
+
.ds-date-range-error:empty { display: none; }
|
|
1617
|
+
.ds-date-range:disabled { opacity: .6; }
|
|
1618
|
+
.ds-sidebar .ds-sidebar-link { display: flex; align-items: center; gap: 8px; }
|
|
1619
|
+
.ds-sidebar-text { flex: 1; min-width: 0; }
|
|
1620
|
+
.ds-sidebar-icon { display: inline-flex; flex: none; width: 18px; height: 18px; }
|
|
1621
|
+
.ds-sidebar-icon > svg { width: 100%; height: 100%; }
|
|
1622
|
+
.ds-sidebar-badge { flex: none; min-width: 20px; padding: 0 6px; border-radius: 10px; background: color-mix(in srgb, var(--ds-bg-brand-primary) 12%, transparent); color: var(--ds-text-brand-primary);
|
|
1623
|
+
font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; }
|
|
1624
|
+
.ds-sidebar a[aria-current="page"] .ds-sidebar-badge { background: var(--ds-bg-primary); color: var(--ds-text-brand-primary); }
|
|
1625
|
+
.ds-sidebar span.ds-sidebar-link[aria-disabled="true"] { padding: 8px; color: var(--ds-text-secondary); opacity: .6; cursor: not-allowed; }
|
|
1626
|
+
.ds-sidebar details > summary { padding: 4px 8px; border-radius: 6px; color: var(--ds-text-secondary); font-weight: 600; cursor: pointer; }
|
|
1627
|
+
.ds-sidebar details > summary:hover { background: var(--ds-bg-primary-hover); }
|
|
1628
|
+
.ds-sidebar details > summary:focus-visible { outline: 2px solid var(--ds-border-focus); outline-offset: 2px; }
|
|
1629
|
+
.ds-sidebar details[open] > summary { margin-block-end: 4px; }
|
|
1630
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1631
|
+
.ds-drawer, .ds-drawer-overlay, dialog.ds-drawer::backdrop { animation: none !important; }
|
|
1632
|
+
}
|
package/index.d.ts
CHANGED
|
@@ -29,3 +29,13 @@ export { default as Divider } from './src/components/Divider.astro';
|
|
|
29
29
|
export { default as Toaster } from './src/components/Toaster.astro';
|
|
30
30
|
export { initModals, openModal, closeModal } from './src/modal';
|
|
31
31
|
export { paginationRange } from './src/pagination';
|
|
32
|
+
export { default as DataTable } from './src/components/DataTable.astro';
|
|
33
|
+
export { default as FilterBar } from './src/components/FilterBar.astro';
|
|
34
|
+
export { default as Drawer } from './src/components/Drawer.astro';
|
|
35
|
+
export { default as FileUpload } from './src/components/FileUpload.astro';
|
|
36
|
+
export { default as Timeline } from './src/components/Timeline.astro';
|
|
37
|
+
export { default as DateRangePicker } from './src/components/DateRangePicker.astro';
|
|
38
|
+
export { default as Autocomplete } from './src/components/Autocomplete.astro';
|
|
39
|
+
export { default as Sidebar } from './src/components/Sidebar.astro';
|
|
40
|
+
export { acceptsFile, formatBytes, selectFiles } from './src/files.js';
|
|
41
|
+
export type { FileRejection, FileRejectionReason, FileRules } from './src/files.js';
|
package/index.js
CHANGED
|
@@ -29,3 +29,12 @@ export { default as Divider } from './src/components/Divider.astro';
|
|
|
29
29
|
export { default as Toaster } from './src/components/Toaster.astro';
|
|
30
30
|
export { initModals, openModal, closeModal } from './src/modal.js';
|
|
31
31
|
export { paginationRange } from './src/pagination.js';
|
|
32
|
+
export { default as DataTable } from './src/components/DataTable.astro';
|
|
33
|
+
export { default as FilterBar } from './src/components/FilterBar.astro';
|
|
34
|
+
export { default as Drawer } from './src/components/Drawer.astro';
|
|
35
|
+
export { default as FileUpload } from './src/components/FileUpload.astro';
|
|
36
|
+
export { default as Timeline } from './src/components/Timeline.astro';
|
|
37
|
+
export { default as DateRangePicker } from './src/components/DateRangePicker.astro';
|
|
38
|
+
export { default as Autocomplete } from './src/components/Autocomplete.astro';
|
|
39
|
+
export { default as Sidebar } from './src/components/Sidebar.astro';
|
|
40
|
+
export { acceptsFile, formatBytes, selectFiles } from './src/files.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@directo-ui/astro",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Componentes Astro del sistema de diseño Directo (HTML semántico, sin framework en el cliente)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
"types": "./src/wari/trip-client.d.ts",
|
|
25
25
|
"default": "./src/wari/trip-client.js"
|
|
26
26
|
},
|
|
27
|
+
"./wari/route": {
|
|
28
|
+
"types": "./src/wari/route-client.d.ts",
|
|
29
|
+
"default": "./src/wari/route-client.js"
|
|
30
|
+
},
|
|
27
31
|
"./toast": {
|
|
28
32
|
"types": "./src/toast.d.ts",
|
|
29
33
|
"default": "./src/toast.js"
|
|
@@ -32,6 +36,10 @@
|
|
|
32
36
|
"types": "./src/modal.d.ts",
|
|
33
37
|
"default": "./src/modal.js"
|
|
34
38
|
},
|
|
39
|
+
"./files": {
|
|
40
|
+
"types": "./src/files.d.ts",
|
|
41
|
+
"default": "./src/files.js"
|
|
42
|
+
},
|
|
35
43
|
"./pagination": {
|
|
36
44
|
"types": "./src/pagination.d.ts",
|
|
37
45
|
"default": "./src/pagination.js"
|
|
@@ -57,15 +65,15 @@
|
|
|
57
65
|
"design-system",
|
|
58
66
|
"directo"
|
|
59
67
|
],
|
|
60
|
-
"scripts": {
|
|
61
|
-
"build": "node ../../tokens/scripts/build-tokens.js && node ../../scripts/stage-astro-assets.mjs",
|
|
62
|
-
"pack:dist": "corepack pnpm build && corepack pnpm pack --pack-destination ../../artifacts"
|
|
63
|
-
},
|
|
64
68
|
"peerDependencies": {
|
|
65
69
|
"astro": ">=4.0.0"
|
|
66
70
|
},
|
|
67
71
|
"sideEffects": [
|
|
68
72
|
"**/*.css"
|
|
69
73
|
],
|
|
70
|
-
"license": "UNLICENSED"
|
|
71
|
-
|
|
74
|
+
"license": "UNLICENSED",
|
|
75
|
+
"scripts": {
|
|
76
|
+
"build": "node ../../tokens/scripts/build-tokens.js && node ../../scripts/stage-astro-assets.mjs",
|
|
77
|
+
"pack:dist": "corepack pnpm build && corepack pnpm pack --pack-destination ../../artifacts"
|
|
78
|
+
}
|
|
79
|
+
}
|