@elizaos/ui 2.0.0-alpha.74 → 2.0.0-alpha.76

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 (179) hide show
  1. package/{dist/components → components}/ui/button.d.ts.map +1 -1
  2. package/{dist/components → components}/ui/button.js +10 -6
  3. package/{dist/components → components}/ui/typography.d.ts +1 -1
  4. package/package.json +16 -18
  5. package/.turbo/turbo-build.log +0 -3
  6. package/.turbo/turbo-lint$colon$check.log +0 -2
  7. package/.turbo/turbo-lint.log +0 -2
  8. package/.turbo/turbo-typecheck.log +0 -1
  9. package/README.md +0 -6
  10. package/dist/package.json +0 -65
  11. package/src/components/ui/badge.tsx +0 -35
  12. package/src/components/ui/banner.tsx +0 -81
  13. package/src/components/ui/button.tsx +0 -56
  14. package/src/components/ui/card.tsx +0 -79
  15. package/src/components/ui/chat-atoms.tsx +0 -129
  16. package/src/components/ui/checkbox.tsx +0 -28
  17. package/src/components/ui/confirm-delete.tsx +0 -67
  18. package/src/components/ui/confirm-dialog.tsx +0 -142
  19. package/src/components/ui/connection-status.tsx +0 -54
  20. package/src/components/ui/copy-button.tsx +0 -60
  21. package/src/components/ui/dialog.tsx +0 -120
  22. package/src/components/ui/dropdown-menu.tsx +0 -198
  23. package/src/components/ui/empty-state.tsx +0 -42
  24. package/src/components/ui/error-boundary.tsx +0 -63
  25. package/src/components/ui/grid.tsx +0 -43
  26. package/src/components/ui/input.tsx +0 -25
  27. package/src/components/ui/label.tsx +0 -24
  28. package/src/components/ui/popover.tsx +0 -29
  29. package/src/components/ui/save-footer.tsx +0 -58
  30. package/src/components/ui/search-bar.tsx +0 -61
  31. package/src/components/ui/search-input.tsx +0 -56
  32. package/src/components/ui/section-card.tsx +0 -85
  33. package/src/components/ui/select.tsx +0 -158
  34. package/src/components/ui/separator.tsx +0 -29
  35. package/src/components/ui/skeleton.tsx +0 -115
  36. package/src/components/ui/slider.tsx +0 -26
  37. package/src/components/ui/sonner.tsx +0 -28
  38. package/src/components/ui/spinner.tsx +0 -21
  39. package/src/components/ui/stack.tsx +0 -55
  40. package/src/components/ui/status-badge.tsx +0 -128
  41. package/src/components/ui/switch.tsx +0 -27
  42. package/src/components/ui/tabs.tsx +0 -53
  43. package/src/components/ui/tag-editor.tsx +0 -111
  44. package/src/components/ui/tag-input.tsx +0 -108
  45. package/src/components/ui/textarea.tsx +0 -24
  46. package/src/components/ui/themed-select.tsx +0 -141
  47. package/src/components/ui/tooltip-extended.tsx +0 -340
  48. package/src/components/ui/tooltip.tsx +0 -28
  49. package/src/components/ui/typography.tsx +0 -74
  50. package/src/index.ts +0 -44
  51. package/src/lib/button-styles.ts +0 -19
  52. package/src/lib/utils.ts +0 -9
  53. package/src/styles/theme.css +0 -193
  54. package/tsconfig.build.json +0 -18
  55. package/tsconfig.json +0 -32
  56. /package/{dist/components → components}/ui/badge.d.ts +0 -0
  57. /package/{dist/components → components}/ui/badge.d.ts.map +0 -0
  58. /package/{dist/components → components}/ui/badge.js +0 -0
  59. /package/{dist/components → components}/ui/banner.d.ts +0 -0
  60. /package/{dist/components → components}/ui/banner.d.ts.map +0 -0
  61. /package/{dist/components → components}/ui/banner.js +0 -0
  62. /package/{dist/components → components}/ui/button.d.ts +0 -0
  63. /package/{dist/components → components}/ui/card.d.ts +0 -0
  64. /package/{dist/components → components}/ui/card.d.ts.map +0 -0
  65. /package/{dist/components → components}/ui/card.js +0 -0
  66. /package/{dist/components → components}/ui/chat-atoms.d.ts +0 -0
  67. /package/{dist/components → components}/ui/chat-atoms.d.ts.map +0 -0
  68. /package/{dist/components → components}/ui/chat-atoms.js +0 -0
  69. /package/{dist/components → components}/ui/checkbox.d.ts +0 -0
  70. /package/{dist/components → components}/ui/checkbox.d.ts.map +0 -0
  71. /package/{dist/components → components}/ui/checkbox.js +0 -0
  72. /package/{dist/components → components}/ui/confirm-delete.d.ts +0 -0
  73. /package/{dist/components → components}/ui/confirm-delete.d.ts.map +0 -0
  74. /package/{dist/components → components}/ui/confirm-delete.js +0 -0
  75. /package/{dist/components → components}/ui/confirm-dialog.d.ts +0 -0
  76. /package/{dist/components → components}/ui/confirm-dialog.d.ts.map +0 -0
  77. /package/{dist/components → components}/ui/confirm-dialog.js +0 -0
  78. /package/{dist/components → components}/ui/connection-status.d.ts +0 -0
  79. /package/{dist/components → components}/ui/connection-status.d.ts.map +0 -0
  80. /package/{dist/components → components}/ui/connection-status.js +0 -0
  81. /package/{dist/components → components}/ui/copy-button.d.ts +0 -0
  82. /package/{dist/components → components}/ui/copy-button.d.ts.map +0 -0
  83. /package/{dist/components → components}/ui/copy-button.js +0 -0
  84. /package/{dist/components → components}/ui/dialog.d.ts +0 -0
  85. /package/{dist/components → components}/ui/dialog.d.ts.map +0 -0
  86. /package/{dist/components → components}/ui/dialog.js +0 -0
  87. /package/{dist/components → components}/ui/dropdown-menu.d.ts +0 -0
  88. /package/{dist/components → components}/ui/dropdown-menu.d.ts.map +0 -0
  89. /package/{dist/components → components}/ui/dropdown-menu.js +0 -0
  90. /package/{dist/components → components}/ui/empty-state.d.ts +0 -0
  91. /package/{dist/components → components}/ui/empty-state.d.ts.map +0 -0
  92. /package/{dist/components → components}/ui/empty-state.js +0 -0
  93. /package/{dist/components → components}/ui/error-boundary.d.ts +0 -0
  94. /package/{dist/components → components}/ui/error-boundary.d.ts.map +0 -0
  95. /package/{dist/components → components}/ui/error-boundary.js +0 -0
  96. /package/{dist/components → components}/ui/grid.d.ts +0 -0
  97. /package/{dist/components → components}/ui/grid.d.ts.map +0 -0
  98. /package/{dist/components → components}/ui/grid.js +0 -0
  99. /package/{dist/components → components}/ui/input.d.ts +0 -0
  100. /package/{dist/components → components}/ui/input.d.ts.map +0 -0
  101. /package/{dist/components → components}/ui/input.js +0 -0
  102. /package/{dist/components → components}/ui/label.d.ts +0 -0
  103. /package/{dist/components → components}/ui/label.d.ts.map +0 -0
  104. /package/{dist/components → components}/ui/label.js +0 -0
  105. /package/{dist/components → components}/ui/popover.d.ts +0 -0
  106. /package/{dist/components → components}/ui/popover.d.ts.map +0 -0
  107. /package/{dist/components → components}/ui/popover.js +0 -0
  108. /package/{dist/components → components}/ui/save-footer.d.ts +0 -0
  109. /package/{dist/components → components}/ui/save-footer.d.ts.map +0 -0
  110. /package/{dist/components → components}/ui/save-footer.js +0 -0
  111. /package/{dist/components → components}/ui/search-bar.d.ts +0 -0
  112. /package/{dist/components → components}/ui/search-bar.d.ts.map +0 -0
  113. /package/{dist/components → components}/ui/search-bar.js +0 -0
  114. /package/{dist/components → components}/ui/search-input.d.ts +0 -0
  115. /package/{dist/components → components}/ui/search-input.d.ts.map +0 -0
  116. /package/{dist/components → components}/ui/search-input.js +0 -0
  117. /package/{dist/components → components}/ui/section-card.d.ts +0 -0
  118. /package/{dist/components → components}/ui/section-card.d.ts.map +0 -0
  119. /package/{dist/components → components}/ui/section-card.js +0 -0
  120. /package/{dist/components → components}/ui/select.d.ts +0 -0
  121. /package/{dist/components → components}/ui/select.d.ts.map +0 -0
  122. /package/{dist/components → components}/ui/select.js +0 -0
  123. /package/{dist/components → components}/ui/separator.d.ts +0 -0
  124. /package/{dist/components → components}/ui/separator.d.ts.map +0 -0
  125. /package/{dist/components → components}/ui/separator.js +0 -0
  126. /package/{dist/components → components}/ui/skeleton.d.ts +0 -0
  127. /package/{dist/components → components}/ui/skeleton.d.ts.map +0 -0
  128. /package/{dist/components → components}/ui/skeleton.js +0 -0
  129. /package/{dist/components → components}/ui/slider.d.ts +0 -0
  130. /package/{dist/components → components}/ui/slider.d.ts.map +0 -0
  131. /package/{dist/components → components}/ui/slider.js +0 -0
  132. /package/{dist/components → components}/ui/sonner.d.ts +0 -0
  133. /package/{dist/components → components}/ui/sonner.d.ts.map +0 -0
  134. /package/{dist/components → components}/ui/sonner.js +0 -0
  135. /package/{dist/components → components}/ui/spinner.d.ts +0 -0
  136. /package/{dist/components → components}/ui/spinner.d.ts.map +0 -0
  137. /package/{dist/components → components}/ui/spinner.js +0 -0
  138. /package/{dist/components → components}/ui/stack.d.ts +0 -0
  139. /package/{dist/components → components}/ui/stack.d.ts.map +0 -0
  140. /package/{dist/components → components}/ui/stack.js +0 -0
  141. /package/{dist/components → components}/ui/status-badge.d.ts +0 -0
  142. /package/{dist/components → components}/ui/status-badge.d.ts.map +0 -0
  143. /package/{dist/components → components}/ui/status-badge.js +0 -0
  144. /package/{dist/components → components}/ui/switch.d.ts +0 -0
  145. /package/{dist/components → components}/ui/switch.d.ts.map +0 -0
  146. /package/{dist/components → components}/ui/switch.js +0 -0
  147. /package/{dist/components → components}/ui/tabs.d.ts +0 -0
  148. /package/{dist/components → components}/ui/tabs.d.ts.map +0 -0
  149. /package/{dist/components → components}/ui/tabs.js +0 -0
  150. /package/{dist/components → components}/ui/tag-editor.d.ts +0 -0
  151. /package/{dist/components → components}/ui/tag-editor.d.ts.map +0 -0
  152. /package/{dist/components → components}/ui/tag-editor.js +0 -0
  153. /package/{dist/components → components}/ui/tag-input.d.ts +0 -0
  154. /package/{dist/components → components}/ui/tag-input.d.ts.map +0 -0
  155. /package/{dist/components → components}/ui/tag-input.js +0 -0
  156. /package/{dist/components → components}/ui/textarea.d.ts +0 -0
  157. /package/{dist/components → components}/ui/textarea.d.ts.map +0 -0
  158. /package/{dist/components → components}/ui/textarea.js +0 -0
  159. /package/{dist/components → components}/ui/themed-select.d.ts +0 -0
  160. /package/{dist/components → components}/ui/themed-select.d.ts.map +0 -0
  161. /package/{dist/components → components}/ui/themed-select.js +0 -0
  162. /package/{dist/components → components}/ui/tooltip-extended.d.ts +0 -0
  163. /package/{dist/components → components}/ui/tooltip-extended.d.ts.map +0 -0
  164. /package/{dist/components → components}/ui/tooltip-extended.js +0 -0
  165. /package/{dist/components → components}/ui/tooltip.d.ts +0 -0
  166. /package/{dist/components → components}/ui/tooltip.d.ts.map +0 -0
  167. /package/{dist/components → components}/ui/tooltip.js +0 -0
  168. /package/{dist/components → components}/ui/typography.d.ts.map +0 -0
  169. /package/{dist/components → components}/ui/typography.js +0 -0
  170. /package/{dist/index.d.ts → index.d.ts} +0 -0
  171. /package/{dist/index.d.ts.map → index.d.ts.map} +0 -0
  172. /package/{dist/index.js → index.js} +0 -0
  173. /package/{dist/lib → lib}/button-styles.d.ts +0 -0
  174. /package/{dist/lib → lib}/button-styles.d.ts.map +0 -0
  175. /package/{dist/lib → lib}/button-styles.js +0 -0
  176. /package/{dist/lib → lib}/utils.d.ts +0 -0
  177. /package/{dist/lib → lib}/utils.d.ts.map +0 -0
  178. /package/{dist/lib → lib}/utils.js +0 -0
  179. /package/{dist/styles → styles}/theme.css +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,cAAc;;;8EA2BnB,CAAC;AAEF,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,MAAM,uFAWX,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,cAAc;;;8EA2BnB,CAAC;AAEF,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,MAAM,uFAiBX,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
