@object-ui/components 3.1.1 → 3.1.3

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 (80) hide show
  1. package/.turbo/turbo-build.log +34 -12
  2. package/CHANGELOG.md +16 -0
  3. package/dist/index.css +1 -1
  4. package/dist/index.js +42898 -35689
  5. package/dist/index.umd.cjs +73 -43
  6. package/dist/src/custom/mobile-dialog-content.d.ts +1 -1
  7. package/dist/src/ui/accordion.d.ts +1 -1
  8. package/dist/src/ui/alert-dialog.d.ts +1 -1
  9. package/dist/src/ui/aspect-ratio.d.ts +1 -8
  10. package/dist/src/ui/avatar.d.ts +1 -1
  11. package/dist/src/ui/chart.d.ts +21 -15
  12. package/dist/src/ui/checkbox.d.ts +1 -1
  13. package/dist/src/ui/collapsible.d.ts +1 -8
  14. package/dist/src/ui/command.d.ts +2 -2
  15. package/dist/src/ui/context-menu.d.ts +1 -1
  16. package/dist/src/ui/dialog.d.ts +1 -1
  17. package/dist/src/ui/drawer.d.ts +10 -6
  18. package/dist/src/ui/dropdown-menu.d.ts +1 -1
  19. package/dist/src/ui/form.d.ts +2 -2
  20. package/dist/src/ui/hover-card.d.ts +1 -1
  21. package/dist/src/ui/label.d.ts +1 -1
  22. package/dist/src/ui/menubar.d.ts +1 -1
  23. package/dist/src/ui/navigation-menu.d.ts +1 -1
  24. package/dist/src/ui/popover.d.ts +1 -1
  25. package/dist/src/ui/progress.d.ts +1 -1
  26. package/dist/src/ui/radio-group.d.ts +1 -1
  27. package/dist/src/ui/scroll-area.d.ts +1 -1
  28. package/dist/src/ui/select.d.ts +1 -1
  29. package/dist/src/ui/separator.d.ts +1 -1
  30. package/dist/src/ui/sheet.d.ts +1 -1
  31. package/dist/src/ui/sidebar.d.ts +4 -1
  32. package/dist/src/ui/slider.d.ts +1 -1
  33. package/dist/src/ui/switch.d.ts +1 -1
  34. package/dist/src/ui/tabs.d.ts +1 -1
  35. package/dist/src/ui/toast.d.ts +1 -1
  36. package/dist/src/ui/toggle-group.d.ts +1 -1
  37. package/dist/src/ui/toggle.d.ts +1 -1
  38. package/dist/src/ui/tooltip.d.ts +1 -1
  39. package/package.json +14 -40
  40. package/shadcn-components.json +179 -54
  41. package/src/__tests__/navigation-overlay.test.tsx +2 -2
  42. package/src/custom/button-group.tsx +2 -2
  43. package/src/custom/field.tsx +3 -3
  44. package/src/custom/item.tsx +2 -2
  45. package/src/custom/mobile-dialog-content.tsx +1 -1
  46. package/src/renderers/form/form.tsx +7 -0
  47. package/src/ui/accordion.tsx +1 -1
  48. package/src/ui/alert-dialog.tsx +1 -1
  49. package/src/ui/aspect-ratio.tsx +1 -1
  50. package/src/ui/avatar.tsx +1 -1
  51. package/src/ui/breadcrumb.tsx +2 -2
  52. package/src/ui/button.tsx +2 -2
  53. package/src/ui/checkbox.tsx +1 -1
  54. package/src/ui/collapsible.tsx +1 -1
  55. package/src/ui/command.tsx +2 -2
  56. package/src/ui/context-menu.tsx +3 -3
  57. package/src/ui/dialog.tsx +1 -1
  58. package/src/ui/drawer.tsx +13 -13
  59. package/src/ui/dropdown-menu.tsx +3 -3
  60. package/src/ui/form.tsx +5 -5
  61. package/src/ui/hover-card.tsx +2 -2
  62. package/src/ui/label.tsx +1 -1
  63. package/src/ui/menubar.tsx +3 -3
  64. package/src/ui/navigation-menu.tsx +1 -1
  65. package/src/ui/popover.tsx +2 -2
  66. package/src/ui/progress.tsx +1 -1
  67. package/src/ui/radio-group.tsx +1 -1
  68. package/src/ui/scroll-area.tsx +1 -1
  69. package/src/ui/select.tsx +2 -2
  70. package/src/ui/separator.tsx +1 -1
  71. package/src/ui/sheet.tsx +1 -1
  72. package/src/ui/sidebar.tsx +11 -8
  73. package/src/ui/slider.tsx +1 -1
  74. package/src/ui/switch.tsx +1 -1
  75. package/src/ui/tabs.tsx +1 -1
  76. package/src/ui/toast.tsx +1 -1
  77. package/src/ui/toggle-group.tsx +1 -1
  78. package/src/ui/toggle.tsx +1 -1
  79. package/src/ui/tooltip.tsx +2 -2
  80. package/src/__tests__/Registry.test.ts +0 -21
