orbital-ds 0.48.0 → 0.50.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 +13 -4
- package/CHANGELOG.md +31 -0
- package/README.md +1 -1
- package/components.manifest.json +383 -37
- package/dist/auth-form-B1hgbXkI.d.ts +144 -0
- package/dist/hooks/use-ds-messages.d.ts +598 -0
- package/dist/hooks/use-ds-motion.d.ts +17 -0
- package/dist/hooks/use-esc-close-stack.d.ts +3 -0
- package/dist/hooks/use-in-view.d.ts +9 -0
- package/dist/hooks/use-mobile.d.ts +3 -0
- package/dist/hooks/use-simulated-progress.d.ts +11 -0
- package/dist/lib/a2ui-catalog.d.ts +42 -0
- package/dist/lib/a2ui.d.ts +289 -0
- package/dist/lib/ai-events.d.ts +15 -0
- package/dist/lib/auth-better-auth.d.ts +29 -0
- package/dist/lib/auth-flow.d.ts +85 -0
- package/dist/lib/auth-providers.d.ts +194 -0
- package/dist/lib/auth.d.ts +68 -0
- package/dist/lib/brand-allowlist.d.ts +3 -0
- package/dist/lib/brand-allowlist.js +16 -0
- package/dist/lib/brand-runtime.d.ts +52 -0
- package/dist/lib/echarts-presets.d.ts +307 -0
- package/dist/lib/echarts-server.d.ts +15 -0
- package/dist/lib/echarts-setup.d.ts +8 -0
- package/dist/lib/echarts-theme.d.ts +36 -0
- package/dist/lib/format.d.ts +57 -0
- package/dist/lib/header-control.d.ts +4 -0
- package/dist/lib/i18n.d.ts +611 -0
- package/dist/lib/i18n.js +162 -3
- package/dist/lib/image-upload.d.ts +41 -0
- package/dist/lib/locales/de.d.ts +7 -0
- package/dist/lib/locales/de.js +54 -1
- package/dist/lib/locales/fr.d.ts +7 -0
- package/dist/lib/locales/fr.js +54 -1
- package/dist/lib/locales/he.d.ts +7 -0
- package/dist/lib/locales/he.js +54 -1
- package/dist/lib/locales/it.d.ts +7 -0
- package/dist/lib/locales/it.js +54 -1
- package/dist/lib/motion.d.ts +74 -0
- package/dist/lib/presets.d.ts +8 -0
- package/dist/lib/template-syntax.d.ts +22 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/motion.css +146 -0
- package/dist/styles.css +1819 -0
- package/dist/themes/chocolate.css +259 -0
- package/dist/themes/chocolate.fonts.css +2 -0
- package/dist/themes/chocolate.guide.md +30 -0
- package/dist/themes/chocolate.meta.json +61 -0
- package/dist/themes/chocolate.scoped.css +259 -0
- package/dist/themes/chocolate.tokens.json +49 -0
- package/dist/themes/fractalia.css +556 -0
- package/dist/themes/fractalia.fonts.css +3 -0
- package/dist/themes/fractalia.guide.md +86 -0
- package/dist/themes/fractalia.meta.json +112 -0
- package/dist/themes/fractalia.scoped.css +556 -0
- package/dist/themes/fractalia.tokens.json +39 -0
- package/dist/themes/friendly.css +375 -0
- package/dist/themes/friendly.fonts.css +2 -0
- package/dist/themes/friendly.guide.md +38 -0
- package/dist/themes/friendly.meta.json +82 -0
- package/dist/themes/friendly.scoped.css +375 -0
- package/dist/themes/friendly.tokens.json +45 -0
- package/dist/themes/lagoon.css +362 -0
- package/dist/themes/lagoon.fonts.css +2 -0
- package/dist/themes/lagoon.guide.md +47 -0
- package/dist/themes/lagoon.meta.json +85 -0
- package/dist/themes/lagoon.scoped.css +362 -0
- package/dist/themes/lagoon.tokens.json +49 -0
- package/dist/themes/liquid.css +510 -0
- package/dist/themes/liquid.fonts.css +7 -0
- package/dist/themes/liquid.guide.md +82 -0
- package/dist/themes/liquid.meta.json +134 -0
- package/dist/themes/liquid.scoped.css +510 -0
- package/dist/themes/liquid.tokens.json +47 -0
- package/dist/themes/matcha.css +259 -0
- package/dist/themes/matcha.fonts.css +2 -0
- package/dist/themes/matcha.guide.md +30 -0
- package/dist/themes/matcha.meta.json +61 -0
- package/dist/themes/matcha.scoped.css +259 -0
- package/dist/themes/matcha.tokens.json +49 -0
- package/dist/themes/qratia.css +264 -0
- package/dist/themes/qratia.fonts.css +2 -0
- package/dist/themes/qratia.guide.md +34 -0
- package/dist/themes/qratia.meta.json +49 -0
- package/dist/themes/qratia.scoped.css +264 -0
- package/dist/themes/qratia.tokens.json +49 -0
- package/dist/themes/stone.css +263 -0
- package/dist/themes/stone.fonts.css +2 -0
- package/dist/themes/stone.guide.md +30 -0
- package/dist/themes/stone.meta.json +47 -0
- package/dist/themes/stone.scoped.css +263 -0
- package/dist/themes/stone.tokens.json +49 -0
- package/dist/themes/tactile.css +591 -0
- package/dist/themes/tactile.fonts.css +3 -0
- package/dist/themes/tactile.guide.md +82 -0
- package/dist/themes/tactile.meta.json +182 -0
- package/dist/themes/tactile.scoped.css +591 -0
- package/dist/themes/tactile.tokens.json +42 -0
- package/dist/themes/twitter.css +364 -0
- package/dist/themes/twitter.fonts.css +6 -0
- package/dist/themes/twitter.guide.md +35 -0
- package/dist/themes/twitter.meta.json +90 -0
- package/dist/themes/twitter.scoped.css +364 -0
- package/dist/themes/twitter.tokens.json +45 -0
- package/dist/themes/y2k.css +259 -0
- package/dist/themes/y2k.fonts.css +2 -0
- package/dist/themes/y2k.guide.md +30 -0
- package/dist/themes/y2k.meta.json +59 -0
- package/dist/themes/y2k.scoped.css +259 -0
- package/dist/themes/y2k.tokens.json +49 -0
- package/dist/themes/zyro.css +442 -0
- package/dist/themes/zyro.fonts.css +2 -0
- package/dist/themes/zyro.guide.md +33 -0
- package/dist/themes/zyro.meta.json +74 -0
- package/dist/themes/zyro.scoped.css +442 -0
- package/dist/themes/zyro.tokens.json +46 -0
- package/dist/ui/a2ui-renderer.d.ts +44 -0
- package/dist/ui/accordion.d.ts +9 -0
- package/dist/ui/agent-events.d.ts +49 -0
- package/dist/ui/ai-tag.d.ts +24 -0
- package/dist/ui/alert-dialog.d.ts +60 -0
- package/dist/ui/alert.d.ts +13 -0
- package/dist/ui/animated-number.d.ts +20 -0
- package/dist/ui/api-key-list.d.ts +40 -0
- package/dist/ui/api-key-list.js +89 -0
- package/dist/ui/app-bar.d.ts +32 -0
- package/dist/ui/aspect-ratio.d.ts +7 -0
- package/dist/ui/attachment.d.ts +26 -0
- package/dist/ui/audit-log.d.ts +53 -0
- package/dist/ui/audit-log.js +102 -0
- package/dist/ui/auth-backdrop.d.ts +37 -0
- package/dist/ui/auth-form.d.ts +4 -0
- package/dist/ui/auth-layout.d.ts +110 -0
- package/dist/ui/auth-parts.d.ts +43 -0
- package/dist/ui/auth-status.d.ts +23 -0
- package/dist/ui/avatar.d.ts +43 -0
- package/dist/ui/ayuda.d.ts +22 -0
- package/dist/ui/badge.d.ts +15 -0
- package/dist/ui/banner.d.ts +14 -0
- package/dist/ui/bottom-nav.d.ts +37 -0
- package/dist/ui/breadcrumb.d.ts +34 -0
- package/dist/ui/bubble.d.ts +19 -0
- package/dist/ui/button-group.d.ts +15 -0
- package/dist/ui/button.d.ts +14 -0
- package/dist/ui/calendar.d.ts +28 -0
- package/dist/ui/card-stack.d.ts +36 -0
- package/dist/ui/card.d.ts +61 -0
- package/dist/ui/carousel.d.ts +68 -0
- package/dist/ui/chain-of-thought.d.ts +34 -0
- package/dist/ui/chart-card.d.ts +46 -0
- package/dist/ui/chat-composer.d.ts +58 -0
- package/dist/ui/checkbox.d.ts +6 -0
- package/dist/ui/choice-card.d.ts +49 -0
- package/dist/ui/code-block.d.ts +29 -0
- package/dist/ui/collapsible.d.ts +8 -0
- package/dist/ui/combobox.d.ts +74 -0
- package/dist/ui/command-palette.d.ts +54 -0
- package/dist/ui/command.d.ts +56 -0
- package/dist/ui/confirm-action.d.ts +48 -0
- package/dist/ui/confirm-dialog.d.ts +44 -0
- package/dist/ui/connected-accounts.d.ts +25 -0
- package/dist/ui/content-card.d.ts +66 -0
- package/dist/ui/context-menu.d.ts +66 -0
- package/dist/ui/conversation-list.d.ts +44 -0
- package/dist/ui/copy-button.d.ts +25 -0
- package/dist/ui/cta-banner.d.ts +30 -0
- package/dist/ui/data-table.d.ts +198 -0
- package/dist/ui/date-picker.d.ts +65 -0
- package/dist/ui/date-time.d.ts +40 -0
- package/dist/ui/description-list.d.ts +49 -0
- package/dist/ui/detail-panel.d.ts +40 -0
- package/dist/ui/dialog.d.ts +54 -0
- package/dist/ui/direction.d.ts +1 -0
- package/dist/ui/dock.d.ts +30 -0
- package/dist/ui/drawer.d.ts +59 -0
- package/dist/ui/dropdown-menu.d.ts +63 -0
- package/dist/ui/dropzone.d.ts +44 -0
- package/dist/ui/echart.d.ts +46 -0
- package/dist/ui/empty-state.d.ts +26 -0
- package/dist/ui/empty.d.ts +15 -0
- package/dist/ui/entity-list.d.ts +57 -0
- package/dist/ui/error-page.d.ts +28 -0
- package/dist/ui/error-state.d.ts +16 -0
- package/dist/ui/eyebrow.d.ts +7 -0
- package/dist/ui/faq.d.ts +34 -0
- package/dist/ui/feature-grid.d.ts +40 -0
- package/dist/ui/field.d.ts +28 -0
- package/dist/ui/file-upload.d.ts +42 -0
- package/dist/ui/filter-bar.d.ts +38 -0
- package/dist/ui/form-layout.d.ts +43 -0
- package/dist/ui/gauge.d.ts +66 -0
- package/dist/ui/generated-image.d.ts +33 -0
- package/dist/ui/generated-table.d.ts +29 -0
- package/dist/ui/heatmap-grid.d.ts +59 -0
- package/dist/ui/hero.d.ts +58 -0
- package/dist/ui/hover-card.d.ts +8 -0
- package/dist/ui/i18n-provider.d.ts +27 -0
- package/dist/ui/icon-tile.d.ts +11 -0
- package/dist/ui/input-group.d.ts +22 -0
- package/dist/ui/input-otp.d.ts +36 -0
- package/dist/ui/input.d.ts +21 -0
- package/dist/ui/instruction-editor.d.ts +81 -0
- package/dist/ui/item.d.ts +26 -0
- package/dist/ui/kbd.d.ts +6 -0
- package/dist/ui/label.d.ts +22 -0
- package/dist/ui/landing-section.d.ts +34 -0
- package/dist/ui/legend.d.ts +57 -0
- package/dist/ui/level-meter.d.ts +28 -0
- package/dist/ui/load-more.d.ts +36 -0
- package/dist/ui/loading-state.d.ts +26 -0
- package/dist/ui/locale-switcher.d.ts +19 -0
- package/dist/ui/markdown.d.ts +29 -0
- package/dist/ui/marker.d.ts +13 -0
- package/dist/ui/media-card.d.ts +29 -0
- package/dist/ui/member-list.d.ts +43 -0
- package/dist/ui/member-list.js +107 -0
- package/dist/ui/menubar.d.ts +70 -0
- package/dist/ui/message-actions.d.ts +21 -0
- package/dist/ui/message-scroller.d.ts +46 -0
- package/dist/ui/message.d.ts +45 -0
- package/dist/ui/mfa-challenge.d.ts +4 -0
- package/dist/ui/mfa-setup.d.ts +29 -0
- package/dist/ui/mosaic.d.ts +38 -0
- package/dist/ui/motion-provider.d.ts +28 -0
- package/dist/ui/native-select.d.ts +32 -0
- package/dist/ui/navigation-menu.d.ts +15 -0
- package/dist/ui/next-step-card.d.ts +55 -0
- package/dist/ui/notice-review.d.ts +64 -0
- package/dist/ui/notifications.d.ts +81 -0
- package/dist/ui/oauth-consent.d.ts +54 -0
- package/dist/ui/onboarding-checklist.d.ts +38 -0
- package/dist/ui/onboarding-checklist.js +132 -0
- package/dist/ui/page-header.d.ts +64 -0
- package/dist/ui/page-loader.d.ts +40 -0
- package/dist/ui/page-shell.d.ts +25 -0
- package/dist/ui/pagination.d.ts +42 -0
- package/dist/ui/panel.d.ts +12 -0
- package/dist/ui/passkey-list.d.ts +17 -0
- package/dist/ui/password-input.d.ts +5 -0
- package/dist/ui/password-strength.d.ts +28 -0
- package/dist/ui/permission-matrix.d.ts +35 -0
- package/dist/ui/permission-matrix.js +89 -0
- package/dist/ui/plan-summary.d.ts +59 -0
- package/dist/ui/plan-summary.js +92 -0
- package/dist/ui/popover.d.ts +44 -0
- package/dist/ui/pricing-table.d.ts +29 -0
- package/dist/ui/progress.d.ts +9 -0
- package/dist/ui/proportion-bar.d.ts +52 -0
- package/dist/ui/quantity.d.ts +25 -0
- package/dist/ui/questionnaire.d.ts +62 -0
- package/dist/ui/radio-group.d.ts +8 -0
- package/dist/ui/reasoning.d.ts +24 -0
- package/dist/ui/resizable.d.ts +10 -0
- package/dist/ui/reveal.d.ts +28 -0
- package/dist/ui/scroll-area.d.ts +7 -0
- package/dist/ui/search-box.d.ts +32 -0
- package/dist/ui/select.d.ts +19 -0
- package/dist/ui/separator.d.ts +6 -0
- package/dist/ui/session-list.d.ts +19 -0
- package/dist/ui/session-timeout.d.ts +13 -0
- package/dist/ui/sheet.d.ts +53 -0
- package/dist/ui/shield.d.ts +35 -0
- package/dist/ui/show-more.d.ts +26 -0
- package/dist/ui/sidebar.d.ts +92 -0
- package/dist/ui/sign-out-dialog.d.ts +17 -0
- package/dist/ui/skeleton.d.ts +10 -0
- package/dist/ui/slider.d.ts +23 -0
- package/dist/ui/sparkline.d.ts +26 -0
- package/dist/ui/spinner.d.ts +5 -0
- package/dist/ui/stat-group.d.ts +40 -0
- package/dist/ui/stat.d.ts +90 -0
- package/dist/ui/status-badge.d.ts +39 -0
- package/dist/ui/status-hero.d.ts +30 -0
- package/dist/ui/step-dots.d.ts +22 -0
- package/dist/ui/step-flow.d.ts +48 -0
- package/dist/ui/step-ring.d.ts +26 -0
- package/dist/ui/stepper.d.ts +20 -0
- package/dist/ui/suggestions.d.ts +17 -0
- package/dist/ui/switch.d.ts +8 -0
- package/dist/ui/table.d.ts +38 -0
- package/dist/ui/tabs.d.ts +14 -0
- package/dist/ui/tag-input.d.ts +21 -0
- package/dist/ui/task-loader.d.ts +29 -0
- package/dist/ui/task-progress.d.ts +32 -0
- package/dist/ui/testimonial.d.ts +37 -0
- package/dist/ui/textarea.d.ts +32 -0
- package/dist/ui/theme-toggle.d.ts +14 -0
- package/dist/ui/timeline.d.ts +55 -0
- package/dist/ui/toast.d.ts +19 -0
- package/dist/ui/toggle-group.d.ts +38 -0
- package/dist/ui/toggle.d.ts +12 -0
- package/dist/ui/tool-call.d.ts +27 -0
- package/dist/ui/tooltip.d.ts +9 -0
- package/dist/ui/upgrade-prompt.d.ts +24 -0
- package/dist/ui/upgrade-prompt.js +85 -0
- package/dist/ui/usage-meter.d.ts +42 -0
- package/dist/ui/week-strip.d.ts +23 -0
- package/dist/ui/workflow-run.d.ts +51 -0
- package/dist/ui/workspace-switcher.d.ts +28 -0
- package/dist/ui/workspace-switcher.js +92 -0
- package/docs/GRAFICOS.md +1 -1
- package/docs/designer/patrones.md +29 -1
- package/manifest/actions.json +1 -1
- package/manifest/agents.json +1 -1
- package/manifest/ai.json +1 -1
- package/manifest/auth.json +1 -1
- package/manifest/chat.json +1 -1
- package/manifest/content.json +1 -1
- package/manifest/data.json +498 -1
- package/manifest/feedback.json +230 -43
- package/manifest/forms.json +1 -1
- package/manifest/motion.json +1 -1
- package/manifest/navigation.json +102 -1
- package/manifest/overlays.json +2 -2
- package/package.json +1 -11
- package/scripts/cli.mjs +63 -5
- package/scripts/doctor.mjs +5 -3
- package/scripts/skill.mjs +85 -0
- package/skill/SKILL.md +5 -2
- package/dist/ui/sonner.js +0 -60
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { HeaderControlTone } from '../lib/header-control.js';
|
|
3
|
+
import { Tabs, TabsContent } from './tabs.js';
|
|
4
|
+
import 'class-variance-authority/types';
|
|
5
|
+
import '@base-ui/react/tabs';
|
|
6
|
+
import 'class-variance-authority';
|
|
7
|
+
|
|
8
|
+
type NotificationTone = "info" | "success" | "warning" | "danger" | "neutral";
|
|
9
|
+
type NotificationState = "new" | "acknowledged" | "resolved" | (string & {});
|
|
10
|
+
type NotificationTab = "for-you" | "general" | "history";
|
|
11
|
+
type NotificationCenterPreset = "count" | "dot" | "compact";
|
|
12
|
+
type NotificationIndicator = "count" | "dot" | "none";
|
|
13
|
+
declare function NotificationCenter({ preset, indicator, density, tone, unreadCount, onMarkAllRead, title, open, defaultOpen, onOpenChange, align, className, triggerClassName, children, }: {
|
|
14
|
+
preset?: NotificationCenterPreset;
|
|
15
|
+
/** Cómo se anuncian los avisos sin leer sobre la campana. */
|
|
16
|
+
indicator?: NotificationIndicator;
|
|
17
|
+
/** Ancho del panel: default (--ds-notifications-w) o compact. */
|
|
18
|
+
density?: "default" | "compact";
|
|
19
|
+
/** Color de la campana: neutral, con la marca o con fondo suave. */
|
|
20
|
+
tone?: HeaderControlTone;
|
|
21
|
+
/** Avisos sin leer: contador de la campana y nombre accesible. */
|
|
22
|
+
unreadCount?: number;
|
|
23
|
+
/** Si se pasa, la cabecera muestra «Marcar todo como leído». */
|
|
24
|
+
onMarkAllRead?: () => void;
|
|
25
|
+
/** Título del panel; por defecto, «Notificaciones». */
|
|
26
|
+
title?: React.ReactNode;
|
|
27
|
+
open?: boolean;
|
|
28
|
+
defaultOpen?: boolean;
|
|
29
|
+
onOpenChange?: (open: boolean) => void;
|
|
30
|
+
align?: "start" | "center" | "end";
|
|
31
|
+
/** Clases del panel. */
|
|
32
|
+
className?: string;
|
|
33
|
+
/** Clases del botón campana. */
|
|
34
|
+
triggerClassName?: string;
|
|
35
|
+
children?: React.ReactNode;
|
|
36
|
+
}): React.JSX.Element;
|
|
37
|
+
declare function NotificationTabs({ className, counts, defaultValue, children, ...props }: Omit<React.ComponentProps<typeof Tabs>, "defaultValue"> & {
|
|
38
|
+
/** Contadores de cada pestaña (se omiten los que no se pasan o valen 0). */
|
|
39
|
+
counts?: {
|
|
40
|
+
forYou?: number;
|
|
41
|
+
general?: number;
|
|
42
|
+
history?: number;
|
|
43
|
+
};
|
|
44
|
+
defaultValue?: NotificationTab;
|
|
45
|
+
}): React.JSX.Element;
|
|
46
|
+
declare function NotificationTabsContent({ value, ...props }: Omit<React.ComponentProps<typeof TabsContent>, "value"> & {
|
|
47
|
+
value: NotificationTab;
|
|
48
|
+
}): React.JSX.Element;
|
|
49
|
+
declare function NotificationList({ className, children, empty, ...props }: React.ComponentProps<"ul"> & {
|
|
50
|
+
/** Qué pintar sin avisos; por defecto, `<NotificationEmpty />`. */
|
|
51
|
+
empty?: React.ReactNode;
|
|
52
|
+
}): React.JSX.Element;
|
|
53
|
+
/** Tiempo relativo («hace 5 minutos», «ayer») en el idioma activo. */
|
|
54
|
+
declare function formatRelativeTime(date: Date, locale: string, now?: number): string;
|
|
55
|
+
declare function NotificationItem({ className, unread, tone, icon, title, description, time, now, state, meta, actions, onSelect, children, ...props }: Omit<React.ComponentProps<"li">, "title" | "onSelect"> & {
|
|
56
|
+
/** Si existe, el aviso se puede abrir (p. ej. en NoticeReview): el título pasa a ser un botón que cubre la fila. */
|
|
57
|
+
onSelect?: () => void;
|
|
58
|
+
/** Sin leer: punto de marca y fondo resaltado. */
|
|
59
|
+
unread?: boolean;
|
|
60
|
+
/** Tono de estado: colorea la baldosa del icono. */
|
|
61
|
+
tone?: NotificationTone;
|
|
62
|
+
/** Icono (Lucide) dentro de una baldosa del tono; o un nodo propio. */
|
|
63
|
+
icon?: React.ReactNode;
|
|
64
|
+
title: React.ReactNode;
|
|
65
|
+
description?: React.ReactNode;
|
|
66
|
+
/** Momento del aviso: se muestra en tiempo relativo. */
|
|
67
|
+
time?: Date | number | string;
|
|
68
|
+
/** «Ahora» para el tiempo relativo (pruebas, SSR). */
|
|
69
|
+
now?: number;
|
|
70
|
+
/** Estado del aviso (new | acknowledged | resolved…): va a `data-state`. */
|
|
71
|
+
state?: NotificationState;
|
|
72
|
+
/** Etiquetas junto a la hora (p. ej. un Badge con el estado). */
|
|
73
|
+
meta?: React.ReactNode;
|
|
74
|
+
/** Acciones del aviso (botones «Útil», «Ruido», «Investigar»…). */
|
|
75
|
+
actions?: React.ReactNode;
|
|
76
|
+
}): React.JSX.Element;
|
|
77
|
+
declare function NotificationEmpty({ className, children, icon, ...props }: React.ComponentProps<"div"> & {
|
|
78
|
+
icon?: React.ReactNode;
|
|
79
|
+
}): React.JSX.Element;
|
|
80
|
+
|
|
81
|
+
export { NotificationCenter, type NotificationCenterPreset, NotificationEmpty, type NotificationIndicator, NotificationItem, NotificationList, type NotificationState, type NotificationTab, NotificationTabs, NotificationTabsContent, type NotificationTone, formatRelativeTime };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { A as AuthResult } from '../auth-form-B1hgbXkI.js';
|
|
3
|
+
import '../lib/auth.js';
|
|
4
|
+
import '../lib/i18n.js';
|
|
5
|
+
|
|
6
|
+
type OAuthConsentPreset = "authorize" | "mcp" | "device";
|
|
7
|
+
type OAuthScope = {
|
|
8
|
+
id: string;
|
|
9
|
+
label: React.ReactNode;
|
|
10
|
+
description?: React.ReactNode;
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
|
+
/** No se puede desmarcar (con `selectable`). */
|
|
13
|
+
required?: boolean;
|
|
14
|
+
/** Permiso delicado (escritura, borrar, datos personales): se señala. */
|
|
15
|
+
sensitive?: boolean;
|
|
16
|
+
};
|
|
17
|
+
type OAuthParty = {
|
|
18
|
+
name: string;
|
|
19
|
+
logo?: React.ReactNode;
|
|
20
|
+
url?: string;
|
|
21
|
+
verified?: boolean;
|
|
22
|
+
};
|
|
23
|
+
declare function OAuthConsent({ preset, client, app, account, onSwitchAccount, scopes, selectable, redirectUri, userCode, codeLength, onSubmitCode, onAllow, onDeny, error: errorProp, title, description, className, ...props }: Omit<React.ComponentProps<"div">, "title"> & {
|
|
24
|
+
preset?: OAuthConsentPreset;
|
|
25
|
+
/** Quien pide acceso (app, cliente MCP, dispositivo). */
|
|
26
|
+
client: OAuthParty;
|
|
27
|
+
/** Tu app (a la que se da acceso). */
|
|
28
|
+
app?: OAuthParty;
|
|
29
|
+
/** Cuenta con la que se autoriza. */
|
|
30
|
+
account?: {
|
|
31
|
+
name?: string;
|
|
32
|
+
email: string;
|
|
33
|
+
avatar?: string;
|
|
34
|
+
};
|
|
35
|
+
/** «¿No eres tú?»: cambiar de cuenta. */
|
|
36
|
+
onSwitchAccount?: () => void;
|
|
37
|
+
scopes?: OAuthScope[];
|
|
38
|
+
/** Consentimiento granular: los permisos no obligatorios se pueden desmarcar. */
|
|
39
|
+
selectable?: boolean;
|
|
40
|
+
/** URI de vuelta: se muestra su dominio (la persona sabe adónde vuelve). */
|
|
41
|
+
redirectUri?: string;
|
|
42
|
+
/** device: código ya conocido (enlace con ?user_code=…): llega escrito y la persona lo confirma (se valida con `onSubmitCode`). */
|
|
43
|
+
userCode?: string;
|
|
44
|
+
codeLength?: number;
|
|
45
|
+
/** device: comprueba el código; devuelve { error } si no vale. */
|
|
46
|
+
onSubmitCode?: (code: string) => AuthResult | Promise<AuthResult>;
|
|
47
|
+
onAllow: (scopes: string[]) => AuthResult | void | Promise<AuthResult | void>;
|
|
48
|
+
onDeny: () => void | Promise<void>;
|
|
49
|
+
error?: React.ReactNode;
|
|
50
|
+
title?: React.ReactNode;
|
|
51
|
+
description?: React.ReactNode;
|
|
52
|
+
}): React.JSX.Element;
|
|
53
|
+
|
|
54
|
+
export { OAuthConsent, type OAuthConsentPreset, type OAuthParty, type OAuthScope };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DsDensity } from '../lib/presets.js';
|
|
3
|
+
|
|
4
|
+
type OnboardingPreset = "card" | "sidebar" | "page";
|
|
5
|
+
type OnboardingStep = {
|
|
6
|
+
id: string;
|
|
7
|
+
title: React.ReactNode;
|
|
8
|
+
description?: React.ReactNode;
|
|
9
|
+
done?: boolean;
|
|
10
|
+
/** No cuenta para el progreso ni bloquea el «Todo listo». */
|
|
11
|
+
optional?: boolean;
|
|
12
|
+
/** Acción del paso (un botón): solo se enseña en el paso que toca, o en todos con `showAllActions`. */
|
|
13
|
+
action?: React.ReactNode;
|
|
14
|
+
};
|
|
15
|
+
type OnboardingChecklistProps = Omit<React.ComponentProps<"section">, "title"> & {
|
|
16
|
+
preset?: OnboardingPreset;
|
|
17
|
+
title: React.ReactNode;
|
|
18
|
+
description?: React.ReactNode;
|
|
19
|
+
steps: OnboardingStep[];
|
|
20
|
+
density?: DsDensity;
|
|
21
|
+
/** Solo el paso que toca a la vista; el resto se despliega. */
|
|
22
|
+
collapsed?: boolean;
|
|
23
|
+
/** Pliega los pasos hechos detrás de «Ver los hechos». */
|
|
24
|
+
hideCompleted?: boolean;
|
|
25
|
+
/** Enseña la descripción de cada paso (si no, solo la del que toca). */
|
|
26
|
+
showDescriptions?: boolean;
|
|
27
|
+
/** Acciones en todos los pasos sin hacer, no solo en el que toca. */
|
|
28
|
+
showAllActions?: boolean;
|
|
29
|
+
/** Muestra el botón de ocultar la lista. */
|
|
30
|
+
onDismiss?: () => void;
|
|
31
|
+
/** Contenido al completarlo todo (por defecto, «Todo listo»). */
|
|
32
|
+
completeContent?: React.ReactNode;
|
|
33
|
+
/** Nivel del título (h2 por defecto). */
|
|
34
|
+
headingLevel?: 2 | 3 | 4;
|
|
35
|
+
};
|
|
36
|
+
declare function OnboardingChecklist({ preset, title, description, steps, density, collapsed, hideCompleted, showDescriptions, showAllActions, onDismiss, completeContent, headingLevel, className, ...props }: OnboardingChecklistProps): React.JSX.Element;
|
|
37
|
+
|
|
38
|
+
export { OnboardingChecklist, type OnboardingChecklistProps, type OnboardingPreset, type OnboardingStep };
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { CheckIcon, ChevronDownIcon, XIcon } from "lucide-react";
|
|
4
|
+
import * as React from "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
|
+
import { Card } from "./card.js";
|
|
10
|
+
import { Progress } from "./progress.js";
|
|
11
|
+
const PRESETS = {
|
|
12
|
+
card: { density: "default", collapsed: false, hideCompleted: true, showDescriptions: true, surface: true },
|
|
13
|
+
sidebar: { density: "compact", collapsed: true, hideCompleted: true, showDescriptions: false, surface: false },
|
|
14
|
+
page: { density: "comfortable", collapsed: false, hideCompleted: false, showDescriptions: true, surface: true }
|
|
15
|
+
};
|
|
16
|
+
const GAP = { compact: "gap-1", default: "gap-1.5", comfortable: "gap-2" };
|
|
17
|
+
const STEP_PAD = { compact: "px-2 py-1.5", default: "px-3 py-2.5", comfortable: "px-4 py-3.5" };
|
|
18
|
+
function OnboardingChecklist({
|
|
19
|
+
preset = "card",
|
|
20
|
+
title,
|
|
21
|
+
description,
|
|
22
|
+
steps,
|
|
23
|
+
density,
|
|
24
|
+
collapsed,
|
|
25
|
+
hideCompleted,
|
|
26
|
+
showDescriptions,
|
|
27
|
+
showAllActions = false,
|
|
28
|
+
onDismiss,
|
|
29
|
+
completeContent,
|
|
30
|
+
headingLevel = 2,
|
|
31
|
+
className,
|
|
32
|
+
...props
|
|
33
|
+
}) {
|
|
34
|
+
const t = useDsMessages();
|
|
35
|
+
const p = PRESETS[preset];
|
|
36
|
+
const d = density ?? p.density;
|
|
37
|
+
const isCollapsed = collapsed ?? p.collapsed;
|
|
38
|
+
const hide = hideCompleted ?? p.hideCompleted;
|
|
39
|
+
const descriptions = showDescriptions ?? p.showDescriptions;
|
|
40
|
+
const [expanded, setExpanded] = React.useState(!isCollapsed);
|
|
41
|
+
const [showDone, setShowDone] = React.useState(!hide);
|
|
42
|
+
const listId = React.useId();
|
|
43
|
+
const required = steps.filter((s) => !s.optional);
|
|
44
|
+
const doneCount = required.filter((s) => s.done).length;
|
|
45
|
+
const total = required.length;
|
|
46
|
+
const current = steps.find((s) => !s.done && !s.optional) ?? steps.find((s) => !s.done);
|
|
47
|
+
const complete = total > 0 && doneCount === total;
|
|
48
|
+
const completedSteps = steps.filter((s) => s.done);
|
|
49
|
+
const visible = steps.filter((s) => {
|
|
50
|
+
if (!expanded) return s === current;
|
|
51
|
+
if (s.done && !showDone) return false;
|
|
52
|
+
return true;
|
|
53
|
+
});
|
|
54
|
+
const Heading = `h${headingLevel}`;
|
|
55
|
+
const header = /* @__PURE__ */ jsxs("div", { "data-slot": "onboarding-checklist-header", className: "flex min-w-0 flex-col gap-2", children: [
|
|
56
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-start gap-2", children: [
|
|
57
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
58
|
+
/* @__PURE__ */ jsx(Heading, { "data-slot": "onboarding-checklist-title", className: cn("leading-tight font-(--ds-heading-weight) text-foreground", d === "compact" ? "text-sm" : "text-base"), children: title }),
|
|
59
|
+
description != null && d !== "compact" && /* @__PURE__ */ jsx("p", { className: "text-sm text-pretty text-muted-foreground", children: description })
|
|
60
|
+
] }),
|
|
61
|
+
isCollapsed && steps.length > 1 && /* @__PURE__ */ jsx(Button, { type: "button", size: "icon-xs", variant: "ghost", "aria-expanded": expanded, "aria-controls": listId, "aria-label": expanded ? t.showLess : t.showMore, onClick: () => setExpanded((v) => !v), children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: cn("transition-transform duration-(--ds-motion-snap)", expanded && "rotate-180") }) }),
|
|
62
|
+
onDismiss && /* @__PURE__ */ jsx(Button, { type: "button", size: "icon-xs", variant: "ghost", "aria-label": t.onboardingDismiss, title: t.onboardingDismiss, onClick: onDismiss, children: /* @__PURE__ */ jsx(XIcon, {}) })
|
|
63
|
+
] }),
|
|
64
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
65
|
+
/* @__PURE__ */ jsx(Progress, { value: total ? doneCount / total * 100 : 0, "aria-label": dsFormat(t.onboardingProgress, { done: doneCount, total }), className: "flex-1" }),
|
|
66
|
+
/* @__PURE__ */ jsx("span", { "data-slot": "onboarding-checklist-count", className: "shrink-0 text-xs text-muted-foreground tabular-nums", children: dsFormat(t.onboardingProgress, { done: doneCount, total }) })
|
|
67
|
+
] })
|
|
68
|
+
] });
|
|
69
|
+
const body = complete ? /* @__PURE__ */ jsxs("div", { "data-slot": "onboarding-checklist-complete", role: "status", className: "flex items-center gap-2 text-sm text-foreground", children: [
|
|
70
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "flex size-(--ds-onboarding-check) items-center justify-center rounded-full bg-(--ds-onboarding-check-done) text-background [&_svg]:size-3", children: /* @__PURE__ */ jsx(CheckIcon, {}) }),
|
|
71
|
+
completeContent ?? t.onboardingComplete
|
|
72
|
+
] }) : /* @__PURE__ */ jsx("ol", { id: listId, "data-slot": "onboarding-checklist-steps", className: cn("flex flex-col", GAP[d]), children: visible.map((s) => {
|
|
73
|
+
const state = s.done ? "done" : s === current ? "current" : "todo";
|
|
74
|
+
const showAction = !s.done && s.action != null && (state === "current" || showAllActions);
|
|
75
|
+
const showDesc = s.description != null && !s.done && (descriptions || state === "current");
|
|
76
|
+
return /* @__PURE__ */ jsxs(
|
|
77
|
+
"li",
|
|
78
|
+
{
|
|
79
|
+
"data-slot": "onboarding-checklist-step",
|
|
80
|
+
"data-state": state,
|
|
81
|
+
"aria-current": state === "current" ? "step" : void 0,
|
|
82
|
+
className: cn("flex min-w-0 items-start gap-3 rounded-item", STEP_PAD[d], state === "current" && "bg-(--ds-onboarding-current-bg)"),
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ jsxs(
|
|
85
|
+
"span",
|
|
86
|
+
{
|
|
87
|
+
"data-slot": "onboarding-checklist-check",
|
|
88
|
+
className: cn(
|
|
89
|
+
"mt-0.5 flex size-(--ds-onboarding-check) shrink-0 items-center justify-center rounded-full border [&_svg]:size-3",
|
|
90
|
+
s.done ? "border-(--ds-onboarding-check-done) bg-(--ds-onboarding-check-done) text-background" : state === "current" ? "border-primary" : "border-(--ds-field-border)"
|
|
91
|
+
),
|
|
92
|
+
children: [
|
|
93
|
+
s.done ? /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": "true" }) : null,
|
|
94
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: s.done ? t.onboardingStepDone : t.onboardingStepTodo })
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
99
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-wrap items-center gap-x-2", children: [
|
|
100
|
+
/* @__PURE__ */ jsx("span", { className: cn("text-sm", s.done ? "text-muted-foreground line-through" : "font-(--ds-medium-weight) text-foreground"), children: s.title }),
|
|
101
|
+
s.optional && /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: t.onboardingOptional })
|
|
102
|
+
] }),
|
|
103
|
+
showDesc && /* @__PURE__ */ jsx("p", { className: "text-sm text-pretty text-muted-foreground", children: s.description }),
|
|
104
|
+
showAction && /* @__PURE__ */ jsx("div", { "data-slot": "onboarding-checklist-action", className: "flex flex-wrap gap-2 pt-1", children: s.action })
|
|
105
|
+
] })
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
s.id
|
|
109
|
+
);
|
|
110
|
+
}) });
|
|
111
|
+
const toggleDone = expanded && hide && completedSteps.length > 0 && !complete && /* @__PURE__ */ jsx(Button, { type: "button", size: "xs", variant: "ghost", className: "self-start", "aria-expanded": showDone, "aria-controls": listId, onClick: () => setShowDone((v) => !v), children: showDone ? t.onboardingHideCompleted : t.onboardingShowCompleted });
|
|
112
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
113
|
+
header,
|
|
114
|
+
body,
|
|
115
|
+
toggleDone
|
|
116
|
+
] });
|
|
117
|
+
return /* @__PURE__ */ jsx(
|
|
118
|
+
"section",
|
|
119
|
+
{
|
|
120
|
+
"data-slot": "onboarding-checklist",
|
|
121
|
+
"data-preset": preset,
|
|
122
|
+
"data-density": d,
|
|
123
|
+
"data-complete": complete || void 0,
|
|
124
|
+
className: cn("min-w-0", className),
|
|
125
|
+
...props,
|
|
126
|
+
children: p.surface ? /* @__PURE__ */ jsx(Card, { className: cn("flex flex-col px-(--ds-card-spacing)", d === "comfortable" ? "gap-4" : "gap-3"), children: content }) : /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", children: content })
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
export {
|
|
131
|
+
OnboardingChecklist
|
|
132
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IconTile } from './icon-tile.js';
|
|
3
|
+
import 'class-variance-authority/types';
|
|
4
|
+
import 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @group navigation
|
|
8
|
+
* @summary Cabecera del contenido de una vista: migas, título (h1), subtítulo, acciones y avisos. SectionHeader, en el mismo fichero, titula un bloque (h2) dentro de la vista.
|
|
9
|
+
* @see app-bar — barra superior de la app (menú, título corto, idioma y tema), fuera del contenido
|
|
10
|
+
* @see page-shell — contenedor de la vista que envuelve la cabecera y las secciones
|
|
11
|
+
* @example Atajo con props
|
|
12
|
+
* <PageHeader
|
|
13
|
+
* title={t("clients.title")}
|
|
14
|
+
* description={t("clients.description")}
|
|
15
|
+
* actions={<Button>Nuevo cliente</Button>}
|
|
16
|
+
* />
|
|
17
|
+
* @example Con piezas y aviso de página
|
|
18
|
+
* <PageHeader preset="compact">
|
|
19
|
+
* <PageHeaderTitle>Operaciones</PageHeaderTitle>
|
|
20
|
+
* <PageHeaderDescription>Estado del servicio en tiempo real.</PageHeaderDescription>
|
|
21
|
+
* <PageHeaderNotice>
|
|
22
|
+
* <Banner variant="warning">Mantenimiento esta noche.</Banner>
|
|
23
|
+
* </PageHeaderNotice>
|
|
24
|
+
* </PageHeader>
|
|
25
|
+
* @example Cabecera de un bloque (SectionHeader)
|
|
26
|
+
* <SectionHeader title={t("queues")} description={t("last15")} icon={<PhoneIcon />} iconTone="info" actions={<Button size="sm">Ver todas</Button>} />
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
type PageHeaderPreset = "page" | "compact" | "canvas";
|
|
30
|
+
type PageHeaderProps = Omit<React.ComponentProps<"header">, "title"> & {
|
|
31
|
+
preset?: PageHeaderPreset;
|
|
32
|
+
/** Atajo: título de la vista (h1). Equivale a <PageHeaderTitle>. No es el atributo HTML `title`. */
|
|
33
|
+
title?: React.ReactNode;
|
|
34
|
+
/** Atajo: subtítulo. Equivale a <PageHeaderDescription>. */
|
|
35
|
+
description?: React.ReactNode;
|
|
36
|
+
/** Atajo: acciones de la vista. Equivale a <PageHeaderActions>. */
|
|
37
|
+
actions?: React.ReactNode;
|
|
38
|
+
};
|
|
39
|
+
declare function PageHeader({ preset, title, description, actions, className, children, ...props }: PageHeaderProps): React.JSX.Element;
|
|
40
|
+
declare function PageHeaderBreadcrumb({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
41
|
+
declare function PageHeaderTitle({ className, ...props }: React.ComponentProps<"h1">): React.JSX.Element;
|
|
42
|
+
declare function PageHeaderDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
43
|
+
declare function PageHeaderActions({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
44
|
+
/** Hueco para avisos de la página (Banner, Alert) bajo la cabecera. */
|
|
45
|
+
declare function PageHeaderNotice({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
46
|
+
type SectionHeaderProps = Omit<React.ComponentProps<"div">, "title"> & {
|
|
47
|
+
/** Atajo: título del bloque (h2). Equivale a <SectionHeaderTitle>. No es el atributo HTML `title`. */
|
|
48
|
+
title?: React.ReactNode;
|
|
49
|
+
/** Atajo: descripción. Equivale a <SectionHeaderDescription>. */
|
|
50
|
+
description?: React.ReactNode;
|
|
51
|
+
/** Atajo: acciones del bloque. Equivale a <SectionHeaderActions>. */
|
|
52
|
+
actions?: React.ReactNode;
|
|
53
|
+
/** Atajo: icono (svg) en una baldosa. Equivale a <SectionHeaderIcon>. */
|
|
54
|
+
icon?: React.ReactNode;
|
|
55
|
+
/** Tono de la baldosa del icono. */
|
|
56
|
+
iconTone?: React.ComponentProps<typeof IconTile>["tone"];
|
|
57
|
+
};
|
|
58
|
+
declare function SectionHeader({ title, description, actions, icon, iconTone, className, children, ...props }: SectionHeaderProps): React.JSX.Element;
|
|
59
|
+
declare function SectionHeaderIcon({ className, size, ...props }: React.ComponentProps<typeof IconTile>): React.JSX.Element;
|
|
60
|
+
declare function SectionHeaderTitle({ className, ...props }: React.ComponentProps<"h2">): React.JSX.Element;
|
|
61
|
+
declare function SectionHeaderDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
62
|
+
declare function SectionHeaderActions({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
63
|
+
|
|
64
|
+
export { PageHeader, PageHeaderActions, PageHeaderBreadcrumb, PageHeaderDescription, PageHeaderNotice, type PageHeaderPreset, type PageHeaderProps, PageHeaderTitle, SectionHeader, SectionHeaderActions, SectionHeaderDescription, SectionHeaderIcon, type SectionHeaderProps, SectionHeaderTitle };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @group motion
|
|
5
|
+
* @summary Indicador de carga con intención: arranque de la app (`splash`), cambio de ruta (`route`), una región (`section`) o proceso sobre contenido (`overlay`); no imita el contenido.
|
|
6
|
+
* @see loading-state — esqueleto con la forma del contenido que carga
|
|
7
|
+
* @see spinner — carga pequeña dentro de un botón o una línea
|
|
8
|
+
* @see task-loader — tarea larga con ilustración
|
|
9
|
+
* @example Una región que carga
|
|
10
|
+
* <PageLoader preset="section" message={t("loadingData")} />
|
|
11
|
+
* @example Arranque de la app con marca y mensajes
|
|
12
|
+
* <PageLoader preset="splash" mark={<Logo />} messages={[t("connecting"), t("preparing")]} />
|
|
13
|
+
* @example Procesando sobre contenido
|
|
14
|
+
* <div className="relative">
|
|
15
|
+
* <InvoiceList />
|
|
16
|
+
* <PageLoader preset="overlay" />
|
|
17
|
+
* </div>
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
type PageLoaderPreset = "splash" | "route" | "section" | "overlay";
|
|
21
|
+
type PageLoaderIndicator = "orbit" | "pulse" | "bars";
|
|
22
|
+
declare function PageLoader({ preset, indicator, message, messages, interval, value, mark, delay, className, }: {
|
|
23
|
+
preset?: PageLoaderPreset;
|
|
24
|
+
indicator?: PageLoaderIndicator;
|
|
25
|
+
/** Texto fijo bajo el indicador. */
|
|
26
|
+
message?: string;
|
|
27
|
+
/** Varios textos que rotan (cargas largas: «Conectando…», «Preparando tu espacio…»). */
|
|
28
|
+
messages?: string[];
|
|
29
|
+
/** Milisegundos entre mensajes. */
|
|
30
|
+
interval?: number;
|
|
31
|
+
/** Avance 0–100. Sin valor, indeterminado. */
|
|
32
|
+
value?: number;
|
|
33
|
+
/** Marca o logo (preset splash). */
|
|
34
|
+
mark?: React.ReactNode;
|
|
35
|
+
/** Milisegundos antes de mostrarse; evita el parpadeo en cargas cortas. */
|
|
36
|
+
delay?: number;
|
|
37
|
+
className?: string;
|
|
38
|
+
}): React.JSX.Element;
|
|
39
|
+
|
|
40
|
+
export { PageLoader, type PageLoaderIndicator, type PageLoaderPreset };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @group navigation
|
|
5
|
+
* @summary Contenedor del contenido de cada vista que fija ancho y separación: `content` para listas y paneles, `detail` para una entidad, `canvas` para lienzos a todo el ancho.
|
|
6
|
+
* @see page-header — cabecera de la vista, primer hijo del PageShell
|
|
7
|
+
* @see app-bar — barra superior de la app, fuera del PageShell
|
|
8
|
+
* @example Vista de lista (preset content)
|
|
9
|
+
* <PageShell preset="content">
|
|
10
|
+
* <PageHeader title={t("invoices.title")} actions={<Button>Nueva factura</Button>} />
|
|
11
|
+
* <InvoiceTable />
|
|
12
|
+
* </PageShell>
|
|
13
|
+
* @example Detalle de una entidad
|
|
14
|
+
* <PageShell preset="detail">
|
|
15
|
+
* <PageHeader title={client.name} />
|
|
16
|
+
* <ClientForm />
|
|
17
|
+
* </PageShell>
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
type PageShellPreset = "content" | "detail" | "canvas";
|
|
21
|
+
declare function PageShell({ preset, className, ...props }: React.ComponentProps<"main"> & {
|
|
22
|
+
preset?: PageShellPreset;
|
|
23
|
+
}): React.JSX.Element;
|
|
24
|
+
|
|
25
|
+
export { PageShell, type PageShellPreset };
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
/**
|
|
8
|
+
* @group navigation
|
|
9
|
+
* @summary Paginación por números para recorrer una lista o tabla larga página a página, con enlaces reales (href) para que cada página tenga su URL.
|
|
10
|
+
* @see load-more — cargar más resultados al final de la lista, sin páginas numeradas
|
|
11
|
+
* @see data-table — tabla con su propia paginación, orden y filtros
|
|
12
|
+
* @see step-dots — indicador de paso, no navegación entre páginas
|
|
13
|
+
* @example Páginas con anterior y siguiente
|
|
14
|
+
* <Pagination>
|
|
15
|
+
* <PaginationContent>
|
|
16
|
+
* <PaginationItem><PaginationPrevious href="?page=1" /></PaginationItem>
|
|
17
|
+
* <PaginationItem><PaginationLink href="?page=1">1</PaginationLink></PaginationItem>
|
|
18
|
+
* <PaginationItem><PaginationLink href="?page=2" isActive>2</PaginationLink></PaginationItem>
|
|
19
|
+
* <PaginationItem><PaginationEllipsis /></PaginationItem>
|
|
20
|
+
* <PaginationItem><PaginationNext href="?page=3" /></PaginationItem>
|
|
21
|
+
* </PaginationContent>
|
|
22
|
+
* </Pagination>
|
|
23
|
+
* @note Marca la página actual con `isActive` (pone aria-current); «Anterior» y «Siguiente» salen del idioma activo y `text` los sobrescribe.
|
|
24
|
+
* @note Para un listado que crece al final (feed), usa LoadMore en vez de páginas.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
declare function Pagination({ className, ...props }: React.ComponentProps<"nav">): React.JSX.Element;
|
|
28
|
+
declare function PaginationContent({ className, ...props }: React.ComponentProps<"ul">): React.JSX.Element;
|
|
29
|
+
declare function PaginationItem({ ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
30
|
+
type PaginationLinkProps = {
|
|
31
|
+
isActive?: boolean;
|
|
32
|
+
} & Pick<React.ComponentProps<typeof Button>, "size"> & React.ComponentProps<"a">;
|
|
33
|
+
declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): React.JSX.Element;
|
|
34
|
+
declare function PaginationPrevious({ className, text, ...props }: React.ComponentProps<typeof PaginationLink> & {
|
|
35
|
+
text?: string;
|
|
36
|
+
}): React.JSX.Element;
|
|
37
|
+
declare function PaginationNext({ className, text, ...props }: React.ComponentProps<typeof PaginationLink> & {
|
|
38
|
+
text?: string;
|
|
39
|
+
}): React.JSX.Element;
|
|
40
|
+
declare function PaginationEllipsis({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
41
|
+
|
|
42
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
declare const panelVariants: (props?: ({
|
|
7
|
+
variant?: "outline" | "default" | "ghost" | "muted" | "glass" | null | undefined;
|
|
8
|
+
size?: "sm" | "lg" | "md" | null | undefined;
|
|
9
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
|
+
declare function Panel({ className, variant, size, render, ...props }: useRender.ComponentProps<"div"> & VariantProps<typeof panelVariants>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
11
|
+
|
|
12
|
+
export { Panel, panelVariants };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type PasskeyInfo = {
|
|
4
|
+
id: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
createdAt?: string | number | Date;
|
|
7
|
+
lastUsed?: string | number | Date;
|
|
8
|
+
synced?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare function PasskeyList({ passkeys, onAdd, onRename, onDelete, className, ...props }: React.ComponentProps<"div"> & {
|
|
11
|
+
passkeys: PasskeyInfo[];
|
|
12
|
+
onAdd?: () => void | Promise<void>;
|
|
13
|
+
onRename?: (id: string, name: string) => void | Promise<void>;
|
|
14
|
+
onDelete?: (id: string) => void | Promise<void>;
|
|
15
|
+
}): React.JSX.Element;
|
|
16
|
+
|
|
17
|
+
export { type PasskeyInfo, PasskeyList };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @group forms
|
|
5
|
+
* @summary Medidor de fuerza de una contraseña en segmentos (débil, media, fuerte) bajo el campo al crearla o cambiarla.
|
|
6
|
+
* @see password-input — el campo de contraseña
|
|
7
|
+
* @see level-meter — un nivel genérico que no es de contraseña
|
|
8
|
+
* @see progress — avance de una tarea
|
|
9
|
+
* @example Por puntuación
|
|
10
|
+
* <PasswordStrength value={puntuacion} />
|
|
11
|
+
* @example Nivel directo, sin texto
|
|
12
|
+
* <PasswordStrength level="strong" showLabel={false} />
|
|
13
|
+
* @note No calcula la fuerza: la app la mide (longitud, listas de contraseñas filtradas…) y pasa `value` o `level`.
|
|
14
|
+
* @note Solo al crear o cambiar la contraseña, nunca al iniciar sesión.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
type StrengthLevel = "weak" | "medium" | "strong";
|
|
18
|
+
declare function PasswordStrength({ value, level, segments, showLabel, className, ...props }: Omit<React.ComponentProps<"div">, "children"> & {
|
|
19
|
+
/** Segmentos llenos (0–segments). */
|
|
20
|
+
value?: number;
|
|
21
|
+
/** Nivel directo (si no hay `value`). */
|
|
22
|
+
level?: StrengthLevel;
|
|
23
|
+
segments?: number;
|
|
24
|
+
/** Muestra «Nivel de fuerza:» delante. */
|
|
25
|
+
showLabel?: boolean;
|
|
26
|
+
}): React.JSX.Element;
|
|
27
|
+
|
|
28
|
+
export { PasswordStrength, type StrengthLevel };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type PermissionMatrixPreset = "roles" | "review" | "scopes";
|
|
4
|
+
type Permission = {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
description?: React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
type PermissionGroup = {
|
|
10
|
+
id: string;
|
|
11
|
+
label: React.ReactNode;
|
|
12
|
+
permissions: Permission[];
|
|
13
|
+
};
|
|
14
|
+
type PermissionRole = {
|
|
15
|
+
value: string;
|
|
16
|
+
label: string;
|
|
17
|
+
};
|
|
18
|
+
type PermissionValue = Record<string, string[]>;
|
|
19
|
+
type PermissionMatrixProps = Omit<React.ComponentProps<"div">, "onChange" | "children"> & {
|
|
20
|
+
preset?: PermissionMatrixPreset;
|
|
21
|
+
roles: PermissionRole[];
|
|
22
|
+
groups: PermissionGroup[];
|
|
23
|
+
value: PermissionValue;
|
|
24
|
+
/** Recibe el valor nuevo completo. Sin él, solo lectura. */
|
|
25
|
+
onChange?: (value: PermissionValue) => void;
|
|
26
|
+
/** Roles que se muestran pero no se pueden cambiar. */
|
|
27
|
+
lockedRoles?: string[];
|
|
28
|
+
/** scopes: el rol o token que se edita (por defecto, el primero de `roles`). */
|
|
29
|
+
role?: string;
|
|
30
|
+
/** Solo lectura aunque haya `onChange`. */
|
|
31
|
+
readOnly?: boolean;
|
|
32
|
+
};
|
|
33
|
+
declare function PermissionMatrix({ preset, roles, groups, value, onChange, lockedRoles, role, readOnly, className, ...props }: PermissionMatrixProps): React.JSX.Element | null;
|
|
34
|
+
|
|
35
|
+
export { type Permission, type PermissionGroup, PermissionMatrix, type PermissionMatrixPreset, type PermissionMatrixProps, type PermissionRole, type PermissionValue };
|