@object-ui/components 0.3.0 → 0.3.1

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 (317) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/ISSUES_FOUND.md +128 -0
  3. package/README.md +19 -1
  4. package/README_SHADCN_SYNC.md +281 -0
  5. package/TESTING.md +335 -0
  6. package/dist/index.css +1 -1
  7. package/dist/index.js +30981 -30027
  8. package/dist/index.umd.cjs +30 -39
  9. package/dist/src/hooks/use-mobile.d.ts +7 -0
  10. package/dist/src/index.d.ts +4 -1
  11. package/dist/src/renderers/basic/button-group.d.ts +8 -0
  12. package/dist/src/renderers/basic/div.d.ts +7 -0
  13. package/dist/src/renderers/basic/html.d.ts +7 -0
  14. package/dist/src/renderers/basic/icon.d.ts +7 -0
  15. package/dist/src/renderers/basic/image.d.ts +7 -0
  16. package/dist/src/renderers/basic/navigation-menu.d.ts +8 -0
  17. package/dist/src/renderers/basic/pagination.d.ts +8 -0
  18. package/dist/src/renderers/basic/separator.d.ts +7 -0
  19. package/dist/src/renderers/basic/span.d.ts +7 -0
  20. package/dist/src/renderers/basic/text.d.ts +7 -0
  21. package/dist/src/renderers/complex/carousel.d.ts +7 -0
  22. package/dist/src/renderers/complex/data-table.d.ts +7 -0
  23. package/dist/src/renderers/complex/filter-builder.d.ts +7 -0
  24. package/dist/src/renderers/complex/resizable.d.ts +7 -0
  25. package/dist/src/renderers/complex/scroll-area.d.ts +7 -0
  26. package/dist/src/renderers/complex/table.d.ts +7 -0
  27. package/dist/src/renderers/data-display/alert.d.ts +7 -0
  28. package/dist/src/renderers/data-display/avatar.d.ts +7 -0
  29. package/dist/src/renderers/data-display/badge.d.ts +7 -0
  30. package/dist/src/renderers/data-display/breadcrumb.d.ts +8 -0
  31. package/dist/src/renderers/data-display/kbd.d.ts +8 -0
  32. package/dist/src/renderers/data-display/list.d.ts +7 -0
  33. package/dist/src/renderers/data-display/statistic.d.ts +7 -0
  34. package/dist/src/renderers/data-display/table.d.ts +8 -0
  35. package/dist/src/renderers/data-display/tree-view.d.ts +7 -0
  36. package/dist/src/renderers/disclosure/accordion.d.ts +7 -0
  37. package/dist/src/renderers/disclosure/collapsible.d.ts +7 -0
  38. package/dist/src/renderers/disclosure/toggle-group.d.ts +8 -0
  39. package/dist/src/renderers/feedback/empty.d.ts +8 -0
  40. package/dist/src/renderers/feedback/loading.d.ts +7 -0
  41. package/dist/src/renderers/feedback/progress.d.ts +7 -0
  42. package/dist/src/renderers/feedback/skeleton.d.ts +7 -0
  43. package/dist/src/renderers/feedback/sonner.d.ts +8 -0
  44. package/dist/src/renderers/feedback/spinner.d.ts +8 -0
  45. package/dist/src/renderers/feedback/toast.d.ts +8 -0
  46. package/dist/src/renderers/feedback/toaster.d.ts +7 -0
  47. package/dist/src/renderers/form/button.d.ts +7 -0
  48. package/dist/src/renderers/form/calendar.d.ts +7 -0
  49. package/dist/src/renderers/form/checkbox.d.ts +7 -0
  50. package/dist/src/renderers/form/combobox.d.ts +8 -0
  51. package/dist/src/renderers/form/command.d.ts +8 -0
  52. package/dist/src/renderers/form/date-picker.d.ts +7 -0
  53. package/dist/src/renderers/form/file-upload.d.ts +7 -0
  54. package/dist/src/renderers/form/form.d.ts +7 -0
  55. package/dist/src/renderers/form/input-otp.d.ts +7 -0
  56. package/dist/src/renderers/form/input.d.ts +7 -0
  57. package/dist/src/renderers/form/label.d.ts +7 -0
  58. package/dist/src/renderers/form/radio-group.d.ts +7 -0
  59. package/dist/src/renderers/form/select.d.ts +7 -0
  60. package/dist/src/renderers/form/slider.d.ts +7 -0
  61. package/dist/src/renderers/form/switch.d.ts +7 -0
  62. package/dist/src/renderers/form/textarea.d.ts +7 -0
  63. package/dist/src/renderers/form/toggle.d.ts +7 -0
  64. package/dist/src/renderers/layout/aspect-ratio.d.ts +8 -0
  65. package/dist/src/renderers/layout/card.d.ts +7 -0
  66. package/dist/src/renderers/layout/container.d.ts +7 -0
  67. package/dist/src/renderers/layout/flex.d.ts +7 -0
  68. package/dist/src/renderers/layout/grid.d.ts +7 -0
  69. package/dist/src/renderers/layout/semantic.d.ts +7 -0
  70. package/dist/src/renderers/layout/stack.d.ts +7 -0
  71. package/dist/src/renderers/layout/tabs.d.ts +7 -0
  72. package/dist/src/renderers/navigation/header-bar.d.ts +7 -0
  73. package/dist/src/renderers/navigation/sidebar.d.ts +7 -0
  74. package/dist/src/renderers/overlay/alert-dialog.d.ts +7 -0
  75. package/dist/src/renderers/overlay/context-menu.d.ts +7 -0
  76. package/dist/src/renderers/overlay/dialog.d.ts +7 -0
  77. package/dist/src/renderers/overlay/drawer.d.ts +7 -0
  78. package/dist/src/renderers/overlay/dropdown-menu.d.ts +7 -0
  79. package/dist/src/renderers/overlay/hover-card.d.ts +7 -0
  80. package/dist/src/renderers/overlay/menubar.d.ts +8 -0
  81. package/dist/src/renderers/overlay/popover.d.ts +7 -0
  82. package/dist/src/renderers/overlay/sheet.d.ts +7 -0
  83. package/dist/src/renderers/overlay/tooltip.d.ts +7 -0
  84. package/dist/src/renderers/placeholders.d.ts +9 -0
  85. package/dist/src/ui/accordion.d.ts +7 -0
  86. package/dist/src/ui/alert-dialog.d.ts +7 -0
  87. package/dist/src/ui/alert.d.ts +7 -0
  88. package/dist/src/ui/aspect-ratio.d.ts +7 -0
  89. package/dist/src/ui/avatar.d.ts +7 -0
  90. package/dist/src/ui/badge.d.ts +7 -0
  91. package/dist/src/ui/breadcrumb.d.ts +7 -0
  92. package/dist/src/ui/button.d.ts +10 -5
  93. package/dist/src/ui/calendar.d.ts +14 -7
  94. package/dist/src/ui/card.d.ts +7 -0
  95. package/dist/src/ui/carousel.d.ts +7 -0
  96. package/dist/src/ui/checkbox.d.ts +7 -0
  97. package/dist/src/ui/collapsible.d.ts +7 -0
  98. package/dist/src/ui/combobox.d.ts +22 -0
  99. package/dist/src/ui/command.d.ts +7 -0
  100. package/dist/src/ui/context-menu.d.ts +7 -0
  101. package/dist/src/ui/date-picker.d.ts +15 -0
  102. package/dist/src/ui/dialog.d.ts +7 -0
  103. package/dist/src/ui/drawer.d.ts +7 -0
  104. package/dist/src/ui/dropdown-menu.d.ts +7 -0
  105. package/dist/src/ui/filter-builder.d.ts +7 -0
  106. package/dist/src/ui/form.d.ts +7 -0
  107. package/dist/src/ui/hover-card.d.ts +7 -0
  108. package/dist/src/ui/index.d.ts +10 -5
  109. package/dist/src/ui/input-otp.d.ts +7 -0
  110. package/dist/src/ui/input.d.ts +7 -0
  111. package/dist/src/ui/item.d.ts +7 -0
  112. package/dist/src/ui/kbd.d.ts +7 -0
  113. package/dist/src/ui/label.d.ts +7 -0
  114. package/dist/src/ui/menubar.d.ts +7 -0
  115. package/dist/src/ui/navigation-menu.d.ts +7 -0
  116. package/dist/src/ui/pagination.d.ts +7 -0
  117. package/dist/src/ui/popover.d.ts +7 -0
  118. package/dist/src/ui/progress.d.ts +7 -0
  119. package/dist/src/ui/radio-group.d.ts +7 -0
  120. package/dist/src/ui/resizable.d.ts +7 -0
  121. package/dist/src/ui/scroll-area.d.ts +7 -0
  122. package/dist/src/ui/select.d.ts +9 -2
  123. package/dist/src/ui/separator.d.ts +7 -0
  124. package/dist/src/ui/sheet.d.ts +7 -0
  125. package/dist/src/ui/sidebar.d.ts +14 -9
  126. package/dist/src/ui/skeleton.d.ts +7 -0
  127. package/dist/src/ui/slider.d.ts +7 -0
  128. package/dist/src/ui/spinner.d.ts +7 -0
  129. package/dist/src/ui/switch.d.ts +7 -0
  130. package/dist/src/ui/table.d.ts +15 -8
  131. package/dist/src/ui/tabs.d.ts +7 -0
  132. package/dist/src/ui/textarea.d.ts +7 -0
  133. package/dist/src/ui/toggle-group.d.ts +8 -3
  134. package/dist/src/ui/toggle.d.ts +7 -0
  135. package/dist/src/ui/tooltip.d.ts +7 -0
  136. package/metadata/ObjectGrid.component.yml +72 -0
  137. package/package.json +23 -11
  138. package/postcss.config.js +9 -1
  139. package/shadcn-components.json +310 -0
  140. package/src/__tests__/README.md +124 -0
  141. package/src/__tests__/basic-renderers.test.tsx +255 -0
  142. package/src/__tests__/complex-disclosure-renderers.test.tsx +301 -0
  143. package/src/__tests__/feedback-overlay-renderers.test.tsx +349 -0
  144. package/src/__tests__/form-renderers.test.tsx +364 -0
  145. package/src/__tests__/layout-data-renderers.test.tsx +340 -0
  146. package/src/__tests__/test-utils.tsx +190 -0
  147. package/src/hooks/use-mobile.tsx +8 -0
  148. package/src/index.css +86 -54
  149. package/src/index.test.ts +8 -0
  150. package/src/index.ts +21 -1
  151. package/src/lib/utils.tsx +8 -0
  152. package/src/new-components.test.ts +8 -9
  153. package/src/renderers/basic/button-group.tsx +78 -0
  154. package/src/renderers/basic/div.tsx +9 -1
  155. package/src/renderers/basic/html.tsx +8 -0
  156. package/src/renderers/basic/icon.tsx +66 -3
  157. package/src/renderers/basic/image.tsx +12 -1
  158. package/src/renderers/basic/index.ts +11 -0
  159. package/src/renderers/basic/navigation-menu.tsx +80 -0
  160. package/src/renderers/basic/pagination.tsx +82 -0
  161. package/src/renderers/basic/separator.tsx +9 -1
  162. package/src/renderers/basic/span.tsx +9 -1
  163. package/src/renderers/basic/text.tsx +8 -0
  164. package/src/renderers/complex/__tests__/data-table.test.ts +8 -0
  165. package/src/renderers/complex/carousel.tsx +11 -3
  166. package/src/renderers/complex/data-table.tsx +19 -4
  167. package/src/renderers/complex/filter-builder.tsx +8 -0
  168. package/src/renderers/complex/index.ts +9 -3
  169. package/src/renderers/complex/resizable.tsx +8 -0
  170. package/src/renderers/complex/scroll-area.tsx +8 -0
  171. package/src/renderers/complex/table.tsx +10 -2
  172. package/src/renderers/data-display/alert.tsx +8 -0
  173. package/src/renderers/data-display/avatar.tsx +8 -0
  174. package/src/renderers/data-display/badge.tsx +8 -0
  175. package/src/renderers/data-display/breadcrumb.tsx +59 -0
  176. package/src/renderers/data-display/index.ts +12 -0
  177. package/src/renderers/data-display/kbd.tsx +49 -0
  178. package/src/renderers/data-display/list.tsx +8 -0
  179. package/src/renderers/data-display/statistic.tsx +24 -43
  180. package/src/renderers/data-display/table.tsx +68 -0
  181. package/src/renderers/data-display/tree-view.tsx +26 -37
  182. package/src/renderers/disclosure/accordion.tsx +8 -0
  183. package/src/renderers/disclosure/collapsible.tsx +8 -0
  184. package/src/renderers/disclosure/index.ts +9 -0
  185. package/src/renderers/disclosure/toggle-group.tsx +77 -0
  186. package/src/renderers/feedback/empty.tsx +48 -0
  187. package/src/renderers/feedback/index.ts +12 -0
  188. package/src/renderers/feedback/loading.tsx +8 -0
  189. package/src/renderers/feedback/progress.tsx +8 -0
  190. package/src/renderers/feedback/skeleton.tsx +8 -0
  191. package/src/renderers/feedback/sonner.tsx +55 -0
  192. package/src/renderers/feedback/spinner.tsx +54 -0
  193. package/src/renderers/feedback/toast.tsx +58 -0
  194. package/src/renderers/feedback/toaster.tsx +13 -17
  195. package/src/renderers/form/button.tsx +8 -0
  196. package/src/renderers/form/calendar.tsx +8 -0
  197. package/src/renderers/form/checkbox.tsx +8 -0
  198. package/src/renderers/form/combobox.tsx +47 -0
  199. package/src/renderers/form/command.tsx +57 -0
  200. package/src/renderers/form/date-picker.tsx +10 -2
  201. package/src/renderers/form/file-upload.tsx +10 -2
  202. package/src/renderers/form/form.tsx +12 -3
  203. package/src/renderers/form/index.ts +10 -0
  204. package/src/renderers/form/input-otp.tsx +34 -15
  205. package/src/renderers/form/input.tsx +89 -50
  206. package/src/renderers/form/label.tsx +8 -0
  207. package/src/renderers/form/radio-group.tsx +8 -0
  208. package/src/renderers/form/select.tsx +8 -0
  209. package/src/renderers/form/slider.tsx +16 -1
  210. package/src/renderers/form/switch.tsx +8 -0
  211. package/src/renderers/form/textarea.tsx +8 -0
  212. package/src/renderers/form/toggle.tsx +8 -0
  213. package/src/renderers/index.ts +8 -0
  214. package/src/renderers/layout/aspect-ratio.tsx +50 -0
  215. package/src/renderers/layout/card.tsx +8 -0
  216. package/src/renderers/layout/container.tsx +20 -12
  217. package/src/renderers/layout/flex.tsx +16 -8
  218. package/src/renderers/layout/grid.tsx +8 -0
  219. package/src/renderers/layout/index.ts +9 -0
  220. package/src/renderers/layout/page.tsx +9 -1
  221. package/src/renderers/layout/semantic.tsx +8 -0
  222. package/src/renderers/layout/stack.tsx +16 -8
  223. package/src/renderers/layout/tabs.tsx +8 -0
  224. package/src/renderers/navigation/header-bar.tsx +9 -1
  225. package/src/renderers/navigation/index.ts +8 -0
  226. package/src/renderers/navigation/sidebar.tsx +8 -0
  227. package/src/renderers/overlay/alert-dialog.tsx +8 -0
  228. package/src/renderers/overlay/context-menu.tsx +9 -1
  229. package/src/renderers/overlay/dialog.tsx +8 -0
  230. package/src/renderers/overlay/drawer.tsx +8 -0
  231. package/src/renderers/overlay/dropdown-menu.tsx +8 -0
  232. package/src/renderers/overlay/hover-card.tsx +8 -0
  233. package/src/renderers/overlay/index.ts +9 -0
  234. package/src/renderers/overlay/menubar.tsx +75 -0
  235. package/src/renderers/overlay/popover.tsx +8 -0
  236. package/src/renderers/overlay/sheet.tsx +8 -0
  237. package/src/renderers/overlay/tooltip.tsx +8 -0
  238. package/src/renderers/placeholders.tsx +107 -0
  239. package/src/ui/accordion.tsx +8 -0
  240. package/src/ui/alert-dialog.tsx +8 -0
  241. package/src/ui/alert.tsx +14 -24
  242. package/src/ui/aspect-ratio.tsx +8 -0
  243. package/src/ui/avatar.tsx +8 -0
  244. package/src/ui/badge.tsx +13 -6
  245. package/src/ui/breadcrumb.tsx +8 -0
  246. package/src/ui/button-group.tsx +8 -0
  247. package/src/ui/button.tsx +38 -36
  248. package/src/ui/calendar.tsx +57 -200
  249. package/src/ui/card.tsx +8 -0
  250. package/src/ui/carousel.tsx +8 -0
  251. package/src/ui/checkbox.tsx +8 -0
  252. package/src/ui/collapsible.tsx +8 -0
  253. package/src/ui/combobox.tsx +104 -0
  254. package/src/ui/command.tsx +8 -0
  255. package/src/ui/context-menu.tsx +8 -0
  256. package/src/ui/date-picker.tsx +61 -0
  257. package/src/ui/dialog.tsx +8 -0
  258. package/src/ui/drawer.tsx +8 -0
  259. package/src/ui/dropdown-menu.tsx +8 -0
  260. package/src/ui/empty.tsx +8 -0
  261. package/src/ui/filter-builder.tsx +8 -0
  262. package/src/ui/form.tsx +8 -0
  263. package/src/ui/hover-card.tsx +8 -0
  264. package/src/ui/index.ts +11 -5
  265. package/src/ui/input-otp.tsx +20 -12
  266. package/src/ui/input.tsx +8 -0
  267. package/src/ui/item.tsx +8 -0
  268. package/src/ui/kbd.tsx +8 -0
  269. package/src/ui/label.tsx +8 -0
  270. package/src/ui/menubar.tsx +8 -0
  271. package/src/ui/navigation-menu.tsx +8 -0
  272. package/src/ui/pagination.tsx +8 -0
  273. package/src/ui/popover.tsx +9 -1
  274. package/src/ui/progress.tsx +11 -15
  275. package/src/ui/radio-group.tsx +8 -0
  276. package/src/ui/resizable.tsx +8 -0
  277. package/src/ui/scroll-area.tsx +9 -1
  278. package/src/ui/select.tsx +17 -9
  279. package/src/ui/separator.tsx +8 -0
  280. package/src/ui/sheet.tsx +8 -0
  281. package/src/ui/sidebar.tsx +34 -15
  282. package/src/ui/skeleton.tsx +8 -0
  283. package/src/ui/slider.tsx +8 -0
  284. package/src/ui/sonner.tsx +12 -20
  285. package/src/ui/spinner.tsx +11 -23
  286. package/src/ui/switch.tsx +8 -0
  287. package/src/ui/table.tsx +102 -97
  288. package/src/ui/tabs.tsx +8 -0
  289. package/src/ui/textarea.tsx +8 -0
  290. package/src/ui/toggle-group.tsx +12 -21
  291. package/src/ui/toggle.tsx +15 -12
  292. package/src/ui/tooltip.tsx +8 -0
  293. package/tsconfig.json +2 -1
  294. package/vite.config.ts +11 -1
  295. package/dist/src/index.test.d.ts +0 -1
  296. package/dist/src/new-components.test.d.ts +0 -1
  297. package/dist/src/renderers/complex/__tests__/data-table.test.d.ts +0 -0
  298. package/dist/src/renderers/complex/calendar-view.d.ts +0 -1
  299. package/dist/src/renderers/complex/chatbot.d.ts +0 -1
  300. package/dist/src/renderers/complex/chatbot.test.d.ts +0 -1
  301. package/dist/src/renderers/complex/timeline.d.ts +0 -1
  302. package/dist/src/ui/calendar-view.d.ts +0 -21
  303. package/dist/src/ui/chatbot.d.ts +0 -36
  304. package/dist/src/ui/field.d.ts +0 -24
  305. package/dist/src/ui/input-group.d.ts +0 -16
  306. package/dist/src/ui/timeline.d.ts +0 -25
  307. package/metadata/ObjectTable.component.yml +0 -41
  308. package/src/renderers/complex/calendar-view.tsx +0 -219
  309. package/src/renderers/complex/chatbot.test.ts +0 -44
  310. package/src/renderers/complex/chatbot.tsx +0 -185
  311. package/src/renderers/complex/timeline.tsx +0 -466
  312. package/src/ui/calendar-view.tsx +0 -503
  313. package/src/ui/chatbot.tsx +0 -240
  314. package/src/ui/field.tsx +0 -246
  315. package/src/ui/input-group.tsx +0 -170
  316. package/src/ui/timeline.tsx +0 -266
  317. package/tailwind.config.js +0 -75
