@rangka/client 0.1.0 → 0.1.2

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 (352) hide show
  1. package/dist/App.d.ts.map +1 -1
  2. package/dist/App.js +7 -1
  3. package/dist/App.js.map +1 -1
  4. package/dist/components/ui/input-group.d.ts +1 -1
  5. package/dist/index.d.ts +2 -0
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +2 -0
  8. package/dist/index.js.map +1 -1
  9. package/dist/main.d.ts.map +1 -1
  10. package/dist/main.js +20 -0
  11. package/dist/main.js.map +1 -1
  12. package/dist/shell/assets/AttachmentWidget-BTTGroHP.js +1 -0
  13. package/dist/shell/assets/AttachmentsWidget-DZgvmO9P.js +1 -0
  14. package/dist/shell/assets/BadgeWidget-DN6GsAAG.js +1 -0
  15. package/dist/shell/assets/CardWidget-qX-UvqJh.js +1 -0
  16. package/dist/shell/assets/CheckboxWidget-CYPZ85ih.js +1 -0
  17. package/dist/shell/assets/CodeWidget-DnVtHG1d.js +1 -0
  18. package/dist/shell/assets/ColumnWidget-CYmFCVOf.js +1 -0
  19. package/dist/shell/assets/ComputedWidget-BQApkfir.js +1 -0
  20. package/dist/shell/assets/DatePickerWidget-pEusSy9D.js +1 -0
  21. package/dist/shell/assets/DatetimeWidget-M0fEGDTD.js +1 -0
  22. package/dist/shell/assets/DividerWidget-hXVGhIKC.js +1 -0
  23. package/dist/shell/assets/DrawerWidget-DynL7EIy.js +1 -0
  24. package/dist/shell/assets/DynamicLinkWidget-ChMJ5DAf.js +1 -0
  25. package/dist/shell/assets/IconWidget-Cgo9txq1.js +1 -0
  26. package/dist/shell/assets/ImageWidget-YUv1_OQK.js +1 -0
  27. package/dist/shell/assets/JsonWidget-RHUHhXHJ.js +1 -0
  28. package/dist/shell/assets/LinkWidget-CIu7qmb2.js +1 -0
  29. package/dist/shell/assets/ManyToManyWidget-DCQnygvZ.js +1 -0
  30. package/dist/shell/assets/ModalWidget-FggzYaS2.js +1 -0
  31. package/dist/shell/assets/MoneyWidget-CKjOSucD.js +1 -0
  32. package/dist/shell/assets/RepeatWidget-Dfp4zW4d.js +1 -0
  33. package/dist/shell/assets/ScrollAreaWidget-CdFdf4rv.js +1 -0
  34. package/dist/shell/assets/SequenceWidget-DIXHZslz.js +1 -0
  35. package/dist/shell/assets/SpacerWidget-BgM4dC6x.js +1 -0
  36. package/dist/shell/assets/SplitWidget-_mcQkjQk.js +1 -0
  37. package/dist/shell/assets/StackWidget-BI_VIreo.js +1 -0
  38. package/dist/shell/assets/TableWidget-DuIvd6qR.js +1 -0
  39. package/dist/shell/assets/TextareaWidget-CATua7Ls.js +1 -0
  40. package/dist/shell/assets/TreeWidget-BoHlhfza.js +1 -0
  41. package/dist/shell/assets/calendar-DqckiKt1.js +1 -0
  42. package/dist/shell/assets/index-63v1sBS3.css +1 -0
  43. package/dist/shell/assets/index-D1wStSrO.js +8635 -0
  44. package/dist/shell/assets/popover-DywIKFaQ.js +1 -0
  45. package/dist/shell/assets/textarea-BVCZevA6.js +1 -0
  46. package/dist/shell/assets/useSurfaceContext-kzu9770H.js +1 -0
  47. package/dist/shell/assets/vendor-query-dRdWN_eK.js +1 -0
  48. package/dist/shell/assets/vendor-radix-D-Trh8JA.js +69 -0
  49. package/dist/shell/assets/vendor-router-B1WM9yRc.js +17 -0
  50. package/dist/shell/index.html +5 -2
  51. package/dist/theme.css +82 -0
  52. package/dist/widgets/components/lazy-manifest.d.ts +11 -0
  53. package/dist/widgets/components/lazy-manifest.d.ts.map +1 -0
  54. package/dist/widgets/components/lazy-manifest.js +32 -0
  55. package/dist/widgets/components/lazy-manifest.js.map +1 -0
  56. package/dist/widgets/components/register.d.ts.map +1 -1
  57. package/dist/widgets/components/register.js +0 -58
  58. package/dist/widgets/components/register.js.map +1 -1
  59. package/dist/widgets/loader.d.ts +3 -0
  60. package/dist/widgets/loader.d.ts.map +1 -0
  61. package/dist/widgets/loader.js +99 -0
  62. package/dist/widgets/loader.js.map +1 -0
  63. package/dist/widgets/renderer/LazyWidget.d.ts +8 -0
  64. package/dist/widgets/renderer/LazyWidget.d.ts.map +1 -0
  65. package/dist/widgets/renderer/LazyWidget.js +31 -0
  66. package/dist/widgets/renderer/LazyWidget.js.map +1 -0
  67. package/dist/widgets/renderer/WidgetErrorBoundary.d.ts +17 -0
  68. package/dist/widgets/renderer/WidgetErrorBoundary.d.ts.map +1 -0
  69. package/dist/widgets/renderer/WidgetErrorBoundary.js +18 -0
  70. package/dist/widgets/renderer/WidgetErrorBoundary.js.map +1 -0
  71. package/dist/widgets/renderer/WidgetRenderer.d.ts.map +1 -1
  72. package/dist/widgets/renderer/WidgetRenderer.js +8 -6
  73. package/dist/widgets/renderer/WidgetRenderer.js.map +1 -1
  74. package/package.json +7 -4
  75. package/.claude/skills/add-widget/SKILL.md +0 -101
  76. package/.turbo/turbo-build.log +0 -29
  77. package/CHANGELOG.md +0 -18
  78. package/CLAUDE.md +0 -236
  79. package/components.json +0 -25
  80. package/dist/components/ui/chart.d.ts +0 -45
  81. package/dist/components/ui/chart.d.ts.map +0 -1
  82. package/dist/components/ui/chart.js +0 -119
  83. package/dist/components/ui/chart.js.map +0 -1
  84. package/dist/shell/assets/index--35CAvcP.js +0 -8715
  85. package/dist/shell/assets/index-COLmoPYo.css +0 -1
  86. package/index.html +0 -12
  87. package/src/App.tsx +0 -44
  88. package/src/__tests__/setup.ts +0 -1
  89. package/src/api/auth.ts +0 -41
  90. package/src/api/boot.ts +0 -10
  91. package/src/api/client.ts +0 -26
  92. package/src/api/paths.ts +0 -3
  93. package/src/api/token.ts +0 -13
  94. package/src/auth/LoginForm.tsx +0 -67
  95. package/src/auth/SessionExpired.tsx +0 -24
  96. package/src/auth/SetupForm.tsx +0 -76
  97. package/src/boot/BootGate.tsx +0 -35
  98. package/src/boot/BootProvider.tsx +0 -28
  99. package/src/boot/types.ts +0 -9
  100. package/src/boot/useBoot.ts +0 -111
  101. package/src/components/Icon.tsx +0 -17
  102. package/src/components/ui/accordion.tsx +0 -82
  103. package/src/components/ui/alert-dialog.tsx +0 -180
  104. package/src/components/ui/alert.tsx +0 -76
  105. package/src/components/ui/aspect-ratio.tsx +0 -9
  106. package/src/components/ui/avatar.tsx +0 -94
  107. package/src/components/ui/badge.tsx +0 -45
  108. package/src/components/ui/breadcrumb.tsx +0 -104
  109. package/src/components/ui/button-group.tsx +0 -78
  110. package/src/components/ui/button.tsx +0 -65
  111. package/src/components/ui/calendar.tsx +0 -187
  112. package/src/components/ui/card.tsx +0 -85
  113. package/src/components/ui/carousel.tsx +0 -229
  114. package/src/components/ui/chart.tsx +0 -339
  115. package/src/components/ui/checkbox.tsx +0 -27
  116. package/src/components/ui/collapsible.tsx +0 -21
  117. package/src/components/ui/combobox.tsx +0 -275
  118. package/src/components/ui/command.tsx +0 -178
  119. package/src/components/ui/context-menu.tsx +0 -242
  120. package/src/components/ui/dialog.tsx +0 -146
  121. package/src/components/ui/direction.tsx +0 -20
  122. package/src/components/ui/drawer.tsx +0 -118
  123. package/src/components/ui/dropdown-menu.tsx +0 -247
  124. package/src/components/ui/empty.tsx +0 -94
  125. package/src/components/ui/field.tsx +0 -224
  126. package/src/components/ui/hover-card.tsx +0 -36
  127. package/src/components/ui/input-group.tsx +0 -142
  128. package/src/components/ui/input-otp.tsx +0 -86
  129. package/src/components/ui/input.tsx +0 -19
  130. package/src/components/ui/item.tsx +0 -182
  131. package/src/components/ui/kbd.tsx +0 -26
  132. package/src/components/ui/label.tsx +0 -19
  133. package/src/components/ui/menubar.tsx +0 -260
  134. package/src/components/ui/native-select.tsx +0 -55
  135. package/src/components/ui/navigation-menu.tsx +0 -160
  136. package/src/components/ui/pagination.tsx +0 -112
  137. package/src/components/ui/popover.tsx +0 -74
  138. package/src/components/ui/progress.tsx +0 -31
  139. package/src/components/ui/radio-group.tsx +0 -42
  140. package/src/components/ui/resizable.tsx +0 -42
  141. package/src/components/ui/scroll-area.tsx +0 -53
  142. package/src/components/ui/select.tsx +0 -185
  143. package/src/components/ui/separator.tsx +0 -26
  144. package/src/components/ui/sheet.tsx +0 -128
  145. package/src/components/ui/sidebar.tsx +0 -669
  146. package/src/components/ui/skeleton.tsx +0 -13
  147. package/src/components/ui/slider.tsx +0 -54
  148. package/src/components/ui/sonner.tsx +0 -43
  149. package/src/components/ui/spinner.tsx +0 -16
  150. package/src/components/ui/switch.tsx +0 -33
  151. package/src/components/ui/table.tsx +0 -87
  152. package/src/components/ui/tabs.tsx +0 -80
  153. package/src/components/ui/textarea.tsx +0 -18
  154. package/src/components/ui/toggle-group.tsx +0 -86
  155. package/src/components/ui/toggle.tsx +0 -44
  156. package/src/components/ui/tooltip.tsx +0 -53
  157. package/src/context/MetaContext.tsx +0 -22
  158. package/src/context/ModuleContext.tsx +0 -62
  159. package/src/context/PermissionsContext.tsx +0 -39
  160. package/src/context/ShellProviders.tsx +0 -33
  161. package/src/context/UserContext.tsx +0 -16
  162. package/src/data/QueryProvider.tsx +0 -7
  163. package/src/data/queryClient.ts +0 -18
  164. package/src/data/useModelMeta.ts +0 -17
  165. package/src/data/useMutation.ts +0 -60
  166. package/src/data/useRecord.ts +0 -29
  167. package/src/data/useSource.ts +0 -112
  168. package/src/hooks/use-mobile.ts +0 -19
  169. package/src/index.css +0 -260
  170. package/src/index.ts +0 -16
  171. package/src/lib/utils.ts +0 -6
  172. package/src/main.tsx +0 -17
  173. package/src/router/NotFound.tsx +0 -8
  174. package/src/router/RouterProvider.tsx +0 -7
  175. package/src/router/buildRouteTree.tsx +0 -63
  176. package/src/router/createShellRouter.ts +0 -9
  177. package/src/router/hooks.ts +0 -43
  178. package/src/shell/CommandPalette.tsx +0 -76
  179. package/src/shell/ConfirmDialog.tsx +0 -34
  180. package/src/shell/ConfirmProvider.tsx +0 -56
  181. package/src/shell/DrawerContext.tsx +0 -44
  182. package/src/shell/HeaderActions.tsx +0 -31
  183. package/src/shell/ModuleSelectorPage.tsx +0 -149
  184. package/src/shell/PageOutlet.tsx +0 -21
  185. package/src/shell/ShellContext.tsx +0 -45
  186. package/src/shell/ShellDevTools.tsx +0 -153
  187. package/src/shell/ShellLayout.tsx +0 -231
  188. package/src/shell/Toast.tsx +0 -58
  189. package/src/shell/ToastProvider.tsx +0 -60
  190. package/src/shell/app-sidebar/AppSidebar.tsx +0 -44
  191. package/src/shell/app-sidebar/ModuleSwitcher.tsx +0 -87
  192. package/src/shell/app-sidebar/NavMain.tsx +0 -64
  193. package/src/shell/app-sidebar/NavUser.tsx +0 -97
  194. package/src/shell/app-sidebar/SearchMenu.tsx +0 -22
  195. package/src/shell/app-sidebar/index.ts +0 -8
  196. package/src/shell/app-sidebar/types.ts +0 -38
  197. package/src/shell/types.ts +0 -6
  198. package/src/shell/useBreadcrumbs.ts +0 -42
  199. package/src/studio/bridge.ts +0 -125
  200. package/src/studio/index.ts +0 -3
  201. package/src/studio/overlay.ts +0 -47
  202. package/src/studio/types.ts +0 -32
  203. package/src/studio/walker.ts +0 -48
  204. package/src/vite-env.d.ts +0 -1
  205. package/src/widgets/__tests__/action-edge-cases.test.ts +0 -281
  206. package/src/widgets/__tests__/action.test.ts +0 -236
  207. package/src/widgets/__tests__/attachment-widget.test.tsx +0 -85
  208. package/src/widgets/__tests__/attachments-widget.test.tsx +0 -109
  209. package/src/widgets/__tests__/binding.test.ts +0 -76
  210. package/src/widgets/__tests__/button-widget.test.tsx +0 -145
  211. package/src/widgets/__tests__/checkbox-widget.test.tsx +0 -158
  212. package/src/widgets/__tests__/code-widget.test.tsx +0 -64
  213. package/src/widgets/__tests__/computed-widget.test.tsx +0 -62
  214. package/src/widgets/__tests__/condition-edge-cases.test.ts +0 -120
  215. package/src/widgets/__tests__/condition.test.ts +0 -221
  216. package/src/widgets/__tests__/context.test.ts +0 -99
  217. package/src/widgets/__tests__/data-widget.test.tsx +0 -204
  218. package/src/widgets/__tests__/datepicker-widget.test.tsx +0 -66
  219. package/src/widgets/__tests__/datetime-widget.test.tsx +0 -67
  220. package/src/widgets/__tests__/drawer-widget.test.tsx +0 -149
  221. package/src/widgets/__tests__/dynamic-link-widget.test.tsx +0 -52
  222. package/src/widgets/__tests__/edge-cases.test.ts +0 -232
  223. package/src/widgets/__tests__/evaluator.test.ts +0 -107
  224. package/src/widgets/__tests__/functions.test.ts +0 -147
  225. package/src/widgets/__tests__/grid-widget.test.tsx +0 -137
  226. package/src/widgets/__tests__/hooks.test.tsx +0 -249
  227. package/src/widgets/__tests__/icon-widget.test.tsx +0 -129
  228. package/src/widgets/__tests__/input-widget.test.tsx +0 -264
  229. package/src/widgets/__tests__/integration.test.ts +0 -116
  230. package/src/widgets/__tests__/json-widget.test.tsx +0 -70
  231. package/src/widgets/__tests__/link-widget.test.tsx +0 -92
  232. package/src/widgets/__tests__/many-to-many-widget.test.tsx +0 -93
  233. package/src/widgets/__tests__/modal-widget.test.tsx +0 -148
  234. package/src/widgets/__tests__/money-widget.test.tsx +0 -97
  235. package/src/widgets/__tests__/parser.test.ts +0 -171
  236. package/src/widgets/__tests__/reactive-variables.test.ts +0 -383
  237. package/src/widgets/__tests__/renderer.test.tsx +0 -300
  238. package/src/widgets/__tests__/repeat-widget.test.tsx +0 -229
  239. package/src/widgets/__tests__/select-widget.test.tsx +0 -231
  240. package/src/widgets/__tests__/sequence-widget.test.tsx +0 -58
  241. package/src/widgets/__tests__/shell-integration.test.tsx +0 -1343
  242. package/src/widgets/__tests__/split-widget.test.tsx +0 -133
  243. package/src/widgets/__tests__/state-edge-cases.test.ts +0 -118
  244. package/src/widgets/__tests__/state.test.ts +0 -106
  245. package/src/widgets/__tests__/table-data-binding.test.tsx +0 -482
  246. package/src/widgets/__tests__/table-filter-popover.test.tsx +0 -486
  247. package/src/widgets/__tests__/table-search.test.tsx +0 -305
  248. package/src/widgets/__tests__/table-widget.test.tsx +0 -509
  249. package/src/widgets/__tests__/textarea-widget.test.tsx +0 -105
  250. package/src/widgets/__tests__/tracker-validator-edge-cases.test.ts +0 -242
  251. package/src/widgets/__tests__/tracker.test.ts +0 -133
  252. package/src/widgets/__tests__/tree-widget.test.tsx +0 -97
  253. package/src/widgets/__tests__/use-model-source.test.ts +0 -67
  254. package/src/widgets/__tests__/validator.test.ts +0 -208
  255. package/src/widgets/action/dispatcher.ts +0 -334
  256. package/src/widgets/action/index.ts +0 -2
  257. package/src/widgets/binding/index.ts +0 -2
  258. package/src/widgets/binding/resolver.ts +0 -61
  259. package/src/widgets/components/AttachmentWidget.tsx +0 -111
  260. package/src/widgets/components/AttachmentsWidget.tsx +0 -121
  261. package/src/widgets/components/BadgeWidget.tsx +0 -35
  262. package/src/widgets/components/ButtonWidget.tsx +0 -43
  263. package/src/widgets/components/CardWidget.tsx +0 -68
  264. package/src/widgets/components/CheckboxWidget.tsx +0 -39
  265. package/src/widgets/components/CodeWidget.tsx +0 -44
  266. package/src/widgets/components/ColumnWidget.tsx +0 -22
  267. package/src/widgets/components/ComputedWidget.tsx +0 -49
  268. package/src/widgets/components/DataWidget.tsx +0 -189
  269. package/src/widgets/components/DatePickerWidget.tsx +0 -73
  270. package/src/widgets/components/DatetimeWidget.tsx +0 -160
  271. package/src/widgets/components/DividerWidget.tsx +0 -37
  272. package/src/widgets/components/DrawerWidget.tsx +0 -52
  273. package/src/widgets/components/DynamicLinkWidget.tsx +0 -130
  274. package/src/widgets/components/GridWidget.tsx +0 -134
  275. package/src/widgets/components/GroupWidget.tsx +0 -111
  276. package/src/widgets/components/IconWidget.tsx +0 -29
  277. package/src/widgets/components/ImageWidget.tsx +0 -28
  278. package/src/widgets/components/InputWidget.tsx +0 -70
  279. package/src/widgets/components/JsonWidget.tsx +0 -78
  280. package/src/widgets/components/LinkWidget.tsx +0 -99
  281. package/src/widgets/components/ManyToManyWidget.tsx +0 -125
  282. package/src/widgets/components/ModalWidget.tsx +0 -52
  283. package/src/widgets/components/MoneyWidget.tsx +0 -80
  284. package/src/widgets/components/RepeatWidget.tsx +0 -66
  285. package/src/widgets/components/ScrollAreaWidget.tsx +0 -40
  286. package/src/widgets/components/SectionWidget.tsx +0 -78
  287. package/src/widgets/components/SelectWidget.tsx +0 -63
  288. package/src/widgets/components/SequenceWidget.tsx +0 -32
  289. package/src/widgets/components/SpacerWidget.tsx +0 -29
  290. package/src/widgets/components/SplitWidget.tsx +0 -60
  291. package/src/widgets/components/StackWidget.tsx +0 -44
  292. package/src/widgets/components/TableWidget.tsx +0 -366
  293. package/src/widgets/components/TextWidget.tsx +0 -44
  294. package/src/widgets/components/TextareaWidget.tsx +0 -49
  295. package/src/widgets/components/TreeWidget.tsx +0 -109
  296. package/src/widgets/components/index.ts +0 -30
  297. package/src/widgets/components/register.ts +0 -93
  298. package/src/widgets/components/table/CellRenderers.tsx +0 -83
  299. package/src/widgets/components/table/TablePagination.tsx +0 -45
  300. package/src/widgets/components/table/TableToolbar.tsx +0 -285
  301. package/src/widgets/components/table/filter-operators.ts +0 -134
  302. package/src/widgets/components/table/index.ts +0 -11
  303. package/src/widgets/condition/evaluator.ts +0 -57
  304. package/src/widgets/condition/index.ts +0 -1
  305. package/src/widgets/context/builder.ts +0 -99
  306. package/src/widgets/context/index.ts +0 -8
  307. package/src/widgets/context/types.ts +0 -37
  308. package/src/widgets/data/index.ts +0 -5
  309. package/src/widgets/data/useModelQuery.ts +0 -116
  310. package/src/widgets/data/useModelRecord.ts +0 -37
  311. package/src/widgets/expression/evaluator.ts +0 -100
  312. package/src/widgets/expression/functions.ts +0 -131
  313. package/src/widgets/expression/index.ts +0 -13
  314. package/src/widgets/expression/parser.ts +0 -229
  315. package/src/widgets/expression/types.ts +0 -45
  316. package/src/widgets/form/FormContext.ts +0 -29
  317. package/src/widgets/form/FormProvider.tsx +0 -84
  318. package/src/widgets/form/FormWidget.tsx +0 -42
  319. package/src/widgets/form/index.ts +0 -4
  320. package/src/widgets/form/useFormState.ts +0 -127
  321. package/src/widgets/form/useFormSubmit.ts +0 -90
  322. package/src/widgets/form/useFormValidation.ts +0 -62
  323. package/src/widgets/hooks/index.ts +0 -8
  324. package/src/widgets/hooks/useAction.ts +0 -83
  325. package/src/widgets/hooks/useBind.ts +0 -34
  326. package/src/widgets/hooks/useCondition.ts +0 -21
  327. package/src/widgets/hooks/useDataQuery.ts +0 -48
  328. package/src/widgets/hooks/useExpression.ts +0 -14
  329. package/src/widgets/hooks/usePageState.ts +0 -21
  330. package/src/widgets/hooks/useSurfaceContext.ts +0 -11
  331. package/src/widgets/hooks/useWidgetContext.ts +0 -14
  332. package/src/widgets/index.ts +0 -80
  333. package/src/widgets/lib/layout-props.ts +0 -135
  334. package/src/widgets/reactivity/index.ts +0 -11
  335. package/src/widgets/reactivity/tracker.ts +0 -139
  336. package/src/widgets/reactivity/variables.ts +0 -213
  337. package/src/widgets/registry.ts +0 -41
  338. package/src/widgets/renderer/SlotRenderer.tsx +0 -47
  339. package/src/widgets/renderer/WidgetRenderer.tsx +0 -191
  340. package/src/widgets/renderer/index.ts +0 -4
  341. package/src/widgets/shell/WidgetSlotRenderer.tsx +0 -73
  342. package/src/widgets/shell/index.ts +0 -4
  343. package/src/widgets/shell/useActionHandlers.ts +0 -170
  344. package/src/widgets/state/index.ts +0 -2
  345. package/src/widgets/state/store.ts +0 -96
  346. package/src/widgets/types.ts +0 -28
  347. package/src/widgets/validation/index.ts +0 -2
  348. package/src/widgets/validation/validator.ts +0 -140
  349. package/tsconfig.json +0 -27
  350. package/tsconfig.tsbuildinfo +0 -1
  351. package/vite.config.ts +0 -21
  352. package/vitest.config.ts +0 -16
