orbital-ds 0.39.0 → 0.40.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/AGENTS.md +1 -1
- package/components.manifest.json +89 -6
- package/dist/hooks/use-ds-messages.d.ts +13 -0
- package/dist/hooks/use-in-view.d.ts +9 -0
- package/dist/hooks/use-in-view.js +33 -0
- package/dist/lib/i18n.d.ts +13 -0
- package/dist/lib/i18n.js +39 -0
- package/dist/styles.css +12 -0
- package/dist/themes/lagoon.css +4 -1
- package/dist/themes/lagoon.scoped.css +4 -1
- package/dist/ui/card.d.ts +14 -1
- package/dist/ui/card.js +32 -3
- package/dist/ui/checkbox.js +1 -1
- package/dist/ui/choice-card.js +1 -1
- package/dist/ui/combobox.js +1 -1
- package/dist/ui/content-card.d.ts +20 -3
- package/dist/ui/content-card.js +66 -38
- package/dist/ui/input-group.js +1 -1
- package/dist/ui/input-otp.js +1 -1
- package/dist/ui/input.js +1 -1
- package/dist/ui/load-more.d.ts +19 -0
- package/dist/ui/load-more.js +72 -0
- package/dist/ui/mosaic.d.ts +4 -2
- package/dist/ui/mosaic.js +13 -2
- package/dist/ui/native-select.js +1 -1
- package/dist/ui/questionnaire.js +4 -4
- package/dist/ui/radio-group.js +1 -1
- package/dist/ui/reveal.d.ts +11 -0
- package/dist/ui/reveal.js +39 -0
- package/dist/ui/scroll-area.js +1 -1
- package/dist/ui/search-box.d.ts +32 -0
- package/dist/ui/search-box.js +238 -0
- package/dist/ui/select.js +1 -1
- package/dist/ui/show-more.d.ts +12 -0
- package/dist/ui/show-more.js +66 -0
- package/dist/ui/textarea.js +1 -1
- package/docs/designer/criterio.md +87 -0
- package/docs/designer/revision.md +11 -0
- package/package.json +1 -1
- package/scripts/cli.mjs +1 -0
- package/skill/SKILL.md +7 -3
package/AGENTS.md
CHANGED
|
@@ -151,7 +151,7 @@ la app (bloque de imports en orden), anota DESIGN.md, instala Motion y pasa el d
|
|
|
151
151
|
|
|
152
152
|
Para crear o revisar pantallas y flujos, sigue `docs/designer/`: **flujo.md** (contexto real, modo, mapa del flujo y
|
|
153
153
|
modelo mental de la persona, orden de autoridad), **patrones.md** (P1–P12: página, lista de entidades, detalle, tabla,
|
|
154
|
-
formulario, asistente, panel de datos, destructiva, estados, avisos, búsqueda, ajustes), **ux.md** (heurísticas,
|
|
154
|
+
formulario, asistente, panel de datos, destructiva, estados, avisos, búsqueda, ajustes), **criterio.md** (análisis visual en 8 pasos con puntuación, árbol «¿tarjeta, ítem, bento, imagen, efecto?», armonía, referentes Apple/Material/Nielsen/Polaris), **ux.md** (heurísticas,
|
|
155
155
|
carga cognitiva, formularios, textos, WCAG 2.2 AA, responsivo) y **revision.md** (lista observable y anti-patrones).
|
|
156
156
|
Regla de oro: **nunca te sales del sistema**; si algo no se puede hacer con componentes y variables, se anota como hueco.
|
|
157
157
|
|
package/components.manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "orbital-ds",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.0",
|
|
4
4
|
"engine": "@base-ui/react",
|
|
5
5
|
"docs": [
|
|
6
6
|
"README.md",
|
|
@@ -557,7 +557,11 @@
|
|
|
557
557
|
"card-header",
|
|
558
558
|
"card-title"
|
|
559
559
|
],
|
|
560
|
-
"optionalPeers": []
|
|
560
|
+
"optionalPeers": [],
|
|
561
|
+
"notes": [
|
|
562
|
+
"`hoverable` eleva la tarjeta al señalarla; `spotlight` añade un foco de luz que sigue al ratón (solo puntero fino, quieto con movimiento reducido); `glow` un resplandor de marca. Valores en `--ds-card-hover-*`, `--ds-card-spotlight*` y `--ds-card-glow`.",
|
|
563
|
+
"`backdrop` (mesh · aurora · image · dots · grid…) pone un fondo de AuthBackdrop detrás del contenido; con `backdropGlass` suma cristal. Con texto sobre imagen o mesh, usa ContentCard preset=\"cover\" (lleva velo para el contraste) o pon el texto sobre una placa; no confíes en el color del fondo."
|
|
564
|
+
]
|
|
561
565
|
},
|
|
562
566
|
"carousel": {
|
|
563
567
|
"import": "orbital-ds/ui/carousel",
|
|
@@ -877,8 +881,12 @@
|
|
|
877
881
|
],
|
|
878
882
|
"slots": [
|
|
879
883
|
"content-card",
|
|
884
|
+
"content-card-body",
|
|
885
|
+
"content-card-cover",
|
|
880
886
|
"content-card-dot",
|
|
887
|
+
"content-card-layout",
|
|
881
888
|
"content-card-media",
|
|
889
|
+
"content-card-scrim",
|
|
882
890
|
"content-card-value"
|
|
883
891
|
],
|
|
884
892
|
"optionalPeers": [],
|
|
@@ -889,7 +897,8 @@
|
|
|
889
897
|
"media",
|
|
890
898
|
"horizontal",
|
|
891
899
|
"metric",
|
|
892
|
-
"status"
|
|
900
|
+
"status",
|
|
901
|
+
"cover"
|
|
893
902
|
],
|
|
894
903
|
"default": "basic",
|
|
895
904
|
"intent": {
|
|
@@ -902,7 +911,9 @@
|
|
|
902
911
|
}
|
|
903
912
|
},
|
|
904
913
|
"notes": [
|
|
905
|
-
"
|
|
914
|
+
"Tipografía y relleno: `titleSize` `lg`/`xl` (`--ds-card-title-lg/-xl`, en rem) para titulares que mandan; `plate=\"blur\"` (solo `cover`) pone el texto sobre una placa de imagen desenfocada (`--ds-card-cover-blur`, `--ds-card-cover-plate`) y mantiene el contraste; `padding=\"none\"` deja el contenido (`children`) a sangre, para gráficos o tablas; cabecera y pie conservan su margen. Un titular grande por vista.",
|
|
915
|
+
"Fondos y efectos: `backdrop` (mesh · aurora · image…), `backdropGlass`, `spotlight` y `glow` pasan a Card. `cover` es la forma segura de poner texto sobre una foto: el velo es obligatorio y sale de `--ds-card-scrim` (ajústalo en brand.css, mide su contraste).",
|
|
916
|
+
"Tarjeta de contenido para rejillas: `basic` (texto), `feature` (icono + capacidad), `media` (portada arriba), `horizontal` (portada al lado), `metric` (un dato grande: `value` y `delta`), `status` (punto de estado con `tone` + texto), `cover` (la portada `media` a sangre con velo `--ds-card-scrim` para que el texto se lea: la celda destacada de un bento). El énfasis (`elevated`, `outlined`, `filled`, `ghost`) cambia la prominencia, no la estructura.",
|
|
906
917
|
"Interactiva con `href` (navega) o `onSelect` (acción): toda la tarjeta es el objetivo y el título el enlace; no metas botones dentro de un enlace ni tarjetas dentro de tarjetas. Para filas de entidades usa Item variant=\"card\"; para cifras, Stat.",
|
|
907
918
|
"Para disponer varias, Mosaic (even · bento · trio)."
|
|
908
919
|
]
|
|
@@ -1786,6 +1797,22 @@
|
|
|
1786
1797
|
],
|
|
1787
1798
|
"optionalPeers": []
|
|
1788
1799
|
},
|
|
1800
|
+
"load-more": {
|
|
1801
|
+
"import": "orbital-ds/ui/load-more",
|
|
1802
|
+
"exports": [
|
|
1803
|
+
"LoadMore"
|
|
1804
|
+
],
|
|
1805
|
+
"slots": [
|
|
1806
|
+
"load-more",
|
|
1807
|
+
"load-more-button",
|
|
1808
|
+
"load-more-status"
|
|
1809
|
+
],
|
|
1810
|
+
"optionalPeers": [],
|
|
1811
|
+
"notes": [
|
|
1812
|
+
"Para listas largas que se piden por tramos: el botón es lo principal y `auto` solo un extra (hasta `autoLimit` cargas). La lista debe conservar el foco y la posición; añade los elementos nuevos al final y pasa `loadedCount`. Para saltar a una página concreta o datos de trabajo (tablas), usa Pagination.",
|
|
1813
|
+
"Con error no reintenta solo: el botón pasa a «Reintentar»."
|
|
1814
|
+
]
|
|
1815
|
+
},
|
|
1789
1816
|
"loading-state": {
|
|
1790
1817
|
"import": "orbital-ds/ui/loading-state",
|
|
1791
1818
|
"exports": [
|
|
@@ -2029,17 +2056,22 @@
|
|
|
2029
2056
|
"values": [
|
|
2030
2057
|
"even",
|
|
2031
2058
|
"bento",
|
|
2032
|
-
"trio"
|
|
2059
|
+
"trio",
|
|
2060
|
+
"hero",
|
|
2061
|
+
"showcase"
|
|
2033
2062
|
],
|
|
2034
2063
|
"default": "even",
|
|
2035
2064
|
"intent": {
|
|
2036
2065
|
"even": "columnas iguales (1 → 2 → 3), sin jerarquía",
|
|
2037
2066
|
"bento": "4 columnas anchas; el primer hijo ocupa 2×2 (lo más importante, más grande)",
|
|
2038
|
-
"trio": "exactamente 3 en fila ancha, 1 en estrecho (tres capacidades, tres pasos)"
|
|
2067
|
+
"trio": "exactamente 3 en fila ancha, 1 en estrecho (tres capacidades, tres pasos)",
|
|
2068
|
+
"hero": "3 columnas; el primero ocupa 2×2 y a su lado una columna de pequeños (portada + resumen)",
|
|
2069
|
+
"showcase": "6 columnas; un grande 4×2, dos a su lado y el resto de a 2 (escaparate de producto)"
|
|
2039
2070
|
}
|
|
2040
2071
|
},
|
|
2041
2072
|
"notes": [
|
|
2042
2073
|
"Rejilla de tarjetas con jerarquía: `bento` para destacar lo primero, `trio` para tres iguales, `even` sin jerarquía. Si todo pesa lo mismo, usa `even` (o EntityList grid), no bento. Para spans manuales envuelve en MosaicItem.",
|
|
2074
|
+
"`hero` y `showcase` para portadas y escaparates; `MosaicItem tone` (`muted`, `brand`) alterna el ritmo: una celda de marca por rejilla, no más. Un solo destacado; celdas con gráficos (Sparkline, ChartCard glance) en 1×1 o 2×1, un mensaje por celda.",
|
|
2043
2075
|
"El destacado va el primero del DOM (orden de lectura); no reordenes con CSS."
|
|
2044
2076
|
]
|
|
2045
2077
|
},
|
|
@@ -2539,6 +2571,21 @@
|
|
|
2539
2571
|
"react-resizable-panels"
|
|
2540
2572
|
]
|
|
2541
2573
|
},
|
|
2574
|
+
"reveal": {
|
|
2575
|
+
"import": "orbital-ds/ui/reveal",
|
|
2576
|
+
"exports": [
|
|
2577
|
+
"Reveal",
|
|
2578
|
+
"type RevealEffect"
|
|
2579
|
+
],
|
|
2580
|
+
"slots": [
|
|
2581
|
+
"reveal"
|
|
2582
|
+
],
|
|
2583
|
+
"optionalPeers": [],
|
|
2584
|
+
"notes": [
|
|
2585
|
+
"Para tarjetas y bloques que quedan fuera de la primera pantalla; lo que ya se ve al cargar no necesita Reveal. En listas, `index` da la cascada; no lo uses en listas que se filtran o reordenan (reanimarían).",
|
|
2586
|
+
"Es CSS con IntersectionObserver: no necesita Motion. Para salidas, gestos o animar el layout, `useDsMotion()` con Motion."
|
|
2587
|
+
]
|
|
2588
|
+
},
|
|
2542
2589
|
"scroll-area": {
|
|
2543
2590
|
"import": "orbital-ds/ui/scroll-area",
|
|
2544
2591
|
"exports": [
|
|
@@ -2554,6 +2601,27 @@
|
|
|
2554
2601
|
],
|
|
2555
2602
|
"optionalPeers": []
|
|
2556
2603
|
},
|
|
2604
|
+
"search-box": {
|
|
2605
|
+
"import": "orbital-ds/ui/search-box",
|
|
2606
|
+
"exports": [
|
|
2607
|
+
"SearchBox",
|
|
2608
|
+
"type SearchQueryOptions",
|
|
2609
|
+
"type SearchSuggestion"
|
|
2610
|
+
],
|
|
2611
|
+
"slots": [
|
|
2612
|
+
"search-box",
|
|
2613
|
+
"search-box-group",
|
|
2614
|
+
"search-box-input",
|
|
2615
|
+
"search-box-list",
|
|
2616
|
+
"search-box-option",
|
|
2617
|
+
"search-box-status"
|
|
2618
|
+
],
|
|
2619
|
+
"optionalPeers": [],
|
|
2620
|
+
"notes": [
|
|
2621
|
+
"Para buscar mientras se escribe (navegación, catálogo, ayuda): la app aporta `onQuery` (con `signal`) y recientes/populares; el componente pone el combobox accesible, la espera, el resaltado y los estados. Para elegir un valor de una lista cerrada → Combobox; para ir a una pantalla con ⌘K → CommandPalette.",
|
|
2622
|
+
"Guarda los «recientes» en la app y no pongas en las sugerencias datos que la persona no puede ver. No reveles si algo existe si la búsqueda es de cuentas."
|
|
2623
|
+
]
|
|
2624
|
+
},
|
|
2557
2625
|
"select": {
|
|
2558
2626
|
"import": "orbital-ds/ui/select",
|
|
2559
2627
|
"exports": [
|
|
@@ -2678,6 +2746,21 @@
|
|
|
2678
2746
|
"Nivel de protección 0–1; con decorative si solo adorna. ShieldRadar para protegido/alerta con latido del tema."
|
|
2679
2747
|
]
|
|
2680
2748
|
},
|
|
2749
|
+
"show-more": {
|
|
2750
|
+
"import": "orbital-ds/ui/show-more",
|
|
2751
|
+
"exports": [
|
|
2752
|
+
"ShowMore"
|
|
2753
|
+
],
|
|
2754
|
+
"slots": [
|
|
2755
|
+
"show-more",
|
|
2756
|
+
"show-more-content",
|
|
2757
|
+
"show-more-toggle"
|
|
2758
|
+
],
|
|
2759
|
+
"optionalPeers": [],
|
|
2760
|
+
"notes": [
|
|
2761
|
+
"Para descripciones, reseñas o notas largas dentro de una tarjeta: se recorta y se expande en el sitio. Si el texto cabe, no hay botón. Para un bloque que se pliega con más contenido (formularios, filtros) usa Collapsible."
|
|
2762
|
+
]
|
|
2763
|
+
},
|
|
2681
2764
|
"sidebar": {
|
|
2682
2765
|
"import": "orbital-ds/ui/sidebar",
|
|
2683
2766
|
"exports": [
|
|
@@ -128,6 +128,19 @@ declare const DsMessagesContext: React.Context<{
|
|
|
128
128
|
noticeStateAcknowledged: string;
|
|
129
129
|
noticeStateResolved: string;
|
|
130
130
|
entityRetry: string;
|
|
131
|
+
showMore: string;
|
|
132
|
+
showLess: string;
|
|
133
|
+
loadMore: string;
|
|
134
|
+
loadMoreDone: string;
|
|
135
|
+
loadMoreEnd: string;
|
|
136
|
+
searchPlaceholder: string;
|
|
137
|
+
searchClear: string;
|
|
138
|
+
searchRecent: string;
|
|
139
|
+
searchPopular: string;
|
|
140
|
+
searchResults: string;
|
|
141
|
+
searchNoResults: string;
|
|
142
|
+
searchCount: string;
|
|
143
|
+
searchError: string;
|
|
131
144
|
statIncrease: string;
|
|
132
145
|
statDecrease: string;
|
|
133
146
|
statNoChange: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
declare function useInView<T extends Element = HTMLElement>({ once, threshold, rootMargin, }?: {
|
|
4
|
+
once?: boolean;
|
|
5
|
+
threshold?: number;
|
|
6
|
+
rootMargin?: string;
|
|
7
|
+
}): readonly [React.Dispatch<React.SetStateAction<T | null>>, boolean];
|
|
8
|
+
|
|
9
|
+
export { useInView };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
function useInView({
|
|
4
|
+
once = true,
|
|
5
|
+
threshold = 0.15,
|
|
6
|
+
rootMargin = "0px 0px -8% 0px"
|
|
7
|
+
} = {}) {
|
|
8
|
+
const [node, setNode] = React.useState(null);
|
|
9
|
+
const [inView, setInView] = React.useState(false);
|
|
10
|
+
React.useEffect(() => {
|
|
11
|
+
if (!node) return;
|
|
12
|
+
if (typeof IntersectionObserver === "undefined") {
|
|
13
|
+
setInView(true);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const io = new IntersectionObserver(
|
|
17
|
+
([entry]) => {
|
|
18
|
+
if (!entry) return;
|
|
19
|
+
if (entry.isIntersecting) {
|
|
20
|
+
setInView(true);
|
|
21
|
+
if (once) io.disconnect();
|
|
22
|
+
} else if (!once) setInView(false);
|
|
23
|
+
},
|
|
24
|
+
{ threshold, rootMargin }
|
|
25
|
+
);
|
|
26
|
+
io.observe(node);
|
|
27
|
+
return () => io.disconnect();
|
|
28
|
+
}, [node, once, threshold, rootMargin]);
|
|
29
|
+
return [setNode, inView];
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
useInView
|
|
33
|
+
};
|
package/dist/lib/i18n.d.ts
CHANGED
|
@@ -127,6 +127,19 @@ declare const en: {
|
|
|
127
127
|
noticeStateAcknowledged: string;
|
|
128
128
|
noticeStateResolved: string;
|
|
129
129
|
entityRetry: string;
|
|
130
|
+
showMore: string;
|
|
131
|
+
showLess: string;
|
|
132
|
+
loadMore: string;
|
|
133
|
+
loadMoreDone: string;
|
|
134
|
+
loadMoreEnd: string;
|
|
135
|
+
searchPlaceholder: string;
|
|
136
|
+
searchClear: string;
|
|
137
|
+
searchRecent: string;
|
|
138
|
+
searchPopular: string;
|
|
139
|
+
searchResults: string;
|
|
140
|
+
searchNoResults: string;
|
|
141
|
+
searchCount: string;
|
|
142
|
+
searchError: string;
|
|
130
143
|
statIncrease: string;
|
|
131
144
|
statDecrease: string;
|
|
132
145
|
statNoChange: string;
|
package/dist/lib/i18n.js
CHANGED
|
@@ -126,6 +126,19 @@ const en = {
|
|
|
126
126
|
noticeStateAcknowledged: "Acknowledged",
|
|
127
127
|
noticeStateResolved: "Resolved",
|
|
128
128
|
entityRetry: "Try again",
|
|
129
|
+
showMore: "Show more",
|
|
130
|
+
showLess: "Show less",
|
|
131
|
+
loadMore: "Load more",
|
|
132
|
+
loadMoreDone: "{count} more items loaded",
|
|
133
|
+
loadMoreEnd: "You have reached the end",
|
|
134
|
+
searchPlaceholder: "Search\u2026",
|
|
135
|
+
searchClear: "Clear search",
|
|
136
|
+
searchRecent: "Recent",
|
|
137
|
+
searchPopular: "Popular",
|
|
138
|
+
searchResults: "Results",
|
|
139
|
+
searchNoResults: "No results for \u201C{query}\u201D",
|
|
140
|
+
searchCount: "Results: {count}",
|
|
141
|
+
searchError: "The search failed",
|
|
129
142
|
statIncrease: "Increase",
|
|
130
143
|
statDecrease: "Decrease",
|
|
131
144
|
statNoChange: "No change",
|
|
@@ -558,6 +571,19 @@ const es = {
|
|
|
558
571
|
noticeStateAcknowledged: "Reconocido",
|
|
559
572
|
noticeStateResolved: "Resuelto",
|
|
560
573
|
entityRetry: "Reintentar",
|
|
574
|
+
showMore: "Ver m\xE1s",
|
|
575
|
+
showLess: "Ver menos",
|
|
576
|
+
loadMore: "Cargar m\xE1s",
|
|
577
|
+
loadMoreDone: "{count} elementos m\xE1s cargados",
|
|
578
|
+
loadMoreEnd: "Has llegado al final",
|
|
579
|
+
searchPlaceholder: "Buscar\u2026",
|
|
580
|
+
searchClear: "Borrar la b\xFAsqueda",
|
|
581
|
+
searchRecent: "Recientes",
|
|
582
|
+
searchPopular: "Populares",
|
|
583
|
+
searchResults: "Resultados",
|
|
584
|
+
searchNoResults: "Sin resultados para \xAB{query}\xBB",
|
|
585
|
+
searchCount: "Resultados: {count}",
|
|
586
|
+
searchError: "La b\xFAsqueda ha fallado",
|
|
561
587
|
statIncrease: "Subida",
|
|
562
588
|
statDecrease: "Bajada",
|
|
563
589
|
statNoChange: "Sin cambios",
|
|
@@ -990,6 +1016,19 @@ const ptBR = {
|
|
|
990
1016
|
noticeStateAcknowledged: "Reconhecido",
|
|
991
1017
|
noticeStateResolved: "Resolvido",
|
|
992
1018
|
entityRetry: "Tentar novamente",
|
|
1019
|
+
showMore: "Ver mais",
|
|
1020
|
+
showLess: "Ver menos",
|
|
1021
|
+
loadMore: "Carregar mais",
|
|
1022
|
+
loadMoreDone: "{count} itens a mais carregados",
|
|
1023
|
+
loadMoreEnd: "Voc\xEA chegou ao fim",
|
|
1024
|
+
searchPlaceholder: "Pesquisar\u2026",
|
|
1025
|
+
searchClear: "Limpar a pesquisa",
|
|
1026
|
+
searchRecent: "Recentes",
|
|
1027
|
+
searchPopular: "Populares",
|
|
1028
|
+
searchResults: "Resultados",
|
|
1029
|
+
searchNoResults: "Nenhum resultado para \u201C{query}\u201D",
|
|
1030
|
+
searchCount: "Resultados: {count}",
|
|
1031
|
+
searchError: "A pesquisa falhou",
|
|
993
1032
|
statIncrease: "Aumento",
|
|
994
1033
|
statDecrease: "Queda",
|
|
995
1034
|
statNoChange: "Sem altera\xE7\xE3o",
|
package/dist/styles.css
CHANGED
|
@@ -332,6 +332,7 @@
|
|
|
332
332
|
--ds-control-h-xs: 1.5rem;
|
|
333
333
|
--ds-chip-h: 1.375rem;
|
|
334
334
|
--ds-field-bg: color-mix(in oklch, var(--input) 30%, transparent);
|
|
335
|
+
--ds-field-border: var(--input);
|
|
335
336
|
--ds-field-bg-hover: color-mix(in oklch, var(--input) 50%, transparent);
|
|
336
337
|
--ds-invalid-border: var(--destructive); /* borde de un campo con error */
|
|
337
338
|
--ds-switch-track-off: var(--input); /* carril del interruptor apagado */
|
|
@@ -512,6 +513,17 @@
|
|
|
512
513
|
--ds-card-spacing: 1.5rem;
|
|
513
514
|
--ds-card-spacing-sm: 1rem;
|
|
514
515
|
--ds-card-hover-lift: 0.125rem; /* hoverable: cuánto sube */
|
|
516
|
+
--ds-card-spotlight: color-mix(in oklch, var(--primary) 14%, transparent); /* spotlight: color del foco */
|
|
517
|
+
--ds-card-spotlight-size: 18rem; /* spotlight: radio del foco */
|
|
518
|
+
--ds-card-glow: 0 0 0 1px var(--ds-card-hover-border), 0 0.5rem 2rem -0.5rem color-mix(in oklch, var(--primary) 35%, transparent); /* glow: resplandor al señalar */
|
|
519
|
+
--ds-card-cover-min-h: 14rem; /* cover: altura mínima */
|
|
520
|
+
--ds-card-scrim: linear-gradient(to top, color-mix(in oklch, black 78%, transparent) 0%, color-mix(in oklch, black 45%, transparent) 55%, color-mix(in oklch, black 12%, transparent) 100%); /* cover: velo para el contraste del texto */
|
|
521
|
+
--ds-card-cover-fg: oklch(1 0 0); /* cover: texto sobre el velo */
|
|
522
|
+
--ds-card-cover-fg-muted: oklch(1 0 0 / 0.82); /* cover: texto secundario */
|
|
523
|
+
--ds-card-title-lg: 1.5rem; /* titleSize="lg": título grande */
|
|
524
|
+
--ds-card-title-xl: 2rem; /* titleSize="xl": título de portada o héroe */
|
|
525
|
+
--ds-card-cover-blur: 0.75rem; /* plate="blur": desenfoque de la imagen tras el texto */
|
|
526
|
+
--ds-card-cover-plate: color-mix(in oklch, black 32%, transparent); /* plate="blur": tinte de la placa de texto */
|
|
515
527
|
--ds-card-hover-border: color-mix(in oklch, var(--primary) 40%, var(--border)); /* hoverable: borde al señalar */
|
|
516
528
|
--ds-field-px: 0.75rem;
|
|
517
529
|
--ds-density: 1; /* escala global de relleno y separación de listas y tablas (0.8 = más denso, 1.2 = más aireado) */
|
package/dist/themes/lagoon.css
CHANGED
|
@@ -169,7 +169,9 @@
|
|
|
169
169
|
--lg-hover-lift: -2px;
|
|
170
170
|
/* Estados de superficie neutra: filas, campos y menús señalados usan la escalera común */
|
|
171
171
|
--ds-row-hover: var(--ds-hover-bg);
|
|
172
|
-
--ds-field-bg
|
|
172
|
+
--ds-field-bg: var(--card); /* campo claro y sólido: sobre el lienzo se lee como superficie, no como hueco gris */
|
|
173
|
+
--ds-field-bg-hover: var(--card);
|
|
174
|
+
--ds-field-border: #8d9893; /* borde de campo ≥3:1 sobre la tarjeta (WCAG 1.4.11) */
|
|
173
175
|
--ds-hover-bg: #e4ebe8;
|
|
174
176
|
--ds-active-bg: #dae2df;
|
|
175
177
|
}
|
|
@@ -198,6 +200,7 @@
|
|
|
198
200
|
--border: #2c322f;
|
|
199
201
|
--input: #353c3a;
|
|
200
202
|
--ring: #4fdcb6;
|
|
203
|
+
--ds-field-border: #5a6561;
|
|
201
204
|
|
|
202
205
|
--chart-1: #5b96e6;
|
|
203
206
|
--chart-2: #14a688;
|
|
@@ -169,7 +169,9 @@
|
|
|
169
169
|
--lg-hover-lift: -2px;
|
|
170
170
|
/* Estados de superficie neutra: filas, campos y menús señalados usan la escalera común */
|
|
171
171
|
--ds-row-hover: var(--ds-hover-bg);
|
|
172
|
-
--ds-field-bg
|
|
172
|
+
--ds-field-bg: var(--card); /* campo claro y sólido: sobre el lienzo se lee como superficie, no como hueco gris */
|
|
173
|
+
--ds-field-bg-hover: var(--card);
|
|
174
|
+
--ds-field-border: #8d9893; /* borde de campo ≥3:1 sobre la tarjeta (WCAG 1.4.11) */
|
|
173
175
|
--ds-hover-bg: #e4ebe8;
|
|
174
176
|
--ds-active-bg: #dae2df;
|
|
175
177
|
}
|
|
@@ -198,6 +200,7 @@
|
|
|
198
200
|
--border: #2c322f;
|
|
199
201
|
--input: #353c3a;
|
|
200
202
|
--ring: #4fdcb6;
|
|
203
|
+
--ds-field-border: #5a6561;
|
|
201
204
|
|
|
202
205
|
--chart-1: #5b96e6;
|
|
203
206
|
--chart-2: #14a688;
|
package/dist/ui/card.d.ts
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { AuthBackdropVariant } from './auth-backdrop.js';
|
|
2
3
|
|
|
3
|
-
declare function Card({ className, size, hoverable, ...props }: React.ComponentProps<"div"> & {
|
|
4
|
+
declare function Card({ className, size, hoverable, spotlight, glow, backdrop, backdropMedia, backdropGlass, animated, children, onPointerMove, ...props }: React.ComponentProps<"div"> & {
|
|
4
5
|
size?: "default" | "sm";
|
|
5
6
|
/** Al pasar el ratón la tarjeta se eleva y marca el borde (--ds-card-hover-lift / -border). */
|
|
6
7
|
hoverable?: boolean;
|
|
8
|
+
/** Un foco de luz sigue al puntero por dentro de la tarjeta (solo con ratón; quieto con movimiento reducido). */
|
|
9
|
+
spotlight?: boolean;
|
|
10
|
+
/** Resplandor de marca alrededor de la tarjeta al señalarla (--ds-card-glow). */
|
|
11
|
+
glow?: boolean;
|
|
12
|
+
/** Fondo de AuthBackdrop detrás del contenido (mesh, aurora, image, dots…). Con texto largo, prefiere `dots` o `grid`. */
|
|
13
|
+
backdrop?: AuthBackdropVariant;
|
|
14
|
+
/** backdrop="image": la foto o el vídeo (un <img>/<video> con alt=""). */
|
|
15
|
+
backdropMedia?: React.ReactNode;
|
|
16
|
+
/** Cristal esmerilado encima del fondo. */
|
|
17
|
+
backdropGlass?: boolean;
|
|
18
|
+
/** false = fondo quieto. */
|
|
19
|
+
animated?: boolean;
|
|
7
20
|
}): React.JSX.Element;
|
|
8
21
|
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
22
|
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
package/dist/ui/card.js
CHANGED
|
@@ -1,23 +1,52 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { cn } from "../lib/utils.js";
|
|
4
|
+
import { AuthBackdrop } from "./auth-backdrop.js";
|
|
3
5
|
function Card({
|
|
4
6
|
className,
|
|
5
7
|
size = "default",
|
|
6
8
|
hoverable = false,
|
|
9
|
+
spotlight = false,
|
|
10
|
+
glow = false,
|
|
11
|
+
backdrop = "none",
|
|
12
|
+
backdropMedia,
|
|
13
|
+
backdropGlass = false,
|
|
14
|
+
animated = true,
|
|
15
|
+
children,
|
|
16
|
+
onPointerMove,
|
|
7
17
|
...props
|
|
8
18
|
}) {
|
|
9
|
-
|
|
19
|
+
const withFx = backdrop !== "none" || backdropGlass;
|
|
20
|
+
return /* @__PURE__ */ jsxs(
|
|
10
21
|
"div",
|
|
11
22
|
{
|
|
12
23
|
"data-slot": "card",
|
|
13
24
|
"data-size": size,
|
|
14
25
|
"data-hoverable": hoverable || void 0,
|
|
26
|
+
"data-spotlight": spotlight || void 0,
|
|
27
|
+
"data-glow": glow || void 0,
|
|
28
|
+
"data-backdrop": withFx ? backdrop : void 0,
|
|
29
|
+
onPointerMove: spotlight ? (event) => {
|
|
30
|
+
onPointerMove?.(event);
|
|
31
|
+
if (event.pointerType !== "mouse") return;
|
|
32
|
+
const el = event.currentTarget;
|
|
33
|
+
const box = el.getBoundingClientRect();
|
|
34
|
+
el.style.setProperty("--ds-spot-x", `${event.clientX - box.left}px`);
|
|
35
|
+
el.style.setProperty("--ds-spot-y", `${event.clientY - box.top}px`);
|
|
36
|
+
} : onPointerMove,
|
|
15
37
|
className: cn(
|
|
16
38
|
"group/card flex flex-col gap-(--ds-card-spacing) overflow-hidden rounded-card border bg-card py-(--ds-card-spacing) text-sm text-card-foreground shadow-card transition-shadow duration-(--ds-motion-snap) hover:shadow-card-hover has-[>img:first-child]:pt-0 data-[size=sm]:[--ds-card-spacing:var(--ds-card-spacing-sm)] *:[img:first-child]:rounded-t-card *:[img:last-child]:rounded-b-card",
|
|
17
39
|
hoverable && "transition-[box-shadow,transform,border-color] duration-(--ds-motion-snap) hover:-translate-y-(--ds-card-hover-lift) hover:border-(--ds-card-hover-border) motion-reduce:transition-none motion-reduce:hover:translate-y-0",
|
|
40
|
+
(spotlight || withFx) && "relative isolate",
|
|
41
|
+
spotlight && "before:pointer-events-none before:absolute before:inset-0 before:-z-10 before:opacity-0 before:transition-opacity before:duration-(--ds-motion-snap) before:content-[''] before:[background:radial-gradient(var(--ds-card-spotlight-size)_circle_at_var(--ds-spot-x,50%)_var(--ds-spot-y,50%),var(--ds-card-spotlight),transparent_70%)] hover:before:opacity-100 motion-reduce:before:hidden [@media(hover:none)]:before:hidden",
|
|
42
|
+
glow && "hover:shadow-(--ds-card-glow)",
|
|
18
43
|
className
|
|
19
44
|
),
|
|
20
|
-
...props
|
|
45
|
+
...props,
|
|
46
|
+
children: [
|
|
47
|
+
withFx ? /* @__PURE__ */ jsx(AuthBackdrop, { variant: backdrop, media: backdropMedia, glass: backdropGlass, animated, className: "-z-10" }) : null,
|
|
48
|
+
children
|
|
49
|
+
]
|
|
21
50
|
}
|
|
22
51
|
);
|
|
23
52
|
}
|
package/dist/ui/checkbox.js
CHANGED
|
@@ -9,7 +9,7 @@ function Checkbox({ className, ...props }) {
|
|
|
9
9
|
{
|
|
10
10
|
"data-slot": "checkbox",
|
|
11
11
|
className: cn(
|
|
12
|
-
"peer relative flex size-(--ds-check-size) shrink-0 items-center justify-center rounded-check border border-
|
|
12
|
+
"peer relative flex size-(--ds-check-size) shrink-0 items-center justify-center rounded-check border border-(--ds-field-border) bg-(--ds-check-bg) transition-shadow duration-(--ds-motion-snap) outline-none group-has-disabled/field:opacity-(--ds-disabled-opacity) after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-(length:--ds-ring-width) focus-visible:ring-(--ds-ring-color) disabled:cursor-not-allowed disabled:opacity-(--ds-disabled-opacity) aria-invalid:border-(--ds-invalid-border) aria-invalid:ring-(length:--ds-ring-width) aria-invalid:ring-(--ds-invalid-ring) aria-invalid:aria-checked:border-primary data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
|
|
13
13
|
className
|
|
14
14
|
),
|
|
15
15
|
...props,
|
package/dist/ui/choice-card.js
CHANGED
|
@@ -79,7 +79,7 @@ function ChoiceCardIndicator({ className, ...props }) {
|
|
|
79
79
|
"data-slot": "choice-card-indicator",
|
|
80
80
|
"aria-hidden": "true",
|
|
81
81
|
className: cn(
|
|
82
|
-
"flex size-(--ds-check-size) shrink-0 items-center justify-center rounded-full border border-
|
|
82
|
+
"flex size-(--ds-check-size) shrink-0 items-center justify-center rounded-full border border-(--ds-field-border) bg-(--ds-check-bg) group-data-checked/choice-card:border-(--ds-choice-card-selected-accent) group-data-checked/choice-card:bg-(--ds-choice-card-selected-accent) group-data-[orientation=vertical]/choice-card:absolute group-data-[orientation=vertical]/choice-card:top-2 group-data-[orientation=vertical]/choice-card:end-2",
|
|
83
83
|
className
|
|
84
84
|
),
|
|
85
85
|
...props,
|
package/dist/ui/combobox.js
CHANGED
|
@@ -208,7 +208,7 @@ function ComboboxChips({
|
|
|
208
208
|
{
|
|
209
209
|
"data-slot": "combobox-chips",
|
|
210
210
|
className: cn(
|
|
211
|
-
"flex min-h-(--ds-control-h-md) flex-wrap items-center gap-1.5 rounded-control border border-
|
|
211
|
+
"flex min-h-(--ds-control-h-md) flex-wrap items-center gap-1.5 rounded-control border border-(--ds-field-border) bg-(--ds-field-bg) bg-clip-padding px-(--ds-field-px) py-1.5 text-sm transition-colors duration-(--ds-motion-snap) focus-within:border-ring focus-within:ring-(length:--ds-ring-width) focus-within:ring-(--ds-ring-color) has-aria-invalid:border-(--ds-invalid-border) has-aria-invalid:ring-(length:--ds-ring-width) has-aria-invalid:ring-(--ds-invalid-ring) has-data-[slot=combobox-chip]:px-1.5",
|
|
212
212
|
className
|
|
213
213
|
),
|
|
214
214
|
...props
|
|
@@ -1,19 +1,36 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DsDensity } from '../lib/presets.js';
|
|
3
|
+
import { Card } from './card.js';
|
|
3
4
|
import { IconTile } from './icon-tile.js';
|
|
5
|
+
import './auth-backdrop.js';
|
|
4
6
|
import 'class-variance-authority/types';
|
|
5
7
|
import 'class-variance-authority';
|
|
6
8
|
|
|
7
|
-
type ContentCardPreset = "basic" | "feature" | "media" | "horizontal" | "metric" | "status";
|
|
9
|
+
type ContentCardPreset = "basic" | "feature" | "media" | "horizontal" | "metric" | "status" | "cover";
|
|
8
10
|
type ContentCardEmphasis = "elevated" | "outlined" | "filled" | "ghost";
|
|
9
|
-
declare function ContentCard({ preset, emphasis, tone, density, icon, media, value, delta, title, description, action, footer, href, onSelect, children, className, }: {
|
|
11
|
+
declare function ContentCard({ preset, emphasis, tone, density, icon, media, value, delta, title, description, action, footer, href, onSelect, children, className, spotlight, glow, backdrop, backdropMedia, backdropGlass, animated, titleSize, plate, padding, }: {
|
|
10
12
|
preset?: ContentCardPreset;
|
|
13
|
+
/** Foco de luz que sigue al ratón (ver Card). */
|
|
14
|
+
spotlight?: boolean;
|
|
15
|
+
/** Resplandor de marca al señalar (ver Card). */
|
|
16
|
+
glow?: boolean;
|
|
17
|
+
/** Fondo detrás del contenido (ver Card). Con `cover` la portada es `media`. */
|
|
18
|
+
backdrop?: React.ComponentProps<typeof Card>["backdrop"];
|
|
19
|
+
backdropMedia?: React.ReactNode;
|
|
20
|
+
backdropGlass?: boolean;
|
|
21
|
+
animated?: boolean;
|
|
22
|
+
/** Tamaño del título: `lg` y `xl` para portadas y celdas destacadas. */
|
|
23
|
+
titleSize?: "default" | "lg" | "xl";
|
|
24
|
+
/** Solo `cover`: `blur` pone el texto sobre una placa con la imagen desenfocada (vidrio). */
|
|
25
|
+
plate?: "none" | "blur";
|
|
26
|
+
/** `none`: contenido a sangre (gráfico, tabla o imagen); cabecera y pie conservan su margen. */
|
|
27
|
+
padding?: "default" | "none";
|
|
11
28
|
emphasis?: ContentCardEmphasis;
|
|
12
29
|
tone?: React.ComponentProps<typeof IconTile>["tone"];
|
|
13
30
|
density?: DsDensity;
|
|
14
31
|
/** Icono (preset feature o cualquiera con `icon`). */
|
|
15
32
|
icon?: React.ReactNode;
|
|
16
|
-
/** Portada (preset media y
|
|
33
|
+
/** Portada (preset media, horizontal y cover): imagen, vídeo o cualquier nodo. */
|
|
17
34
|
media?: React.ReactNode;
|
|
18
35
|
/** Dato grande (preset metric). */
|
|
19
36
|
value?: React.ReactNode;
|