@inspirare/design-system 0.0.22 → 0.0.24

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 (297) hide show
  1. package/README.md +82 -61
  2. package/dist/book-logo-filled.svg +55 -0
  3. package/dist/components/ui/accessibility-improvements.js +26 -23
  4. package/dist/components/ui/accordion.js +34 -24
  5. package/dist/components/ui/alert-dialog.js +91 -57
  6. package/dist/components/ui/alert.js +38 -26
  7. package/dist/components/ui/aspect-ratio.js +11 -3
  8. package/dist/components/ui/avatar.js +30 -8
  9. package/dist/components/ui/badge.js +20 -14
  10. package/dist/components/ui/breadcrumb.js +69 -56
  11. package/dist/components/ui/button-group.js +17 -13
  12. package/dist/components/ui/button.js +19 -15
  13. package/dist/components/ui/calendar.js +63 -59
  14. package/dist/components/ui/card.js +11 -9
  15. package/dist/components/ui/carousel.js +70 -75
  16. package/dist/components/ui/chart.js +75 -72
  17. package/dist/components/ui/checkbox.js +4 -5
  18. package/dist/components/ui/collapsible.js +12 -14
  19. package/dist/components/ui/color-picker.js +60 -80
  20. package/dist/components/ui/combobox.js +153 -33
  21. package/dist/components/ui/command.js +50 -48
  22. package/dist/components/ui/context-menu.js +129 -68
  23. package/dist/components/ui/dialog.js +65 -60
  24. package/dist/components/ui/drawer.js +81 -40
  25. package/dist/components/ui/dropdown-menu.js +100 -87
  26. package/dist/components/ui/empty.js +7 -6
  27. package/dist/components/ui/field.js +44 -47
  28. package/dist/components/ui/form.js +22 -23
  29. package/dist/components/ui/hover-card.js +14 -11
  30. package/dist/components/ui/input-group.js +16 -13
  31. package/dist/components/ui/input-otp.js +37 -32
  32. package/dist/components/ui/input.js +9 -7
  33. package/dist/components/ui/item.js +42 -36
  34. package/dist/components/ui/kbd.js +2 -1
  35. package/dist/components/ui/label.js +6 -7
  36. package/dist/components/ui/menubar.js +124 -93
  37. package/dist/components/ui/navigation-menu.js +79 -54
  38. package/dist/components/ui/pagination.js +78 -58
  39. package/dist/components/ui/popover.js +35 -16
  40. package/dist/components/ui/progress.js +37 -13
  41. package/dist/components/ui/radio-group.js +14 -14
  42. package/dist/components/ui/resizable.js +24 -15
  43. package/dist/components/ui/scroll-area.js +29 -11
  44. package/dist/components/ui/select.js +98 -56
  45. package/dist/components/ui/separator.js +5 -7
  46. package/dist/components/ui/sheet.js +47 -42
  47. package/dist/components/ui/sidebar.js +279 -248
  48. package/dist/components/ui/skeleton.js +4 -40
  49. package/dist/components/ui/slider.js +27 -29
  50. package/dist/components/ui/sonner.js +27 -10
  51. package/dist/components/ui/spinner.js +2 -0
  52. package/dist/components/ui/switch.js +3 -4
  53. package/dist/components/ui/table.js +6 -6
  54. package/dist/components/ui/tabs.js +45 -22
  55. package/dist/components/ui/textarea.js +3 -2
  56. package/dist/components/ui/theme-toggle.js +38 -41
  57. package/dist/components/ui/toggle-group.js +30 -21
  58. package/dist/components/ui/toggle.js +8 -9
  59. package/dist/components/ui/tooltip.js +28 -23
  60. package/dist/index.css +1 -1
  61. package/dist/index.d.ts +446 -468
  62. package/dist/index.js +58 -58
  63. package/package.json +42 -41
  64. package/src/App.tsx +28 -34
  65. package/src/components/branding/assets/book-logo-filled.svg +55 -0
  66. package/src/components/branding/logo/logo.tsx +56 -0
  67. package/src/components/ui/accessibility-improvements.stories.tsx +18 -0
  68. package/src/components/ui/accessibility-improvements.test.tsx +13 -0
  69. package/src/components/ui/accessibility-improvements.tsx +16 -6
  70. package/src/components/ui/accordion.stories.tsx +19 -0
  71. package/src/components/ui/accordion.test.tsx +14 -0
  72. package/src/components/ui/accordion.tsx +28 -20
  73. package/src/components/ui/alert-dialog.stories.tsx +19 -0
  74. package/src/components/ui/alert-dialog.test.tsx +14 -0
  75. package/src/components/ui/alert-dialog.tsx +159 -123
  76. package/src/components/ui/alert.stories.tsx +19 -0
  77. package/src/components/ui/alert.test.tsx +14 -0
  78. package/src/components/ui/alert.tsx +60 -41
  79. package/src/components/ui/aspect-ratio.stories.tsx +19 -0
  80. package/src/components/ui/aspect-ratio.test.tsx +14 -0
  81. package/src/components/ui/aspect-ratio.tsx +19 -2
  82. package/src/components/ui/attachment.stories.tsx +19 -0
  83. package/src/components/ui/attachment.test.tsx +14 -0
  84. package/src/components/ui/attachment.tsx +209 -0
  85. package/src/components/ui/avatar.stories.tsx +19 -0
  86. package/src/components/ui/avatar.test.tsx +14 -0
  87. package/src/components/ui/avatar.tsx +73 -17
  88. package/src/components/ui/badge.stories.tsx +19 -0
  89. package/src/components/ui/badge.test.tsx +14 -0
  90. package/src/components/ui/badge.tsx +33 -25
  91. package/src/components/ui/breadcrumb.stories.tsx +19 -0
  92. package/src/components/ui/breadcrumb.test.tsx +14 -0
  93. package/src/components/ui/breadcrumb.tsx +98 -86
  94. package/src/components/ui/bubble.stories.tsx +19 -0
  95. package/src/components/ui/bubble.test.tsx +14 -0
  96. package/src/components/ui/bubble.tsx +130 -0
  97. package/src/components/ui/button-group.stories.tsx +19 -0
  98. package/src/components/ui/button-group.test.tsx +14 -0
  99. package/src/components/ui/button-group.tsx +26 -20
  100. package/src/components/ui/button.stories.tsx +19 -0
  101. package/src/components/ui/button.test.tsx +14 -0
  102. package/src/components/ui/button.tsx +30 -31
  103. package/src/components/ui/calendar.stories.tsx +19 -0
  104. package/src/components/ui/calendar.test.tsx +14 -0
  105. package/src/components/ui/calendar.tsx +28 -26
  106. package/src/components/ui/card.stories.tsx +19 -0
  107. package/src/components/ui/card.test.tsx +14 -0
  108. package/src/components/ui/card.tsx +30 -17
  109. package/src/components/ui/carousel.stories.tsx +19 -0
  110. package/src/components/ui/carousel.test.tsx +14 -0
  111. package/src/components/ui/carousel.tsx +115 -135
  112. package/src/components/ui/chart.stories.tsx +18 -0
  113. package/src/components/ui/chart.test.tsx +13 -0
  114. package/src/components/ui/chart.tsx +220 -216
  115. package/src/components/ui/checkbox.stories.tsx +19 -0
  116. package/src/components/ui/checkbox.test.tsx +14 -0
  117. package/src/components/ui/checkbox.tsx +7 -10
  118. package/src/components/ui/collapsible.stories.tsx +19 -0
  119. package/src/components/ui/collapsible.test.tsx +14 -0
  120. package/src/components/ui/collapsible.tsx +11 -26
  121. package/src/components/ui/color-picker.stories.tsx +19 -0
  122. package/src/components/ui/color-picker.test.tsx +14 -0
  123. package/src/components/ui/color-picker.tsx +36 -26
  124. package/src/components/ui/combobox.stories.tsx +19 -0
  125. package/src/components/ui/combobox.test.tsx +14 -0
  126. package/src/components/ui/combobox.tsx +281 -96
  127. package/src/components/ui/command.stories.tsx +19 -0
  128. package/src/components/ui/command.test.tsx +14 -0
  129. package/src/components/ui/command.tsx +59 -47
  130. package/src/components/ui/context-menu.stories.tsx +19 -0
  131. package/src/components/ui/context-menu.test.tsx +14 -0
  132. package/src/components/ui/context-menu.tsx +231 -160
  133. package/src/components/ui/dialog.stories.tsx +19 -0
  134. package/src/components/ui/dialog.test.tsx +14 -0
  135. package/src/components/ui/dialog.tsx +81 -72
  136. package/src/components/ui/direction.stories.tsx +19 -0
  137. package/src/components/ui/direction.test.tsx +14 -0
  138. package/src/components/ui/direction.tsx +6 -0
  139. package/src/components/ui/drawer.stories.tsx +19 -0
  140. package/src/components/ui/drawer.test.tsx +14 -0
  141. package/src/components/ui/drawer.tsx +143 -64
  142. package/src/components/ui/dropdown-menu.stories.tsx +19 -0
  143. package/src/components/ui/dropdown-menu.test.tsx +14 -0
  144. package/src/components/ui/dropdown-menu.tsx +199 -153
  145. package/src/components/ui/empty.stories.tsx +18 -0
  146. package/src/components/ui/empty.test.tsx +13 -0
  147. package/src/components/ui/empty.tsx +11 -9
  148. package/src/components/ui/field.stories.tsx +18 -0
  149. package/src/components/ui/field.test.tsx +13 -0
  150. package/src/components/ui/field.tsx +26 -32
  151. package/src/components/ui/form.stories.tsx +22 -0
  152. package/src/components/ui/form.test.tsx +15 -0
  153. package/src/components/ui/form.tsx +1 -2
  154. package/src/components/ui/hover-card.stories.tsx +19 -0
  155. package/src/components/ui/hover-card.test.tsx +14 -0
  156. package/src/components/ui/hover-card.tsx +34 -32
  157. package/src/components/ui/input-group.stories.tsx +18 -0
  158. package/src/components/ui/input-group.test.tsx +13 -0
  159. package/src/components/ui/input-group.tsx +21 -28
  160. package/src/components/ui/input-otp.stories.tsx +19 -0
  161. package/src/components/ui/input-otp.test.tsx +14 -0
  162. package/src/components/ui/input-otp.tsx +58 -42
  163. package/src/components/ui/input.stories.tsx +19 -0
  164. package/src/components/ui/input.test.tsx +14 -0
  165. package/src/components/ui/input.tsx +9 -8
  166. package/src/components/ui/item.stories.tsx +18 -0
  167. package/src/components/ui/item.test.tsx +13 -0
  168. package/src/components/ui/item.tsx +38 -28
  169. package/src/components/ui/kbd.stories.tsx +18 -0
  170. package/src/components/ui/kbd.test.tsx +13 -0
  171. package/src/components/ui/kbd.tsx +3 -3
  172. package/src/components/ui/label.stories.tsx +18 -0
  173. package/src/components/ui/label.test.tsx +13 -0
  174. package/src/components/ui/label.tsx +7 -11
  175. package/src/components/ui/marker.stories.tsx +19 -0
  176. package/src/components/ui/marker.test.tsx +14 -0
  177. package/src/components/ui/marker.tsx +73 -0
  178. package/src/components/ui/menubar.stories.tsx +19 -0
  179. package/src/components/ui/menubar.test.tsx +14 -0
  180. package/src/components/ui/menubar.tsx +226 -202
  181. package/src/components/ui/message-scroller.stories.tsx +19 -0
  182. package/src/components/ui/message-scroller.test.tsx +14 -0
  183. package/src/components/ui/message-scroller.tsx +131 -0
  184. package/src/components/ui/message.stories.tsx +19 -0
  185. package/src/components/ui/message.test.tsx +14 -0
  186. package/src/components/ui/message.tsx +94 -0
  187. package/src/components/ui/native-select.stories.tsx +18 -0
  188. package/src/components/ui/native-select.test.tsx +13 -0
  189. package/src/components/ui/native-select.tsx +63 -0
  190. package/src/components/ui/navigation-menu.stories.tsx +19 -0
  191. package/src/components/ui/navigation-menu.test.tsx +14 -0
  192. package/src/components/ui/navigation-menu.tsx +145 -103
  193. package/src/components/ui/pagination.stories.tsx +19 -0
  194. package/src/components/ui/pagination.test.tsx +14 -0
  195. package/src/components/ui/pagination.tsx +114 -83
  196. package/src/components/ui/popover.stories.tsx +19 -0
  197. package/src/components/ui/popover.test.tsx +14 -0
  198. package/src/components/ui/popover.tsx +68 -33
  199. package/src/components/ui/progress.stories.tsx +19 -0
  200. package/src/components/ui/progress.test.tsx +14 -0
  201. package/src/components/ui/progress.tsx +67 -15
  202. package/src/components/ui/questionnaire.stories.tsx +19 -0
  203. package/src/components/ui/questionnaire.test.tsx +14 -0
  204. package/src/components/ui/questionnaire.tsx +324 -0
  205. package/src/components/ui/radio-group.stories.tsx +19 -0
  206. package/src/components/ui/radio-group.test.tsx +14 -0
  207. package/src/components/ui/radio-group.tsx +15 -20
  208. package/src/components/ui/resizable.stories.tsx +19 -0
  209. package/src/components/ui/resizable.test.tsx +14 -0
  210. package/src/components/ui/resizable.tsx +37 -30
  211. package/src/components/ui/scroll-area.stories.tsx +19 -0
  212. package/src/components/ui/scroll-area.test.tsx +14 -0
  213. package/src/components/ui/scroll-area.tsx +41 -19
  214. package/src/components/ui/select.stories.tsx +19 -0
  215. package/src/components/ui/select.test.tsx +14 -0
  216. package/src/components/ui/select.tsx +145 -78
  217. package/src/components/ui/separator.stories.tsx +19 -0
  218. package/src/components/ui/separator.test.tsx +14 -0
  219. package/src/components/ui/separator.tsx +8 -11
  220. package/src/components/ui/sheet.stories.tsx +19 -0
  221. package/src/components/ui/sheet.test.tsx +14 -0
  222. package/src/components/ui/sheet.tsx +56 -71
  223. package/src/components/ui/sidebar.stories.tsx +18 -0
  224. package/src/components/ui/sidebar.test.tsx +13 -0
  225. package/src/components/ui/sidebar.tsx +469 -513
  226. package/src/components/ui/skeleton.stories.tsx +19 -0
  227. package/src/components/ui/skeleton.test.tsx +14 -0
  228. package/src/components/ui/skeleton.tsx +8 -114
  229. package/src/components/ui/slider.stories.tsx +19 -0
  230. package/src/components/ui/slider.test.tsx +14 -0
  231. package/src/components/ui/slider.tsx +31 -40
  232. package/src/components/ui/sonner.stories.tsx +19 -0
  233. package/src/components/ui/sonner.test.tsx +14 -0
  234. package/src/components/ui/sonner.tsx +39 -7
  235. package/src/components/ui/spinner.stories.tsx +18 -0
  236. package/src/components/ui/spinner.test.tsx +13 -0
  237. package/src/components/ui/spinner.tsx +3 -7
  238. package/src/components/ui/switch.stories.tsx +19 -0
  239. package/src/components/ui/switch.test.tsx +14 -0
  240. package/src/components/ui/switch.tsx +4 -7
  241. package/src/components/ui/table.stories.tsx +19 -0
  242. package/src/components/ui/table.test.tsx +14 -0
  243. package/src/components/ui/table.tsx +17 -17
  244. package/src/components/ui/tabs.stories.tsx +19 -0
  245. package/src/components/ui/tabs.test.tsx +14 -0
  246. package/src/components/ui/tabs.tsx +71 -31
  247. package/src/components/ui/textarea.stories.tsx +19 -0
  248. package/src/components/ui/textarea.test.tsx +14 -0
  249. package/src/components/ui/textarea.tsx +7 -5
  250. package/src/components/ui/theme-toggle.stories.tsx +18 -0
  251. package/src/components/ui/theme-toggle.test.tsx +13 -0
  252. package/src/components/ui/theme-toggle.tsx +35 -37
  253. package/src/components/ui/toggle-group.stories.tsx +19 -0
  254. package/src/components/ui/toggle-group.test.tsx +14 -0
  255. package/src/components/ui/toggle-group.tsx +41 -25
  256. package/src/components/ui/toggle.stories.tsx +19 -0
  257. package/src/components/ui/toggle.test.tsx +14 -0
  258. package/src/components/ui/toggle.tsx +17 -19
  259. package/src/components/ui/tooltip.stories.tsx +19 -0
  260. package/src/components/ui/tooltip.test.tsx +14 -0
  261. package/src/components/ui/tooltip.tsx +53 -44
  262. package/src/demo/AIDemo.tsx +50 -0
  263. package/src/demo/ButtonsDemo.tsx +41 -18
  264. package/src/demo/CalendarDemo.tsx +1 -1
  265. package/src/demo/FeedbackDemo.tsx +4 -6
  266. package/src/demo/FormsDemo.tsx +34 -11
  267. package/src/demo/NavigationDemo.tsx +38 -13
  268. package/src/demo/OverlaysDemo.tsx +22 -36
  269. package/src/demo/update-demos.js +82 -0
  270. package/src/index.css +66 -46
  271. package/src/lib/utils.ts +3 -3
  272. package/src/stories/Button.stories.ts +54 -0
  273. package/src/stories/Button.tsx +36 -0
  274. package/src/stories/Configure.mdx +388 -0
  275. package/src/stories/Header.stories.ts +34 -0
  276. package/src/stories/Header.tsx +55 -0
  277. package/src/stories/Page.stories.ts +33 -0
  278. package/src/stories/Page.tsx +73 -0
  279. package/src/stories/assets/accessibility.png +0 -0
  280. package/src/stories/assets/accessibility.svg +1 -0
  281. package/src/stories/assets/addon-library.png +0 -0
  282. package/src/stories/assets/assets.png +0 -0
  283. package/src/stories/assets/avif-test-image.avif +0 -0
  284. package/src/stories/assets/context.png +0 -0
  285. package/src/stories/assets/discord.svg +1 -0
  286. package/src/stories/assets/docs.png +0 -0
  287. package/src/stories/assets/figma-plugin.png +0 -0
  288. package/src/stories/assets/github.svg +1 -0
  289. package/src/stories/assets/share.png +0 -0
  290. package/src/stories/assets/styling.png +0 -0
  291. package/src/stories/assets/testing.png +0 -0
  292. package/src/stories/assets/theming.png +0 -0
  293. package/src/stories/assets/tutorials.svg +1 -0
  294. package/src/stories/assets/youtube.svg +1 -0
  295. package/src/stories/button.css +30 -0
  296. package/src/stories/header.css +32 -0
  297. package/src/stories/page.css +68 -0