@@ -0,0 +1,104 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
9
+ "use client"
10
+
11
+ import * as React from "react"
12
+ import { Check, ChevronsUpDown } from "lucide-react"
13
+
14
+ import { cn } from "../lib/utils"
15
+ import { Button } from "./button"
16
+ import {
17
+ Command,
18
+ CommandEmpty,
19
+ CommandGroup,
20
+ CommandInput,
21
+ CommandItem,
22
+ CommandList,
23
+ } from "./command"
24
+ import {
25
+ Popover,
26
+ PopoverContent,
27
+ PopoverTrigger,
28
+ } from "./popover"
29
+
30
+ export interface ComboboxOption {
31
+ value: string
32
+ label: string
33
+ }
34
+
35
+ export interface ComboboxProps {
36
+ options: ComboboxOption[]
37
+ value?: string
38
+ onValueChange?: (value: string) => void
39
+ placeholder?: string
40
+ searchPlaceholder?: string
41
+ emptyText?: string
42
+ className?: string
43
+ disabled?: boolean
44
+ }
45
+
46
+ export function Combobox({
47
+ options,
48
+ value,
49
+ onValueChange,
50
+ placeholder = "Select option...",
51
+ searchPlaceholder = "Search...",
52
+ emptyText = "No option found.",
53
+ className,
54
+ disabled,
55
+ }: ComboboxProps) {
56
+ const [open, setOpen] = React.useState(false)
57
+
58
+ return (
59
+ <Popover open={open} onOpenChange={setOpen}>
60
+ <PopoverTrigger asChild>
61
+ <Button
62
+ variant="outline"
63
+ role="combobox"
64
+ aria-expanded={open}
65
+ className={cn("w-[200px] justify-between", className)}
66
+ disabled={disabled}
67
+ >
68
+ {value
69
+ ? options.find((option) => option.value === value)?.label
70
+ : placeholder}
71
+ <ChevronsUpDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
72
+ </Button>
73
+ </PopoverTrigger>
74
+ <PopoverContent className="w-[200px] p-0">
75
+ <Command>
76
+ <CommandInput placeholder={searchPlaceholder} />
77
+ <CommandList>
78
+ <CommandEmpty>{emptyText}</CommandEmpty>
79
+ <CommandGroup>
80
+ {options.map((option) => (
81
+ <CommandItem
82
+ key={option.value}
83
+ value={option.value}
84
+ onSelect={(currentValue) => {
85
+ onValueChange?.(currentValue === value ? "" : currentValue)
86
+ setOpen(false)
87
+ }}
88
+ >
89
+ <Check
90
+ className={cn(
91
+ "mr-2 h-4 w-4",
92
+ value === option.value ? "opacity-100" : "opacity-0"
93
+ )}
94
+ />
95
+ {option.label}
96
+ </CommandItem>
97
+ ))}
98
+ </CommandGroup>
99
+ </CommandList>
100
+ </Command>
101
+ </PopoverContent>
102
+ </Popover>
103
+ )
104
+ }
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import * as React from "react"
2
10
  import { Command as CommandPrimitive } from "cmdk"