@@ -17,7 +17,9 @@
17
17
  "components": {
18
18
  "accordion": {
19
19
  "source": "https://ui.shadcn.com/r/styles/default/accordion.json",
20
- "dependencies": ["@radix-ui/react-accordion"],
20
+ "dependencies": [
21
+ "radix-ui"
22
+ ],
21
23
  "registryDependencies": []
22
24
  },
23
25
  "alert": {
@@ -27,17 +29,25 @@
27
29
  },
28
30
  "alert-dialog": {
29
31
  "source": "https://ui.shadcn.com/r/styles/default/alert-dialog.json",
30
- "dependencies": ["@radix-ui/react-alert-dialog"],
31
- "registryDependencies": ["button"]
32
+ "dependencies": [
33
+ "radix-ui"
34
+ ],
35
+ "registryDependencies": [
36
+ "button"
37
+ ]
32
38
  },
33
39
  "aspect-ratio": {
34
40
  "source": "https://ui.shadcn.com/r/styles/default/aspect-ratio.json",
35
- "dependencies": ["@radix-ui/react-aspect-ratio"],
41
+ "dependencies": [
42
+ "radix-ui"
43
+ ],
36
44
  "registryDependencies": []
37
45
  },
38
46
  "avatar": {
39
47
  "source": "https://ui.shadcn.com/r/styles/default/avatar.json",
40
- "dependencies": ["@radix-ui/react-avatar"],
48
+ "dependencies": [
49
+ "radix-ui"
50
+ ],
41
51
  "registryDependencies": []
42
52
  },
43
53
  "badge": {
@@ -52,13 +62,20 @@
52
62
  },
53
63
  "button": {
54
64
  "source": "https://ui.shadcn.com/r/styles/default/button.json",
55
- "dependencies": ["@radix-ui/react-slot"],
65
+ "dependencies": [
66
+ "radix-ui"
67
+ ],
56
68
  "registryDependencies": []
57
69
  },
58
70
  "calendar": {
59
71
  "source": "https://ui.shadcn.com/r/styles/default/calendar.json",
60
- "dependencies": ["react-day-picker", "date-fns"],
61
- "registryDependencies": ["button"]
72
+ "dependencies": [
73
+ "react-day-picker",
74
+ "date-fns"
75
+ ],
76
+ "registryDependencies": [
77
+ "button"
78
+ ]
62
79
  },
63
80
  "card": {
64
81
  "source": "https://ui.shadcn.com/r/styles/default/card.json",
@@ -67,57 +84,89 @@
67
84
  },
68
85
  "carousel": {
69
86
  "source": "https://ui.shadcn.com/r/styles/default/carousel.json",
70
- "dependencies": ["embla-carousel-react"],
71
- "registryDependencies": ["button"]
87
+ "dependencies": [
88
+ "embla-carousel-react"
89
+ ],
90
+ "registryDependencies": [
91
+ "button"
92
+ ]
72
93
  },
73
94
  "chart": {
74
95
  "source": "https://ui.shadcn.com/r/styles/default/chart.json",
75
- "dependencies": ["recharts", "lucide-react"],
96
+ "dependencies": [
97
+ "recharts",
98
+ "lucide-react"
99
+ ],
76
100
  "registryDependencies": []
77
101
  },
78
102
  "checkbox": {
79
103
  "source": "https://ui.shadcn.com/r/styles/default/checkbox.json",
80
- "dependencies": ["@radix-ui/react-checkbox"],
104
+ "dependencies": [
105
+ "radix-ui"
106
+ ],
81
107
  "registryDependencies": []
82
108
  },
83
109
  "collapsible": {
84
110
  "source": "https://ui.shadcn.com/r/styles/default/collapsible.json",
85
- "dependencies": ["@radix-ui/react-collapsible"],
111
+ "dependencies": [
112
+ "radix-ui"
113
+ ],
86
114
  "registryDependencies": []
87
115
  },
88
116
  "command": {
89
117
  "source": "https://ui.shadcn.com/r/styles/default/command.json",
90
- "dependencies": ["cmdk"],
91
- "registryDependencies": ["dialog"]
118
+ "dependencies": [
119
+ "cmdk"
120
+ ],
121
+ "registryDependencies": [
122
+ "dialog"
123
+ ]
92
124
  },
93
125
  "context-menu": {
94
126
  "source": "https://ui.shadcn.com/r/styles/default/context-menu.json",
95
- "dependencies": ["@radix-ui/react-context-menu"],
127
+ "dependencies": [
128
+ "radix-ui"
129
+ ],
96
130
  "registryDependencies": []
97
131
  },
98
132
  "dialog": {
99
133
  "source": "https://ui.shadcn.com/r/styles/default/dialog.json",
100
- "dependencies": ["@radix-ui/react-dialog"],
134
+ "dependencies": [
135
+ "radix-ui"
136
+ ],
101
137
  "registryDependencies": []
102
138
  },
103
139
  "drawer": {
104
140
  "source": "https://ui.shadcn.com/r/styles/default/drawer.json",
105
- "dependencies": ["vaul"],
141
+ "dependencies": [
142
+ "vaul"
143
+ ],
106
144
  "registryDependencies": []
107
145
  },
108
146
  "dropdown-menu": {
109
147
  "source": "https://ui.shadcn.com/r/styles/default/dropdown-menu.json",
110
- "dependencies": ["@radix-ui/react-dropdown-menu"],
148
+ "dependencies": [
149
+ "radix-ui"
150
+ ],
111
151
  "registryDependencies": []
112
152
  },
113
153
  "form": {
114
154
  "source": "https://ui.shadcn.com/r/styles/default/form.json",
115
- "dependencies": ["@radix-ui/react-label", "react-hook-form", "@hookform/resolvers"],
116
- "registryDependencies": ["button", "label"]
155
+ "dependencies": [
156
+ "radix-ui",
157
+ "react-hook-form",
158
+ "@hookform/resolvers"
159
+ ],
160
+ "registryDependencies": [
161
+ "button",
162
+ "label"
163
+ ]
117
164
  },
118
165
  "hover-card": {
119
166
  "source": "https://ui.shadcn.com/r/styles/default/hover-card.json",
120
- "dependencies": ["@radix-ui/react-hover-card"],
167
+ "dependencies": [
168
+ "radix-ui"
169
+ ],
121
170
  "registryDependencies": []
122
171
  },
123
172
  "input": {
@@ -127,73 +176,107 @@
127
176
  },
128
177
  "input-otp": {
129
178
  "source": "https://ui.shadcn.com/r/styles/default/input-otp.json",
130
- "dependencies": ["input-otp"],
179
+ "dependencies": [
180
+ "input-otp"
181
+ ],
131
182
  "registryDependencies": []
132
183
  },
133
184
  "label": {
134
185
  "source": "https://ui.shadcn.com/r/styles/default/label.json",
135
- "dependencies": ["@radix-ui/react-label"],
186
+ "dependencies": [
187
+ "radix-ui"
188
+ ],
136
189
  "registryDependencies": []
137
190
  },
138
191
  "menubar": {
139
192
  "source": "https://ui.shadcn.com/r/styles/default/menubar.json",
140
- "dependencies": ["@radix-ui/react-menubar"],
193
+ "dependencies": [
194
+ "radix-ui"
195
+ ],
141
196
  "registryDependencies": []
142
197
  },
143
198
  "navigation-menu": {
144
199
  "source": "https://ui.shadcn.com/r/styles/default/navigation-menu.json",
145
- "dependencies": ["@radix-ui/react-navigation-menu"],
200
+ "dependencies": [
201
+ "radix-ui"
202
+ ],
146
203
  "registryDependencies": []
147
204
  },
148
205
  "pagination": {
149
206
  "source": "https://ui.shadcn.com/r/styles/default/pagination.json",
150
207
  "dependencies": [],
151
- "registryDependencies": ["button"]
208
+ "registryDependencies": [
209
+ "button"
210
+ ]
152
211
  },
153
212
  "popover": {
154
213
  "source": "https://ui.shadcn.com/r/styles/default/popover.json",
155
- "dependencies": ["@radix-ui/react-popover"],
214
+ "dependencies": [
215
+ "radix-ui"
216
+ ],
156
217
  "registryDependencies": []
157
218
  },
158
219
  "progress": {
159
220
  "source": "https://ui.shadcn.com/r/styles/default/progress.json",
160
- "dependencies": ["@radix-ui/react-progress"],
221
+ "dependencies": [
222
+ "radix-ui"
223
+ ],
161
224
  "registryDependencies": []
162
225
  },
163
226
  "radio-group": {
164
227
  "source": "https://ui.shadcn.com/r/styles/default/radio-group.json",
165
- "dependencies": ["@radix-ui/react-radio-group"],
228
+ "dependencies": [
229
+ "radix-ui"
230
+ ],
166
231
  "registryDependencies": []
167
232
  },
168
233
  "resizable": {
169
234
  "source": "https://ui.shadcn.com/r/styles/default/resizable.json",
170
- "dependencies": ["react-resizable-panels"],
235
+ "dependencies": [
236
+ "react-resizable-panels"
237
+ ],
171
238
  "registryDependencies": []
172
239
  },
173
240
  "scroll-area": {
174
241
  "source": "https://ui.shadcn.com/r/styles/default/scroll-area.json",
175
- "dependencies": ["@radix-ui/react-scroll-area"],
242
+ "dependencies": [
243
+ "radix-ui"
244
+ ],
176
245
  "registryDependencies": []
177
246
  },
178
247
  "select": {
179
248
  "source": "https://ui.shadcn.com/r/styles/default/select.json",
180
- "dependencies": ["@radix-ui/react-select"],
249
+ "dependencies": [
250
+ "radix-ui"
251
+ ],
181
252
  "registryDependencies": []
182
253
  },
183
254
  "separator": {
184
255
  "source": "https://ui.shadcn.com/r/styles/default/separator.json",
185
- "dependencies": ["@radix-ui/react-separator"],
256
+ "dependencies": [
257
+ "radix-ui"
258
+ ],
186
259
  "registryDependencies": []
187
260
  },
188
261
  "sheet": {
189
262
  "source": "https://ui.shadcn.com/r/styles/default/sheet.json",
190
- "dependencies": ["@radix-ui/react-dialog"],
263
+ "dependencies": [
264
+ "radix-ui"
265
+ ],
191
266
  "registryDependencies": []
192
267
  },
193
268
  "sidebar": {
194
269
  "source": "https://ui.shadcn.com/r/styles/default/sidebar.json",
195
- "dependencies": ["@radix-ui/react-separator", "@radix-ui/react-slot"],
196
- "registryDependencies": ["button", "separator", "sheet", "skeleton", "tooltip"]
270
+ "dependencies": [
271
+ "radix-ui"
272
+ ],
273
+ "registryDependencies": [
274
+ "button",
275
+ "separator",
276
+ "sheet",
277
+ "skeleton",
278
+ "tooltip"
279
+ ]
197
280
  },
198
281
  "skeleton": {
199
282
  "source": "https://ui.shadcn.com/r/styles/default/skeleton.json",
@@ -202,17 +285,24 @@
202
285
  },
203
286
  "slider": {
204
287
  "source": "https://ui.shadcn.com/r/styles/default/slider.json",
205
- "dependencies": ["@radix-ui/react-slider"],
288
+ "dependencies": [
289
+ "radix-ui"
290
+ ],
206
291
  "registryDependencies": []
207
292
  },
208
293
  "sonner": {
209
294
  "source": "https://ui.shadcn.com/r/styles/default/sonner.json",
210
- "dependencies": ["sonner", "next-themes"],
295
+ "dependencies": [
296
+ "sonner",
297
+ "next-themes"
298
+ ],
211
299
  "registryDependencies": []
212
300
  },
213
301
  "switch": {
214
302
  "source": "https://ui.shadcn.com/r/styles/default/switch.json",
215
- "dependencies": ["@radix-ui/react-switch"],
303
+ "dependencies": [
304
+ "radix-ui"
305
+ ],
216
306
  "registryDependencies": []
217
307
  },
218
308
  "table": {
@@ -222,7 +312,9 @@
222
312
  },
223
313
  "tabs": {
224
314
  "source": "https://ui.shadcn.com/r/styles/default/tabs.json",
225
- "dependencies": ["@radix-ui/react-tabs"],
315
+ "dependencies": [
316
+ "radix-ui"
317
+ ],
226
318
  "registryDependencies": []
227
319
  },
228
320
  "textarea": {
@@ -232,47 +324,70 @@
232
324
  },
233
325
  "toast": {
234
326
  "source": "https://ui.shadcn.com/r/styles/default/toast.json",
235
- "dependencies": ["@radix-ui/react-toast"],
327
+ "dependencies": [
328
+ "radix-ui"
329
+ ],
236
330
  "registryDependencies": []
237
331
  },
238
332
  "toggle": {
239
333
  "source": "https://ui.shadcn.com/r/styles/default/toggle.json",
240
- "dependencies": ["@radix-ui/react-toggle"],
334
+ "dependencies": [
335
+ "radix-ui"
336
+ ],
241
337
  "registryDependencies": []
242
338
  },
243
339
  "toggle-group": {
244
340
  "source": "https://ui.shadcn.com/r/styles/default/toggle-group.json",
245
- "dependencies": ["@radix-ui/react-toggle-group"],
341
+ "dependencies": [
342
+ "radix-ui"
343
+ ],
246
344
  "registryDependencies": []
247
345
  },
248
346
  "tooltip": {
249
347
  "source": "https://ui.shadcn.com/r/styles/default/tooltip.json",
250
- "dependencies": ["@radix-ui/react-tooltip"],
348
+ "dependencies": [
349
+ "radix-ui"
350
+ ],
251
351
  "registryDependencies": []
252
352
  }
253
353
  },