@@ -1,74 +0,0 @@
1
- import * as React from 'react';
2
- import { Popover as PopoverPrimitive } from 'radix-ui';
3
-
4
- import { cn } from '@/lib/utils';
5
-
6
- function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {
7
- return <PopoverPrimitive.Root data-slot="popover" {...props} />;
8
- }
9
-
10
- function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
11
- return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />;
12
- }
13
-
14
- function PopoverContent({
15
- className,
16
- align = 'center',
17
- sideOffset = 4,
18
- ...props
19
- }: React.ComponentProps<typeof PopoverPrimitive.Content>) {
20
- return (
21
- <PopoverPrimitive.Portal>
22
- <PopoverPrimitive.Content
23
- data-slot="popover-content"
24
- align={align}
25
- sideOffset={sideOffset}
26
- className={cn(
27
- 'z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-none bg-popover p-2.5 text-xs text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',
28
- className,
29
- )}
30
- {...props}
31
- />
32
- </PopoverPrimitive.Portal>
33
- );
34
- }
35
-
36
- function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
37
- return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />;
38
- }
39
-
40
- function PopoverHeader({ className, ...props }: React.ComponentProps<'div'>) {
41
- return (
42
- <div
43
- data-slot="popover-header"
44
- className={cn('flex flex-col gap-1 text-xs', className)}
45
- {...props}
46
- />
47
- );
48
- }
49
-
50
- function PopoverTitle({ className, ...props }: React.ComponentProps<'h2'>) {
51
- return (
52
- <div data-slot="popover-title" className={cn('text-sm font-medium', className)} {...props} />
53
- );
54
- }
55
-
56
- function PopoverDescription({ className, ...props }: React.ComponentProps<'p'>) {
57
- return (
58
- <p
59
- data-slot="popover-description"
60
- className={cn('text-xs/relaxed text-muted-foreground', className)}
61
- {...props}
62
- />
63
- );
64
- }
65
-
66
- export {
67
- Popover,
68
- PopoverAnchor,
69
- PopoverContent,
70
- PopoverDescription,
71
- PopoverHeader,
72
- PopoverTitle,
73
- PopoverTrigger,
74
- };
@@ -1,31 +0,0 @@
1
- 'use client';
2
-
3
- import * as React from 'react';
4
- import { Progress as ProgressPrimitive } from 'radix-ui';
5
-
6
- import { cn } from '@/lib/utils';
7
-
8
- function Progress({
9
- className,
10
- value,
11
- ...props
12
- }: React.ComponentProps<typeof ProgressPrimitive.Root>) {
13
- return (
14
- <ProgressPrimitive.Root
15
- data-slot="progress"
16
- className={cn(
17
- 'relative flex h-1 w-full items-center overflow-x-hidden rounded-none bg-muted',
18
- className,
19
- )}
20
- {...props}
21
- >
22
- <ProgressPrimitive.Indicator
23
- data-slot="progress-indicator"
24
- className="size-full flex-1 bg-primary transition-all"
25
- style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
26
- />
27
- </ProgressPrimitive.Root>
28
- );
29
- }
30
-
31
- export { Progress };
@@ -1,42 +0,0 @@
1
- import * as React from 'react';
2
- import { RadioGroup as RadioGroupPrimitive } from 'radix-ui';
3
-
4
- import { cn } from '@/lib/utils';
5
-
6
- function RadioGroup({
7
- className,
8
- ...props
9
- }: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {
10
- return (
11
- <RadioGroupPrimitive.Root
12
- data-slot="radio-group"
13
- className={cn('grid w-full gap-2', className)}
14
- {...props}
15
- />
16
- );
17
- }
18
-
19
- function RadioGroupItem({
20
- className,
21
- ...props
22
- }: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {
23
- return (
24
- <RadioGroupPrimitive.Item
25
- data-slot="radio-group-item"
26
- className={cn(
27
- 'group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary',
28
- className,
29
- )}
30
- {...props}
31
- >
32
- <RadioGroupPrimitive.Indicator
33
- data-slot="radio-group-indicator"
34
- className="flex size-4 items-center justify-center"
35
- >
36
- <span className="absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" />
37
- </RadioGroupPrimitive.Indicator>
38
- </RadioGroupPrimitive.Item>
39
- );
40
- }
41
-
42
- export { RadioGroup, RadioGroupItem };
@@ -1,42 +0,0 @@
1
- 'use client';
2
-
3
- import * as ResizablePrimitive from 'react-resizable-panels';
4
-
5
- import { cn } from '@/lib/utils';
6
-
7
- function ResizablePanelGroup({ className, ...props }: ResizablePrimitive.GroupProps) {
8
- return (
9
- <ResizablePrimitive.Group
10
- data-slot="resizable-panel-group"
11
- className={cn('flex h-full w-full aria-[orientation=vertical]:flex-col', className)}
12
- {...props}
13
- />
14
- );
15
- }
16
-
17
- function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {
18
- return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />;
19
- }
20
-
21
- function ResizableHandle({
22
- withHandle,
23
- className,
24
- ...props
25
- }: ResizablePrimitive.SeparatorProps & {
26
- withHandle?: boolean;
27
- }) {
28
- return (
29
- <ResizablePrimitive.Separator
30
- data-slot="resizable-handle"
31
- className={cn(
32
- 'relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90',
33
- className,
34
- )}
35
- {...props}
36
- >
37
- {withHandle && <div className="z-10 flex h-6 w-1 shrink-0 rounded-none bg-border" />}
38
- </ResizablePrimitive.Separator>
39
- );
40
- }
41
-
42
- export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
@@ -1,53 +0,0 @@
1
- import * as React from 'react';
2
- import { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';
3
-
4
- import { cn } from '@/lib/utils';
5
-
6
- function ScrollArea({
7
- className,
8
- children,
9
- ...props
10
- }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
11
- return (
12
- <ScrollAreaPrimitive.Root
13
- data-slot="scroll-area"
14
- className={cn('relative', className)}
15
- {...props}
16
- >
17
- <ScrollAreaPrimitive.Viewport
18
- data-slot="scroll-area-viewport"
19
- className="size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1"
20
- >
21
- {children}
22
- </ScrollAreaPrimitive.Viewport>
23
- <ScrollBar />
24
- <ScrollAreaPrimitive.Corner />
25
- </ScrollAreaPrimitive.Root>
26
- );
27
- }
28
-
29
- function ScrollBar({
30
- className,
31
- orientation = 'vertical',
32
- ...props
33
- }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
34
- return (
35
- <ScrollAreaPrimitive.ScrollAreaScrollbar
36
- data-slot="scroll-area-scrollbar"
37
- data-orientation={orientation}
38
- orientation={orientation}
39
- className={cn(
40
- 'flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent',
41
- className,
42
- )}
43
- {...props}
44
- >
45
- <ScrollAreaPrimitive.ScrollAreaThumb
46
- data-slot="scroll-area-thumb"
47
- className="relative flex-1 rounded-none bg-border"
48
- />
49
- </ScrollAreaPrimitive.ScrollAreaScrollbar>
50
- );
51
- }
52
-
53
- export { ScrollArea, ScrollBar };
@@ -1,185 +0,0 @@
1
- 'use client';
2
-
3
- import * as React from 'react';
4
- import { Select as SelectPrimitive } from 'radix-ui';
5
-
6
- import { cn } from '@/lib/utils';
7
- import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from 'lucide-react';
8
-
9
- function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {
10
- return <SelectPrimitive.Root data-slot="select" {...props} />;
11
- }
12
-
13
- function SelectGroup({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {
14
- return (
15
- <SelectPrimitive.Group
16
- data-slot="select-group"
17
- className={cn('scroll-my-1', className)}
18
- {...props}
19
- />
20
- );
21
- }
22
-
23
- function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {
24
- return <SelectPrimitive.Value data-slot="select-value" {...props} />;
25
- }
26
-
27
- function SelectTrigger({
28
- className,
29
- size = 'default',
30
- children,
31
- ...props
32
- }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
33
- size?: 'sm' | 'default';
34
- }) {
35
- return (
36
- <SelectPrimitive.Trigger
37
- data-slot="select-trigger"
38
- data-size={size}
39
- className={cn(
40
- "flex w-fit items-center justify-between gap-1.5 rounded-none border border-input bg-transparent py-2 pr-2 pl-2.5 text-xs whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-none *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
41
- className,
42
- )}
43
- {...props}
44
- >
45
- {children}
46
- <SelectPrimitive.Icon asChild>
47
- <ChevronDownIcon className="pointer-events-none size-4 text-muted-foreground" />
48
- </SelectPrimitive.Icon>
49
- </SelectPrimitive.Trigger>
50
- );
51
- }
52
-
53
- function SelectContent({
54
- className,
55
- children,
56
- position = 'item-aligned',
57
- align = 'center',
58
- ...props
59
- }: React.ComponentProps<typeof SelectPrimitive.Content>) {
60
- return (
61
- <SelectPrimitive.Portal>
62
- <SelectPrimitive.Content
63
- data-slot="select-content"
64
- data-align-trigger={position === 'item-aligned'}
65
- className={cn(
66
- 'relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-none bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',
67
- position === 'popper' &&
68
- 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',
69
- className,
70
- )}
71
- position={position}
72
- align={align}
73
- {...props}
74
- >
75
- <SelectScrollUpButton />
76
- <SelectPrimitive.Viewport
77
- data-position={position}
78
- className={cn(
79
- 'data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)',
80
- position === 'popper' && '',
81
- )}
82
- >
83
- {children}
84
- </SelectPrimitive.Viewport>
85
- <SelectScrollDownButton />
86
- </SelectPrimitive.Content>
87
- </SelectPrimitive.Portal>
88
- );
89
- }
90
-
91
- function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {
92
- return (
93
- <SelectPrimitive.Label
94
- data-slot="select-label"
95
- className={cn('px-2 py-2 text-xs text-muted-foreground', className)}
96
- {...props}
97
- />
98
- );
99
- }
100
-
101
- function SelectItem({
102
- className,
103
- children,
104
- ...props
105
- }: React.ComponentProps<typeof SelectPrimitive.Item>) {
106
- return (
107
- <SelectPrimitive.Item
108
- data-slot="select-item"
109
- className={cn(
110
- "relative flex w-full cursor-default items-center gap-2 rounded-none py-2 pr-8 pl-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
111
- className,
112
- )}
113
- {...props}
114
- >
115
- <span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center">
116
- <SelectPrimitive.ItemIndicator>
117
- <CheckIcon className="pointer-events-none" />
118
- </SelectPrimitive.ItemIndicator>
119
- </span>
120
- <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
121
- </SelectPrimitive.Item>
122
- );
123
- }
124
-
125
- function SelectSeparator({
126
- className,
127
- ...props
128
- }: React.ComponentProps<typeof SelectPrimitive.Separator>) {
129
- return (
130
- <SelectPrimitive.Separator
131
- data-slot="select-separator"
132
- className={cn('pointer-events-none -mx-1 h-px bg-border', className)}
133
- {...props}
134
- />
135
- );
136
- }
137
-
138
- function SelectScrollUpButton({
139
- className,
140
- ...props
141
- }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
142
- return (
143
- <SelectPrimitive.ScrollUpButton
144
- data-slot="select-scroll-up-button"
145
- className={cn(
146
- "z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
147
- className,
148
- )}
149
- {...props}
150
- >
151
- <ChevronUpIcon />
152
- </SelectPrimitive.ScrollUpButton>
153
- );
154
- }
155
-
156
- function SelectScrollDownButton({
157
- className,
158
- ...props
159
- }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
160
- return (
161
- <SelectPrimitive.ScrollDownButton
162
- data-slot="select-scroll-down-button"
163
- className={cn(
164
- "z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
165
- className,
166
- )}
167
- {...props}
168
- >
169
- <ChevronDownIcon />
170
- </SelectPrimitive.ScrollDownButton>
171
- );
172
- }
173
-
174
- export {
175
- Select,
176
- SelectContent,
177
- SelectGroup,
178
- SelectItem,
179
- SelectLabel,
180
- SelectScrollDownButton,
181
- SelectScrollUpButton,
182
- SelectSeparator,
183
- SelectTrigger,
184
- SelectValue,
185
- };
@@ -1,26 +0,0 @@
1
- import * as React from 'react';
2
- import { Separator as SeparatorPrimitive } from 'radix-ui';
3
-
4
- import { cn } from '@/lib/utils';
5
-
6
- function Separator({
7
- className,
8
- orientation = 'horizontal',
9
- decorative = true,
10
- ...props
11
- }: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
12
- return (
13
- <SeparatorPrimitive.Root
14
- data-slot="separator"
15
- decorative={decorative}
16
- orientation={orientation}
17
- className={cn(
18
- 'shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch',
19
- className,
20
- )}
21
- {...props}
22
- />
23
- );
24
- }
25
-
26
- export { Separator };
@@ -1,128 +0,0 @@
1
- import * as React from 'react';
2
- import { Dialog as SheetPrimitive } from 'radix-ui';
3
-
4
- import { cn } from '@/lib/utils';
5
- import { Button } from '@/components/ui/button';
6
- import { XIcon } from 'lucide-react';
7
-
8
- function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
9
- return <SheetPrimitive.Root data-slot="sheet" {...props} />;
10
- }
11
-
12
- function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>) {
13
- return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />;
14
- }
15
-
16
- function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>) {
17
- return <SheetPrimitive.Close data-slot="sheet-close" {...props} />;
18
- }
19
-
20
- function SheetPortal({ ...props }: React.ComponentProps<typeof SheetPrimitive.Portal>) {
21
- return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />;
22
- }
23
-
24
- function SheetOverlay({
25
- className,
26
- ...props
27
- }: React.ComponentProps<typeof SheetPrimitive.Overlay>) {
28
- return (
29
- <SheetPrimitive.Overlay
30
- data-slot="sheet-overlay"
31
- className={cn(
32
- 'fixed inset-0 z-50 bg-black/10 text-xs/relaxed duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0',
33
- className,
34
- )}
35
- {...props}
36
- />
37
- );
38
- }
39
-
40
- function SheetContent({
41
- className,
42
- children,
43
- side = 'right',
44
- showCloseButton = true,
45
- ...props
46
- }: React.ComponentProps<typeof SheetPrimitive.Content> & {
47
- side?: 'top' | 'right' | 'bottom' | 'left';
48
- showCloseButton?: boolean;
49
- }) {
50
- return (
51
- <SheetPortal>
52
- <SheetOverlay />
53
- <SheetPrimitive.Content
54
- data-slot="sheet-content"
55
- data-side={side}
56
- className={cn(
57
- 'fixed z-50 flex flex-col bg-popover bg-clip-padding text-xs/relaxed text-popover-foreground shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10',
58
- className,
59
- )}
60
- {...props}
61
- >
62
- {children}
63
- {showCloseButton && (
64
- <SheetPrimitive.Close data-slot="sheet-close" asChild>
65
- <Button variant="ghost" className="absolute top-3 right-3" size="icon-sm">
66
- <XIcon />
67
- <span className="sr-only">Close</span>
68
- </Button>
69
- </SheetPrimitive.Close>
70
- )}
71
- </SheetPrimitive.Content>
72
- </SheetPortal>
73
- );
74
- }
75
-
76
- function SheetHeader({ className, ...props }: React.ComponentProps<'div'>) {
77
- return (
78
- <div
79
- data-slot="sheet-header"
80
- className={cn('flex flex-col gap-0.5 p-4', className)}
81
- {...props}
82
- />
83
- );
84
- }
85
-
86
- function SheetFooter({ className, ...props }: React.ComponentProps<'div'>) {
87
- return (
88
- <div
89
- data-slot="sheet-footer"
90
- className={cn('mt-auto flex flex-col gap-2 p-4', className)}
91
- {...props}
92
- />
93
- );
94
- }
95
-
96
- function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>) {
97
- return (
98
- <SheetPrimitive.Title
99
- data-slot="sheet-title"
100
- className={cn('font-heading text-sm font-medium text-foreground', className)}
101
- {...props}
102
- />
103
- );
104
- }
105
-
106
- function SheetDescription({
107
- className,
108
- ...props
109
- }: React.ComponentProps<typeof SheetPrimitive.Description>) {
110
- return (
111
- <SheetPrimitive.Description
112
- data-slot="sheet-description"
113
- className={cn('text-xs/relaxed text-muted-foreground', className)}
114
- {...props}
115
- />
116
- );
117
- }
118
-
119
- export {
120
- Sheet,
121
- SheetTrigger,
122
- SheetClose,
123
- SheetContent,
124
- SheetHeader,
125
- SheetFooter,
126
- SheetTitle,
127
- SheetDescription,
128
- };