@douglasneuroinformatics/libui 2.11.0 → 3.0.0

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