orbital-ds 0.15.0 → 0.16.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/components.manifest.json +79 -1
- package/dist/hooks/use-ds-messages.d.ts +5 -0
- package/dist/lib/i18n.d.ts +5 -0
- package/dist/lib/i18n.js +18 -3
- package/dist/styles.css +67 -0
- package/dist/themes/fractalia.css +77 -1
- package/dist/themes/fractalia.guide.md +10 -3
- package/dist/themes/fractalia.meta.json +16 -3
- package/dist/themes/fractalia.scoped.css +77 -1
- package/dist/ui/ai-tag.d.ts +8 -0
- package/dist/ui/ai-tag.js +45 -0
- package/dist/ui/alert.js +18 -9
- package/dist/ui/avatar.d.ts +4 -1
- package/dist/ui/avatar.js +10 -1
- package/dist/ui/bottom-nav.d.ts +15 -0
- package/dist/ui/bottom-nav.js +97 -0
- package/dist/ui/choice-card.d.ts +16 -0
- package/dist/ui/choice-card.js +98 -0
- package/dist/ui/copy-button.d.ts +14 -0
- package/dist/ui/copy-button.js +112 -0
- package/dist/ui/icon-tile.d.ts +1 -1
- package/dist/ui/input-group.d.ts +1 -1
- package/dist/ui/progress.d.ts +4 -1
- package/dist/ui/progress.js +5 -1
- package/package.json +1 -1
package/components.manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "orbital-ds",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"engine": "@base-ui/react",
|
|
5
5
|
"docs": [
|
|
6
6
|
"README.md",
|
|
@@ -27,6 +27,21 @@
|
|
|
27
27
|
],
|
|
28
28
|
"optionalPeers": []
|
|
29
29
|
},
|
|
30
|
+
"ai-tag": {
|
|
31
|
+
"import": "orbital-ds/ui/ai-tag",
|
|
32
|
+
"exports": [
|
|
33
|
+
"AiTag",
|
|
34
|
+
"AiTagMeta"
|
|
35
|
+
],
|
|
36
|
+
"slots": [
|
|
37
|
+
"ai-tag",
|
|
38
|
+
"ai-tag-meta"
|
|
39
|
+
],
|
|
40
|
+
"optionalPeers": [],
|
|
41
|
+
"notes": [
|
|
42
|
+
"Informativa, no pulsable: para filtrar por contenido de IA, un Toggle o un filtro."
|
|
43
|
+
]
|
|
44
|
+
},
|
|
30
45
|
"alert-dialog": {
|
|
31
46
|
"import": "orbital-ds/ui/alert-dialog",
|
|
32
47
|
"exports": [
|
|
@@ -172,6 +187,27 @@
|
|
|
172
187
|
],
|
|
173
188
|
"optionalPeers": []
|
|
174
189
|
},
|
|
190
|
+
"bottom-nav": {
|
|
191
|
+
"import": "orbital-ds/ui/bottom-nav",
|
|
192
|
+
"exports": [
|
|
193
|
+
"BottomNav",
|
|
194
|
+
"BottomNavBadge",
|
|
195
|
+
"BottomNavIcon",
|
|
196
|
+
"BottomNavItem",
|
|
197
|
+
"BottomNavLabel"
|
|
198
|
+
],
|
|
199
|
+
"slots": [
|
|
200
|
+
"bottom-nav",
|
|
201
|
+
"bottom-nav-badge",
|
|
202
|
+
"bottom-nav-icon",
|
|
203
|
+
"bottom-nav-label"
|
|
204
|
+
],
|
|
205
|
+
"optionalPeers": [],
|
|
206
|
+
"notes": [
|
|
207
|
+
"Solo en móvil y para 3–5 destinos de primer nivel; en escritorio, el lateral (Sidebar).",
|
|
208
|
+
"Sin BottomNavLabel, pon aria-label en cada BottomNavItem: el icono solo no se anuncia."
|
|
209
|
+
]
|
|
210
|
+
},
|
|
175
211
|
"breadcrumb": {
|
|
176
212
|
"import": "orbital-ds/ui/breadcrumb",
|
|
177
213
|
"exports": [
|
|
@@ -329,6 +365,31 @@
|
|
|
329
365
|
],
|
|
330
366
|
"optionalPeers": []
|
|
331
367
|
},
|
|
368
|
+
"choice-card": {
|
|
369
|
+
"import": "orbital-ds/ui/choice-card",
|
|
370
|
+
"exports": [
|
|
371
|
+
"ChoiceCard",
|
|
372
|
+
"ChoiceCardContent",
|
|
373
|
+
"ChoiceCardDescription",
|
|
374
|
+
"ChoiceCardGroup",
|
|
375
|
+
"ChoiceCardIndicator",
|
|
376
|
+
"ChoiceCardMedia",
|
|
377
|
+
"ChoiceCardTitle"
|
|
378
|
+
],
|
|
379
|
+
"slots": [
|
|
380
|
+
"choice-card",
|
|
381
|
+
"choice-card-content",
|
|
382
|
+
"choice-card-description",
|
|
383
|
+
"choice-card-group",
|
|
384
|
+
"choice-card-indicator",
|
|
385
|
+
"choice-card-media",
|
|
386
|
+
"choice-card-title"
|
|
387
|
+
],
|
|
388
|
+
"optionalPeers": [],
|
|
389
|
+
"notes": [
|
|
390
|
+
"De 2 a 6 opciones mutuamente excluyentes, con texto corto; más opciones o texto largo, RadioGroup o Select."
|
|
391
|
+
]
|
|
392
|
+
},
|
|
332
393
|
"code-block": {
|
|
333
394
|
"import": "orbital-ds/ui/code-block",
|
|
334
395
|
"exports": [
|
|
@@ -466,6 +527,23 @@
|
|
|
466
527
|
],
|
|
467
528
|
"optionalPeers": []
|
|
468
529
|
},
|
|
530
|
+
"copy-button": {
|
|
531
|
+
"import": "orbital-ds/ui/copy-button",
|
|
532
|
+
"exports": [
|
|
533
|
+
"CopyButton",
|
|
534
|
+
"CopyField"
|
|
535
|
+
],
|
|
536
|
+
"slots": [
|
|
537
|
+
"copy-button",
|
|
538
|
+
"copy-field",
|
|
539
|
+
"copy-field-icon",
|
|
540
|
+
"copy-field-value"
|
|
541
|
+
],
|
|
542
|
+
"optionalPeers": [],
|
|
543
|
+
"notes": [
|
|
544
|
+
"El dato va limpio, sin instrucciones dentro del texto («Copia esta IP…»): el botón ya lo dice."
|
|
545
|
+
]
|
|
546
|
+
},
|
|
469
547
|
"data-table": {
|
|
470
548
|
"import": "orbital-ds/ui/data-table",
|
|
471
549
|
"exports": [
|
|
@@ -100,6 +100,11 @@ declare const DsMessagesContext: React.Context<{
|
|
|
100
100
|
toneDanger: string;
|
|
101
101
|
toneInfo: string;
|
|
102
102
|
toneNeutral: string;
|
|
103
|
+
copy: string;
|
|
104
|
+
copied: string;
|
|
105
|
+
copyValue: string;
|
|
106
|
+
aiGenerated: string;
|
|
107
|
+
bottomNav: string;
|
|
103
108
|
}>;
|
|
104
109
|
/** Textos de los componentes en el idioma activo. */
|
|
105
110
|
declare function useDsMessages(): DsMessages;
|
package/dist/lib/i18n.d.ts
CHANGED
|
@@ -99,6 +99,11 @@ declare const en: {
|
|
|
99
99
|
toneDanger: string;
|
|
100
100
|
toneInfo: string;
|
|
101
101
|
toneNeutral: string;
|
|
102
|
+
copy: string;
|
|
103
|
+
copied: string;
|
|
104
|
+
copyValue: string;
|
|
105
|
+
aiGenerated: string;
|
|
106
|
+
bottomNav: string;
|
|
102
107
|
};
|
|
103
108
|
type DsMessages = typeof en;
|
|
104
109
|
type DsMessageKey = keyof DsMessages;
|
package/dist/lib/i18n.js
CHANGED
|
@@ -97,7 +97,12 @@ const en = {
|
|
|
97
97
|
toneWarning: "Warning",
|
|
98
98
|
toneDanger: "Error",
|
|
99
99
|
toneInfo: "Information",
|
|
100
|
-
toneNeutral: "Neutral"
|
|
100
|
+
toneNeutral: "Neutral",
|
|
101
|
+
copy: "Copy to clipboard",
|
|
102
|
+
copied: "Copied",
|
|
103
|
+
copyValue: "Copy {value}",
|
|
104
|
+
aiGenerated: "AI-generated",
|
|
105
|
+
bottomNav: "Main navigation"
|
|
101
106
|
};
|
|
102
107
|
const es = {
|
|
103
108
|
close: "Cerrar",
|
|
@@ -196,7 +201,12 @@ const es = {
|
|
|
196
201
|
toneWarning: "Alerta",
|
|
197
202
|
toneDanger: "Error",
|
|
198
203
|
toneInfo: "Informaci\xF3n",
|
|
199
|
-
toneNeutral: "Neutro"
|
|
204
|
+
toneNeutral: "Neutro",
|
|
205
|
+
copy: "Copiar al portapapeles",
|
|
206
|
+
copied: "Copiado",
|
|
207
|
+
copyValue: "Copiar {value}",
|
|
208
|
+
aiGenerated: "Generado con IA",
|
|
209
|
+
bottomNav: "Navegaci\xF3n principal"
|
|
200
210
|
};
|
|
201
211
|
const ptBR = {
|
|
202
212
|
close: "Fechar",
|
|
@@ -295,7 +305,12 @@ const ptBR = {
|
|
|
295
305
|
toneWarning: "Alerta",
|
|
296
306
|
toneDanger: "Erro",
|
|
297
307
|
toneInfo: "Informa\xE7\xE3o",
|
|
298
|
-
toneNeutral: "Neutro"
|
|
308
|
+
toneNeutral: "Neutro",
|
|
309
|
+
copy: "Copiar para a \xE1rea de transfer\xEAncia",
|
|
310
|
+
copied: "Copiado",
|
|
311
|
+
copyValue: "Copiar {value}",
|
|
312
|
+
aiGenerated: "Gerado por IA",
|
|
313
|
+
bottomNav: "Navega\xE7\xE3o principal"
|
|
299
314
|
};
|
|
300
315
|
const dsCatalogs = { en, es, "pt-BR": ptBR };
|
|
301
316
|
function resolveDsLocale(tag) {
|
package/dist/styles.css
CHANGED
|
@@ -389,6 +389,73 @@
|
|
|
389
389
|
--ds-item-py: 0.875rem;
|
|
390
390
|
--ds-alert-px: 1rem;
|
|
391
391
|
--ds-alert-py: 0.75rem;
|
|
392
|
+
/* Aviso: forma, texto y disco del icono. Neutros = el aviso de siempre (icono suelto con el
|
|
393
|
+
color del estado). --ds-alert-icon-fill: 0 = sin disco · 1 = disco del tono con el icono en
|
|
394
|
+
--ds-alert-icon-on. --ds-alert-bg (opcional, sin valor aquí) sustituye al fondo suave. */
|
|
395
|
+
--ds-radius-alert: var(--radius-lg);
|
|
396
|
+
--ds-alert-border-w: 1px;
|
|
397
|
+
--ds-shadow-alert: 0 0 #0000;
|
|
398
|
+
--ds-alert-text: 0.875rem;
|
|
399
|
+
--ds-alert-leading: 1.25rem;
|
|
400
|
+
--ds-alert-icon: 1rem;
|
|
401
|
+
--ds-alert-icon-pad: 0px;
|
|
402
|
+
--ds-alert-icon-fill: 0;
|
|
403
|
+
--ds-alert-icon-on: var(--background);
|
|
404
|
+
/* Progreso: relleno en curso y al completar (Base UI marca data-complete). */
|
|
405
|
+
--ds-progress-fill: var(--primary);
|
|
406
|
+
--ds-progress-fill-complete: var(--ds-progress-fill);
|
|
407
|
+
/* Iniciales del avatar. */
|
|
408
|
+
--ds-avatar-font: var(--ds-font-sans);
|
|
409
|
+
--ds-avatar-weight: 400;
|
|
410
|
+
/* Navegación inferior (BottomNav): barra de pantalla completa con borde superior. Un tema
|
|
411
|
+
la hace flotante con --ds-bottom-nav-inset, radio y sombra. */
|
|
412
|
+
--ds-bottom-nav-h: 4rem;
|
|
413
|
+
--ds-bottom-nav-inset: 0px;
|
|
414
|
+
--ds-bottom-nav-px: 0.5rem;
|
|
415
|
+
--ds-bottom-nav-bg: var(--card);
|
|
416
|
+
--ds-bottom-nav-border-w: 1px;
|
|
417
|
+
--ds-radius-bottom-nav: 0px;
|
|
418
|
+
--ds-shadow-bottom-nav: 0 0 #0000;
|
|
419
|
+
--ds-bottom-nav-icon-box-w: 3.5rem;
|
|
420
|
+
--ds-bottom-nav-icon-box-h: 2rem;
|
|
421
|
+
--ds-bottom-nav-icon: 1.25rem;
|
|
422
|
+
--ds-radius-bottom-nav-item: 9999px;
|
|
423
|
+
--ds-bottom-nav-item-bg: transparent;
|
|
424
|
+
--ds-bottom-nav-item-fg: var(--muted-foreground);
|
|
425
|
+
--ds-bottom-nav-item-active-bg: color-mix(in oklch, var(--primary) 14%, transparent);
|
|
426
|
+
--ds-bottom-nav-item-active-fg: var(--primary);
|
|
427
|
+
--ds-bottom-nav-icon-active-fg: var(--ds-bottom-nav-item-active-fg);
|
|
428
|
+
--ds-bottom-nav-label: 0.75rem;
|
|
429
|
+
/* Tarjeta de opción (ChoiceCard): tesela seleccionable de un grupo. */
|
|
430
|
+
--ds-choice-card-bg: var(--card);
|
|
431
|
+
--ds-choice-card-border: var(--border);
|
|
432
|
+
--ds-radius-choice-card: var(--radius-lg);
|
|
433
|
+
--ds-choice-card-px: 1rem;
|
|
434
|
+
--ds-choice-card-py: 1rem;
|
|
435
|
+
--ds-choice-card-gap: 0.75rem;
|
|
436
|
+
--ds-choice-card-icon: 1.5rem;
|
|
437
|
+
--ds-choice-card-icon-fg: var(--muted-foreground);
|
|
438
|
+
--ds-choice-card-selected-bg: var(--card);
|
|
439
|
+
--ds-choice-card-selected-border: var(--primary);
|
|
440
|
+
--ds-choice-card-selected-fg: var(--foreground);
|
|
441
|
+
--ds-choice-card-selected-accent: var(--primary);
|
|
442
|
+
--ds-choice-card-selected-weight: var(--ds-strong-weight);
|
|
443
|
+
--ds-choice-card-disabled-bg: var(--ds-choice-card-bg);
|
|
444
|
+
--ds-choice-card-disabled-fg: var(--muted-foreground);
|
|
445
|
+
--ds-choice-card-disabled-opacity: var(--ds-disabled-opacity);
|
|
446
|
+
/* Campo copiable (CopyField): dato técnico + copiar. */
|
|
447
|
+
--ds-copy-field-border: var(--border);
|
|
448
|
+
--ds-copy-field-hover: var(--primary);
|
|
449
|
+
--ds-radius-copy-field: var(--radius-md);
|
|
450
|
+
--ds-copy-field-px: 0.75rem;
|
|
451
|
+
--ds-copy-field-py: 0.375rem;
|
|
452
|
+
--ds-copy-field-gap: 0.75rem;
|
|
453
|
+
--ds-copy-field-text: 0.875rem;
|
|
454
|
+
--ds-copy-field-icon-fg: var(--muted-foreground);
|
|
455
|
+
/* Etiqueta de IA (AiTag): degradado suave de dos tonos. */
|
|
456
|
+
--ds-badge-ai-bg: linear-gradient(90deg, color-mix(in oklch, var(--chart-5) 12%, transparent), color-mix(in oklch, var(--info) 12%, transparent));
|
|
457
|
+
--ds-badge-ai-fg: var(--info);
|
|
458
|
+
--ds-badge-ai-border: color-mix(in oklch, var(--info) 35%, transparent);
|
|
392
459
|
--ds-badge-py: 0.25rem;
|
|
393
460
|
--ds-bubble-px: 0.875rem;
|
|
394
461
|
--ds-bubble-py: 0.625rem;
|
|
@@ -198,6 +198,73 @@
|
|
|
198
198
|
--ds-shield-w-sm: 85px; /* corporate */
|
|
199
199
|
--ds-shield-h-sm: 103px;
|
|
200
200
|
--ds-shield-stroke: 10px;
|
|
201
|
+
/* alert-notification: tarjeta blanca de radio 12 con sombra, padding 16, texto 16 en tinta e
|
|
202
|
+
icono blanco en un disco de 32 del tono del estado */
|
|
203
|
+
--ds-radius-alert: 12px; /* radius-s */
|
|
204
|
+
--ds-alert-border-w: 0px;
|
|
205
|
+
--ds-shadow-alert: 0 4px 2px 0 rgba(0, 0, 0, 0.25); /* shadow-focus */
|
|
206
|
+
--ds-alert-bg: var(--card);
|
|
207
|
+
--ds-alert-px: 16px;
|
|
208
|
+
--ds-alert-py: 16px;
|
|
209
|
+
--ds-alert-text: 1rem;
|
|
210
|
+
--ds-alert-leading: 1.5rem;
|
|
211
|
+
--ds-alert-icon: 32px;
|
|
212
|
+
--ds-alert-icon-pad: 8px;
|
|
213
|
+
--ds-alert-icon-fill: 1;
|
|
214
|
+
--ds-alert-icon-on: var(--card); /* blanco en claro; en oscuro, el fondo de la tarjeta */
|
|
215
|
+
/* progress-bar: en curso warning-900, completado success-700 */
|
|
216
|
+
--ds-progress-fill: var(--warning);
|
|
217
|
+
--ds-progress-fill-complete: var(--success);
|
|
218
|
+
/* avatar-letras: Montserrat Bold */
|
|
219
|
+
--ds-avatar-font: var(--ds-font-display);
|
|
220
|
+
--ds-avatar-weight: 700;
|
|
221
|
+
/* menu-mobile-icons: barra flotante 56 de alto, radio 24, solo iconos en cajas de 32 (radio 8);
|
|
222
|
+
activa navy con icono blanco, inactiva neutral-bg con icono navy */
|
|
223
|
+
--ds-bottom-nav-h: 56px;
|
|
224
|
+
--ds-bottom-nav-inset: 20px; /* 335 de ancho en una pantalla de 375 */
|
|
225
|
+
--ds-bottom-nav-px: 16px;
|
|
226
|
+
--ds-bottom-nav-border-w: 0px;
|
|
227
|
+
--ds-radius-bottom-nav: 24px; /* Radius Circle M */
|
|
228
|
+
--ds-shadow-bottom-nav: 0 0 2px 0 rgba(0, 0, 0, 0.25);
|
|
229
|
+
--ds-bottom-nav-icon-box-w: 32px;
|
|
230
|
+
--ds-bottom-nav-icon-box-h: 32px;
|
|
231
|
+
--ds-bottom-nav-icon: 24px;
|
|
232
|
+
--ds-radius-bottom-nav-item: 8px; /* Radius Notifications */
|
|
233
|
+
--ds-bottom-nav-item-bg: var(--background);
|
|
234
|
+
--ds-bottom-nav-item-fg: var(--primary);
|
|
235
|
+
--ds-bottom-nav-item-active-bg: var(--primary);
|
|
236
|
+
--ds-bottom-nav-item-active-fg: var(--primary);
|
|
237
|
+
--ds-bottom-nav-icon-active-fg: var(--primary-foreground);
|
|
238
|
+
/* option-button: borde grey-light, radio 8, padding 16/12, icono 40; seleccionado con fondo
|
|
239
|
+
neutral-bg, borde y texto info en Bold; desactivado grey-light con texto blanco */
|
|
240
|
+
--ds-choice-card-border: #c8cdd8;
|
|
241
|
+
--ds-radius-choice-card: 8px;
|
|
242
|
+
--ds-choice-card-px: 12px;
|
|
243
|
+
--ds-choice-card-py: 16px;
|
|
244
|
+
--ds-choice-card-gap: 12px;
|
|
245
|
+
--ds-choice-card-icon: 40px;
|
|
246
|
+
--ds-choice-card-icon-fg: #666a73; /* grey-medium */
|
|
247
|
+
--ds-choice-card-selected-bg: var(--background);
|
|
248
|
+
--ds-choice-card-selected-border: var(--info);
|
|
249
|
+
--ds-choice-card-selected-fg: var(--info);
|
|
250
|
+
--ds-choice-card-selected-accent: var(--info);
|
|
251
|
+
--ds-choice-card-selected-weight: 700;
|
|
252
|
+
--ds-choice-card-disabled-bg: #c8cdd8;
|
|
253
|
+
--ds-choice-card-disabled-fg: #ffffff;
|
|
254
|
+
--ds-choice-card-disabled-opacity: 1;
|
|
255
|
+
/* item-copy: borde grey-light, radio 8, padding 8/16, separación 24, texto 16; hover primary-hover */
|
|
256
|
+
--ds-copy-field-border: #c8cdd8;
|
|
257
|
+
--ds-copy-field-hover: #2a8bb8;
|
|
258
|
+
--ds-radius-copy-field: 8px;
|
|
259
|
+
--ds-copy-field-px: 16px;
|
|
260
|
+
--ds-copy-field-py: 8px;
|
|
261
|
+
--ds-copy-field-gap: 24px;
|
|
262
|
+
--ds-copy-field-text: 1rem;
|
|
263
|
+
--ds-copy-field-icon-fg: #666a73;
|
|
264
|
+
/* tag-IA: borde accent-disabled, degradado purple-300 → info-300 al 12 %, texto info-600 */
|
|
265
|
+
--ds-badge-ai-border: #99b6ff;
|
|
266
|
+
--ds-badge-ai-bg: linear-gradient(90deg, color-mix(in srgb, #b37cf0 12%, transparent), color-mix(in srgb, #7497fb 12%, transparent));
|
|
267
|
+
--ds-badge-ai-fg: #0237c0;
|
|
201
268
|
--ds-shield-filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25)); /* sombra de Figma */
|
|
202
269
|
--ds-shield-value-size: 24px;
|
|
203
270
|
--ds-shield-value-weight: 700; /* Figma: ExtraBold 800, no cargado (decisión pendiente) */
|
|
@@ -320,6 +387,15 @@
|
|
|
320
387
|
--ds-field-bg: #1e2246;
|
|
321
388
|
--ds-field-bg-hover: #1e2246;
|
|
322
389
|
--ds-switch-track-off: #3c4270;
|
|
390
|
+
--ds-choice-card-border: #3c4270;
|
|
391
|
+
--ds-choice-card-icon-fg: #9aa3bc;
|
|
392
|
+
--ds-choice-card-disabled-bg: #2c3157;
|
|
393
|
+
--ds-choice-card-disabled-fg: #9aa3bc;
|
|
394
|
+
--ds-copy-field-border: #3c4270;
|
|
395
|
+
--ds-copy-field-hover: #98b4fc;
|
|
396
|
+
--ds-copy-field-icon-fg: #9aa3bc;
|
|
397
|
+
--ds-badge-ai-border: #3c4f8f;
|
|
398
|
+
--ds-badge-ai-fg: #98b4fc;
|
|
323
399
|
--zf-fill-hover: rgba(255, 255, 255, 0.08);
|
|
324
400
|
--zf-fill-press: rgba(255, 255, 255, 0.12);
|
|
325
401
|
}
|
|
@@ -349,7 +425,7 @@
|
|
|
349
425
|
--ds-button-tracking: 0;
|
|
350
426
|
--ds-button-outline-w: 1px; /* sin decimales: solo 0/1/2/4/6 */
|
|
351
427
|
--ds-shadow-button: 0 0 #0000;
|
|
352
|
-
--ds-shadow-button-hover: 0 4px
|
|
428
|
+
--ds-shadow-button-hover: 0 4px 2px 0 rgba(0, 0, 0, 0.25); /* shadow-focus: hover y foco del botón */
|
|
353
429
|
--ds-hover-lift: 0px;
|
|
354
430
|
--ds-label-tracking: 0;
|
|
355
431
|
--ds-label-weight: 700;
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
La plataforma Fractalia: lienzo gris azulado muy claro (`neutral-bg`), tinta casi negra, primario navy institucional y acento azul eléctrico. Interfaz clara, plana y sin adornos.
|
|
5
5
|
|
|
6
6
|
## Gesto firma
|
|
7
|
-
**Botón en píldora (32px) con Roboto Bold en MAYÚSCULAS**: en hover pasa a azul `primary-hover` con `
|
|
7
|
+
**Botón en píldora (32px) con Roboto Bold en MAYÚSCULAS**: en hover y foco pasa a azul `primary-hover` con `shadow-focus` (`0 4px 2px rgba(0,0,0,.25)`), sin elevarse. Las pestañas siguen la misma forma, con la activa rellena de navy.
|
|
8
8
|
|
|
9
9
|
## Principios
|
|
10
10
|
- Montserrat Bold **solo** en encabezados; Roboto para todo lo demás. No existe Montserrat Regular.
|
|
11
11
|
- Mayúsculas de botón **por CSS**; el texto se escribe en sentence-case (lectores de pantalla).
|
|
12
12
|
- Cero degradados (única excepción: rampa de datos de un choropleth).
|
|
13
|
-
- Solo las
|
|
13
|
+
- Solo las sombras oficiales (`drop-shadow`, `elevation-test`, `menu-shadow`, `shadow-menu-mobile-cx` y `shadow-focus` de botones y avisos). Nunca combinar dos.
|
|
14
14
|
- El color nunca comunica solo: todo estado lleva texto o icono.
|
|
15
15
|
- Bordes sin decimales: solo 0 / 1 / 2 / 4 / 6px.
|
|
16
16
|
|
|
@@ -31,7 +31,7 @@ Radio base 8px (`Radius Notifications`); inputs y dropdown 4px; botones, tags y
|
|
|
31
31
|
## Componentes traducidos
|
|
32
32
|
| Slot | Qué hace el tema | Ficha del DS |
|
|
33
33
|
|---|---|---|
|
|
34
|
-
| `button` default | navy → hover `#2A8BB8` +
|
|
34
|
+
| `button` default | navy → hover `#2A8BB8` + `shadow-focus`; foco con anillo 2px | `01-atoms/button.md` |
|
|
35
35
|
| `button` secondary | fondo neutral-bg, borde 1px y texto navy | `button.md` · Secondary |
|
|
36
36
|
| `button` outline | fondo blanco, borde 1px y texto navy | `button.md` · White |
|
|
37
37
|
| `button` disabled | `#C8CDD8` + texto `#666A73`, sin opacidad | `button.md` · Disabled |
|
|
@@ -41,6 +41,13 @@ Radio base 8px (`Radius Notifications`); inputs y dropdown 4px; botones, tags y
|
|
|
41
41
|
| sidebar | blanca, filas de 44px, activa neutral-bg, radio 8 | `03-organisms/item-menu.md` |
|
|
42
42
|
| `switch` | ON navy, OFF grey-light | `02-molecules/switch.md` |
|
|
43
43
|
| `checkbox` | borde 2px neutral-black | `01-atoms/checkbox.md` |
|
|
44
|
+
| `alert` | tarjeta blanca, radio 12, sin borde, `shadow-focus`, padding 16, texto 16 en tinta; icono blanco en disco de 32 del tono | `alert-notification` |
|
|
45
|
+
| `progress` | en curso warning-900, completado success-700 (`data-complete`); `tone` para otros casos | `progress-bar` |
|
|
46
|
+
| `avatar` (iniciales) | Montserrat Bold; `tone` info / warning / success | `avatar-letras` |
|
|
47
|
+
| `bottom-nav` | flotante, 56 de alto, radio 24; solo iconos en cajas de 32: activa navy con icono blanco | `menu-mobile-icons` |
|
|
48
|
+
| `choice-card` | borde grey-light, radio 8, icono 40; elegida con fondo neutral-bg, borde y texto info en Bold | `option-button` |
|
|
49
|
+
| `copy-field` | borde grey-light, radio 8, padding 8/16, texto 16; hover primary-hover | `item-copy` |
|
|
50
|
+
| `ai-tag` | píldora con borde accent-disabled, degradado morado→azul al 12 % | `tag-IA` |
|
|
44
51
|
|
|
45
52
|
## Piezas que vienen de su DS (del núcleo: sirven en TODOS los temas)
|
|
46
53
|
Las fichas de `fractalia.components` (gauge, escudo, estado, progreso, fuerza, stepper, loader) están traducidas a
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"conformance": "strict",
|
|
6
6
|
"branding": "faithful",
|
|
7
7
|
"signature": [
|
|
8
|
-
"botón en píldora de 32px, Roboto Bold en mayúsculas, hover azul con
|
|
8
|
+
"botón en píldora de 32px, Roboto Bold en mayúsculas, hover azul con shadow-focus",
|
|
9
9
|
"pestañas en píldora con la activa rellena de navy",
|
|
10
10
|
"Montserrat Bold solo en encabezados"
|
|
11
11
|
],
|
|
@@ -35,6 +35,11 @@
|
|
|
35
35
|
"name": "FractaliaDS",
|
|
36
36
|
"tookFromIt": "color, tipografía, spacing, radius, sombras, motion y specs de componentes (botón, tag, inputs, dropdown, tabs, item-menu, switch, checkbox, gráficas)",
|
|
37
37
|
"source": "repositorio GitLab design-system (fractalia-ds/tokens.css + 00-foundations) · Variables de Figma · Supernova DS 821888"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "FractaliaDS en Claude Design",
|
|
41
|
+
"tookFromIt": "fichas de button (hover y foco con shadow-focus), alert-notification, progress-bar, avatar-letras, text-fields-inputs, tag-IA, menu-mobile-icons, option-button e item-copy",
|
|
42
|
+
"source": "proyecto de Claude Design f6fb921c-bb89-401d-9726-6b5f2d43651b (components/*.html + styles.css)"
|
|
38
43
|
}
|
|
39
44
|
],
|
|
40
45
|
"status": {
|
|
@@ -46,12 +51,20 @@
|
|
|
46
51
|
"Montserrat Bold + Roboto 400/700",
|
|
47
52
|
"radios 4 / 8 / 32",
|
|
48
53
|
"4 sombras oficiales (Effect Styles)",
|
|
49
|
-
"duraciones y easings de motion"
|
|
54
|
+
"duraciones y easings de motion",
|
|
55
|
+
"hover y foco del botón con shadow-focus 0 4px 2px rgba(0,0,0,.25)",
|
|
56
|
+
"aviso: tarjeta blanca radio 12, sombra shadow-focus, padding 16, icono en disco de 32 del tono",
|
|
57
|
+
"progreso: en curso warning-900, completado success-700",
|
|
58
|
+
"iniciales del avatar en Montserrat Bold, con tonos info/warning/success"
|
|
50
59
|
],
|
|
51
60
|
"approximate": [
|
|
52
61
|
"radio de overlays 16px (no confirmado en la ficha de modal)",
|
|
53
62
|
"alturas de control sm/lg (el DS solo fija botón 40px e input 44px)",
|
|
54
|
-
"orden de las series de gráficas"
|
|
63
|
+
"orden de las series de gráficas",
|
|
64
|
+
"avatar rosa (#D723DA, sin token): usar tone=\"chart-*\"; la ficha da tamaños 16/24/46/52/70 y el núcleo, 24/32/40",
|
|
65
|
+
"etiqueta de IA: purple-300, info-300 e info-600 aproximados (#B37CF0, #7497FB, #0237C0); el borde #99B6FF es exacto",
|
|
66
|
+
"navegación inferior flotante con margen de 20px (la ficha la fija a 335 de ancho)",
|
|
67
|
+
"progreso con error en dos tramos (verde hasta el fallo y rojo después): se pinta con tone=\"danger\" en un solo tramo"
|
|
55
68
|
],
|
|
56
69
|
"designed": [
|
|
57
70
|
"piel oscura (derivada de tokens.css, no publicada en el DS)",
|
|
@@ -198,6 +198,73 @@
|
|
|
198
198
|
--ds-shield-w-sm: 85px; /* corporate */
|
|
199
199
|
--ds-shield-h-sm: 103px;
|
|
200
200
|
--ds-shield-stroke: 10px;
|
|
201
|
+
/* alert-notification: tarjeta blanca de radio 12 con sombra, padding 16, texto 16 en tinta e
|
|
202
|
+
icono blanco en un disco de 32 del tono del estado */
|
|
203
|
+
--ds-radius-alert: 12px; /* radius-s */
|
|
204
|
+
--ds-alert-border-w: 0px;
|
|
205
|
+
--ds-shadow-alert: 0 4px 2px 0 rgba(0, 0, 0, 0.25); /* shadow-focus */
|
|
206
|
+
--ds-alert-bg: var(--card);
|
|
207
|
+
--ds-alert-px: 16px;
|
|
208
|
+
--ds-alert-py: 16px;
|
|
209
|
+
--ds-alert-text: 1rem;
|
|
210
|
+
--ds-alert-leading: 1.5rem;
|
|
211
|
+
--ds-alert-icon: 32px;
|
|
212
|
+
--ds-alert-icon-pad: 8px;
|
|
213
|
+
--ds-alert-icon-fill: 1;
|
|
214
|
+
--ds-alert-icon-on: var(--card); /* blanco en claro; en oscuro, el fondo de la tarjeta */
|
|
215
|
+
/* progress-bar: en curso warning-900, completado success-700 */
|
|
216
|
+
--ds-progress-fill: var(--warning);
|
|
217
|
+
--ds-progress-fill-complete: var(--success);
|
|
218
|
+
/* avatar-letras: Montserrat Bold */
|
|
219
|
+
--ds-avatar-font: var(--ds-font-display);
|
|
220
|
+
--ds-avatar-weight: 700;
|
|
221
|
+
/* menu-mobile-icons: barra flotante 56 de alto, radio 24, solo iconos en cajas de 32 (radio 8);
|
|
222
|
+
activa navy con icono blanco, inactiva neutral-bg con icono navy */
|
|
223
|
+
--ds-bottom-nav-h: 56px;
|
|
224
|
+
--ds-bottom-nav-inset: 20px; /* 335 de ancho en una pantalla de 375 */
|
|
225
|
+
--ds-bottom-nav-px: 16px;
|
|
226
|
+
--ds-bottom-nav-border-w: 0px;
|
|
227
|
+
--ds-radius-bottom-nav: 24px; /* Radius Circle M */
|
|
228
|
+
--ds-shadow-bottom-nav: 0 0 2px 0 rgba(0, 0, 0, 0.25);
|
|
229
|
+
--ds-bottom-nav-icon-box-w: 32px;
|
|
230
|
+
--ds-bottom-nav-icon-box-h: 32px;
|
|
231
|
+
--ds-bottom-nav-icon: 24px;
|
|
232
|
+
--ds-radius-bottom-nav-item: 8px; /* Radius Notifications */
|
|
233
|
+
--ds-bottom-nav-item-bg: var(--background);
|
|
234
|
+
--ds-bottom-nav-item-fg: var(--primary);
|
|
235
|
+
--ds-bottom-nav-item-active-bg: var(--primary);
|
|
236
|
+
--ds-bottom-nav-item-active-fg: var(--primary);
|
|
237
|
+
--ds-bottom-nav-icon-active-fg: var(--primary-foreground);
|
|
238
|
+
/* option-button: borde grey-light, radio 8, padding 16/12, icono 40; seleccionado con fondo
|
|
239
|
+
neutral-bg, borde y texto info en Bold; desactivado grey-light con texto blanco */
|
|
240
|
+
--ds-choice-card-border: #c8cdd8;
|
|
241
|
+
--ds-radius-choice-card: 8px;
|
|
242
|
+
--ds-choice-card-px: 12px;
|
|
243
|
+
--ds-choice-card-py: 16px;
|
|
244
|
+
--ds-choice-card-gap: 12px;
|
|
245
|
+
--ds-choice-card-icon: 40px;
|
|
246
|
+
--ds-choice-card-icon-fg: #666a73; /* grey-medium */
|
|
247
|
+
--ds-choice-card-selected-bg: var(--background);
|
|
248
|
+
--ds-choice-card-selected-border: var(--info);
|
|
249
|
+
--ds-choice-card-selected-fg: var(--info);
|
|
250
|
+
--ds-choice-card-selected-accent: var(--info);
|
|
251
|
+
--ds-choice-card-selected-weight: 700;
|
|
252
|
+
--ds-choice-card-disabled-bg: #c8cdd8;
|
|
253
|
+
--ds-choice-card-disabled-fg: #ffffff;
|
|
254
|
+
--ds-choice-card-disabled-opacity: 1;
|
|
255
|
+
/* item-copy: borde grey-light, radio 8, padding 8/16, separación 24, texto 16; hover primary-hover */
|
|
256
|
+
--ds-copy-field-border: #c8cdd8;
|
|
257
|
+
--ds-copy-field-hover: #2a8bb8;
|
|
258
|
+
--ds-radius-copy-field: 8px;
|
|
259
|
+
--ds-copy-field-px: 16px;
|
|
260
|
+
--ds-copy-field-py: 8px;
|
|
261
|
+
--ds-copy-field-gap: 24px;
|
|
262
|
+
--ds-copy-field-text: 1rem;
|
|
263
|
+
--ds-copy-field-icon-fg: #666a73;
|
|
264
|
+
/* tag-IA: borde accent-disabled, degradado purple-300 → info-300 al 12 %, texto info-600 */
|
|
265
|
+
--ds-badge-ai-border: #99b6ff;
|
|
266
|
+
--ds-badge-ai-bg: linear-gradient(90deg, color-mix(in srgb, #b37cf0 12%, transparent), color-mix(in srgb, #7497fb 12%, transparent));
|
|
267
|
+
--ds-badge-ai-fg: #0237c0;
|
|
201
268
|
--ds-shield-filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25)); /* sombra de Figma */
|
|
202
269
|
--ds-shield-value-size: 24px;
|
|
203
270
|
--ds-shield-value-weight: 700; /* Figma: ExtraBold 800, no cargado (decisión pendiente) */
|
|
@@ -320,6 +387,15 @@
|
|
|
320
387
|
--ds-field-bg: #1e2246;
|
|
321
388
|
--ds-field-bg-hover: #1e2246;
|
|
322
389
|
--ds-switch-track-off: #3c4270;
|
|
390
|
+
--ds-choice-card-border: #3c4270;
|
|
391
|
+
--ds-choice-card-icon-fg: #9aa3bc;
|
|
392
|
+
--ds-choice-card-disabled-bg: #2c3157;
|
|
393
|
+
--ds-choice-card-disabled-fg: #9aa3bc;
|
|
394
|
+
--ds-copy-field-border: #3c4270;
|
|
395
|
+
--ds-copy-field-hover: #98b4fc;
|
|
396
|
+
--ds-copy-field-icon-fg: #9aa3bc;
|
|
397
|
+
--ds-badge-ai-border: #3c4f8f;
|
|
398
|
+
--ds-badge-ai-fg: #98b4fc;
|
|
323
399
|
--zf-fill-hover: rgba(255, 255, 255, 0.08);
|
|
324
400
|
--zf-fill-press: rgba(255, 255, 255, 0.12);
|
|
325
401
|
}
|
|
@@ -349,7 +425,7 @@
|
|
|
349
425
|
--ds-button-tracking: 0;
|
|
350
426
|
--ds-button-outline-w: 1px; /* sin decimales: solo 0/1/2/4/6 */
|
|
351
427
|
--ds-shadow-button: 0 0 #0000;
|
|
352
|
-
--ds-shadow-button-hover: 0 4px
|
|
428
|
+
--ds-shadow-button-hover: 0 4px 2px 0 rgba(0, 0, 0, 0.25); /* shadow-focus: hover y foco del botón */
|
|
353
429
|
--ds-hover-lift: 0px;
|
|
354
430
|
--ds-label-tracking: 0;
|
|
355
431
|
--ds-label-weight: 700;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
declare function AiTag({ className, children, iconOnly, ...props }: React.ComponentProps<"span"> & {
|
|
4
|
+
iconOnly?: boolean;
|
|
5
|
+
}): React.JSX.Element;
|
|
6
|
+
declare function AiTagMeta({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
7
|
+
|
|
8
|
+
export { AiTag, AiTagMeta };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { SparklesIcon } from "lucide-react";
|
|
3
|
+
import { useDsMessages } from "../hooks/use-ds-messages.js";
|
|
4
|
+
import { cn } from "../lib/utils.js";
|
|
5
|
+
function AiTag({
|
|
6
|
+
className,
|
|
7
|
+
children,
|
|
8
|
+
iconOnly = false,
|
|
9
|
+
...props
|
|
10
|
+
}) {
|
|
11
|
+
const t = useDsMessages();
|
|
12
|
+
const text = children ?? t.aiGenerated;
|
|
13
|
+
return /* @__PURE__ */ jsxs(
|
|
14
|
+
"span",
|
|
15
|
+
{
|
|
16
|
+
"data-slot": "ai-tag",
|
|
17
|
+
"data-icon-only": iconOnly ? "" : void 0,
|
|
18
|
+
role: iconOnly ? "img" : void 0,
|
|
19
|
+
"aria-label": iconOnly && typeof text === "string" ? text : void 0,
|
|
20
|
+
className: cn(
|
|
21
|
+
"inline-flex w-fit shrink-0 items-center gap-1 rounded-badge border border-(--ds-badge-ai-border) bg-(image:--ds-badge-ai-bg) px-(--ds-badge-px) py-(--ds-badge-py) text-xs font-(--ds-badge-weight) whitespace-nowrap text-(--ds-badge-ai-fg) data-icon-only:px-(--ds-badge-py) [&>svg]:size-3.5 [&>svg]:shrink-0",
|
|
22
|
+
className
|
|
23
|
+
),
|
|
24
|
+
...props,
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ jsx(SparklesIcon, { "aria-hidden": "true" }),
|
|
27
|
+
iconOnly ? null : text
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
function AiTagMeta({ className, ...props }) {
|
|
33
|
+
return /* @__PURE__ */ jsx(
|
|
34
|
+
"span",
|
|
35
|
+
{
|
|
36
|
+
"data-slot": "ai-tag-meta",
|
|
37
|
+
className: cn("text-muted-foreground", className),
|
|
38
|
+
...props
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
AiTag,
|
|
44
|
+
AiTagMeta
|
|
45
|
+
};
|
package/dist/ui/alert.js
CHANGED
|
@@ -2,18 +2,27 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
3
|
import { cn } from "../lib/utils.js";
|
|
4
4
|
const alertVariants = cva(
|
|
5
|
-
|
|
5
|
+
// Forma, texto y disco del icono salen de los huecos --ds-alert-* (neutros en el núcleo). El
|
|
6
|
+
// icono toma el tono de la variante (--alert-tone) o el color del texto; con
|
|
7
|
+
// --ds-alert-icon-fill: 1 el tono pasa a ser un disco y el icono va en --ds-alert-icon-on.
|
|
8
|
+
[
|
|
9
|
+
"group/alert relative grid w-full gap-0.5 rounded-(--ds-radius-alert) border-(length:--ds-alert-border-w) px-(--ds-alert-px) py-(--ds-alert-py) text-left text-(length:--ds-alert-text) leading-(--ds-alert-leading) shadow-(--ds-shadow-alert) has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5",
|
|
10
|
+
"*:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:box-border *:[svg]:rounded-full *:[svg]:p-(--ds-alert-icon-pad) *:[svg:not([class*='size-'])]:size-(--ds-alert-icon)",
|
|
11
|
+
"*:[svg]:text-[color:color-mix(in_srgb,var(--ds-alert-icon-on)_calc(var(--ds-alert-icon-fill)*100%),var(--alert-tone,currentColor))]",
|
|
12
|
+
"*:[svg]:bg-[color:color-mix(in_srgb,var(--alert-tone,currentColor)_calc(var(--ds-alert-icon-fill)*100%),transparent)]"
|
|
13
|
+
],
|
|
6
14
|
{
|
|
7
15
|
variants: {
|
|
8
16
|
variant: {
|
|
9
17
|
default: "bg-card text-card-foreground",
|
|
10
|
-
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90
|
|
11
|
-
// Estados: fondo suave; texto del estado o, si el tema
|
|
12
|
-
// y el borde siguen siendo del estado). Contraste AA
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90",
|
|
19
|
+
// Estados: fondo suave (o --ds-alert-bg si el tema lo define); texto del estado o, si el tema
|
|
20
|
+
// define --ds-on-soft, en tinta (el icono y el borde siguen siendo del estado). Contraste AA
|
|
21
|
+
// comprobado por check:ds.
|
|
22
|
+
info: "[--alert-tone:var(--info)] border-info/30 bg-[color:var(--ds-alert-bg,var(--info-soft))] text-[color:var(--ds-on-soft,var(--info))] *:data-[slot=alert-description]:text-[color:var(--ds-on-soft,var(--info))]",
|
|
23
|
+
success: "[--alert-tone:var(--success)] border-success/30 bg-[color:var(--ds-alert-bg,var(--success-soft))] text-[color:var(--ds-on-soft,var(--success))] *:data-[slot=alert-description]:text-[color:var(--ds-on-soft,var(--success))]",
|
|
24
|
+
warning: "[--alert-tone:var(--warning)] border-warning/30 bg-[color:var(--ds-alert-bg,var(--warning-soft))] text-[color:var(--ds-on-soft,var(--warning))] *:data-[slot=alert-description]:text-[color:var(--ds-on-soft,var(--warning))]",
|
|
25
|
+
danger: "[--alert-tone:var(--danger)] border-danger/30 bg-[color:var(--ds-alert-bg,var(--danger-soft))] text-[color:var(--ds-on-soft,var(--danger))] *:data-[slot=alert-description]:text-[color:var(--ds-on-soft,var(--danger))]"
|
|
17
26
|
}
|
|
18
27
|
},
|
|
19
28
|
defaultVariants: {
|
|
@@ -59,7 +68,7 @@ function AlertDescription({
|
|
|
59
68
|
{
|
|
60
69
|
"data-slot": "alert-description",
|
|
61
70
|
className: cn(
|
|
62
|
-
"text-
|
|
71
|
+
"text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
|
|
63
72
|
className
|
|
64
73
|
),
|
|
65
74
|
...props
|
package/dist/ui/avatar.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Avatar as Avatar$1 } from '@base-ui/react/avatar';
|
|
3
|
+
import { DsDataTone } from './legend.js';
|
|
3
4
|
|
|
4
5
|
declare function Avatar({ className, size, ...props }: Avatar$1.Root.Props & {
|
|
5
6
|
size?: "default" | "sm" | "lg";
|
|
6
7
|
}): React.JSX.Element;
|
|
7
8
|
declare function AvatarImage({ className, ...props }: Avatar$1.Image.Props): React.JSX.Element;
|
|
8
|
-
declare function AvatarFallback({ className, ...props }: Avatar$1.Fallback.Props
|
|
9
|
+
declare function AvatarFallback({ className, tone, style, ...props }: Avatar$1.Fallback.Props & {
|
|
10
|
+
tone?: DsDataTone;
|
|
11
|
+
}): React.JSX.Element;
|
|
9
12
|
declare function AvatarBadge({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
10
13
|
declare function AvatarGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
11
14
|
declare function AvatarGroupCount({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
package/dist/ui/avatar.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar";
|
|
3
3
|
import { cn } from "../lib/utils.js";
|
|
4
|
+
import { dataToneSoftVar, dataToneVar } from "./legend.js";
|
|
4
5
|
function Avatar({
|
|
5
6
|
className,
|
|
6
7
|
size = "default",
|
|
@@ -34,16 +35,24 @@ function AvatarImage({ className, ...props }) {
|
|
|
34
35
|
}
|
|
35
36
|
function AvatarFallback({
|
|
36
37
|
className,
|
|
38
|
+
tone,
|
|
39
|
+
style,
|
|
37
40
|
...props
|
|
38
41
|
}) {
|
|
39
42
|
return /* @__PURE__ */ jsx(
|
|
40
43
|
AvatarPrimitive.Fallback,
|
|
41
44
|
{
|
|
42
45
|
"data-slot": "avatar-fallback",
|
|
46
|
+
"data-tone": tone,
|
|
43
47
|
className: cn(
|
|
44
|
-
"flex size-full items-center justify-center rounded-avatar bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",
|
|
48
|
+
"flex size-full items-center justify-center rounded-avatar bg-muted font-(family-name:--ds-avatar-font) font-(--ds-avatar-weight) text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",
|
|
45
49
|
className
|
|
46
50
|
),
|
|
51
|
+
style: tone ? (state) => ({
|
|
52
|
+
backgroundColor: dataToneSoftVar[tone],
|
|
53
|
+
color: dataToneVar[tone],
|
|
54
|
+
...typeof style === "function" ? style(state) : style
|
|
55
|
+
}) : style,
|
|
47
56
|
...props
|
|
48
57
|
}
|
|
49
58
|
);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
+
|
|
4
|
+
declare function BottomNav({ className, position, ...props }: React.ComponentProps<"nav"> & {
|
|
5
|
+
position?: "fixed" | "static";
|
|
6
|
+
}): React.JSX.Element;
|
|
7
|
+
declare function BottomNavItem({ className, active, render, ...props }: useRender.ComponentProps<"a"> & {
|
|
8
|
+
active?: boolean;
|
|
9
|
+
}): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
10
|
+
declare function BottomNavIcon({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
11
|
+
declare function BottomNavLabel({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
12
|
+
/** Contador o punto sobre el icono (avisos sin leer). Sin hijos, solo el punto. */
|
|
13
|
+
declare function BottomNavBadge({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
14
|
+
|
|
15
|
+
export { BottomNav, BottomNavBadge, BottomNavIcon, BottomNavItem, BottomNavLabel };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
5
|
+
import { useDsMessages } from "../hooks/use-ds-messages.js";
|
|
6
|
+
import { cn } from "../lib/utils.js";
|
|
7
|
+
function BottomNav({
|
|
8
|
+
className,
|
|
9
|
+
position = "fixed",
|
|
10
|
+
...props
|
|
11
|
+
}) {
|
|
12
|
+
const t = useDsMessages();
|
|
13
|
+
return /* @__PURE__ */ jsx(
|
|
14
|
+
"nav",
|
|
15
|
+
{
|
|
16
|
+
"data-slot": "bottom-nav",
|
|
17
|
+
"data-position": position,
|
|
18
|
+
"aria-label": t.bottomNav,
|
|
19
|
+
className: cn(
|
|
20
|
+
"z-(--ds-z-sticky) flex h-[calc(var(--ds-bottom-nav-h)+env(safe-area-inset-bottom))] items-start justify-around gap-1 overflow-hidden rounded-(--ds-radius-bottom-nav) border-t-(length:--ds-bottom-nav-border-w) border-border bg-(--ds-bottom-nav-bg) px-(--ds-bottom-nav-px) pb-[env(safe-area-inset-bottom)] shadow-(--ds-shadow-bottom-nav)",
|
|
21
|
+
"data-[position=fixed]:fixed data-[position=fixed]:inset-x-(--ds-bottom-nav-inset) data-[position=fixed]:bottom-[calc(var(--ds-bottom-nav-inset)+env(safe-area-inset-bottom))] data-[position=fixed]:pb-0",
|
|
22
|
+
className
|
|
23
|
+
),
|
|
24
|
+
...props
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
function BottomNavItem({
|
|
29
|
+
className,
|
|
30
|
+
active = false,
|
|
31
|
+
render,
|
|
32
|
+
...props
|
|
33
|
+
}) {
|
|
34
|
+
return useRender({
|
|
35
|
+
defaultTagName: "a",
|
|
36
|
+
props: mergeProps(
|
|
37
|
+
{
|
|
38
|
+
className: cn(
|
|
39
|
+
"group/bottom-nav-item flex h-(--ds-bottom-nav-h) min-w-(--ds-touch-target) flex-1 flex-col items-center justify-center gap-1 text-(length:--ds-bottom-nav-label) text-(--ds-bottom-nav-item-fg) outline-none transition-colors duration-(--ds-motion-snap) select-none focus-visible:ring-(length:--ds-ring-width) focus-visible:ring-(--ds-ring-color) focus-visible:ring-inset data-active:font-(--ds-nav-active-weight) data-active:text-(--ds-bottom-nav-item-active-fg) aria-disabled:pointer-events-none aria-disabled:opacity-(--ds-disabled-opacity)",
|
|
40
|
+
className
|
|
41
|
+
),
|
|
42
|
+
"aria-current": active ? "page" : void 0
|
|
43
|
+
},
|
|
44
|
+
props
|
|
45
|
+
),
|
|
46
|
+
render,
|
|
47
|
+
state: { slot: "bottom-nav-item", active },
|
|
48
|
+
stateAttributesMapping: {
|
|
49
|
+
slot: (slot) => ({ "data-slot": slot }),
|
|
50
|
+
active: (value) => value ? { "data-active": "" } : null
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function BottomNavIcon({ className, ...props }) {
|
|
55
|
+
return /* @__PURE__ */ jsx(
|
|
56
|
+
"span",
|
|
57
|
+
{
|
|
58
|
+
"data-slot": "bottom-nav-icon",
|
|
59
|
+
"aria-hidden": "true",
|
|
60
|
+
className: cn(
|
|
61
|
+
"relative flex h-(--ds-bottom-nav-icon-box-h) w-(--ds-bottom-nav-icon-box-w) items-center justify-center rounded-(--ds-radius-bottom-nav-item) bg-(--ds-bottom-nav-item-bg) transition-colors duration-(--ds-motion-snap) group-data-active/bottom-nav-item:bg-(--ds-bottom-nav-item-active-bg) group-data-active/bottom-nav-item:text-(--ds-bottom-nav-icon-active-fg) [&_svg:not([class*='size-'])]:size-(--ds-bottom-nav-icon) [&_svg]:shrink-0",
|
|
62
|
+
className
|
|
63
|
+
),
|
|
64
|
+
...props
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
function BottomNavLabel({ className, ...props }) {
|
|
69
|
+
return /* @__PURE__ */ jsx(
|
|
70
|
+
"span",
|
|
71
|
+
{
|
|
72
|
+
"data-slot": "bottom-nav-label",
|
|
73
|
+
className: cn("max-w-full truncate leading-none", className),
|
|
74
|
+
...props
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
function BottomNavBadge({ className, ...props }) {
|
|
79
|
+
return /* @__PURE__ */ jsx(
|
|
80
|
+
"span",
|
|
81
|
+
{
|
|
82
|
+
"data-slot": "bottom-nav-badge",
|
|
83
|
+
className: cn(
|
|
84
|
+
"absolute -top-1 -end-1 flex min-w-2.5 h-2.5 items-center justify-center rounded-full bg-destructive px-1 text-(length:--ds-bottom-nav-label) leading-none font-(--ds-strong-weight) text-destructive-foreground not-empty:h-4 not-empty:min-w-4 ring-(length:--ds-avatar-ring-w) ring-(--ds-bottom-nav-bg)",
|
|
85
|
+
className
|
|
86
|
+
),
|
|
87
|
+
...props
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
export {
|
|
92
|
+
BottomNav,
|
|
93
|
+
BottomNavBadge,
|
|
94
|
+
BottomNavIcon,
|
|
95
|
+
BottomNavItem,
|
|
96
|
+
BottomNavLabel
|
|
97
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Radio } from '@base-ui/react/radio';
|
|
3
|
+
import { RadioGroup } from '@base-ui/react/radio-group';
|
|
4
|
+
|
|
5
|
+
declare function ChoiceCardGroup({ className, ...props }: RadioGroup.Props): React.JSX.Element;
|
|
6
|
+
declare function ChoiceCard({ className, orientation, ...props }: Radio.Root.Props & {
|
|
7
|
+
orientation?: "horizontal" | "vertical";
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
declare function ChoiceCardMedia({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
10
|
+
declare function ChoiceCardContent({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
11
|
+
declare function ChoiceCardTitle({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
12
|
+
declare function ChoiceCardDescription({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
13
|
+
/** Marca de seleccionado (opcional): un círculo con punto en la esquina, como un radio. */
|
|
14
|
+
declare function ChoiceCardIndicator({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
15
|
+
|
|
16
|
+
export { ChoiceCard, ChoiceCardContent, ChoiceCardDescription, ChoiceCardGroup, ChoiceCardIndicator, ChoiceCardMedia, ChoiceCardTitle };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Radio as RadioPrimitive } from "@base-ui/react/radio";
|
|
4
|
+
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
function ChoiceCardGroup({ className, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
RadioGroupPrimitive,
|
|
9
|
+
{
|
|
10
|
+
"data-slot": "choice-card-group",
|
|
11
|
+
className: cn("grid w-full gap-3 sm:grid-cols-[repeat(auto-fill,minmax(10rem,1fr))]", className),
|
|
12
|
+
...props
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
function ChoiceCard({
|
|
17
|
+
className,
|
|
18
|
+
orientation = "horizontal",
|
|
19
|
+
...props
|
|
20
|
+
}) {
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
RadioPrimitive.Root,
|
|
23
|
+
{
|
|
24
|
+
"data-slot": "choice-card",
|
|
25
|
+
"data-orientation": orientation,
|
|
26
|
+
className: cn(
|
|
27
|
+
"group/choice-card relative flex min-h-(--ds-touch-target) items-center gap-(--ds-choice-card-gap) rounded-(--ds-radius-choice-card) border border-(--ds-choice-card-border) bg-(--ds-choice-card-bg) px-(--ds-choice-card-px) py-(--ds-choice-card-py) text-start text-foreground outline-none transition-colors duration-(--ds-motion-snap) select-none",
|
|
28
|
+
"hover:border-(--ds-choice-card-selected-border) focus-visible:ring-(length:--ds-ring-width) focus-visible:ring-(--ds-ring-color)",
|
|
29
|
+
"data-checked:border-(--ds-choice-card-selected-border) data-checked:bg-(--ds-choice-card-selected-bg) data-checked:text-(--ds-choice-card-selected-fg) data-checked:font-(--ds-choice-card-selected-weight)",
|
|
30
|
+
"data-disabled:cursor-not-allowed data-disabled:border-(--ds-choice-card-disabled-bg) data-disabled:bg-(--ds-choice-card-disabled-bg) data-disabled:text-(--ds-choice-card-disabled-fg) data-disabled:opacity-(--ds-choice-card-disabled-opacity)",
|
|
31
|
+
"data-[orientation=vertical]:flex-col data-[orientation=vertical]:justify-center data-[orientation=vertical]:text-center",
|
|
32
|
+
className
|
|
33
|
+
),
|
|
34
|
+
...props
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
function ChoiceCardMedia({ className, ...props }) {
|
|
39
|
+
return /* @__PURE__ */ jsx(
|
|
40
|
+
"span",
|
|
41
|
+
{
|
|
42
|
+
"data-slot": "choice-card-media",
|
|
43
|
+
"aria-hidden": "true",
|
|
44
|
+
className: cn(
|
|
45
|
+
"flex shrink-0 items-center justify-center text-(--ds-choice-card-icon-fg) group-data-checked/choice-card:text-(--ds-choice-card-selected-accent) group-data-disabled/choice-card:text-current [&_svg:not([class*='size-'])]:size-(--ds-choice-card-icon)",
|
|
46
|
+
className
|
|
47
|
+
),
|
|
48
|
+
...props
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
function ChoiceCardContent({ className, ...props }) {
|
|
53
|
+
return /* @__PURE__ */ jsx(
|
|
54
|
+
"span",
|
|
55
|
+
{
|
|
56
|
+
"data-slot": "choice-card-content",
|
|
57
|
+
className: cn("flex min-w-0 flex-1 flex-col gap-0.5", className),
|
|
58
|
+
...props
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
function ChoiceCardTitle({ className, ...props }) {
|
|
63
|
+
return /* @__PURE__ */ jsx("span", { "data-slot": "choice-card-title", className: cn("text-sm", className), ...props });
|
|
64
|
+
}
|
|
65
|
+
function ChoiceCardDescription({ className, ...props }) {
|
|
66
|
+
return /* @__PURE__ */ jsx(
|
|
67
|
+
"span",
|
|
68
|
+
{
|
|
69
|
+
"data-slot": "choice-card-description",
|
|
70
|
+
className: cn("text-xs font-normal text-muted-foreground group-data-disabled/choice-card:text-current", className),
|
|
71
|
+
...props
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
function ChoiceCardIndicator({ className, ...props }) {
|
|
76
|
+
return /* @__PURE__ */ jsx(
|
|
77
|
+
"span",
|
|
78
|
+
{
|
|
79
|
+
"data-slot": "choice-card-indicator",
|
|
80
|
+
"aria-hidden": "true",
|
|
81
|
+
className: cn(
|
|
82
|
+
"flex size-(--ds-check-size) shrink-0 items-center justify-center rounded-full border border-input 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
|
+
className
|
|
84
|
+
),
|
|
85
|
+
...props,
|
|
86
|
+
children: /* @__PURE__ */ jsx("span", { className: "size-2 scale-0 rounded-full bg-primary-foreground transition-transform duration-(--ds-motion-snap) group-data-checked/choice-card:scale-100" })
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
export {
|
|
91
|
+
ChoiceCard,
|
|
92
|
+
ChoiceCardContent,
|
|
93
|
+
ChoiceCardDescription,
|
|
94
|
+
ChoiceCardGroup,
|
|
95
|
+
ChoiceCardIndicator,
|
|
96
|
+
ChoiceCardMedia,
|
|
97
|
+
ChoiceCardTitle
|
|
98
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Button } from './button.js';
|
|
3
|
+
import 'class-variance-authority/types';
|
|
4
|
+
import '@base-ui/react/use-render';
|
|
5
|
+
import 'class-variance-authority';
|
|
6
|
+
|
|
7
|
+
declare function CopyButton({ value, className, onClick, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, "value" | "children"> & {
|
|
8
|
+
value: string;
|
|
9
|
+
}): React.JSX.Element;
|
|
10
|
+
declare function CopyField({ value, children, className, onClick, ...props }: Omit<React.ComponentProps<"button">, "value"> & {
|
|
11
|
+
value: string;
|
|
12
|
+
}): React.JSX.Element;
|
|
13
|
+
|
|
14
|
+
export { CopyButton, CopyField };
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { CheckIcon, CopyIcon } from "lucide-react";
|
|
5
|
+
import { useDsMessages } from "../hooks/use-ds-messages.js";
|
|
6
|
+
import { dsFormat } from "../lib/i18n.js";
|
|
7
|
+
import { cn } from "../lib/utils.js";
|
|
8
|
+
import { Button } from "./button.js";
|
|
9
|
+
function useCopy(value) {
|
|
10
|
+
const [copied, setCopied] = React.useState(false);
|
|
11
|
+
React.useEffect(() => {
|
|
12
|
+
if (!copied) return;
|
|
13
|
+
const id = window.setTimeout(() => setCopied(false), 2e3);
|
|
14
|
+
return () => window.clearTimeout(id);
|
|
15
|
+
}, [copied]);
|
|
16
|
+
const copy = React.useCallback(async () => {
|
|
17
|
+
try {
|
|
18
|
+
await navigator.clipboard.writeText(value);
|
|
19
|
+
setCopied(true);
|
|
20
|
+
} catch {
|
|
21
|
+
}
|
|
22
|
+
}, [value]);
|
|
23
|
+
return { copied, copy };
|
|
24
|
+
}
|
|
25
|
+
function CopyStatus({ copied }) {
|
|
26
|
+
const t = useDsMessages();
|
|
27
|
+
return /* @__PURE__ */ jsx("span", { className: "sr-only", "aria-live": "polite", children: copied ? t.copied : null });
|
|
28
|
+
}
|
|
29
|
+
function CopyButton({
|
|
30
|
+
value,
|
|
31
|
+
className,
|
|
32
|
+
onClick,
|
|
33
|
+
variant = "ghost",
|
|
34
|
+
size = "icon-sm",
|
|
35
|
+
...props
|
|
36
|
+
}) {
|
|
37
|
+
const t = useDsMessages();
|
|
38
|
+
const { copied, copy } = useCopy(value);
|
|
39
|
+
const label = copied ? t.copied : t.copy;
|
|
40
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
41
|
+
/* @__PURE__ */ jsx(
|
|
42
|
+
Button,
|
|
43
|
+
{
|
|
44
|
+
"data-slot": "copy-button",
|
|
45
|
+
"data-copied": copied ? "" : void 0,
|
|
46
|
+
type: "button",
|
|
47
|
+
variant,
|
|
48
|
+
size,
|
|
49
|
+
"aria-label": label,
|
|
50
|
+
title: label,
|
|
51
|
+
className,
|
|
52
|
+
onClick: (event) => {
|
|
53
|
+
onClick?.(event);
|
|
54
|
+
void copy();
|
|
55
|
+
},
|
|
56
|
+
...props,
|
|
57
|
+
children: copied ? /* @__PURE__ */ jsx(CheckIcon, {}) : /* @__PURE__ */ jsx(CopyIcon, {})
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
/* @__PURE__ */ jsx(CopyStatus, { copied })
|
|
61
|
+
] });
|
|
62
|
+
}
|
|
63
|
+
function CopyField({
|
|
64
|
+
value,
|
|
65
|
+
children,
|
|
66
|
+
className,
|
|
67
|
+
onClick,
|
|
68
|
+
...props
|
|
69
|
+
}) {
|
|
70
|
+
const t = useDsMessages();
|
|
71
|
+
const { copied, copy } = useCopy(value);
|
|
72
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
73
|
+
/* @__PURE__ */ jsxs(
|
|
74
|
+
"button",
|
|
75
|
+
{
|
|
76
|
+
"data-slot": "copy-field",
|
|
77
|
+
"data-copied": copied ? "" : void 0,
|
|
78
|
+
type: "button",
|
|
79
|
+
"aria-label": dsFormat(t.copyValue, { value }),
|
|
80
|
+
title: copied ? t.copied : t.copy,
|
|
81
|
+
className: cn(
|
|
82
|
+
"group/copy-field inline-flex max-w-full min-h-(--ds-touch-target) items-center gap-(--ds-copy-field-gap) rounded-(--ds-radius-copy-field) border border-(--ds-copy-field-border) bg-transparent px-(--ds-copy-field-px) py-(--ds-copy-field-py) text-start text-(length:--ds-copy-field-text) text-foreground outline-none transition-colors duration-(--ds-motion-snap)",
|
|
83
|
+
"hover:border-(--ds-copy-field-hover) focus-visible:ring-(length:--ds-ring-width) focus-visible:ring-(--ds-ring-color)",
|
|
84
|
+
"disabled:cursor-not-allowed disabled:opacity-(--ds-disabled-opacity)",
|
|
85
|
+
className
|
|
86
|
+
),
|
|
87
|
+
onClick: (event) => {
|
|
88
|
+
onClick?.(event);
|
|
89
|
+
void copy();
|
|
90
|
+
},
|
|
91
|
+
...props,
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ jsx("span", { "data-slot": "copy-field-value", className: "min-w-0 truncate", children: children ?? value }),
|
|
94
|
+
/* @__PURE__ */ jsx(
|
|
95
|
+
"span",
|
|
96
|
+
{
|
|
97
|
+
"data-slot": "copy-field-icon",
|
|
98
|
+
"aria-hidden": "true",
|
|
99
|
+
className: "flex shrink-0 text-(--ds-copy-field-icon-fg) group-hover/copy-field:text-(--ds-copy-field-hover) group-focus-visible/copy-field:text-(--ds-ring-color) [&_svg]:size-4",
|
|
100
|
+
children: copied ? /* @__PURE__ */ jsx(CheckIcon, {}) : /* @__PURE__ */ jsx(CopyIcon, {})
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
),
|
|
106
|
+
/* @__PURE__ */ jsx(CopyStatus, { copied })
|
|
107
|
+
] });
|
|
108
|
+
}
|
|
109
|
+
export {
|
|
110
|
+
CopyButton,
|
|
111
|
+
CopyField
|
|
112
|
+
};
|
package/dist/ui/icon-tile.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
|
|
5
5
|
declare const iconTileVariants: (props?: ({
|
|
6
|
-
tone?: "info" | "success" | "warning" | "danger" | "
|
|
6
|
+
tone?: "info" | "success" | "warning" | "danger" | "primary" | "neutral" | "accent" | null | undefined;
|
|
7
7
|
size?: "sm" | "lg" | "md" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
declare function IconTile({ className, tone, size, ...props }: React.ComponentProps<"div"> & VariantProps<typeof iconTileVariants>): React.JSX.Element;
|
package/dist/ui/input-group.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import '@base-ui/react/use-render';
|
|
|
6
6
|
|
|
7
7
|
declare function InputGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
8
|
declare const inputGroupAddonVariants: (props?: ({
|
|
9
|
-
align?: "inline-end" | "inline-start" | "block-
|
|
9
|
+
align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
|
|
10
10
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
11
|
declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): React.JSX.Element;
|
|
12
12
|
declare const inputGroupButtonVariants: (props?: ({
|
package/dist/ui/progress.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Progress as Progress$1 } from '@base-ui/react/progress';
|
|
3
|
+
import { DsDataTone } from './legend.js';
|
|
3
4
|
|
|
4
|
-
declare function Progress({ className, value, ...props }: Progress$1.Root.Props
|
|
5
|
+
declare function Progress({ className, value, tone, ...props }: Progress$1.Root.Props & {
|
|
6
|
+
tone?: DsDataTone;
|
|
7
|
+
}): React.JSX.Element;
|
|
5
8
|
|
|
6
9
|
export { Progress };
|
package/dist/ui/progress.js
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Progress as ProgressPrimitive } from "@base-ui/react/progress";
|
|
4
4
|
import { cn } from "../lib/utils.js";
|
|
5
|
+
import { dataToneVar } from "./legend.js";
|
|
5
6
|
function Progress({
|
|
6
7
|
className,
|
|
7
8
|
value,
|
|
9
|
+
tone,
|
|
8
10
|
...props
|
|
9
11
|
}) {
|
|
10
12
|
return /* @__PURE__ */ jsx(ProgressPrimitive.Root, { "data-slot": "progress", value, ...props, children: /* @__PURE__ */ jsx(
|
|
@@ -19,7 +21,9 @@ function Progress({
|
|
|
19
21
|
ProgressPrimitive.Indicator,
|
|
20
22
|
{
|
|
21
23
|
"data-slot": "progress-indicator",
|
|
22
|
-
|
|
24
|
+
"data-tone": tone,
|
|
25
|
+
className: "h-full bg-(--ds-progress-fill) transition-all duration-(--ds-motion-snap) data-complete:bg-(--ds-progress-fill-complete)",
|
|
26
|
+
style: tone ? { backgroundColor: dataToneVar[tone] } : void 0
|
|
23
27
|
}
|
|
24
28
|
)
|
|
25
29
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orbital-ds",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "Sistema de diseño genérico: estructura común + temas con personalidad (qratia, zyro) + ~60 componentes sobre Base UI y Tailwind v4, con contrato verificable y legible por agentes.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design-system",
|