3
11
  import { SearchIcon } from "lucide-react"
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  "use client"
2
10
 
3
11
  import * as React from "react"
@@ -0,0 +1,61 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
9
+ "use client"
10
+
11
+ import * as React from "react"
12
+ import { CalendarIcon } from "lucide-react"
13
+ import { format } from "date-fns"
14
+
15
+ import { cn } from "../lib/utils"
16
+ import { Button } from "./button"
17
+ import { Calendar } from "./calendar"
18
+ import { Popover, PopoverContent, PopoverTrigger } from "./popover"
19
+
20
+ export interface DatePickerProps {
21
+ date?: Date
22
+ onDateChange?: (date: Date | undefined) => void
23
+ placeholder?: string
24
+ className?: string
25
+ disabled?: boolean
26
+ }
27
+
28
+ export function DatePicker({
29
+ date,
30
+ onDateChange,
31
+ placeholder = "Pick a date",
32
+ className,
33
+ disabled,
34
+ }: DatePickerProps) {
35
+ return (
36
+ <Popover>
37
+ <PopoverTrigger asChild>
38
+ <Button
39
+ variant={"outline"}
40
+ className={cn(
41
+ "w-[280px] justify-start text-left font-normal",
42
+ !date && "text-muted-foreground",
43
+ className
44
+ )}
45
+ disabled={disabled}
46
+ >
47
+ <CalendarIcon className="mr-2 h-4 w-4" />
48
+ {date ? format(date, "PPP") : <span>{placeholder}</span>}
49
+ </Button>
50
+ </PopoverTrigger>
51
+ <PopoverContent className="w-auto p-0">
52
+ <Calendar
53
+ mode="single"
54
+ selected={date}
55
+ onSelect={onDateChange}
56
+ initialFocus
57
+ />
58
+ </PopoverContent>
59
+ </Popover>
60
+ )
61
+ }
package/src/ui/dialog.tsx CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import * as React from "react"
2
10
  import * as DialogPrimitive from "@radix-ui/react-dialog"
