@douglasneuroinformatics/libui 2.0.2 → 2.0.4

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 (894) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +7 -0
  2. package/dist/components/Accordion/Accordion.d.ts.map +1 -0
  3. package/dist/components/Accordion/Accordion.js +9 -0
  4. package/dist/components/Accordion/AccordionContent.d.ts +4 -0
  5. package/dist/components/Accordion/AccordionContent.d.ts.map +1 -0
  6. package/dist/components/Accordion/AccordionContent.js +7 -0
  7. package/dist/components/Accordion/AccordionItem.d.ts +4 -0
  8. package/dist/components/Accordion/AccordionItem.d.ts.map +1 -0
  9. package/dist/components/Accordion/AccordionItem.js +6 -0
  10. package/dist/components/Accordion/AccordionRoot.d.ts +4 -0
  11. package/dist/components/Accordion/AccordionRoot.d.ts.map +1 -0
  12. package/dist/components/Accordion/AccordionRoot.js +5 -0
  13. package/dist/components/Accordion/AccordionTrigger.d.ts +4 -0
  14. package/dist/components/Accordion/AccordionTrigger.d.ts.map +1 -0
  15. package/dist/components/Accordion/AccordionTrigger.js +10 -0
  16. package/dist/components/AlertDialog/AlertDialog.d.ts +13 -0
  17. package/dist/components/AlertDialog/AlertDialog.d.ts.map +1 -0
  18. package/dist/components/AlertDialog/AlertDialog.js +20 -0
  19. package/dist/components/AlertDialog/AlertDialogAction.d.ts +3 -0
  20. package/dist/components/AlertDialog/AlertDialogAction.d.ts.map +1 -0
  21. package/dist/components/AlertDialog/AlertDialogAction.js +7 -0
  22. package/dist/components/AlertDialog/AlertDialogCancel.d.ts +3 -0
  23. package/dist/components/AlertDialog/AlertDialogCancel.d.ts.map +1 -0
  24. package/dist/components/AlertDialog/AlertDialogCancel.js +7 -0
  25. package/dist/components/AlertDialog/AlertDialogContent.d.ts +3 -0
  26. package/dist/components/AlertDialog/AlertDialogContent.d.ts.map +1 -0
  27. package/dist/components/AlertDialog/AlertDialogContent.js +9 -0
  28. package/dist/components/AlertDialog/AlertDialogDescription.d.ts +3 -0
  29. package/dist/components/AlertDialog/AlertDialogDescription.d.ts.map +1 -0
  30. package/dist/components/AlertDialog/AlertDialogDescription.js +6 -0
  31. package/dist/components/AlertDialog/AlertDialogFooter.d.ts +3 -0
  32. package/dist/components/AlertDialog/AlertDialogFooter.d.ts.map +1 -0
  33. package/dist/components/AlertDialog/AlertDialogFooter.js +3 -0
  34. package/dist/components/AlertDialog/AlertDialogHeader.d.ts +3 -0
  35. package/dist/components/AlertDialog/AlertDialogHeader.d.ts.map +1 -0
  36. package/dist/components/AlertDialog/AlertDialogHeader.js +3 -0
  37. package/dist/components/AlertDialog/AlertDialogOverlay.d.ts +3 -0
  38. package/dist/components/AlertDialog/AlertDialogOverlay.d.ts.map +1 -0
  39. package/dist/components/AlertDialog/AlertDialogOverlay.js +6 -0
  40. package/dist/components/AlertDialog/AlertDialogTitle.d.ts +3 -0
  41. package/dist/components/AlertDialog/AlertDialogTitle.d.ts.map +1 -0
  42. package/dist/components/AlertDialog/AlertDialogTitle.js +6 -0
  43. package/dist/components/ArrowToggle/ArrowToggle.d.ts +287 -0
  44. package/dist/components/ArrowToggle/ArrowToggle.d.ts.map +1 -0
  45. package/dist/components/ArrowToggle/ArrowToggle.js +22 -0
  46. package/dist/components/Avatar/Avatar.d.ts +6 -0
  47. package/dist/components/Avatar/Avatar.d.ts.map +1 -0
  48. package/dist/components/Avatar/Avatar.js +7 -0
  49. package/dist/components/Avatar/AvatarFallback.d.ts +4 -0
  50. package/dist/components/Avatar/AvatarFallback.d.ts.map +1 -0
  51. package/dist/components/Avatar/AvatarFallback.js +6 -0
  52. package/dist/components/Avatar/AvatarImage.d.ts +4 -0
  53. package/dist/components/Avatar/AvatarImage.d.ts.map +1 -0
  54. package/dist/components/Avatar/AvatarImage.js +6 -0
  55. package/dist/components/Avatar/AvatarRoot.d.ts +4 -0
  56. package/dist/components/Avatar/AvatarRoot.d.ts.map +1 -0
  57. package/dist/components/Avatar/AvatarRoot.js +6 -0
  58. package/dist/components/Badge/Badge.d.ts +9 -0
  59. package/dist/components/Badge/Badge.d.ts.map +1 -0
  60. package/dist/components/Badge/Badge.js +20 -0
  61. package/dist/components/Breadcrumb/Breadcrumb.d.ts +14 -0
  62. package/dist/components/Breadcrumb/Breadcrumb.d.ts.map +1 -0
  63. package/dist/components/Breadcrumb/Breadcrumb.js +15 -0
  64. package/dist/components/Breadcrumb/BreadcrumbEllipsis.d.ts +3 -0
  65. package/dist/components/Breadcrumb/BreadcrumbEllipsis.d.ts.map +1 -0
  66. package/dist/components/Breadcrumb/BreadcrumbEllipsis.js +5 -0
  67. package/dist/components/Breadcrumb/BreadcrumbItem.d.ts +3 -0
  68. package/dist/components/Breadcrumb/BreadcrumbItem.d.ts.map +1 -0
  69. package/dist/components/Breadcrumb/BreadcrumbItem.js +5 -0
  70. package/dist/components/Breadcrumb/BreadcrumbLink.d.ts +5 -0
  71. package/dist/components/Breadcrumb/BreadcrumbLink.d.ts.map +1 -0
  72. package/dist/components/Breadcrumb/BreadcrumbLink.js +7 -0
  73. package/dist/components/Breadcrumb/BreadcrumbList.d.ts +3 -0
  74. package/dist/components/Breadcrumb/BreadcrumbList.d.ts.map +1 -0
  75. package/dist/components/Breadcrumb/BreadcrumbList.js +5 -0
  76. package/dist/components/Breadcrumb/BreadcrumbPage.d.ts +3 -0
  77. package/dist/components/Breadcrumb/BreadcrumbPage.d.ts.map +1 -0
  78. package/dist/components/Breadcrumb/BreadcrumbPage.js +5 -0
  79. package/dist/components/Breadcrumb/BreadcrumbRoot.d.ts +5 -0
  80. package/dist/components/Breadcrumb/BreadcrumbRoot.d.ts.map +1 -0
  81. package/dist/components/Breadcrumb/BreadcrumbRoot.js +4 -0
  82. package/dist/components/Breadcrumb/BreadcrumbSeparator.d.ts +3 -0
  83. package/dist/components/Breadcrumb/BreadcrumbSeparator.d.ts.map +1 -0
  84. package/dist/components/Breadcrumb/BreadcrumbSeparator.js +4 -0
  85. package/dist/components/Button/Button.d.ts +299 -0
  86. package/dist/components/Button/Button.d.ts.map +1 -0
  87. package/dist/components/Button/Button.js +37 -0
  88. package/dist/components/Card/Card.d.ts +9 -0
  89. package/dist/components/Card/Card.d.ts.map +1 -0
  90. package/dist/components/Card/Card.js +14 -0
  91. package/dist/components/Checkbox/Checkbox.d.ts +4 -0
  92. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
  93. package/dist/components/Checkbox/Checkbox.js +9 -0
  94. package/dist/components/Collapsible/Collapsible.d.ts +6 -0
  95. package/dist/components/Collapsible/Collapsible.d.ts.map +1 -0
  96. package/dist/components/Collapsible/Collapsible.js +6 -0
  97. package/dist/components/Collapsible/CollapsibleRoot.d.ts +3 -0
  98. package/dist/components/Collapsible/CollapsibleRoot.d.ts.map +1 -0
  99. package/dist/components/Collapsible/CollapsibleRoot.js +5 -0
  100. package/dist/components/Command/Command.d.ts +336 -0
  101. package/dist/components/Command/Command.d.ts.map +1 -0
  102. package/dist/components/Command/Command.js +22 -0
  103. package/dist/components/Command/CommandEmpty.d.ts +9 -0
  104. package/dist/components/Command/CommandEmpty.d.ts.map +1 -0
  105. package/dist/components/Command/CommandEmpty.js +5 -0
  106. package/dist/components/Command/CommandGroup.d.ts +13 -0
  107. package/dist/components/Command/CommandGroup.d.ts.map +1 -0
  108. package/dist/components/Command/CommandGroup.js +6 -0
  109. package/dist/components/Command/CommandInput.d.ts +10 -0
  110. package/dist/components/Command/CommandInput.d.ts.map +1 -0
  111. package/dist/components/Command/CommandInput.js +11 -0
  112. package/dist/components/Command/CommandItem.d.ts +15 -0
  113. package/dist/components/Command/CommandItem.d.ts.map +1 -0
  114. package/dist/components/Command/CommandItem.js +6 -0
  115. package/dist/components/Command/CommandList.d.ts +11 -0
  116. package/dist/components/Command/CommandList.d.ts.map +1 -0
  117. package/dist/components/Command/CommandList.js +6 -0
  118. package/dist/components/Command/CommandSeparator.d.ts +9 -0
  119. package/dist/components/Command/CommandSeparator.d.ts.map +1 -0
  120. package/dist/components/Command/CommandSeparator.js +6 -0
  121. package/dist/components/Command/CommandShortcut.d.ts +3 -0
  122. package/dist/components/Command/CommandShortcut.d.ts.map +1 -0
  123. package/dist/components/Command/CommandShortcut.js +5 -0
  124. package/dist/components/ContextMenu/ContextMenu.d.ts +24 -0
  125. package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -0
  126. package/dist/components/ContextMenu/ContextMenu.js +26 -0
  127. package/dist/components/ContextMenu/ContextMenuCheckboxItem.d.ts +4 -0
  128. package/dist/components/ContextMenu/ContextMenuCheckboxItem.d.ts.map +1 -0
  129. package/dist/components/ContextMenu/ContextMenuCheckboxItem.js +11 -0
  130. package/dist/components/ContextMenu/ContextMenuContent.d.ts +4 -0
  131. package/dist/components/ContextMenu/ContextMenuContent.d.ts.map +1 -0
  132. package/dist/components/ContextMenu/ContextMenuContent.js +7 -0
  133. package/dist/components/ContextMenu/ContextMenuItem.d.ts +6 -0
  134. package/dist/components/ContextMenu/ContextMenuItem.d.ts.map +1 -0
  135. package/dist/components/ContextMenu/ContextMenuItem.js +6 -0
  136. package/dist/components/ContextMenu/ContextMenuLabel.d.ts +6 -0
  137. package/dist/components/ContextMenu/ContextMenuLabel.d.ts.map +1 -0
  138. package/dist/components/ContextMenu/ContextMenuLabel.js +6 -0
  139. package/dist/components/ContextMenu/ContextMenuRadioItem.d.ts +4 -0
  140. package/dist/components/ContextMenu/ContextMenuRadioItem.d.ts.map +1 -0
  141. package/dist/components/ContextMenu/ContextMenuRadioItem.js +11 -0
  142. package/dist/components/ContextMenu/ContextMenuSeparator.d.ts +4 -0
  143. package/dist/components/ContextMenu/ContextMenuSeparator.d.ts.map +1 -0
  144. package/dist/components/ContextMenu/ContextMenuSeparator.js +6 -0
  145. package/dist/components/ContextMenu/ContextMenuShortcut.d.ts +3 -0
  146. package/dist/components/ContextMenu/ContextMenuShortcut.d.ts.map +1 -0
  147. package/dist/components/ContextMenu/ContextMenuShortcut.js +5 -0
  148. package/dist/components/ContextMenu/ContextMenuSubContent.d.ts +4 -0
  149. package/dist/components/ContextMenu/ContextMenuSubContent.d.ts.map +1 -0
  150. package/dist/components/ContextMenu/ContextMenuSubContent.js +6 -0
  151. package/dist/components/ContextMenu/ContextMenuSubTrigger.d.ts +6 -0
  152. package/dist/components/ContextMenu/ContextMenuSubTrigger.d.ts.map +1 -0
  153. package/dist/components/ContextMenu/ContextMenuSubTrigger.js +9 -0
  154. package/dist/components/DatePicker/Calendar.d.ts +9 -0
  155. package/dist/components/DatePicker/Calendar.d.ts.map +1 -0
  156. package/dist/components/DatePicker/Calendar.js +28 -0
  157. package/dist/components/DatePicker/DatePicker.d.ts +8 -0
  158. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -0
  159. package/dist/components/DatePicker/DatePicker.js +79 -0
  160. package/dist/components/DatePicker/YearSelector.d.ts +7 -0
  161. package/dist/components/DatePicker/YearSelector.d.ts.map +1 -0
  162. package/dist/components/DatePicker/YearSelector.js +20 -0
  163. package/dist/components/Dialog/Dialog.d.ts +10 -0
  164. package/dist/components/Dialog/Dialog.d.ts.map +1 -0
  165. package/dist/components/Dialog/Dialog.js +14 -0
  166. package/dist/components/Dialog/DialogContent.d.ts +3 -0
  167. package/dist/components/Dialog/DialogContent.d.ts.map +1 -0
  168. package/dist/components/Dialog/DialogContent.js +13 -0
  169. package/dist/components/Dialog/DialogDescription.d.ts +3 -0
  170. package/dist/components/Dialog/DialogDescription.d.ts.map +1 -0
  171. package/dist/components/Dialog/DialogDescription.js +6 -0
  172. package/dist/components/Dialog/DialogFooter.d.ts +3 -0
  173. package/dist/components/Dialog/DialogFooter.d.ts.map +1 -0
  174. package/dist/components/Dialog/DialogFooter.js +3 -0
  175. package/dist/components/Dialog/DialogHeader.d.ts +3 -0
  176. package/dist/components/Dialog/DialogHeader.d.ts.map +1 -0
  177. package/dist/components/Dialog/DialogHeader.js +3 -0
  178. package/dist/components/Dialog/DialogOverlay.d.ts +3 -0
  179. package/dist/components/Dialog/DialogOverlay.d.ts.map +1 -0
  180. package/dist/components/Dialog/DialogOverlay.js +6 -0
  181. package/dist/components/Dialog/DialogTitle.d.ts +3 -0
  182. package/dist/components/Dialog/DialogTitle.d.ts.map +1 -0
  183. package/dist/components/Dialog/DialogTitle.js +6 -0
  184. package/dist/components/Drawer/Drawer.d.ts +14 -0
  185. package/dist/components/Drawer/Drawer.d.ts.map +1 -0
  186. package/dist/components/Drawer/Drawer.js +17 -0
  187. package/dist/components/Drawer/DrawerContent.d.ts +5 -0
  188. package/dist/components/Drawer/DrawerContent.d.ts.map +1 -0
  189. package/dist/components/Drawer/DrawerContent.js +10 -0
  190. package/dist/components/Drawer/DrawerDescription.d.ts +3 -0
  191. package/dist/components/Drawer/DrawerDescription.d.ts.map +1 -0
  192. package/dist/components/Drawer/DrawerDescription.js +6 -0
  193. package/dist/components/Drawer/DrawerFooter.d.ts +3 -0
  194. package/dist/components/Drawer/DrawerFooter.d.ts.map +1 -0
  195. package/dist/components/Drawer/DrawerFooter.js +3 -0
  196. package/dist/components/Drawer/DrawerHeader.d.ts +3 -0
  197. package/dist/components/Drawer/DrawerHeader.d.ts.map +1 -0
  198. package/dist/components/Drawer/DrawerHeader.js +3 -0
  199. package/dist/components/Drawer/DrawerTitle.d.ts +3 -0
  200. package/dist/components/Drawer/DrawerTitle.d.ts.map +1 -0
  201. package/dist/components/Drawer/DrawerTitle.js +6 -0
  202. package/dist/components/DropdownButton/DropdownButton.d.ts +3 -0
  203. package/dist/components/DropdownButton/DropdownButton.d.ts.map +1 -0
  204. package/dist/components/DropdownButton/DropdownButton.js +8 -0
  205. package/dist/components/DropdownMenu/DropdownMenu.d.ts +27 -0
  206. package/dist/components/DropdownMenu/DropdownMenu.d.ts.map +1 -0
  207. package/dist/components/DropdownMenu/DropdownMenu.js +26 -0
  208. package/dist/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +4 -0
  209. package/dist/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -0
  210. package/dist/components/DropdownMenu/DropdownMenuCheckboxItem.js +11 -0
  211. package/dist/components/DropdownMenu/DropdownMenuContent.d.ts +9 -0
  212. package/dist/components/DropdownMenu/DropdownMenuContent.d.ts.map +1 -0
  213. package/dist/components/DropdownMenu/DropdownMenuContent.js +7 -0
  214. package/dist/components/DropdownMenu/DropdownMenuItem.d.ts +6 -0
  215. package/dist/components/DropdownMenu/DropdownMenuItem.d.ts.map +1 -0
  216. package/dist/components/DropdownMenu/DropdownMenuItem.js +6 -0
  217. package/dist/components/DropdownMenu/DropdownMenuLabel.d.ts +6 -0
  218. package/dist/components/DropdownMenu/DropdownMenuLabel.d.ts.map +1 -0
  219. package/dist/components/DropdownMenu/DropdownMenuLabel.js +6 -0
  220. package/dist/components/DropdownMenu/DropdownMenuRadioItem.d.ts +4 -0
  221. package/dist/components/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -0
  222. package/dist/components/DropdownMenu/DropdownMenuRadioItem.js +11 -0
  223. package/dist/components/DropdownMenu/DropdownMenuSeparator.d.ts +4 -0
  224. package/dist/components/DropdownMenu/DropdownMenuSeparator.d.ts.map +1 -0
  225. package/dist/components/DropdownMenu/DropdownMenuSeparator.js +6 -0
  226. package/dist/components/DropdownMenu/DropdownMenuShortcut.d.ts +3 -0
  227. package/dist/components/DropdownMenu/DropdownMenuShortcut.d.ts.map +1 -0
  228. package/dist/components/DropdownMenu/DropdownMenuShortcut.js +5 -0
  229. package/dist/components/DropdownMenu/DropdownMenuSubContent.d.ts +4 -0
  230. package/dist/components/DropdownMenu/DropdownMenuSubContent.d.ts.map +1 -0
  231. package/dist/components/DropdownMenu/DropdownMenuSubContent.js +6 -0
  232. package/dist/components/DropdownMenu/DropdownMenuSubTrigger.d.ts +6 -0
  233. package/dist/components/DropdownMenu/DropdownMenuSubTrigger.d.ts.map +1 -0
  234. package/dist/components/DropdownMenu/DropdownMenuSubTrigger.js +9 -0
  235. package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +5 -0
  236. package/dist/components/ErrorBoundary/ErrorBoundary.d.ts.map +1 -0
  237. package/dist/components/ErrorBoundary/ErrorBoundary.js +6 -0
  238. package/dist/components/ErrorFallback/ErrorFallback.d.ts +8 -0
  239. package/dist/components/ErrorFallback/ErrorFallback.d.ts.map +1 -0
  240. package/dist/components/ErrorFallback/ErrorFallback.js +16 -0
  241. package/dist/components/Form/BaseRadioField.d.ts +13 -0
  242. package/dist/components/Form/BaseRadioField.d.ts.map +1 -0
  243. package/dist/components/Form/BaseRadioField.js +27 -0
  244. package/dist/components/Form/BooleanField/BooleanField.d.ts +6 -0
  245. package/dist/components/Form/BooleanField/BooleanField.d.ts.map +1 -0
  246. package/dist/components/Form/BooleanField/BooleanField.js +10 -0
  247. package/dist/components/Form/BooleanField/BooleanFieldCheckbox.d.ts +9 -0
  248. package/dist/components/Form/BooleanField/BooleanFieldCheckbox.d.ts.map +1 -0
  249. package/dist/components/Form/BooleanField/BooleanFieldCheckbox.js +15 -0
  250. package/dist/components/Form/BooleanField/BooleanFieldRadio.d.ts +9 -0
  251. package/dist/components/Form/BooleanField/BooleanFieldRadio.d.ts.map +1 -0
  252. package/dist/components/Form/BooleanField/BooleanFieldRadio.js +31 -0
  253. package/dist/components/Form/DateField/DateField.d.ts +7 -0
  254. package/dist/components/Form/DateField/DateField.d.ts.map +1 -0
  255. package/dist/components/Form/DateField/DateField.js +40 -0
  256. package/dist/components/Form/DynamicField.d.ts +13 -0
  257. package/dist/components/Form/DynamicField.d.ts.map +1 -0
  258. package/dist/components/Form/DynamicField.js +21 -0
  259. package/dist/components/Form/ErrorMessage.d.ts +5 -0
  260. package/dist/components/Form/ErrorMessage.d.ts.map +1 -0
  261. package/dist/components/Form/ErrorMessage.js +5 -0
  262. package/dist/components/Form/FieldGroup/FieldGroup.d.ts +15 -0
  263. package/dist/components/Form/FieldGroup/FieldGroup.d.ts.map +1 -0
  264. package/dist/components/Form/FieldGroup/FieldGroup.js +9 -0
  265. package/dist/components/Form/FieldGroup/FieldGroupDescription.d.ts +5 -0
  266. package/dist/components/Form/FieldGroup/FieldGroupDescription.d.ts.map +1 -0
  267. package/dist/components/Form/FieldGroup/FieldGroupDescription.js +8 -0
  268. package/dist/components/Form/FieldGroup/FieldGroupRoot.d.ts +5 -0
  269. package/dist/components/Form/FieldGroup/FieldGroupRoot.d.ts.map +1 -0
  270. package/dist/components/Form/FieldGroup/FieldGroupRoot.js +2 -0
  271. package/dist/components/Form/FieldGroup/FieldGroupRow.d.ts +5 -0
  272. package/dist/components/Form/FieldGroup/FieldGroupRow.d.ts.map +1 -0
  273. package/dist/components/Form/FieldGroup/FieldGroupRow.js +2 -0
  274. package/dist/components/Form/FieldsComponent.d.ts +13 -0
  275. package/dist/components/Form/FieldsComponent.d.ts.map +1 -0
  276. package/dist/components/Form/FieldsComponent.js +13 -0
  277. package/dist/components/Form/Form.d.ts +18 -0
  278. package/dist/components/Form/Form.d.ts.map +1 -0
  279. package/dist/components/Form/Form.js +64 -0
  280. package/dist/components/Form/NumberField/NumberField.d.ts +7 -0
  281. package/dist/components/Form/NumberField/NumberField.d.ts.map +1 -0
  282. package/dist/components/Form/NumberField/NumberField.js +12 -0
  283. package/dist/components/Form/NumberField/NumberFieldInput.d.ts +9 -0
  284. package/dist/components/Form/NumberField/NumberFieldInput.d.ts.map +1 -0
  285. package/dist/components/Form/NumberField/NumberFieldInput.js +21 -0
  286. package/dist/components/Form/NumberField/NumberFieldRadio.d.ts +9 -0
  287. package/dist/components/Form/NumberField/NumberFieldRadio.d.ts.map +1 -0
  288. package/dist/components/Form/NumberField/NumberFieldRadio.js +19 -0
  289. package/dist/components/Form/NumberField/NumberFieldSlider.d.ts +9 -0
  290. package/dist/components/Form/NumberField/NumberFieldSlider.d.ts.map +1 -0
  291. package/dist/components/Form/NumberField/NumberFieldSlider.js +14 -0
  292. package/dist/components/Form/NumberRecordField.d.ts +7 -0
  293. package/dist/components/Form/NumberRecordField.d.ts.map +1 -0
  294. package/dist/components/Form/NumberRecordField.js +17 -0
  295. package/dist/components/Form/RecordArrayField.d.ts +23 -0
  296. package/dist/components/Form/RecordArrayField.d.ts.map +1 -0
  297. package/dist/components/Form/RecordArrayField.js +56 -0
  298. package/dist/components/Form/ScalarField.d.ts +8 -0
  299. package/dist/components/Form/ScalarField.d.ts.map +1 -0
  300. package/dist/components/Form/ScalarField.js +22 -0
  301. package/dist/components/Form/SetField/SetField.d.ts +7 -0
  302. package/dist/components/Form/SetField/SetField.d.ts.map +1 -0
  303. package/dist/components/Form/SetField/SetField.js +27 -0
  304. package/dist/components/Form/SetField/SetFieldListbox.d.ts +7 -0
  305. package/dist/components/Form/SetField/SetFieldListbox.d.ts.map +1 -0
  306. package/dist/components/Form/SetField/SetFieldListbox.js +16 -0
  307. package/dist/components/Form/SetField/SetFieldSelect.d.ts +7 -0
  308. package/dist/components/Form/SetField/SetFieldSelect.d.ts.map +1 -0
  309. package/dist/components/Form/SetField/SetFieldSelect.js +23 -0
  310. package/dist/components/Form/StaticField.d.ts +14 -0
  311. package/dist/components/Form/StaticField.d.ts.map +1 -0
  312. package/dist/components/Form/StaticField.js +17 -0
  313. package/dist/components/Form/StringField/StringField.d.ts +8 -0
  314. package/dist/components/Form/StringField/StringField.d.ts.map +1 -0
  315. package/dist/components/Form/StringField/StringField.js +16 -0
  316. package/dist/components/Form/StringField/StringFieldInput.d.ts +6 -0
  317. package/dist/components/Form/StringField/StringFieldInput.d.ts.map +1 -0
  318. package/dist/components/Form/StringField/StringFieldInput.js +12 -0
  319. package/dist/components/Form/StringField/StringFieldPassword.d.ts +6 -0
  320. package/dist/components/Form/StringField/StringFieldPassword.d.ts.map +1 -0
  321. package/dist/components/Form/StringField/StringFieldPassword.js +19 -0
  322. package/dist/components/Form/StringField/StringFieldRadio.d.ts +9 -0
  323. package/dist/components/Form/StringField/StringFieldRadio.d.ts.map +1 -0
  324. package/dist/components/Form/StringField/StringFieldRadio.js +5 -0
  325. package/dist/components/Form/StringField/StringFieldSelect.d.ts +9 -0
  326. package/dist/components/Form/StringField/StringFieldSelect.d.ts.map +1 -0
  327. package/dist/components/Form/StringField/StringFieldSelect.js +16 -0
  328. package/dist/components/Form/StringField/StringFieldTextArea.d.ts +6 -0
  329. package/dist/components/Form/StringField/StringFieldTextArea.d.ts.map +1 -0
  330. package/dist/components/Form/StringField/StringFieldTextArea.js +12 -0
  331. package/dist/components/Form/types.d.ts +23 -0
  332. package/dist/components/Form/types.d.ts.map +1 -0
  333. package/dist/components/Form/types.js +1 -0
  334. package/dist/components/Form/utils.d.ts +10 -0
  335. package/dist/components/Form/utils.d.ts.map +1 -0
  336. package/dist/components/Form/utils.js +44 -0
  337. package/dist/components/Heading/Heading.d.ts +8 -0
  338. package/dist/components/Heading/Heading.d.ts.map +1 -0
  339. package/dist/components/Heading/Heading.js +18 -0
  340. package/dist/components/HoverCard/HoverCard.d.ts +6 -0
  341. package/dist/components/HoverCard/HoverCard.d.ts.map +1 -0
  342. package/dist/components/HoverCard/HoverCard.js +6 -0
  343. package/dist/components/HoverCard/HoverCardContent.d.ts +3 -0
  344. package/dist/components/HoverCard/HoverCardContent.d.ts.map +1 -0
  345. package/dist/components/HoverCard/HoverCardContent.js +6 -0
  346. package/dist/components/Input/Input.d.ts +4 -0
  347. package/dist/components/Input/Input.d.ts.map +1 -0
  348. package/dist/components/Input/Input.js +5 -0
  349. package/dist/components/Label/Label.d.ts +6 -0
  350. package/dist/components/Label/Label.d.ts.map +1 -0
  351. package/dist/components/Label/Label.js +8 -0
  352. package/dist/components/LanguageToggle/LanguageToggle.d.ts +12 -0
  353. package/dist/components/LanguageToggle/LanguageToggle.d.ts.map +1 -0
  354. package/dist/components/LanguageToggle/LanguageToggle.js +13 -0
  355. package/dist/components/LegacyDropdown/LegacyDropdown.d.ts +21 -0
  356. package/dist/components/LegacyDropdown/LegacyDropdown.d.ts.map +1 -0
  357. package/dist/components/LegacyDropdown/LegacyDropdown.js +17 -0
  358. package/dist/components/LegacyModal/LegacyModal.d.ts +13 -0
  359. package/dist/components/LegacyModal/LegacyModal.d.ts.map +1 -0
  360. package/dist/components/LegacyModal/LegacyModal.js +25 -0
  361. package/dist/components/LegacySelectDropdown/LegacySelectDropdown.d.ts +21 -0
  362. package/dist/components/LegacySelectDropdown/LegacySelectDropdown.d.ts.map +1 -0
  363. package/dist/components/LegacySelectDropdown/LegacySelectDropdown.js +18 -0
  364. package/dist/components/LegacySlider/LegacySlider.d.ts +11 -0
  365. package/dist/components/LegacySlider/LegacySlider.d.ts.map +1 -0
  366. package/dist/components/LegacySlider/LegacySlider.js +24 -0
  367. package/dist/components/LegacyStepper/LegacyStepper.d.ts +15 -0
  368. package/dist/components/LegacyStepper/LegacyStepper.d.ts.map +1 -0
  369. package/dist/components/LegacyStepper/LegacyStepper.js +46 -0
  370. package/dist/components/LegacyTable/LegacyClientTable.d.ts +5 -0
  371. package/dist/components/LegacyTable/LegacyClientTable.d.ts.map +1 -0
  372. package/dist/components/LegacyTable/LegacyClientTable.js +29 -0
  373. package/dist/components/LegacyTable/LegacyTable.d.ts +29 -0
  374. package/dist/components/LegacyTable/LegacyTable.d.ts.map +1 -0
  375. package/dist/components/LegacyTable/LegacyTable.js +54 -0
  376. package/dist/components/LegacyTable/LegacyTableColumnHeader.d.ts +16 -0
  377. package/dist/components/LegacyTable/LegacyTableColumnHeader.d.ts.map +1 -0
  378. package/dist/components/LegacyTable/LegacyTableColumnHeader.js +20 -0
  379. package/dist/components/LineGraph/LineGraph.d.ts +28 -0
  380. package/dist/components/LineGraph/LineGraph.d.ts.map +1 -0
  381. package/dist/components/LineGraph/LineGraph.js +42 -0
  382. package/dist/components/MenuBar/MenuBar.d.ts +28 -0
  383. package/dist/components/MenuBar/MenuBar.d.ts.map +1 -0
  384. package/dist/components/MenuBar/MenuBar.js +29 -0
  385. package/dist/components/MenuBar/MenuBarCheckboxItem.d.ts +3 -0
  386. package/dist/components/MenuBar/MenuBarCheckboxItem.d.ts.map +1 -0
  387. package/dist/components/MenuBar/MenuBarCheckboxItem.js +11 -0
  388. package/dist/components/MenuBar/MenuBarContent.d.ts +3 -0
  389. package/dist/components/MenuBar/MenuBarContent.d.ts.map +1 -0
  390. package/dist/components/MenuBar/MenuBarContent.js +7 -0
  391. package/dist/components/MenuBar/MenuBarItem.d.ts +5 -0
  392. package/dist/components/MenuBar/MenuBarItem.d.ts.map +1 -0
  393. package/dist/components/MenuBar/MenuBarItem.js +6 -0
  394. package/dist/components/MenuBar/MenuBarLabel.d.ts +5 -0
  395. package/dist/components/MenuBar/MenuBarLabel.d.ts.map +1 -0
  396. package/dist/components/MenuBar/MenuBarLabel.js +6 -0
  397. package/dist/components/MenuBar/MenuBarRadioItem.d.ts +3 -0
  398. package/dist/components/MenuBar/MenuBarRadioItem.d.ts.map +1 -0
  399. package/dist/components/MenuBar/MenuBarRadioItem.js +11 -0
  400. package/dist/components/MenuBar/MenuBarRoot.d.ts +3 -0
  401. package/dist/components/MenuBar/MenuBarRoot.d.ts.map +1 -0
  402. package/dist/components/MenuBar/MenuBarRoot.js +6 -0
  403. package/dist/components/MenuBar/MenuBarSeparator.d.ts +3 -0
  404. package/dist/components/MenuBar/MenuBarSeparator.d.ts.map +1 -0
  405. package/dist/components/MenuBar/MenuBarSeparator.js +6 -0
  406. package/dist/components/MenuBar/MenuBarShortcut.d.ts +3 -0
  407. package/dist/components/MenuBar/MenuBarShortcut.d.ts.map +1 -0
  408. package/dist/components/MenuBar/MenuBarShortcut.js +5 -0
  409. package/dist/components/MenuBar/MenuBarSubContent.d.ts +3 -0
  410. package/dist/components/MenuBar/MenuBarSubContent.d.ts.map +1 -0
  411. package/dist/components/MenuBar/MenuBarSubContent.js +6 -0
  412. package/dist/components/MenuBar/MenuBarSubTrigger.d.ts +5 -0
  413. package/dist/components/MenuBar/MenuBarSubTrigger.d.ts.map +1 -0
  414. package/dist/components/MenuBar/MenuBarSubTrigger.js +9 -0
  415. package/dist/components/MenuBar/MenuBarTrigger.d.ts +3 -0
  416. package/dist/components/MenuBar/MenuBarTrigger.d.ts.map +1 -0
  417. package/dist/components/MenuBar/MenuBarTrigger.js +6 -0
  418. package/dist/components/NotificationHub/NotificationHub.d.ts +8 -0
  419. package/dist/components/NotificationHub/NotificationHub.d.ts.map +1 -0
  420. package/dist/components/NotificationHub/NotificationHub.js +28 -0
  421. package/dist/components/NotificationHub/NotificationIcon.d.ts +7 -0
  422. package/dist/components/NotificationHub/NotificationIcon.d.ts.map +1 -0
  423. package/dist/components/NotificationHub/NotificationIcon.js +15 -0
  424. package/dist/components/Pagination/Pagination.d.ts +845 -0
  425. package/dist/components/Pagination/Pagination.d.ts.map +1 -0
  426. package/dist/components/Pagination/Pagination.js +15 -0
  427. package/dist/components/Pagination/PaginationContent.d.ts +3 -0
  428. package/dist/components/Pagination/PaginationContent.d.ts.map +1 -0
  429. package/dist/components/Pagination/PaginationContent.js +3 -0
  430. package/dist/components/Pagination/PaginationEllipsis.d.ts +3 -0
  431. package/dist/components/Pagination/PaginationEllipsis.d.ts.map +1 -0
  432. package/dist/components/Pagination/PaginationEllipsis.js +6 -0
  433. package/dist/components/Pagination/PaginationItem.d.ts +3 -0
  434. package/dist/components/Pagination/PaginationItem.d.ts.map +1 -0
  435. package/dist/components/Pagination/PaginationItem.js +2 -0
  436. package/dist/components/Pagination/PaginationLink.d.ts +8 -0
  437. package/dist/components/Pagination/PaginationLink.d.ts.map +1 -0
  438. package/dist/components/Pagination/PaginationLink.js +7 -0
  439. package/dist/components/Pagination/PaginationNext.d.ts +4 -0
  440. package/dist/components/Pagination/PaginationNext.d.ts.map +1 -0
  441. package/dist/components/Pagination/PaginationNext.js +11 -0
  442. package/dist/components/Pagination/PaginationPrevious.d.ts +4 -0
  443. package/dist/components/Pagination/PaginationPrevious.d.ts.map +1 -0
  444. package/dist/components/Pagination/PaginationPrevious.js +11 -0
  445. package/dist/components/Pagination/PaginationRoot.d.ts +3 -0
  446. package/dist/components/Pagination/PaginationRoot.d.ts.map +1 -0
  447. package/dist/components/Pagination/PaginationRoot.js +3 -0
  448. package/dist/components/Popover/Popover.d.ts +6 -0
  449. package/dist/components/Popover/Popover.d.ts.map +1 -0
  450. package/dist/components/Popover/Popover.js +6 -0
  451. package/dist/components/Popover/PopoverContent.d.ts +19 -0
  452. package/dist/components/Popover/PopoverContent.d.ts.map +1 -0
  453. package/dist/components/Popover/PopoverContent.js +7 -0
  454. package/dist/components/Progress/Progress.d.ts +4 -0
  455. package/dist/components/Progress/Progress.d.ts.map +1 -0
  456. package/dist/components/Progress/Progress.js +7 -0
  457. package/dist/components/RadioGroup/RadioGroup.d.ts +8 -0
  458. package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -0
  459. package/dist/components/RadioGroup/RadioGroup.js +10 -0
  460. package/dist/components/RadioGroup/RadioGroupItem.d.ts +4 -0
  461. package/dist/components/RadioGroup/RadioGroupItem.d.ts.map +1 -0
  462. package/dist/components/RadioGroup/RadioGroupItem.js +9 -0
  463. package/dist/components/Resizable/Resizable.d.ts +15 -0
  464. package/dist/components/Resizable/Resizable.d.ts.map +1 -0
  465. package/dist/components/Resizable/Resizable.js +11 -0
  466. package/dist/components/Resizable/ResizableHandle.d.ts +7 -0
  467. package/dist/components/Resizable/ResizableHandle.d.ts.map +1 -0
  468. package/dist/components/Resizable/ResizableHandle.js +6 -0
  469. package/dist/components/Resizable/ResizablePanelGroup.d.ts +5 -0
  470. package/dist/components/Resizable/ResizablePanelGroup.d.ts.map +1 -0
  471. package/dist/components/Resizable/ResizablePanelGroup.js +4 -0
  472. package/dist/components/ScrollArea/ScrollArea.d.ts +3 -0
  473. package/dist/components/ScrollArea/ScrollArea.d.ts.map +1 -0
  474. package/dist/components/ScrollArea/ScrollArea.js +10 -0
  475. package/dist/components/ScrollArea/ScrollBar.d.ts +3 -0
  476. package/dist/components/ScrollArea/ScrollBar.d.ts.map +1 -0
  477. package/dist/components/ScrollArea/ScrollBar.js +7 -0
  478. package/dist/components/SearchBar/SearchBar.d.ts +23 -0
  479. package/dist/components/SearchBar/SearchBar.d.ts.map +1 -0
  480. package/dist/components/SearchBar/SearchBar.js +13 -0
  481. package/dist/components/Select/Select.d.ts +14 -0
  482. package/dist/components/Select/Select.d.ts.map +1 -0
  483. package/dist/components/Select/Select.js +19 -0
  484. package/dist/components/Select/SelectContent.d.ts +4 -0
  485. package/dist/components/Select/SelectContent.d.ts.map +1 -0
  486. package/dist/components/Select/SelectContent.js +14 -0
  487. package/dist/components/Select/SelectItem.d.ts +4 -0
  488. package/dist/components/Select/SelectItem.d.ts.map +1 -0
  489. package/dist/components/Select/SelectItem.js +11 -0
  490. package/dist/components/Select/SelectLabel.d.ts +4 -0
  491. package/dist/components/Select/SelectLabel.d.ts.map +1 -0
  492. package/dist/components/Select/SelectLabel.js +6 -0
  493. package/dist/components/Select/SelectScrollDownButton.d.ts +4 -0
  494. package/dist/components/Select/SelectScrollDownButton.d.ts.map +1 -0
  495. package/dist/components/Select/SelectScrollDownButton.js +8 -0
  496. package/dist/components/Select/SelectScrollUpButton.d.ts +4 -0
  497. package/dist/components/Select/SelectScrollUpButton.d.ts.map +1 -0
  498. package/dist/components/Select/SelectScrollUpButton.js +8 -0
  499. package/dist/components/Select/SelectSeparator.d.ts +4 -0
  500. package/dist/components/Select/SelectSeparator.d.ts.map +1 -0
  501. package/dist/components/Select/SelectSeparator.js +6 -0
  502. package/dist/components/Select/SelectTrigger.d.ts +4 -0
  503. package/dist/components/Select/SelectTrigger.d.ts.map +1 -0
  504. package/dist/components/Select/SelectTrigger.js +7 -0
  505. package/dist/components/Separator/Separator.d.ts +4 -0
  506. package/dist/components/Separator/Separator.d.ts.map +1 -0
  507. package/dist/components/Separator/Separator.js +6 -0
  508. package/dist/components/Sheet/Sheet.d.ts +15 -0
  509. package/dist/components/Sheet/Sheet.d.ts.map +1 -0
  510. package/dist/components/Sheet/Sheet.js +18 -0
  511. package/dist/components/Sheet/SheetContent.d.ts +11 -0
  512. package/dist/components/Sheet/SheetContent.d.ts.map +1 -0
  513. package/dist/components/Sheet/SheetContent.js +27 -0
  514. package/dist/components/Sheet/SheetDescription.d.ts +3 -0
  515. package/dist/components/Sheet/SheetDescription.d.ts.map +1 -0
  516. package/dist/components/Sheet/SheetDescription.js +6 -0
  517. package/dist/components/Sheet/SheetFooter.d.ts +3 -0
  518. package/dist/components/Sheet/SheetFooter.d.ts.map +1 -0
  519. package/dist/components/Sheet/SheetFooter.js +3 -0
  520. package/dist/components/Sheet/SheetHeader.d.ts +3 -0
  521. package/dist/components/Sheet/SheetHeader.d.ts.map +1 -0
  522. package/dist/components/Sheet/SheetHeader.js +3 -0
  523. package/dist/components/Sheet/SheetOverlay.d.ts +3 -0
  524. package/dist/components/Sheet/SheetOverlay.d.ts.map +1 -0
  525. package/dist/components/Sheet/SheetOverlay.js +6 -0
  526. package/dist/components/Sheet/SheetTitle.d.ts +3 -0
  527. package/dist/components/Sheet/SheetTitle.d.ts.map +1 -0
  528. package/dist/components/Sheet/SheetTitle.js +6 -0
  529. package/dist/components/Slider/Slider.d.ts +3 -0
  530. package/dist/components/Slider/Slider.d.ts.map +1 -0
  531. package/dist/components/Slider/Slider.js +9 -0
  532. package/dist/components/Spinner/Spinner.d.ts +4 -0
  533. package/dist/components/Spinner/Spinner.d.ts.map +1 -0
  534. package/dist/components/Spinner/Spinner.js +13 -0
  535. package/dist/components/SpinnerIcon/SpinnerIcon.d.ts +3 -0
  536. package/dist/components/SpinnerIcon/SpinnerIcon.d.ts.map +1 -0
  537. package/dist/components/SpinnerIcon/SpinnerIcon.js +4 -0
  538. package/dist/components/Switch/Switch.d.ts +4 -0
  539. package/dist/components/Switch/Switch.d.ts.map +1 -0
  540. package/dist/components/Switch/Switch.js +7 -0
  541. package/dist/components/Table/Table.d.ts +11 -0
  542. package/dist/components/Table/Table.d.ts.map +1 -0
  543. package/dist/components/Table/Table.js +17 -0
  544. package/dist/components/Table/TableBody.d.ts +3 -0
  545. package/dist/components/Table/TableBody.d.ts.map +1 -0
  546. package/dist/components/Table/TableBody.js +5 -0
  547. package/dist/components/Table/TableCaption.d.ts +3 -0
  548. package/dist/components/Table/TableCaption.d.ts.map +1 -0
  549. package/dist/components/Table/TableCaption.js +5 -0
  550. package/dist/components/Table/TableCell.d.ts +3 -0
  551. package/dist/components/Table/TableCell.d.ts.map +1 -0
  552. package/dist/components/Table/TableCell.js +5 -0
  553. package/dist/components/Table/TableFooter.d.ts +3 -0
  554. package/dist/components/Table/TableFooter.d.ts.map +1 -0
  555. package/dist/components/Table/TableFooter.js +5 -0
  556. package/dist/components/Table/TableHead.d.ts +3 -0
  557. package/dist/components/Table/TableHead.d.ts.map +1 -0
  558. package/dist/components/Table/TableHead.js +5 -0
  559. package/dist/components/Table/TableHeader.d.ts +3 -0
  560. package/dist/components/Table/TableHeader.d.ts.map +1 -0
  561. package/dist/components/Table/TableHeader.js +5 -0
  562. package/dist/components/Table/TableRoot.d.ts +3 -0
  563. package/dist/components/Table/TableRoot.d.ts.map +1 -0
  564. package/dist/components/Table/TableRoot.js +6 -0
  565. package/dist/components/Table/TableRow.d.ts +3 -0
  566. package/dist/components/Table/TableRow.d.ts.map +1 -0
  567. package/dist/components/Table/TableRow.js +5 -0
  568. package/dist/components/Tabs/Tabs.d.ts +7 -0
  569. package/dist/components/Tabs/Tabs.d.ts.map +1 -0
  570. package/dist/components/Tabs/Tabs.js +9 -0
  571. package/dist/components/Tabs/TabsContent.d.ts +4 -0
  572. package/dist/components/Tabs/TabsContent.d.ts.map +1 -0
  573. package/dist/components/Tabs/TabsContent.js +6 -0
  574. package/dist/components/Tabs/TabsList.d.ts +4 -0
  575. package/dist/components/Tabs/TabsList.d.ts.map +1 -0
  576. package/dist/components/Tabs/TabsList.js +6 -0
  577. package/dist/components/Tabs/TabsRoot.d.ts +3 -0
  578. package/dist/components/Tabs/TabsRoot.d.ts.map +1 -0
  579. package/dist/components/Tabs/TabsRoot.js +5 -0
  580. package/dist/components/Tabs/TabsTrigger.d.ts +4 -0
  581. package/dist/components/Tabs/TabsTrigger.d.ts.map +1 -0
  582. package/dist/components/Tabs/TabsTrigger.js +6 -0
  583. package/dist/components/TextArea/TextArea.d.ts +4 -0
  584. package/dist/components/TextArea/TextArea.d.ts.map +1 -0
  585. package/dist/components/TextArea/TextArea.js +5 -0
  586. package/dist/components/ThemeToggle/ThemeToggle.d.ts +5 -0
  587. package/dist/components/ThemeToggle/ThemeToggle.d.ts.map +1 -0
  588. package/dist/components/ThemeToggle/ThemeToggle.js +16 -0
  589. package/dist/components/Tooltip/Tooltip.d.ts +6 -0
  590. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -0
  591. package/dist/components/Tooltip/Tooltip.js +7 -0
  592. package/dist/components/Tooltip/TooltipContent.d.ts +15 -0
  593. package/dist/components/Tooltip/TooltipContent.d.ts.map +1 -0
  594. package/dist/components/Tooltip/TooltipContent.js +6 -0
  595. package/dist/components/Tooltip/TooltipRoot.d.ts +11 -0
  596. package/dist/components/Tooltip/TooltipRoot.d.ts.map +1 -0
  597. package/dist/components/Tooltip/TooltipRoot.js +6 -0
  598. package/dist/components/Tooltip/TooltipTrigger.d.ts +5 -0
  599. package/dist/components/Tooltip/TooltipTrigger.d.ts.map +1 -0
  600. package/dist/components/Tooltip/TooltipTrigger.js +7 -0
  601. package/dist/components.d.ts +55 -0
  602. package/dist/components.d.ts.map +1 -0
  603. package/dist/components.js +54 -0
  604. package/dist/context/LegacyStepperContext.d.ts +7 -0
  605. package/dist/context/LegacyStepperContext.d.ts.map +1 -0
  606. package/dist/context/LegacyStepperContext.js +3 -0
  607. package/dist/hooks/useDownload.d.ts +13 -0
  608. package/dist/hooks/useDownload.d.ts.map +1 -0
  609. package/dist/hooks/useDownload.js +42 -0
  610. package/dist/hooks/useEventCallback.d.ts +2 -0
  611. package/dist/hooks/useEventCallback.d.ts.map +1 -0
  612. package/dist/hooks/useEventCallback.js +11 -0
  613. package/dist/hooks/useEventListener.d.ts +7 -0
  614. package/dist/hooks/useEventListener.d.ts.map +1 -0
  615. package/dist/hooks/useEventListener.js +23 -0
  616. package/dist/hooks/useInterval.d.ts +2 -0
  617. package/dist/hooks/useInterval.d.ts.map +1 -0
  618. package/dist/hooks/useInterval.js +19 -0
  619. package/dist/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
  620. package/dist/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -0
  621. package/dist/hooks/useIsomorphicLayoutEffect.js +3 -0
  622. package/dist/hooks/useLegacyStepper.d.ts +7 -0
  623. package/dist/hooks/useLegacyStepper.d.ts.map +1 -0
  624. package/dist/hooks/useLegacyStepper.js +6 -0
  625. package/dist/hooks/useMediaQuery.d.ts +11 -0
  626. package/dist/hooks/useMediaQuery.d.ts.map +1 -0
  627. package/dist/hooks/useMediaQuery.js +34 -0
  628. package/dist/hooks/useNotificationsStore.d.ts +14 -0
  629. package/dist/hooks/useNotificationsStore.d.ts.map +1 -0
  630. package/dist/hooks/useNotificationsStore.js +14 -0
  631. package/dist/hooks/useOnClickOutside.d.ts +5 -0
  632. package/dist/hooks/useOnClickOutside.d.ts.map +1 -0
  633. package/dist/hooks/useOnClickOutside.js +12 -0
  634. package/dist/hooks/useSessionStorage.d.ts +38 -0
  635. package/dist/hooks/useSessionStorage.d.ts.map +1 -0
  636. package/dist/hooks/useSessionStorage.js +99 -0
  637. package/dist/hooks/useTheme.d.ts +19 -0
  638. package/dist/hooks/useTheme.d.ts.map +1 -0
  639. package/dist/hooks/useTheme.js +60 -0
  640. package/dist/hooks/useWindowSize.d.ts +6 -0
  641. package/dist/hooks/useWindowSize.d.ts.map +1 -0
  642. package/dist/hooks/useWindowSize.js +21 -0
  643. package/dist/hooks.d.ts +13 -0
  644. package/dist/hooks.d.ts.map +1 -0
  645. package/dist/hooks.js +12 -0
  646. package/dist/i18n.d.ts +13 -14
  647. package/dist/i18n.d.ts.map +1 -0
  648. package/dist/i18n.js +46 -211
  649. package/dist/testing/mocks.d.ts +16 -0
  650. package/dist/testing/mocks.d.ts.map +1 -0
  651. package/dist/testing/mocks.js +46 -0
  652. package/dist/testing/setup-tests.d.ts +2 -0
  653. package/dist/testing/setup-tests.d.ts.map +1 -0
  654. package/dist/testing/setup-tests.js +8 -0
  655. package/dist/translations/libui.json +154 -0
  656. package/dist/utils.d.ts +4 -6
  657. package/dist/utils.d.ts.map +1 -0
  658. package/dist/utils.js +8 -9
  659. package/package.json +13 -10
  660. package/src/assets/libui-logo.svg +113 -0
  661. package/src/components/Accordion/Accordion.tsx +10 -0
  662. package/src/components/Accordion/AccordionContent.tsx +20 -0
  663. package/src/components/Accordion/AccordionItem.tsx +12 -0
  664. package/src/components/Accordion/AccordionRoot.tsx +10 -0
  665. package/src/components/Accordion/AccordionTrigger.tsx +27 -0
  666. package/src/components/AlertDialog/AlertDialog.tsx +22 -0
  667. package/src/components/AlertDialog/AlertDialogAction.tsx +13 -0
  668. package/src/components/AlertDialog/AlertDialogCancel.tsx +15 -0
  669. package/src/components/AlertDialog/AlertDialogContent.tsx +25 -0
  670. package/src/components/AlertDialog/AlertDialogDescription.tsx +12 -0
  671. package/src/components/AlertDialog/AlertDialogFooter.tsx +7 -0
  672. package/src/components/AlertDialog/AlertDialogHeader.tsx +7 -0
  673. package/src/components/AlertDialog/AlertDialogOverlay.tsx +21 -0
  674. package/src/components/AlertDialog/AlertDialogTitle.tsx +12 -0
  675. package/src/components/ArrowToggle/ArrowToggle.tsx +63 -0
  676. package/src/components/Avatar/Avatar.tsx +8 -0
  677. package/src/components/Avatar/AvatarFallback.tsx +18 -0
  678. package/src/components/Avatar/AvatarImage.tsx +12 -0
  679. package/src/components/Avatar/AvatarRoot.tsx +19 -0
  680. package/src/components/Badge/Badge.tsx +30 -0
  681. package/src/components/Breadcrumb/Breadcrumb.tsx +16 -0
  682. package/src/components/Breadcrumb/BreadcrumbEllipsis.tsx +16 -0
  683. package/src/components/Breadcrumb/BreadcrumbItem.tsx +9 -0
  684. package/src/components/Breadcrumb/BreadcrumbLink.tsx +15 -0
  685. package/src/components/Breadcrumb/BreadcrumbList.tsx +18 -0
  686. package/src/components/Breadcrumb/BreadcrumbPage.tsx +18 -0
  687. package/src/components/Breadcrumb/BreadcrumbRoot.tsx +10 -0
  688. package/src/components/Breadcrumb/BreadcrumbSeparator.tsx +11 -0
  689. package/src/components/Button/Button.tsx +61 -0
  690. package/src/components/Card/Card.tsx +37 -0
  691. package/src/components/Checkbox/Checkbox.tsx +27 -0
  692. package/src/components/Collapsible/Collapsible.tsx +8 -0
  693. package/src/components/Collapsible/CollapsibleRoot.tsx +10 -0
  694. package/src/components/Command/Command.tsx +41 -0
  695. package/src/components/Command/CommandEmpty.tsx +10 -0
  696. package/src/components/Command/CommandGroup.tsx +21 -0
  697. package/src/components/Command/CommandInput.tsx +26 -0
  698. package/src/components/Command/CommandItem.tsx +21 -0
  699. package/src/components/Command/CommandList.tsx +18 -0
  700. package/src/components/Command/CommandSeparator.tsx +12 -0
  701. package/src/components/Command/CommandShortcut.tsx +7 -0
  702. package/src/components/ContextMenu/ContextMenu.tsx +28 -0
  703. package/src/components/ContextMenu/ContextMenuCheckboxItem.tsx +30 -0
  704. package/src/components/ContextMenu/ContextMenuContent.tsx +23 -0
  705. package/src/components/ContextMenu/ContextMenuItem.tsx +24 -0
  706. package/src/components/ContextMenu/ContextMenuLabel.tsx +20 -0
  707. package/src/components/ContextMenu/ContextMenuRadioItem.tsx +29 -0
  708. package/src/components/ContextMenu/ContextMenuSeparator.tsx +12 -0
  709. package/src/components/ContextMenu/ContextMenuShortcut.tsx +7 -0
  710. package/src/components/ContextMenu/ContextMenuSubContent.tsx +21 -0
  711. package/src/components/ContextMenu/ContextMenuSubTrigger.tsx +28 -0
  712. package/src/components/DatePicker/Calendar.tsx +64 -0
  713. package/src/components/DatePicker/DatePicker.tsx +156 -0
  714. package/src/components/DatePicker/YearSelector.tsx +49 -0
  715. package/src/components/Dialog/Dialog.tsx +16 -0
  716. package/src/components/Dialog/DialogContent.tsx +31 -0
  717. package/src/components/Dialog/DialogDescription.tsx +12 -0
  718. package/src/components/Dialog/DialogFooter.tsx +7 -0
  719. package/src/components/Dialog/DialogHeader.tsx +7 -0
  720. package/src/components/Dialog/DialogOverlay.tsx +21 -0
  721. package/src/components/Dialog/DialogTitle.tsx +12 -0
  722. package/src/components/Drawer/Drawer.tsx +23 -0
  723. package/src/components/Drawer/DrawerContent.tsx +27 -0
  724. package/src/components/Drawer/DrawerDescription.tsx +14 -0
  725. package/src/components/Drawer/DrawerFooter.tsx +7 -0
  726. package/src/components/Drawer/DrawerHeader.tsx +7 -0
  727. package/src/components/Drawer/DrawerTitle.tsx +18 -0
  728. package/src/components/DropdownButton/DropdownButton.tsx +25 -0
  729. package/src/components/DropdownMenu/DropdownMenu.tsx +28 -0
  730. package/src/components/DropdownMenu/DropdownMenuCheckboxItem.tsx +30 -0
  731. package/src/components/DropdownMenu/DropdownMenuContent.tsx +29 -0
  732. package/src/components/DropdownMenu/DropdownMenuItem.tsx +24 -0
  733. package/src/components/DropdownMenu/DropdownMenuLabel.tsx +20 -0
  734. package/src/components/DropdownMenu/DropdownMenuRadioItem.tsx +29 -0
  735. package/src/components/DropdownMenu/DropdownMenuSeparator.tsx +12 -0
  736. package/src/components/DropdownMenu/DropdownMenuShortcut.tsx +7 -0
  737. package/src/components/DropdownMenu/DropdownMenuSubContent.tsx +21 -0
  738. package/src/components/DropdownMenu/DropdownMenuSubTrigger.tsx +28 -0
  739. package/src/components/ErrorBoundary/ErrorBoundary.tsx +9 -0
  740. package/src/components/ErrorFallback/ErrorFallback.tsx +34 -0
  741. package/src/components/Form/BaseRadioField.tsx +68 -0
  742. package/src/components/Form/BooleanField/BooleanField.tsx +15 -0
  743. package/src/components/Form/BooleanField/BooleanFieldCheckbox.tsx +35 -0
  744. package/src/components/Form/BooleanField/BooleanFieldRadio.tsx +59 -0
  745. package/src/components/Form/DateField/DateField.tsx +68 -0
  746. package/src/components/Form/DynamicField.tsx +45 -0
  747. package/src/components/Form/ErrorMessage.tsx +11 -0
  748. package/src/components/Form/FieldGroup/FieldGroup.tsx +10 -0
  749. package/src/components/Form/FieldGroup/FieldGroupDescription.tsx +17 -0
  750. package/src/components/Form/FieldGroup/FieldGroupRoot.tsx +5 -0
  751. package/src/components/Form/FieldGroup/FieldGroupRow.tsx +5 -0
  752. package/src/components/Form/FieldsComponent.tsx +27 -0
  753. package/src/components/Form/Form.tsx +145 -0
  754. package/src/components/Form/NumberField/NumberField.tsx +17 -0
  755. package/src/components/Form/NumberField/NumberFieldInput.tsx +44 -0
  756. package/src/components/Form/NumberField/NumberFieldRadio.tsx +58 -0
  757. package/src/components/Form/NumberField/NumberFieldSlider.tsx +41 -0
  758. package/src/components/Form/NumberRecordField.tsx +60 -0
  759. package/src/components/Form/RecordArrayField.tsx +99 -0
  760. package/src/components/Form/ScalarField.tsx +39 -0
  761. package/src/components/Form/SetField/SetField.tsx +37 -0
  762. package/src/components/Form/SetField/SetFieldListbox.tsx +45 -0
  763. package/src/components/Form/SetField/SetFieldSelect.tsx +64 -0
  764. package/src/components/Form/StaticField.tsx +83 -0
  765. package/src/components/Form/StringField/StringField.tsx +25 -0
  766. package/src/components/Form/StringField/StringFieldInput.tsx +24 -0
  767. package/src/components/Form/StringField/StringFieldPassword.tsx +42 -0
  768. package/src/components/Form/StringField/StringFieldRadio.tsx +16 -0
  769. package/src/components/Form/StringField/StringFieldSelect.tsx +45 -0
  770. package/src/components/Form/StringField/StringFieldTextArea.tsx +24 -0
  771. package/src/components/Form/types.ts +26 -0
  772. package/src/components/Form/utils.ts +53 -0
  773. package/src/components/Heading/Heading.tsx +26 -0
  774. package/src/components/HoverCard/HoverCard.tsx +8 -0
  775. package/src/components/HoverCard/HoverCardContent.tsx +23 -0
  776. package/src/components/Input/Input.tsx +21 -0
  777. package/src/components/Label/Label.tsx +17 -0
  778. package/src/components/LanguageToggle/LanguageToggle.tsx +41 -0
  779. package/src/components/LegacyDropdown/LegacyDropdown.tsx +79 -0
  780. package/src/components/LegacyModal/LegacyModal.tsx +77 -0
  781. package/src/components/LegacySelectDropdown/LegacySelectDropdown.tsx +87 -0
  782. package/src/components/LegacySlider/LegacySlider.tsx +67 -0
  783. package/src/components/LegacyStepper/LegacyStepper.tsx +91 -0
  784. package/src/components/LegacyTable/LegacyClientTable.tsx +55 -0
  785. package/src/components/LegacyTable/LegacyTable.tsx +118 -0
  786. package/src/components/LegacyTable/LegacyTableColumnHeader.tsx +71 -0
  787. package/src/components/LineGraph/LineGraph.tsx +133 -0
  788. package/src/components/MenuBar/MenuBar.tsx +31 -0
  789. package/src/components/MenuBar/MenuBarCheckboxItem.tsx +30 -0
  790. package/src/components/MenuBar/MenuBarContent.tsx +25 -0
  791. package/src/components/MenuBar/MenuBarItem.tsx +24 -0
  792. package/src/components/MenuBar/MenuBarLabel.tsx +14 -0
  793. package/src/components/MenuBar/MenuBarRadioItem.tsx +29 -0
  794. package/src/components/MenuBar/MenuBarRoot.tsx +17 -0
  795. package/src/components/MenuBar/MenuBarSeparator.tsx +12 -0
  796. package/src/components/MenuBar/MenuBarShortcut.tsx +7 -0
  797. package/src/components/MenuBar/MenuBarSubContent.tsx +21 -0
  798. package/src/components/MenuBar/MenuBarSubTrigger.tsx +28 -0
  799. package/src/components/MenuBar/MenuBarTrigger.tsx +20 -0
  800. package/src/components/NotificationHub/NotificationHub.tsx +70 -0
  801. package/src/components/NotificationHub/NotificationIcon.tsx +22 -0
  802. package/src/components/Pagination/Pagination.tsx +16 -0
  803. package/src/components/Pagination/PaginationContent.tsx +7 -0
  804. package/src/components/Pagination/PaginationEllipsis.tsx +12 -0
  805. package/src/components/Pagination/PaginationItem.tsx +5 -0
  806. package/src/components/Pagination/PaginationLink.tsx +29 -0
  807. package/src/components/Pagination/PaginationNext.tsx +17 -0
  808. package/src/components/Pagination/PaginationPrevious.tsx +17 -0
  809. package/src/components/Pagination/PaginationRoot.tsx +12 -0
  810. package/src/components/Popover/Popover.tsx +8 -0
  811. package/src/components/Popover/PopoverContent.tsx +47 -0
  812. package/src/components/Progress/Progress.tsx +23 -0
  813. package/src/components/RadioGroup/RadioGroup.tsx +23 -0
  814. package/src/components/RadioGroup/RadioGroupItem.tsx +29 -0
  815. package/src/components/Resizable/Resizable.tsx +22 -0
  816. package/src/components/Resizable/ResizableHandle.tsx +26 -0
  817. package/src/components/Resizable/ResizablePanelGroup.tsx +14 -0
  818. package/src/components/ScrollArea/ScrollArea.tsx +18 -0
  819. package/src/components/ScrollArea/ScrollBar.tsx +26 -0
  820. package/src/components/SearchBar/SearchBar.tsx +49 -0
  821. package/src/components/Select/Select.tsx +21 -0
  822. package/src/components/Select/SelectContent.tsx +40 -0
  823. package/src/components/Select/SelectItem.tsx +29 -0
  824. package/src/components/Select/SelectLabel.tsx +12 -0
  825. package/src/components/Select/SelectScrollDownButton.tsx +21 -0
  826. package/src/components/Select/SelectScrollUpButton.tsx +21 -0
  827. package/src/components/Select/SelectSeparator.tsx +12 -0
  828. package/src/components/Select/SelectTrigger.tsx +16 -0
  829. package/src/components/Separator/Separator.tsx +25 -0
  830. package/src/components/Sheet/Sheet.tsx +20 -0
  831. package/src/components/Sheet/SheetContent.tsx +46 -0
  832. package/src/components/Sheet/SheetDescription.tsx +12 -0
  833. package/src/components/Sheet/SheetFooter.tsx +7 -0
  834. package/src/components/Sheet/SheetHeader.tsx +7 -0
  835. package/src/components/Sheet/SheetOverlay.tsx +21 -0
  836. package/src/components/Sheet/SheetTitle.tsx +12 -0
  837. package/src/components/Slider/Slider.tsx +22 -0
  838. package/src/components/Spinner/Spinner.tsx +22 -0
  839. package/src/components/SpinnerIcon/SpinnerIcon.tsx +21 -0
  840. package/src/components/Switch/Switch.tsx +27 -0
  841. package/src/components/Table/Table.tsx +18 -0
  842. package/src/components/Table/TableBody.tsx +9 -0
  843. package/src/components/Table/TableCaption.tsx +9 -0
  844. package/src/components/Table/TableCell.tsx +9 -0
  845. package/src/components/Table/TableFooter.tsx +15 -0
  846. package/src/components/Table/TableHead.tsx +18 -0
  847. package/src/components/Table/TableHeader.tsx +9 -0
  848. package/src/components/Table/TableRoot.tsx +14 -0
  849. package/src/components/Table/TableRow.tsx +15 -0
  850. package/src/components/Tabs/Tabs.tsx +10 -0
  851. package/src/components/Tabs/TabsContent.tsx +21 -0
  852. package/src/components/Tabs/TabsList.tsx +21 -0
  853. package/src/components/Tabs/TabsRoot.tsx +9 -0
  854. package/src/components/Tabs/TabsTrigger.tsx +21 -0
  855. package/src/components/TextArea/TextArea.tsx +23 -0
  856. package/src/components/ThemeToggle/ThemeToggle.tsx +31 -0
  857. package/src/components/Tooltip/Tooltip.tsx +8 -0
  858. package/src/components/Tooltip/TooltipContent.tsx +35 -0
  859. package/src/components/Tooltip/TooltipRoot.tsx +20 -0
  860. package/src/components/Tooltip/TooltipTrigger.tsx +17 -0
  861. package/src/components.ts +54 -0
  862. package/src/context/LegacyStepperContext.tsx +7 -0
  863. package/src/hooks/useDownload.ts +61 -0
  864. package/src/hooks/useEventCallback.ts +15 -0
  865. package/src/hooks/useEventListener.ts +73 -0
  866. package/src/hooks/useInterval.ts +25 -0
  867. package/src/hooks/useIsomorphicLayoutEffect.ts +5 -0
  868. package/src/hooks/useLegacyStepper.ts +8 -0
  869. package/src/hooks/useMediaQuery.ts +43 -0
  870. package/src/hooks/useNotificationsStore.ts +29 -0
  871. package/src/hooks/useOnClickOutside.ts +22 -0
  872. package/src/hooks/useSessionStorage.ts +155 -0
  873. package/src/hooks/useTheme.ts +75 -0
  874. package/src/hooks/useWindowSize.ts +32 -0
  875. package/src/hooks.ts +12 -0
  876. package/src/i18n.ts +78 -0
  877. package/src/styles/globals.css +86 -0
  878. package/src/testing/mocks.ts +53 -0
  879. package/src/testing/setup-tests.ts +11 -0
  880. package/src/translations/libui.json +154 -0
  881. package/src/typings/i18next.d.ts +21 -0
  882. package/src/utils.ts +10 -0
  883. package/dist/chunk-IP3LSCUG.js +0 -129
  884. package/dist/chunk-IP3LSCUG.js.map +0 -1
  885. package/dist/chunk-PAAJ5AH3.js +0 -15
  886. package/dist/chunk-PAAJ5AH3.js.map +0 -1
  887. package/dist/components/index.d.ts +0 -2043
  888. package/dist/components/index.js +0 -4141
  889. package/dist/components/index.js.map +0 -1
  890. package/dist/hooks/index.d.ts +0 -122
  891. package/dist/hooks/index.js +0 -219
  892. package/dist/hooks/index.js.map +0 -1
  893. package/dist/i18n.js.map +0 -1
  894. package/dist/utils.js.map +0 -1