@@ -6,10 +6,10 @@ import { cn } from "../../lib/utils";
6
6
  const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-bg transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-pointer [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
7
7
  variants: {
8
8
  variant: {
9
- default: "bg-primary text-[var(--primary-foreground,#1a1f26)] hover:bg-primary/90 hover:text-[var(--primary-foreground,#1a1f26)]",
10
- destructive: "bg-destructive text-destructive-fg hover:bg-destructive/90",
11
- outline: "border border-input bg-bg hover:bg-bg-accent hover:text-accent-fg",
12
- secondary: "bg-secondary text-secondary-fg hover:bg-secondary/80",
9
+ default: "bg-primary text-[var(--primary-foreground,#1a1f26)] border border-transparent hover:border-[var(--accent-hover,#d8a108)] hover:shadow-[0_0_0_1px_var(--accent-hover,#d8a108)]",
10
+ destructive: "bg-destructive text-destructive-fg border border-transparent hover:border-destructive/70 hover:shadow-[0_0_0_1px_rgba(239,68,68,0.3)]",
11
+ outline: "border border-input bg-bg hover:border-[var(--accent,#f0b90b)] hover:shadow-[0_0_0_1px_var(--accent,#f0b90b)]",
12
+ secondary: "bg-secondary text-secondary-fg border border-transparent hover:border-secondary/70",
13
13
  ghost: "hover:bg-bg-accent hover:text-accent-fg",
14
14
  link: "text-primary underline-offset-4 hover:underline",
15
15
  },
@@ -25,9 +25,13 @@ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whites
25
25
  size: "default",
26
26
  },
27
27
  });
