orbital-ds 0.44.1 → 0.48.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 +29 -6
- package/CHANGELOG.md +458 -0
- package/README.md +2 -2
- package/components.manifest.json +209 -48
- package/dist/hooks/use-esc-close-stack.js +38 -0
- package/dist/hooks/use-simulated-progress.js +30 -0
- package/dist/lib/brand-allowlist.js +703 -0
- package/dist/lib/brand-runtime.js +85 -0
- package/dist/lib/echarts-presets.js +152 -1
- package/dist/lib/echarts-setup.js +2 -0
- package/dist/lib/i18n.js +3 -0
- package/dist/lib/locales/de.js +1 -0
- package/dist/lib/locales/fr.js +1 -0
- package/dist/lib/locales/he.js +1 -0
- package/dist/lib/locales/it.js +1 -0
- package/dist/ui/context-menu.js +2 -2
- package/dist/ui/cta-banner.js +63 -0
- package/dist/ui/detail-panel.js +2 -2
- package/dist/ui/faq.js +25 -0
- package/dist/ui/feature-grid.js +40 -0
- package/dist/ui/landing-section.js +59 -0
- package/dist/ui/pricing-table.js +86 -0
- package/dist/ui/sheet.js +1 -1
- package/dist/ui/testimonial.js +61 -0
- package/docs/designer/patrones.md +7 -2
- 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 +496 -1
- package/manifest/data.json +1 -103
- package/manifest/feedback.json +6 -6
- package/manifest/forms.json +1 -1
- package/manifest/motion.json +3 -3
- package/manifest/navigation.json +3 -3
- package/manifest/overlays.json +14 -11
- package/package.json +6 -8
- package/scripts/cli.mjs +19 -0
- package/scripts/doctor.mjs +28 -2
- package/scripts/eslint-plugin.mjs +32 -0
- package/scripts/manifest.mjs +20 -0
- package/scripts/upgrade.mjs +126 -0
- package/dist/auth-form-B1hgbXkI.d.ts +0 -144
- package/dist/hooks/use-ds-messages.d.ts +0 -544
- package/dist/hooks/use-ds-motion.d.ts +0 -17
- package/dist/hooks/use-in-view.d.ts +0 -9
- package/dist/hooks/use-mobile.d.ts +0 -3
- package/dist/lib/a2ui-catalog.d.ts +0 -42
- package/dist/lib/a2ui.d.ts +0 -289
- package/dist/lib/ai-events.d.ts +0 -15
- package/dist/lib/auth-better-auth.d.ts +0 -29
- package/dist/lib/auth-flow.d.ts +0 -85
- package/dist/lib/auth-providers.d.ts +0 -194
- package/dist/lib/auth.d.ts +0 -68
- package/dist/lib/echarts-presets.d.ts +0 -227
- package/dist/lib/echarts-server.d.ts +0 -15
- package/dist/lib/echarts-setup.d.ts +0 -8
- package/dist/lib/echarts-theme.d.ts +0 -36
- package/dist/lib/format.d.ts +0 -57
- package/dist/lib/header-control.d.ts +0 -4
- package/dist/lib/i18n.d.ts +0 -557
- package/dist/lib/image-upload.d.ts +0 -41
- package/dist/lib/locales/de.d.ts +0 -7
- package/dist/lib/locales/fr.d.ts +0 -7
- package/dist/lib/locales/he.d.ts +0 -7
- package/dist/lib/locales/it.d.ts +0 -7
- package/dist/lib/motion.d.ts +0 -74
- package/dist/lib/presets.d.ts +0 -8
- package/dist/lib/template-syntax.d.ts +0 -22
- package/dist/lib/utils.d.ts +0 -5
- package/dist/motion.css +0 -146
- package/dist/styles.css +0 -1775
- package/dist/themes/chocolate.css +0 -259
- package/dist/themes/chocolate.fonts.css +0 -2
- package/dist/themes/chocolate.guide.md +0 -30
- package/dist/themes/chocolate.meta.json +0 -61
- package/dist/themes/chocolate.scoped.css +0 -259
- package/dist/themes/chocolate.tokens.json +0 -49
- package/dist/themes/fractalia.css +0 -556
- package/dist/themes/fractalia.fonts.css +0 -3
- package/dist/themes/fractalia.guide.md +0 -86
- package/dist/themes/fractalia.meta.json +0 -112
- package/dist/themes/fractalia.scoped.css +0 -556
- package/dist/themes/fractalia.tokens.json +0 -39
- package/dist/themes/friendly.css +0 -375
- package/dist/themes/friendly.fonts.css +0 -2
- package/dist/themes/friendly.guide.md +0 -38
- package/dist/themes/friendly.meta.json +0 -82
- package/dist/themes/friendly.scoped.css +0 -375
- package/dist/themes/friendly.tokens.json +0 -45
- package/dist/themes/lagoon.css +0 -362
- package/dist/themes/lagoon.fonts.css +0 -2
- package/dist/themes/lagoon.guide.md +0 -47
- package/dist/themes/lagoon.meta.json +0 -85
- package/dist/themes/lagoon.scoped.css +0 -362
- package/dist/themes/lagoon.tokens.json +0 -49
- package/dist/themes/liquid.css +0 -510
- package/dist/themes/liquid.fonts.css +0 -7
- package/dist/themes/liquid.guide.md +0 -82
- package/dist/themes/liquid.meta.json +0 -134
- package/dist/themes/liquid.scoped.css +0 -510
- package/dist/themes/liquid.tokens.json +0 -47
- package/dist/themes/matcha.css +0 -259
- package/dist/themes/matcha.fonts.css +0 -2
- package/dist/themes/matcha.guide.md +0 -30
- package/dist/themes/matcha.meta.json +0 -61
- package/dist/themes/matcha.scoped.css +0 -259
- package/dist/themes/matcha.tokens.json +0 -49
- package/dist/themes/qratia.css +0 -264
- package/dist/themes/qratia.fonts.css +0 -2
- package/dist/themes/qratia.guide.md +0 -34
- package/dist/themes/qratia.meta.json +0 -49
- package/dist/themes/qratia.scoped.css +0 -264
- package/dist/themes/qratia.tokens.json +0 -49
- package/dist/themes/stone.css +0 -263
- package/dist/themes/stone.fonts.css +0 -2
- package/dist/themes/stone.guide.md +0 -30
- package/dist/themes/stone.meta.json +0 -47
- package/dist/themes/stone.scoped.css +0 -263
- package/dist/themes/stone.tokens.json +0 -49
- package/dist/themes/tactile.css +0 -596
- package/dist/themes/tactile.fonts.css +0 -3
- package/dist/themes/tactile.guide.md +0 -82
- package/dist/themes/tactile.meta.json +0 -182
- package/dist/themes/tactile.scoped.css +0 -596
- package/dist/themes/tactile.tokens.json +0 -42
- package/dist/themes/twitter.css +0 -364
- package/dist/themes/twitter.fonts.css +0 -6
- package/dist/themes/twitter.guide.md +0 -35
- package/dist/themes/twitter.meta.json +0 -90
- package/dist/themes/twitter.scoped.css +0 -364
- package/dist/themes/twitter.tokens.json +0 -45
- package/dist/themes/y2k.css +0 -259
- package/dist/themes/y2k.fonts.css +0 -2
- package/dist/themes/y2k.guide.md +0 -30
- package/dist/themes/y2k.meta.json +0 -59
- package/dist/themes/y2k.scoped.css +0 -259
- package/dist/themes/y2k.tokens.json +0 -49
- package/dist/themes/zyro.css +0 -442
- package/dist/themes/zyro.fonts.css +0 -2
- package/dist/themes/zyro.guide.md +0 -33
- package/dist/themes/zyro.meta.json +0 -74
- package/dist/themes/zyro.scoped.css +0 -442
- package/dist/themes/zyro.tokens.json +0 -46
- package/dist/ui/a2ui-renderer.d.ts +0 -44
- package/dist/ui/accordion.d.ts +0 -9
- package/dist/ui/agent-events.d.ts +0 -49
- package/dist/ui/ai-tag.d.ts +0 -24
- package/dist/ui/alert-dialog.d.ts +0 -60
- package/dist/ui/alert.d.ts +0 -13
- package/dist/ui/animated-number.d.ts +0 -20
- package/dist/ui/app-bar.d.ts +0 -32
- package/dist/ui/aspect-ratio.d.ts +0 -7
- package/dist/ui/attachment.d.ts +0 -26
- package/dist/ui/auth-backdrop.d.ts +0 -37
- package/dist/ui/auth-form.d.ts +0 -4
- package/dist/ui/auth-layout.d.ts +0 -110
- package/dist/ui/auth-parts.d.ts +0 -43
- package/dist/ui/auth-status.d.ts +0 -23
- package/dist/ui/avatar.d.ts +0 -43
- package/dist/ui/ayuda.d.ts +0 -22
- package/dist/ui/badge.d.ts +0 -15
- package/dist/ui/banner.d.ts +0 -14
- package/dist/ui/bottom-nav.d.ts +0 -37
- package/dist/ui/breadcrumb.d.ts +0 -34
- package/dist/ui/bubble.d.ts +0 -19
- package/dist/ui/button-group.d.ts +0 -15
- package/dist/ui/button.d.ts +0 -14
- package/dist/ui/calendar.d.ts +0 -28
- package/dist/ui/card-stack.d.ts +0 -36
- package/dist/ui/card.d.ts +0 -61
- package/dist/ui/carousel.d.ts +0 -68
- package/dist/ui/chain-of-thought.d.ts +0 -34
- package/dist/ui/chart-card.d.ts +0 -47
- package/dist/ui/chart.d.ts +0 -65
- package/dist/ui/chart.js +0 -254
- package/dist/ui/chat-composer.d.ts +0 -58
- package/dist/ui/checkbox.d.ts +0 -6
- package/dist/ui/choice-card.d.ts +0 -49
- package/dist/ui/code-block.d.ts +0 -29
- package/dist/ui/collapsible.d.ts +0 -8
- package/dist/ui/combobox.d.ts +0 -74
- package/dist/ui/command-palette.d.ts +0 -54
- package/dist/ui/command.d.ts +0 -56
- package/dist/ui/confirm-action.d.ts +0 -48
- package/dist/ui/confirm-dialog.d.ts +0 -44
- package/dist/ui/connected-accounts.d.ts +0 -25
- package/dist/ui/content-card.d.ts +0 -66
- package/dist/ui/context-menu.d.ts +0 -66
- package/dist/ui/conversation-list.d.ts +0 -44
- package/dist/ui/copy-button.d.ts +0 -25
- package/dist/ui/data-table.d.ts +0 -198
- package/dist/ui/date-picker.d.ts +0 -65
- package/dist/ui/date-time.d.ts +0 -40
- package/dist/ui/description-list.d.ts +0 -49
- package/dist/ui/detail-panel.d.ts +0 -38
- package/dist/ui/dialog.d.ts +0 -54
- package/dist/ui/direction.d.ts +0 -1
- package/dist/ui/dock.d.ts +0 -30
- package/dist/ui/drawer.d.ts +0 -59
- package/dist/ui/dropdown-menu.d.ts +0 -63
- package/dist/ui/dropzone.d.ts +0 -44
- package/dist/ui/echart.d.ts +0 -46
- package/dist/ui/empty-state.d.ts +0 -26
- package/dist/ui/empty.d.ts +0 -15
- package/dist/ui/entity-list.d.ts +0 -57
- package/dist/ui/error-page.d.ts +0 -28
- package/dist/ui/error-state.d.ts +0 -16
- package/dist/ui/eyebrow.d.ts +0 -7
- package/dist/ui/field.d.ts +0 -28
- package/dist/ui/file-upload.d.ts +0 -42
- package/dist/ui/filter-bar.d.ts +0 -38
- package/dist/ui/form-layout.d.ts +0 -43
- package/dist/ui/gauge.d.ts +0 -66
- package/dist/ui/generated-image.d.ts +0 -33
- package/dist/ui/generated-table.d.ts +0 -29
- package/dist/ui/heatmap-grid.d.ts +0 -59
- package/dist/ui/hero.d.ts +0 -58
- package/dist/ui/hover-card.d.ts +0 -8
- package/dist/ui/i18n-provider.d.ts +0 -27
- package/dist/ui/icon-tile.d.ts +0 -11
- package/dist/ui/input-group.d.ts +0 -22
- package/dist/ui/input-otp.d.ts +0 -36
- package/dist/ui/input.d.ts +0 -21
- package/dist/ui/instruction-editor.d.ts +0 -81
- package/dist/ui/item.d.ts +0 -26
- package/dist/ui/kbd.d.ts +0 -6
- package/dist/ui/label.d.ts +0 -22
- package/dist/ui/legend.d.ts +0 -57
- package/dist/ui/level-meter.d.ts +0 -28
- package/dist/ui/load-more.d.ts +0 -36
- package/dist/ui/loading-state.d.ts +0 -26
- package/dist/ui/locale-switcher.d.ts +0 -19
- package/dist/ui/markdown.d.ts +0 -29
- package/dist/ui/marker.d.ts +0 -13
- package/dist/ui/media-card.d.ts +0 -29
- package/dist/ui/menubar.d.ts +0 -70
- package/dist/ui/message-actions.d.ts +0 -21
- package/dist/ui/message-scroller.d.ts +0 -46
- package/dist/ui/message.d.ts +0 -45
- package/dist/ui/mfa-challenge.d.ts +0 -4
- package/dist/ui/mfa-setup.d.ts +0 -29
- package/dist/ui/mosaic.d.ts +0 -38
- package/dist/ui/motion-provider.d.ts +0 -28
- package/dist/ui/native-select.d.ts +0 -32
- package/dist/ui/navigation-menu.d.ts +0 -15
- package/dist/ui/next-step-card.d.ts +0 -55
- package/dist/ui/notice-review.d.ts +0 -64
- package/dist/ui/notifications.d.ts +0 -81
- package/dist/ui/oauth-consent.d.ts +0 -54
- package/dist/ui/page-header.d.ts +0 -64
- package/dist/ui/page-loader.d.ts +0 -40
- package/dist/ui/page-shell.d.ts +0 -25
- package/dist/ui/pagination.d.ts +0 -42
- package/dist/ui/panel.d.ts +0 -12
- package/dist/ui/passkey-list.d.ts +0 -17
- package/dist/ui/password-input.d.ts +0 -5
- package/dist/ui/password-strength.d.ts +0 -28
- package/dist/ui/popover.d.ts +0 -44
- package/dist/ui/progress.d.ts +0 -9
- package/dist/ui/proportion-bar.d.ts +0 -52
- package/dist/ui/quantity.d.ts +0 -25
- package/dist/ui/questionnaire.d.ts +0 -62
- package/dist/ui/radio-group.d.ts +0 -8
- package/dist/ui/reasoning.d.ts +0 -24
- package/dist/ui/resizable.d.ts +0 -10
- package/dist/ui/reveal.d.ts +0 -28
- package/dist/ui/scroll-area.d.ts +0 -7
- package/dist/ui/search-box.d.ts +0 -32
- package/dist/ui/select.d.ts +0 -19
- package/dist/ui/separator.d.ts +0 -6
- package/dist/ui/session-list.d.ts +0 -19
- package/dist/ui/session-timeout.d.ts +0 -13
- package/dist/ui/sheet.d.ts +0 -53
- package/dist/ui/shield.d.ts +0 -35
- package/dist/ui/show-more.d.ts +0 -26
- package/dist/ui/sidebar.d.ts +0 -92
- package/dist/ui/sign-out-dialog.d.ts +0 -17
- package/dist/ui/skeleton.d.ts +0 -10
- package/dist/ui/slider.d.ts +0 -23
- package/dist/ui/sonner.d.ts +0 -6
- package/dist/ui/sparkline.d.ts +0 -26
- package/dist/ui/spinner.d.ts +0 -5
- package/dist/ui/stat-group.d.ts +0 -40
- package/dist/ui/stat.d.ts +0 -90
- package/dist/ui/status-badge.d.ts +0 -39
- package/dist/ui/status-hero.d.ts +0 -30
- package/dist/ui/step-dots.d.ts +0 -22
- package/dist/ui/step-flow.d.ts +0 -48
- package/dist/ui/step-ring.d.ts +0 -26
- package/dist/ui/stepper.d.ts +0 -20
- package/dist/ui/suggestions.d.ts +0 -17
- package/dist/ui/switch.d.ts +0 -8
- package/dist/ui/table.d.ts +0 -38
- package/dist/ui/tabs.d.ts +0 -14
- package/dist/ui/tag-input.d.ts +0 -21
- package/dist/ui/task-loader.d.ts +0 -29
- package/dist/ui/task-progress.d.ts +0 -32
- package/dist/ui/textarea.d.ts +0 -32
- package/dist/ui/theme-toggle.d.ts +0 -14
- package/dist/ui/timeline.d.ts +0 -55
- package/dist/ui/toast.d.ts +0 -19
- package/dist/ui/toggle-group.d.ts +0 -38
- package/dist/ui/toggle.d.ts +0 -12
- package/dist/ui/tool-call.d.ts +0 -27
- package/dist/ui/tooltip.d.ts +0 -9
- package/dist/ui/usage-meter.d.ts +0 -42
- package/dist/ui/week-strip.d.ts +0 -23
- package/dist/ui/workflow-run.d.ts +0 -51
package/dist/ui/card.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { AuthBackdropVariant } from './auth-backdrop.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @group content
|
|
6
|
-
* @summary Superficie de tarjeta con anatomía libre (cabecera, título, descripción, acción, contenido y pie) para componer un bloque propio de una vista.
|
|
7
|
-
* @see content-card — tarjeta lista por intención (feature, media, metric, status, cover) sin montar piezas
|
|
8
|
-
* @see item — fila de una lista de entidades (variant="card"), no una tarjeta de bloque
|
|
9
|
-
* @see panel — superficie simple con relleno, sin cabecera ni pie
|
|
10
|
-
* @example Montaje mínimo
|
|
11
|
-
* <Card>
|
|
12
|
-
* <CardHeader>
|
|
13
|
-
* <CardTitle>Plan actual</CardTitle>
|
|
14
|
-
* <CardDescription>Se renueva el 1 de junio</CardDescription>
|
|
15
|
-
* <CardAction>
|
|
16
|
-
* <Button variant="outline" size="sm">Cambiar</Button>
|
|
17
|
-
* </CardAction>
|
|
18
|
-
* </CardHeader>
|
|
19
|
-
* <CardContent>
|
|
20
|
-
* <p>5 de 10 licencias en uso.</p>
|
|
21
|
-
* </CardContent>
|
|
22
|
-
* <CardFooter>
|
|
23
|
-
* <Button>Gestionar plan</Button>
|
|
24
|
-
* </CardFooter>
|
|
25
|
-
* </Card>
|
|
26
|
-
* @example Compacta y que se eleva al señalar
|
|
27
|
-
* <Card size="sm" hoverable>
|
|
28
|
-
* <CardHeader>
|
|
29
|
-
* <CardTitle>Integraciones</CardTitle>
|
|
30
|
-
* </CardHeader>
|
|
31
|
-
* <CardContent>
|
|
32
|
-
* <p>3 conectadas</p>
|
|
33
|
-
* </CardContent>
|
|
34
|
-
* </Card>
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
declare function Card({ className, size, hoverable, spotlight, glow, backdrop, backdropMedia, backdropGlass, animated, children, onPointerMove, ...props }: React.ComponentProps<"div"> & {
|
|
38
|
-
size?: "default" | "sm";
|
|
39
|
-
/** Al pasar el ratón la tarjeta se eleva y marca el borde (--ds-card-hover-lift / -border). */
|
|
40
|
-
hoverable?: boolean;
|
|
41
|
-
/** Un foco de luz sigue al puntero por dentro de la tarjeta (solo con ratón; quieto con movimiento reducido). */
|
|
42
|
-
spotlight?: boolean;
|
|
43
|
-
/** Resplandor de marca alrededor de la tarjeta al señalarla (--ds-card-glow). */
|
|
44
|
-
glow?: boolean;
|
|
45
|
-
/** Fondo de AuthBackdrop detrás del contenido (mesh, aurora, image, dots…). Con texto largo, prefiere `dots` o `grid`. */
|
|
46
|
-
backdrop?: AuthBackdropVariant;
|
|
47
|
-
/** backdrop="image": la foto o el vídeo (un <img>/<video> con alt=""). */
|
|
48
|
-
backdropMedia?: React.ReactNode;
|
|
49
|
-
/** Cristal esmerilado encima del fondo. */
|
|
50
|
-
backdropGlass?: boolean;
|
|
51
|
-
/** false = fondo quieto. */
|
|
52
|
-
animated?: boolean;
|
|
53
|
-
}): React.JSX.Element;
|
|
54
|
-
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
55
|
-
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
56
|
-
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
57
|
-
declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
58
|
-
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
59
|
-
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
60
|
-
|
|
61
|
-
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
package/dist/ui/carousel.d.ts
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react';
|
|
3
|
-
import { Button } from './button.js';
|
|
4
|
-
import 'class-variance-authority/types';
|
|
5
|
-
import '@base-ui/react/use-render';
|
|
6
|
-
import 'class-variance-authority';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @group content
|
|
10
|
-
* @summary Carrusel deslizable (Embla) para recorrer piezas del mismo nivel de una en una o varias por vista, con flechas, teclado y gesto.
|
|
11
|
-
* @see card-stack — baraja de pocas tarjetas que se atienden una a una
|
|
12
|
-
* @see scroll-area — fila con scroll horizontal libre, sin paginar
|
|
13
|
-
* @see mosaic — mostrar todas las tarjetas a la vez en una rejilla
|
|
14
|
-
* @example Una por vista con flechas
|
|
15
|
-
* <Carousel>
|
|
16
|
-
* <CarouselContent>
|
|
17
|
-
* <CarouselItem>
|
|
18
|
-
* <ContentCard title="Novedad 1" />
|
|
19
|
-
* </CarouselItem>
|
|
20
|
-
* <CarouselItem>
|
|
21
|
-
* <ContentCard title="Novedad 2" />
|
|
22
|
-
* </CarouselItem>
|
|
23
|
-
* </CarouselContent>
|
|
24
|
-
* <CarouselPrevious />
|
|
25
|
-
* <CarouselNext />
|
|
26
|
-
* </Carousel>
|
|
27
|
-
* @example Varias por vista y en bucle
|
|
28
|
-
* <Carousel opts={{ align: "start", loop: true }}>
|
|
29
|
-
* <CarouselContent>
|
|
30
|
-
* {courses.map((c) => (
|
|
31
|
-
* <CarouselItem key={c.id} className="basis-1/2 lg:basis-1/3">
|
|
32
|
-
* <MediaCard src={c.image} title={c.title} />
|
|
33
|
-
* </CarouselItem>
|
|
34
|
-
* ))}
|
|
35
|
-
* </CarouselContent>
|
|
36
|
-
* <CarouselPrevious />
|
|
37
|
-
* <CarouselNext />
|
|
38
|
-
* </Carousel>
|
|
39
|
-
* @note CarouselPrevious y CarouselNext se colocan fuera de los bordes: deja margen lateral al contenedor. Lo imprescindible no va en un carrusel: muchas personas solo ven la primera pieza.
|
|
40
|
-
* @note Para saber la pieza activa, `setApi` y escucha `select` en el api de Embla.
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
|
-
type CarouselApi = UseEmblaCarouselType[1];
|
|
44
|
-
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
45
|
-
type CarouselOptions = UseCarouselParameters[0];
|
|
46
|
-
type CarouselPlugin = UseCarouselParameters[1];
|
|
47
|
-
type CarouselProps = {
|
|
48
|
-
opts?: CarouselOptions;
|
|
49
|
-
plugins?: CarouselPlugin;
|
|
50
|
-
orientation?: "horizontal" | "vertical";
|
|
51
|
-
setApi?: (api: CarouselApi) => void;
|
|
52
|
-
};
|
|
53
|
-
type CarouselContextProps = {
|
|
54
|
-
carouselRef: ReturnType<typeof useEmblaCarousel>[0];
|
|
55
|
-
api: ReturnType<typeof useEmblaCarousel>[1];
|
|
56
|
-
scrollPrev: () => void;
|
|
57
|
-
scrollNext: () => void;
|
|
58
|
-
canScrollPrev: boolean;
|
|
59
|
-
canScrollNext: boolean;
|
|
60
|
-
} & CarouselProps;
|
|
61
|
-
declare function useCarousel(): CarouselContextProps;
|
|
62
|
-
declare function Carousel({ orientation, opts, setApi, plugins, className, children, ...props }: React.ComponentProps<"div"> & CarouselProps): React.JSX.Element;
|
|
63
|
-
declare function CarouselContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
64
|
-
declare function CarouselItem({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
65
|
-
declare function CarouselPrevious({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
|
|
66
|
-
declare function CarouselNext({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
|
|
67
|
-
|
|
68
|
-
export { Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, useCarousel };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @group agents
|
|
5
|
-
* @summary Resumen plegable de los pasos que dio un agente para responder («Completado en 3 pasos»), cada uno con su estado y resultados; vista compacta dentro del mensaje.
|
|
6
|
-
* @see reasoning — el texto libre del pensamiento del modelo, sin pasos
|
|
7
|
-
* @see agent-events — la traza completa con tiempos, datos y traspasos
|
|
8
|
-
* @see workflow-run — la ejecución de un workflow definido (nodos, ramas, cancelar y reintentar)
|
|
9
|
-
* @example Pasos con resultados
|
|
10
|
-
* <ChainOfThought
|
|
11
|
-
* steps={[
|
|
12
|
-
* { id: "1", title: "Busca «tarifas 2026»", results: ["docs.acme.com"], status: "done" },
|
|
13
|
-
* { id: "2", title: "Compara los planes", status: "running" },
|
|
14
|
-
* ]}
|
|
15
|
-
* />
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
type ChainStepStatus = "running" | "done" | "error" | "pending";
|
|
19
|
-
interface ChainStep {
|
|
20
|
-
id: string;
|
|
21
|
-
title: React.ReactNode;
|
|
22
|
-
description?: React.ReactNode;
|
|
23
|
-
/** Resultados breves (dominios, ficheros, etiquetas) como badges. */
|
|
24
|
-
results?: string[];
|
|
25
|
-
icon?: React.ReactNode;
|
|
26
|
-
status?: ChainStepStatus;
|
|
27
|
-
}
|
|
28
|
-
declare function ChainOfThought({ steps, summary, defaultOpen, className, ...props }: Omit<React.ComponentProps<"div">, "children"> & {
|
|
29
|
-
steps: ChainStep[];
|
|
30
|
-
summary?: React.ReactNode;
|
|
31
|
-
defaultOpen?: boolean;
|
|
32
|
-
}): React.JSX.Element;
|
|
33
|
-
|
|
34
|
-
export { ChainOfThought, type ChainStep, type ChainStepStatus };
|
package/dist/ui/chart-card.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { EChartProps, EChartHandle } from './echart.js';
|
|
3
|
-
import { EChartsCoreOption } from 'echarts/core';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @group data
|
|
7
|
-
* @summary Gráfico de ECharts dentro de una tarjeta con título, cargando, error, vacío y descarga resueltos: la forma por defecto de poner un gráfico en un panel o en un mosaico.
|
|
8
|
-
* @see echart — solo el lienzo del gráfico, sin tarjeta ni estados, dentro de tu propia maqueta
|
|
9
|
-
* @see chart — gráficos Recharts heredados: solo compatibilidad, nunca para pantallas nuevas
|
|
10
|
-
* @see stat — una cifra clave con su tendencia mínima (Sparkline), no un gráfico completo
|
|
11
|
-
* @example Preset standard con un option de echarts-presets (sin colores)
|
|
12
|
-
* <ChartCard
|
|
13
|
-
* preset="standard"
|
|
14
|
-
* title="Llamadas"
|
|
15
|
-
* description="Última semana"
|
|
16
|
-
* option={lineOption({ categories: ["L", "M", "X", "J", "V"], series: [{ name: "Llamadas", data: [12, 18, 15, 24, 30] }] })}
|
|
17
|
-
* />
|
|
18
|
-
* @example Gráfico principal (focus) con sus estados
|
|
19
|
-
* <ChartCard preset="focus" title="Volumen de llamadas" option={option} loading={isLoading} error={error} onRetry={refetch} />
|
|
20
|
-
* @example Sin datos
|
|
21
|
-
* <ChartCard preset="glance" title="Tendencia" option={option} empty />
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
type ChartCardPreset = "glance" | "standard" | "focus" | "dense";
|
|
25
|
-
declare const ChartCard: React.ForwardRefExoticComponent<{
|
|
26
|
-
option: EChartsCoreOption;
|
|
27
|
-
preset?: ChartCardPreset;
|
|
28
|
-
title?: React.ReactNode;
|
|
29
|
-
description?: React.ReactNode;
|
|
30
|
-
/** Acciones de la cabecera (selector de periodo, menú…). */
|
|
31
|
-
action?: React.ReactNode;
|
|
32
|
-
/** Pie: nota de la fuente, leyenda propia, enlace «Ver detalle». */
|
|
33
|
-
footer?: React.ReactNode;
|
|
34
|
-
loading?: boolean;
|
|
35
|
-
error?: unknown;
|
|
36
|
-
onRetry?: () => void;
|
|
37
|
-
/** Sin datos: muestra el texto de «sin datos» en lugar del gráfico. */
|
|
38
|
-
empty?: boolean;
|
|
39
|
-
height?: EChartProps["height"];
|
|
40
|
-
renderer?: EChartProps["renderer"];
|
|
41
|
-
exportable?: boolean;
|
|
42
|
-
fileName?: string;
|
|
43
|
-
onEvents?: EChartProps["onEvents"];
|
|
44
|
-
className?: string;
|
|
45
|
-
} & React.RefAttributes<EChartHandle>>;
|
|
46
|
-
|
|
47
|
-
export { ChartCard, type ChartCardPreset };
|
package/dist/ui/chart.d.ts
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as RechartsPrimitive from 'recharts';
|
|
3
|
-
import { TooltipValueType } from 'recharts';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @group data
|
|
7
|
-
* @summary Contenedor de Recharts con la paleta del tema, tooltip y leyenda. SOLO por compatibilidad (sin funciones nuevas): para cualquier gráfico nuevo usa ChartCard o EChart.
|
|
8
|
-
* @see chart-card — gráfico nuevo en un panel: tarjeta con estados y descarga (ECharts)
|
|
9
|
-
* @see echart — gráfico nuevo dentro de tu propia maqueta (ECharts, colores del tema)
|
|
10
|
-
* @see sparkline — tendencia mínima junto a una cifra, sin librería de gráficos
|
|
11
|
-
* @example Código heredado con Recharts (series con variables del tema)
|
|
12
|
-
* <ChartContainer config={{ nuevos: { label: "Nuevos clientes", color: "var(--chart-1)" } }}>
|
|
13
|
-
* <BarChart accessibilityLayer data={data}>
|
|
14
|
-
* <XAxis dataKey="mes" tickLine={false} axisLine={false} />
|
|
15
|
-
* <ChartTooltip content={<ChartTooltipContent />} />
|
|
16
|
-
* <ChartLegend content={<ChartLegendContent />} />
|
|
17
|
-
* <Bar dataKey="nuevos" fill="var(--color-nuevos)" />
|
|
18
|
-
* </BarChart>
|
|
19
|
-
* </ChartContainer>
|
|
20
|
-
* @note Solo compatibilidad con Recharts: no recibe funciones nuevas. En pantallas nuevas usa ChartCard (o EChart) con un option de orbital-ds/lib/echarts-presets.
|
|
21
|
-
* @note Los colores de cada serie salen de las variables del tema (var(--chart-1) … var(--chart-5)) en el config; nunca un color escrito.
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
declare const THEMES: {
|
|
25
|
-
readonly light: "";
|
|
26
|
-
readonly dark: ".dark";
|
|
27
|
-
};
|
|
28
|
-
type TooltipNameType = number | string;
|
|
29
|
-
type ChartConfig = Record<string, {
|
|
30
|
-
label?: React.ReactNode;
|
|
31
|
-
icon?: React.ComponentType;
|
|
32
|
-
} & ({
|
|
33
|
-
color?: string;
|
|
34
|
-
theme?: never;
|
|
35
|
-
} | {
|
|
36
|
-
color?: never;
|
|
37
|
-
theme: Record<keyof typeof THEMES, string>;
|
|
38
|
-
})>;
|
|
39
|
-
declare function ChartContainer({ id, className, children, config, initialDimension, ...props }: React.ComponentProps<"div"> & {
|
|
40
|
-
config: ChartConfig;
|
|
41
|
-
children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
|
|
42
|
-
initialDimension?: {
|
|
43
|
-
width: number;
|
|
44
|
-
height: number;
|
|
45
|
-
};
|
|
46
|
-
}): React.JSX.Element;
|
|
47
|
-
declare const ChartStyle: ({ id, config }: {
|
|
48
|
-
id: string;
|
|
49
|
-
config: ChartConfig;
|
|
50
|
-
}) => React.JSX.Element | null;
|
|
51
|
-
declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
|
|
52
|
-
declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }: React.ComponentProps<typeof RechartsPrimitive.Tooltip> & React.ComponentProps<"div"> & {
|
|
53
|
-
hideLabel?: boolean;
|
|
54
|
-
hideIndicator?: boolean;
|
|
55
|
-
indicator?: "line" | "dot" | "dashed";
|
|
56
|
-
nameKey?: string;
|
|
57
|
-
labelKey?: string;
|
|
58
|
-
} & Omit<RechartsPrimitive.DefaultTooltipContentProps<TooltipValueType, TooltipNameType>, "accessibilityLayer">): React.JSX.Element | null;
|
|
59
|
-
declare const ChartLegend: React.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
|
|
60
|
-
declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: React.ComponentProps<"div"> & {
|
|
61
|
-
hideIcon?: boolean;
|
|
62
|
-
nameKey?: string;
|
|
63
|
-
} & RechartsPrimitive.DefaultLegendContentProps): React.JSX.Element | null;
|
|
64
|
-
|
|
65
|
-
export { type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };
|
package/dist/ui/chart.js
DELETED
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import * as RechartsPrimitive from "recharts";
|
|
4
|
-
import { cn } from "../lib/utils.js";
|
|
5
|
-
const THEMES = { light: "", dark: ".dark" };
|
|
6
|
-
const INITIAL_DIMENSION = { width: 320, height: 200 };
|
|
7
|
-
const ChartContext = React.createContext(null);
|
|
8
|
-
function useChart() {
|
|
9
|
-
const context = React.useContext(ChartContext);
|
|
10
|
-
if (!context) {
|
|
11
|
-
throw new Error("useChart must be used within a <ChartContainer />");
|
|
12
|
-
}
|
|
13
|
-
return context;
|
|
14
|
-
}
|
|
15
|
-
function ChartContainer({
|
|
16
|
-
id,
|
|
17
|
-
className,
|
|
18
|
-
children,
|
|
19
|
-
config,
|
|
20
|
-
initialDimension = INITIAL_DIMENSION,
|
|
21
|
-
...props
|
|
22
|
-
}) {
|
|
23
|
-
const uniqueId = React.useId();
|
|
24
|
-
const chartId = `chart-${id ?? uniqueId.replace(/:/g, "")}`;
|
|
25
|
-
return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
|
|
26
|
-
"div",
|
|
27
|
-
{
|
|
28
|
-
"data-slot": "chart",
|
|
29
|
-
"data-chart": chartId,
|
|
30
|
-
className: cn(
|
|
31
|
-
"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
|
|
32
|
-
className
|
|
33
|
-
),
|
|
34
|
-
...props,
|
|
35
|
-
children: [
|
|
36
|
-
/* @__PURE__ */ jsx(ChartStyle, { id: chartId, config }),
|
|
37
|
-
/* @__PURE__ */ jsx(
|
|
38
|
-
RechartsPrimitive.ResponsiveContainer,
|
|
39
|
-
{
|
|
40
|
-
initialDimension,
|
|
41
|
-
children
|
|
42
|
-
}
|
|
43
|
-
)
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
) });
|
|
47
|
-
}
|
|
48
|
-
const ChartStyle = ({ id, config }) => {
|
|
49
|
-
const colorConfig = Object.entries(config).filter(
|
|
50
|
-
([, config2]) => config2.theme ?? config2.color
|
|
51
|
-
);
|
|
52
|
-
if (!colorConfig.length) {
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
return /* @__PURE__ */ jsx(
|
|
56
|
-
"style",
|
|
57
|
-
{
|
|
58
|
-
dangerouslySetInnerHTML: {
|
|
59
|
-
__html: Object.entries(THEMES).map(
|
|
60
|
-
([theme, prefix]) => `
|
|
61
|
-
${prefix} [data-chart=${id}] {
|
|
62
|
-
${colorConfig.map(([key, itemConfig]) => {
|
|
63
|
-
const color = itemConfig.theme?.[theme] ?? itemConfig.color;
|
|
64
|
-
return color ? ` --color-${key}: ${color};` : null;
|
|
65
|
-
}).join("\n")}
|
|
66
|
-
}
|
|
67
|
-
`
|
|
68
|
-
).join("\n")
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
);
|
|
72
|
-
};
|
|
73
|
-
const ChartTooltip = RechartsPrimitive.Tooltip;
|
|
74
|
-
function ChartTooltipContent({
|
|
75
|
-
active,
|
|
76
|
-
payload,
|
|
77
|
-
className,
|
|
78
|
-
indicator = "dot",
|
|
79
|
-
hideLabel = false,
|
|
80
|
-
hideIndicator = false,
|
|
81
|
-
label,
|
|
82
|
-
labelFormatter,
|
|
83
|
-
labelClassName,
|
|
84
|
-
formatter,
|
|
85
|
-
color,
|
|
86
|
-
nameKey,
|
|
87
|
-
labelKey
|
|
88
|
-
}) {
|
|
89
|
-
const { config } = useChart();
|
|
90
|
-
const tooltipLabel = React.useMemo(() => {
|
|
91
|
-
if (hideLabel || !payload?.length) {
|
|
92
|
-
return null;
|
|
93
|
-
}
|
|
94
|
-
const [item] = payload;
|
|
95
|
-
const key = `${labelKey ?? item?.dataKey ?? item?.name ?? "value"}`;
|
|
96
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
97
|
-
const value = !labelKey && typeof label === "string" ? config[label]?.label ?? label : itemConfig?.label;
|
|
98
|
-
if (labelFormatter) {
|
|
99
|
-
return /* @__PURE__ */ jsx("div", { className: cn("font-(--ds-medium-weight)", labelClassName), children: labelFormatter(value, payload) });
|
|
100
|
-
}
|
|
101
|
-
if (!value) {
|
|
102
|
-
return null;
|
|
103
|
-
}
|
|
104
|
-
return /* @__PURE__ */ jsx("div", { className: cn("font-(--ds-medium-weight)", labelClassName), children: value });
|
|
105
|
-
}, [
|
|
106
|
-
label,
|
|
107
|
-
labelFormatter,
|
|
108
|
-
payload,
|
|
109
|
-
hideLabel,
|
|
110
|
-
labelClassName,
|
|
111
|
-
config,
|
|
112
|
-
labelKey
|
|
113
|
-
]);
|
|
114
|
-
if (!active || !payload?.length) {
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
118
|
-
return /* @__PURE__ */ jsxs(
|
|
119
|
-
"div",
|
|
120
|
-
{
|
|
121
|
-
"data-slot": "chart-tooltip",
|
|
122
|
-
className: cn(
|
|
123
|
-
"grid min-w-32 items-start gap-1.5 rounded-popover bg-popover px-2.5 py-1.5 text-xs text-popover-foreground shadow-overlay ring-(length:--ds-layer-ring-w) ring-(--ds-layer-ring)",
|
|
124
|
-
className
|
|
125
|
-
),
|
|
126
|
-
children: [
|
|
127
|
-
!nestLabel ? tooltipLabel : null,
|
|
128
|
-
/* @__PURE__ */ jsx("div", { className: "grid gap-1.5", children: payload.filter((item) => item.type !== "none").map((item, index) => {
|
|
129
|
-
const key = `${nameKey ?? item.name ?? item.dataKey ?? "value"}`;
|
|
130
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
131
|
-
const indicatorColor = color ?? item.payload?.fill ?? item.color;
|
|
132
|
-
return /* @__PURE__ */ jsx(
|
|
133
|
-
"div",
|
|
134
|
-
{
|
|
135
|
-
"data-slot": "chart-tooltip-item",
|
|
136
|
-
className: cn(
|
|
137
|
-
"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
|
|
138
|
-
indicator === "dot" && "items-center"
|
|
139
|
-
),
|
|
140
|
-
children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
141
|
-
itemConfig?.icon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx(
|
|
142
|
-
"div",
|
|
143
|
-
{
|
|
144
|
-
className: cn(
|
|
145
|
-
"shrink-0 rounded-xs border-(--color-border) bg-(--color-bg)",
|
|
146
|
-
{
|
|
147
|
-
"h-2.5 w-2.5": indicator === "dot",
|
|
148
|
-
"w-1": indicator === "line",
|
|
149
|
-
"w-0 border-(length:--ds-chart-dash-w) border-dashed bg-transparent": indicator === "dashed",
|
|
150
|
-
"my-0.5": nestLabel && indicator === "dashed"
|
|
151
|
-
}
|
|
152
|
-
),
|
|
153
|
-
style: {
|
|
154
|
-
"--color-bg": indicatorColor,
|
|
155
|
-
"--color-border": indicatorColor
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
),
|
|
159
|
-
/* @__PURE__ */ jsxs(
|
|
160
|
-
"div",
|
|
161
|
-
{
|
|
162
|
-
className: cn(
|
|
163
|
-
"flex flex-1 justify-between leading-none",
|
|
164
|
-
nestLabel ? "items-end" : "items-center"
|
|
165
|
-
),
|
|
166
|
-
children: [
|
|
167
|
-
/* @__PURE__ */ jsxs("div", { className: "grid gap-1.5", children: [
|
|
168
|
-
nestLabel ? tooltipLabel : null,
|
|
169
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: itemConfig?.label ?? item.name })
|
|
170
|
-
] }),
|
|
171
|
-
item.value != null && /* @__PURE__ */ jsx("span", { className: "font-mono font-(--ds-medium-weight) text-foreground tabular-nums", children: typeof item.value === "number" ? item.value.toLocaleString() : String(item.value) })
|
|
172
|
-
]
|
|
173
|
-
}
|
|
174
|
-
)
|
|
175
|
-
] })
|
|
176
|
-
},
|
|
177
|
-
index
|
|
178
|
-
);
|
|
179
|
-
}) })
|
|
180
|
-
]
|
|
181
|
-
}
|
|
182
|
-
);
|
|
183
|
-
}
|
|
184
|
-
const ChartLegend = RechartsPrimitive.Legend;
|
|
185
|
-
function ChartLegendContent({
|
|
186
|
-
className,
|
|
187
|
-
hideIcon = false,
|
|
188
|
-
payload,
|
|
189
|
-
verticalAlign = "bottom",
|
|
190
|
-
nameKey
|
|
191
|
-
}) {
|
|
192
|
-
const { config } = useChart();
|
|
193
|
-
if (!payload?.length) {
|
|
194
|
-
return null;
|
|
195
|
-
}
|
|
196
|
-
return /* @__PURE__ */ jsx(
|
|
197
|
-
"div",
|
|
198
|
-
{
|
|
199
|
-
"data-slot": "chart-legend",
|
|
200
|
-
className: cn(
|
|
201
|
-
"flex items-center justify-center gap-4",
|
|
202
|
-
verticalAlign === "top" ? "pb-3" : "pt-3",
|
|
203
|
-
className
|
|
204
|
-
),
|
|
205
|
-
children: payload.filter((item) => item.type !== "none").map((item, index) => {
|
|
206
|
-
const key = `${nameKey ?? item.dataKey ?? "value"}`;
|
|
207
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
208
|
-
return /* @__PURE__ */ jsxs(
|
|
209
|
-
"div",
|
|
210
|
-
{
|
|
211
|
-
"data-slot": "chart-legend-item",
|
|
212
|
-
className: cn(
|
|
213
|
-
"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"
|
|
214
|
-
),
|
|
215
|
-
children: [
|
|
216
|
-
itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsx(
|
|
217
|
-
"div",
|
|
218
|
-
{
|
|
219
|
-
className: "h-2 w-2 shrink-0 rounded-xs",
|
|
220
|
-
style: {
|
|
221
|
-
backgroundColor: item.color
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
),
|
|
225
|
-
itemConfig?.label
|
|
226
|
-
]
|
|
227
|
-
},
|
|
228
|
-
index
|
|
229
|
-
);
|
|
230
|
-
})
|
|
231
|
-
}
|
|
232
|
-
);
|
|
233
|
-
}
|
|
234
|
-
function getPayloadConfigFromPayload(config, payload, key) {
|
|
235
|
-
if (typeof payload !== "object" || payload === null) {
|
|
236
|
-
return void 0;
|
|
237
|
-
}
|
|
238
|
-
const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
|
|
239
|
-
let configLabelKey = key;
|
|
240
|
-
if (key in payload && typeof payload[key] === "string") {
|
|
241
|
-
configLabelKey = payload[key];
|
|
242
|
-
} else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
|
|
243
|
-
configLabelKey = payloadPayload[key];
|
|
244
|
-
}
|
|
245
|
-
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
246
|
-
}
|
|
247
|
-
export {
|
|
248
|
-
ChartContainer,
|
|
249
|
-
ChartLegend,
|
|
250
|
-
ChartLegendContent,
|
|
251
|
-
ChartStyle,
|
|
252
|
-
ChartTooltip,
|
|
253
|
-
ChartTooltipContent
|
|
254
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @group chat
|
|
5
|
-
* @summary Campo de mensaje de un chat: Enter envía, adjuntos, voz y «Detener» mientras responde el asistente; no sube ni graba, eso lo hace la app.
|
|
6
|
-
* @see textarea — texto multilínea en un formulario normal
|
|
7
|
-
* @see suggestions — preguntas sugeridas para empezar la conversación
|
|
8
|
-
* @see attachment — chip de un adjunto suelto dentro de un mensaje
|
|
9
|
-
* @example Enviar y detener
|
|
10
|
-
* <ChatComposer onSend={send} onStop={abort} streaming={isStreaming} placeholder="Pregunta lo que quieras…" />
|
|
11
|
-
* @example Con adjuntos y límite
|
|
12
|
-
* <ChatComposer
|
|
13
|
-
* onSend={send}
|
|
14
|
-
* onAttach={pickFiles}
|
|
15
|
-
* onFilesDrop={addFiles}
|
|
16
|
-
* attachments={[{ id: "1", name: "informe.pdf", type: "application/pdf", status: "uploading" }]}
|
|
17
|
-
* onRemoveAttachment={removeFile}
|
|
18
|
-
* maxLength={4000}
|
|
19
|
-
* />
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
type ChatAttachmentStatus = "ready" | "uploading" | "error";
|
|
23
|
-
interface ChatAttachment {
|
|
24
|
-
id: string;
|
|
25
|
-
name: string;
|
|
26
|
-
/** Tipo MIME; `image/*` usa el icono de imagen. */
|
|
27
|
-
type?: string;
|
|
28
|
-
status?: ChatAttachmentStatus;
|
|
29
|
-
}
|
|
30
|
-
type ChatVoiceState = "idle" | "recording" | "transcribing" | "error";
|
|
31
|
-
interface ChatVoice {
|
|
32
|
-
state: ChatVoiceState;
|
|
33
|
-
/** Segundos grabados (los formatea el componente). */
|
|
34
|
-
seconds?: number;
|
|
35
|
-
onStart: () => void;
|
|
36
|
-
/** Termina y usa la grabación. */
|
|
37
|
-
onConfirm: () => void;
|
|
38
|
-
/** Descarta la grabación. */
|
|
39
|
-
onCancel: () => void;
|
|
40
|
-
}
|
|
41
|
-
declare function ChatComposer({ value, defaultValue, onValueChange, onSend, onStop, onAttach, onFilesDrop, attachments, onRemoveAttachment, voice, maxLength, streaming, disabled, placeholder, className, ...props }: Omit<React.ComponentProps<"div">, "onChange" | "defaultValue"> & {
|
|
42
|
-
value?: string;
|
|
43
|
-
defaultValue?: string;
|
|
44
|
-
onValueChange?: (value: string) => void;
|
|
45
|
-
onSend?: (value: string) => void;
|
|
46
|
-
onStop?: () => void;
|
|
47
|
-
onAttach?: () => void;
|
|
48
|
-
onFilesDrop?: (files: File[]) => void;
|
|
49
|
-
attachments?: ChatAttachment[];
|
|
50
|
-
onRemoveAttachment?: (id: string) => void;
|
|
51
|
-
voice?: ChatVoice;
|
|
52
|
-
maxLength?: number;
|
|
53
|
-
streaming?: boolean;
|
|
54
|
-
disabled?: boolean;
|
|
55
|
-
placeholder?: string;
|
|
56
|
-
}): React.JSX.Element;
|
|
57
|
-
|
|
58
|
-
export { type ChatAttachment, type ChatAttachmentStatus, ChatComposer, type ChatVoice, type ChatVoiceState };
|
package/dist/ui/checkbox.d.ts
DELETED
package/dist/ui/choice-card.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
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
|
-
/**
|
|
6
|
-
* @group forms
|
|
7
|
-
* @summary Teselas seleccionables con icono y texto para elegir UNA opción de un grupo corto y visual (tipo de cuenta, plan, modo).
|
|
8
|
-
* @see radio-group — muchas opciones o texto largo, en formato de lista
|
|
9
|
-
* @see select — elegir de una lista larga sin ocupar espacio
|
|
10
|
-
* @see toggle-group — cambiar una vista o filtro de la pantalla, no un dato del formulario
|
|
11
|
-
* @example Tipo de cuenta
|
|
12
|
-
* <ChoiceCardGroup defaultValue="company" aria-label="Tipo de cuenta">
|
|
13
|
-
* <ChoiceCard value="company">
|
|
14
|
-
* <ChoiceCardMedia>
|
|
15
|
-
* <BuildingIcon />
|
|
16
|
-
* </ChoiceCardMedia>
|
|
17
|
-
* <ChoiceCardTitle>Empresa</ChoiceCardTitle>
|
|
18
|
-
* </ChoiceCard>
|
|
19
|
-
* <ChoiceCard value="user">
|
|
20
|
-
* <ChoiceCardMedia>
|
|
21
|
-
* <UserIcon />
|
|
22
|
-
* </ChoiceCardMedia>
|
|
23
|
-
* <ChoiceCardTitle>Particular</ChoiceCardTitle>
|
|
24
|
-
* </ChoiceCard>
|
|
25
|
-
* </ChoiceCardGroup>
|
|
26
|
-
* @example Con descripción e indicador
|
|
27
|
-
* <ChoiceCardGroup defaultValue="pro" aria-label="Plan">
|
|
28
|
-
* <ChoiceCard value="pro">
|
|
29
|
-
* <ChoiceCardContent>
|
|
30
|
-
* <ChoiceCardTitle>Pro</ChoiceCardTitle>
|
|
31
|
-
* <ChoiceCardDescription>Hasta 20 usuarios</ChoiceCardDescription>
|
|
32
|
-
* </ChoiceCardContent>
|
|
33
|
-
* <ChoiceCardIndicator />
|
|
34
|
-
* </ChoiceCard>
|
|
35
|
-
* </ChoiceCardGroup>
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
declare function ChoiceCardGroup({ className, ...props }: RadioGroup.Props): React.JSX.Element;
|
|
39
|
-
declare function ChoiceCard({ className, orientation, ...props }: Radio.Root.Props & {
|
|
40
|
-
orientation?: "horizontal" | "vertical";
|
|
41
|
-
}): React.JSX.Element;
|
|
42
|
-
declare function ChoiceCardMedia({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
43
|
-
declare function ChoiceCardContent({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
44
|
-
declare function ChoiceCardTitle({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
45
|
-
declare function ChoiceCardDescription({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
46
|
-
/** Marca de seleccionado (opcional): un círculo con punto en la esquina, como un radio. */
|
|
47
|
-
declare function ChoiceCardIndicator({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
48
|
-
|
|
49
|
-
export { ChoiceCard, ChoiceCardContent, ChoiceCardDescription, ChoiceCardGroup, ChoiceCardIndicator, ChoiceCardMedia, ChoiceCardTitle };
|