254
354
  "customComponents": {
255
355
  "button-group": {
256
356
  "description": "Custom ObjectUI component - Button group wrapper",
257
- "dependencies": ["button"]
357
+ "dependencies": [
358
+ "button"
359
+ ]
258
360
  },
259
361
  "calendar-view": {
260
362
  "description": "Custom ObjectUI component - Full calendar view (moved to @object-ui/plugin-calendar-view)",
261
- "dependencies": ["calendar"],
363
+ "dependencies": [
364
+ "calendar"
365
+ ],
262
366
  "movedToPlugin": "@object-ui/plugin-calendar-view"
263
367
  },
264
368
  "chatbot": {
265
369
  "description": "Custom ObjectUI component - Chatbot interface (moved to @object-ui/plugin-chatbot)",
266
- "dependencies": ["card", "input", "button"],
370
+ "dependencies": [
371
+ "card",
372
+ "input",
373
+ "button"
374
+ ],
267
375
  "movedToPlugin": "@object-ui/plugin-chatbot"
268
376
  },
269
377
  "combobox": {
270
378
  "description": "Custom ObjectUI component - Combo box (select + input)",
271
- "dependencies": ["popover", "command"]
379
+ "dependencies": [
380
+ "popover",
381
+ "command"
382
+ ]
272
383
  },
273
384
  "date-picker": {
274
385
  "description": "Custom ObjectUI component - Date picker wrapper",
275
- "dependencies": ["calendar", "popover", "button"]
386
+ "dependencies": [
387
+ "calendar",
388
+ "popover",
389
+ "button"
390
+ ]
276
391
  },
277
392
  "empty": {
278
393
  "description": "Custom ObjectUI component - Empty state",
@@ -280,15 +395,23 @@
280
395
  },
281
396
  "field": {
282
397
  "description": "Custom ObjectUI component - Form field wrapper",
283
- "dependencies": ["label"]
398
+ "dependencies": [
399
+ "label"
400
+ ]
284
401
  },
285
402
  "filter-builder": {
286
403
  "description": "Custom ObjectUI component - Query filter builder",
287
- "dependencies": ["select", "input", "button"]
404
+ "dependencies": [
405
+ "select",
406
+ "input",
407
+ "button"
408
+ ]
288
409
  },
289
410
  "input-group": {
290
411
  "description": "Custom ObjectUI component - Input group with addons",
291
- "dependencies": ["input"]
412
+ "dependencies": [
413
+ "input"
414
+ ]
292
415
  },
293
416
  "item": {
294
417
  "description": "Custom ObjectUI component - Generic item component",
@@ -309,7 +432,9 @@
309
432
  },
310
433
  "toaster": {
311
434
  "description": "Custom ObjectUI component - Toast container",
312
- "dependencies": ["toast"]
435
+ "dependencies": [
436
+ "toast"
437
+ ]
313
438
  }
314
439
  }