28
- const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
28
+ const Button = React.forwardRef(({ className, variant, size, asChild = false, style, ...props }, ref) => {
29
29
  const Comp = asChild ? Slot : "button";
30
- return (_jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref: ref, ...props }));
30
+ const isDefault = variant === "default" || variant === undefined;
31
+ const resolvedStyle = isDefault && !style?.color
32
+ ? { ...style, color: "var(--primary-foreground, #1a1f26)" }
33
+ : style;
34
+ return (_jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref: ref, style: resolvedStyle, ...props }));
31
35
  });
32
36
  Button.displayName = "Button";
33
37
  export { Button, buttonVariants };
@@ -1,7 +1,7 @@
1
1
  import { type VariantProps } from "class-variance-authority";
2
2
  import * as React from "react";
3
3
  declare const textVariants: (props?: ({
4
- variant?: "default" | "small" | "muted" | "medium" | "lead" | "large" | null | undefined;
4
+ variant?: "default" | "small" | "medium" | "large" | "muted" | "lead" | null | undefined;
5
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
6
  export interface TextProps extends React.HTMLAttributes<HTMLParagraphElement>, VariantProps<typeof textVariants> {
7
7
  asChild?: boolean;
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@elizaos/ui",
3
- "version": "2.0.0-alpha.74",
3
+ "version": "2.0.0-alpha.76",
4
4
  "description": "Reusable UI primitives and components for Milady applications.",
5
5
  "type": "module",
6
- "main": "src/index.ts",
6
+ "main": "./index.js",
7
7
  "license": "MIT",
8
8
  "homepage": "https://github.com/milady-ai/milady",
9
9
  "repository": {
@@ -17,14 +17,18 @@
17
17
  "react",
18
18
  "components"
19
19
  ],
20
- "scripts": {
21
- "clean": "rimraf dist",
22
- "build:dist": "rimraf dist && tsc -p tsconfig.build.json && node ../../scripts/copy-package-assets.mjs packages/ui src/styles && node ../../scripts/prepare-package-dist.mjs packages/ui",
23
- "pack:dry-run": "cd dist && npm pack --dry-run"
24
- },
25
20
  "exports": {
26
- ".": "./src/index.ts",
27
- "./utils": "./src/lib/utils.ts"
21
+ ".": {
22
+ "types": "./index.d.ts",
23
+ "import": "./index.js",
24
+ "default": "./index.js"
25
+ },
26
+ "./utils": {
27
+ "types": "./lib/utils.d.ts",
28
+ "import": "./lib/utils.js",
29
+ "default": "./lib/utils.js"
30
+ },
31
+ "./package.json": "./package.json"
28
32
  },
29
33
  "peerDependencies": {
30
34
  "react": "^19.0.0",
@@ -51,14 +55,8 @@
51
55
  "tailwind-merge": "^2.6.0"
52
56
  },
53
57
  "publishConfig": {
54
- "access": "public"
55
- },
56
- "devDependencies": {
57
- "@tailwindcss/vite": "^4.2.1",
58
- "@types/react": "^19.0.0",
59
- "@types/react-dom": "^19.0.0",
60
- "tailwindcss": "^4.1.18",
61
- "typescript": "^5.9.3"
58
+ "access": "public",
59
+ "directory": "dist"
62
60
  },
63
- "gitHead": "bd9dab587a7ced91db4f9683d8e0011ce013fe8c"
61
+ "types": "./index.d.ts"
64
62
  }
@@ -1,3 +0,0 @@
1
-
2
- $ bun run build:dist
3
- $ find src -type f \( -name '*.js' -o -name '*.d.ts' -o -name '*.d.ts.map' -o -name '*.js.map' \) -delete && rm -rf dist && tsc -p tsconfig.build.json && find src -type f \( -name '*.js' -o -name '*.d.ts' -o -name '*.d.ts.map' -o -name '*.js.map' \) -delete && node ../../scripts/copy-package-assets.mjs packages/ui src/styles && node ../../scripts/prepare-package-dist.mjs packages/ui
@@ -1,2 +0,0 @@
1
- $ bunx @biomejs/biome check ./src/index.ts ./src/lib ./src/components ./src/stories
2
- Checked 90 files in 364ms. No fixes applied.
@@ -1,2 +0,0 @@
1
- $ bunx @biomejs/biome check --write ./src/index.ts ./src/lib ./src/components ./src/stories
2
- Checked 90 files in 215ms. No fixes applied.
@@ -1 +0,0 @@
1
- $ tsc --noEmit -p tsconfig.json
package/README.md DELETED
@@ -1,6 +0,0 @@
1
- # @elizaos/ui
2
-
3
- Reusable React UI primitives for ElizaOS applications.
4
-
5
- This package contains shared buttons, inputs, dialogs, badges, layout helpers,
6
- and related component utilities used by app shells built on top of ElizaOS.
package/dist/package.json DELETED
@@ -1,65 +0,0 @@
1
- {
2
- "name": "@elizaos/ui",
3
- "version": "2.0.0-alpha.64",
4
- "description": "Reusable UI primitives and components for elizaOS applications.",
5
- "type": "module",
6
- "main": "./index.js",
7
- "types": "./index.d.ts",
8
- "license": "MIT",
9
- "homepage": "https://elizaos.ai",
10
- "repository": {
11
- "type": "git",
12
- "url": "https://github.com/elizaos/eliza.git",
13
- "directory": "packages/ui"
14
- },
15
- "keywords": [
16
- "elizaos",
17
- "ui",
18
- "react",
19
- "components"
20
- ],
21
- "exports": {
22
- ".": {
23
- "types": "./index.d.ts",
24
- "import": "./index.js"
25
- },
26
- "./utils": {
27
- "types": "./lib/utils.d.ts",
28
- "import": "./lib/utils.js"
29
- },
30
- "./styles/theme.css": "./styles/theme.css",
31
- "./package.json": "./package.json"
32
- },
33
- "peerDependencies": {
34
- "react": "^19.0.0",
35
- "react-dom": "^19.0.0"
36
- },
37
- "dependencies": {
38
- "@radix-ui/react-checkbox": "^1.3.3",
39
- "@radix-ui/react-dialog": "^1.1.15",
40
- "@radix-ui/react-dropdown-menu": "^2.1.16",
41
- "@radix-ui/react-label": "^2.1.8",
42
- "@radix-ui/react-popover": "^1.1.15",
43
- "@radix-ui/react-select": "^2.2.6",
44
- "@radix-ui/react-separator": "^1.1.8",
45
- "@radix-ui/react-slider": "^1.3.6",
46
- "@radix-ui/react-slot": "^1.2.4",
47
- "@radix-ui/react-switch": "^1.2.6",
48
- "@radix-ui/react-tabs": "^1.1.13",
49
- "@radix-ui/react-tooltip": "^1.2.8",
50
- "class-variance-authority": "^0.7.1",
51
- "clsx": "^2.1.1",
52
- "lucide-react": "^0.575.0",
53
- "next-themes": "^0.4.6",
54
- "sonner": "^2.0.7",
55
- "tailwind-merge": "^2.6.0"
56
- },
57
- "publishConfig": {
58
- "access": "public"
59
- },
60
- "author": "elizaOS Team",
61
- "engines": {
62
- "node": ">=18.0.0"
63
- },
64
- "gitHead": "cb192f7b21c441e9463d1af2f890c145814baad2"
65
- }
@@ -1,35 +0,0 @@
1
- import { cva, type VariantProps } from "class-variance-authority";
2
- import type * as React from "react";
3
-
4
- import { cn } from "../../lib/utils";
5
-
6
- const badgeVariants = cva(
7
- "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
8
- {
9
- variants: {
10
- variant: {
11
- default:
12
- "border-transparent bg-primary text-primary-fg hover:bg-primary/80",
13
- secondary: "border-transparent bg-bg-accent text-txt hover:bg-bg-hover",
14
- destructive:
15
- "border-transparent bg-destructive text-destructive-fg hover:bg-destructive/80",
16
- outline: "text-txt border-border",
17
- },
18
- },
19
- defaultVariants: {
20
- variant: "default",
21
- },
22
- },
23
- );
24
-
25
- export interface BadgeProps
26
- extends React.HTMLAttributes<HTMLDivElement>,
27
- VariantProps<typeof badgeVariants> {}
28
-
29
- function Badge({ className, variant, ...props }: BadgeProps) {
30
- return (
31
- <div className={cn(badgeVariants({ variant }), className)} {...props} />
32
- );
33
- }
34
-
35
- export { Badge, badgeVariants };
@@ -1,81 +0,0 @@
1
- import { cva, type VariantProps } from "class-variance-authority";
2
- import { AlertTriangle, Info, X, XCircle } from "lucide-react";
3
- import * as React from "react";
4
- import { cn } from "../../lib/utils";
5
-
6
- const bannerVariants = cva(
7
- "flex items-center gap-3 border px-4 py-2.5 text-xs",
8
- {
9
- variants: {
10
- variant: {
11
- error: "border-destructive/30 bg-destructive/10 text-destructive",
12
- warning: "border-warn/30 bg-warn/10 text-warn",
13
- info: "border-accent/30 bg-accent/10 text-accent",
14
- },
15
- },
16
- defaultVariants: {
17
- variant: "info",
18
- },
19
- },
20
- );
21
-
22
- const ICONS: Record<string, React.ElementType> = {
23
- error: XCircle,
24
- warning: AlertTriangle,
25
- info: Info,
26
- };
27
-
28
- export interface BannerProps
29
- extends React.HTMLAttributes<HTMLDivElement>,
30
- VariantProps<typeof bannerVariants> {
31
- /** Optional action element (button, link) */
32
- action?: React.ReactNode;
33
- /** Show dismiss button */
34
- dismissible?: boolean;
35
- /** Called when dismiss is clicked */
36
- onDismiss?: () => void;
37
- /** Aria-label for dismiss button */
38
- dismissLabel?: string;
39
- }
40
-
41
- export const Banner = React.forwardRef<HTMLDivElement, BannerProps>(
42
- (
43
- {
44
- variant = "info",
45
- action,
46
- dismissible,
47
- onDismiss,
48
- dismissLabel = "Dismiss",
49
- className,
50
- children,
51
- ...props
52
- },
53
- ref,
54
- ) => {
55
- const Icon = ICONS[variant ?? "info"];
56
-
57
- return (
58
- <div
59
- ref={ref}
60
- className={cn(bannerVariants({ variant }), className)}
61
- role="alert"
62
- {...props}
63
- >
64
- <Icon className="h-4 w-4 shrink-0" />
65
- <span className="flex-1">{children}</span>
66
- {action}
67
- {dismissible && (
68
- <button
69
- type="button"
70
- onClick={onDismiss}
71
- className="rounded-sm p-0.5 opacity-70 hover:opacity-100 transition-opacity"
72
- aria-label={dismissLabel}
73
- >
74
- <X className="h-3.5 w-3.5" />
75
- </button>
76
- )}
77
- </div>
78
- );
79
- },
80
- );
81
- Banner.displayName = "Banner";
@@ -1,56 +0,0 @@
1
- import { Slot } from "@radix-ui/react-slot";
2
- import { cva, type VariantProps } from "class-variance-authority";
3
- import * as React from "react";
4
-
5
- import { cn } from "../../lib/utils";
6
-
7
- const buttonVariants = cva(
8
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-bg transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-pointer [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
9
- {
10
- variants: {
11
- variant: {
12
- default:
13
- "bg-primary text-[var(--primary-foreground,#1a1f26)] hover:bg-primary/90 hover:text-[var(--primary-foreground,#1a1f26)]",
14
- destructive:
15
- "bg-destructive text-destructive-fg hover:bg-destructive/90",
16
- outline:
17
- "border border-input bg-bg hover:bg-bg-accent hover:text-accent-fg",
18
- secondary: "bg-secondary text-secondary-fg hover:bg-secondary/80",
19
- ghost: "hover:bg-bg-accent hover:text-accent-fg",
20
- link: "text-primary underline-offset-4 hover:underline",
21
- },
22
- size: {
23
- default: "h-10 px-4 py-2",
24
- sm: "h-9 rounded-md px-3 py-1.5",
25
- lg: "h-11 rounded-md px-8 py-2.5",
26
- icon: "h-10 w-10",
27
- },
28
- },
29
- defaultVariants: {
30
- variant: "default",
31
- size: "default",
32
- },
33
- },
34
- );
35
-
36
- export interface ButtonProps
37
- extends React.ButtonHTMLAttributes<HTMLButtonElement>,
38
- VariantProps<typeof buttonVariants> {
39
- asChild?: boolean;
40
- }
41
-
42
- const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
43
- ({ className, variant, size, asChild = false, ...props }, ref) => {
44
- const Comp = asChild ? Slot : "button";
45
- return (
46
- <Comp
47
- className={cn(buttonVariants({ variant, size, className }))}
48
- ref={ref}
49
- {...props}
50
- />
51
- );
52
- },
53
- );
54
- Button.displayName = "Button";
55
-
56
- export { Button, buttonVariants };
@@ -1,79 +0,0 @@
1
- import * as React from "react";
2
-
3
- import { cn } from "../../lib/utils";
4
-
5
- const Card = React.forwardRef<
6
- HTMLDivElement,
7
- React.HTMLAttributes<HTMLDivElement>
8
- >(({ className, ...props }, ref) => (
9
- <div
10
- ref={ref}
11
- className={cn(
12
- "rounded-xl border border-border bg-card text-card-fg shadow-sm",
13
- className,
14
- )}
15
- {...props}
16
- />
17
- ));
18
- Card.displayName = "Card";
19
-
20
- const CardHeader = React.forwardRef<
21
- HTMLDivElement,
22
- React.HTMLAttributes<HTMLDivElement>
23
- >(({ className, ...props }, ref) => (
24
- <div
25
- ref={ref}
26
- className={cn("flex flex-col space-y-1.5 p-6", className)}
27
- {...props}
28
- />
29
- ));
30
- CardHeader.displayName = "CardHeader";
31
-
32
- const CardTitle = React.forwardRef<
33
- HTMLParagraphElement,
34
- React.HTMLAttributes<HTMLHeadingElement>
35
- >(({ className, ...props }, ref) => (
36
- <h3
37
- ref={ref}
38
- className={cn("font-semibold leading-none tracking-tight", className)}
39
- {...props}
40
- />
41
- ));
42
- CardTitle.displayName = "CardTitle";
43
-
44
- const CardDescription = React.forwardRef<
45
- HTMLParagraphElement,
46
- React.HTMLAttributes<HTMLParagraphElement>
47
- >(({ className, ...props }, ref) => (
48
- <p ref={ref} className={cn("text-sm text-muted", className)} {...props} />
49
- ));
50
- CardDescription.displayName = "CardDescription";
51
-
52
- const CardContent = React.forwardRef<
53
- HTMLDivElement,
54
- React.HTMLAttributes<HTMLDivElement>
55
- >(({ className, ...props }, ref) => (
56
- <div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
57
- ));
58
- CardContent.displayName = "CardContent";
59
-
60
- const CardFooter = React.forwardRef<
61
- HTMLDivElement,
62
- React.HTMLAttributes<HTMLDivElement>
63
- >(({ className, ...props }, ref) => (
64
- <div
65
- ref={ref}
66
- className={cn("flex items-center p-6 pt-0", className)}
67
- {...props}
68
- />
69
- ));
70
- CardFooter.displayName = "CardFooter";
71
-
72
- export {
73
- Card,
74
- CardContent,
75
- CardDescription,
76
- CardFooter,
77
- CardHeader,
78
- CardTitle,
79
- };
@@ -1,129 +0,0 @@
1
- /**
2
- * Chat sub-components that have no app-level context dependency.
3
- *
4
- * These complement the full `ChatMessage` component (which stays in
5
- * `apps/app` because it uses `useApp()` for i18n and the `MessageContent`
6
- * renderer). Extracted here so they can be reused by any app.
7
- */
8
-
9
- import { Button } from "./button";
10
-
11
- /* ── TypingIndicator ─────────────────────────────────────────────────── */
12
-
13
- export function TypingIndicator({
14
- agentName,
15
- agentAvatarSrc,
16
- }: {
17
- agentName: string;
18
- agentAvatarSrc?: string | null;
19
- }) {
20
- const agentInitial = agentName.trim().charAt(0).toUpperCase() || "A";
21
-
22
- return (
23
- <div className="flex items-start gap-2 sm:gap-3 mt-4">
24
- <div className="w-8 h-8 shrink-0 rounded-full overflow-hidden border border-border bg-bg-hover shadow-sm">
25
- {agentAvatarSrc ? (
26
- <img
27
- src={agentAvatarSrc}
28
- alt={`${agentName} avatar`}
29
- className="w-full h-full object-cover"
30
- />
31
- ) : (
32
- <div className="w-full h-full flex items-center justify-center text-[11px] font-bold text-accent bg-accent-subtle">
33
- {agentInitial}
34
- </div>
35
- )}
36
- </div>
37
-
38
- <div className="max-w-[88%] sm:max-w-[80%] min-w-0">
39
- <div className="text-[12px] font-semibold text-accent mb-1">
40
- {agentName}
41
- </div>
42
- <div className="px-4 py-3 bg-bg-accent border border-border rounded-2xl rounded-bl-md">
43
- <div className="flex gap-1">
44
- <span
45
- className="w-2 h-2 rounded-full bg-muted-strong animate-[typing-bounce_1.2s_ease-in-out_infinite]"
46
- style={{ animationDelay: "0ms" }}
47
- />
48
- <span
49
- className="w-2 h-2 rounded-full bg-muted-strong animate-[typing-bounce_1.2s_ease-in-out_infinite]"
50
- style={{ animationDelay: "200ms" }}
51
- />
52
- <span
53
- className="w-2 h-2 rounded-full bg-muted-strong animate-[typing-bounce_1.2s_ease-in-out_infinite]"
54
- style={{ animationDelay: "400ms" }}
55
- />
56
- </div>
57
- </div>
58
- </div>
59
- </div>
60
- );
61
- }
62
-
63
- /* ── ChatEmptyState ──────────────────────────────────────────────────── */
64
-
65
- export interface ChatEmptyStateProps {
66
- agentName: string;
67
- /** Starter suggestions shown as quick-reply chips. */
68
- suggestions?: string[];
69
- onSuggestionClick?: (suggestion: string) => void;
70
- /** i18n labels — all have sensible English defaults. */
71
- labels?: {
72
- startConversation?: string;
73
- sendMessageTo?: string;
74
- toBeginChatting?: string;
75
- chatIconLabel?: string;
76
- };
77
- }
78
-
79
- export function ChatEmptyState({
80
- agentName,
81
- suggestions = ["Hello!", "How are you?", "Tell me a joke", "Help me with..."],
82
- onSuggestionClick,
83
- labels = {},
84
- }: ChatEmptyStateProps) {
85
- return (
86
- <div className="flex-1 flex flex-col items-center justify-center text-center p-6">
87
- <div className="w-16 h-16 rounded-2xl bg-accent-subtle flex items-center justify-center mb-4">
88
- <svg
89
- width="32"
90
- height="32"
91
- viewBox="0 0 24 24"
92
- fill="none"
93
- stroke="currentColor"
94
- strokeWidth="2"
95
- strokeLinecap="round"
96
- strokeLinejoin="round"
97
- className="text-accent"
98
- aria-label={labels.chatIconLabel ?? "Chat icon"}
99
- >
100
- <title>{labels.chatIconLabel ?? "Chat"}</title>
101
- <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" />
102
- </svg>
103
- </div>
104
- <h3 className="text-lg font-semibold text-txt-strong mb-2">
105
- {labels.startConversation ?? "Start a Conversation"}
106
- </h3>
107
- <p
108
- className="text-sm text-muted max-w-sm mb-6"
109
- style={{ fontFamily: "var(--font-chat)" }}
110
- >
111
- {labels.sendMessageTo ?? "Send a message to"} {agentName}{" "}
112
- {labels.toBeginChatting ?? "to begin chatting."}
113
- </p>
114
- <div className="flex flex-wrap justify-center gap-2">
115
- {suggestions.map((suggestion) => (
116
- <Button
117
- key={suggestion}
118
- variant="outline"
119
- size="sm"
120
- className="px-3 py-1.5 h-7 text-xs rounded-full text-muted border-border bg-bg hover:border-accent hover:text-accent transition-colors"
121
- onClick={() => onSuggestionClick?.(suggestion)}
122
- >
123
- {suggestion}
124
- </Button>
125
- ))}
126
- </div>
127
- </div>
128
- );
129
- }
@@ -1,28 +0,0 @@
1
- import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
2
- import { Check } from "lucide-react";
3
- import * as React from "react";
4
-
5
- import { cn } from "../../lib/utils";
6
-
7
- const Checkbox = React.forwardRef<
8
- React.ElementRef<typeof CheckboxPrimitive.Root>,
9
- React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
10
- >(({ className, ...props }, ref) => (
11
- <CheckboxPrimitive.Root
12
- ref={ref}
13
- className={cn(
14
- "peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-bg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-fg",
15
- className,
16
- )}
17
- {...props}
18
- >
19
- <CheckboxPrimitive.Indicator
20
- className={cn("flex items-center justify-center text-current")}
21
- >
22
- <Check className="h-4 w-4" />
23
- </CheckboxPrimitive.Indicator>
24
- </CheckboxPrimitive.Root>
25
- ));
26
- Checkbox.displayName = CheckboxPrimitive.Root.displayName;
27
-
28
- export { Checkbox };
@@ -1,67 +0,0 @@
1
- import * as React from "react";
2
- import { cn } from "../../lib/utils";
3
-
4
- export interface ConfirmDeleteProps {
5
- onConfirm: () => void;
6
- disabled?: boolean;
7
- triggerLabel?: string;
8
- confirmLabel?: string;
9
- cancelLabel?: string;
10
- busyLabel?: string;
11
- promptText?: string;
12
- className?: string;
13
- }
14
-
15
- export function ConfirmDelete({
16
- onConfirm,
17
- disabled = false,
18
- triggerLabel = "Delete",
19
- confirmLabel = "Confirm",
20
- cancelLabel = "Cancel",
21
- busyLabel,
22
- promptText = "Delete?",
23
- className,
24
- }: ConfirmDeleteProps) {
25
- const [confirming, setConfirming] = React.useState(false);
26
-
27
- if (!confirming) {
28
- return (
29
- <button
30
- type="button"
31
- className={cn(
32
- "rounded-md border border-border px-2 py-1 text-xs text-muted transition-colors hover:border-destructive hover:text-destructive",
33
- className,
34
- )}
35
- onClick={() => setConfirming(true)}
36
- disabled={disabled}
37
- >
38
- {triggerLabel}
39
- </button>
40
- );
41
- }
42
-
43
- return (
44
- <span className={cn("inline-flex items-center gap-1.5", className)}>
45
- <span className="text-[11px] text-destructive">{promptText}</span>
46
- <button
47
- type="button"
48
- className="rounded-md border border-destructive bg-destructive px-2 py-0.5 text-[10px] font-medium text-destructive-fg transition-opacity hover:opacity-90 disabled:opacity-50"
49
- onClick={() => {
50
- onConfirm();
51
- setConfirming(false);
52
- }}
53
- disabled={disabled}
54
- >
55
- {disabled && busyLabel ? busyLabel : confirmLabel}
56
- </button>
57
- <button
58
- type="button"
59
- className="rounded-md border border-border px-2 py-0.5 text-[10px] text-muted transition-colors hover:border-accent hover:text-accent disabled:opacity-50"
60
- onClick={() => setConfirming(false)}
61
- disabled={disabled}
62
- >
63
- {cancelLabel}
64
- </button>
65
- </span>
66
- );
67
- }