3
11
  import { XIcon } from "lucide-react"
package/src/ui/drawer.tsx CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  "use client"
2
10
 
3
11
  import * as React from "react"
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import * as React from "react"
2
10
  import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
3
11
  import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react"
package/src/ui/empty.tsx CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import { cva, type VariantProps } from "class-variance-authority"
2
10
 
3
11
  import { cn } from "../lib/utils"
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  "use client"
2
10
 
3
11
  import * as React from "react"
package/src/ui/form.tsx CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  "use client"
2
10
 
3
11
  import * as React from "react"
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  "use client"
2
10
 
3
11
  import * as React from "react"
package/src/ui/index.ts CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  export * from './accordion';
2
10
  export * from './alert-dialog';
3
11
  export * from './alert';
@@ -8,23 +16,21 @@ export * from './breadcrumb';
8
16
  export * from './button-group';
9
17
  export * from './button';
10
18
  export * from './calendar';
11
- export * from './calendar-view';
12
19
  export * from './card';
13
20
  export * from './carousel';
14
- export * from './chatbot';
15
21
  export * from './checkbox';
16
22
  export * from './collapsible';
23
+ export * from './combobox';
17
24
  export * from './command';
18
25
  export * from './context-menu';
26
+ export * from './date-picker';
19
27
  export * from './dialog';