@@ -1,124 +1,137 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../lib/utils.js";
3
- import "react";
4
- import { CheckIcon as t, ChevronRightIcon as n, CircleIcon as r } from "lucide-react";
5
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
- import * as o from "@radix-ui/react-dropdown-menu";
3
+ import { CheckIcon as t, ChevronRightIcon as n } from "lucide-react";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ import * as a from "react";
6
+ import { Menu as o } from "@base-ui/react/menu";
7
7
  //#region src/components/ui/dropdown-menu.tsx
8
8
  function s({ ...e }) {
9
- return /* @__PURE__ */ i(o.Root, {
9
+ return /* @__PURE__ */ r(o.Root, {
10
10
  "data-slot": "dropdown-menu",
11
11
  ...e
12
12
  });
13
13
  }
14
14
  function c({ ...e }) {
15
- return /* @__PURE__ */ i(o.Portal, {
15
+ return /* @__PURE__ */ r(o.Portal, {
16
16
  "data-slot": "dropdown-menu-portal",
17
17
  ...e
18
18
  });
19
19
  }
20
- function l({ className: t, ...n }) {
21
- return /* @__PURE__ */ i(o.Trigger, {
22
- "data-slot": "dropdown-menu-trigger",
23
- className: e("cursor-pointer", t),
24
- ...n
25
- });
26
- }
27
- function u({ className: t, sideOffset: n = 4, ...r }) {
28
- return /* @__PURE__ */ i(o.Portal, { children: /* @__PURE__ */ i(o.Content, {
20
+ var l = a.forwardRef(({ ...e }, t) => /* @__PURE__ */ r(o.Trigger, {
21
+ ref: t,
22
+ "data-slot": "dropdown-menu-trigger",
23
+ ...e
24
+ }));
25
+ l.displayName = "DropdownMenuTrigger";
26
+ var u = a.forwardRef(({ align: t = "start", alignOffset: n = 0, side: i = "bottom", sideOffset: a = 4, className: s, ...c }, l) => /* @__PURE__ */ r(o.Portal, { children: /* @__PURE__ */ r(o.Positioner, {
27
+ className: "isolate z-50 outline-none",
28
+ align: t,
29
+ alignOffset: n,
30
+ side: i,
31
+ sideOffset: a,
32
+ children: /* @__PURE__ */ r(o.Popup, {
33
+ ref: l,
29
34
  "data-slot": "dropdown-menu-content",
30
- sideOffset: n,
31
- className: e("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", t),
32
- ...r
33
- }) });
34
- }
35
+ className: e("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95", s),
36
+ ...c
37
+ })
38
+ }) }));
39
+ u.displayName = "DropdownMenuContent";
35
40
  function d({ ...e }) {
36
- return /* @__PURE__ */ i(o.Group, {
41
+ return /* @__PURE__ */ r(o.Group, {
37
42
  "data-slot": "dropdown-menu-group",
38
43
  ...e
39
44
  });
40
45
  }
41
- function f({ className: t, inset: n, variant: r = "default", ...a }) {
42
- return /* @__PURE__ */ i(o.Item, {
43
- "data-slot": "dropdown-menu-item",
46
+ function f({ className: t, inset: n, ...i }) {
47
+ return /* @__PURE__ */ r(o.GroupLabel, {
48
+ "data-slot": "dropdown-menu-label",
44
49
  "data-inset": n,
45
- "data-variant": r,
46
- className: e("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
47
- ...a
48
- });
49
- }
50
- function p({ className: n, children: r, checked: s, ...c }) {
51
- return /* @__PURE__ */ a(o.CheckboxItem, {
52
- "data-slot": "dropdown-menu-checkbox-item",
53
- className: e("focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", n),
54
- checked: s,
55
- ...c,
56
- children: [/* @__PURE__ */ i("span", {
57
- className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
58
- children: /* @__PURE__ */ i(o.ItemIndicator, { children: /* @__PURE__ */ i(t, { className: "size-4" }) })
59
- }), r]
50
+ className: e("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7", t),
51
+ ...i
60
52
  });
61
53
  }
54
+ var p = a.forwardRef(({ className: t, inset: n, variant: i = "default", ...a }, s) => /* @__PURE__ */ r(o.Item, {
55
+ ref: s,
56
+ "data-slot": "dropdown-menu-item",
57
+ "data-inset": n,
58
+ "data-variant": i,
59
+ className: e("group/dropdown-menu-item relative flex cursor-pointer items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive", t),
60
+ ...a
61
+ }));
62
+ p.displayName = "DropdownMenuItem";
62
63
  function m({ ...e }) {
63
- return /* @__PURE__ */ i(o.RadioGroup, {
64
- "data-slot": "dropdown-menu-radio-group",
64
+ return /* @__PURE__ */ r(o.SubmenuRoot, {
65
+ "data-slot": "dropdown-menu-sub",
65
66
  ...e
66
67
  });
67
68
  }
68
- function h({ className: t, children: n, ...s }) {
69
- return /* @__PURE__ */ a(o.RadioItem, {
70
- "data-slot": "dropdown-menu-radio-item",
71
- className: e("focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
72
- ...s,
73
- children: [/* @__PURE__ */ i("span", {
74
- className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
75
- children: /* @__PURE__ */ i(o.ItemIndicator, { children: /* @__PURE__ */ i(r, { className: "size-2 fill-current" }) })
76
- }), n]
77
- });
78
- }
79
- function g({ className: t, inset: n, ...r }) {
80
- return /* @__PURE__ */ i(o.Label, {
81
- "data-slot": "dropdown-menu-label",
82
- "data-inset": n,
83
- className: e("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", t),
84
- ...r
69
+ var h = a.forwardRef(({ className: t, inset: a, children: s, ...c }, l) => /* @__PURE__ */ i(o.SubmenuTrigger, {
70
+ ref: l,
71
+ "data-slot": "dropdown-menu-sub-trigger",
72
+ "data-inset": a,
73
+ className: e("flex cursor-pointer items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
74
+ ...c,
75
+ children: [s, /* @__PURE__ */ r(n, { className: "ml-auto" })]
76
+ }));
77
+ h.displayName = "DropdownMenuSubTrigger";
78
+ var g = a.forwardRef(({ align: t = "start", alignOffset: n = -3, side: i = "right", sideOffset: a = 0, className: o, ...s }, c) => /* @__PURE__ */ r(u, {
79
+ ref: c,
80
+ "data-slot": "dropdown-menu-sub-content",
81
+ className: e("w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", o),
82
+ align: t,
83
+ alignOffset: n,
84
+ side: i,
85
+ sideOffset: a,
86
+ ...s
87
+ }));
88
+ g.displayName = "DropdownMenuSubContent";
89
+ var _ = a.forwardRef(({ className: n, children: a, checked: s, inset: c, ...l }, u) => /* @__PURE__ */ i(o.CheckboxItem, {
90
+ ref: u,
91
+ "data-slot": "dropdown-menu-checkbox-item",
92
+ "data-inset": c,
93
+ className: e("relative flex cursor-pointer items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", n),
94
+ checked: s,
95
+ ...l,
96
+ children: [/* @__PURE__ */ r("span", {
97
+ className: "pointer-events-none absolute right-2 flex items-center justify-center",
98
+ "data-slot": "dropdown-menu-checkbox-item-indicator",
99
+ children: /* @__PURE__ */ r(o.CheckboxItemIndicator, { children: /* @__PURE__ */ r(t, {}) })
100
+ }), a]
101
+ }));
102
+ _.displayName = "DropdownMenuCheckboxItem";
103
+ function v({ ...e }) {
104
+ return /* @__PURE__ */ r(o.RadioGroup, {
105
+ "data-slot": "dropdown-menu-radio-group",
106
+ ...e
85
107
  });
86
108
  }
87
- function _({ className: t, ...n }) {
88
- return /* @__PURE__ */ i(o.Separator, {
109
+ var y = a.forwardRef(({ className: n, children: a, inset: s, ...c }, l) => /* @__PURE__ */ i(o.RadioItem, {
110
+ ref: l,
111
+ "data-slot": "dropdown-menu-radio-item",
112
+ "data-inset": s,
113
+ className: e("relative flex cursor-pointer items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", n),
114
+ ...c,
115
+ children: [/* @__PURE__ */ r("span", {
116
+ className: "pointer-events-none absolute right-2 flex items-center justify-center",
117
+ "data-slot": "dropdown-menu-radio-item-indicator",
118
+ children: /* @__PURE__ */ r(o.RadioItemIndicator, { children: /* @__PURE__ */ r(t, {}) })
119
+ }), a]
120
+ }));
121
+ y.displayName = "DropdownMenuRadioItem";
122
+ function b({ className: t, ...n }) {
123
+ return /* @__PURE__ */ r(o.Separator, {
89
124
  "data-slot": "dropdown-menu-separator",
90
- className: e("bg-border -mx-1 my-1 h-px", t),
125
+ className: e("-mx-1 my-1 h-px bg-border", t),
91
126
  ...n
92
127
  });
93
128
  }
94
- function v({ className: t, ...n }) {
95
- return /* @__PURE__ */ i("span", {
96
- "data-slot": "dropdown-menu-shortcut",
97
- className: e("text-muted-foreground ml-auto text-xs tracking-widest", t),
98
- ...n
99
- });
100
- }
101
- function y({ ...e }) {
102
- return /* @__PURE__ */ i(o.Sub, {
103
- "data-slot": "dropdown-menu-sub",
104
- ...e
105
- });
106
- }
107
- function b({ className: t, inset: r, children: s, ...c }) {
108
- return /* @__PURE__ */ a(o.SubTrigger, {
109
- "data-slot": "dropdown-menu-sub-trigger",
110
- "data-inset": r,
111
- className: e("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-pointer items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8", t),
112
- ...c,
113
- children: [s, /* @__PURE__ */ i(n, { className: "ml-auto size-4" })]
114
- });
115
- }
116
129
  function x({ className: t, ...n }) {
117
- return /* @__PURE__ */ i(o.SubContent, {
118
- "data-slot": "dropdown-menu-sub-content",
119
- className: e("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", t),
130
+ return /* @__PURE__ */ r("span", {
131
+ "data-slot": "dropdown-menu-shortcut",
132
+ className: e("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground", t),
120
133
  ...n
121
134
  });
122
135
  }
123
136
  //#endregion
124
- export { s as DropdownMenu, p as DropdownMenuCheckboxItem, u as DropdownMenuContent, d as DropdownMenuGroup, f as DropdownMenuItem, g as DropdownMenuLabel, c as DropdownMenuPortal, m as DropdownMenuRadioGroup, h as DropdownMenuRadioItem, _ as DropdownMenuSeparator, v as DropdownMenuShortcut, y as DropdownMenuSub, x as DropdownMenuSubContent, b as DropdownMenuSubTrigger, l as DropdownMenuTrigger };
137
+ export { s as DropdownMenu, _ as DropdownMenuCheckboxItem, u as DropdownMenuContent, d as DropdownMenuGroup, p as DropdownMenuItem, f as DropdownMenuLabel, c as DropdownMenuPortal, v as DropdownMenuRadioGroup, y as DropdownMenuRadioItem, b as DropdownMenuSeparator, x as DropdownMenuShortcut, m as DropdownMenuSub, g as DropdownMenuSubContent, h as DropdownMenuSubTrigger, l as DropdownMenuTrigger };
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { cn as e } from "../../lib/utils.js";
2
3
  import { jsx as t } from "react/jsx-runtime";
3
4
  import { cva as n } from "class-variance-authority";
@@ -5,21 +6,21 @@ import { cva as n } from "class-variance-authority";
5
6
  function r({ className: n, ...r }) {
6
7
  return /* @__PURE__ */ t("div", {
7
8
  "data-slot": "empty",
8
- className: e("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 text-balance rounded-lg border-dashed p-6 text-center md:p-12", n),
9
+ className: e("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance", n),
9
10
  ...r
10
11
  });
11
12
  }
12
13
  function i({ className: n, ...r }) {
13
14
  return /* @__PURE__ */ t("div", {
14
15
  "data-slot": "empty-header",
15
- className: e("flex max-w-sm flex-col items-center gap-2 text-center", n),
16
+ className: e("flex max-w-sm flex-col items-center gap-2", n),
16
17
  ...r
17
18
  });
18
19
  }
19
20
  var a = n("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
20
21
  variants: { variant: {
21
22
  default: "bg-transparent",
22
- icon: "bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6"
23
+ icon: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"
23
24
  } },
24
25
  defaultVariants: { variant: "default" }
25
26
  });
@@ -37,21 +38,21 @@ function o({ className: n, variant: r = "default", ...i }) {
37
38
  function s({ className: n, ...r }) {
38
39
  return /* @__PURE__ */ t("div", {
39
40
  "data-slot": "empty-title",
40
- className: e("text-lg font-medium tracking-tight", n),
41
+ className: e("font-heading text-sm font-medium tracking-tight", n),
41
42
  ...r
42
43
  });
43
44
  }
44
45
  function c({ className: n, ...r }) {
45
46
  return /* @__PURE__ */ t("div", {
46
47
  "data-slot": "empty-description",
47
- className: e("text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4", n),
48
+ className: e("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", n),
48
49
  ...r
49
50
  });
50
51
  }
51
52
  function l({ className: n, ...r }) {
52
53
  return /* @__PURE__ */ t("div", {
53
54
  "data-slot": "empty-content",
54
- className: e("flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm", n),
55
+ className: e("flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance", n),
55
56
  ...r
56
57
  });
57
58
  }
@@ -2,107 +2,104 @@
2
2
  import { cn as e } from "../../lib/utils.js";
3
3
  import { Separator as t } from "./separator.js";
4
4
  import { Label as n } from "./label.js";
5
- import { useMemo as r } from "react";
6
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
6
+ import { useMemo as a } from "react";
7
7
  import { cva as o } from "class-variance-authority";
8
8
  //#region src/components/ui/field.tsx
9
9
  function s({ className: t, ...n }) {
10
- return /* @__PURE__ */ i("fieldset", {
10
+ return /* @__PURE__ */ r("fieldset", {
11
11
  "data-slot": "field-set",
12
- className: e("flex flex-col gap-6", "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", t),
12
+ className: e("flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", t),
13
13
  ...n
14
14
  });
15
15
  }
16
- function c({ className: t, variant: n = "legend", ...r }) {
17
- return /* @__PURE__ */ i("legend", {
16
+ function c({ className: t, variant: n = "legend", ...i }) {
17
+ return /* @__PURE__ */ r("legend", {
18
18
  "data-slot": "field-legend",
19
19
  "data-variant": n,
20
- className: e("mb-3 font-medium", "data-[variant=legend]:text-base", "data-[variant=label]:text-sm", t),
21
- ...r
20
+ className: e("mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base", t),
21
+ ...i
22
22
  });
23
23
  }
24
24
  function l({ className: t, ...n }) {
25
- return /* @__PURE__ */ i("div", {
25
+ return /* @__PURE__ */ r("div", {
26
26
  "data-slot": "field-group",
27
- className: e("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4", t),
27
+ className: e("group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4", t),
28
28
  ...n
29
29
  });
30
30
  }
31
- var u = o("group/field data-[invalid=true]:text-destructive flex w-full gap-3", {
31
+ var u = o("group/field flex w-full gap-2 data-[invalid=true]:text-destructive", {
32
32
  variants: { orientation: {
33
- vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
34
- horizontal: [
35
- "flex-row items-center",
36
- "[&>[data-slot=field-label]]:flex-auto",
37
- "has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px has-[>[data-slot=field-content]]:items-start"
38
- ],
39
- responsive: [
40
- "@md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto flex-col [&>*]:w-full [&>.sr-only]:w-auto",
41
- "@md/field-group:[&>[data-slot=field-label]]:flex-auto",
42
- "@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
43
- ]
33
+ vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
34
+ horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
35
+ responsive: "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
44
36
  } },
45
37
  defaultVariants: { orientation: "vertical" }
46
38
  });
47
- function d({ className: t, orientation: n = "vertical", ...r }) {
48
- return /* @__PURE__ */ i("div", {
39
+ function d({ className: t, orientation: n = "vertical", ...i }) {
40
+ return /* @__PURE__ */ r("div", {
49
41
  role: "group",
50
42
  "data-slot": "field",
51
43
  "data-orientation": n,
52
44
  className: e(u({ orientation: n }), t),
53
- ...r
45
+ ...i
54
46
  });
55
47
  }
56
48
  function f({ className: t, ...n }) {
57
- return /* @__PURE__ */ i("div", {
49
+ return /* @__PURE__ */ r("div", {
58
50
  "data-slot": "field-content",
59
- className: e("group/field-content flex flex-1 flex-col gap-1.5 leading-snug", t),
51
+ className: e("group/field-content flex flex-1 flex-col gap-0.5 leading-snug", t),
60
52
  ...n
61
53
  });
62
54
  }
63
- function p({ className: t, ...r }) {
64
- return /* @__PURE__ */ i(n, {
55
+ function p({ className: t, ...i }) {
56
+ return /* @__PURE__ */ r(n, {
65
57
  "data-slot": "field-label",
66
- className: e("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>[data-slot=field]]:p-4", "has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10", t),
67
- ...r
58
+ className: e("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", t),
59
+ ...i
68
60
  });
69
61
  }
70
62
  function m({ className: t, ...n }) {
71
- return /* @__PURE__ */ i("div", {
63
+ return /* @__PURE__ */ r("div", {
72
64
  "data-slot": "field-label",
73
- className: e("flex w-fit items-center gap-2 text-sm font-medium leading-snug group-data-[disabled=true]/field:opacity-50", t),
65
+ className: e("flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50", t),
74
66
  ...n
75
67
  });
76
68
  }
77
69
  function h({ className: t, ...n }) {
78
- return /* @__PURE__ */ i("p", {
70
+ return /* @__PURE__ */ r("p", {
79
71
  "data-slot": "field-description",
80
- className: e("text-muted-foreground text-sm font-normal leading-normal group-has-[[data-orientation=horizontal]]/field:text-balance", "nth-last-2:-mt-1 last:mt-0 [[data-variant=legend]+&]:-mt-1.5", "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4", t),
72
+ className: e("text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5", "last:mt-0 nth-last-2:-mt-1", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", t),
81
73
  ...n
82
74
  });
83
75
  }
84
- function g({ children: n, className: r, ...o }) {
85
- return /* @__PURE__ */ a("div", {
76
+ function g({ children: n, className: a, ...o }) {
77
+ return /* @__PURE__ */ i("div", {
86
78
  "data-slot": "field-separator",
87
79
  "data-content": !!n,
88
- className: e("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", r),
80
+ className: e("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", a),
89
81
  ...o,
90
- children: [/* @__PURE__ */ i(t, { className: "absolute inset-0 top-1/2" }), n && /* @__PURE__ */ i("span", {
91
- className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
82
+ children: [/* @__PURE__ */ r(t, { className: "absolute inset-0 top-1/2" }), n && /* @__PURE__ */ r("span", {
83
+ className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
92
84
  "data-slot": "field-separator-content",
93
85
  children: n
94
86
  })]
95
87
  });
96
88
  }
97
- function _({ className: t, children: n, errors: a, ...o }) {
98
- let s = r(() => n || (a ? a?.length === 1 && a[0]?.message ? a[0].message : /* @__PURE__ */ i("ul", {
99
- className: "ml-4 flex list-disc flex-col gap-1",
100
- children: a.map((e, t) => e?.message && /* @__PURE__ */ i("li", { children: e.message }, t))
101
- }) : null), [n, a]);
102
- return s ? /* @__PURE__ */ i("div", {
89
+ function _({ className: t, children: n, errors: i, ...o }) {
90
+ let s = a(() => {
91
+ if (n) return n;
92
+ if (!i?.length) return null;
93
+ let e = [...new Map(i.map((e) => [e?.message, e])).values()];
94
+ return e?.length == 1 ? e[0]?.message : /* @__PURE__ */ r("ul", {
95
+ className: "ml-4 flex list-disc flex-col gap-1",
96
+ children: e.map((e, t) => e?.message && /* @__PURE__ */ r("li", { children: e.message }, t))
97
+ });
98
+ }, [n, i]);
99
+ return s ? /* @__PURE__ */ r("div", {
103
100
  role: "alert",
104
101
  "data-slot": "field-error",
105
- className: e("text-destructive text-sm font-normal", t),
102
+ className: e("text-sm font-normal text-destructive", t),
106
103
  ...o,
107
104
  children: s
108
105
  }) : null;
@@ -1,17 +1,16 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../lib/utils.js";
3
3
  import { Label as t } from "./label.js";
4
- import * as n from "react";
5
- import { jsx as r } from "react/jsx-runtime";
4
+ import { jsx as n } from "react/jsx-runtime";
5
+ import * as r from "react";
6
6
  import { Slot as i } from "@radix-ui/react-slot";
7
- import "@radix-ui/react-label";
8
7
  import { Controller as a, FormProvider as o, useFormContext as s, useFormState as c } from "react-hook-form";
9
8
  //#region src/components/ui/form.tsx
10
- var l = o, u = n.createContext({}), d = ({ ...e }) => /* @__PURE__ */ r(u.Provider, {
9
+ var l = o, u = r.createContext({}), d = ({ ...e }) => /* @__PURE__ */ n(u.Provider, {
11
10
  value: { name: e.name },
12
- children: /* @__PURE__ */ r(a, { ...e })
11
+ children: /* @__PURE__ */ n(a, { ...e })
13
12
  }), f = () => {
14
- let e = n.useContext(u), t = n.useContext(p), { getFieldState: r } = s(), i = c({ name: e.name }), a = r(e.name, i);
13
+ let e = r.useContext(u), t = r.useContext(p), { getFieldState: n } = s(), i = c({ name: e.name }), a = n(e.name, i);
15
14
  if (!e) throw Error("useFormField should be used within <FormField>");
16
15
  let { id: o } = t;
17
16
  return {
@@ -22,54 +21,54 @@ var l = o, u = n.createContext({}), d = ({ ...e }) => /* @__PURE__ */ r(u.Provid
22
21
  formMessageId: `${o}-form-item-message`,
23
22
  ...a
24
23
  };
25
- }, p = n.createContext({});
24
+ }, p = r.createContext({});
26
25
  function m({ className: t, ...i }) {
27
- let a = n.useId();
28
- return /* @__PURE__ */ r(p.Provider, {
26
+ let a = r.useId();
27
+ return /* @__PURE__ */ n(p.Provider, {
29
28
  value: { id: a },
30
- children: /* @__PURE__ */ r("div", {
29
+ children: /* @__PURE__ */ n("div", {
31
30
  "data-slot": "form-item",
32
31
  className: e("grid gap-2", t),
33
32
  ...i
34
33
  })
35
34
  });
36
35
  }
37
- function h({ className: n, ...i }) {
36
+ function h({ className: r, ...i }) {
38
37
  let { error: a, formItemId: o } = f();
39
- return /* @__PURE__ */ r(t, {
38
+ return /* @__PURE__ */ n(t, {
40
39
  "data-slot": "form-label",
41
40
  "data-error": !!a,
42
- className: e("data-[error=true]:text-destructive", n),
41
+ className: e("data-[error=true]:text-destructive", r),
43
42
  htmlFor: o,
44
43
  ...i
45
44
  });
46
45
  }
47
46
  function g({ ...e }) {
48
- let { error: t, formItemId: n, formDescriptionId: a, formMessageId: o } = f();
49
- return /* @__PURE__ */ r(i, {
47
+ let { error: t, formItemId: r, formDescriptionId: a, formMessageId: o } = f();
48
+ return /* @__PURE__ */ n(i, {
50
49
  "data-slot": "form-control",
51
- id: n,
50
+ id: r,
52
51
  "aria-describedby": t ? `${a} ${o}` : `${a}`,
53
52
  "aria-invalid": !!t,
54
53
  ...e
55
54
  });
56
55
  }
57
- function _({ className: t, ...n }) {
56
+ function _({ className: t, ...r }) {
58
57
  let { formDescriptionId: i } = f();
59
- return /* @__PURE__ */ r("p", {
58
+ return /* @__PURE__ */ n("p", {
60
59
  "data-slot": "form-description",
61
60
  id: i,
62
61
  className: e("text-muted-foreground text-sm", t),
63
- ...n
62
+ ...r
64
63
  });
65
64
  }
66
- function v({ className: t, ...n }) {
67
- let { error: i, formMessageId: a } = f(), o = i ? String(i?.message ?? "") : n.children;
68
- return o ? /* @__PURE__ */ r("p", {
65
+ function v({ className: t, ...r }) {
66
+ let { error: i, formMessageId: a } = f(), o = i ? String(i?.message ?? "") : r.children;
67
+ return o ? /* @__PURE__ */ n("p", {
69
68
  "data-slot": "form-message",
70
69
  id: a,
71
70
  className: e("text-destructive text-sm", t),
72
- ...n,
71
+ ...r,
73
72
  children: o
74
73
  }) : null;
75
74
  }
@@ -1,8 +1,7 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../lib/utils.js";
3
- import "react";
4
3
  import { jsx as t } from "react/jsx-runtime";
5
- import * as n from "@radix-ui/react-hover-card";
4
+ import { PreviewCard as n } from "@base-ui/react/preview-card";
6
5
  //#region src/components/ui/hover-card.tsx
7
6
  function r({ ...e }) {
8
7
  return /* @__PURE__ */ t(n.Root, {
@@ -10,22 +9,26 @@ function r({ ...e }) {
10
9
  ...e
11
10
  });
12
11
  }
13
- function i({ className: r, ...i }) {
12
+ function i({ ...e }) {
14
13
  return /* @__PURE__ */ t(n.Trigger, {
15
14
  "data-slot": "hover-card-trigger",
16
- className: e("cursor-pointer", r),
17
- ...i
15
+ ...e
18
16
  });
19
17
  }
20
- function a({ className: r, align: i = "center", sideOffset: a = 4, ...o }) {
18
+ function a({ className: r, side: i = "bottom", sideOffset: a = 4, align: o = "center", alignOffset: s = 4, ...c }) {
21
19
  return /* @__PURE__ */ t(n.Portal, {
22
20
  "data-slot": "hover-card-portal",
23
- children: /* @__PURE__ */ t(n.Content, {
24
- "data-slot": "hover-card-content",
25
- align: i,
21
+ children: /* @__PURE__ */ t(n.Positioner, {
22
+ align: o,
23
+ alignOffset: s,
24
+ side: i,
26
25
  sideOffset: a,
27
- className: e("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", r),
28
- ...o
26
+ className: "isolate z-50",
27
+ children: /* @__PURE__ */ t(n.Popup, {
28
+ "data-slot": "hover-card-content",
29
+ className: e("z-50 w-64 origin-(--transform-origin) rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", r),
30
+ ...c
31
+ })
29
32
  })
30
33
  });
31
34
  }