orbital-ds 0.31.1 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- package/components.manifest.json +3216 -3160
- package/dist/hooks/use-ds-messages.d.ts +39 -0
- package/dist/lib/i18n.d.ts +39 -0
- package/dist/lib/i18n.js +117 -0
- package/dist/lib/template-syntax.d.ts +22 -0
- package/dist/lib/template-syntax.js +66 -0
- package/dist/styles.css +1699 -1678
- package/dist/themes/chocolate.css +259 -259
- package/dist/themes/chocolate.scoped.css +259 -259
- package/dist/themes/fractalia.css +2 -2
- package/dist/themes/fractalia.scoped.css +2 -2
- package/dist/themes/friendly.css +8 -8
- package/dist/themes/friendly.scoped.css +8 -8
- package/dist/themes/lagoon.css +11 -11
- package/dist/themes/lagoon.scoped.css +11 -11
- package/dist/themes/liquid.css +7 -7
- package/dist/themes/liquid.scoped.css +7 -7
- package/dist/themes/matcha.css +259 -259
- package/dist/themes/matcha.scoped.css +259 -259
- package/dist/themes/qratia.css +6 -6
- package/dist/themes/qratia.scoped.css +6 -6
- package/dist/themes/stone.css +263 -263
- package/dist/themes/stone.guide.md +30 -30
- package/dist/themes/stone.meta.json +47 -47
- package/dist/themes/stone.scoped.css +263 -263
- package/dist/themes/tactile.css +596 -596
- package/dist/themes/tactile.scoped.css +596 -596
- package/dist/themes/y2k.css +259 -259
- package/dist/themes/y2k.scoped.css +259 -259
- package/dist/themes/zyro.css +8 -8
- package/dist/themes/zyro.scoped.css +8 -8
- package/dist/ui/accordion.js +1 -1
- package/dist/ui/alert-dialog.js +1 -1
- package/dist/ui/alert.js +2 -2
- package/dist/ui/attachment.js +1 -1
- package/dist/ui/auth-form.js +4 -4
- package/dist/ui/auth-layout.d.ts +3 -1
- package/dist/ui/auth-layout.js +7 -4
- package/dist/ui/auth-parts.js +4 -4
- package/dist/ui/avatar.js +1 -1
- package/dist/ui/ayuda.js +1 -1
- package/dist/ui/badge.js +1 -1
- package/dist/ui/banner.js +1 -1
- package/dist/ui/bottom-nav.js +1 -1
- package/dist/ui/breadcrumb.js +1 -1
- package/dist/ui/bubble.js +3 -3
- package/dist/ui/button-group.js +1 -1
- package/dist/ui/button.js +4 -4
- package/dist/ui/calendar.js +6 -6
- package/dist/ui/carousel.js +4 -4
- package/dist/ui/choice-card.js +1 -1
- package/dist/ui/combobox.js +4 -4
- package/dist/ui/command.js +2 -2
- package/dist/ui/content-card.js +2 -2
- package/dist/ui/context-menu.js +9 -9
- package/dist/ui/data-table.d.ts +13 -3
- package/dist/ui/data-table.js +164 -71
- package/dist/ui/date-picker.js +1 -1
- package/dist/ui/dialog.js +1 -1
- package/dist/ui/drawer.js +5 -5
- package/dist/ui/dropdown-menu.js +9 -9
- package/dist/ui/field.js +3 -3
- package/dist/ui/heatmap-grid.js +2 -2
- package/dist/ui/input-group.js +3 -3
- package/dist/ui/input-otp.js +1 -1
- package/dist/ui/instruction-editor.d.ts +51 -0
- package/dist/ui/instruction-editor.js +263 -0
- package/dist/ui/item.js +1 -1
- package/dist/ui/marker.js +2 -2
- package/dist/ui/menubar.js +8 -8
- package/dist/ui/mfa-challenge.js +3 -3
- package/dist/ui/mfa-setup.js +1 -1
- package/dist/ui/navigation-menu.js +2 -2
- package/dist/ui/oauth-consent.js +3 -3
- package/dist/ui/pagination.js +2 -2
- package/dist/ui/panel.d.ts +1 -1
- package/dist/ui/panel.js +1 -0
- package/dist/ui/passkey-list.js +1 -1
- package/dist/ui/resizable.js +1 -1
- package/dist/ui/scroll-area.js +1 -1
- package/dist/ui/session-timeout.js +1 -1
- package/dist/ui/sheet.js +2 -2
- package/dist/ui/sidebar.js +7 -7
- package/dist/ui/sign-out-dialog.js +1 -1
- package/dist/ui/switch.js +1 -1
- package/dist/ui/table.js +2 -2
- package/dist/ui/tabs.js +2 -2
- package/dist/ui/toast.js +3 -3
- package/dist/ui/toggle-group.js +1 -1
- package/dist/ui/toggle.js +3 -3
- package/dist/ui/tooltip.js +2 -2
- package/docs/CONTRACT.md +224 -224
- package/package.json +218 -188
- package/scripts/cli.mjs +457 -457
- package/scripts/doctor.mjs +2 -0
- package/scripts/manifest.mjs +100 -100
package/dist/ui/auth-form.js
CHANGED
|
@@ -339,7 +339,7 @@ function AuthForm({
|
|
|
339
339
|
className: "mt-0.5"
|
|
340
340
|
}
|
|
341
341
|
),
|
|
342
|
-
/* @__PURE__ */ jsxs(Label, { htmlFor: ids(f), className: "inline text-sm leading-snug font-normal text-muted-foreground", children: [
|
|
342
|
+
/* @__PURE__ */ jsxs(Label, { htmlFor: ids(f), className: "inline text-sm leading-snug font-(--ds-normal-weight) text-muted-foreground", children: [
|
|
343
343
|
t.authTermsAccept,
|
|
344
344
|
" ",
|
|
345
345
|
links.terms ? /* @__PURE__ */ jsx(AuthAnchor, { to: links.terms, children: t.authTermsLink }) : t.authTermsLink,
|
|
@@ -450,7 +450,7 @@ function AuthForm({
|
|
|
450
450
|
children: [
|
|
451
451
|
o.icon ?? /* @__PURE__ */ jsx(IconTile, { size: "sm", children: /* @__PURE__ */ jsx(Building2Icon, {}) }),
|
|
452
452
|
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
453
|
-
/* @__PURE__ */ jsx("span", { className: "truncate text-sm font-medium", children: o.label }),
|
|
453
|
+
/* @__PURE__ */ jsx("span", { className: "truncate text-sm font-(--ds-medium-weight)", children: o.label }),
|
|
454
454
|
o.description ? /* @__PURE__ */ jsx("span", { className: "truncate text-xs text-muted-foreground", children: o.description }) : null
|
|
455
455
|
] }),
|
|
456
456
|
pending === "sso" ? /* @__PURE__ */ jsx(Spinner, {}) : null
|
|
@@ -477,7 +477,7 @@ function AuthForm({
|
|
|
477
477
|
/* @__PURE__ */ jsx(AuthError, { error: shownError }),
|
|
478
478
|
view === "password" ? /* @__PURE__ */ jsxs("div", { "data-slot": "auth-form-identity", className: "flex items-center justify-between gap-2 rounded-(--ds-auth-radius) border border-(--ds-auth-border) px-3 py-2 text-sm", children: [
|
|
479
479
|
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: email }),
|
|
480
|
-
accessKind ? /* @__PURE__ */ jsx("span", { "data-slot": "auth-form-access", "data-access": accessKind, className: "shrink-0 rounded-
|
|
480
|
+
accessKind ? /* @__PURE__ */ jsx("span", { "data-slot": "auth-form-access", "data-access": accessKind, className: "shrink-0 rounded-(--ds-radius-pill) bg-muted px-2 py-0.5 text-xs text-muted-foreground", children: accessKind === "internal" ? t.authAccessInternal : t.authAccessExternal }) : null,
|
|
481
481
|
/* @__PURE__ */ jsx(Button, { type: "button", variant: "link", size: "sm", onClick: () => go("form"), children: t.authChange }),
|
|
482
482
|
/* @__PURE__ */ jsx("input", { type: "hidden", name: "username", autoComplete: "username", value: email })
|
|
483
483
|
] }) : null,
|
|
@@ -486,7 +486,7 @@ function AuthForm({
|
|
|
486
486
|
!ssoView && extraFields && !(stepFirst && view === "form") ? extraFields : null,
|
|
487
487
|
remember && preset === "sign-in" && !(stepFirst && view === "form") ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5", children: [
|
|
488
488
|
/* @__PURE__ */ jsx(Checkbox, { id: ids("remember"), name: "remember", checked: values.remember, onCheckedChange: (v) => set("remember", v === true) }),
|
|
489
|
-
/* @__PURE__ */ jsx(Label, { htmlFor: ids("remember"), className: "text-sm font-normal", children: t.authRemember })
|
|
489
|
+
/* @__PURE__ */ jsx(Label, { htmlFor: ids("remember"), className: "text-sm font-(--ds-normal-weight)", children: t.authRemember })
|
|
490
490
|
] }) : null,
|
|
491
491
|
/* @__PURE__ */ jsxs(Button, { type: "submit", className: "w-full", disabled: pending != null, "aria-busy": pending === "submit" || pending === "identify" || void 0, children: [
|
|
492
492
|
pending === "submit" || pending === "identify" || pending === "sso" ? /* @__PURE__ */ jsx(Spinner, {}) : null,
|
package/dist/ui/auth-layout.d.ts
CHANGED
|
@@ -43,9 +43,11 @@ declare function AuthLayout({ preset, surface, shape, backdrop, backdropMedia, b
|
|
|
43
43
|
/** Pie: enlaces legales, versión, soporte. */
|
|
44
44
|
footer?: React.ReactNode;
|
|
45
45
|
}): React.JSX.Element;
|
|
46
|
-
declare function AuthAside({ logo, backdrop, media, mediaTint, className, children, ...props }: React.ComponentProps<"aside"> & {
|
|
46
|
+
declare function AuthAside({ logo, align, backdrop, media, mediaTint, className, children, ...props }: React.ComponentProps<"aside"> & {
|
|
47
47
|
/** Logo arriba del panel (en split, la maqueta lo quita del formulario en ancho). */
|
|
48
48
|
logo?: React.ReactNode;
|
|
49
|
+
/** between = logo arriba y texto abajo (por defecto) · center = todo agrupado y centrado en vertical (portal corporativo). */
|
|
50
|
+
align?: "between" | "center";
|
|
49
51
|
/** Fondo animado del panel (por defecto, el del preset). */
|
|
50
52
|
backdrop?: AuthBackdropVariant;
|
|
51
53
|
/** Imagen o vídeo del panel (sustituye al degradado; el texto se lee sobre un velo de la marca). */
|
package/dist/ui/auth-layout.js
CHANGED
|
@@ -194,6 +194,7 @@ function AuthBanner({ logo, children }) {
|
|
|
194
194
|
}
|
|
195
195
|
function AuthAside({
|
|
196
196
|
logo,
|
|
197
|
+
align = "between",
|
|
197
198
|
backdrop,
|
|
198
199
|
media,
|
|
199
200
|
mediaTint = "brand",
|
|
@@ -206,9 +207,11 @@ function AuthAside({
|
|
|
206
207
|
"aside",
|
|
207
208
|
{
|
|
208
209
|
"data-slot": "auth-aside",
|
|
210
|
+
"data-align": align,
|
|
209
211
|
className: cn(
|
|
210
|
-
"relative isolate flex w-full flex-col
|
|
212
|
+
"relative isolate flex w-full flex-col gap-(--ds-auth-gap) overflow-hidden p-[calc(var(--ds-auth-p)*1.5)]",
|
|
211
213
|
"bg-(--ds-auth-aside-bg) bg-(image:--ds-auth-aside-image) text-(--ds-auth-aside-fg)",
|
|
214
|
+
align === "center" ? "justify-center" : "justify-between",
|
|
212
215
|
className
|
|
213
216
|
),
|
|
214
217
|
...props,
|
|
@@ -222,10 +225,10 @@ function AuthAside({
|
|
|
222
225
|
);
|
|
223
226
|
}
|
|
224
227
|
function AuthAsideEyebrow({ className, ...props }) {
|
|
225
|
-
return /* @__PURE__ */ jsx("p", { "data-slot": "auth-aside-eyebrow", className: cn("text-xs font-
|
|
228
|
+
return /* @__PURE__ */ jsx("p", { "data-slot": "auth-aside-eyebrow", className: cn("text-xs font-(--ds-strong-weight) uppercase tracking-(--ds-widest-tracking) opacity-80", className), ...props });
|
|
226
229
|
}
|
|
227
230
|
function AuthAsideTitle({ className, ...props }) {
|
|
228
|
-
return /* @__PURE__ */ jsx("h2", { "data-slot": "auth-aside-title", className: cn("text-
|
|
231
|
+
return /* @__PURE__ */ jsx("h2", { "data-slot": "auth-aside-title", className: cn("text-(length:--ds-auth-aside-title-size) font-(--ds-title-weight) tracking-(--ds-tight-tracking) text-balance @[72rem]/auth:text-(length:--ds-auth-aside-title-size-wide)", className), ...props });
|
|
229
232
|
}
|
|
230
233
|
function AuthAsideText({ className, ...props }) {
|
|
231
234
|
return /* @__PURE__ */ jsx("p", { "data-slot": "auth-aside-text", className: cn("text-base text-pretty opacity-85", className), ...props });
|
|
@@ -258,7 +261,7 @@ function AuthAsideQuote({
|
|
|
258
261
|
author ? /* @__PURE__ */ jsxs("figcaption", { className: "flex items-center gap-3 text-sm", children: [
|
|
259
262
|
avatar ? /* @__PURE__ */ jsx("span", { className: "size-8 shrink-0 overflow-hidden rounded-full [&_img]:size-full [&_img]:object-cover", children: avatar }) : null,
|
|
260
263
|
/* @__PURE__ */ jsxs("span", { className: "flex flex-col", children: [
|
|
261
|
-
/* @__PURE__ */ jsx("span", { className: "font-medium", children: author }),
|
|
264
|
+
/* @__PURE__ */ jsx("span", { className: "font-(--ds-medium-weight)", children: author }),
|
|
262
265
|
role ? /* @__PURE__ */ jsx("span", { className: "opacity-80", children: role }) : null
|
|
263
266
|
] })
|
|
264
267
|
] }) : null
|
package/dist/ui/auth-parts.js
CHANGED
|
@@ -37,7 +37,7 @@ function AuthHeader({
|
|
|
37
37
|
...props,
|
|
38
38
|
children: [
|
|
39
39
|
icon ? /* @__PURE__ */ jsx("div", { className: "mb-2", children: icon }) : null,
|
|
40
|
-
/* @__PURE__ */ jsx("h1", { className: "text-(length:--ds-auth-title-size) leading-tight font-
|
|
40
|
+
/* @__PURE__ */ jsx("h1", { className: "text-(length:--ds-auth-title-size) leading-tight font-(--ds-title-weight) tracking-(--ds-tight-tracking) text-balance", children: title }),
|
|
41
41
|
description ? /* @__PURE__ */ jsx("p", { className: "text-sm text-pretty text-muted-foreground", children: description }) : null
|
|
42
42
|
]
|
|
43
43
|
}
|
|
@@ -95,7 +95,7 @@ function AuthProviders({
|
|
|
95
95
|
children: [
|
|
96
96
|
busy ? /* @__PURE__ */ jsx(Spinner, {}) : p.icon,
|
|
97
97
|
mode === "icons" ? null : /* @__PURE__ */ jsx("span", { className: "truncate", children: p.label }),
|
|
98
|
-
last && mode !== "icons" ? /* @__PURE__ */ jsx("span", { "data-slot": "auth-last-used", className: "absolute -top-2 end-2 rounded-
|
|
98
|
+
last && mode !== "icons" ? /* @__PURE__ */ jsx("span", { "data-slot": "auth-last-used", className: "absolute -top-2 end-2 rounded-(--ds-radius-pill) border border-(--ds-auth-border) bg-(--ds-auth-surface) px-1.5 text-xs leading-4 text-muted-foreground", children: t.authLastUsed }) : null
|
|
99
99
|
]
|
|
100
100
|
},
|
|
101
101
|
p.id
|
|
@@ -115,7 +115,7 @@ function AuthPasskeyButton({
|
|
|
115
115
|
return /* @__PURE__ */ jsxs(Button, { type: "button", variant, "data-slot": "auth-passkey", "data-last-used": lastUsed || void 0, "aria-busy": pending || void 0, className: "relative w-full", ...props, children: [
|
|
116
116
|
pending ? /* @__PURE__ */ jsx(Spinner, {}) : /* @__PURE__ */ jsx(KeyRoundIcon, {}),
|
|
117
117
|
children ?? t.authPasskey,
|
|
118
|
-
lastUsed ? /* @__PURE__ */ jsx("span", { "data-slot": "auth-last-used", className: "absolute -top-2 end-2 rounded-
|
|
118
|
+
lastUsed ? /* @__PURE__ */ jsx("span", { "data-slot": "auth-last-used", className: "absolute -top-2 end-2 rounded-(--ds-radius-pill) border border-(--ds-auth-border) bg-(--ds-auth-surface) px-1.5 text-xs leading-4 text-muted-foreground", children: t.authLastUsed }) : null
|
|
119
119
|
] });
|
|
120
120
|
}
|
|
121
121
|
function AuthError({ error, className, ...props }) {
|
|
@@ -142,7 +142,7 @@ function AuthError({ error, className, ...props }) {
|
|
|
142
142
|
);
|
|
143
143
|
}
|
|
144
144
|
function AuthAnchor({ to, className, children, ...props }) {
|
|
145
|
-
const cls = cn("font-medium text-link underline-offset-4 outline-none hover:underline focus-visible:underline focus-visible:ring-(length:--ds-ring-width) focus-visible:ring-(--ds-ring-color) rounded-xs", className);
|
|
145
|
+
const cls = cn("font-(--ds-medium-weight) text-link underline-offset-4 outline-none hover:underline focus-visible:underline focus-visible:ring-(length:--ds-ring-width) focus-visible:ring-(--ds-ring-color) rounded-xs", className);
|
|
146
146
|
if (typeof to === "string") {
|
|
147
147
|
return /* @__PURE__ */ jsx("a", { "data-slot": "auth-anchor", href: to, className: cls, ...props, children });
|
|
148
148
|
}
|
package/dist/ui/avatar.js
CHANGED
|
@@ -63,7 +63,7 @@ function AvatarBadge({ className, ...props }) {
|
|
|
63
63
|
{
|
|
64
64
|
"data-slot": "avatar-badge",
|
|
65
65
|
className: cn(
|
|
66
|
-
"absolute
|
|
66
|
+
"absolute end-0 bottom-0 z-(--ds-z-raised) inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-(length:--ds-avatar-ring-w) ring-background select-none",
|
|
67
67
|
"group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
|
|
68
68
|
"group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
|
|
69
69
|
"group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
|
package/dist/ui/ayuda.js
CHANGED
|
@@ -17,7 +17,7 @@ function Ayuda({ children, etiqueta }) {
|
|
|
17
17
|
children: /* @__PURE__ */ jsx(CircleHelpIcon, { "aria-hidden": "true", className: "size-3.5" })
|
|
18
18
|
}
|
|
19
19
|
),
|
|
20
|
-
/* @__PURE__ */ jsx(PopoverContent, { "data-slot": "help-content", className: "w-72 text-sm font-normal", side: "top", children })
|
|
20
|
+
/* @__PURE__ */ jsx(PopoverContent, { "data-slot": "help-content", className: "w-72 text-sm font-(--ds-normal-weight)", side: "top", children })
|
|
21
21
|
] });
|
|
22
22
|
}
|
|
23
23
|
export {
|
package/dist/ui/badge.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
import { cn } from "../lib/utils.js";
|
|
5
5
|
const badgeVariants = cva(
|
|
6
|
-
"group/badge inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-badge border border-transparent px-(--ds-badge-px) py-(--ds-badge-py) text-xs font-(--ds-badge-weight) whitespace-nowrap transition-all duration-(--ds-motion-snap) focus-visible:border-ring focus-visible:ring-(length:--ds-ring-width) focus-visible:ring-(--ds-ring-color) has-data-[icon=inline-end]:
|
|
6
|
+
"group/badge inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-badge border border-transparent px-(--ds-badge-px) py-(--ds-badge-py) text-xs font-(--ds-badge-weight) whitespace-nowrap transition-all duration-(--ds-motion-snap) focus-visible:border-ring focus-visible:ring-(length:--ds-ring-width) focus-visible:ring-(--ds-ring-color) has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 aria-invalid:border-(--ds-invalid-border) aria-invalid:ring-(--ds-invalid-ring) [&>svg]:pointer-events-none [&>svg]:size-3!",
|
|
7
7
|
{
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
package/dist/ui/banner.js
CHANGED
|
@@ -73,7 +73,7 @@ function BannerActions({ className, ...props }) {
|
|
|
73
73
|
"div",
|
|
74
74
|
{
|
|
75
75
|
"data-slot": "banner-actions",
|
|
76
|
-
className: cn("
|
|
76
|
+
className: cn("ms-auto flex shrink-0 items-center gap-2", className),
|
|
77
77
|
...props
|
|
78
78
|
}
|
|
79
79
|
);
|
package/dist/ui/bottom-nav.js
CHANGED
|
@@ -81,7 +81,7 @@ function BottomNavBadge({ className, ...props }) {
|
|
|
81
81
|
{
|
|
82
82
|
"data-slot": "bottom-nav-badge",
|
|
83
83
|
className: cn(
|
|
84
|
-
"absolute -top-1 -end-1 flex min-w-2.5 h-2.5 items-center justify-center rounded-
|
|
84
|
+
"absolute -top-1 -end-1 flex min-w-2.5 h-2.5 items-center justify-center rounded-(--ds-radius-pill) bg-destructive px-1 text-(length:--ds-bottom-nav-label) leading-none font-(--ds-strong-weight) text-destructive-foreground not-empty:h-4 not-empty:min-w-4 ring-(length:--ds-avatar-ring-w) ring-(--ds-bottom-nav-bg)",
|
|
85
85
|
className
|
|
86
86
|
),
|
|
87
87
|
...props
|
package/dist/ui/breadcrumb.js
CHANGED
|
@@ -67,7 +67,7 @@ function BreadcrumbPage({ className, ...props }) {
|
|
|
67
67
|
role: "link",
|
|
68
68
|
"aria-disabled": "true",
|
|
69
69
|
"aria-current": "page",
|
|
70
|
-
className: cn("font-normal text-foreground", className),
|
|
70
|
+
className: cn("font-(--ds-normal-weight) text-foreground", className),
|
|
71
71
|
...props
|
|
72
72
|
}
|
|
73
73
|
);
|
package/dist/ui/bubble.js
CHANGED
|
@@ -59,7 +59,7 @@ function BubbleContent({
|
|
|
59
59
|
props: mergeProps(
|
|
60
60
|
{
|
|
61
61
|
className: cn(
|
|
62
|
-
"w-fit max-w-full min-w-0 overflow-hidden rounded-bubble border border-transparent px-(--ds-bubble-px) py-(--ds-bubble-py) text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-
|
|
62
|
+
"w-fit max-w-full min-w-0 overflow-hidden rounded-bubble border border-transparent px-(--ds-bubble-px) py-(--ds-bubble-py) text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-start [button,a]:transition-colors [button,a]:duration-(--ds-motion-snap) [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-(length:--ds-ring-width) [button,a]:focus-visible:ring-(--ds-ring-color)",
|
|
63
63
|
className
|
|
64
64
|
)
|
|
65
65
|
},
|
|
@@ -80,8 +80,8 @@ const bubbleReactionsVariants = cva(
|
|
|
80
80
|
bottom: "bottom-0 translate-y-3/4"
|
|
81
81
|
},
|
|
82
82
|
align: {
|
|
83
|
-
start: "
|
|
84
|
-
end: "
|
|
83
|
+
start: "start-3",
|
|
84
|
+
end: "end-3"
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
87
|
defaultVariants: {
|
package/dist/ui/button-group.js
CHANGED
|
@@ -9,7 +9,7 @@ const buttonGroupVariants = cva(
|
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
orientation: {
|
|
12
|
-
horizontal: "[&>[data-slot]:has(~[data-slot])]:rounded-
|
|
12
|
+
horizontal: "[&>[data-slot]:has(~[data-slot])]:rounded-e-none [&>[data-slot]~[data-slot]]:rounded-s-none [&>[data-slot]~[data-slot]]:border-s-0",
|
|
13
13
|
vertical: "flex-col [&>[data-slot]:has(~[data-slot])]:rounded-b-none [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0"
|
|
14
14
|
}
|
|
15
15
|
},
|
package/dist/ui/button.js
CHANGED
|
@@ -16,10 +16,10 @@ const buttonVariants = cva(
|
|
|
16
16
|
link: "text-primary underline-offset-4 hover:underline disabled:bg-[color:var(--ds-button-disabled-bg,transparent)] disabled:text-[color:var(--ds-button-disabled-fg,var(--primary))]"
|
|
17
17
|
},
|
|
18
18
|
size: {
|
|
19
|
-
default: "h-(--ds-control-h-md) gap-1.5 px-(--ds-button-px-md) has-data-[icon=inline-end]:
|
|
20
|
-
xs: "h-(--ds-control-h-xs) gap-1 px-2.5 text-xs has-data-[icon=inline-end]:
|
|
21
|
-
sm: "h-(--ds-control-h-sm) gap-1 px-(--ds-button-px-sm) has-data-[icon=inline-end]:
|
|
22
|
-
lg: "h-(--ds-control-h-lg) gap-1.5 px-(--ds-button-px-lg) has-data-[icon=inline-end]:
|
|
19
|
+
default: "h-(--ds-control-h-md) gap-1.5 px-(--ds-button-px-md) has-data-[icon=inline-end]:pe-2.5 has-data-[icon=inline-start]:ps-2.5",
|
|
20
|
+
xs: "h-(--ds-control-h-xs) gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2 [&_svg:not([class*='size-'])]:size-3",
|
|
21
|
+
sm: "h-(--ds-control-h-sm) gap-1 px-(--ds-button-px-sm) has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",
|
|
22
|
+
lg: "h-(--ds-control-h-lg) gap-1.5 px-(--ds-button-px-lg) has-data-[icon=inline-end]:pe-3 has-data-[icon=inline-start]:ps-3",
|
|
23
23
|
icon: "size-(--ds-control-h-md) rounded-button-icon",
|
|
24
24
|
"icon-xs": "size-(--ds-control-h-xs) rounded-button-icon [&_svg:not([class*='size-'])]:size-3",
|
|
25
25
|
"icon-sm": "size-(--ds-control-h-sm) rounded-button-icon",
|
package/dist/ui/calendar.js
CHANGED
|
@@ -84,7 +84,7 @@ function Calendar({
|
|
|
84
84
|
month_grid: cn("w-full border-collapse", defaultClassNames.month_grid),
|
|
85
85
|
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
86
86
|
weekday: cn(
|
|
87
|
-
"flex-1 rounded-(--cell-radius) text-xs font-normal text-muted-foreground select-none",
|
|
87
|
+
"flex-1 rounded-(--cell-radius) text-xs font-(--ds-normal-weight) text-muted-foreground select-none",
|
|
88
88
|
defaultClassNames.weekday
|
|
89
89
|
),
|
|
90
90
|
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
@@ -97,17 +97,17 @@ function Calendar({
|
|
|
97
97
|
defaultClassNames.week_number
|
|
98
98
|
),
|
|
99
99
|
day: cn(
|
|
100
|
-
"group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-
|
|
101
|
-
props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-
|
|
100
|
+
"group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-e-(--cell-radius)",
|
|
101
|
+
props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-s-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-s-(--cell-radius)",
|
|
102
102
|
defaultClassNames.day
|
|
103
103
|
),
|
|
104
104
|
range_start: cn(
|
|
105
|
-
"relative isolate z-0 rounded-
|
|
105
|
+
"relative isolate z-0 rounded-s-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:end-0 after:w-4 after:bg-muted",
|
|
106
106
|
defaultClassNames.range_start
|
|
107
107
|
),
|
|
108
108
|
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
109
109
|
range_end: cn(
|
|
110
|
-
"relative isolate z-0 rounded-
|
|
110
|
+
"relative isolate z-0 rounded-e-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:start-0 after:w-4 after:bg-muted",
|
|
111
111
|
defaultClassNames.range_end
|
|
112
112
|
),
|
|
113
113
|
today: cn(
|
|
@@ -207,7 +207,7 @@ function CalendarDayButton({
|
|
|
207
207
|
"data-range-end": modifiers.range_end,
|
|
208
208
|
"data-range-middle": modifiers.range_middle,
|
|
209
209
|
className: cn(
|
|
210
|
-
"relative isolate z-(--ds-z-raised) flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-(--ds-z-raised) group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-(length:--ds-ring-width) group-data-[focused=true]/day:ring-(--ds-ring-color) data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-
|
|
210
|
+
"relative isolate z-(--ds-z-raised) flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-(--ds-normal-weight) group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-(--ds-z-raised) group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-(length:--ds-ring-width) group-data-[focused=true]/day:ring-(--ds-ring-color) data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-e-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-s-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70",
|
|
211
211
|
defaultClassNames.day,
|
|
212
212
|
className
|
|
213
213
|
),
|
package/dist/ui/carousel.js
CHANGED
|
@@ -111,7 +111,7 @@ function CarouselContent({ className, ...props }) {
|
|
|
111
111
|
{
|
|
112
112
|
className: cn(
|
|
113
113
|
"flex",
|
|
114
|
-
orientation === "horizontal" ? "-
|
|
114
|
+
orientation === "horizontal" ? "-ms-(--ds-carousel-gap)" : "-mt-(--ds-carousel-gap) flex-col",
|
|
115
115
|
className
|
|
116
116
|
),
|
|
117
117
|
...props
|
|
@@ -131,7 +131,7 @@ function CarouselItem({ className, ...props }) {
|
|
|
131
131
|
"data-slot": "carousel-item",
|
|
132
132
|
className: cn(
|
|
133
133
|
"min-w-0 shrink-0 grow-0 basis-full",
|
|
134
|
-
orientation === "horizontal" ? "
|
|
134
|
+
orientation === "horizontal" ? "ps-(--ds-carousel-gap)" : "pt-(--ds-carousel-gap)",
|
|
135
135
|
className
|
|
136
136
|
),
|
|
137
137
|
...props
|
|
@@ -154,7 +154,7 @@ function CarouselPrevious({
|
|
|
154
154
|
size,
|
|
155
155
|
className: cn(
|
|
156
156
|
"absolute touch-manipulation rounded-(--ds-radius-pill)",
|
|
157
|
-
orientation === "horizontal" ? "inset-y-0 -
|
|
157
|
+
orientation === "horizontal" ? "inset-y-0 -start-12 my-auto" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
158
158
|
className
|
|
159
159
|
),
|
|
160
160
|
disabled: !canScrollPrev,
|
|
@@ -183,7 +183,7 @@ function CarouselNext({
|
|
|
183
183
|
size,
|
|
184
184
|
className: cn(
|
|
185
185
|
"absolute touch-manipulation rounded-(--ds-radius-pill)",
|
|
186
|
-
orientation === "horizontal" ? "inset-y-0 -
|
|
186
|
+
orientation === "horizontal" ? "inset-y-0 -end-12 my-auto" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
187
187
|
className
|
|
188
188
|
),
|
|
189
189
|
disabled: !canScrollNext,
|
package/dist/ui/choice-card.js
CHANGED
|
@@ -67,7 +67,7 @@ function ChoiceCardDescription({ className, ...props }) {
|
|
|
67
67
|
"span",
|
|
68
68
|
{
|
|
69
69
|
"data-slot": "choice-card-description",
|
|
70
|
-
className: cn("text-xs font-normal text-muted-foreground group-data-disabled/choice-card:text-current", className),
|
|
70
|
+
className: cn("text-xs font-(--ds-normal-weight) text-muted-foreground group-data-disabled/choice-card:text-current", className),
|
|
71
71
|
...props
|
|
72
72
|
}
|
|
73
73
|
);
|
package/dist/ui/combobox.js
CHANGED
|
@@ -130,7 +130,7 @@ function ComboboxItem({
|
|
|
130
130
|
{
|
|
131
131
|
"data-slot": "combobox-item",
|
|
132
132
|
className: cn(
|
|
133
|
-
"relative flex w-full cursor-default items-center gap-2.5 rounded-item py-(--ds-menu-item-py)
|
|
133
|
+
"relative flex w-full cursor-default items-center gap-2.5 rounded-item py-(--ds-menu-item-py) pe-8 ps-(--ds-menu-item-px) text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-(--ds-disabled-opacity) [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
134
134
|
className
|
|
135
135
|
),
|
|
136
136
|
...props,
|
|
@@ -139,7 +139,7 @@ function ComboboxItem({
|
|
|
139
139
|
/* @__PURE__ */ jsx(
|
|
140
140
|
ComboboxPrimitive.ItemIndicator,
|
|
141
141
|
{
|
|
142
|
-
render: /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute
|
|
142
|
+
render: /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute end-2 flex size-4 items-center justify-center" }),
|
|
143
143
|
children: /* @__PURE__ */ jsx(CheckIcon, { className: "pointer-events-none" })
|
|
144
144
|
}
|
|
145
145
|
)
|
|
@@ -226,7 +226,7 @@ function ComboboxChip({
|
|
|
226
226
|
{
|
|
227
227
|
"data-slot": "combobox-chip",
|
|
228
228
|
className: cn(
|
|
229
|
-
"flex h-(--ds-chip-h) w-fit items-center justify-center gap-1 rounded-control bg-muted-foreground/10 px-2 text-xs font-(--ds-medium-weight) whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-(--ds-disabled-opacity) has-data-[slot=combobox-chip-remove]:
|
|
229
|
+
"flex h-(--ds-chip-h) w-fit items-center justify-center gap-1 rounded-control bg-muted-foreground/10 px-2 text-xs font-(--ds-medium-weight) whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-(--ds-disabled-opacity) has-data-[slot=combobox-chip-remove]:pe-0",
|
|
230
230
|
className
|
|
231
231
|
),
|
|
232
232
|
...props,
|
|
@@ -236,7 +236,7 @@ function ComboboxChip({
|
|
|
236
236
|
ComboboxPrimitive.ChipRemove,
|
|
237
237
|
{
|
|
238
238
|
render: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon-xs" }),
|
|
239
|
-
className: "-
|
|
239
|
+
className: "-ms-1 opacity-50 hover:opacity-100",
|
|
240
240
|
"data-slot": "combobox-chip-remove",
|
|
241
241
|
children: /* @__PURE__ */ jsx(XIcon, { className: "pointer-events-none" })
|
|
242
242
|
}
|
package/dist/ui/command.js
CHANGED
|
@@ -151,7 +151,7 @@ function CommandItem({
|
|
|
151
151
|
...props,
|
|
152
152
|
children: [
|
|
153
153
|
children,
|
|
154
|
-
/* @__PURE__ */ jsx(CheckIcon, { className: "
|
|
154
|
+
/* @__PURE__ */ jsx(CheckIcon, { className: "ms-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })
|
|
155
155
|
]
|
|
156
156
|
}
|
|
157
157
|
);
|
|
@@ -165,7 +165,7 @@ function CommandShortcut({
|
|
|
165
165
|
{
|
|
166
166
|
"data-slot": "command-shortcut",
|
|
167
167
|
className: cn(
|
|
168
|
-
"
|
|
168
|
+
"ms-auto text-xs tracking-(--ds-widest-tracking) text-muted-foreground group-data-[selected=true]/command-item:text-foreground",
|
|
169
169
|
className
|
|
170
170
|
),
|
|
171
171
|
...props
|
package/dist/ui/content-card.js
CHANGED
|
@@ -98,8 +98,8 @@ function ContentCard({
|
|
|
98
98
|
action ? /* @__PURE__ */ jsx(CardAction, { className: "relative z-(--ds-z-raised)", children: action }) : null
|
|
99
99
|
] }),
|
|
100
100
|
preset === "metric" && value != null ? /* @__PURE__ */ jsxs(CardContent, { "data-slot": "content-card-value", className: "flex items-baseline gap-2", children: [
|
|
101
|
-
/* @__PURE__ */ jsx("span", { className: "text-3xl font-(--ds-stat-value-weight) tracking-tight tabular-nums", children: value }),
|
|
102
|
-
delta ? /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-muted-foreground tabular-nums", children: delta }) : null
|
|
101
|
+
/* @__PURE__ */ jsx("span", { className: "text-3xl font-(--ds-stat-value-weight) tracking-(--ds-tight-tracking) tabular-nums", children: value }),
|
|
102
|
+
delta ? /* @__PURE__ */ jsx("span", { className: "text-sm font-(--ds-medium-weight) text-muted-foreground tabular-nums", children: delta }) : null
|
|
103
103
|
] }) : null,
|
|
104
104
|
children ? /* @__PURE__ */ jsx(CardContent, { children }) : null,
|
|
105
105
|
footer ? /* @__PURE__ */ jsx(CardFooter, { className: "relative z-(--ds-z-raised) gap-2", children: footer }) : null
|
package/dist/ui/context-menu.js
CHANGED
|
@@ -63,7 +63,7 @@ function ContextMenuLabel({
|
|
|
63
63
|
"data-slot": "context-menu-label",
|
|
64
64
|
"data-inset": inset,
|
|
65
65
|
className: cn(
|
|
66
|
-
"px-(--ds-menu-item-px) py-(--ds-menu-item-py) text-xs text-muted-foreground data-inset:
|
|
66
|
+
"px-(--ds-menu-item-px) py-(--ds-menu-item-py) text-xs text-muted-foreground data-inset:ps-9.5",
|
|
67
67
|
className
|
|
68
68
|
),
|
|
69
69
|
...props
|
|
@@ -83,7 +83,7 @@ function ContextMenuItem({
|
|
|
83
83
|
"data-inset": inset,
|
|
84
84
|
"data-variant": variant,
|
|
85
85
|
className: cn(
|
|
86
|
-
"group/context-menu-item relative flex cursor-default items-center gap-2.5 rounded-item px-(--ds-menu-item-px) py-(--ds-menu-item-py) text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-inset:
|
|
86
|
+
"group/context-menu-item relative flex cursor-default items-center gap-2.5 rounded-item px-(--ds-menu-item-px) py-(--ds-menu-item-py) text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-inset:ps-9.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 data-[variant=destructive]:data-highlighted:text-destructive dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-(--ds-disabled-opacity) [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-highlighted:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive",
|
|
87
87
|
className
|
|
88
88
|
),
|
|
89
89
|
...props
|
|
@@ -105,13 +105,13 @@ function ContextMenuSubTrigger({
|
|
|
105
105
|
"data-slot": "context-menu-sub-trigger",
|
|
106
106
|
"data-inset": inset,
|
|
107
107
|
className: cn(
|
|
108
|
-
"flex cursor-default items-center rounded-item px-(--ds-menu-item-px) py-(--ds-menu-item-py) text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-inset:
|
|
108
|
+
"flex cursor-default items-center rounded-item px-(--ds-menu-item-px) py-(--ds-menu-item-py) text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-inset:ps-9.5 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
109
109
|
className
|
|
110
110
|
),
|
|
111
111
|
...props,
|
|
112
112
|
children: [
|
|
113
113
|
children,
|
|
114
|
-
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "
|
|
114
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ms-auto" })
|
|
115
115
|
]
|
|
116
116
|
}
|
|
117
117
|
);
|
|
@@ -142,13 +142,13 @@ function ContextMenuCheckboxItem({
|
|
|
142
142
|
"data-slot": "context-menu-checkbox-item",
|
|
143
143
|
"data-inset": inset,
|
|
144
144
|
className: cn(
|
|
145
|
-
"relative flex cursor-default items-center gap-2 rounded-item py-(--ds-menu-item-py)
|
|
145
|
+
"relative flex cursor-default items-center gap-2 rounded-item py-(--ds-menu-item-py) pe-8 ps-(--ds-menu-item-px) text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-inset:ps-9.5 data-disabled:pointer-events-none data-disabled:opacity-(--ds-disabled-opacity) [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
146
146
|
className
|
|
147
147
|
),
|
|
148
148
|
checked,
|
|
149
149
|
...props,
|
|
150
150
|
children: [
|
|
151
|
-
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute
|
|
151
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute end-2", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
152
152
|
CheckIcon,
|
|
153
153
|
{}
|
|
154
154
|
) }) }),
|
|
@@ -180,12 +180,12 @@ function ContextMenuRadioItem({
|
|
|
180
180
|
"data-slot": "context-menu-radio-item",
|
|
181
181
|
"data-inset": inset,
|
|
182
182
|
className: cn(
|
|
183
|
-
"relative flex cursor-default items-center gap-2 rounded-item py-(--ds-menu-item-py)
|
|
183
|
+
"relative flex cursor-default items-center gap-2 rounded-item py-(--ds-menu-item-py) pe-8 ps-(--ds-menu-item-px) text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-inset:ps-9.5 data-disabled:pointer-events-none data-disabled:opacity-(--ds-disabled-opacity) [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
184
184
|
className
|
|
185
185
|
),
|
|
186
186
|
...props,
|
|
187
187
|
children: [
|
|
188
|
-
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute
|
|
188
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute end-2", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.RadioItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
189
189
|
CheckIcon,
|
|
190
190
|
{}
|
|
191
191
|
) }) }),
|
|
@@ -216,7 +216,7 @@ function ContextMenuShortcut({
|
|
|
216
216
|
{
|
|
217
217
|
"data-slot": "context-menu-shortcut",
|
|
218
218
|
className: cn(
|
|
219
|
-
"
|
|
219
|
+
"ms-auto text-xs tracking-(--ds-widest-tracking) text-muted-foreground group-focus/context-menu-item:text-accent-foreground",
|
|
220
220
|
className
|
|
221
221
|
),
|
|
222
222
|
...props
|
package/dist/ui/data-table.d.ts
CHANGED
|
@@ -146,9 +146,9 @@ declare function DataTableBarCell({ value, max, format, tone, className, }: {
|
|
|
146
146
|
tone?: DsDataTone;
|
|
147
147
|
className?: string;
|
|
148
148
|
}): React.JSX.Element;
|
|
149
|
-
type DataTablePreset = "browse" | "manage" | "compact";
|
|
149
|
+
type DataTablePreset = "browse" | "manage" | "compact" | "grouped" | "tree";
|
|
150
150
|
interface DataTableProps<TData extends object> {
|
|
151
|
-
/** Intención: `browse` (consultar), `manage` (seleccionar y actuar)
|
|
151
|
+
/** Intención: `browse` (consultar), `manage` (seleccionar y actuar), `compact` (denso), `grouped` (con `groupBy`) o `tree` (con `getSubRows`). Solo fija valores por defecto. */
|
|
152
152
|
preset?: DataTablePreset;
|
|
153
153
|
columns: DataTableColumn<TData>[];
|
|
154
154
|
data: TData[];
|
|
@@ -179,10 +179,20 @@ interface DataTableProps<TData extends object> {
|
|
|
179
179
|
/** Acciones al final de cada fila (botón, menú…). */
|
|
180
180
|
rowActions?: (row: TData) => React.ReactNode;
|
|
181
181
|
density?: "comfortable" | "compact";
|
|
182
|
+
/** Agrupa las filas de cada página por esta clave; cada grupo lleva una cabecera plegable con su recuento. */
|
|
183
|
+
groupBy?: (row: TData) => string;
|
|
184
|
+
/** Contenido de la cabecera de grupo (por defecto, la clave y el recuento). */
|
|
185
|
+
groupLabel?: (key: string, count: number) => React.ReactNode;
|
|
186
|
+
/** Claves de grupo plegadas al principio. */
|
|
187
|
+
defaultCollapsedGroups?: readonly string[];
|
|
188
|
+
/** Hijos de una fila: activa la jerarquía (sangría y botón de expandir en la primera columna). */
|
|
189
|
+
getSubRows?: (row: TData) => readonly TData[] | undefined;
|
|
190
|
+
/** Ids de fila expandidos al principio (con `getSubRows`). */
|
|
191
|
+
defaultExpandedRows?: readonly string[];
|
|
182
192
|
/** Nombre accesible de la tabla. */
|
|
183
193
|
"aria-label"?: string;
|
|
184
194
|
className?: string;
|
|
185
195
|
}
|
|
186
|
-
declare function DataTable<TData extends object>({ columns, data, getRowId, state: controlled, onStateChange, defaultState, preset, searchable, selectable, columnToggle, pageSizes, loading, empty, onRowClick, toolbar, rowActions, density, "aria-label": ariaLabel, className, }: DataTableProps<TData>): React.JSX.Element;
|
|
196
|
+
declare function DataTable<TData extends object>({ columns, data, getRowId, state: controlled, onStateChange, defaultState, preset, searchable, selectable, columnToggle, pageSizes, loading, empty, onRowClick, toolbar, rowActions, density, groupBy, groupLabel, defaultCollapsedGroups, getSubRows, defaultExpandedRows, "aria-label": ariaLabel, className, }: DataTableProps<TData>): React.JSX.Element;
|
|
187
197
|
|
|
188
198
|
export { DATA_TABLE_PAGE_SIZES, DataTable, DataTableBarCell, type DataTableColumn, type DataTableColumnMeta, type DataTableFeatures, type DataTableFilterOption, DataTableNumber, type DataTablePreset, type DataTableProps, type DataTableSearch, type DataTableState, createDataTableColumnHelper, dataTableFeatures, dataTableStateFromSearch, dataTableStateToSearch, validateDataTableSearch };
|