@jinaan/uikit 0.0.0-stage → 0.1.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.
Files changed (89) hide show
  1. package/README.md +63 -2
  2. package/dist/agent-prompt.d.ts +16 -0
  3. package/dist/agent-prompt.d.ts.map +1 -0
  4. package/dist/avatar.d.ts +5 -0
  5. package/dist/avatar.d.ts.map +1 -0
  6. package/dist/badge.d.ts +11 -0
  7. package/dist/badge.d.ts.map +1 -0
  8. package/dist/button.d.ts +22 -0
  9. package/dist/button.d.ts.map +1 -0
  10. package/dist/callout.d.ts +12 -0
  11. package/dist/callout.d.ts.map +1 -0
  12. package/dist/card.d.ts +8 -0
  13. package/dist/card.d.ts.map +1 -0
  14. package/dist/checkbox.d.ts +3 -0
  15. package/dist/checkbox.d.ts.map +1 -0
  16. package/dist/choice-dialog.d.ts +34 -0
  17. package/dist/choice-dialog.d.ts.map +1 -0
  18. package/dist/code-block.d.ts +11 -0
  19. package/dist/code-block.d.ts.map +1 -0
  20. package/dist/data-table.d.ts +84 -0
  21. package/dist/data-table.d.ts.map +1 -0
  22. package/dist/dialog.d.ts +19 -0
  23. package/dist/dialog.d.ts.map +1 -0
  24. package/dist/dropdown-menu.d.ts +13 -0
  25. package/dist/dropdown-menu.d.ts.map +1 -0
  26. package/dist/empty-state.d.ts +11 -0
  27. package/dist/empty-state.d.ts.map +1 -0
  28. package/dist/index.d.ts +27 -0
  29. package/dist/index.d.ts.map +1 -0
  30. package/dist/index.js +1522 -0
  31. package/dist/index.js.map +1 -0
  32. package/dist/input.d.ts +19 -0
  33. package/dist/input.d.ts.map +1 -0
  34. package/dist/kbd.d.ts +4 -0
  35. package/dist/kbd.d.ts.map +1 -0
  36. package/dist/label.d.ts +3 -0
  37. package/dist/label.d.ts.map +1 -0
  38. package/dist/radio-group.d.ts +35 -0
  39. package/dist/radio-group.d.ts.map +1 -0
  40. package/dist/segmented.d.ts +22 -0
  41. package/dist/segmented.d.ts.map +1 -0
  42. package/dist/select.d.ts +9 -0
  43. package/dist/select.d.ts.map +1 -0
  44. package/dist/separator.d.ts +3 -0
  45. package/dist/separator.d.ts.map +1 -0
  46. package/dist/skeleton.d.ts +3 -0
  47. package/dist/skeleton.d.ts.map +1 -0
  48. package/dist/spinner.d.ts +4 -0
  49. package/dist/spinner.d.ts.map +1 -0
  50. package/dist/table-empty-state.d.ts +15 -0
  51. package/dist/table-empty-state.d.ts.map +1 -0
  52. package/dist/table-surface.d.ts +38 -0
  53. package/dist/table-surface.d.ts.map +1 -0
  54. package/dist/table.d.ts +15 -0
  55. package/dist/table.d.ts.map +1 -0
  56. package/dist/tooltip.d.ts +6 -0
  57. package/dist/tooltip.d.ts.map +1 -0
  58. package/dist/utils.d.ts +4 -0
  59. package/dist/utils.d.ts.map +1 -0
  60. package/package.json +73 -4
  61. package/src/agent-prompt.tsx +60 -0
  62. package/src/avatar.tsx +46 -0
  63. package/src/badge.tsx +54 -0
  64. package/src/button.tsx +126 -0
  65. package/src/callout.tsx +74 -0
  66. package/src/card.tsx +61 -0
  67. package/src/checkbox.tsx +32 -0
  68. package/src/choice-dialog.tsx +110 -0
  69. package/src/code-block.tsx +53 -0
  70. package/src/data-table.tsx +589 -0
  71. package/src/dialog.tsx +123 -0
  72. package/src/dropdown-menu.tsx +103 -0
  73. package/src/empty-state.tsx +35 -0
  74. package/src/index.ts +26 -0
  75. package/src/input.tsx +171 -0
  76. package/src/kbd.tsx +16 -0
  77. package/src/label.tsx +19 -0
  78. package/src/radio-group.tsx +134 -0
  79. package/src/segmented.tsx +76 -0
  80. package/src/select.tsx +91 -0
  81. package/src/separator.tsx +22 -0
  82. package/src/skeleton.tsx +12 -0
  83. package/src/spinner.tsx +13 -0
  84. package/src/table-empty-state.tsx +51 -0
  85. package/src/table-surface.tsx +122 -0
  86. package/src/table.tsx +91 -0
  87. package/src/tooltip.tsx +32 -0
  88. package/src/utils.ts +7 -0
  89. package/styles.css +371 -0