315
440
  }
@@ -16,7 +16,7 @@ import type { NavigationOverlayProps } from '../custom/navigation-overlay';
16
16
  function createProps(overrides: Partial<NavigationOverlayProps> = {}): NavigationOverlayProps {
17
17
  return {
18
18
  isOpen: true,
19
- selectedRecord: { _id: '1', name: 'Test Record', email: 'test@example.com' },
19
+ selectedRecord: { id: '1', name: 'Test Record', email: 'test@example.com' },
20
20
  mode: 'drawer',
21
21
  close: vi.fn(),
22
22
  setIsOpen: vi.fn(),
@@ -276,7 +276,7 @@ describe('NavigationOverlay', () => {
276
276
 
277
277
  describe('children render prop', () => {
278
278
  it('should pass the selected record to children', () => {
279
- const record = { _id: '42', name: 'Jane Doe', status: 'active' };
279
+ const record = { id: '42', name: 'Jane Doe', status: 'active' };
280
280
  render(
281
281
  <NavigationOverlay
282
282
  {...createProps({
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
 
9
- import { Slot } from "@radix-ui/react-slot"
9
+ import { Slot as SlotPrimitive } from "radix-ui"
10
10
  import { cva, type VariantProps } from "class-variance-authority"
11
11
 
12
12
  import { cn } from "../lib/utils"
@@ -52,7 +52,7 @@ function ButtonGroupText({
52
52
  }: React.ComponentProps<"div"> & {
53
53
  asChild?: boolean
54
54
  }) {
55
- const Comp = asChild ? Slot : "div"
55
+ const Comp = asChild ? SlotPrimitive.Slot : "div"
56
56
 
57
57
  return (
58
58
  <Comp
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import * as React from "react"
10
- import { Slot } from "@radix-ui/react-slot"
10
+ import { Slot as SlotPrimitive } from "radix-ui"
11
11
  import { cva, type VariantProps } from "class-variance-authority"
12
12
 
13
13
  import { cn } from "../lib/utils"
@@ -43,7 +43,7 @@ const Field = React.forwardRef<HTMLDivElement, FieldProps>(
43
43
  </Label>
44
44
  )}
45
45
 
46
- <Slot
46
+ <SlotPrimitive.Slot
47
47
  id={fieldId}
48
48
  aria-describedby={
49
49
  [description && descriptionId, error && errorId]
@@ -53,7 +53,7 @@ const Field = React.forwardRef<HTMLDivElement, FieldProps>(
53
53
  aria-invalid={!!error}
54
54
  >
55
55
  {children}
56
- </Slot>
56
+ </SlotPrimitive.Slot>
57
57
 
58
58
  {description && !error && (
59
59
  <p
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import * as React from "react"
10
- import { Slot } from "@radix-ui/react-slot"
10
+ import { Slot as SlotPrimitive } from "radix-ui"
11
11
  import { cva, type VariantProps } from "class-variance-authority"
12
12
 
13
13
  import { cn } from "../lib/utils"
@@ -67,7 +67,7 @@ function Item({
67
67
  ...props
68
68
  }: React.ComponentProps<"div"> &
69
69
  VariantProps<typeof itemVariants> & { asChild?: boolean }) {
70
- const Comp = asChild ? Slot : "div"
70
+ const Comp = asChild ? SlotPrimitive.Slot : "div"
71
71
  return (
72
72
  <Comp
73
73
  data-slot="item"
@@ -18,7 +18,7 @@
18
18
  */
19
19
 
20
20
  import * as React from 'react';
21
- import * as DialogPrimitive from '@radix-ui/react-dialog';
21
+ import { Dialog as DialogPrimitive } from "radix-ui";
22
22
  import { X } from 'lucide-react';
23
23
  import { cn } from '../lib/utils';
24
24
  import { DialogOverlay, DialogPortal } from '../ui/dialog';
@@ -27,6 +27,7 @@ import { Alert, AlertDescription } from '../../ui/alert';
27
27
  import { AlertCircle, Loader2 } from 'lucide-react';
28
28
  import { cn } from '../../lib/utils';
29
29
  import React from 'react';
30
+ import { SchemaRendererContext } from '@object-ui/react';
30
31
 
31
32
  // Form renderer component - Airtable-style feature-complete form
32
33
  ComponentRegistry.register('form',
@@ -57,6 +58,11 @@ ComponentRegistry.register('form',
57
58
  const [isSubmitting, setIsSubmitting] = React.useState(false);
58
59
  const [submitError, setSubmitError] = React.useState<string | null>(null);
59
60
 
61
+ // Read DataSource from SchemaRendererContext and propagate it to field
62
+ // widgets as a prop so they can dynamically load related records.
63
+ const schemaCtx = React.useContext(SchemaRendererContext);
64
+ const contextDataSource = schemaCtx?.dataSource ?? null;
65
+
60
66
  // React to defaultValues changes
61
67
  React.useEffect(() => {
62
68
  form.reset(defaultValues);
@@ -313,6 +319,7 @@ ComponentRegistry.register('form',
313
319
  options: fieldProps.options,
314
320
  placeholder: fieldProps.placeholder,
315
321
  disabled: disabled || fieldDisabled || readonly || isSubmitting,
322
+ dataSource: contextDataSource,
316
323
  })}
317
324
  </FormControl>
318
325
  {description && (
@@ -9,7 +9,7 @@
9
9
  "use client"
10
10
 
11
11
  import * as React from "react"
12
- import * as AccordionPrimitive from "@radix-ui/react-accordion"
12
+ import { Accordion as AccordionPrimitive } from "radix-ui"
13
13
  import { ChevronDown } from "lucide-react"
14
14
 
15
15
  import { cn } from "../lib/utils"
@@ -9,7 +9,7 @@
9
9
  "use client"
10
10
 
11
11
  import * as React from "react"
12
- import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
12
+ import { AlertDialog as AlertDialogPrimitive } from "radix-ui"
13
13
 
14
14
  import { cn } from "../lib/utils"
15
15
  import { buttonVariants } from "./button"
@@ -8,7 +8,7 @@
8
8
 
9
9
  "use client"
10
10
 
11
- import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio"
11
+ import { AspectRatio as AspectRatioPrimitive } from "radix-ui"
12
12
 
13
13
  const AspectRatio = AspectRatioPrimitive.Root
14
14
 
package/src/ui/avatar.tsx CHANGED
@@ -9,7 +9,7 @@
9
9
  "use client"
10
10
 
11
11
  import * as React from "react"
12
- import * as AvatarPrimitive from "@radix-ui/react-avatar"
12
+ import { Avatar as AvatarPrimitive } from "radix-ui"
13
13
 
14
14
  import { cn } from "../lib/utils"
15
15
 
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import * as React from "react"
10
- import { Slot } from "@radix-ui/react-slot"
10
+ import { Slot as SlotPrimitive } from "radix-ui"
11
11
  import { ChevronRight, MoreHorizontal } from "lucide-react"
12
12
 
13
13
  import { cn } from "../lib/utils"
@@ -53,7 +53,7 @@ const BreadcrumbLink = React.forwardRef<
53
53
  asChild?: boolean
54
54
  }
55
55
  >(({ asChild, className, ...props }, ref) => {
56
- const Comp = asChild ? Slot : "a"
56
+ const Comp = asChild ? SlotPrimitive.Slot : "a"
57
57
 
58
58
  return (
59
59
  <Comp
package/src/ui/button.tsx CHANGED
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import * as React from "react"
10
- import { Slot } from "@radix-ui/react-slot"
10
+ import { Slot as SlotPrimitive } from "radix-ui"
11
11
  import { cva, type VariantProps } from "class-variance-authority"
12
12
 
13
13
  import { cn } from "../lib/utils"
@@ -51,7 +51,7 @@ export interface ButtonProps
51
51
 
52
52
  const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
53
53
  ({ className, variant, size, asChild = false, ...props }, ref) => {
54
- const Comp = asChild ? Slot : "button"
54
+ const Comp = asChild ? SlotPrimitive.Slot : "button"
55
55
  return (
56
56
  <Comp
57
57
  className={cn(buttonVariants({ variant, size, className }))}
@@ -9,7 +9,7 @@
9
9
  "use client"
10
10
 
11
11
  import * as React from "react"
12
- import * as CheckboxPrimitive from "@radix-ui/react-checkbox"
12
+ import { Checkbox as CheckboxPrimitive } from "radix-ui"
13
13
  import { Check } from "lucide-react"
14
14
 
15
15
  import { cn } from "../lib/utils"
@@ -8,7 +8,7 @@
8
8
 
9
9
  "use client"
10
10
 
11
- import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"
11
+ import { Collapsible as CollapsiblePrimitive } from "radix-ui"
12
12
 
13
13
  const Collapsible = CollapsiblePrimitive.Root
14
14