@@ -1,4141 +0,0 @@
1
- import {
2
- LegacyStepperContext,
3
- useNotificationsStore,
4
- useTheme,
5
- useWindowSize
6
- } from "../chunk-IP3LSCUG.js";
7
- import {
8
- cn
9
- } from "../chunk-PAAJ5AH3.js";
10
-
11
- // src/components/Accordion/AccordionContent.tsx
12
- import React from "react";
13
- import * as AccordionPrimitive from "@radix-ui/react-accordion";
14
- import { jsx } from "react/jsx-runtime";
15
- var AccordionContent = React.forwardRef(function AccordionContent2({ children, className, ...props }, ref) {
16
- return /* @__PURE__ */ jsx(
17
- AccordionPrimitive.Content,
18
- {
19
- className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
20
- ref,
21
- ...props,
22
- children: /* @__PURE__ */ jsx("div", { className: cn("pb-4 pt-0", className), children })
23
- }
24
- );
25
- });
26
-
27
- // src/components/Accordion/AccordionItem.tsx
28
- import React2 from "react";
29
- import * as AccordionPrimitive2 from "@radix-ui/react-accordion";
30
- import { jsx as jsx2 } from "react/jsx-runtime";
31
- var AccordionItem = React2.forwardRef(function AccordionItem2({ className, ...props }, ref) {
32
- return /* @__PURE__ */ jsx2(AccordionPrimitive2.Item, { className: cn("border-b", className), ref, ...props });
33
- });
34
-
35
- // src/components/Accordion/AccordionRoot.tsx
36
- import React3 from "react";
37
- import * as AccordionPrimitive3 from "@radix-ui/react-accordion";
38
- import { jsx as jsx3 } from "react/jsx-runtime";
39
- var AccordionRoot = React3.forwardRef(function AccordionRoot2(props, ref) {
40
- return /* @__PURE__ */ jsx3(AccordionPrimitive3.Root, { "data-testid": "accordion", ref, ...props });
41
- });
42
-
43
- // src/components/Accordion/AccordionTrigger.tsx
44
- import React4 from "react";
45
- import * as AccordionPrimitive4 from "@radix-ui/react-accordion";
46
- import { ChevronDownIcon } from "lucide-react";
47
- import { jsx as jsx4, jsxs } from "react/jsx-runtime";
48
- var AccordionTrigger = React4.forwardRef(function AccordionTrigger2({ children, className, ...props }, ref) {
49
- return /* @__PURE__ */ jsx4(AccordionPrimitive4.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
50
- AccordionPrimitive4.Trigger,
51
- {
52
- className: cn(
53
- "flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
54
- className
55
- ),
56
- ref,
57
- ...props,
58
- children: [
59
- children,
60
- /* @__PURE__ */ jsx4(ChevronDownIcon, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" })
61
- ]
62
- }
63
- ) });
64
- });
65
-
66
- // src/components/Accordion/Accordion.tsx
67
- var Accordion = Object.assign(AccordionRoot, {
68
- Content: AccordionContent,
69
- Item: AccordionItem,
70
- Trigger: AccordionTrigger
71
- });
72
-
73
- // src/components/AlertDialog/AlertDialog.tsx
74
- import { Root as Root2 } from "@radix-ui/react-alert-dialog";
75
- import { Trigger as Trigger2 } from "@radix-ui/react-alert-dialog";
76
-
77
- // src/components/AlertDialog/AlertDialogAction.tsx
78
- import React6 from "react";
79
- import { Action } from "@radix-ui/react-alert-dialog";
80
-
81
- // src/components/Button/Button.tsx
82
- import React5 from "react";
83
- import { Slot, Slottable } from "@radix-ui/react-slot";
84
- import { cva } from "class-variance-authority";
85
- import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
86
- var BUTTON_ICON_SIZE = {
87
- lg: 18,
88
- md: 16,
89
- sm: 14
90
- };
91
- var buttonVariants = cva(
92
- "flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
93
- {
94
- defaultVariants: {
95
- size: "md",
96
- variant: "primary"
97
- },
98
- variants: {
99
- size: {
100
- icon: "p-1.5 aspect-square",
101
- lg: "h-10 rounded-md px-8",
102
- md: "h-9 px-4 py-2",
103
- sm: "h-8 rounded-md px-3 text-xs"
104
- },
105
- variant: {
106
- danger: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
107
- ghost: "hover:bg-accent hover:text-accent-foreground",
108
- link: "text-primary underline-offset-4 hover:underline",
109
- outline: "border border-input bg-inherit shadow-sm",
110
- primary: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
111
- secondary: "bg-secondary border text-secondary-foreground shadow-sm hover:bg-secondary/80"
112
- }
113
- }
114
- }
115
- );
116
- var Button = React5.forwardRef(function Button2({ asChild, children, className, label, size = "md", variant = "primary", ...props }, ref) {
117
- const Comp = asChild ? Slot : "button";
118
- return /* @__PURE__ */ jsxs2(Comp, { className: cn(buttonVariants({ className, size, variant })), ref, ...props, children: [
119
- label,
120
- /* @__PURE__ */ jsx5(Slottable, { children })
121
- ] });
122
- });
123
-
124
- // src/components/AlertDialog/AlertDialogAction.tsx
125
- import { jsx as jsx6 } from "react/jsx-runtime";
126
- var AlertDialogAction = React6.forwardRef(function AlertDialogAction2({ className, ...props }, ref) {
127
- return /* @__PURE__ */ jsx6(Action, { className: cn(buttonVariants(), className), ref, ...props });
128
- });
129
-
130
- // src/components/AlertDialog/AlertDialogCancel.tsx
131
- import React7 from "react";
132
- import { Cancel } from "@radix-ui/react-alert-dialog";
133
- import { jsx as jsx7 } from "react/jsx-runtime";
134
- var AlertDialogCancel = React7.forwardRef(function AlertDialogCancel2({ className, ...props }, ref) {
135
- return /* @__PURE__ */ jsx7(Cancel, { className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className), ref, ...props });
136
- });
137
-
138
- // src/components/AlertDialog/AlertDialogContent.tsx
139
- import React9 from "react";
140
- import { Content as Content2, Portal } from "@radix-ui/react-alert-dialog";
141
-
142
- // src/components/AlertDialog/AlertDialogOverlay.tsx
143
- import React8 from "react";
144
- import { Overlay } from "@radix-ui/react-alert-dialog";
145
- import { jsx as jsx8 } from "react/jsx-runtime";
146
- var AlertDialogOverlay = React8.forwardRef(function AlertDialogOverlay2({ className, ...props }, ref) {
147
- return /* @__PURE__ */ jsx8(
148
- Overlay,
149
- {
150
- className: cn(
151
- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
152
- className
153
- ),
154
- ...props,
155
- ref
156
- }
157
- );
158
- });
159
-
160
- // src/components/AlertDialog/AlertDialogContent.tsx
161
- import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
162
- var AlertDialogContent = React9.forwardRef(function AlertDialogContent2({ className, ...props }, ref) {
163
- return /* @__PURE__ */ jsxs3(Portal, { children: [
164
- /* @__PURE__ */ jsx9(AlertDialogOverlay, {}),
165
- /* @__PURE__ */ jsx9(
166
- Content2,
167
- {
168
- className: cn(
169
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
170
- className
171
- ),
172
- ref,
173
- ...props
174
- }
175
- )
176
- ] });
177
- });
178
-
179
- // src/components/AlertDialog/AlertDialogDescription.tsx
180
- import React10 from "react";
181
- import { Description } from "@radix-ui/react-alert-dialog";
182
- import { jsx as jsx10 } from "react/jsx-runtime";
183
- var AlertDialogDescription = React10.forwardRef(function AlertDialogDescription2({ className, ...props }, ref) {
184
- return /* @__PURE__ */ jsx10(Description, { className: cn("text-sm text-muted-foreground", className), ref, ...props });
185
- });
186
-
187
- // src/components/AlertDialog/AlertDialogFooter.tsx
188
- import { jsx as jsx11 } from "react/jsx-runtime";
189
- var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx11("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
190
-
191
- // src/components/AlertDialog/AlertDialogHeader.tsx
192
- import { jsx as jsx12 } from "react/jsx-runtime";
193
- var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx12("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
194
-
195
- // src/components/AlertDialog/AlertDialogTitle.tsx
196
- import React11 from "react";
197
- import { Title } from "@radix-ui/react-alert-dialog";
198
- import { jsx as jsx13 } from "react/jsx-runtime";
199
- var AlertDialogTitle = React11.forwardRef(function AlertDialogTitle2({ className, ...props }, ref) {
200
- return /* @__PURE__ */ jsx13(Title, { className: cn("text-lg font-semibold", className), ref, ...props });
201
- });
202
-
203
- // src/components/AlertDialog/AlertDialog.tsx
204
- var AlertDialog = Object.assign(Root2, {
205
- Action: AlertDialogAction,
206
- Cancel: AlertDialogCancel,
207
- Content: AlertDialogContent,
208
- Description: AlertDialogDescription,
209
- Footer: AlertDialogFooter,
210
- Header: AlertDialogHeader,
211
- Overlay: AlertDialogOverlay,
212
- Title: AlertDialogTitle,
213
- Trigger: Trigger2
214
- });
215
-
216
- // src/components/ArrowToggle/ArrowToggle.tsx
217
- import React12, { useMemo } from "react";
218
- import { ChevronUpIcon } from "lucide-react";
219
- import { jsx as jsx14, jsxs as jsxs4 } from "react/jsx-runtime";
220
- var ArrowToggle = React12.forwardRef(function ArrowToggle2({ children, className, isToggled, position, rotation = 0, size = "icon", variant = "ghost", ...props }, ref) {
221
- const computedRotation = useMemo(() => {
222
- const toggleRotation = isToggled ? rotation : 0;
223
- switch (position) {
224
- case "up":
225
- return 0 + toggleRotation;
226
- case "right":
227
- return 90 + toggleRotation;
228
- case "down":
229
- return 180 + toggleRotation;
230
- case "left":
231
- return 270 + toggleRotation;
232
- }
233
- }, [position, rotation, isToggled]);
234
- return /* @__PURE__ */ jsxs4(
235
- Button,
236
- {
237
- className: cn(size === "icon" && "h-6 w-6", className),
238
- "data-testid": "arrow-toggle",
239
- ref,
240
- size,
241
- type: "button",
242
- variant,
243
- ...props,
244
- children: [
245
- /* @__PURE__ */ jsx14(
246
- ChevronUpIcon,
247
- {
248
- className: "transform-gpu transition-transform",
249
- "data-testid": "arrow-up-icon",
250
- style: { transform: `rotate(${computedRotation}deg)` }
251
- }
252
- ),
253
- children
254
- ]
255
- }
256
- );
257
- });
258
-
259
- // src/components/Avatar/AvatarFallback.tsx
260
- import React13 from "react";
261
- import * as AvatarPrimitive from "@radix-ui/react-avatar";
262
- import { jsx as jsx15 } from "react/jsx-runtime";
263
- var AvatarFallback = React13.forwardRef(function AvatarFallback2({ className, ...props }, ref) {
264
- return /* @__PURE__ */ jsx15(
265
- AvatarPrimitive.Fallback,
266
- {
267
- className: cn("flex h-full w-full items-center justify-center rounded-full bg-muted", className),
268
- ref,
269
- ...props
270
- }
271
- );
272
- });
273
-
274
- // src/components/Avatar/AvatarImage.tsx
275
- import React14 from "react";
276
- import * as AvatarPrimitive2 from "@radix-ui/react-avatar";
277
- import { jsx as jsx16 } from "react/jsx-runtime";
278
- var AvatarImage = React14.forwardRef(function AvatarImage2({ className, ...props }, ref) {
279
- return /* @__PURE__ */ jsx16(AvatarPrimitive2.Image, { className: cn("aspect-square h-full w-full", className), ref, ...props });
280
- });
281
-
282
- // src/components/Avatar/AvatarRoot.tsx
283
- import React15 from "react";
284
- import * as AvatarPrimitive3 from "@radix-ui/react-avatar";
285
- import { jsx as jsx17 } from "react/jsx-runtime";
286
- var AvatarRoot = React15.forwardRef(function AvatarRoot2({ className, ...props }, ref) {
287
- return /* @__PURE__ */ jsx17(
288
- AvatarPrimitive3.Root,
289
- {
290
- className: cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className),
291
- "data-testid": "avatar",
292
- ref,
293
- ...props
294
- }
295
- );
296
- });
297
-
298
- // src/components/Avatar/Avatar.tsx
299
- var Avatar = Object.assign(AvatarRoot, {
300
- Fallback: AvatarFallback,
301
- Image: AvatarImage
302
- });
303
-
304
- // src/components/Badge/Badge.tsx
305
- import "react";
306
- import { cva as cva2 } from "class-variance-authority";
307
- import { jsx as jsx18 } from "react/jsx-runtime";
308
- var badgeVariants = cva2(
309
- "inline-flex items-center rounded-sm border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
310
- {
311
- defaultVariants: {
312
- variant: "default"
313
- },
314
- variants: {
315
- variant: {
316
- default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
317
- destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
318
- outline: "text-foreground",
319
- secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80"
320
- }
321
- }
322
- }
323
- );
324
- var Badge = ({ className, variant, ...props }) => {
325
- return /* @__PURE__ */ jsx18("div", { className: cn(badgeVariants({ variant }), className), "data-testid": "badge", ...props });
326
- };
327
-
328
- // src/components/Breadcrumb/BreadcrumbEllipsis.tsx
329
- import { MoreHorizontalIcon } from "lucide-react";
330
- import { jsx as jsx19 } from "react/jsx-runtime";
331
- var BreadcrumbEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsx19(
332
- "span",
333
- {
334
- "aria-hidden": "true",
335
- className: cn("flex h-9 w-9 items-center justify-center", className),
336
- role: "presentation",
337
- ...props,
338
- children: /* @__PURE__ */ jsx19(MoreHorizontalIcon, { className: "h-4 w-4" })
339
- }
340
- );
341
-
342
- // src/components/Breadcrumb/BreadcrumbItem.tsx
343
- import React17 from "react";
344
- import { jsx as jsx20 } from "react/jsx-runtime";
345
- var BreadcrumbItem = React17.forwardRef(
346
- function BreadcrumbItem2({ className, ...props }, ref) {
347
- return /* @__PURE__ */ jsx20("li", { className: cn("inline-flex items-center gap-1.5", className), ref, ...props });
348
- }
349
- );
350
-
351
- // src/components/Breadcrumb/BreadcrumbLink.tsx
352
- import React18 from "react";
353
- import { Slot as Slot2 } from "@radix-ui/react-slot";
354
- import { jsx as jsx21 } from "react/jsx-runtime";
355
- var BreadcrumbLink = React18.forwardRef(function BreadcrumbLink2({ asChild, className, ...props }, ref) {
356
- const Comp = asChild ? Slot2 : "a";
357
- return /* @__PURE__ */ jsx21(Comp, { className: cn("transition-colors hover:text-foreground", className), ref, ...props });
358
- });
359
-
360
- // src/components/Breadcrumb/BreadcrumbList.tsx
361
- import React19 from "react";
362
- import { jsx as jsx22 } from "react/jsx-runtime";
363
- var BreadcrumbList = React19.forwardRef(
364
- function BreadcrumbList2({ className, ...props }, ref) {
365
- return /* @__PURE__ */ jsx22(
366
- "ol",
367
- {
368
- className: cn(
369
- "flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
370
- className
371
- ),
372
- ref,
373
- ...props
374
- }
375
- );
376
- }
377
- );
378
-
379
- // src/components/Breadcrumb/BreadcrumbPage.tsx
380
- import React20 from "react";
381
- import { jsx as jsx23 } from "react/jsx-runtime";
382
- var BreadcrumbPage = React20.forwardRef(
383
- function BreadcrumbPage2({ className, ...props }, ref) {
384
- return /* @__PURE__ */ jsx23(
385
- "span",
386
- {
387
- "aria-current": "page",
388
- "aria-disabled": "true",
389
- className: cn("font-normal text-foreground", className),
390
- ref,
391
- role: "link",
392
- ...props
393
- }
394
- );
395
- }
396
- );
397
-
398
- // src/components/Breadcrumb/BreadcrumbRoot.tsx
399
- import React21 from "react";
400
- import { jsx as jsx24 } from "react/jsx-runtime";
401
- var BreadcrumbRoot = React21.forwardRef(function BreadcrumbRoot2({ ...props }, ref) {
402
- return /* @__PURE__ */ jsx24("nav", { "aria-label": "breadcrumb", ref, ...props });
403
- });
404
-
405
- // src/components/Breadcrumb/BreadcrumbSeparator.tsx
406
- import { ChevronRightIcon } from "lucide-react";
407
- import { jsx as jsx25 } from "react/jsx-runtime";
408
- var BreadcrumbSeparator = ({ children, className, ...props }) => /* @__PURE__ */ jsx25("li", { "aria-hidden": "true", className: cn("[&>svg]:size-3.5", className), role: "presentation", ...props, children: children ?? /* @__PURE__ */ jsx25(ChevronRightIcon, {}) });
409
-
410
- // src/components/Breadcrumb/Breadcrumb.tsx
411
- var Breadcrumb = Object.assign(BreadcrumbRoot, {
412
- Ellipsis: BreadcrumbEllipsis,
413
- Item: BreadcrumbItem,
414
- Link: BreadcrumbLink,
415
- List: BreadcrumbList,
416
- Page: BreadcrumbPage,
417
- Separator: BreadcrumbSeparator
418
- });
419
-
420
- // src/components/Card/Card.tsx
421
- import React22 from "react";
422
- import { jsx as jsx26 } from "react/jsx-runtime";
423
- var CardRoot = React22.forwardRef(function CardRoot2({ className, ...props }, ref) {
424
- return /* @__PURE__ */ jsx26(
425
- "div",
426
- {
427
- className: cn("rounded-xl border bg-card text-card-foreground shadow", className),
428
- "data-testid": "card",
429
- ref,
430
- ...props
431
- }
432
- );
433
- });
434
- var Card = Object.assign(CardRoot, {
435
- Content: ({ className, ...props }) => /* @__PURE__ */ jsx26("div", { className: cn("p-6 pt-0", className), ...props }),
436
- Description: ({ className, ...props }) => /* @__PURE__ */ jsx26("p", { className: cn("text-sm text-muted-foreground", className), ...props }),
437
- Footer: ({ className, ...props }) => {
438
- return /* @__PURE__ */ jsx26("div", { className: cn("flex items-center p-6 pt-0", className), ...props });
439
- },
440
- Header: ({ className, ...props }) => /* @__PURE__ */ jsx26("div", { className: cn("flex flex-col space-y-1.5 p-6", className), ...props }),
441
- Title: ({ children, className, ...props }) => /* @__PURE__ */ jsx26("h3", { className: cn("font-semibold leading-none tracking-tight", className), ...props, children })
442
- });
443
-
444
- // src/components/Checkbox/Checkbox.tsx
445
- import React23 from "react";
446
- import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
447
- import { CheckIcon } from "lucide-react";
448
- import { jsx as jsx27 } from "react/jsx-runtime";
449
- var Checkbox = React23.forwardRef(function Checkbox2({ className, ...props }, ref) {
450
- return /* @__PURE__ */ jsx27(
451
- CheckboxPrimitive.Root,
452
- {
453
- className: cn(
454
- "peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
455
- className
456
- ),
457
- "data-testid": "checkbox",
458
- ref,
459
- ...props,
460
- children: /* @__PURE__ */ jsx27(CheckboxPrimitive.Indicator, { className: cn("flex items-center justify-center text-current"), children: /* @__PURE__ */ jsx27(CheckIcon, { className: "h-4 w-4" }) })
461
- }
462
- );
463
- });
464
-
465
- // src/components/Collapsible/Collapsible.tsx
466
- import { Content as Content3, Root as Root5, Trigger as Trigger3 } from "@radix-ui/react-collapsible";
467
- var Collapsible = Object.assign(Root5, {
468
- Content: Content3,
469
- Trigger: Trigger3
470
- });
471
-
472
- // src/components/Command/Command.tsx
473
- import React31 from "react";
474
- import { Command as CommandPrimitive7 } from "cmdk";
475
-
476
- // src/components/Command/CommandEmpty.tsx
477
- import React24 from "react";
478
- import { Command as CommandPrimitive } from "cmdk";
479
- import { jsx as jsx28 } from "react/jsx-runtime";
480
- var CommandEmpty = React24.forwardRef(function CommandEmpty2(props, ref) {
481
- return /* @__PURE__ */ jsx28(CommandPrimitive.Empty, { className: "py-6 text-center text-sm", ref, ...props });
482
- });
483
-
484
- // src/components/Command/CommandGroup.tsx
485
- import React25 from "react";
486
- import { Command as CommandPrimitive2 } from "cmdk";
487
- import { jsx as jsx29 } from "react/jsx-runtime";
488
- var CommandGroup = React25.forwardRef(function CommandGroup2({ className, ...props }, ref) {
489
- return /* @__PURE__ */ jsx29(
490
- CommandPrimitive2.Group,
491
- {
492
- className: cn(
493
- "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
494
- className
495
- ),
496
- ref,
497
- ...props
498
- }
499
- );
500
- });
501
-
502
- // src/components/Command/CommandInput.tsx
503
- import React26 from "react";
504
- import { Command as CommandPrimitive3 } from "cmdk";
505
- import { SearchIcon } from "lucide-react";
506
- import { jsx as jsx30, jsxs as jsxs5 } from "react/jsx-runtime";
507
- var CommandInput = React26.forwardRef(function CommandInput2({ className, ...props }, ref) {
508
- return (
509
- // eslint-disable-next-line react/no-unknown-property
510
- /* @__PURE__ */ jsxs5("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
511
- /* @__PURE__ */ jsx30(SearchIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
512
- /* @__PURE__ */ jsx30(
513
- CommandPrimitive3.Input,
514
- {
515
- className: cn(
516
- "flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
517
- className
518
- ),
519
- ref,
520
- ...props
521
- }
522
- )
523
- ] })
524
- );
525
- });
526
-
527
- // src/components/Command/CommandItem.tsx
528
- import React27 from "react";
529
- import { Command as CommandPrimitive4 } from "cmdk";
530
- import { jsx as jsx31 } from "react/jsx-runtime";
531
- var CommandItem = React27.forwardRef(function CommandItem2({ className, ...props }, ref) {
532
- return /* @__PURE__ */ jsx31(
533
- CommandPrimitive4.Item,
534
- {
535
- className: cn(
536
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
537
- className
538
- ),
539
- ref,
540
- ...props
541
- }
542
- );
543
- });
544
-
545
- // src/components/Command/CommandList.tsx
546
- import React28 from "react";
547
- import { Command as CommandPrimitive5 } from "cmdk";
548
- import { jsx as jsx32 } from "react/jsx-runtime";
549
- var CommandList = React28.forwardRef(function CommandList2({ className, ...props }, ref) {
550
- return /* @__PURE__ */ jsx32(
551
- CommandPrimitive5.List,
552
- {
553
- className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
554
- ref,
555
- ...props
556
- }
557
- );
558
- });
559
-
560
- // src/components/Command/CommandSeparator.tsx
561
- import React29 from "react";
562
- import { Command as CommandPrimitive6 } from "cmdk";
563
- import { jsx as jsx33 } from "react/jsx-runtime";
564
- var CommandSeparator = React29.forwardRef(function CommandSeparator2({ className, ...props }, ref) {
565
- return /* @__PURE__ */ jsx33(CommandPrimitive6.Separator, { className: cn("-mx-1 h-px bg-border", className), ref, ...props });
566
- });
567
-
568
- // src/components/Command/CommandShortcut.tsx
569
- import "react";
570
- import { jsx as jsx34 } from "react/jsx-runtime";
571
- var CommandShortcut = ({ className, ...props }) => {
572
- return /* @__PURE__ */ jsx34("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props });
573
- };
574
-
575
- // src/components/Command/Command.tsx
576
- import { jsx as jsx35 } from "react/jsx-runtime";
577
- var CommandRoot = React31.forwardRef(function Command({ className, ...props }, ref) {
578
- return /* @__PURE__ */ jsx35(
579
- CommandPrimitive7,
580
- {
581
- className: cn(
582
- "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
583
- className
584
- ),
585
- ref,
586
- ...props
587
- }
588
- );
589
- });
590
- var Command2 = Object.assign(CommandRoot, {
591
- Empty: CommandEmpty,
592
- Group: CommandGroup,
593
- Input: CommandInput,
594
- Item: CommandItem,
595
- List: CommandList,
596
- Separator: CommandSeparator,
597
- Shortcut: CommandShortcut
598
- });
599
-
600
- // src/components/ContextMenu/ContextMenu.tsx
601
- import { Group, Portal as Portal3, RadioGroup, Root as Root6, Sub, Trigger as Trigger4 } from "@radix-ui/react-context-menu";
602
-
603
- // src/components/ContextMenu/ContextMenuCheckboxItem.tsx
604
- import React32 from "react";
605
- import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
606
- import { CheckIcon as CheckIcon2 } from "lucide-react";
607
- import { jsx as jsx36, jsxs as jsxs6 } from "react/jsx-runtime";
608
- var ContextMenuCheckboxItem = React32.forwardRef(function ContextMenuCheckboxItem2({ checked, children, className, ...props }, ref) {
609
- return /* @__PURE__ */ jsxs6(
610
- ContextMenuPrimitive.CheckboxItem,
611
- {
612
- checked,
613
- className: cn(
614
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
615
- className
616
- ),
617
- ref,
618
- ...props,
619
- children: [
620
- /* @__PURE__ */ jsx36("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx36(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx36(CheckIcon2, { className: "h-4 w-4" }) }) }),
621
- children
622
- ]
623
- }
624
- );
625
- });
626
-
627
- // src/components/ContextMenu/ContextMenuContent.tsx
628
- import React33 from "react";
629
- import * as ContextMenuPrimitive2 from "@radix-ui/react-context-menu";
630
- import { jsx as jsx37 } from "react/jsx-runtime";
631
- var ContextMenuContent = React33.forwardRef(function ContextMenuContent2({ className, ...props }, ref) {
632
- return /* @__PURE__ */ jsx37(ContextMenuPrimitive2.Portal, { children: /* @__PURE__ */ jsx37(
633
- ContextMenuPrimitive2.Content,
634
- {
635
- className: cn(
636
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",
637
- className
638
- ),
639
- ref,
640
- ...props
641
- }
642
- ) });
643
- });
644
-
645
- // src/components/ContextMenu/ContextMenuItem.tsx
646
- import React34 from "react";
647
- import * as ContextMenuPrimitive3 from "@radix-ui/react-context-menu";
648
- import { jsx as jsx38 } from "react/jsx-runtime";
649
- var ContextMenuItem = React34.forwardRef(function ContextMenuItem2({ className, inset, ...props }, ref) {
650
- return /* @__PURE__ */ jsx38(
651
- ContextMenuPrimitive3.Item,
652
- {
653
- className: cn(
654
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
655
- inset && "pl-8",
656
- className
657
- ),
658
- ref,
659
- ...props
660
- }
661
- );
662
- });
663
-
664
- // src/components/ContextMenu/ContextMenuLabel.tsx
665
- import React35 from "react";
666
- import * as ContextMenuPrimitive4 from "@radix-ui/react-context-menu";
667
- import { jsx as jsx39 } from "react/jsx-runtime";
668
- var ContextMenuLabel = React35.forwardRef(function ContextMenuLabel2({ className, inset, ...props }, ref) {
669
- return /* @__PURE__ */ jsx39(
670
- ContextMenuPrimitive4.Label,
671
- {
672
- className: cn("px-2 py-1.5 text-sm font-semibold text-foreground", inset && "pl-8", className),
673
- ref,
674
- ...props
675
- }
676
- );
677
- });
678
-
679
- // src/components/ContextMenu/ContextMenuRadioItem.tsx
680
- import React36 from "react";
681
- import * as ContextMenuPrimitive5 from "@radix-ui/react-context-menu";
682
- import { CircleIcon } from "lucide-react";
683
- import { jsx as jsx40, jsxs as jsxs7 } from "react/jsx-runtime";
684
- var ContextMenuRadioItem = React36.forwardRef(function ContextMenuRadioItem2({ children, className, ...props }, ref) {
685
- return /* @__PURE__ */ jsxs7(
686
- ContextMenuPrimitive5.RadioItem,
687
- {
688
- className: cn(
689
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
690
- className
691
- ),
692
- ref,
693
- ...props,
694
- children: [
695
- /* @__PURE__ */ jsx40("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx40(ContextMenuPrimitive5.ItemIndicator, { children: /* @__PURE__ */ jsx40(CircleIcon, { className: "fill-current", style: { height: 8, width: 8 } }) }) }),
696
- children
697
- ]
698
- }
699
- );
700
- });
701
-
702
- // src/components/ContextMenu/ContextMenuSeparator.tsx
703
- import React37 from "react";
704
- import * as ContextMenuPrimitive6 from "@radix-ui/react-context-menu";
705
- import { jsx as jsx41 } from "react/jsx-runtime";
706
- var ContextMenuSeparator = React37.forwardRef(function ContextMenuSeparator2({ className, ...props }, ref) {
707
- return /* @__PURE__ */ jsx41(ContextMenuPrimitive6.Separator, { className: cn("-mx-1 my-1 h-px bg-border", className), ref, ...props });
708
- });
709
-
710
- // src/components/ContextMenu/ContextMenuShortcut.tsx
711
- import "react";
712
- import { jsx as jsx42 } from "react/jsx-runtime";
713
- var ContextMenuShortcut = ({ className, ...props }) => {
714
- return /* @__PURE__ */ jsx42("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props });
715
- };
716
-
717
- // src/components/ContextMenu/ContextMenuSubContent.tsx
718
- import React39 from "react";
719
- import * as ContextMenuPrimitive7 from "@radix-ui/react-context-menu";
720
- import { jsx as jsx43 } from "react/jsx-runtime";
721
- var ContextMenuSubContent = React39.forwardRef(function ContextMenuSubContent2({ className, ...props }, ref) {
722
- return /* @__PURE__ */ jsx43(
723
- ContextMenuPrimitive7.SubContent,
724
- {
725
- className: cn(
726
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",
727
- className
728
- ),
729
- ref,
730
- ...props
731
- }
732
- );
733
- });
734
-
735
- // src/components/ContextMenu/ContextMenuSubTrigger.tsx
736
- import React40 from "react";
737
- import * as ContextMenuPrimitive8 from "@radix-ui/react-context-menu";
738
- import { ChevronRightIcon as ChevronRightIcon2 } from "lucide-react";
739
- import { jsx as jsx44, jsxs as jsxs8 } from "react/jsx-runtime";
740
- var ContextMenuSubTrigger = React40.forwardRef(function ContextMenuSubTrigger2({ children, className, inset, ...props }, ref) {
741
- return /* @__PURE__ */ jsxs8(
742
- ContextMenuPrimitive8.SubTrigger,
743
- {
744
- className: cn(
745
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
746
- inset && "pl-8",
747
- className
748
- ),
749
- ref,
750
- ...props,
751
- children: [
752
- children,
753
- /* @__PURE__ */ jsx44(ChevronRightIcon2, { className: "ml-auto h-4 w-4" })
754
- ]
755
- }
756
- );
757
- });
758
-
759
- // src/components/ContextMenu/ContextMenu.tsx
760
- var ContextMenu = Object.assign(Root6, {
761
- CheckboxItem: ContextMenuCheckboxItem,
762
- Content: ContextMenuContent,
763
- Group,
764
- Item: ContextMenuItem,
765
- Label: ContextMenuLabel,
766
- Portal: Portal3,
767
- RadioGroup,
768
- RadioItem: ContextMenuRadioItem,
769
- Separator: ContextMenuSeparator,
770
- Shortcut: ContextMenuShortcut,
771
- Sub,
772
- SubContent: ContextMenuSubContent,
773
- SubTrigger: ContextMenuSubTrigger,
774
- Trigger: Trigger4
775
- });
776
-
777
- // src/components/DatePicker/DatePicker.tsx
778
- import React44, { useReducer, useState } from "react";
779
- import { AnimatePresence as AnimatePresence2, motion as motion2 } from "framer-motion";
780
- import { useTranslation as useTranslation2 } from "react-i18next";
781
-
782
- // src/components/DatePicker/Calendar.tsx
783
- import React41 from "react";
784
- import { AnimatePresence, motion } from "framer-motion";
785
- import { range } from "lodash-es";
786
- import { useTranslation } from "react-i18next";
787
- import { jsx as jsx45, jsxs as jsxs9 } from "react/jsx-runtime";
788
- var CALENDAR_ANIMATION_DURATION = 0.2;
789
- var Calendar = React41.forwardRef(function Calendar2(props, ref) {
790
- const { t } = useTranslation("libui");
791
- const firstDay = new Date(props.year, props.month).getDay();
792
- const lastDay = new Date(props.year, props.month + 1, 0).getDate();
793
- const days = range(1, lastDay + 1);
794
- const daysOfWeek = [
795
- t("days.sunday"),
796
- t("days.monday"),
797
- t("days.tuesday"),
798
- t("days.wednesday"),
799
- t("days.thursday"),
800
- t("days.friday"),
801
- t("days.saturday")
802
- ];
803
- return /* @__PURE__ */ jsx45(AnimatePresence, { initial: false, mode: "wait", children: /* @__PURE__ */ jsx45(
804
- motion.div,
805
- {
806
- animate: { opacity: 1, x: 0 },
807
- exit: { opacity: 0, x: -20 },
808
- initial: { opacity: 0, x: 20 },
809
- transition: { duration: CALENDAR_ANIMATION_DURATION },
810
- children: /* @__PURE__ */ jsxs9("div", { className: "grid h-56 w-56 grid-cols-7 text-sm", ref, children: [
811
- daysOfWeek.map((label) => /* @__PURE__ */ jsx45("div", { className: "flex h-8 w-8 items-center justify-center text-muted-foreground", children: label.charAt(0).toUpperCase() }, label)),
812
- /* @__PURE__ */ jsx45("div", { style: { gridColumn: `span ${firstDay} / span ${firstDay}` } }),
813
- days.map((day) => /* @__PURE__ */ jsx45(
814
- "button",
815
- {
816
- className: "dark:hover:bg-extra-muted flex h-8 w-8 items-center justify-center rounded-md hover:bg-slate-200 dark:hover:bg-slate-700",
817
- tabIndex: -1,
818
- type: "button",
819
- onClick: () => {
820
- props.onSelection(new Date(props.year, props.month, day));
821
- },
822
- children: day
823
- },
824
- day
825
- ))
826
- ] })
827
- },
828
- `${props.year}-${props.month}`
829
- ) });
830
- });
831
-
832
- // src/components/DatePicker/YearSelector.tsx
833
- import { useEffect, useRef } from "react";
834
- import { range as range2 } from "lodash-es";
835
-
836
- // src/components/ScrollArea/ScrollArea.tsx
837
- import React43 from "react";
838
- import { Corner, Root as Root7, Viewport } from "@radix-ui/react-scroll-area";
839
-
840
- // src/components/ScrollArea/ScrollBar.tsx
841
- import React42 from "react";
842
- import { ScrollAreaScrollbar, ScrollAreaThumb } from "@radix-ui/react-scroll-area";
843
- import { jsx as jsx46 } from "react/jsx-runtime";
844
- var ScrollBar = React42.forwardRef(function ScrollBar2({ className, orientation = "vertical", ...props }, ref) {
845
- return /* @__PURE__ */ jsx46(
846
- ScrollAreaScrollbar,
847
- {
848
- className: cn(
849
- "flex touch-none select-none transition-colors",
850
- orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
851
- orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
852
- className
853
- ),
854
- orientation,
855
- ref,
856
- ...props,
857
- children: /* @__PURE__ */ jsx46(ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
858
- }
859
- );
860
- });
861
-
862
- // src/components/ScrollArea/ScrollArea.tsx
863
- import { jsx as jsx47, jsxs as jsxs10 } from "react/jsx-runtime";
864
- var ScrollArea = React43.forwardRef(
865
- function ScrollArea2({ children, className, ...props }, ref) {
866
- return /* @__PURE__ */ jsxs10(Root7, { className: cn("relative overflow-hidden", className), "data-testid": "scroll-area", ref, ...props, children: [
867
- /* @__PURE__ */ jsx47(Viewport, { className: "h-full w-full rounded-[inherit]", children }),
868
- /* @__PURE__ */ jsx47(ScrollBar, {}),
869
- /* @__PURE__ */ jsx47(Corner, {})
870
- ] });
871
- }
872
- );
873
-
874
- // src/components/DatePicker/YearSelector.tsx
875
- import { jsx as jsx48 } from "react/jsx-runtime";
876
- var YearSelector = (props) => {
877
- const selectedRef = useRef(null);
878
- const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
879
- const years = Array.from(range2(currentYear - 100, currentYear + 8)).reverse();
880
- useEffect(() => {
881
- if (selectedRef.current) {
882
- selectedRef.current.scrollIntoView({ block: "center" });
883
- }
884
- }, []);
885
- return /* @__PURE__ */ jsx48(ScrollArea, { className: "h-56 w-56", children: /* @__PURE__ */ jsx48("div", { className: "grid grid-cols-3 gap-x-2 gap-y-1 text-sm text-muted-foreground", children: years.map((year) => /* @__PURE__ */ jsx48("div", { className: "flex h-7 items-center justify-center", children: /* @__PURE__ */ jsx48(
886
- "button",
887
- {
888
- className: cn(
889
- "h-full w-full rounded-md hover:bg-slate-200 dark:hover:bg-slate-700",
890
- year === props.selected.getFullYear() && "bg-primary text-primary-foreground hover:bg-primary dark:hover:bg-primary"
891
- ),
892
- ref: year === props.selected.getFullYear() ? selectedRef : null,
893
- tabIndex: -1,
894
- type: "button",
895
- onClick: () => {
896
- props.onSelection(new Date(year, 0));
897
- },
898
- children: year
899
- }
900
- ) }, year)) }) });
901
- };
902
-
903
- // src/components/DatePicker/DatePicker.tsx
904
- import { jsx as jsx49, jsxs as jsxs11 } from "react/jsx-runtime";
905
- var MONTHS = [
906
- "january",
907
- "february",
908
- "march",
909
- "april",
910
- "may",
911
- "june",
912
- "july",
913
- "august",
914
- "september",
915
- "october",
916
- "november",
917
- "december"
918
- ];
919
- var reducer = (previousDate, action) => {
920
- const newDate = new Date(previousDate.valueOf());
921
- switch (action.type) {
922
- case "increment":
923
- newDate.setMonth(newDate.getMonth() + 1);
924
- break;
925
- case "decrement":
926
- newDate.setMonth(newDate.getMonth() - 1);
927
- break;
928
- case "set-year":
929
- newDate.setFullYear(action.value);
930
- }
931
- return newDate;
932
- };
933
- var DatePicker = React44.forwardRef(function DatePicker2({ onSelection, ...props }, ref) {
934
- const [date, dispatch] = useReducer(reducer, /* @__PURE__ */ new Date());
935
- const [showYearSelector, setShowYearSelector] = useState(false);
936
- const { t } = useTranslation2("libui");
937
- const [canSetMonth, setCanSetMonth] = useState(true);
938
- const monthName = t(`months.${MONTHS[date.getMonth()]}`);
939
- const handleYearSelection = (date2) => {
940
- dispatch({ type: "set-year", value: date2.getFullYear() });
941
- setShowYearSelector(false);
942
- };
943
- return /* @__PURE__ */ jsxs11(Card, { className: "w-fit p-3", "data-testid": "datepicker", ref, ...props, children: [
944
- /* @__PURE__ */ jsxs11("div", { className: "mb-3 flex items-center justify-between px-1", children: [
945
- /* @__PURE__ */ jsxs11("div", { className: "flex items-center", children: [
946
- /* @__PURE__ */ jsx49("span", { className: "mx-1 text-sm font-medium tracking-tight", children: `${monthName} ${date.getFullYear()}` }),
947
- /* @__PURE__ */ jsx49(
948
- ArrowToggle,
949
- {
950
- className: "flex items-center justify-center rounded-full p-1 hover:bg-slate-200 dark:hover:bg-slate-700",
951
- isToggled: showYearSelector,
952
- position: "up",
953
- rotation: 180,
954
- tabIndex: -1,
955
- onClick: () => {
956
- setShowYearSelector(!showYearSelector);
957
- }
958
- }
959
- )
960
- ] }),
961
- /* @__PURE__ */ jsxs11("div", { className: cn("flex", { hidden: showYearSelector }), children: [
962
- /* @__PURE__ */ jsx49(
963
- ArrowToggle,
964
- {
965
- className: "flex items-center justify-center rounded-full p-1 hover:bg-slate-200 dark:hover:bg-slate-700",
966
- position: "left",
967
- tabIndex: -1,
968
- onClick: () => {
969
- if (canSetMonth) {
970
- setCanSetMonth(false);
971
- dispatch({ type: "decrement" });
972
- setTimeout(() => {
973
- setCanSetMonth(true);
974
- }, CALENDAR_ANIMATION_DURATION * 2e3);
975
- }
976
- }
977
- }
978
- ),
979
- /* @__PURE__ */ jsx49(
980
- ArrowToggle,
981
- {
982
- className: "flex items-center justify-center rounded-full p-1 hover:bg-slate-200 dark:hover:bg-slate-700",
983
- position: "right",
984
- tabIndex: -1,
985
- onClick: () => {
986
- if (canSetMonth) {
987
- setCanSetMonth(false);
988
- dispatch({ type: "increment" });
989
- setTimeout(() => {
990
- setCanSetMonth(true);
991
- }, CALENDAR_ANIMATION_DURATION * 2e3);
992
- }
993
- }
994
- }
995
- )
996
- ] })
997
- ] }),
998
- /* @__PURE__ */ jsx49("div", { children: /* @__PURE__ */ jsx49(AnimatePresence2, { initial: false, mode: "wait", children: showYearSelector ? /* @__PURE__ */ jsx49(
999
- motion2.div,
1000
- {
1001
- animate: { opacity: 1, y: 0 },
1002
- exit: { opacity: 0, y: 10 },
1003
- initial: { opacity: 0, y: 10 },
1004
- transition: { duration: 0.2 },
1005
- children: /* @__PURE__ */ jsx49(YearSelector, { selected: date, onSelection: handleYearSelection })
1006
- },
1007
- 0
1008
- ) : /* @__PURE__ */ jsx49(
1009
- motion2.div,
1010
- {
1011
- animate: { opacity: 1, y: 0 },
1012
- exit: { opacity: 0, y: -10 },
1013
- initial: { opacity: 0, y: -10 },
1014
- transition: { duration: 0.2 },
1015
- children: /* @__PURE__ */ jsx49(Calendar, { month: date.getMonth(), year: date.getFullYear(), onSelection })
1016
- },
1017
- 1
1018
- ) }) })
1019
- ] });
1020
- });
1021
-
1022
- // src/components/Dialog/Dialog.tsx
1023
- import { Root as Root8, Trigger as Trigger5 } from "@radix-ui/react-dialog";
1024
-
1025
- // src/components/Dialog/DialogContent.tsx
1026
- import React46 from "react";
1027
- import { Close, Content as Content5, Portal as Portal4 } from "@radix-ui/react-dialog";
1028
- import { XIcon } from "lucide-react";
1029
-
1030
- // src/components/Dialog/DialogOverlay.tsx
1031
- import React45 from "react";
1032
- import { Overlay as Overlay2 } from "@radix-ui/react-dialog";
1033
- import { jsx as jsx50 } from "react/jsx-runtime";
1034
- var DialogOverlay = React45.forwardRef(function DialogOverlay2({ className, ...props }, ref) {
1035
- return /* @__PURE__ */ jsx50(
1036
- Overlay2,
1037
- {
1038
- className: cn(
1039
- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
1040
- className
1041
- ),
1042
- ref,
1043
- ...props
1044
- }
1045
- );
1046
- });
1047
-
1048
- // src/components/Dialog/DialogContent.tsx
1049
- import { jsx as jsx51, jsxs as jsxs12 } from "react/jsx-runtime";
1050
- var DialogContent = React46.forwardRef(function DialogContent2({ children, className, ...props }, ref) {
1051
- return /* @__PURE__ */ jsxs12(Portal4, { children: [
1052
- /* @__PURE__ */ jsx51(DialogOverlay, {}),
1053
- /* @__PURE__ */ jsxs12(
1054
- Content5,
1055
- {
1056
- className: cn(
1057
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
1058
- className
1059
- ),
1060
- ref,
1061
- ...props,
1062
- children: [
1063
- children,
1064
- /* @__PURE__ */ jsx51(Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: /* @__PURE__ */ jsx51(XIcon, { className: "h-4 w-4" }) })
1065
- ]
1066
- }
1067
- )
1068
- ] });
1069
- });
1070
-
1071
- // src/components/Dialog/DialogDescription.tsx
1072
- import React47 from "react";
1073
- import { Description as Description2 } from "@radix-ui/react-dialog";
1074
- import { jsx as jsx52 } from "react/jsx-runtime";
1075
- var DialogDescription = React47.forwardRef(function DialogDescription2({ className, ...props }, ref) {
1076
- return /* @__PURE__ */ jsx52(Description2, { className: cn("text-sm text-muted-foreground", className), ref, ...props });
1077
- });
1078
-
1079
- // src/components/Dialog/DialogFooter.tsx
1080
- import "react";
1081
- import { jsx as jsx53 } from "react/jsx-runtime";
1082
- var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx53("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
1083
-
1084
- // src/components/Dialog/DialogHeader.tsx
1085
- import { jsx as jsx54 } from "react/jsx-runtime";
1086
- var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx54("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
1087
-
1088
- // src/components/Dialog/DialogTitle.tsx
1089
- import React49 from "react";
1090
- import { Title as Title2 } from "@radix-ui/react-dialog";
1091
- import { jsx as jsx55 } from "react/jsx-runtime";
1092
- var DialogTitle = React49.forwardRef(function DialogTitle2({ className, ...props }, ref) {
1093
- return /* @__PURE__ */ jsx55(Title2, { className: cn("text-lg font-semibold leading-none tracking-tight", className), ref, ...props });
1094
- });
1095
-
1096
- // src/components/Dialog/Dialog.tsx
1097
- var Dialog = Object.assign(Root8, {
1098
- Content: DialogContent,
1099
- Description: DialogDescription,
1100
- Footer: DialogFooter,
1101
- Header: DialogHeader,
1102
- Title: DialogTitle,
1103
- Trigger: Trigger5
1104
- });
1105
-
1106
- // src/components/Drawer/Drawer.tsx
1107
- import "react";
1108
- import { Drawer as DrawerPrimitive4 } from "vaul";
1109
-
1110
- // src/components/Drawer/DrawerContent.tsx
1111
- import React50 from "react";
1112
- import { Drawer as DrawerPrimitive } from "vaul";
1113
- import { jsx as jsx56, jsxs as jsxs13 } from "react/jsx-runtime";
1114
- var DrawerContent = React50.forwardRef(function DrawerContent2({ children, className, ...props }, ref) {
1115
- return /* @__PURE__ */ jsxs13(DrawerPrimitive.Portal, { children: [
1116
- /* @__PURE__ */ jsx56(DrawerPrimitive.Overlay, { className: cn("fixed inset-0 z-50 bg-black/80", className), ref, ...props }),
1117
- /* @__PURE__ */ jsxs13(
1118
- DrawerPrimitive.Content,
1119
- {
1120
- className: cn(
1121
- "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
1122
- className
1123
- ),
1124
- ref,
1125
- ...props,
1126
- children: [
1127
- /* @__PURE__ */ jsx56("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
1128
- children
1129
- ]
1130
- }
1131
- )
1132
- ] });
1133
- });
1134
-
1135
- // src/components/Drawer/DrawerDescription.tsx
1136
- import React51 from "react";
1137
- import { Drawer as DrawerPrimitive2 } from "vaul";
1138
- import { jsx as jsx57 } from "react/jsx-runtime";
1139
- var DrawerDescription = React51.forwardRef(function DrawerDescription2({ className, ...props }, ref) {
1140
- return /* @__PURE__ */ jsx57(DrawerPrimitive2.Description, { className: cn("text-sm text-muted-foreground", className), ref, ...props });
1141
- });
1142
-
1143
- // src/components/Drawer/DrawerFooter.tsx
1144
- import { jsx as jsx58 } from "react/jsx-runtime";
1145
- var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ jsx58("div", { className: cn("mt-auto flex flex-col gap-2 p-4", className), ...props });
1146
-
1147
- // src/components/Drawer/DrawerHeader.tsx
1148
- import "react";
1149
- import { jsx as jsx59 } from "react/jsx-runtime";
1150
- var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ jsx59("div", { className: cn("grid gap-1.5 p-4 text-center sm:text-left", className), ...props });
1151
-
1152
- // src/components/Drawer/DrawerTitle.tsx
1153
- import React53 from "react";
1154
- import { Drawer as DrawerPrimitive3 } from "vaul";
1155
- import { jsx as jsx60 } from "react/jsx-runtime";
1156
- var DrawerTitle = React53.forwardRef(function DrawerTitle2({ className, ...props }, ref) {
1157
- return /* @__PURE__ */ jsx60(
1158
- DrawerPrimitive3.Title,
1159
- {
1160
- className: cn("text-lg font-semibold leading-none tracking-tight", className),
1161
- ref,
1162
- ...props
1163
- }
1164
- );
1165
- });
1166
-
1167
- // src/components/Drawer/Drawer.tsx
1168
- import { jsx as jsx61 } from "react/jsx-runtime";
1169
- var DrawerRoot = ({ shouldScaleBackground = true, ...props }) => /* @__PURE__ */ jsx61(DrawerPrimitive4.Root, { shouldScaleBackground, ...props });
1170
- var Drawer = Object.assign(DrawerRoot, {
1171
- Close: DrawerPrimitive4.Close,
1172
- Content: DrawerContent,
1173
- Description: DrawerDescription,
1174
- Footer: DrawerFooter,
1175
- Header: DrawerHeader,
1176
- Title: DrawerTitle,
1177
- Trigger: DrawerPrimitive4.Trigger
1178
- });
1179
-
1180
- // src/components/DropdownButton/DropdownButton.tsx
1181
- import React55 from "react";
1182
- import { ChevronDownIcon as ChevronDownIcon2 } from "lucide-react";
1183
- import { jsx as jsx62, jsxs as jsxs14 } from "react/jsx-runtime";
1184
- var DropdownButton = React55.forwardRef(
1185
- function DropdownButton2({ children, className, ...props }, ref) {
1186
- return /* @__PURE__ */ jsxs14(
1187
- "button",
1188
- {
1189
- className: cn(
1190
- "flex h-9 w-full items-center whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
1191
- children ? "justify-between" : "justify-end",
1192
- className
1193
- ),
1194
- ref,
1195
- type: "button",
1196
- ...props,
1197
- children: [
1198
- children,
1199
- /* @__PURE__ */ jsx62(ChevronDownIcon2, { className: "h-4 w-4 opacity-50" })
1200
- ]
1201
- }
1202
- );
1203
- }
1204
- );
1205
-
1206
- // src/components/DropdownMenu/DropdownMenu.tsx
1207
- import * as DropdownMenuPrimitive9 from "@radix-ui/react-dropdown-menu";
1208
-
1209
- // src/components/DropdownMenu/DropdownMenuCheckboxItem.tsx
1210
- import React56 from "react";
1211
- import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
1212
- import { CheckIcon as CheckIcon3 } from "lucide-react";
1213
- import { jsx as jsx63, jsxs as jsxs15 } from "react/jsx-runtime";
1214
- var DropdownMenuCheckboxItem = React56.forwardRef(function DropdownMenuCheckboxItem2({ checked, children, className, ...props }, ref) {
1215
- return /* @__PURE__ */ jsxs15(
1216
- DropdownMenuPrimitive.CheckboxItem,
1217
- {
1218
- checked,
1219
- className: cn(
1220
- "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1221
- className
1222
- ),
1223
- ref,
1224
- ...props,
1225
- children: [
1226
- /* @__PURE__ */ jsx63("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx63(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx63(CheckIcon3, { className: "h-4 w-4" }) }) }),
1227
- children
1228
- ]
1229
- }
1230
- );
1231
- });
1232
-
1233
- // src/components/DropdownMenu/DropdownMenuContent.tsx
1234
- import React57 from "react";
1235
- import * as DropdownMenuPrimitive2 from "@radix-ui/react-dropdown-menu";
1236
- import { jsx as jsx64 } from "react/jsx-runtime";
1237
- var DropdownMenuContent = React57.forwardRef(function DropdownMenuContent2({ className, sideOffset = 4, widthFull = false, ...props }, ref) {
1238
- return /* @__PURE__ */ jsx64(DropdownMenuPrimitive2.Portal, { children: /* @__PURE__ */ jsx64(
1239
- DropdownMenuPrimitive2.Content,
1240
- {
1241
- className: cn(
1242
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
1243
- "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",
1244
- widthFull && "w-[var(--radix-dropdown-menu-trigger-width)]",
1245
- className
1246
- ),
1247
- ref,
1248
- sideOffset,
1249
- ...props
1250
- }
1251
- ) });
1252
- });
1253
-
1254
- // src/components/DropdownMenu/DropdownMenuItem.tsx
1255
- import React58 from "react";
1256
- import * as DropdownMenuPrimitive3 from "@radix-ui/react-dropdown-menu";
1257
- import { jsx as jsx65 } from "react/jsx-runtime";
1258
- var DropdownMenuItem = React58.forwardRef(function DropdownMenuItem2({ className, inset, ...props }, ref) {
1259
- return /* @__PURE__ */ jsx65(
1260
- DropdownMenuPrimitive3.Item,
1261
- {
1262
- className: cn(
1263
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1264
- inset && "pl-8",
1265
- className
1266
- ),
1267
- ref,
1268
- ...props
1269
- }
1270
- );
1271
- });
1272
-
1273
- // src/components/DropdownMenu/DropdownMenuLabel.tsx
1274
- import React59 from "react";
1275
- import * as DropdownMenuPrimitive4 from "@radix-ui/react-dropdown-menu";
1276
- import { jsx as jsx66 } from "react/jsx-runtime";
1277
- var DropdownMenuLabel = React59.forwardRef(function DropdownMenuLabel2({ className, inset, ...props }, ref) {
1278
- return /* @__PURE__ */ jsx66(
1279
- DropdownMenuPrimitive4.Label,
1280
- {
1281
- className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className),
1282
- ref,
1283
- ...props
1284
- }
1285
- );
1286
- });
1287
-
1288
- // src/components/DropdownMenu/DropdownMenuRadioItem.tsx
1289
- import React60 from "react";
1290
- import * as DropdownMenuPrimitive5 from "@radix-ui/react-dropdown-menu";
1291
- import { CircleIcon as CircleIcon2 } from "lucide-react";
1292
- import { jsx as jsx67, jsxs as jsxs16 } from "react/jsx-runtime";
1293
- var DropdownMenuRadioItem = React60.forwardRef(function DropdownMenuRadioItem2({ children, className, ...props }, ref) {
1294
- return /* @__PURE__ */ jsxs16(
1295
- DropdownMenuPrimitive5.RadioItem,
1296
- {
1297
- className: cn(
1298
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1299
- className
1300
- ),
1301
- ref,
1302
- ...props,
1303
- children: [
1304
- /* @__PURE__ */ jsx67("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx67(DropdownMenuPrimitive5.ItemIndicator, { children: /* @__PURE__ */ jsx67(CircleIcon2, { className: "h-4 w-4 fill-current" }) }) }),
1305
- children
1306
- ]
1307
- }
1308
- );
1309
- });
1310
-
1311
- // src/components/DropdownMenu/DropdownMenuSeparator.tsx
1312
- import React61 from "react";
1313
- import * as DropdownMenuPrimitive6 from "@radix-ui/react-dropdown-menu";
1314
- import { jsx as jsx68 } from "react/jsx-runtime";
1315
- var DropdownMenuSeparator = React61.forwardRef(function DropdownMenuSeparator2({ className, ...props }, ref) {
1316
- return /* @__PURE__ */ jsx68(DropdownMenuPrimitive6.Separator, { className: cn("-mx-1 my-1 h-px bg-muted", className), ref, ...props });
1317
- });
1318
-
1319
- // src/components/DropdownMenu/DropdownMenuShortcut.tsx
1320
- import "react";
1321
- import { jsx as jsx69 } from "react/jsx-runtime";
1322
- var DropdownMenuShortcut = ({ className, ...props }) => {
1323
- return /* @__PURE__ */ jsx69("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
1324
- };
1325
-
1326
- // src/components/DropdownMenu/DropdownMenuSubContent.tsx
1327
- import React63 from "react";
1328
- import * as DropdownMenuPrimitive7 from "@radix-ui/react-dropdown-menu";
1329
- import { jsx as jsx70 } from "react/jsx-runtime";
1330
- var DropdownMenuSubContent = React63.forwardRef(function DropdownMenuSubContent2({ className, ...props }, ref) {
1331
- return /* @__PURE__ */ jsx70(
1332
- DropdownMenuPrimitive7.SubContent,
1333
- {
1334
- className: cn(
1335
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",
1336
- className
1337
- ),
1338
- ref,
1339
- ...props
1340
- }
1341
- );
1342
- });
1343
-
1344
- // src/components/DropdownMenu/DropdownMenuSubTrigger.tsx
1345
- import React64 from "react";
1346
- import * as DropdownMenuPrimitive8 from "@radix-ui/react-dropdown-menu";
1347
- import { ChevronRightIcon as ChevronRightIcon3 } from "lucide-react";
1348
- import { jsx as jsx71, jsxs as jsxs17 } from "react/jsx-runtime";
1349
- var DropdownMenuSubTrigger = React64.forwardRef(function DropdownMenuSubTrigger2({ children, className, inset, ...props }, ref) {
1350
- return /* @__PURE__ */ jsxs17(
1351
- DropdownMenuPrimitive8.SubTrigger,
1352
- {
1353
- className: cn(
1354
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
1355
- inset && "pl-8",
1356
- className
1357
- ),
1358
- ref,
1359
- ...props,
1360
- children: [
1361
- children,
1362
- /* @__PURE__ */ jsx71(ChevronRightIcon3, { className: "ml-auto h-4 w-4" })
1363
- ]
1364
- }
1365
- );
1366
- });
1367
-
1368
- // src/components/DropdownMenu/DropdownMenu.tsx
1369
- var DropdownMenu = Object.assign(DropdownMenuPrimitive9.Root, {
1370
- CheckboxItem: DropdownMenuCheckboxItem,
1371
- Content: DropdownMenuContent,
1372
- Group: DropdownMenuPrimitive9.Group,
1373
- Item: DropdownMenuItem,
1374
- Label: DropdownMenuLabel,
1375
- Portal: DropdownMenuPrimitive9.Portal,
1376
- RadioGroup: DropdownMenuPrimitive9.RadioGroup,
1377
- RadioItem: DropdownMenuRadioItem,
1378
- Separator: DropdownMenuSeparator,
1379
- Shortcut: DropdownMenuShortcut,
1380
- Sub: DropdownMenuPrimitive9.Sub,
1381
- SubContent: DropdownMenuSubContent,
1382
- SubTrigger: DropdownMenuSubTrigger,
1383
- Trigger: DropdownMenuPrimitive9.Trigger
1384
- });
1385
-
1386
- // src/components/ErrorBoundary/ErrorBoundary.tsx
1387
- import { ErrorBoundary as ReactErrorBoundary } from "react-error-boundary";
1388
-
1389
- // src/components/ErrorFallback/ErrorFallback.tsx
1390
- import { useEffect as useEffect2 } from "react";
1391
- import { jsx as jsx72, jsxs as jsxs18 } from "react/jsx-runtime";
1392
- var ErrorFallback = ({ error }) => {
1393
- useEffect2(() => {
1394
- console.error(error);
1395
- }, [error]);
1396
- return /* @__PURE__ */ jsxs18("div", { className: "flex min-h-screen flex-col items-center justify-center gap-1 p-3 text-center", children: [
1397
- /* @__PURE__ */ jsx72("h1", { className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground", children: "Unexpected Error" }),
1398
- /* @__PURE__ */ jsx72("h3", { className: "text-3xl font-extrabold tracking-tight sm:text-4xl md:text-5xl", children: "Something Went Wrong" }),
1399
- /* @__PURE__ */ jsx72("p", { className: "mt-2 max-w-prose text-sm text-muted-foreground sm:text-base", children: "We apologize for the inconvenience. Please contact us for further assistance." }),
1400
- /* @__PURE__ */ jsx72("div", { className: "mt-6", children: /* @__PURE__ */ jsxs18(
1401
- "button",
1402
- {
1403
- className: "text-sky-800 underline-offset-4 hover:text-sky-700 hover:underline dark:text-sky-200 dark:hover:text-sky-300",
1404
- type: "button",
1405
- onClick: () => {
1406
- window.location.assign(window.location.origin);
1407
- },
1408
- children: [
1409
- "Reload Page",
1410
- /* @__PURE__ */ jsx72("span", { "aria-hidden": "true", children: " \u2192" })
1411
- ]
1412
- }
1413
- ) })
1414
- ] });
1415
- };
1416
-
1417
- // src/components/ErrorBoundary/ErrorBoundary.tsx
1418
- import { jsx as jsx73 } from "react/jsx-runtime";
1419
- var ErrorBoundary = ({ children }) => {
1420
- return /* @__PURE__ */ jsx73(ReactErrorBoundary, { FallbackComponent: ErrorFallback, children });
1421
- };
1422
-
1423
- // src/components/Form/Form.tsx
1424
- import { useState as useState5 } from "react";
1425
- import { set } from "lodash-es";
1426
- import { useTranslation as useTranslation5 } from "react-i18next";
1427
- import { twMerge } from "tailwind-merge";
1428
- import "zod";
1429
-
1430
- // src/components/Heading/Heading.tsx
1431
- import { jsx as jsx74 } from "react/jsx-runtime";
1432
- var Heading = ({ children, className, variant }) => {
1433
- switch (variant) {
1434
- case "h1":
1435
- return /* @__PURE__ */ jsx74("h1", { className: cn("text-3xl font-bold tracking-tight", className), children });
1436
- case "h2":
1437
- return /* @__PURE__ */ jsx74("h2", { className: cn("text-2xl font-semibold tracking-tight", className), children });
1438
- case "h3":
1439
- return /* @__PURE__ */ jsx74("h3", { className: cn("text-xl font-semibold tracking-tight", className), children });
1440
- case "h4":
1441
- return /* @__PURE__ */ jsx74("h4", { className: cn("text-lg font-semibold tracking-tight", className), children });
1442
- case "h5":
1443
- return /* @__PURE__ */ jsx74("h4", { className: cn("text-base font-semibold tracking-tight", className), children });
1444
- default:
1445
- throw new Error(`Unhandled heading variant: ${variant}`);
1446
- }
1447
- };
1448
-
1449
- // src/components/Form/ErrorMessage.tsx
1450
- import { CircleAlertIcon } from "lucide-react";
1451
- import { jsx as jsx75, jsxs as jsxs19 } from "react/jsx-runtime";
1452
- var ErrorMessage = ({ error }) => error ? /* @__PURE__ */ jsxs19("div", { className: "flex w-full items-center text-sm font-medium text-destructive", children: [
1453
- /* @__PURE__ */ jsx75(CircleAlertIcon, { className: "mr-1", style: { strokeWidth: "2px" } }),
1454
- /* @__PURE__ */ jsx75("span", { children: error })
1455
- ] }) : null;
1456
-
1457
- // src/components/Form/DynamicField.tsx
1458
- import { useEffect as useEffect7, useMemo as useMemo2, useState as useState4 } from "react";
1459
- import { pick } from "lodash-es";
1460
-
1461
- // src/components/Form/StaticField.tsx
1462
- import { useCallback as useCallback2 } from "react";
1463
- import { match as match6 } from "ts-pattern";
1464
-
1465
- // src/components/Form/NumberRecordField.tsx
1466
- import { useEffect as useEffect3 } from "react";
1467
-
1468
- // src/components/Form/NumberField/NumberField.tsx
1469
- import { match } from "ts-pattern";
1470
-
1471
- // src/components/Input/Input.tsx
1472
- import React65 from "react";
1473
- import { jsx as jsx76 } from "react/jsx-runtime";
1474
- var Input = React65.forwardRef(function Input2({ className, type, ...props }, ref) {
1475
- return /* @__PURE__ */ jsx76(
1476
- "input",
1477
- {
1478
- autoComplete: "off",
1479
- className: cn(
1480
- "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
1481
- className
1482
- ),
1483
- "data-testid": "input",
1484
- ref,
1485
- type,
1486
- ...props
1487
- }
1488
- );
1489
- });
1490
-
1491
- // src/components/Label/Label.tsx
1492
- import React66 from "react";
1493
- import * as LabelPrimitive from "@radix-ui/react-label";
1494
- import { cva as cva3 } from "class-variance-authority";
1495
- import { jsx as jsx77 } from "react/jsx-runtime";
1496
- var labelVariants = cva3(
1497
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
1498
- );
1499
- var Label3 = React66.forwardRef(function Label4({ className, ...props }, ref) {
1500
- return /* @__PURE__ */ jsx77(LabelPrimitive.Root, { className: cn(labelVariants(), className), ref, ...props });
1501
- });
1502
-
1503
- // src/components/Form/FieldGroup/FieldGroupDescription.tsx
1504
- import { CircleHelpIcon } from "lucide-react";
1505
-
1506
- // src/components/Popover/Popover.tsx
1507
- import { Root as PopoverRoot, Trigger as PopoverTrigger } from "@radix-ui/react-popover";
1508
-
1509
- // src/components/Popover/PopoverContent.tsx
1510
- import React67 from "react";
1511
- import { Content as Content7, Portal as Portal7 } from "@radix-ui/react-popover";
1512
- import { jsx as jsx78 } from "react/jsx-runtime";
1513
- var PopoverContent = React67.forwardRef(
1514
- function PopoverContent2({ align = "center", asChild, autofocus = true, className, collisionPadding = 0, sideOffset = 4, ...props }, ref) {
1515
- return /* @__PURE__ */ jsx78(Portal7, { children: /* @__PURE__ */ jsx78(
1516
- Content7,
1517
- {
1518
- align,
1519
- asChild,
1520
- className: cn(
1521
- "z-50 w-72 rounded-md border bg-popover px-3 py-1.5 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",
1522
- className
1523
- ),
1524
- collisionPadding,
1525
- ref,
1526
- sideOffset,
1527
- onOpenAutoFocus: autofocus === false ? (event) => event.preventDefault() : void 0,
1528
- ...props
1529
- }
1530
- ) });
1531
- }
1532
- );
1533
-
1534
- // src/components/Popover/Popover.tsx
1535
- var Popover = Object.assign(PopoverRoot, {
1536
- Content: PopoverContent,
1537
- Trigger: PopoverTrigger
1538
- });
1539
-
1540
- // src/components/Form/FieldGroup/FieldGroupDescription.tsx
1541
- import { jsx as jsx79, jsxs as jsxs20 } from "react/jsx-runtime";
1542
- var FieldGroupDescription = ({ description }) => description ? /* @__PURE__ */ jsxs20(Popover, { children: [
1543
- /* @__PURE__ */ jsx79(Popover.Trigger, { children: /* @__PURE__ */ jsx79(CircleHelpIcon, { className: "text-muted-foreground" }) }),
1544
- /* @__PURE__ */ jsx79(Popover.Content, { className: "text-sm text-muted-foreground", children: /* @__PURE__ */ jsx79("p", { children: description }) })
1545
- ] }) : null;
1546
-
1547
- // src/components/Form/FieldGroup/FieldGroupRoot.tsx
1548
- import "react";
1549
- import { jsx as jsx80 } from "react/jsx-runtime";
1550
- var FieldGroupRoot = ({ children }) => /* @__PURE__ */ jsx80("div", { className: "flex flex-col gap-2 @container", children });
1551
-
1552
- // src/components/Form/FieldGroup/FieldGroupRow.tsx
1553
- import { jsx as jsx81 } from "react/jsx-runtime";
1554
- var FieldGroupRow = ({ children }) => /* @__PURE__ */ jsx81("div", { className: "relative flex items-center gap-2", children });
1555
-
1556
- // src/components/Form/FieldGroup/FieldGroup.tsx
1557
- var FieldGroup = Object.assign(FieldGroupRoot, {
1558
- Description: FieldGroupDescription,
1559
- Error: ErrorMessage,
1560
- Row: FieldGroupRow
1561
- });
1562
-
1563
- // src/components/Form/NumberField/NumberFieldInput.tsx
1564
- import { jsx as jsx82, jsxs as jsxs21 } from "react/jsx-runtime";
1565
- var NumberFieldInput = ({
1566
- description,
1567
- error,
1568
- label,
1569
- max,
1570
- min,
1571
- name,
1572
- setValue,
1573
- value
1574
- }) => {
1575
- const handleChange = (event) => {
1576
- const newValue = parseFloat(event.target.value);
1577
- if (Number.isNaN(newValue)) {
1578
- setValue(void 0);
1579
- } else if (newValue >= (min ?? -Infinity) && newValue <= (max ?? Infinity)) {
1580
- setValue(newValue);
1581
- }
1582
- };
1583
- return /* @__PURE__ */ jsxs21(FieldGroup, { children: [
1584
- /* @__PURE__ */ jsxs21(FieldGroup.Row, { children: [
1585
- /* @__PURE__ */ jsx82(Label3, { children: label }),
1586
- /* @__PURE__ */ jsx82(FieldGroup.Description, { description })
1587
- ] }),
1588
- /* @__PURE__ */ jsx82(Input, { max, min, name, type: "text", value: value ?? "", onChange: handleChange }),
1589
- /* @__PURE__ */ jsx82(FieldGroup.Error, { error })
1590
- ] });
1591
- };
1592
-
1593
- // src/components/RadioGroup/RadioGroup.tsx
1594
- import React70 from "react";
1595
- import * as RadioGroupPrimitive2 from "@radix-ui/react-radio-group";
1596
-
1597
- // src/components/RadioGroup/RadioGroupItem.tsx
1598
- import React69 from "react";
1599
- import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
1600
- import { CircleIcon as CircleIcon3 } from "lucide-react";
1601
- import { jsx as jsx83 } from "react/jsx-runtime";
1602
- var RadioGroupItem = React69.forwardRef(function RadioGroupItem2({ className, ...props }, ref) {
1603
- return /* @__PURE__ */ jsx83(
1604
- RadioGroupPrimitive.Item,
1605
- {
1606
- className: cn(
1607
- "flex aspect-square h-4 w-4 items-center justify-center rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
1608
- className
1609
- ),
1610
- ref,
1611
- ...props,
1612
- children: /* @__PURE__ */ jsx83(RadioGroupPrimitive.Indicator, { asChild: true, children: /* @__PURE__ */ jsx83(
1613
- CircleIcon3,
1614
- {
1615
- className: "fill-current text-current",
1616
- style: { height: "0.625rem", strokeWidth: "2px", width: "0.625rem" }
1617
- }
1618
- ) })
1619
- }
1620
- );
1621
- });
1622
-
1623
- // src/components/RadioGroup/RadioGroup.tsx
1624
- import { jsx as jsx84 } from "react/jsx-runtime";
1625
- var RadioGroupRoot = React70.forwardRef(function RadioGroup3({ className, ...props }, ref) {
1626
- return /* @__PURE__ */ jsx84(RadioGroupPrimitive2.Root, { className: cn("grid gap-2", className), "data-testid": "radio-group", ...props, ref });
1627
- });
1628
- var RadioGroup4 = Object.assign(RadioGroupRoot, {
1629
- Item: RadioGroupItem
1630
- });
1631
-
1632
- // src/components/Form/NumberField/NumberFieldRadio.tsx
1633
- import { jsx as jsx85, jsxs as jsxs22 } from "react/jsx-runtime";
1634
- var NumberFieldRadio = ({
1635
- description,
1636
- error,
1637
- label,
1638
- name,
1639
- options,
1640
- setValue,
1641
- value
1642
- }) => {
1643
- const optionsCount = Object.keys(options).length;
1644
- return /* @__PURE__ */ jsxs22(FieldGroup, { children: [
1645
- /* @__PURE__ */ jsxs22(FieldGroup.Row, { children: [
1646
- /* @__PURE__ */ jsx85(Label3, { children: label }),
1647
- /* @__PURE__ */ jsx85(FieldGroup.Description, { description })
1648
- ] }),
1649
- /* @__PURE__ */ jsx85(
1650
- RadioGroup4,
1651
- {
1652
- className: cn(
1653
- "flex",
1654
- optionsCount > 5 ? "flex-col" : "flex-col @3xl:flex-row @3xl:items-center @3xl:justify-between"
1655
- ),
1656
- name,
1657
- value: value?.toString() ?? "",
1658
- onValueChange: (value2) => setValue(parseInt(value2)),
1659
- children: Object.keys(options).map((val) => parseInt(val)).toSorted((a, b) => a - b).map((key) => /* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-2", children: [
1660
- /* @__PURE__ */ jsx85(RadioGroup4.Item, { id: `${name}-${key}`, value: key.toString() }),
1661
- /* @__PURE__ */ jsx85(Label3, { className: "font-normal", htmlFor: `${name}-${key}`, children: options[key] })
1662
- ] }, key))
1663
- }
1664
- ),
1665
- /* @__PURE__ */ jsx85(FieldGroup.Error, { error })
1666
- ] });
1667
- };
1668
-
1669
- // src/components/Slider/Slider.tsx
1670
- import React71 from "react";
1671
- import { Range, Root as Root12, Thumb, Track } from "@radix-ui/react-slider";
1672
- import { jsx as jsx86, jsxs as jsxs23 } from "react/jsx-runtime";
1673
- var Slider = React71.forwardRef(
1674
- function Slider2({ className, ...props }, ref) {
1675
- return /* @__PURE__ */ jsxs23(
1676
- Root12,
1677
- {
1678
- className: cn("relative flex w-full touch-none select-none items-center py-1.5", className),
1679
- ref,
1680
- ...props,
1681
- children: [
1682
- /* @__PURE__ */ jsx86(Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary opacity-15", children: /* @__PURE__ */ jsx86(Range, { className: "absolute h-full bg-primary" }) }),
1683
- /* @__PURE__ */ jsx86(Thumb, { className: "block h-4 w-4 rounded-full border border-slate-500 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" })
1684
- ]
1685
- }
1686
- );
1687
- }
1688
- );
1689
-
1690
- // src/components/Form/NumberField/NumberFieldSlider.tsx
1691
- import { jsx as jsx87, jsxs as jsxs24 } from "react/jsx-runtime";
1692
- var NumberFieldSlider = ({
1693
- description,
1694
- error,
1695
- label,
1696
- max,
1697
- min,
1698
- name,
1699
- setValue,
1700
- value
1701
- }) => {
1702
- return /* @__PURE__ */ jsxs24(FieldGroup, { children: [
1703
- /* @__PURE__ */ jsxs24(FieldGroup.Row, { children: [
1704
- /* @__PURE__ */ jsx87(Label3, { children: label }),
1705
- /* @__PURE__ */ jsx87(FieldGroup.Description, { description })
1706
- ] }),
1707
- /* @__PURE__ */ jsxs24(FieldGroup.Row, { children: [
1708
- /* @__PURE__ */ jsx87(Slider, { max, min, name, value: [value ?? 0], onValueChange: ([value2]) => setValue(value2) }),
1709
- /* @__PURE__ */ jsx87("span", { className: "flex h-full w-8 items-center justify-center text-sm text-muted-foreground", children: value ?? "NA" })
1710
- ] }),
1711
- /* @__PURE__ */ jsx87(FieldGroup.Error, { error })
1712
- ] });
1713
- };
1714
-
1715
- // src/components/Form/NumberField/NumberField.tsx
1716
- import { jsx as jsx88 } from "react/jsx-runtime";
1717
- var NumberField = (props) => {
1718
- return match(props).with({ variant: "input" }, (props2) => /* @__PURE__ */ jsx88(NumberFieldInput, { ...props2 })).with({ variant: "slider" }, (props2) => /* @__PURE__ */ jsx88(NumberFieldSlider, { ...props2 })).with({ variant: "radio" }, (props2) => /* @__PURE__ */ jsx88(NumberFieldRadio, { ...props2 })).exhaustive();
1719
- };
1720
-
1721
- // src/components/Form/NumberRecordField.tsx
1722
- import { jsx as jsx89, jsxs as jsxs25 } from "react/jsx-runtime";
1723
- var NumberRecordField = ({
1724
- error: recordError,
1725
- items,
1726
- label,
1727
- options,
1728
- setError: setRecordError,
1729
- setValue: setRecordValue,
1730
- value: recordValue
1731
- }) => {
1732
- useEffect3(() => {
1733
- setRecordValue({});
1734
- }, [options]);
1735
- if (!recordValue) {
1736
- return null;
1737
- }
1738
- return /* @__PURE__ */ jsxs25("div", { className: "space-y-4", children: [
1739
- /* @__PURE__ */ jsx89(Heading, { variant: "h5", children: label }),
1740
- /* @__PURE__ */ jsx89("div", { className: "space-y-6", children: Object.keys(items).map((name) => {
1741
- const item = items[name];
1742
- return /* @__PURE__ */ jsx89(
1743
- NumberField,
1744
- {
1745
- error: recordError?.[name],
1746
- kind: "number",
1747
- name,
1748
- options,
1749
- setError: (error) => setRecordError({ ...recordError, [name]: error }),
1750
- setValue: (value) => setRecordValue({ ...recordValue, [name]: value }),
1751
- value: recordValue?.[name],
1752
- variant: "radio",
1753
- ...item
1754
- },
1755
- name
1756
- );
1757
- }) })
1758
- ] });
1759
- };
1760
-
1761
- // src/components/Form/RecordArrayField.tsx
1762
- import { memo, useEffect as useEffect6 } from "react";
1763
- import { MinusCircleIcon, PlusCircleIcon } from "lucide-react";
1764
- import { useTranslation as useTranslation4 } from "react-i18next";
1765
-
1766
- // src/components/Form/BooleanField/BooleanField.tsx
1767
- import { match as match3 } from "ts-pattern";
1768
-
1769
- // src/components/Form/BooleanField/BooleanFieldCheckbox.tsx
1770
- import { jsx as jsx90, jsxs as jsxs26 } from "react/jsx-runtime";
1771
- var BooleanFieldCheckbox = ({ error, label, name, setValue, value }) => {
1772
- return /* @__PURE__ */ jsxs26(FieldGroup, { children: [
1773
- /* @__PURE__ */ jsxs26(FieldGroup.Row, { children: [
1774
- /* @__PURE__ */ jsx90(
1775
- Checkbox,
1776
- {
1777
- checked: value,
1778
- id: name,
1779
- name,
1780
- onCheckedChange: (value2) => {
1781
- if (typeof value2 === "boolean") {
1782
- setValue(value2);
1783
- }
1784
- }
1785
- }
1786
- ),
1787
- /* @__PURE__ */ jsx90(Label3, { htmlFor: name, children: label })
1788
- ] }),
1789
- /* @__PURE__ */ jsx90(FieldGroup.Error, { error })
1790
- ] });
1791
- };
1792
-
1793
- // src/components/Form/BooleanField/BooleanFieldRadio.tsx
1794
- import { useCallback } from "react";
1795
- import { useTranslation as useTranslation3 } from "react-i18next";
1796
- import { match as match2 } from "ts-pattern";
1797
- import { jsx as jsx91, jsxs as jsxs27 } from "react/jsx-runtime";
1798
- var stringifyBoolean = (value) => match2(value).with(void 0, () => "").with(true, () => "true").with(false, () => "false").exhaustive();
1799
- var BooleanFieldRadio = ({ error, label, name, options, setValue, value }) => {
1800
- const { t } = useTranslation3("libui");
1801
- const handleValueChange = useCallback(
1802
- (value2) => {
1803
- match2(value2).with("", () => setValue(void 0)).with("true", () => setValue(true)).with("false", () => setValue(false)).otherwise((value3) => console.error(`Unexpected value for boolean field '${name}': ${value3}`));
1804
- },
1805
- [match2, setValue]
1806
- );
1807
- return /* @__PURE__ */ jsxs27(FieldGroup, { children: [
1808
- /* @__PURE__ */ jsx91(Label3, { children: label }),
1809
- /* @__PURE__ */ jsxs27(RadioGroup4, { name, value: stringifyBoolean(value), onValueChange: handleValueChange, children: [
1810
- /* @__PURE__ */ jsxs27(FieldGroup.Row, { children: [
1811
- /* @__PURE__ */ jsx91(RadioGroup4.Item, { id: `${name}-true`, value: "true" }),
1812
- /* @__PURE__ */ jsx91(Label3, { className: "font-normal", htmlFor: `${name}-true`, children: options?.true ?? t("form.radioLabels.true") })
1813
- ] }),
1814
- /* @__PURE__ */ jsxs27(FieldGroup.Row, { children: [
1815
- /* @__PURE__ */ jsx91(RadioGroup4.Item, { id: `${name}-false`, value: "false" }),
1816
- /* @__PURE__ */ jsx91(Label3, { className: "font-normal", htmlFor: `${name}-false`, children: options?.false ?? t("form.radioLabels.false") })
1817
- ] })
1818
- ] }),
1819
- /* @__PURE__ */ jsx91(FieldGroup.Error, { error })
1820
- ] });
1821
- };
1822
-
1823
- // src/components/Form/BooleanField/BooleanField.tsx
1824
- import { jsx as jsx92 } from "react/jsx-runtime";
1825
- var BooleanField = (props) => {
1826
- return match3(props).with({ variant: "radio" }, (props2) => /* @__PURE__ */ jsx92(BooleanFieldRadio, { ...props2 })).with({ variant: "checkbox" }, (props2) => /* @__PURE__ */ jsx92(BooleanFieldCheckbox, { ...props2 })).exhaustive();
1827
- };
1828
-
1829
- // src/components/Form/DateField/DateField.tsx
1830
- import { useEffect as useEffect4, useState as useState2 } from "react";
1831
- import { toBasicISOString } from "@douglasneuroinformatics/libjs";
1832
- import { jsx as jsx93, jsxs as jsxs28 } from "react/jsx-runtime";
1833
- var isValidDateString = (s) => /^(\d{4})-((0[1-9])|(1[0-2]))-((0[1-9])|([12])[0-9]|3[01])$/.test(s);
1834
- var DateField = ({ error, label, name, setValue, value }) => {
1835
- const [isDatePickerOpen, setIsDatePickerOpen] = useState2(false);
1836
- const [isInputFocused, setIsInputFocused] = useState2(false);
1837
- const [inputValue, setInputValue] = useState2("");
1838
- useEffect4(() => {
1839
- const isSelecting = isDatePickerOpen || isInputFocused;
1840
- if (isSelecting) {
1841
- return;
1842
- } else if (isValidDateString(inputValue)) {
1843
- setValue(new Date(inputValue));
1844
- } else {
1845
- setInputValue("");
1846
- }
1847
- }, [isDatePickerOpen, isInputFocused]);
1848
- useEffect4(() => {
1849
- setInputValue(value ? toBasicISOString(value) : "");
1850
- }, [value]);
1851
- return /* @__PURE__ */ jsxs28(FieldGroup, { children: [
1852
- /* @__PURE__ */ jsx93(Label3, { htmlFor: name, children: label }),
1853
- /* @__PURE__ */ jsxs28(Popover, { open: isDatePickerOpen, onOpenChange: setIsDatePickerOpen, children: [
1854
- /* @__PURE__ */ jsx93(Popover.Trigger, { children: /* @__PURE__ */ jsx93(
1855
- Input,
1856
- {
1857
- autoComplete: "off",
1858
- "data-cy": "date-input",
1859
- "data-testid": "date-input",
1860
- name,
1861
- placeholder: "YYYY-MM-DD",
1862
- type: "text",
1863
- value: inputValue,
1864
- onBlur: () => setIsInputFocused(false),
1865
- onChange: (event) => setInputValue(event.target.value),
1866
- onFocus: () => setIsInputFocused(true)
1867
- }
1868
- ) }),
1869
- /* @__PURE__ */ jsx93(Popover.Content, { asChild: true, align: "start", autofocus: false, className: "w-auto", children: /* @__PURE__ */ jsx93(
1870
- DatePicker,
1871
- {
1872
- onSelection: (value2) => {
1873
- setInputValue(toBasicISOString(value2));
1874
- setIsDatePickerOpen(false);
1875
- }
1876
- }
1877
- ) })
1878
- ] }),
1879
- /* @__PURE__ */ jsx93(FieldGroup.Error, { error })
1880
- ] });
1881
- };
1882
-
1883
- // src/components/Form/SetField/SetField.tsx
1884
- import { useEffect as useEffect5 } from "react";
1885
- import { match as match4 } from "ts-pattern";
1886
-
1887
- // src/components/Form/SetField/SetFieldListbox.tsx
1888
- import { jsx as jsx94, jsxs as jsxs29 } from "react/jsx-runtime";
1889
- var SetFieldListbox = ({
1890
- description,
1891
- error,
1892
- label,
1893
- name,
1894
- onCheckedChange,
1895
- options,
1896
- value
1897
- }) => {
1898
- return /* @__PURE__ */ jsxs29(FieldGroup, { children: [
1899
- /* @__PURE__ */ jsxs29(FieldGroup.Row, { children: [
1900
- /* @__PURE__ */ jsx94(Label3, { children: label }),
1901
- /* @__PURE__ */ jsx94(FieldGroup.Description, { description })
1902
- ] }),
1903
- Object.keys(options).map((option) => /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2", children: [
1904
- /* @__PURE__ */ jsx94(
1905
- Checkbox,
1906
- {
1907
- checked: value?.has(option) ?? false,
1908
- id: `${name}-${option}`,
1909
- onCheckedChange: (checked) => {
1910
- onCheckedChange(option, !checked);
1911
- }
1912
- }
1913
- ),
1914
- /* @__PURE__ */ jsx94(Label3, { className: "font-normal", htmlFor: `${name}-${option}`, children: options[option] })
1915
- ] }, option)),
1916
- /* @__PURE__ */ jsx94(FieldGroup.Error, { error })
1917
- ] });
1918
- };
1919
-
1920
- // src/components/Form/SetField/SetFieldSelect.tsx
1921
- import { jsx as jsx95, jsxs as jsxs30 } from "react/jsx-runtime";
1922
- var SetFieldSelect = ({
1923
- description,
1924
- error,
1925
- label,
1926
- onCheckedChange,
1927
- options,
1928
- value
1929
- }) => {
1930
- return value ? /* @__PURE__ */ jsxs30(FieldGroup, { children: [
1931
- /* @__PURE__ */ jsxs30(FieldGroup.Row, { children: [
1932
- /* @__PURE__ */ jsx95(Label3, { children: label }),
1933
- /* @__PURE__ */ jsx95(FieldGroup.Description, { description })
1934
- ] }),
1935
- /* @__PURE__ */ jsxs30(DropdownMenu, { children: [
1936
- /* @__PURE__ */ jsx95(DropdownMenu.Trigger, { asChild: true, className: "w-full", children: /* @__PURE__ */ jsx95(DropdownButton, { children: value.size ? /* @__PURE__ */ jsx95("div", { className: "flex items-center gap-2", children: Array.from(value).map((option) => /* @__PURE__ */ jsx95(Badge, { className: "font-normal", variant: "outline", children: options[option] }, option)) }) : null }) }),
1937
- /* @__PURE__ */ jsx95(DropdownMenu.Content, { widthFull: true, align: "start", children: Object.keys(options).map((option) => {
1938
- const checked = value.has(option);
1939
- return /* @__PURE__ */ jsx95(
1940
- DropdownMenu.CheckboxItem,
1941
- {
1942
- checked,
1943
- onSelect: (event) => {
1944
- event.preventDefault();
1945
- onCheckedChange(option, value.has(option));
1946
- },
1947
- children: options[option]
1948
- },
1949
- option
1950
- );
1951
- }) })
1952
- ] }),
1953
- /* @__PURE__ */ jsx95(FieldGroup.Error, { error })
1954
- ] }) : null;
1955
- };
1956
-
1957
- // src/components/Form/SetField/SetField.tsx
1958
- import { jsx as jsx96 } from "react/jsx-runtime";
1959
- var SetField = (props) => {
1960
- useEffect5(() => {
1961
- if (!props.value) {
1962
- props.setValue(/* @__PURE__ */ new Set([]));
1963
- }
1964
- }, [props.value]);
1965
- const handleCheckedChange = (option, isChecked) => {
1966
- if (isChecked) {
1967
- const updatedValue = new Set(props.value);
1968
- updatedValue.delete(option);
1969
- props.setValue(updatedValue);
1970
- } else {
1971
- const updatedValue = new Set(props.value);
1972
- updatedValue.add(option);
1973
- props.setValue(updatedValue);
1974
- }
1975
- };
1976
- return match4(props).with({ variant: "select" }, (props2) => /* @__PURE__ */ jsx96(SetFieldSelect, { onCheckedChange: handleCheckedChange, ...props2 })).with({ variant: "listbox" }, (props2) => /* @__PURE__ */ jsx96(SetFieldListbox, { onCheckedChange: handleCheckedChange, ...props2 })).exhaustive();
1977
- };
1978
-
1979
- // src/components/Form/StringField/StringField.tsx
1980
- import { match as match5 } from "ts-pattern";
1981
-
1982
- // src/components/Form/StringField/StringFieldInput.tsx
1983
- import { jsx as jsx97, jsxs as jsxs31 } from "react/jsx-runtime";
1984
- var StringFieldInput = ({ description, error, label, name, setValue, value }) => {
1985
- return /* @__PURE__ */ jsxs31(FieldGroup, { children: [
1986
- /* @__PURE__ */ jsxs31(FieldGroup.Row, { children: [
1987
- /* @__PURE__ */ jsx97(Label3, { children: label }),
1988
- /* @__PURE__ */ jsx97(FieldGroup.Description, { description })
1989
- ] }),
1990
- /* @__PURE__ */ jsx97(Input, { name, type: "text", value: value ?? "", onChange: (event) => setValue(event.target.value) }),
1991
- /* @__PURE__ */ jsx97(FieldGroup.Error, { error })
1992
- ] });
1993
- };
1994
-
1995
- // src/components/Form/StringField/StringFieldPassword.tsx
1996
- import { useState as useState3 } from "react";
1997
- import { EyeIcon, EyeOffIcon } from "lucide-react";
1998
- import { jsx as jsx98, jsxs as jsxs32 } from "react/jsx-runtime";
1999
- var StringFieldPassword = ({ description, error, label, name, setValue, value }) => {
2000
- const [show, setShow] = useState3(false);
2001
- return /* @__PURE__ */ jsxs32(FieldGroup, { children: [
2002
- /* @__PURE__ */ jsxs32(FieldGroup.Row, { children: [
2003
- /* @__PURE__ */ jsx98(Label3, { children: label }),
2004
- /* @__PURE__ */ jsx98(FieldGroup.Description, { description })
2005
- ] }),
2006
- /* @__PURE__ */ jsxs32(FieldGroup.Row, { children: [
2007
- /* @__PURE__ */ jsx98(
2008
- Input,
2009
- {
2010
- name,
2011
- type: show ? "text" : "password",
2012
- value: value ?? "",
2013
- onChange: (event) => setValue(event.target.value)
2014
- }
2015
- ),
2016
- /* @__PURE__ */ jsxs32(
2017
- "button",
2018
- {
2019
- className: "absolute right-0 flex h-full w-8 items-center justify-center text-muted-foreground",
2020
- type: "button",
2021
- onClick: () => setShow(!show),
2022
- children: [
2023
- /* @__PURE__ */ jsx98(EyeIcon, { className: cn("absolute transition-all", show ? "-rotate-90 scale-0" : "rotate-0 scale-100") }),
2024
- /* @__PURE__ */ jsx98(EyeOffIcon, { className: cn("absolute transition-all", !show ? "rotate-90 scale-0" : "rotate-0 scale-100") })
2025
- ]
2026
- }
2027
- )
2028
- ] }),
2029
- /* @__PURE__ */ jsx98(FieldGroup.Error, { error })
2030
- ] });
2031
- };
2032
-
2033
- // src/components/Form/BaseRadioField.tsx
2034
- import { cva as cva4 } from "class-variance-authority";
2035
- import { jsx as jsx99, jsxs as jsxs33 } from "react/jsx-runtime";
2036
- var baseRadioFieldVariants = cva4("flex", {
2037
- defaultVariants: {
2038
- orientation: "vertical"
2039
- },
2040
- variants: {
2041
- orientation: {
2042
- horizontal: "flex-col @3xl:flex-row @3xl:items-center @3xl:justify-between",
2043
- vertical: "flex-col"
2044
- }
2045
- }
2046
- });
2047
- var BaseRadioField = ({
2048
- description,
2049
- error,
2050
- label,
2051
- name,
2052
- options,
2053
- orientation = "vertical",
2054
- setValue,
2055
- value
2056
- }) => {
2057
- const optionsCount = Object.keys(options).length;
2058
- return /* @__PURE__ */ jsxs33(FieldGroup, { children: [
2059
- /* @__PURE__ */ jsxs33(FieldGroup.Row, { children: [
2060
- /* @__PURE__ */ jsx99(Label3, { children: label }),
2061
- /* @__PURE__ */ jsx99(FieldGroup.Description, { description })
2062
- ] }),
2063
- /* @__PURE__ */ jsx99(
2064
- RadioGroup4,
2065
- {
2066
- className: baseRadioFieldVariants({ orientation: optionsCount > 5 ? "vertical" : orientation }),
2067
- name,
2068
- value: value ?? "",
2069
- onValueChange: (value2) => setValue(value2),
2070
- children: Object.keys(options).map((option) => /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-2", children: [
2071
- /* @__PURE__ */ jsx99(RadioGroup4.Item, { id: `${name}-${option}`, value: option }),
2072
- /* @__PURE__ */ jsx99(Label3, { className: "font-normal", htmlFor: `${name}-${option}`, children: options[option] })
2073
- ] }, option))
2074
- }
2075
- ),
2076
- /* @__PURE__ */ jsx99(FieldGroup.Error, { error })
2077
- ] });
2078
- };
2079
-
2080
- // src/components/Form/StringField/StringFieldRadio.tsx
2081
- import { jsx as jsx100 } from "react/jsx-runtime";
2082
- var StringFieldRadio = (props) => {
2083
- return /* @__PURE__ */ jsx100(BaseRadioField, { ...props });
2084
- };
2085
-
2086
- // src/components/Select/Select.tsx
2087
- import * as SelectPrimitive8 from "@radix-ui/react-select";
2088
-
2089
- // src/components/Select/SelectContent.tsx
2090
- import React74 from "react";
2091
- import * as SelectPrimitive3 from "@radix-ui/react-select";
2092
-
2093
- // src/components/Select/SelectScrollDownButton.tsx
2094
- import React72 from "react";
2095
- import * as SelectPrimitive from "@radix-ui/react-select";
2096
- import { ChevronDownIcon as ChevronDownIcon3 } from "lucide-react";
2097
- import { jsx as jsx101 } from "react/jsx-runtime";
2098
- var SelectScrollDownButton = React72.forwardRef(function SelectScrollDownButton2({ className, ...props }, ref) {
2099
- return /* @__PURE__ */ jsx101(
2100
- SelectPrimitive.ScrollDownButton,
2101
- {
2102
- className: cn("flex cursor-default items-center justify-center py-1", className),
2103
- ref,
2104
- ...props,
2105
- children: /* @__PURE__ */ jsx101(ChevronDownIcon3, {})
2106
- }
2107
- );
2108
- });
2109
-
2110
- // src/components/Select/SelectScrollUpButton.tsx
2111
- import React73 from "react";
2112
- import * as SelectPrimitive2 from "@radix-ui/react-select";
2113
- import { ChevronUpIcon as ChevronUpIcon2 } from "lucide-react";
2114
- import { jsx as jsx102 } from "react/jsx-runtime";
2115
- var SelectScrollUpButton = React73.forwardRef(function SelectScrollUpButton2({ className, ...props }, ref) {
2116
- return /* @__PURE__ */ jsx102(
2117
- SelectPrimitive2.ScrollUpButton,
2118
- {
2119
- className: cn("flex cursor-default items-center justify-center py-1", className),
2120
- ref,
2121
- ...props,
2122
- children: /* @__PURE__ */ jsx102(ChevronUpIcon2, {})
2123
- }
2124
- );
2125
- });
2126
-
2127
- // src/components/Select/SelectContent.tsx
2128
- import { jsx as jsx103, jsxs as jsxs34 } from "react/jsx-runtime";
2129
- var SelectContent = React74.forwardRef(function SelectContent2({ children, className, position = "popper", ...props }, ref) {
2130
- return /* @__PURE__ */ jsx103(SelectPrimitive3.Portal, { children: /* @__PURE__ */ jsxs34(
2131
- SelectPrimitive3.Content,
2132
- {
2133
- className: cn(
2134
- "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",
2135
- position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
2136
- className
2137
- ),
2138
- position,
2139
- ref,
2140
- ...props,
2141
- children: [
2142
- /* @__PURE__ */ jsx103(SelectScrollUpButton, {}),
2143
- /* @__PURE__ */ jsx103(
2144
- SelectPrimitive3.Viewport,
2145
- {
2146
- className: cn(
2147
- "p-1",
2148
- position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
2149
- ),
2150
- children
2151
- }
2152
- ),
2153
- /* @__PURE__ */ jsx103(SelectScrollDownButton, {})
2154
- ]
2155
- }
2156
- ) });
2157
- });
2158
-
2159
- // src/components/Select/SelectItem.tsx
2160
- import React75 from "react";
2161
- import * as SelectPrimitive4 from "@radix-ui/react-select";
2162
- import { CheckIcon as CheckIcon4 } from "lucide-react";
2163
- import { jsx as jsx104, jsxs as jsxs35 } from "react/jsx-runtime";
2164
- var SelectItem = React75.forwardRef(function SelectItem2({ children, className, ...props }, ref) {
2165
- return /* @__PURE__ */ jsxs35(
2166
- SelectPrimitive4.Item,
2167
- {
2168
- className: cn(
2169
- "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
2170
- className
2171
- ),
2172
- ref,
2173
- ...props,
2174
- children: [
2175
- /* @__PURE__ */ jsx104("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx104(SelectPrimitive4.ItemIndicator, { children: /* @__PURE__ */ jsx104(CheckIcon4, { className: "h-4 w-4" }) }) }),
2176
- /* @__PURE__ */ jsx104(SelectPrimitive4.ItemText, { children })
2177
- ]
2178
- }
2179
- );
2180
- });
2181
-
2182
- // src/components/Select/SelectLabel.tsx
2183
- import React76 from "react";
2184
- import * as SelectPrimitive5 from "@radix-ui/react-select";
2185
- import { jsx as jsx105 } from "react/jsx-runtime";
2186
- var SelectLabel = React76.forwardRef(function SelectLabel2({ className, ...props }, ref) {
2187
- return /* @__PURE__ */ jsx105(SelectPrimitive5.Label, { className: cn("px-2 py-1.5 text-sm font-semibold", className), ref, ...props });
2188
- });
2189
-
2190
- // src/components/Select/SelectSeparator.tsx
2191
- import React77 from "react";
2192
- import * as SelectPrimitive6 from "@radix-ui/react-select";
2193
- import { jsx as jsx106 } from "react/jsx-runtime";
2194
- var SelectSeparator = React77.forwardRef(function SelectSeparator2({ className, ...props }, ref) {
2195
- return /* @__PURE__ */ jsx106(SelectPrimitive6.Separator, { className: cn("-mx-1 my-1 h-px bg-muted", className), ref, ...props });
2196
- });
2197
-
2198
- // src/components/Select/SelectTrigger.tsx
2199
- import React78 from "react";
2200
- import * as SelectPrimitive7 from "@radix-ui/react-select";
2201
- import { jsx as jsx107 } from "react/jsx-runtime";
2202
- var SelectTrigger = React78.forwardRef(function SelectTrigger2({ children, className, ...props }, ref) {
2203
- return /* @__PURE__ */ jsx107(SelectPrimitive7.Trigger, { asChild: true, className, ref, ...props, children: /* @__PURE__ */ jsx107(DropdownButton, { children }) });
2204
- });
2205
-
2206
- // src/components/Select/Select.tsx
2207
- var Select = Object.assign(SelectPrimitive8.Root, {
2208
- Content: SelectContent,
2209
- Group: SelectPrimitive8.Group,
2210
- Item: SelectItem,
2211
- Label: SelectLabel,
2212
- ScrollDownButton: SelectScrollDownButton,
2213
- ScrollUpButton: SelectScrollUpButton,
2214
- Separator: SelectSeparator,
2215
- Trigger: SelectTrigger,
2216
- Value: SelectPrimitive8.Value
2217
- });
2218
-
2219
- // src/components/Form/StringField/StringFieldSelect.tsx
2220
- import { jsx as jsx108, jsxs as jsxs36 } from "react/jsx-runtime";
2221
- var StringFieldSelect = ({
2222
- description,
2223
- error,
2224
- label,
2225
- name,
2226
- options,
2227
- setValue,
2228
- value
2229
- }) => {
2230
- return /* @__PURE__ */ jsxs36(FieldGroup, { children: [
2231
- /* @__PURE__ */ jsxs36(FieldGroup.Row, { children: [
2232
- /* @__PURE__ */ jsx108(Label3, { children: label }),
2233
- /* @__PURE__ */ jsx108(FieldGroup.Description, { description })
2234
- ] }),
2235
- /* @__PURE__ */ jsxs36(Select, { name, value: value ?? "", onValueChange: (value2) => setValue(value2), children: [
2236
- /* @__PURE__ */ jsx108(Select.Trigger, { "data-cy": `${name}-select-trigger`, "data-testid": `${name}-select-trigger`, children: /* @__PURE__ */ jsx108(Select.Value, {}) }),
2237
- /* @__PURE__ */ jsx108(Select.Content, { "data-cy": `${name}-select-content`, "data-testid": `${name}-select-content`, children: Object.keys(options).map((option) => /* @__PURE__ */ jsx108(Select.Item, { value: option, children: options[option] }, option)) })
2238
- ] }),
2239
- /* @__PURE__ */ jsx108(FieldGroup.Error, { error })
2240
- ] });
2241
- };
2242
-
2243
- // src/components/TextArea/TextArea.tsx
2244
- import React79 from "react";
2245
- import { jsx as jsx109 } from "react/jsx-runtime";
2246
- var TextArea = React79.forwardRef(function TextArea2({ className, ...props }, ref) {
2247
- return /* @__PURE__ */ jsx109(
2248
- "textarea",
2249
- {
2250
- autoComplete: "off",
2251
- className: cn(
2252
- "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
2253
- className
2254
- ),
2255
- "data-testid": "text-area",
2256
- ref,
2257
- ...props
2258
- }
2259
- );
2260
- });
2261
-
2262
- // src/components/Form/StringField/StringFieldTextArea.tsx
2263
- import { jsx as jsx110, jsxs as jsxs37 } from "react/jsx-runtime";
2264
- var StringFieldTextArea = ({ description, error, label, name, setValue, value }) => {
2265
- return /* @__PURE__ */ jsxs37(FieldGroup, { children: [
2266
- /* @__PURE__ */ jsxs37(FieldGroup.Row, { children: [
2267
- /* @__PURE__ */ jsx110(Label3, { children: label }),
2268
- /* @__PURE__ */ jsx110(FieldGroup.Description, { description })
2269
- ] }),
2270
- /* @__PURE__ */ jsx110(TextArea, { name, rows: 5, value: value ?? "", onChange: (event) => setValue(event.target.value) }),
2271
- /* @__PURE__ */ jsx110(FieldGroup.Error, { error })
2272
- ] });
2273
- };
2274
-
2275
- // src/components/Form/StringField/StringField.tsx
2276
- import { jsx as jsx111 } from "react/jsx-runtime";
2277
- var StringField = (props) => {
2278
- return match5(props).with({ variant: "textarea" }, (props2) => /* @__PURE__ */ jsx111(StringFieldTextArea, { ...props2 })).with({ variant: "password" }, (props2) => /* @__PURE__ */ jsx111(StringFieldPassword, { ...props2 })).with({ variant: "input" }, (props2) => /* @__PURE__ */ jsx111(StringFieldInput, { ...props2 })).with({ variant: "select" }, (props2) => /* @__PURE__ */ jsx111(StringFieldSelect, { ...props2 })).with({ variant: "radio" }, (props2) => /* @__PURE__ */ jsx111(StringFieldRadio, { ...props2 })).exhaustive();
2279
- };
2280
-
2281
- // src/components/Form/ScalarField.tsx
2282
- import { jsx as jsx112 } from "react/jsx-runtime";
2283
- var ScalarField = ({ field, ...props }) => {
2284
- switch (field.kind) {
2285
- case "string":
2286
- return /* @__PURE__ */ jsx112(StringField, { ...field, ...props });
2287
- case "number":
2288
- return /* @__PURE__ */ jsx112(NumberField, { ...field, ...props });
2289
- case "date":
2290
- return /* @__PURE__ */ jsx112(DateField, { ...field, ...props });
2291
- case "boolean":
2292
- return /* @__PURE__ */ jsx112(BooleanField, { ...field, ...props });
2293
- case "set":
2294
- return /* @__PURE__ */ jsx112(SetField, { ...field, ...props });
2295
- default:
2296
- throw new Error(`Unexpected value for kind: ${Reflect.get(field, "kind")}`);
2297
- }
2298
- };
2299
-
2300
- // src/components/Form/RecordArrayField.tsx
2301
- import { jsx as jsx113, jsxs as jsxs38 } from "react/jsx-runtime";
2302
- var RecordArrayField = memo(function RecordArrayField2({
2303
- error: arrayError,
2304
- fieldset,
2305
- label,
2306
- setError: setArrayError,
2307
- setValue: setArrayValue,
2308
- value: arrayValue
2309
- }) {
2310
- const { t } = useTranslation4("libui");
2311
- const createNewRecord = () => Object.fromEntries(Object.keys(fieldset).map((fieldName) => [fieldName, void 0]));
2312
- useEffect6(() => {
2313
- setArrayValue([createNewRecord()]);
2314
- }, [fieldset]);
2315
- if (!arrayValue) {
2316
- return null;
2317
- }
2318
- const appendField = () => {
2319
- setArrayValue([...arrayValue, createNewRecord()]);
2320
- };
2321
- const removeField = () => {
2322
- if (arrayValue.length > 1) {
2323
- setArrayValue(arrayValue.slice(0, arrayValue.length - 1));
2324
- }
2325
- };
2326
- return /* @__PURE__ */ jsxs38("div", { className: "space-y-4", children: [
2327
- /* @__PURE__ */ jsx113(Heading, { variant: "h5", children: label }),
2328
- /* @__PURE__ */ jsx113("div", { className: "space-y-6", children: arrayValue.map((fields, i) => /* @__PURE__ */ jsxs38("div", { className: "space-y-4", children: [
2329
- /* @__PURE__ */ jsx113(Label3, { className: "font-semibold italic", children: label + " " + (i + 1) }),
2330
- Object.keys(fields).map((name) => {
2331
- const field = fieldset[name];
2332
- const fieldProps = field?.kind === "dynamic" ? field.render(fields) : field;
2333
- if (!fieldProps) {
2334
- return null;
2335
- }
2336
- return /* @__PURE__ */ jsx113(
2337
- ScalarField,
2338
- {
2339
- error: arrayError?.[i]?.[name],
2340
- field: fieldProps,
2341
- name,
2342
- setError: (error) => {
2343
- const newArrayError = arrayError ? [...arrayError] : [];
2344
- if (!newArrayError[i]) {
2345
- newArrayError[i] = {};
2346
- }
2347
- newArrayError[i][name] = error;
2348
- setArrayError(newArrayError);
2349
- },
2350
- setValue: (value) => {
2351
- const newArrayValue = [...arrayValue];
2352
- newArrayValue[i][name] = value;
2353
- setArrayValue(newArrayValue);
2354
- },
2355
- value: arrayValue?.[i]?.[name]
2356
- },
2357
- name
2358
- );
2359
- })
2360
- ] }, i)) }),
2361
- /* @__PURE__ */ jsxs38("div", { className: "flex gap-3", children: [
2362
- /* @__PURE__ */ jsxs38(Button, { type: "button", variant: "outline", onClick: appendField, children: [
2363
- t("form.append"),
2364
- /* @__PURE__ */ jsx113(PlusCircleIcon, { className: "ml-2" })
2365
- ] }),
2366
- /* @__PURE__ */ jsxs38(Button, { type: "button", variant: "outline", onClick: removeField, children: [
2367
- t("form.remove"),
2368
- /* @__PURE__ */ jsx113(MinusCircleIcon, { className: "ml-2" })
2369
- ] })
2370
- ] })
2371
- ] });
2372
- });
2373
-
2374
- // src/components/Form/StaticField.tsx
2375
- import { jsx as jsx114 } from "react/jsx-runtime";
2376
- var StaticField = ({
2377
- errors,
2378
- field,
2379
- name,
2380
- setErrors,
2381
- setValues,
2382
- values
2383
- }) => {
2384
- const setError = useCallback2(
2385
- (error) => {
2386
- return setErrors((prevErrors) => ({ ...prevErrors, [name]: error }));
2387
- },
2388
- [setErrors]
2389
- );
2390
- const setValue = useCallback2(
2391
- (value) => {
2392
- return setValues((prevValues) => ({ ...prevValues, [name]: value }));
2393
- },
2394
- [setValues]
2395
- );
2396
- return match6(field).with({ kind: "record-array" }, (field2) => /* @__PURE__ */ jsx114(
2397
- RecordArrayField,
2398
- {
2399
- ...field2,
2400
- error: errors[name],
2401
- name,
2402
- setError,
2403
- setValue,
2404
- value: values[name]
2405
- }
2406
- )).with({ kind: "number-record" }, (field2) => /* @__PURE__ */ jsx114(
2407
- NumberRecordField,
2408
- {
2409
- ...field2,
2410
- error: errors[name],
2411
- name,
2412
- setError,
2413
- setValue,
2414
- value: values[name]
2415
- }
2416
- )).otherwise((field2) => /* @__PURE__ */ jsx114(
2417
- ScalarField,
2418
- {
2419
- error: errors[name],
2420
- field: field2,
2421
- name,
2422
- setError,
2423
- setValue,
2424
- value: values[name]
2425
- }
2426
- ));
2427
- };
2428
-
2429
- // src/components/Form/DynamicField.tsx
2430
- import { jsx as jsx115 } from "react/jsx-runtime";
2431
- var DynamicField = ({
2432
- field,
2433
- name,
2434
- values,
2435
- ...props
2436
- }) => {
2437
- const [dependentValues, setDependentValues] = useState4(pick(values, field.deps));
2438
- const staticField = useMemo2(() => {
2439
- return field.render(values);
2440
- }, [dependentValues, field.render]);
2441
- useEffect7(() => {
2442
- for (const key of field.deps) {
2443
- if (dependentValues[key] !== values[key]) {
2444
- setDependentValues(pick(values, field.deps));
2445
- break;
2446
- }
2447
- }
2448
- }, [field.deps, values]);
2449
- if (!staticField) {
2450
- return null;
2451
- }
2452
- return /* @__PURE__ */ jsx115(StaticField, { ...props, field: staticField, name, values });
2453
- };
2454
-
2455
- // src/components/Form/FieldsComponent.tsx
2456
- import { createElement } from "react";
2457
- var FieldsComponent = ({ fields, ...props }) => {
2458
- return Object.keys(fields).map((name) => {
2459
- const field = fields[name];
2460
- if (field.kind === "dynamic") {
2461
- return /* @__PURE__ */ createElement(DynamicField, { ...props, field, key: name, name });
2462
- }
2463
- return /* @__PURE__ */ createElement(StaticField, { ...props, field, key: name, name });
2464
- });
2465
- };
2466
-
2467
- // src/components/Form/utils.ts
2468
- function getInitialValues(values) {
2469
- const initialValues = {};
2470
- for (const key in values) {
2471
- const value = values[key];
2472
- if (value === null || value === void 0) {
2473
- continue;
2474
- } else if (Array.isArray(value)) {
2475
- initialValues[key] = value.map(getInitialValues);
2476
- } else {
2477
- initialValues[key] = value;
2478
- }
2479
- }
2480
- return initialValues;
2481
- }
2482
-
2483
- // src/components/Form/Form.tsx
2484
- import { jsx as jsx116, jsxs as jsxs39 } from "react/jsx-runtime";
2485
- var Form = ({
2486
- className,
2487
- content,
2488
- id,
2489
- initialValues,
2490
- onError,
2491
- onSubmit,
2492
- resetBtn,
2493
- submitBtnLabel,
2494
- validationSchema,
2495
- ...props
2496
- }) => {
2497
- const { t } = useTranslation5("libui");
2498
- const [rootError, setRootError] = useState5(null);
2499
- const [errors, setErrors] = useState5({});
2500
- const [values, setValues] = useState5(
2501
- initialValues ? getInitialValues(initialValues) : {}
2502
- );
2503
- const handleError = (error) => {
2504
- const fieldErrors = {};
2505
- const rootErrors = [];
2506
- for (const issue of error.issues) {
2507
- if (issue.path.length > 0) {
2508
- set(fieldErrors, issue.path, issue.message);
2509
- } else {
2510
- rootErrors.push(issue.message);
2511
- }
2512
- }
2513
- setRootError(rootErrors.join("\n"));
2514
- setErrors(fieldErrors);
2515
- if (onError) {
2516
- onError(error);
2517
- }
2518
- };
2519
- const reset = () => {
2520
- setRootError(null);
2521
- setErrors({});
2522
- setValues({});
2523
- };
2524
- const handleSubmit = (event) => {
2525
- event.preventDefault();
2526
- const result = validationSchema.safeParse(values);
2527
- if (result.success) {
2528
- reset();
2529
- onSubmit(result.data);
2530
- } else {
2531
- console.error(result.error.issues);
2532
- handleError(result.error);
2533
- }
2534
- };
2535
- const isGrouped = Array.isArray(content);
2536
- return /* @__PURE__ */ jsxs39(
2537
- "form",
2538
- {
2539
- autoComplete: "off",
2540
- className: twMerge("w-full", isGrouped ? "space-y-8 divide-y" : "space-y-6", className),
2541
- id,
2542
- onSubmit: handleSubmit,
2543
- ...props,
2544
- children: [
2545
- isGrouped ? content.map((fieldGroup, i) => {
2546
- return /* @__PURE__ */ jsxs39("div", { className: "space-y-6 [&:not(:first-child)]:pt-8", children: [
2547
- /* @__PURE__ */ jsxs39("div", { className: "space-y-1", children: [
2548
- /* @__PURE__ */ jsx116(Heading, { variant: "h4", children: fieldGroup.title }),
2549
- fieldGroup.description && /* @__PURE__ */ jsx116("p", { className: "text-sm italic leading-tight text-muted-foreground", children: fieldGroup.description })
2550
- ] }),
2551
- /* @__PURE__ */ jsx116(
2552
- FieldsComponent,
2553
- {
2554
- errors,
2555
- fields: fieldGroup.fields,
2556
- setErrors,
2557
- setValues,
2558
- values
2559
- }
2560
- )
2561
- ] }, i);
2562
- }) : /* @__PURE__ */ jsx116(FieldsComponent, { errors, fields: content, setErrors, setValues, values }),
2563
- /* @__PURE__ */ jsxs39("div", { className: "flex w-full gap-3", children: [
2564
- /* @__PURE__ */ jsx116(
2565
- Button,
2566
- {
2567
- "aria-label": "Submit Button",
2568
- className: "block w-full",
2569
- "data-cy": "submit-form",
2570
- type: "submit",
2571
- variant: "primary",
2572
- children: submitBtnLabel ?? t("form.submit")
2573
- }
2574
- ),
2575
- resetBtn && /* @__PURE__ */ jsx116(Button, { "aria-label": "Reset Button", className: "block w-full", type: "button", variant: "secondary", onClick: reset, children: t("form.reset") })
2576
- ] }),
2577
- rootError && /* @__PURE__ */ jsx116(ErrorMessage, { error: rootError })
2578
- ]
2579
- }
2580
- );
2581
- };
2582
-
2583
- // src/components/HoverCard/HoverCard.tsx
2584
- import { Root as Root14, Trigger as Trigger8 } from "@radix-ui/react-hover-card";
2585
-
2586
- // src/components/HoverCard/HoverCardContent.tsx
2587
- import React81 from "react";
2588
- import { Content as Content9 } from "@radix-ui/react-hover-card";
2589
- import { jsx as jsx117 } from "react/jsx-runtime";
2590
- var HoverCardContent = React81.forwardRef(function HoverCardContent2({ align = "center", className, sideOffset = 4, ...props }, ref) {
2591
- return /* @__PURE__ */ jsx117(
2592
- Content9,
2593
- {
2594
- align,
2595
- className: cn(
2596
- "z-50 w-64 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",
2597
- className
2598
- ),
2599
- ref,
2600
- sideOffset,
2601
- ...props
2602
- }
2603
- );
2604
- });
2605
-
2606
- // src/components/HoverCard/HoverCard.tsx
2607
- var HoverCard = Object.assign(Root14, {
2608
- Content: HoverCardContent,
2609
- Trigger: Trigger8
2610
- });
2611
-
2612
- // src/components/LanguageToggle/LanguageToggle.tsx
2613
- import { LanguagesIcon } from "lucide-react";
2614
- import { useTranslation as useTranslation6 } from "react-i18next";
2615
- import { jsx as jsx118, jsxs as jsxs40 } from "react/jsx-runtime";
2616
- var LanguageToggle = ({
2617
- align = "start",
2618
- options = {},
2619
- triggerClassName,
2620
- variant = "outline"
2621
- }) => {
2622
- const { i18n } = useTranslation6("libui");
2623
- return /* @__PURE__ */ jsxs40(DropdownMenu, { children: [
2624
- /* @__PURE__ */ jsx118(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsx118(Button, { className: triggerClassName, size: "icon", variant, children: /* @__PURE__ */ jsx118(LanguagesIcon, {}) }) }),
2625
- /* @__PURE__ */ jsx118(DropdownMenu.Content, { align, children: Object.keys(options).map((option) => /* @__PURE__ */ jsx118(DropdownMenu.Item, { onClick: () => void i18n.changeLanguage(option), children: options[option] }, option)) })
2626
- ] });
2627
- };
2628
-
2629
- // src/components/LegacyDropdown/LegacyDropdown.tsx
2630
- import { Menu, Transition } from "@headlessui/react";
2631
- import { twMerge as twMerge2 } from "tailwind-merge";
2632
- import { jsx as jsx119, jsxs as jsxs41 } from "react/jsx-runtime";
2633
- function LegacyDropdown({
2634
- className,
2635
- onSelection,
2636
- options,
2637
- title
2638
- }) {
2639
- const optionKeys = options instanceof Array ? options : Object.keys(options);
2640
- return /* @__PURE__ */ jsxs41(Menu, { as: "div", className: twMerge2("relative w-full whitespace-nowrap", className), children: [
2641
- /* @__PURE__ */ jsx119(
2642
- Menu.Button,
2643
- {
2644
- as: DropdownButton,
2645
- className: "h-full w-full",
2646
- disabled: options.length === 0,
2647
- style: { width: "100%" },
2648
- children: title
2649
- }
2650
- ),
2651
- /* @__PURE__ */ jsx119(
2652
- Transition,
2653
- {
2654
- as: "div",
2655
- className: "absolute bottom-0 z-10 w-full",
2656
- enter: "transition ease-out duration-100",
2657
- enterFrom: "transform opacity-0 scale-95",
2658
- enterTo: "transform opacity-100 scale-100",
2659
- leave: "transition ease-in duration-75",
2660
- leaveFrom: "transform opacity-100 scale-100",
2661
- leaveTo: "transform opacity-0 scale-95",
2662
- children: /* @__PURE__ */ jsx119(Menu.Items, { as: Card, className: "absolute z-10 mt-2 flex w-fit min-w-full flex-col overflow-hidden rounded-md", children: optionKeys.map((option) => /* @__PURE__ */ jsx119(Menu.Item, { children: /* @__PURE__ */ jsx119(
2663
- "button",
2664
- {
2665
- className: "p-2 text-left text-sm hover:bg-slate-200 dark:hover:bg-slate-700",
2666
- "data-cy": "dropdown-menu-option",
2667
- style: { minWidth: 100 },
2668
- onClick: () => {
2669
- onSelection(option);
2670
- },
2671
- children: Array.isArray(options) ? option : options[option]
2672
- }
2673
- ) }, option)) })
2674
- }
2675
- )
2676
- ] });
2677
- }
2678
-
2679
- // src/components/LegacyModal/LegacyModal.tsx
2680
- import React82 from "react";
2681
- import { Dialog as Dialog2, Transition as Transition2 } from "@headlessui/react";
2682
- import { XMarkIcon } from "@heroicons/react/24/solid";
2683
- import { clsx } from "clsx";
2684
- import { jsx as jsx120, jsxs as jsxs42 } from "react/jsx-runtime";
2685
- var LegacyModal = ({ children, onClose, open, showCloseButton, title, width = "md" }) => {
2686
- return /* @__PURE__ */ jsx120(Transition2, { appear: true, as: React82.Fragment, show: open, children: /* @__PURE__ */ jsxs42(Dialog2, { as: "div", className: "relative z-10", onClose, children: [
2687
- /* @__PURE__ */ jsx120(
2688
- Transition2.Child,
2689
- {
2690
- as: React82.Fragment,
2691
- enter: "ease-out duration-300",
2692
- enterFrom: "opacity-0",
2693
- enterTo: "opacity-100",
2694
- leave: "ease-in duration-200",
2695
- leaveFrom: "opacity-100",
2696
- leaveTo: "opacity-0",
2697
- children: /* @__PURE__ */ jsx120("div", { className: "fixed inset-0 bg-black bg-opacity-50" })
2698
- }
2699
- ),
2700
- /* @__PURE__ */ jsx120("div", { className: "fixed inset-0 overflow-y-auto", children: /* @__PURE__ */ jsx120("div", { className: "flex min-h-full items-center justify-center p-4 text-center", children: /* @__PURE__ */ jsx120(
2701
- Transition2.Child,
2702
- {
2703
- as: React82.Fragment,
2704
- enter: "ease-out duration-300",
2705
- enterFrom: "opacity-0 scale-95",
2706
- enterTo: "opacity-100 scale-100",
2707
- leave: "ease-in duration-200",
2708
- leaveFrom: "opacity-100 scale-100",
2709
- leaveTo: "opacity-0 scale-95",
2710
- children: /* @__PURE__ */ jsxs42(
2711
- Dialog2.Panel,
2712
- {
2713
- className: clsx(
2714
- "relative w-full transform overflow-visible rounded-2xl bg-slate-100 p-6 text-left align-middle text-slate-900 shadow-xl transition-all dark:bg-slate-800 dark:text-slate-100",
2715
- {
2716
- "max-w-lg": width === "lg",
2717
- "max-w-md": width === "md",
2718
- "max-w-sm": width === "sm",
2719
- "max-w-xl": width === "xl"
2720
- }
2721
- ),
2722
- children: [
2723
- /* @__PURE__ */ jsxs42("div", { className: "flex items-center justify-between", children: [
2724
- /* @__PURE__ */ jsx120(Dialog2.Title, { as: "h3", className: "p-0.5 text-xl font-bold leading-6", children: title }),
2725
- showCloseButton && /* @__PURE__ */ jsx120(
2726
- "button",
2727
- {
2728
- className: "flex items-center justify-center rounded-md p-0.5 hover:bg-slate-200 dark:hover:bg-slate-700",
2729
- type: "button",
2730
- onClick: onClose,
2731
- children: /* @__PURE__ */ jsx120(XMarkIcon, { height: 24, width: 24 })
2732
- }
2733
- )
2734
- ] }),
2735
- /* @__PURE__ */ jsx120("div", { className: "my-2 p-0.5", children })
2736
- ]
2737
- }
2738
- )
2739
- }
2740
- ) }) })
2741
- ] }) });
2742
- };
2743
-
2744
- // src/components/LegacySelectDropdown/LegacySelectDropdown.tsx
2745
- import { Listbox, Transition as Transition3 } from "@headlessui/react";
2746
- import { CheckIcon as CheckIcon5 } from "@heroicons/react/24/solid";
2747
- import { clsx as clsx2 } from "clsx";
2748
- import { jsx as jsx121, jsxs as jsxs43 } from "react/jsx-runtime";
2749
- var LegacySelectDropdown = ({
2750
- checkPosition = "right",
2751
- className,
2752
- options,
2753
- selected,
2754
- setSelected,
2755
- title
2756
- }) => {
2757
- return /* @__PURE__ */ jsxs43(
2758
- Listbox,
2759
- {
2760
- multiple: true,
2761
- as: "div",
2762
- by: "key",
2763
- className: clsx2("relative flex w-full", className),
2764
- value: selected,
2765
- onChange: setSelected,
2766
- children: [
2767
- /* @__PURE__ */ jsx121(Listbox.Button, { as: DropdownButton, className: "h-full w-full", children: title }),
2768
- /* @__PURE__ */ jsx121(
2769
- Transition3,
2770
- {
2771
- as: "div",
2772
- className: "absolute bottom-0 z-10 w-full",
2773
- enter: "transition ease-out duration-100",
2774
- enterFrom: "transform opacity-0 scale-95",
2775
- enterTo: "transform opacity-100 scale-100",
2776
- leave: "transition ease-in duration-75",
2777
- leaveFrom: "transform opacity-100 scale-100",
2778
- leaveTo: "transform opacity-0 scale-95",
2779
- children: /* @__PURE__ */ jsx121(
2780
- Listbox.Options,
2781
- {
2782
- as: Card,
2783
- className: "absolute z-10 mt-2 flex max-h-80 min-w-full flex-col overflow-scroll rounded-md scrollbar-none",
2784
- children: options.map((option) => /* @__PURE__ */ jsxs43(
2785
- Listbox.Option,
2786
- {
2787
- className: "flex w-full items-center whitespace-nowrap bg-slate-50 p-2 text-sm hover:bg-slate-200 dark:bg-slate-800 dark:hover:bg-slate-700 ",
2788
- "data-cy": "select-dropdown-option",
2789
- value: option,
2790
- children: [
2791
- checkPosition === "left" && /* @__PURE__ */ jsx121(CheckIcon5, { className: "invisible mr-2 h-6 ui-selected:visible", height: 16, width: 16 }),
2792
- /* @__PURE__ */ jsx121("span", { className: "ui-selected:font-medium", "data-cy": "select-dropdown-option-label", children: option.label }),
2793
- checkPosition === "right" && /* @__PURE__ */ jsx121(CheckIcon5, { className: "invisible ml-2 ui-selected:visible", height: 16, width: 16 })
2794
- ]
2795
- },
2796
- option.key
2797
- ))
2798
- }
2799
- )
2800
- }
2801
- )
2802
- ]
2803
- }
2804
- );
2805
- };
2806
-
2807
- // src/components/LegacySlider/LegacySlider.tsx
2808
- import React83 from "react";
2809
- import { Dialog as Dialog3, Transition as Transition4 } from "@headlessui/react";
2810
- import { XMarkIcon as XMarkIcon2 } from "@heroicons/react/24/outline";
2811
- import { jsx as jsx122, jsxs as jsxs44 } from "react/jsx-runtime";
2812
- var LegacySlider = ({ children, isOpen, setIsOpen, title }) => {
2813
- return /* @__PURE__ */ jsx122(Transition4, { as: React83.Fragment, show: isOpen, children: /* @__PURE__ */ jsx122(Dialog3, { as: "div", className: "fixed inset-0 z-10 overflow-hidden", onClose: setIsOpen, children: /* @__PURE__ */ jsxs44("div", { className: "absolute inset-0 overflow-hidden", children: [
2814
- /* @__PURE__ */ jsx122(
2815
- Transition4.Child,
2816
- {
2817
- as: React83.Fragment,
2818
- enter: "transition-opacity ease-linear duration-500",
2819
- enterFrom: "opacity-0",
2820
- enterTo: "opacity-100",
2821
- leave: "transition-opacity ease-linear duration-500",
2822
- leaveFrom: "opacity-100",
2823
- leaveTo: "opacity-0",
2824
- children: /* @__PURE__ */ jsx122("div", { className: "fixed inset-0 bg-black/30" })
2825
- }
2826
- ),
2827
- /* @__PURE__ */ jsx122("div", { className: "pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10", children: /* @__PURE__ */ jsx122(
2828
- Transition4.Child,
2829
- {
2830
- as: React83.Fragment,
2831
- enter: "transform transition ease-in-out duration-500",
2832
- enterFrom: "translate-x-full",
2833
- enterTo: "translate-x-0",
2834
- leave: "transform transition ease-in-out duration-500",
2835
- leaveFrom: "translate-x-0",
2836
- leaveTo: "translate-x-full",
2837
- children: /* @__PURE__ */ jsx122("div", { className: "pointer-events-auto w-screen max-w-md", children: /* @__PURE__ */ jsxs44("div", { className: "flex h-full flex-col overflow-y-scroll bg-slate-50 py-6 shadow-xl dark:bg-slate-800", children: [
2838
- /* @__PURE__ */ jsx122("div", { className: "px-4 sm:px-6", children: /* @__PURE__ */ jsxs44("div", { className: "flex items-center justify-between", children: [
2839
- /* @__PURE__ */ jsx122(Dialog3.Title, { className: "font-semibold text-slate-900 dark:text-slate-100", children: title }),
2840
- /* @__PURE__ */ jsx122(
2841
- "button",
2842
- {
2843
- className: "text-muted-foreground hover:text-slate-500",
2844
- type: "button",
2845
- onClick: () => {
2846
- setIsOpen(false);
2847
- },
2848
- children: /* @__PURE__ */ jsx122(XMarkIcon2, { "aria-hidden": "true", className: "h-6 w-6" })
2849
- }
2850
- )
2851
- ] }) }),
2852
- /* @__PURE__ */ jsx122("hr", { className: "mx-4 my-4 border-slate-300" }),
2853
- /* @__PURE__ */ jsx122("div", { className: "relative flex-1 px-4 sm:px-6", children })
2854
- ] }) })
2855
- }
2856
- ) })
2857
- ] }) }) });
2858
- };
2859
-
2860
- // src/components/LegacyStepper/LegacyStepper.tsx
2861
- import React84, { useEffect as useEffect8, useReducer as useReducer2, useRef as useRef2, useState as useState6 } from "react";
2862
- import clsx3 from "clsx";
2863
- import { jsx as jsx123, jsxs as jsxs45 } from "react/jsx-runtime";
2864
- var LegacyStepper = ({ className, steps }) => {
2865
- const icons = useRef2([]);
2866
- const [divideStyles, setDivideStyles] = useState6([]);
2867
- const { height, width } = useWindowSize();
2868
- useEffect8(() => {
2869
- const styles = [];
2870
- for (let i = 0; i < steps.length - 1; i++) {
2871
- const current = icons.current[i];
2872
- const next = icons.current[i + 1];
2873
- const left = current.offsetLeft + current.offsetWidth;
2874
- styles.push({
2875
- left,
2876
- width: next.offsetLeft - left
2877
- });
2878
- }
2879
- setDivideStyles(styles);
2880
- }, [height, width]);
2881
- const [index, updateIndex] = useReducer2((prevIndex, action) => {
2882
- if (action === "decrement" && prevIndex > 0) {
2883
- return prevIndex - 1;
2884
- } else if (action === "increment" && prevIndex < steps.length - 1) {
2885
- return prevIndex + 1;
2886
- }
2887
- return prevIndex;
2888
- }, 0);
2889
- return /* @__PURE__ */ jsx123(LegacyStepperContext.Provider, { value: { index, updateIndex }, children: /* @__PURE__ */ jsxs45("div", { className: cn("flex flex-col", className), children: [
2890
- /* @__PURE__ */ jsx123("div", { className: "relative mb-12 flex items-center justify-between print:hidden", children: steps.map((step, i) => {
2891
- return /* @__PURE__ */ jsxs45(React84.Fragment, { children: [
2892
- /* @__PURE__ */ jsx123("div", { className: "flex items-center", children: /* @__PURE__ */ jsxs45("div", { className: "flex flex-col items-center justify-center", children: [
2893
- /* @__PURE__ */ jsx123(
2894
- "div",
2895
- {
2896
- className: clsx3(
2897
- "h-12 w-12 rounded-full bg-sky-700 py-3 text-white transition duration-500 ease-in-out [&>*]:h-full [&>*]:w-full",
2898
- i > index && "bg-slate-200 dark:bg-slate-700"
2899
- ),
2900
- ref: (e) => {
2901
- icons.current[i] = e;
2902
- },
2903
- children: step.icon
2904
- }
2905
- ),
2906
- /* @__PURE__ */ jsx123("span", { className: "mt-2 text-xs font-medium uppercase text-muted-foreground", children: step.label })
2907
- ] }) }),
2908
- i !== steps.length - 1 && /* @__PURE__ */ jsx123(
2909
- "div",
2910
- {
2911
- className: clsx3(
2912
- "absolute top-6 flex-auto border-t-2 transition duration-500 ease-in-out",
2913
- i >= index ? "border-slate-200 dark:border-slate-700" : "border-sky-700"
2914
- ),
2915
- style: divideStyles[i]
2916
- }
2917
- )
2918
- ] }, i);
2919
- }) }),
2920
- /* @__PURE__ */ jsx123("div", { className: "flex-grow", children: steps[index]?.element })
2921
- ] }) });
2922
- };
2923
-
2924
- // src/components/LegacyTable/LegacyClientTable.tsx
2925
- import { useState as useState7 } from "react";
2926
- import { useTranslation as useTranslation7 } from "react-i18next";
2927
-
2928
- // src/components/LegacyTable/LegacyTable.tsx
2929
- import { range as range3, toBasicISOString as toBasicISOString2 } from "@douglasneuroinformatics/libjs";
2930
- import { clsx as clsx5 } from "clsx";
2931
- import { twMerge as twMerge3 } from "tailwind-merge";
2932
-
2933
- // src/components/LegacyTable/LegacyTableColumnHeader.tsx
2934
- import React85 from "react";
2935
- import { Menu as Menu2, Transition as Transition5 } from "@headlessui/react";
2936
- import { ChevronDownIcon as ChevronDownIcon4 } from "@heroicons/react/24/solid";
2937
- import { clsx as clsx4 } from "clsx";
2938
- import { jsx as jsx124, jsxs as jsxs46 } from "react/jsx-runtime";
2939
- var LegacyTableColumnHeader = ({
2940
- column,
2941
- dropdownOptions
2942
- }) => {
2943
- return /* @__PURE__ */ jsxs46(Menu2, { as: "div", className: "relative", children: [
2944
- /* @__PURE__ */ jsxs46(
2945
- Menu2.Button,
2946
- {
2947
- className: clsx4(
2948
- "flex min-w-[10rem] flex-shrink-0 items-center justify-between px-6 py-3 text-sm font-semibold text-slate-800 dark:text-slate-200",
2949
- { "cursor-default": !dropdownOptions }
2950
- ),
2951
- children: [
2952
- column.label,
2953
- dropdownOptions && /* @__PURE__ */ jsx124(ChevronDownIcon4, { className: "ml-3", height: 16, width: 16 })
2954
- ]
2955
- }
2956
- ),
2957
- dropdownOptions && /* @__PURE__ */ jsx124(
2958
- Transition5,
2959
- {
2960
- as: React85.Fragment,
2961
- enter: "transition ease-out duration-100",
2962
- enterFrom: "transform opacity-0 scale-95",
2963
- enterTo: "transform opacity-100 scale-100",
2964
- leave: "transition ease-in duration-75",
2965
- leaveFrom: "transform opacity-100 scale-100",
2966
- leaveTo: "transform opacity-0 scale-95",
2967
- children: /* @__PURE__ */ jsx124(Menu2.Items, { className: "absolute right-4 z-50 mt-2 w-32 origin-top-right overflow-hidden rounded-md bg-slate-50 shadow-sm ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-slate-700", children: dropdownOptions.map((option) => {
2968
- const Icon = option.icon;
2969
- return /* @__PURE__ */ jsxs46(
2970
- Menu2.Item,
2971
- {
2972
- as: "button",
2973
- className: "flex w-full items-center text-ellipsis whitespace-nowrap px-3 py-2 hover:backdrop-brightness-95 dark:hover:backdrop-brightness-150",
2974
- type: "button",
2975
- onClick: () => {
2976
- option.onSelection(column);
2977
- },
2978
- children: [
2979
- Icon && /* @__PURE__ */ jsx124(Icon, { className: "mr-2", height: 16, width: 16 }),
2980
- option.label
2981
- ]
2982
- },
2983
- option.label
2984
- );
2985
- }) })
2986
- }
2987
- )
2988
- ] });
2989
- };
2990
-
2991
- // src/components/LegacyTable/LegacyTable.tsx
2992
- import { jsx as jsx125, jsxs as jsxs47 } from "react/jsx-runtime";
2993
- function defaultFormatter(value) {
2994
- if (typeof value === "string") {
2995
- return value;
2996
- } else if (typeof value === "number") {
2997
- return value.toFixed(2).toString();
2998
- } else if (typeof value === "undefined") {
2999
- return "NA";
3000
- }
3001
- if (value instanceof Date) {
3002
- return toBasicISOString2(value);
3003
- }
3004
- return JSON.stringify(value);
3005
- }
3006
- var LegacyTable = ({
3007
- className,
3008
- columnDropdownOptions,
3009
- columns,
3010
- data,
3011
- minRows,
3012
- onEntryClick
3013
- }) => {
3014
- const nRows = Math.max(data.length, minRows ?? -1);
3015
- return /* @__PURE__ */ jsx125("div", { className: twMerge3("min-w-full overflow-hidden rounded-md bg-slate-50 shadow dark:bg-slate-800", className), children: /* @__PURE__ */ jsx125("div", { className: "w-full overflow-x-scroll", children: /* @__PURE__ */ jsxs47("table", { className: "w-full table-auto", children: [
3016
- /* @__PURE__ */ jsx125("thead", { className: "border-b border-slate-300 bg-slate-50 dark:border-0 dark:bg-slate-700", children: /* @__PURE__ */ jsx125("tr", { children: columns.map((column, i) => /* @__PURE__ */ jsx125(
3017
- "th",
3018
- {
3019
- className: "whitespace-nowrap text-left text-sm font-semibold text-slate-800 dark:text-slate-200",
3020
- children: /* @__PURE__ */ jsx125(LegacyTableColumnHeader, { column, dropdownOptions: columnDropdownOptions })
3021
- },
3022
- i
3023
- )) }) }),
3024
- /* @__PURE__ */ jsx125("tbody", { className: "divide-y dark:divide-slate-600", children: nRows > 0 && range3(nRows).map((i) => {
3025
- const entry = data[i];
3026
- return /* @__PURE__ */ jsx125(
3027
- "tr",
3028
- {
3029
- className: clsx5("whitespace-nowrap p-4 text-sm text-muted-foreground", {
3030
- "cursor-pointer hover:backdrop-brightness-95": entry && typeof onEntryClick === "function"
3031
- }),
3032
- "data-cy": "table-row",
3033
- onClick: () => {
3034
- entry && onEntryClick && onEntryClick(entry);
3035
- },
3036
- children: columns.map(({ field, formatter }, j) => {
3037
- let value;
3038
- if (!entry) {
3039
- value = "";
3040
- } else if (typeof field === "function") {
3041
- value = field(entry);
3042
- } else {
3043
- value = entry[field];
3044
- }
3045
- const formattedValue = entry && formatter ? formatter(value) : defaultFormatter(value);
3046
- return /* @__PURE__ */ jsx125("td", { className: "whitespace-nowrap px-6", "data-cy": "table-data-item", style: { height: 42 }, children: /* @__PURE__ */ jsx125("span", { className: "block text-ellipsis leading-none", children: formattedValue }) }, j);
3047
- })
3048
- },
3049
- i
3050
- );
3051
- }) })
3052
- ] }) }) });
3053
- };
3054
-
3055
- // src/components/LegacyTable/LegacyClientTable.tsx
3056
- import { jsx as jsx126, jsxs as jsxs48 } from "react/jsx-runtime";
3057
- var LegacyClientTable = ({ data, ...props }) => {
3058
- const [currentPage, setCurrentPage] = useState7(1);
3059
- const [entriesPerPage] = useState7(10);
3060
- const { t } = useTranslation7("libui");
3061
- const pageCount = Math.ceil(data.length / entriesPerPage);
3062
- const firstEntry = data.length === 0 ? 0 : (currentPage - 1) * entriesPerPage + 1;
3063
- const lastEntry = Math.min(firstEntry + entriesPerPage - 1, data.length);
3064
- const currentEntries = data.slice(firstEntry - 1, lastEntry);
3065
- return /* @__PURE__ */ jsxs48("div", { children: [
3066
- /* @__PURE__ */ jsx126(LegacyTable, { data: currentEntries, ...props }),
3067
- /* @__PURE__ */ jsxs48("div", { className: "flex items-center justify-between px-1 py-3", children: [
3068
- /* @__PURE__ */ jsx126("div", { className: "hidden sm:block", children: /* @__PURE__ */ jsx126("p", { className: "text-sm font-medium text-muted-foreground", children: t("pagination.info", {
3069
- first: firstEntry,
3070
- last: lastEntry,
3071
- total: data.length
3072
- }) }) }),
3073
- /* @__PURE__ */ jsxs48("div", { className: "flex flex-1 justify-between sm:justify-end", children: [
3074
- /* @__PURE__ */ jsx126(
3075
- "button",
3076
- {
3077
- className: "relative inline-flex items-center rounded-md border border-slate-300 bg-slate-50 px-4 py-2 text-sm font-medium text-muted-foreground disabled:opacity-75 dark:border-slate-600 dark:bg-slate-800",
3078
- disabled: currentPage === 1,
3079
- onClick: () => {
3080
- setCurrentPage(currentPage - 1);
3081
- },
3082
- children: t("pagination.previous")
3083
- }
3084
- ),
3085
- /* @__PURE__ */ jsx126(
3086
- "button",
3087
- {
3088
- className: "relative ml-3 inline-flex items-center rounded-md border border-slate-300 bg-slate-50 px-4 py-2 text-sm font-medium text-muted-foreground disabled:opacity-75 dark:border-slate-600 dark:bg-slate-800",
3089
- disabled: currentPage === pageCount,
3090
- onClick: () => {
3091
- setCurrentPage(currentPage + 1);
3092
- },
3093
- children: t("pagination.next")
3094
- }
3095
- )
3096
- ] })
3097
- ] })
3098
- ] });
3099
- };
3100
-
3101
- // src/components/LineGraph/LineGraph.tsx
3102
- import React86 from "react";
3103
- import { toBasicISOString as toBasicISOString3 } from "@douglasneuroinformatics/libjs";
3104
- import { useTranslation as useTranslation8 } from "react-i18next";
3105
- import {
3106
- CartesianGrid,
3107
- ErrorBar,
3108
- Label as Label6,
3109
- Legend,
3110
- Line,
3111
- LineChart,
3112
- ResponsiveContainer,
3113
- Tooltip,
3114
- XAxis,
3115
- YAxis
3116
- } from "recharts";
3117
- import { jsx as jsx127, jsxs as jsxs49 } from "react/jsx-runtime";
3118
- import { createElement as createElement2 } from "react";
3119
- var strokeColors = {
3120
- dark: "#cbd5e1",
3121
- // slate-300
3122
- light: "#475569"
3123
- // slate-600
3124
- };
3125
- var tooltipStyles = {
3126
- dark: {
3127
- backgroundColor: "#0f172a",
3128
- // slate-900
3129
- borderColor: strokeColors.light,
3130
- borderRadius: "2px"
3131
- },
3132
- light: {
3133
- backgroundColor: "#f1f5f9",
3134
- // slate-100
3135
- borderColor: strokeColors.dark,
3136
- borderRadius: "2px"
3137
- }
3138
- };
3139
- function LineGraphComponent({
3140
- data,
3141
- lines,
3142
- xAxis
3143
- }) {
3144
- const { i18n } = useTranslation8("libui");
3145
- const [theme] = useTheme();
3146
- return /* @__PURE__ */ jsx127(ResponsiveContainer, { height: 400, width: "100%", children: /* @__PURE__ */ jsxs49(LineChart, { data: [...data], margin: { bottom: 5, left: 15, right: 15, top: 5 }, children: [
3147
- /* @__PURE__ */ jsx127(CartesianGrid, { stroke: "#64748b", strokeDasharray: "5 5" }),
3148
- /* @__PURE__ */ jsx127(
3149
- XAxis,
3150
- {
3151
- axisLine: { stroke: "#64748b" },
3152
- dataKey: xAxis?.key,
3153
- domain: ["auto", "auto"],
3154
- height: 50,
3155
- interval: "preserveStartEnd",
3156
- padding: { left: 20, right: 20 },
3157
- stroke: strokeColors[theme],
3158
- tickFormatter: (time) => toBasicISOString3(new Date(time)),
3159
- tickLine: { stroke: "#64748b" },
3160
- tickMargin: 8,
3161
- tickSize: 8,
3162
- type: "number",
3163
- children: /* @__PURE__ */ jsx127(Label6, { fill: strokeColors[theme], offset: 0, position: "insideBottom", value: xAxis?.label })
3164
- }
3165
- ),
3166
- /* @__PURE__ */ jsx127(
3167
- YAxis,
3168
- {
3169
- axisLine: { stroke: "#64748b" },
3170
- stroke: strokeColors[theme],
3171
- tickLine: { stroke: "#64748b" },
3172
- tickMargin: 5,
3173
- tickSize: 8,
3174
- width: 40
3175
- }
3176
- ),
3177
- /* @__PURE__ */ jsx127(
3178
- Tooltip,
3179
- {
3180
- contentStyle: tooltipStyles[theme],
3181
- labelFormatter: (time) => {
3182
- const date = new Date(time);
3183
- return new Intl.DateTimeFormat(i18n.resolvedLanguage, {
3184
- dateStyle: "full",
3185
- timeStyle: "medium"
3186
- }).format(date);
3187
- },
3188
- labelStyle: { color: strokeColors[theme], fontWeight: 500, whiteSpace: "pre-wrap" }
3189
- }
3190
- ),
3191
- lines.map(({ err, name, stroke, type, val, ...props }) => /* @__PURE__ */ createElement2(
3192
- Line,
3193
- {
3194
- ...props,
3195
- dataKey: val,
3196
- key: val,
3197
- name,
3198
- stroke: stroke ?? strokeColors[theme],
3199
- type: type ?? "linear"
3200
- },
3201
- err && /* @__PURE__ */ jsx127(ErrorBar, { dataKey: err, stroke: "#64748b" })
3202
- )),
3203
- /* @__PURE__ */ jsx127(Legend, { wrapperStyle: { paddingLeft: 40, paddingTop: 10 } })
3204
- ] }) });
3205
- }
3206
- var LineGraph = React86.memo(LineGraphComponent);
3207
-
3208
- // src/components/MenuBar/MenuBar.tsx
3209
- import { Group as Group4, Menu as Menu3, Portal as Portal10, RadioGroup as RadioGroup5, Sub as Sub3 } from "@radix-ui/react-menubar";
3210
-
3211
- // src/components/MenuBar/MenuBarCheckboxItem.tsx
3212
- import React87 from "react";
3213
- import { CheckboxItem as CheckboxItem3, ItemIndicator as ItemIndicator6 } from "@radix-ui/react-menubar";
3214
- import { CheckIcon as CheckIcon6 } from "lucide-react";
3215
- import { jsx as jsx128, jsxs as jsxs50 } from "react/jsx-runtime";
3216
- var MenuBarCheckboxItem = React87.forwardRef(function MenuBarCheckboxItem2({ checked, children, className, ...props }, ref) {
3217
- return /* @__PURE__ */ jsxs50(
3218
- CheckboxItem3,
3219
- {
3220
- checked,
3221
- className: cn(
3222
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
3223
- className
3224
- ),
3225
- ref,
3226
- ...props,
3227
- children: [
3228
- /* @__PURE__ */ jsx128("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx128(ItemIndicator6, { children: /* @__PURE__ */ jsx128(CheckIcon6, { className: "h-4 w-4" }) }) }),
3229
- children
3230
- ]
3231
- }
3232
- );
3233
- });
3234
-
3235
- // src/components/MenuBar/MenuBarContent.tsx
3236
- import React88 from "react";
3237
- import { Content as Content10, Portal as Portal9 } from "@radix-ui/react-menubar";
3238
- import { jsx as jsx129 } from "react/jsx-runtime";
3239
- var MenuBarContent = React88.forwardRef(function MenuBarContent2({ align = "start", alignOffset = -4, className, sideOffset = 8, ...props }, ref) {
3240
- return /* @__PURE__ */ jsx129(Portal9, { children: /* @__PURE__ */ jsx129(
3241
- Content10,
3242
- {
3243
- align,
3244
- alignOffset,
3245
- className: cn(
3246
- "z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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",
3247
- className
3248
- ),
3249
- ref,
3250
- sideOffset,
3251
- ...props
3252
- }
3253
- ) });
3254
- });
3255
-
3256
- // src/components/MenuBar/MenuBarItem.tsx
3257
- import React89 from "react";
3258
- import { Item as Item6 } from "@radix-ui/react-menubar";
3259
- import { jsx as jsx130 } from "react/jsx-runtime";
3260
- var MenuBarItem = React89.forwardRef(function MenuBarItem2({ className, inset, ...props }, ref) {
3261
- return /* @__PURE__ */ jsx130(
3262
- Item6,
3263
- {
3264
- className: cn(
3265
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
3266
- inset && "pl-8",
3267
- className
3268
- ),
3269
- ref,
3270
- ...props
3271
- }
3272
- );
3273
- });
3274
-
3275
- // src/components/MenuBar/MenuBarLabel.tsx
3276
- import React90 from "react";
3277
- import { Label as Label7 } from "@radix-ui/react-menubar";
3278
- import { jsx as jsx131 } from "react/jsx-runtime";
3279
- var MenuBarLabel = React90.forwardRef(function MenuBarLabel2({ className, inset, ...props }, ref) {
3280
- return /* @__PURE__ */ jsx131(Label7, { className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className), ref, ...props });
3281
- });
3282
-
3283
- // src/components/MenuBar/MenuBarRadioItem.tsx
3284
- import React91 from "react";
3285
- import { ItemIndicator as ItemIndicator7, RadioItem as RadioItem3 } from "@radix-ui/react-menubar";
3286
- import { CircleIcon as CircleIcon4 } from "lucide-react";
3287
- import { jsx as jsx132, jsxs as jsxs51 } from "react/jsx-runtime";
3288
- var MenuBarRadioItem = React91.forwardRef(function MenuBarRadioItem2({ children, className, ...props }, ref) {
3289
- return /* @__PURE__ */ jsxs51(
3290
- RadioItem3,
3291
- {
3292
- className: cn(
3293
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
3294
- className
3295
- ),
3296
- ref,
3297
- ...props,
3298
- children: [
3299
- /* @__PURE__ */ jsx132("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx132(ItemIndicator7, { children: /* @__PURE__ */ jsx132(CircleIcon4, { className: "fill-current", style: { height: 8, width: 8 } }) }) }),
3300
- children
3301
- ]
3302
- }
3303
- );
3304
- });
3305
-
3306
- // src/components/MenuBar/MenuBarRoot.tsx
3307
- import React92 from "react";
3308
- import { Root as Root15 } from "@radix-ui/react-menubar";
3309
- import { jsx as jsx133 } from "react/jsx-runtime";
3310
- var MenuBarRoot = React92.forwardRef(
3311
- function MenuBarRoot2({ className, ...props }, ref) {
3312
- return /* @__PURE__ */ jsx133(
3313
- Root15,
3314
- {
3315
- className: cn("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm", className),
3316
- ref,
3317
- ...props
3318
- }
3319
- );
3320
- }
3321
- );
3322
-
3323
- // src/components/MenuBar/MenuBarSeparator.tsx
3324
- import React93 from "react";
3325
- import { Separator as Separator4 } from "@radix-ui/react-menubar";
3326
- import { jsx as jsx134 } from "react/jsx-runtime";
3327
- var MenuBarSeparator = React93.forwardRef(function MenuBarSeparator2({ className, ...props }, ref) {
3328
- return /* @__PURE__ */ jsx134(Separator4, { className: cn("-mx-1 my-1 h-px bg-muted", className), ref, ...props });
3329
- });
3330
-
3331
- // src/components/MenuBar/MenuBarShortcut.tsx
3332
- import "react";
3333
- import { jsx as jsx135 } from "react/jsx-runtime";
3334
- var MenuBarShortcut = ({ className, ...props }) => {
3335
- return /* @__PURE__ */ jsx135("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props });
3336
- };
3337
-
3338
- // src/components/MenuBar/MenuBarSubContent.tsx
3339
- import React95 from "react";
3340
- import { SubContent as SubContent3 } from "@radix-ui/react-menubar";
3341
- import { jsx as jsx136 } from "react/jsx-runtime";
3342
- var MenuBarSubContent = React95.forwardRef(function MenuBarSubContent2({ className, ...props }, ref) {
3343
- return /* @__PURE__ */ jsx136(
3344
- SubContent3,
3345
- {
3346
- className: cn(
3347
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",
3348
- className
3349
- ),
3350
- ref,
3351
- ...props
3352
- }
3353
- );
3354
- });
3355
-
3356
- // src/components/MenuBar/MenuBarSubTrigger.tsx
3357
- import React96 from "react";
3358
- import { SubTrigger as SubTrigger3 } from "@radix-ui/react-menubar";
3359
- import { ChevronRightIcon as ChevronRightIcon4 } from "lucide-react";
3360
- import { jsx as jsx137, jsxs as jsxs52 } from "react/jsx-runtime";
3361
- var MenuBarSubTrigger = React96.forwardRef(function MenuBarSubTrigger2({ children, className, inset, ...props }, ref) {
3362
- return /* @__PURE__ */ jsxs52(
3363
- SubTrigger3,
3364
- {
3365
- className: cn(
3366
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
3367
- inset && "pl-8",
3368
- className
3369
- ),
3370
- ref,
3371
- ...props,
3372
- children: [
3373
- children,
3374
- /* @__PURE__ */ jsx137(ChevronRightIcon4, { className: "ml-auto h-4 w-4" })
3375
- ]
3376
- }
3377
- );
3378
- });
3379
-
3380
- // src/components/MenuBar/MenuBarTrigger.tsx
3381
- import React97 from "react";
3382
- import { Trigger as Trigger9 } from "@radix-ui/react-menubar";
3383
- import { jsx as jsx138 } from "react/jsx-runtime";
3384
- var MenuBarTrigger = React97.forwardRef(function MenuBarTrigger2({ className, ...props }, ref) {
3385
- return /* @__PURE__ */ jsx138(
3386
- Trigger9,
3387
- {
3388
- className: cn(
3389
- "flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
3390
- className
3391
- ),
3392
- ref,
3393
- ...props
3394
- }
3395
- );
3396
- });
3397
-
3398
- // src/components/MenuBar/MenuBar.tsx
3399
- var MenuBar = Object.assign(MenuBarRoot, {
3400
- CheckboxItem: MenuBarCheckboxItem,
3401
- Content: MenuBarContent,
3402
- Group: Group4,
3403
- Item: MenuBarItem,
3404
- Label: MenuBarLabel,
3405
- Menu: Menu3,
3406
- Portal: Portal10,
3407
- RadioGroup: RadioGroup5,
3408
- RadioItem: MenuBarRadioItem,
3409
- Separator: MenuBarSeparator,
3410
- Shortcut: MenuBarShortcut,
3411
- Sub: Sub3,
3412
- SubContent: MenuBarSubContent,
3413
- SubTrigger: MenuBarSubTrigger,
3414
- Trigger: MenuBarTrigger
3415
- });
3416
-
3417
- // src/components/NotificationHub/NotificationHub.tsx
3418
- import { AnimatePresence as AnimatePresence3, motion as motion3 } from "framer-motion";
3419
- import { XIcon as XIcon2 } from "lucide-react";
3420
- import { useTranslation as useTranslation9 } from "react-i18next";
3421
-
3422
- // src/components/NotificationHub/NotificationIcon.tsx
3423
- import { CheckCircleIcon, ExclamationCircleIcon, InformationCircleIcon, XCircleIcon } from "@heroicons/react/24/solid";
3424
- import { jsx as jsx139 } from "react/jsx-runtime";
3425
- var NotificationIcon = ({ type }) => {
3426
- switch (type) {
3427
- case "info":
3428
- return /* @__PURE__ */ jsx139(InformationCircleIcon, { "aria-hidden": "true", className: "h-6 w-6 text-blue-500" });
3429
- case "success":
3430
- return /* @__PURE__ */ jsx139(CheckCircleIcon, { "aria-hidden": "true", className: "h-6 w-6 text-green-500" });
3431
- case "warning":
3432
- return /* @__PURE__ */ jsx139(ExclamationCircleIcon, { "aria-hidden": "true", className: "h-6 w-6 text-yellow-500" });
3433
- case "error":
3434
- return /* @__PURE__ */ jsx139(XCircleIcon, { "aria-hidden": "true", className: "h-6 w-6 text-red-500" });
3435
- }
3436
- };
3437
-
3438
- // src/components/NotificationHub/NotificationHub.tsx
3439
- import { jsx as jsx140, jsxs as jsxs53 } from "react/jsx-runtime";
3440
- var NotificationHub = ({ timeout = 5e3 }) => {
3441
- const { t } = useTranslation9("libui");
3442
- const { dismissNotification, notifications } = useNotificationsStore();
3443
- return /* @__PURE__ */ jsx140("div", { className: "fixed bottom-0 z-50 w-full print:hidden", children: /* @__PURE__ */ jsx140(AnimatePresence3, { children: notifications.map((item) => /* @__PURE__ */ jsx140(
3444
- motion3.div,
3445
- {
3446
- animate: { height: "auto", opacity: 1 },
3447
- className: "relative max-w-sm",
3448
- exit: { height: 0, opacity: 0 },
3449
- initial: { height: 0, opacity: 0 },
3450
- transition: { bounce: 0.1, type: "spring" },
3451
- children: /* @__PURE__ */ jsx140("div", { className: "w-full p-2", children: /* @__PURE__ */ jsxs53(Card, { className: "w-full rounded-lg p-0", children: [
3452
- /* @__PURE__ */ jsxs53("div", { className: "p-4", children: [
3453
- /* @__PURE__ */ jsxs53("div", { className: "mb-2 flex items-center", children: [
3454
- /* @__PURE__ */ jsx140(NotificationIcon, { type: item.type }),
3455
- /* @__PURE__ */ jsx140("h5", { className: "ml-3 flex-grow font-medium text-slate-900 dark:text-slate-100", children: item.title ?? t(`notifications.types.${item.type}`) }),
3456
- /* @__PURE__ */ jsx140(
3457
- "button",
3458
- {
3459
- className: "inline-flex rounded-md text-slate-400 hover:text-slate-500 focus:outline-none focus:ring-1 focus:ring-sky-500 dark:focus:ring-sky-600",
3460
- type: "button",
3461
- onClick: () => {
3462
- dismissNotification(item.id);
3463
- },
3464
- children: /* @__PURE__ */ jsx140(XIcon2, { "aria-hidden": "true", className: "h-5 w-5" })
3465
- }
3466
- )
3467
- ] }),
3468
- /* @__PURE__ */ jsx140("p", { className: "my-2 text-muted-foreground", children: item.message })
3469
- ] }),
3470
- /* @__PURE__ */ jsx140(
3471
- motion3.div,
3472
- {
3473
- animate: { width: "100%" },
3474
- className: "h-1 bg-slate-500",
3475
- initial: { width: "0%" },
3476
- transition: { duration: timeout / 1e3, ease: "linear" },
3477
- onAnimationComplete: () => {
3478
- dismissNotification(item.id);
3479
- }
3480
- }
3481
- )
3482
- ] }) })
3483
- },
3484
- item.id
3485
- )) }) });
3486
- };
3487
-
3488
- // src/components/Pagination/PaginationContent.tsx
3489
- import "react";
3490
- import { jsx as jsx141 } from "react/jsx-runtime";
3491
- var PaginationContent = ({ className, ...props }) => /* @__PURE__ */ jsx141("ul", { className: cn("flex flex-row items-center gap-1", className), ...props });
3492
-
3493
- // src/components/Pagination/PaginationEllipsis.tsx
3494
- import "react";
3495
- import { MoreHorizontalIcon as MoreHorizontalIcon2 } from "lucide-react";
3496
- import { jsx as jsx142, jsxs as jsxs54 } from "react/jsx-runtime";
3497
- var PaginationEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsxs54("span", { "aria-hidden": true, className: cn("flex h-9 w-9 items-center justify-center", className), ...props, children: [
3498
- /* @__PURE__ */ jsx142(MoreHorizontalIcon2, { className: "h-4 w-4" }),
3499
- /* @__PURE__ */ jsx142("span", { className: "sr-only", children: "More pages" })
3500
- ] });
3501
-
3502
- // src/components/Pagination/PaginationItem.tsx
3503
- import { jsx as jsx143 } from "react/jsx-runtime";
3504
- var PaginationItem = ({ className, ...props }) => /* @__PURE__ */ jsx143("li", { className, ...props });
3505
-
3506
- // src/components/Pagination/PaginationLink.tsx
3507
- import "react";
3508
- import { jsx as jsx144 } from "react/jsx-runtime";
3509
- var PaginationLink = ({ children, className, isActive, size = "icon", ...props }) => /* @__PURE__ */ jsx144(
3510
- "a",
3511
- {
3512
- "aria-current": isActive ? "page" : void 0,
3513
- className: cn(
3514
- buttonVariants({
3515
- size,
3516
- variant: isActive ? "outline" : "ghost"
3517
- }),
3518
- className
3519
- ),
3520
- ...props,
3521
- children
3522
- }
3523
- );
3524
-
3525
- // src/components/Pagination/PaginationNext.tsx
3526
- import "react";
3527
- import { ChevronRightIcon as ChevronRightIcon5 } from "lucide-react";
3528
- import { useTranslation as useTranslation10 } from "react-i18next";
3529
- import { jsx as jsx145, jsxs as jsxs55 } from "react/jsx-runtime";
3530
- var PaginationNext = ({ className, ...props }) => {
3531
- const { t } = useTranslation10("libui");
3532
- return /* @__PURE__ */ jsxs55(PaginationLink, { "aria-label": "Go to next page", className: cn("gap-1 pr-2.5", className), size: "md", ...props, children: [
3533
- /* @__PURE__ */ jsx145("span", { children: t("pagination.next") }),
3534
- /* @__PURE__ */ jsx145(ChevronRightIcon5, { className: "h-4 w-4" })
3535
- ] });
3536
- };
3537
-
3538
- // src/components/Pagination/PaginationPrevious.tsx
3539
- import { ChevronLeftIcon } from "lucide-react";
3540
- import { useTranslation as useTranslation11 } from "react-i18next";
3541
- import { jsx as jsx146, jsxs as jsxs56 } from "react/jsx-runtime";
3542
- var PaginationPrevious = ({ className, ...props }) => {
3543
- const { t } = useTranslation11("libui");
3544
- return /* @__PURE__ */ jsxs56(PaginationLink, { "aria-label": "Go to previous page", className: cn("gap-1 pl-2.5", className), size: "md", ...props, children: [
3545
- /* @__PURE__ */ jsx146(ChevronLeftIcon, { className: "h-4 w-4" }),
3546
- /* @__PURE__ */ jsx146("span", { children: t("pagination.previous") })
3547
- ] });
3548
- };
3549
-
3550
- // src/components/Pagination/PaginationRoot.tsx
3551
- import "react";
3552
- import { jsx as jsx147 } from "react/jsx-runtime";
3553
- var PaginationRoot = ({ className, ...props }) => /* @__PURE__ */ jsx147(
3554
- "nav",
3555
- {
3556
- "aria-label": "pagination",
3557
- className: cn("mx-auto flex w-full justify-center", className),
3558
- role: "navigation",
3559
- ...props
3560
- }
3561
- );
3562
-
3563
- // src/components/Pagination/Pagination.tsx
3564
- var Pagination = Object.assign(PaginationRoot, {
3565
- Content: PaginationContent,
3566
- Ellipsis: PaginationEllipsis,
3567
- Item: PaginationItem,
3568
- Link: PaginationLink,
3569
- Next: PaginationNext,
3570
- Previous: PaginationPrevious
3571
- });
3572
-
3573
- // src/components/Progress/Progress.tsx
3574
- import React103 from "react";
3575
- import * as ProgressPrimitive from "@radix-ui/react-progress";
3576
- import { jsx as jsx148 } from "react/jsx-runtime";
3577
- var Progress = React103.forwardRef(function Progress2({ className, value, ...props }, ref) {
3578
- return /* @__PURE__ */ jsx148(
3579
- ProgressPrimitive.Root,
3580
- {
3581
- className: cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className),
3582
- ref,
3583
- ...props,
3584
- children: /* @__PURE__ */ jsx148(
3585
- ProgressPrimitive.Indicator,
3586
- {
3587
- className: "h-full w-full flex-1 bg-primary transition-all",
3588
- style: { transform: `translateX(-${100 - (value ?? 0)}%)` }
3589
- }
3590
- )
3591
- }
3592
- );
3593
- });
3594
-
3595
- // src/components/Resizable/Resizable.tsx
3596
- import "react";
3597
- import { Panel } from "react-resizable-panels";
3598
-
3599
- // src/components/Resizable/ResizableHandle.tsx
3600
- import { GripVertical } from "lucide-react";
3601
- import { PanelResizeHandle } from "react-resizable-panels";
3602
- import { jsx as jsx149 } from "react/jsx-runtime";
3603
- var ResizableHandle = ({ className, withHandle, ...props }) => /* @__PURE__ */ jsx149(
3604
- PanelResizeHandle,
3605
- {
3606
- className: cn(
3607
- "relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",
3608
- className
3609
- ),
3610
- ...props,
3611
- children: withHandle && /* @__PURE__ */ jsx149("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ jsx149(GripVertical, { className: "h-2.5 w-2.5" }) })
3612
- }
3613
- );
3614
-
3615
- // src/components/Resizable/ResizablePanelGroup.tsx
3616
- import { PanelGroup } from "react-resizable-panels";
3617
- import { jsx as jsx150 } from "react/jsx-runtime";
3618
- var ResizablePanelGroup = ({ className, ...props }) => /* @__PURE__ */ jsx150(
3619
- PanelGroup,
3620
- {
3621
- className: cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className),
3622
- ...props
3623
- }
3624
- );
3625
-
3626
- // src/components/Resizable/Resizable.tsx
3627
- import { Fragment, jsx as jsx151 } from "react/jsx-runtime";
3628
- var ResizableRoot = ({ children }) => /* @__PURE__ */ jsx151(Fragment, { children });
3629
- var Resizable = Object.assign(ResizableRoot, {
3630
- Handle: ResizableHandle,
3631
- Panel,
3632
- PanelGroup: ResizablePanelGroup
3633
- });
3634
-
3635
- // src/components/SearchBar/SearchBar.tsx
3636
- import { SearchIcon as SearchIcon2 } from "lucide-react";
3637
- import { useTranslation as useTranslation12 } from "react-i18next";
3638
- import { jsx as jsx152, jsxs as jsxs57 } from "react/jsx-runtime";
3639
- var SearchBar = ({ className, onClick, onValueChange, placeholder, value }) => {
3640
- const { t } = useTranslation12("libui");
3641
- return /* @__PURE__ */ jsxs57("form", { className: cn("relative", className), children: [
3642
- /* @__PURE__ */ jsx152(SearchIcon2, { className: "absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" }),
3643
- /* @__PURE__ */ jsx152(
3644
- Input,
3645
- {
3646
- className: "pl-8",
3647
- placeholder: placeholder ?? t("searchBar.placeholder"),
3648
- type: "search",
3649
- value,
3650
- onChange: (event) => {
3651
- onValueChange?.(event.target.value);
3652
- },
3653
- onClick: () => onClick?.()
3654
- }
3655
- )
3656
- ] });
3657
- };
3658
-
3659
- // src/components/Separator/Separator.tsx
3660
- import React105 from "react";
3661
- import * as SeparatorPrimitive from "@radix-ui/react-separator";
3662
- import { jsx as jsx153 } from "react/jsx-runtime";
3663
- var Separator5 = React105.forwardRef(function Separator6({ className, decorative = true, orientation = "horizontal", ...props }, ref) {
3664
- return /* @__PURE__ */ jsx153(
3665
- SeparatorPrimitive.Root,
3666
- {
3667
- className: cn(
3668
- "shrink-0 bg-border",
3669
- orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
3670
- className
3671
- ),
3672
- "data-testid": "separator",
3673
- decorative,
3674
- orientation,
3675
- ref,
3676
- ...props
3677
- }
3678
- );
3679
- });
3680
-
3681
- // src/components/Sheet/Sheet.tsx
3682
- import { Close as Close3, Portal as Portal12, Root as Root18, Trigger as Trigger10 } from "@radix-ui/react-dialog";
3683
-
3684
- // src/components/Sheet/SheetContent.tsx
3685
- import React106 from "react";
3686
- import { Close as Close2, Content as Content11, Overlay as Overlay3, Portal as Portal11 } from "@radix-ui/react-dialog";
3687
- import { cva as cva5 } from "class-variance-authority";
3688
- import { XIcon as XIcon3 } from "lucide-react";
3689
- import { jsx as jsx154, jsxs as jsxs58 } from "react/jsx-runtime";
3690
- var sheetVariants = cva5(
3691
- "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
3692
- {
3693
- defaultVariants: {
3694
- side: "right"
3695
- },
3696
- variants: {
3697
- side: {
3698
- bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
3699
- left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
3700
- right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
3701
- top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top"
3702
- }
3703
- }
3704
- }
3705
- );
3706
- var SheetContent = React106.forwardRef(function SheetContent2({ children, className, side = "right", ...props }, ref) {
3707
- return /* @__PURE__ */ jsxs58(Portal11, { children: [
3708
- /* @__PURE__ */ jsx154(Overlay3, {}),
3709
- /* @__PURE__ */ jsxs58(Content11, { className: cn(sheetVariants({ side }), className), ref, ...props, children: [
3710
- children,
3711
- /* @__PURE__ */ jsxs58(Close2, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
3712
- /* @__PURE__ */ jsx154(XIcon3, { className: "h-4 w-4" }),
3713
- /* @__PURE__ */ jsx154("span", { className: "sr-only", children: "Close" })
3714
- ] })
3715
- ] })
3716
- ] });
3717
- });
3718
-
3719
- // src/components/Sheet/SheetDescription.tsx
3720
- import React107 from "react";
3721
- import { Description as Description3 } from "@radix-ui/react-dialog";
3722
- import { jsx as jsx155 } from "react/jsx-runtime";
3723
- var SheetDescription = React107.forwardRef(function SheetDescription2({ className, ...props }, ref) {
3724
- return /* @__PURE__ */ jsx155(Description3, { className: cn("text-sm text-muted-foreground", className), ref, ...props });
3725
- });
3726
-
3727
- // src/components/Sheet/SheetFooter.tsx
3728
- import "react";
3729
- import { jsx as jsx156 } from "react/jsx-runtime";
3730
- var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx156("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
3731
-
3732
- // src/components/Sheet/SheetHeader.tsx
3733
- import "react";
3734
- import { jsx as jsx157 } from "react/jsx-runtime";
3735
- var SheetHeader = ({ className, ...props }) => /* @__PURE__ */ jsx157("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
3736
-
3737
- // src/components/Sheet/SheetOverlay.tsx
3738
- import React110 from "react";
3739
- import { Overlay as Overlay4 } from "@radix-ui/react-dialog";
3740
- import { jsx as jsx158 } from "react/jsx-runtime";
3741
- var SheetOverlay = React110.forwardRef(function SheetOverlay2({ className, ...props }, ref) {
3742
- return /* @__PURE__ */ jsx158(
3743
- Overlay4,
3744
- {
3745
- className: cn(
3746
- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
3747
- className
3748
- ),
3749
- ...props,
3750
- ref
3751
- }
3752
- );
3753
- });
3754
-
3755
- // src/components/Sheet/SheetTitle.tsx
3756
- import React111 from "react";
3757
- import { Title as Title3 } from "@radix-ui/react-dialog";
3758
- import { jsx as jsx159 } from "react/jsx-runtime";
3759
- var SheetTitle = React111.forwardRef(function SheetTitle2({ className, ...props }, ref) {
3760
- return /* @__PURE__ */ jsx159(Title3, { className: cn("text-lg font-semibold text-foreground", className), ref, ...props });
3761
- });
3762
-
3763
- // src/components/Sheet/Sheet.tsx
3764
- var Sheet = Object.assign(Root18, {
3765
- Close: Close3,
3766
- Content: SheetContent,
3767
- Description: SheetDescription,
3768
- Footer: SheetFooter,
3769
- Header: SheetHeader,
3770
- Overlay: SheetOverlay,
3771
- Portal: Portal12,
3772
- Title: SheetTitle,
3773
- Trigger: Trigger10
3774
- });
3775
-
3776
- // src/components/Spinner/Spinner.tsx
3777
- import { jsx as jsx160 } from "react/jsx-runtime";
3778
- var Spinner = ({ className, ...props }) => {
3779
- return /* @__PURE__ */ jsx160("div", { className: cn("flex h-full w-full items-center justify-center", className), ...props, children: /* @__PURE__ */ jsx160(
3780
- "span",
3781
- {
3782
- className: "relative animate-spinner overflow-hidden text-slate-900 dark:text-slate-100",
3783
- style: {
3784
- borderRadius: "50%",
3785
- fontSize: "45px",
3786
- height: "1em",
3787
- textIndent: "-9999em",
3788
- transform: "translateZ(0)",
3789
- width: "1em"
3790
- }
3791
- }
3792
- ) });
3793
- };
3794
-
3795
- // src/components/SpinnerIcon/SpinnerIcon.tsx
3796
- import { jsx as jsx161 } from "react/jsx-runtime";
3797
- var SpinnerIcon = ({ className, ...props }) => /* @__PURE__ */ jsx161(
3798
- "svg",
3799
- {
3800
- className: cn("animate-spin", className),
3801
- fill: "none",
3802
- height: "24",
3803
- stroke: "currentColor",
3804
- strokeLinecap: "round",
3805
- strokeLinejoin: "round",
3806
- strokeWidth: "2",
3807
- viewBox: "0 0 24 24",
3808
- width: "24",
3809
- xmlns: "http://www.w3.org/2000/svg",
3810
- ...props,
3811
- children: /* @__PURE__ */ jsx161("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
3812
- }
3813
- );
3814
-
3815
- // src/components/Switch/Switch.tsx
3816
- import React112 from "react";
3817
- import * as SwitchPrimitives from "@radix-ui/react-switch";
3818
- import { jsx as jsx162 } from "react/jsx-runtime";
3819
- var Switch = React112.forwardRef(function Switch2({ className, ...props }, ref) {
3820
- return /* @__PURE__ */ jsx162(
3821
- SwitchPrimitives.Root,
3822
- {
3823
- className: cn(
3824
- "peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
3825
- className
3826
- ),
3827
- ...props,
3828
- ref,
3829
- children: /* @__PURE__ */ jsx162(
3830
- SwitchPrimitives.Thumb,
3831
- {
3832
- className: cn(
3833
- "pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
3834
- )
3835
- }
3836
- )
3837
- }
3838
- );
3839
- });
3840
-
3841
- // src/components/Table/TableBody.tsx
3842
- import React113 from "react";
3843
- import { jsx as jsx163 } from "react/jsx-runtime";
3844
- var TableBody = React113.forwardRef(
3845
- function TableBody2({ className, ...props }, ref) {
3846
- return /* @__PURE__ */ jsx163("tbody", { className: cn("[&_tr:last-child]:border-0", className), ref, ...props });
3847
- }
3848
- );
3849
-
3850
- // src/components/Table/TableCaption.tsx
3851
- import React114 from "react";
3852
- import { jsx as jsx164 } from "react/jsx-runtime";
3853
- var TableCaption = React114.forwardRef(
3854
- function TableCaption2({ className, ...props }, ref) {
3855
- return /* @__PURE__ */ jsx164("caption", { className: cn("mt-4 text-sm text-muted-foreground", className), ref, ...props });
3856
- }
3857
- );
3858
-
3859
- // src/components/Table/TableCell.tsx
3860
- import React115 from "react";
3861
- import { jsx as jsx165 } from "react/jsx-runtime";
3862
- var TableCell = React115.forwardRef(
3863
- function TableCell2({ className, ...props }, ref) {
3864
- return /* @__PURE__ */ jsx165("td", { className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className), ref, ...props });
3865
- }
3866
- );
3867
-
3868
- // src/components/Table/TableFooter.tsx
3869
- import React116 from "react";
3870
- import { jsx as jsx166 } from "react/jsx-runtime";
3871
- var TableFooter = React116.forwardRef(
3872
- function TableFooter2({ className, ...props }, ref) {
3873
- return /* @__PURE__ */ jsx166(
3874
- "tfoot",
3875
- {
3876
- className: cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", className),
3877
- ref,
3878
- ...props
3879
- }
3880
- );
3881
- }
3882
- );
3883
-
3884
- // src/components/Table/TableHead.tsx
3885
- import React117 from "react";
3886
- import { jsx as jsx167 } from "react/jsx-runtime";
3887
- var TableHead = React117.forwardRef(
3888
- function TableHead2({ className, ...props }, ref) {
3889
- return /* @__PURE__ */ jsx167(
3890
- "th",
3891
- {
3892
- className: cn(
3893
- "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
3894
- className
3895
- ),
3896
- ref,
3897
- ...props
3898
- }
3899
- );
3900
- }
3901
- );
3902
-
3903
- // src/components/Table/TableHeader.tsx
3904
- import React118 from "react";
3905
- import { jsx as jsx168 } from "react/jsx-runtime";
3906
- var TableHeader = React118.forwardRef(
3907
- function TableHeader2({ className, ...props }, ref) {
3908
- return /* @__PURE__ */ jsx168("thead", { className: cn("[&_tr]:border-b", className), ref, ...props });
3909
- }
3910
- );
3911
-
3912
- // src/components/Table/TableRoot.tsx
3913
- import React119 from "react";
3914
- import { jsx as jsx169 } from "react/jsx-runtime";
3915
- var TableRoot = React119.forwardRef(function TableRoot2({ className, ...props }, ref) {
3916
- return /* @__PURE__ */ jsx169("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx169("table", { className: cn("w-full caption-bottom text-sm", className), ref, ...props }) });
3917
- });
3918
-
3919
- // src/components/Table/TableRow.tsx
3920
- import React120 from "react";
3921
- import { jsx as jsx170 } from "react/jsx-runtime";
3922
- var TableRow = React120.forwardRef(
3923
- function TableRow2({ className, ...props }, ref) {
3924
- return /* @__PURE__ */ jsx170(
3925
- "tr",
3926
- {
3927
- className: cn("hover:bg-muted/50 border-b transition-colors data-[state=selected]:bg-muted", className),
3928
- ref,
3929
- ...props
3930
- }
3931
- );
3932
- }
3933
- );
3934
-
3935
- // src/components/Table/Table.tsx
3936
- var Table = Object.assign(TableRoot, {
3937
- Body: TableBody,
3938
- Caption: TableCaption,
3939
- Cell: TableCell,
3940
- Footer: TableFooter,
3941
- Head: TableHead,
3942
- Header: TableHeader,
3943
- Row: TableRow
3944
- });
3945
-
3946
- // src/components/Tabs/Tabs.tsx
3947
- import * as TabsPrimitive4 from "@radix-ui/react-tabs";
3948
-
3949
- // src/components/Tabs/TabsContent.tsx
3950
- import React121 from "react";
3951
- import * as TabsPrimitive from "@radix-ui/react-tabs";
3952
- import { jsx as jsx171 } from "react/jsx-runtime";
3953
- var TabsContent = React121.forwardRef(function TabsContent2({ className, ...props }, ref) {
3954
- return /* @__PURE__ */ jsx171(
3955
- TabsPrimitive.Content,
3956
- {
3957
- className: cn(
3958
- "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
3959
- className
3960
- ),
3961
- ref,
3962
- ...props
3963
- }
3964
- );
3965
- });
3966
-
3967
- // src/components/Tabs/TabsList.tsx
3968
- import React122 from "react";
3969
- import * as TabsPrimitive2 from "@radix-ui/react-tabs";
3970
- import { jsx as jsx172 } from "react/jsx-runtime";
3971
- var TabsList = React122.forwardRef(function TabsList2({ className, ...props }, ref) {
3972
- return /* @__PURE__ */ jsx172(
3973
- TabsPrimitive2.List,
3974
- {
3975
- className: cn(
3976
- "inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
3977
- className
3978
- ),
3979
- ref,
3980
- ...props
3981
- }
3982
- );
3983
- });
3984
-
3985
- // src/components/Tabs/TabsTrigger.tsx
3986
- import React123 from "react";
3987
- import * as TabsPrimitive3 from "@radix-ui/react-tabs";
3988
- import { jsx as jsx173 } from "react/jsx-runtime";
3989
- var TabsTrigger = React123.forwardRef(function TabsTrigger2({ className, ...props }, ref) {
3990
- return /* @__PURE__ */ jsx173(
3991
- TabsPrimitive3.Trigger,
3992
- {
3993
- className: cn(
3994
- "inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
3995
- className
3996
- ),
3997
- ref,
3998
- ...props
3999
- }
4000
- );
4001
- });
4002
-
4003
- // src/components/Tabs/Tabs.tsx
4004
- var Tabs = Object.assign(TabsPrimitive4.Root, {
4005
- Content: TabsContent,
4006
- List: TabsList,
4007
- Trigger: TabsTrigger
4008
- });
4009
-
4010
- // src/components/ThemeToggle/ThemeToggle.tsx
4011
- import { MoonIcon, SunIcon } from "lucide-react";
4012
- import { jsx as jsx174, jsxs as jsxs59 } from "react/jsx-runtime";
4013
- var ThemeToggle = ({ onClick, variant = "outline", ...props }) => {
4014
- const [theme, setTheme] = useTheme();
4015
- const toggleTheme = () => {
4016
- setTheme(theme === "dark" ? "light" : "dark");
4017
- };
4018
- return /* @__PURE__ */ jsxs59(
4019
- Button,
4020
- {
4021
- size: "icon",
4022
- variant,
4023
- onClick: (event) => {
4024
- toggleTheme();
4025
- onClick?.(event);
4026
- },
4027
- ...props,
4028
- children: [
4029
- /* @__PURE__ */ jsx174(SunIcon, { className: "rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
4030
- /* @__PURE__ */ jsx174(MoonIcon, { className: "absolute rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" })
4031
- ]
4032
- }
4033
- );
4034
- };
4035
-
4036
- // src/components/Tooltip/TooltipContent.tsx
4037
- import React124 from "react";
4038
- import { Content as Content13 } from "@radix-ui/react-tooltip";
4039
- import { jsx as jsx175 } from "react/jsx-runtime";
4040
- var TooltipContent = React124.forwardRef(
4041
- function TooltipContent2({ className, collisionPadding = 0, sideOffset = 4, ...props }, ref) {
4042
- return /* @__PURE__ */ jsx175(
4043
- Content13,
4044
- {
4045
- className: cn(
4046
- "z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",
4047
- className
4048
- ),
4049
- collisionPadding,
4050
- ref,
4051
- sideOffset,
4052
- ...props
4053
- }
4054
- );
4055
- }
4056
- );
4057
-
4058
- // src/components/Tooltip/TooltipRoot.tsx
4059
- import "react";
4060
- import { Provider, Root as Root21 } from "@radix-ui/react-tooltip";
4061
- import { jsx as jsx176 } from "react/jsx-runtime";
4062
- var TooltipRoot = ({ children, delayDuration = 0, skipDelayDuration = 300 }) => {
4063
- return /* @__PURE__ */ jsx176(Provider, { delayDuration, skipDelayDuration, children: /* @__PURE__ */ jsx176(Root21, { children }) });
4064
- };
4065
-
4066
- // src/components/Tooltip/TooltipTrigger.tsx
4067
- import React126 from "react";
4068
- import { Trigger as Trigger12 } from "@radix-ui/react-tooltip";
4069
- import { jsx as jsx177 } from "react/jsx-runtime";
4070
- var TooltipTrigger = React126.forwardRef(
4071
- function TooltipTrigger2({ variant = "outline", ...props }, ref) {
4072
- return /* @__PURE__ */ jsx177(Trigger12, { asChild: true, ref, children: /* @__PURE__ */ jsx177(Button, { variant, ...props }) });
4073
- }
4074
- );
4075
-
4076
- // src/components/Tooltip/Tooltip.tsx
4077
- var Tooltip2 = Object.assign(TooltipRoot, {
4078
- Content: TooltipContent,
4079
- Trigger: TooltipTrigger
4080
- });
4081
- export {
4082
- Accordion,
4083
- AlertDialog,
4084
- ArrowToggle,
4085
- Avatar,
4086
- BUTTON_ICON_SIZE,
4087
- Badge,
4088
- Breadcrumb,
4089
- Button,
4090
- Card,
4091
- Checkbox,
4092
- Collapsible,
4093
- Command2 as Command,
4094
- ContextMenu,
4095
- DatePicker,
4096
- Dialog,
4097
- Drawer,
4098
- DropdownButton,
4099
- DropdownMenu,
4100
- ErrorBoundary,
4101
- ErrorFallback,
4102
- Form,
4103
- Heading,
4104
- HoverCard,
4105
- Input,
4106
- Label3 as Label,
4107
- LanguageToggle,
4108
- LegacyClientTable,
4109
- LegacyDropdown,
4110
- LegacyModal,
4111
- LegacySelectDropdown,
4112
- LegacySlider,
4113
- LegacyStepper,
4114
- LegacyTable,
4115
- LineGraph,
4116
- MenuBar,
4117
- NotificationHub,
4118
- Pagination,
4119
- Popover,
4120
- Progress,
4121
- RadioGroup4 as RadioGroup,
4122
- Resizable,
4123
- ScrollArea,
4124
- SearchBar,
4125
- Select,
4126
- Separator5 as Separator,
4127
- Sheet,
4128
- Slider,
4129
- Spinner,
4130
- SpinnerIcon,
4131
- Switch,
4132
- Table,
4133
- Tabs,
4134
- TextArea,
4135
- ThemeToggle,
4136
- Tooltip2 as Tooltip,
4137
- badgeVariants,
4138
- buttonVariants,
4139
- labelVariants
4140
- };
4141
- //# sourceMappingURL=index.js.map