20
28
  export * from './drawer';
21
29
  export * from './dropdown-menu';
22
30
  export * from './empty';
23
- export * from './field';
24
31
  export * from './filter-builder';
25
32
  export * from './form';
26
33
  export * from './hover-card';
27
- export * from './input-group';
28
34
  export * from './input-otp';
29
35
  export * from './input';
30
36
  export * from './item';
@@ -45,12 +51,12 @@ export * from './sidebar';
45
51
  export * from './skeleton';
46
52
  export * from './slider';
47
53
  export * from './sonner';
54
+ export { Toaster } from './sonner';
48
55
  export * from './spinner';
49
56
  export * from './switch';
50
57
  export * from './table';
51
58
  export * from './tabs';
52
59
  export * from './textarea';
53
- export * from './timeline';
54
60
  export * from './toggle-group';
55
61
  export * from './toggle';
56
62
  export * from './tooltip';
@@ -1,6 +1,16 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
9
+ "use client"
10
+
1
11
  import * as React from "react"
2
12
  import { OTPInput, OTPInputContext } from "input-otp"
3
- import { MinusIcon } from "lucide-react"
13
+ import { Minus } from "lucide-react"
4
14
 
5
15
  import { cn } from "../lib/utils"
6
16
 
@@ -28,7 +38,7 @@ function InputOTPGroup({ className, ...props }: React.ComponentProps<"div">) {
28
38
  return (
29
39
  <div
30
40
  data-slot="input-otp-group"
31
- className={cn("flex items-center gap-3", className)}
41
+ className={cn("flex items-center", className)}
32
42
  {...props}
33
43
  />
34
44
  )
@@ -49,13 +59,7 @@ function InputOTPSlot({
49
59
  data-slot="input-otp-slot"
50
60
  data-active={isActive}
51
61
  className={cn(
52
- "relative flex h-14 w-11 items-center justify-center text-lg font-mono transition-all duration-300 outline-none rounded-md",
53
- "bg-slate-950/60 border-2 border-slate-800 text-slate-500", // Default state (Inactive)
54
- "data-[active=true]:border-cyan-400 data-[active=true]:text-cyan-300 data-[active=true]:bg-cyan-950/20", // Active/Focused
55
- "data-[active=true]:shadow-[0_0_20px_rgba(6,182,212,0.5),inset_0_0_10px_rgba(6,182,212,0.1)]", // Glow
56
- "data-[active=true]:-translate-y-1 data-[active=true]:scale-105", // Lift effect
57
- isActive && "animate-pulse-subtle", // Custom subtle pulse for active slot
58
- char && "border-cyan-500/50 text-cyan-100 bg-cyan-950/10 shadow-[0_0_10px_rgba(6,182,212,0.2)]", // Filled state
62
+ "relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-xs transition-all first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px] data-[active=true]:ring-ring/50 data-[active=true]:border-ring outline-none",
59
63
  className
60
64
  )}
61
65
  {...props}
@@ -63,7 +67,7 @@ function InputOTPSlot({
63
67
  {char}
64
68
  {hasFakeCaret && (
65
69
  <div className="pointer-events-none absolute inset-0 flex items-center justify-center">
66
- <div className="animate-caret-blink bg-cyan-400 h-6 w-0.5 duration-1000 shadow-[0_0_8px_cyan]" />
70
+ <div className="h-4 w-px animate-caret-blink bg-foreground duration-1000" />
67
71
  </div>
68
72
  )}
69
73
  </div>
@@ -72,8 +76,12 @@ function InputOTPSlot({
72
76
 
73
77
  function InputOTPSeparator({ ...props }: React.ComponentProps<"div">) {
74
78
  return (
75
- <div data-slot="input-otp-separator" role="separator" {...props}>
76
- <div className="w-2 h-2 rounded-full bg-cyan-500/50 shadow-[0_0_10px_cyan]" />
79
+ <div
80
+ data-slot="input-otp-separator"
81
+ role="separator"
82
+ {...props}
83
+ >
84
+ <Minus className="text-muted-foreground/50" />
77
85
  </div>
78
86
  )
79
87
  }
package/src/ui/input.tsx CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import * as React from "react"
2
10
 
3
11
  import { cn } from "../lib/utils"
package/src/ui/item.tsx CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import * as React from "react"
2
10
  import { Slot } from "@radix-ui/react-slot"
3
11
  import { cva, type VariantProps } from "class-variance-authority"
package/src/ui/kbd.tsx CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import { cn } from "../lib/utils"
2
10
 
3
11
  function Kbd({ className, ...props }: React.ComponentProps<"kbd">) {
package/src/ui/label.tsx CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  "use client"
2
10
 
3
11
  import * as React from "react"
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import * as React from "react"
2
10
  import * as MenubarPrimitive from "@radix-ui/react-menubar"
3
11
  import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react"
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import * as React from "react"
2
10
  import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu"
3
11
  import { cva } from "class-variance-authority"
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import * as React from "react"
2
10
  import {
3
11
  ChevronLeftIcon,
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  "use client"
2
10
 
3
11
  import * as React from "react"
@@ -30,7 +38,7 @@ function PopoverContent({
30
38
  align={align}
31
39
  sideOffset={sideOffset}
32
40
  className={cn(
33
- "bg-slate-950/90 backdrop-blur-xl border border-cyan-500/30 text-cyan-100 shadow-[0_0_20px_-5px_rgba(6,182,212,0.3)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md p-4 outline-hidden",
41
+ "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
34
42
  className
35
43
  )}
36
44
  {...props}
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import * as React from "react"
2
10
  import * as ProgressPrimitive from "@radix-ui/react-progress"
3
11
 
@@ -12,28 +20,16 @@ function Progress({
12
20
  <ProgressPrimitive.Root
13
21
  data-slot="progress"
14
22
  className={cn(
15
- "relative h-3 w-full overflow-hidden rounded-sm bg-slate-950/60 border border-slate-800/60 shadow-inner",
23
+ "relative h-2 w-full overflow-hidden rounded-full bg-primary/20",
16
24
  className
17
25
  )}
18
26
  {...props}
19
27
  >
20
- {/* Background Grid Pattern for empty track */}
21
- <div className="absolute inset-0 bg-[linear-gradient(90deg,transparent_2px,rgba(6,182,212,0.1)_2px),linear-gradient(0deg,transparent_2px,rgba(6,182,212,0.1)_2px)] bg-[size:10px_10px] opacity-20" />
22
-
23
28
  <ProgressPrimitive.Indicator
24
29
  data-slot="progress-indicator"
25
- className="h-full w-full flex-1 transition-all bg-cyan-500 relative shadow-[0_0_15px_cyan]"
30
+ className="h-full w-full flex-1 bg-primary transition-all"
26
31
  style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
27
- >
28
- {/* Pulse / Flow Effect Overlay */}
29
- <div className="absolute inset-0 bg-linear-to-r from-transparent via-white/30 to-transparent -translate-x-full animate-[shimmer_1.5s_infinite_linear]" />
30
-
31
- {/* Leading Edge Hotspot */}
32
- <div className="absolute right-0 top-0 bottom-0 w-0.5 bg-white shadow-[0_0_10px_2px_white] z-10" />
33
-
34
- {/* Scanlines on the bar */}
35
- <div className="absolute inset-0 bg-[linear-gradient(transparent_50%,rgba(0,0,0,0.2)_50%)] bg-[size:4px_4px]" />
36
- </ProgressPrimitive.Indicator>
32
+ />
37
33
  </ProgressPrimitive.Root>
38
34
  )
39
35
  }
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  "use client"
2
10
 
3
11
  import * as React from "react"
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import * as React from "react"
2
10
  import { GripVerticalIcon } from "lucide-react"
3
11
  import { Group as PanelGroup, Panel, Separator as PanelResizeHandle } from "react-resizable-panels"
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  "use client"
2
10
 
3
11
  import * as React from "react"
@@ -49,7 +57,7 @@ function ScrollBar({
49
57
  >
50
58
  <ScrollAreaPrimitive.ScrollAreaThumb
51
59
  data-slot="scroll-area-thumb"
52
- className="relative flex-1 rounded-full bg-cyan-900/40 hover:bg-cyan-500/60 transition-colors duration-300"
60
+ className="relative flex-1 rounded-full bg-border"
53
61
  />
54
62
  </ScrollAreaPrimitive.ScrollAreaScrollbar>
55
63
  )
package/src/ui/select.tsx CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import * as React from "react"
2
10
  import * as SelectPrimitive from "@radix-ui/react-select"
3
11
  import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"
@@ -22,16 +30,15 @@ function SelectValue({
22
30
  return <SelectPrimitive.Value data-slot="select-value" {...props} />
23
31
  }
24
32
 
25
- function SelectTrigger({
26
- className,
27
- size = "default",
28
- children,
29
- ...props
30
- }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
31
- size?: "sm" | "default"
32
- }) {
33
+ const SelectTrigger = React.forwardRef<
34
+ React.ElementRef<typeof SelectPrimitive.Trigger>,
35
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> & {
36
+ size?: "sm" | "default"
37
+ }
38
+ >(({ className, size = "default", children, ...props }, ref) => {
33
39
  return (
34
40
  <SelectPrimitive.Trigger
41
+ ref={ref}
35
42
  data-slot="select-trigger"
36
43
  data-size={size}
37
44
  className={cn(
@@ -46,7 +53,8 @@ function SelectTrigger({
46
53
  </SelectPrimitive.Icon>
47
54
  </SelectPrimitive.Trigger>
48
55
  )
49
- }
56
+ })
57
+ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName
50
58
 
51
59
  function SelectContent({
52
60
  className,
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  "use client"
2
10
 
3
11
  import * as React from "react"
package/src/ui/sheet.tsx CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import * as React from "react"
2
10
  import * as SheetPrimitive from "@radix-ui/react-dialog"
3
11
  import { XIcon } from "lucide-react"