package/README.md CHANGED
@@ -1,3 +1,64 @@
1
- # Temporary Holding Version
1
+ # @jinaan/uikit
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Reusable React 19 + Tailwind CSS v4 components used by Clerk and other Jinaan
4
+ projects.
5
+
6
+ ## Requirements
7
+
8
+ - React 18+
9
+ - Tailwind CSS 4+
10
+ - pnpm (development)
11
+
12
+ ## Install
13
+
14
+ ```sh
15
+ pnpm add @jinaan/uikit
16
+ ```
17
+
18
+ ## Styles
19
+
20
+ Import Tailwind first, then the design system. The package ships its own token
21
+ palette, dark theme, component classes, and Tailwind source directive.
22
+
23
+ ```css
24
+ @import "tailwindcss";
25
+ @import "@jinaan/uikit/styles.css";
26
+ ```
27
+
28
+ The host app still owns its reset/preflight, fonts, and body styles. Toggle dark
29
+ mode by adding or removing `class="dark"` on `<html>`.
30
+
31
+ ## Use
32
+
33
+ ```tsx
34
+ import { Button, Card, DataTable, Input } from "@jinaan/uikit";
35
+ ```
36
+
37
+ All primitives and `DataTable` are exported from the package root. Component
38
+ styles reference semantic tokens such as `bg-surface`, `text-fg`, and
39
+ `border-line`; override tokens on `:root` / `.dark` to theme.
40
+
41
+ ## Live preview
42
+
43
+ ```sh
44
+ pnpm install
45
+ pnpm dev
46
+ ```
47
+
48
+ Open `http://localhost:5174/ui-kit` (or `/ui-kit?theme=light|dark`).
49
+
50
+ ## Verify
51
+
52
+ ```sh
53
+ pnpm typecheck
54
+ pnpm test
55
+ pnpm audit:theme
56
+ pnpm build
57
+ ```
58
+
59
+ ## Publish
60
+
61
+ ```sh
62
+ pnpm build
63
+ npm publish --access public
64
+ ```
@@ -0,0 +1,16 @@
1
+ import { type ReactNode } from "react";
2
+ interface AgentPromptProps {
3
+ /** Command or prompt text; copy copies this verbatim. */
4
+ command: string;
5
+ /** Overlapping dark tag above the pill. */
6
+ tag?: ReactNode;
7
+ icon?: ReactNode;
8
+ className?: string;
9
+ }
10
+ /**
11
+ * The "Add Clerk auth to my app" prompt pill: a dark tag overlapping a
12
+ * rounded command field with a copy button.
13
+ */
14
+ export declare function AgentPrompt({ command, tag, icon, className, }: AgentPromptProps): import("react").JSX.Element;
15
+ export {};
16
+ //# sourceMappingURL=agent-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-prompt.d.ts","sourceRoot":"","sources":["../src/agent-prompt.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKjD,UAAU,gBAAgB;IACxB,yDAAyD;IACzD,OAAO,EAAE,MAAM,CAAC;IAChB,2CAA2C;IAC3C,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,GAAyB,EACzB,IAAI,EACJ,SAAS,GACV,EAAE,gBAAgB,+BAmClB"}
@@ -0,0 +1,5 @@
1
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
2
+ export declare const Avatar: import("react").ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
3
+ export declare const AvatarImage: import("react").ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & import("react").RefAttributes<HTMLImageElement>, "ref"> & import("react").RefAttributes<HTMLImageElement>>;
4
+ export declare const AvatarFallback: import("react").ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
5
+ //# sourceMappingURL=avatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../src/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAK1D,eAAO,MAAM,MAAM,uLAYjB,CAAC;AAGH,eAAO,MAAM,WAAW,8LAStB,CAAC;AAGH,eAAO,MAAM,cAAc,+LAYzB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { type VariantProps } from "class-variance-authority";
2
+ import type { HTMLAttributes } from "react";
3
+ declare const badgeVariants: (props?: ({
4
+ variant?: "primary" | "outline" | "neutral" | "success" | "warning" | "error" | "info" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ export interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
7
+ dot?: boolean;
8
+ }
9
+ export declare function Badge({ className, variant, dot, children, ...props }: BadgeProps): import("react").JSX.Element;
10
+ export { badgeVariants };
11
+ //# sourceMappingURL=badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../src/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,QAAA,MAAM,aAAa;;8EAgBlB,CAAC;AAiBF,MAAM,WAAW,UACf,SAAQ,cAAc,CAAC,eAAe,CAAC,EACrC,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,wBAAgB,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAW,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,+BAOxF;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { type VariantProps } from "class-variance-authority";
2
+ import { type ButtonHTMLAttributes, type ReactNode } from "react";
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "link" | "primary" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
5
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | "icon" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
+ asChild?: boolean;
9
+ /** Optional icon rendered before the label. */
10
+ leadingIcon?: ReactNode;
11
+ /** Optional icon rendered after the label (e.g. a chevron). */
12
+ trailingIcon?: ReactNode;
13
+ /** Square, content-free button. Provide `aria-label`. */
14
+ iconOnly?: boolean;
15
+ /** Show a spinner and block interaction while an action runs. */
16
+ loading?: boolean;
17
+ /** Stretch to the container width. */
18
+ fullWidth?: boolean;
19
+ }
20
+ export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
21
+ export { buttonVariants };
22
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../src/button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAc,KAAK,oBAAoB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAK9E,QAAA,MAAM,cAAc;;;8EA+BnB,CAAC;AAYF,MAAM,WAAW,WACf,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC,EAC7C,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+CAA+C;IAC/C,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,+DAA+D;IAC/D,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iEAAiE;IACjE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sCAAsC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,MAAM,2GAwDlB,CAAC;AAGF,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { ReactNode } from "react";
2
+ type CalloutVariant = "info" | "success" | "warning" | "error";
3
+ interface CalloutProps {
4
+ variant?: CalloutVariant;
5
+ title?: ReactNode;
6
+ children?: ReactNode;
7
+ icon?: ReactNode;
8
+ className?: string;
9
+ }
10
+ export declare function Callout({ variant, title, children, icon, className, }: CalloutProps): import("react").JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=callout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"callout.d.ts","sourceRoot":"","sources":["../src/callout.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,KAAK,cAAc,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AA4B/D,UAAU,YAAY;IACpB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,OAAO,CAAC,EACtB,OAAgB,EAChB,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,SAAS,GACV,EAAE,YAAY,+BAoBd"}
package/dist/card.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ import { type HTMLAttributes } from "react";
2
+ export declare const Card: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
3
+ export declare const CardHeader: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
4
+ export declare const CardTitle: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & import("react").RefAttributes<HTMLHeadingElement>>;
5
+ export declare const CardDescription: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLParagraphElement>>;
6
+ export declare const CardContent: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
7
+ export declare const CardFooter: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
8
+ //# sourceMappingURL=card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../src/card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAIxD,eAAO,MAAM,IAAI,2HAWhB,CAAC;AAGF,eAAO,MAAM,UAAU,2HAQtB,CAAC;AAGF,eAAO,MAAM,SAAS,mIAIrB,CAAC;AAGF,eAAO,MAAM,eAAe,uIAK1B,CAAC;AAGH,eAAO,MAAM,WAAW,2HAIvB,CAAC;AAGF,eAAO,MAAM,UAAU,2HAQtB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
2
+ export declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
3
+ //# sourceMappingURL=checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../src/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAM9D,eAAO,MAAM,QAAQ,+LAwBnB,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { type ReactNode } from "react";
2
+ export interface ChoiceOption {
3
+ value: string;
4
+ title: ReactNode;
5
+ description?: ReactNode;
6
+ badge?: ReactNode;
7
+ }
8
+ export interface ChoiceDialogProps {
9
+ open?: boolean;
10
+ onOpenChange?: (open: boolean) => void;
11
+ /** Optional element that opens the dialog. */
12
+ trigger?: ReactNode;
13
+ /** Dialog heading. */
14
+ title: string;
15
+ /** Selectable options, rendered as radio cards. */
16
+ options: ChoiceOption[];
17
+ /** Initially selected value (uncontrolled). */
18
+ defaultValue?: string;
19
+ /** Selected value (controlled). */
20
+ value?: string;
21
+ onValueChange?: (value: string) => void;
22
+ /** Footer labels. */
23
+ cancelLabel?: string;
24
+ confirmLabel?: string;
25
+ /** Called with the selected value when the confirm button is pressed. */
26
+ onConfirm?: (value: string) => void;
27
+ }
28
+ /**
29
+ * Dialog for picking one option from a small set, styled as the
30
+ * "Create production instance" reference: divided header, radio cards, and a
31
+ * footer with an equal-width secondary Cancel plus primary Continue.
32
+ */
33
+ export declare function ChoiceDialog({ open, onOpenChange, trigger, title, options, defaultValue, value, onValueChange, cancelLabel, confirmLabel, onConfirm, }: ChoiceDialogProps): import("react").JSX.Element;
34
+ //# sourceMappingURL=choice-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"choice-dialog.d.ts","sourceRoot":"","sources":["../src/choice-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAejD,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,8CAA8C;IAC9C,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,sBAAsB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,qBAAqB;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,YAAY,EACZ,OAAO,EACP,KAAK,EACL,OAAO,EACP,YAAY,EACZ,KAAK,EACL,aAAa,EACb,WAAsB,EACtB,YAAyB,EACzB,SAAS,GACV,EAAE,iBAAiB,+BAiDnB"}
@@ -0,0 +1,11 @@
1
+ import { type ReactNode } from "react";
2
+ interface CodeBlockProps {
3
+ code: string;
4
+ /** Short label shown in the header (e.g. a filename or request line). */
5
+ label?: ReactNode;
6
+ language?: string;
7
+ className?: string;
8
+ }
9
+ export declare function CodeBlock({ code, label, className }: CodeBlockProps): import("react").JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=code-block.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-block.d.ts","sourceRoot":"","sources":["../src/code-block.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKjD,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,cAAc,+BAsCnE"}
@@ -0,0 +1,84 @@
1
+ import { type ReactNode } from "react";
2
+ import { type TableSurfaceAction, type TableSurfaceTone } from "./table-surface";
3
+ export interface Column<T> {
4
+ id: string;
5
+ header: string;
6
+ cell: (row: T) => ReactNode;
7
+ sortable?: boolean;
8
+ sortValue?: (row: T) => string | number | null | undefined;
9
+ numeric?: boolean;
10
+ defaultHidden?: boolean;
11
+ align?: "left" | "right";
12
+ className?: string;
13
+ /** Column width for the fixed layout (e.g. "18rem", "20%"). Defaults to auto. */
14
+ width?: string;
15
+ }
16
+ export interface BulkAction<T> {
17
+ label: string;
18
+ icon?: ReactNode;
19
+ variant?: "primary" | "outline" | "destructive";
20
+ onRun: (rows: T[]) => void | Promise<void>;
21
+ disabled?: boolean;
22
+ }
23
+ export interface TabDef {
24
+ id: string;
25
+ label: string;
26
+ }
27
+ export interface DataTableError {
28
+ title: string;
29
+ description?: string;
30
+ action?: ReactNode;
31
+ }
32
+ interface DataTableProps<T> {
33
+ rows: T[];
34
+ columns: Column<T>[];
35
+ getRowId: (row: T) => string;
36
+ loading?: boolean;
37
+ error?: DataTableError | null;
38
+ empty?: {
39
+ icon?: ReactNode;
40
+ title: string;
41
+ description?: ReactNode;
42
+ action?: ReactNode;
43
+ };
44
+ search?: {
45
+ value: string;
46
+ onChange: (value: string) => void;
47
+ placeholder?: string;
48
+ keys: (row: T) => string;
49
+ };
50
+ toolbarStart?: ReactNode;
51
+ toolbarEnd?: ReactNode;
52
+ tabs?: TabDef[];
53
+ activeTab?: string;
54
+ onTabChange?: (id: string) => void;
55
+ infoBanner?: ReactNode;
56
+ selectable?: boolean;
57
+ bulkActions?: BulkAction<T>[];
58
+ rowActions?: (row: T) => ReactNode;
59
+ onRowClick?: (row: T) => void;
60
+ defaultSort?: {
61
+ id: string;
62
+ dir: "asc" | "desc";
63
+ };
64
+ pageSize?: number;
65
+ pageSizeOptions?: number[];
66
+ /** Surface preset for the table card. */
67
+ tone?: TableSurfaceTone;
68
+ /** Optional action pinned to the top-right of the header band. */
69
+ headerAction?: ReactNode | TableSurfaceAction;
70
+ /** Header band color/style overrides. */
71
+ headerClassName?: string;
72
+ /** Inner panel color/style overrides. */
73
+ panelClassName?: string;
74
+ className?: string;
75
+ }
76
+ /** Clerk-style identity cell: avatar + primary name + secondary line. */
77
+ export declare function DataTableIdentity({ name, secondary, image, }: {
78
+ name: string;
79
+ secondary?: ReactNode;
80
+ image?: string;
81
+ }): import("react").JSX.Element;
82
+ export declare function DataTable<T>({ rows, columns, getRowId, loading, error, empty, search, toolbarStart, toolbarEnd, tabs, activeTab, onTabChange, infoBanner, selectable, bulkActions, rowActions, onRowClick, defaultSort, pageSize: initialPageSize, pageSizeOptions, tone, headerAction, headerClassName, panelClassName, className, }: DataTableProps<T>): import("react").JSX.Element;
83
+ export {};
84
+ //# sourceMappingURL=data-table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../src/data-table.tsx"],"names":[],"mappings":"AASA,OAAO,EAAgC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAuBrE,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACtB,MAAM,iBAAiB,CAAC;AAGzB,MAAM,WAAW,MAAM,CAAC,CAAC;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,SAAS,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,SAAS,GA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mC,EACnC,IAAI,EACJ,YAAY,EACZ,eAAe,EACf,cAAc,EACd,SAAS,GACV,EAAE,cAAc,CAAC,CAAC,CAAC,+BAoZnB"}
@@ -0,0 +1,19 @@
1
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
2
+ import { type HTMLAttributes } from "react";
3
+ export declare const Dialog: import("react").FC<DialogPrimitive.DialogProps>;
4
+ export declare const DialogTrigger: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
5
+ export declare const DialogClose: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
6
+ export declare const DialogContent: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
7
+ /**
8
+ * Elevated inner card inside the dialog shell. Flush to the shell's left, top
9
+ * and right edges (the shell clips its top corners); the footer stays below on
10
+ * the shell so the two surfaces read as distinct layers.
11
+ */
12
+ export declare function DialogPanel({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
13
+ /** Scrollable region inside `DialogPanel`; keeps the footer pinned. */
14
+ export declare function DialogBody({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
15
+ export declare function DialogHeader({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
16
+ export declare function DialogFooter({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
17
+ export declare const DialogTitle: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
18
+ export declare const DialogDescription: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
19
+ //# sourceMappingURL=dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../src/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,OAAO,CAAC;AAIf,eAAO,MAAM,MAAM,iDAAuB,CAAC;AAC3C,eAAO,MAAM,aAAa,kIAA0B,CAAC;AACrD,eAAO,MAAM,WAAW,gIAAwB,CAAC;AAEjD,eAAO,MAAM,aAAa,4LA2BxB,CAAC;AAGH;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,cAAc,CAAC,+BAWlF;AAED,uEAAuE;AACvE,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,cAAc,CAAC,+BAQjF;AAED,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,cAAc,CAAC,+BAWnF;AAED,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,cAAc,CAAC,+BAWnF;AAED,eAAO,MAAM,WAAW,kMAStB,CAAC;AAGH,eAAO,MAAM,iBAAiB,4MAS5B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
2
+ export declare const DropdownMenu: import("react").FC<DropdownMenuPrimitive.DropdownMenuProps>;
3
+ export declare const DropdownMenuTrigger: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
4
+ export declare const DropdownMenuGroup: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & import("react").RefAttributes<HTMLDivElement>>;
5
+ export declare const DropdownMenuPortal: import("react").FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
6
+ export declare const DropdownMenuContent: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
7
+ export declare const DropdownMenuItem: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
8
+ inset?: boolean;
9
+ } & import("react").RefAttributes<HTMLDivElement>>;
10
+ export declare const DropdownMenuCheckboxItem: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
11
+ export declare const DropdownMenuLabel: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
12
+ export declare const DropdownMenuSeparator: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
13
+ //# sourceMappingURL=dropdown-menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../src/dropdown-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AAUvE,eAAO,MAAM,YAAY,6DAA6B,CAAC;AACvD,eAAO,MAAM,mBAAmB,8IAAgC,CAAC;AACjE,eAAO,MAAM,iBAAiB,yIAA8B,CAAC;AAC7D,eAAO,MAAM,kBAAkB,mEAA+B,CAAC;AAE/D,eAAO,MAAM,mBAAmB,wMAqB9B,CAAC;AAGH,eAAO,MAAM,gBAAgB;YAE6C,OAAO;kDAa/E,CAAC;AAGH,eAAO,MAAM,wBAAwB,6MAoBnC,CAAC;AAGH,eAAO,MAAM,iBAAiB,sMAS5B,CAAC;AAGH,eAAO,MAAM,qBAAqB,0MAShC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { ReactNode } from "react";
2
+ interface EmptyStateProps {
3
+ icon?: ReactNode;
4
+ title: string;
5
+ description?: string;
6
+ action?: ReactNode;
7
+ className?: string;
8
+ }
9
+ export declare function EmptyState({ icon, title, description, action, className }: EmptyStateProps): import("react").JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=empty-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../src/empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,UAAU,eAAe;IACvB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,eAAe,+BAsB1F"}
@@ -0,0 +1,27 @@
1
+ export * from "./agent-prompt";
2
+ export * from "./avatar";
3
+ export * from "./badge";
4
+ export * from "./button";
5
+ export * from "./callout";
6
+ export * from "./card";
7
+ export * from "./checkbox";
8
+ export * from "./choice-dialog";
9
+ export * from "./code-block";
10
+ export * from "./data-table";
11
+ export * from "./dialog";
12
+ export * from "./dropdown-menu";
13
+ export * from "./empty-state";
14
+ export * from "./input";
15
+ export * from "./kbd";
16
+ export * from "./label";
17
+ export * from "./radio-group";
18
+ export * from "./segmented";
19
+ export * from "./select";
20
+ export * from "./separator";
21
+ export * from "./skeleton";
22
+ export * from "./spinner";
23
+ export * from "./table";
24
+ export * from "./table-empty-state";
25
+ export * from "./table-surface";
26
+ export * from "./tooltip";
27
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC"}