@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,72 +1,133 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../lib/utils.js";
3
- import * as t from "react";
4
- import { Check as n, ChevronRight as r, Circle as i } from "lucide-react";
5
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
- import * as s from "@radix-ui/react-context-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 "react";
6
+ import { ContextMenu as a } from "@base-ui/react/context-menu";
7
7
  //#region src/components/ui/context-menu.tsx
8
- var c = s.Root, l = s.Trigger, u = s.Group, d = s.Portal, f = s.Sub, p = s.RadioGroup, m = t.forwardRef(({ className: t, inset: n, children: i, ...c }, l) => /* @__PURE__ */ o(s.SubTrigger, {
9
- ref: l,
10
- className: e("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", n && "pl-8", t),
11
- ...c,
12
- children: [i, /* @__PURE__ */ a(r, { className: "ml-auto h-4 w-4" })]
13
- }));
14
- m.displayName = s.SubTrigger.displayName;
15
- var h = t.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ a(s.SubContent, {
16
- ref: r,
17
- className: e("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 origin-[--radix-context-menu-content-transform-origin]", t),
18
- ...n
19
- }));
20
- h.displayName = s.SubContent.displayName;
21
- var g = t.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ a(s.Portal, { children: /* @__PURE__ */ a(s.Content, {
22
- ref: r,
23
- className: e("z-50 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 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 origin-[--radix-context-menu-content-transform-origin]", t),
24
- ...n
25
- }) }));
26
- g.displayName = s.Content.displayName;
27
- var _ = t.forwardRef(({ className: t, inset: n, ...r }, i) => /* @__PURE__ */ a(s.Item, {
28
- ref: i,
29
- className: e("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", n && "pl-8", t),
30
- ...r
31
- }));
32
- _.displayName = s.Item.displayName;
33
- var v = t.forwardRef(({ className: t, children: r, checked: i, ...c }, l) => /* @__PURE__ */ o(s.CheckboxItem, {
34
- ref: l,
35
- className: e("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", t),
36
- checked: i,
37
- ...c,
38
- children: [/* @__PURE__ */ a("span", {
39
- className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
40
- children: /* @__PURE__ */ a(s.ItemIndicator, { children: /* @__PURE__ */ a(n, { className: "h-4 w-4" }) })
41
- }), r]
42
- }));
43
- v.displayName = s.CheckboxItem.displayName;
44
- var y = t.forwardRef(({ className: t, children: n, ...r }, c) => /* @__PURE__ */ o(s.RadioItem, {
45
- ref: c,
46
- className: e("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", t),
47
- ...r,
48
- children: [/* @__PURE__ */ a("span", {
49
- className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
50
- children: /* @__PURE__ */ a(s.ItemIndicator, { children: /* @__PURE__ */ a(i, { className: "h-2 w-2 fill-current" }) })
51
- }), n]
52
- }));
53
- y.displayName = s.RadioItem.displayName;
54
- var b = t.forwardRef(({ className: t, inset: n, ...r }, i) => /* @__PURE__ */ a(s.Label, {
55
- ref: i,
56
- className: e("px-2 py-1.5 text-sm font-semibold text-foreground", n && "pl-8", t),
57
- ...r
58
- }));
59
- b.displayName = s.Label.displayName;
60
- var x = t.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ a(s.Separator, {
61
- ref: r,
62
- className: e("-mx-1 my-1 h-px bg-border", t),
63
- ...n
64
- }));
65
- x.displayName = s.Separator.displayName;
66
- var S = ({ className: t, ...n }) => /* @__PURE__ */ a("span", {
67
- className: e("ml-auto text-xs tracking-widest text-muted-foreground", t),
68
- ...n
69
- });
70
- S.displayName = "ContextMenuShortcut";
8
+ function o({ ...e }) {
9
+ return /* @__PURE__ */ r(a.Root, {
10
+ "data-slot": "context-menu",
11
+ ...e
12
+ });
13
+ }
14
+ function s({ ...e }) {
15
+ return /* @__PURE__ */ r(a.Portal, {
16
+ "data-slot": "context-menu-portal",
17
+ ...e
18
+ });
19
+ }
20
+ function c({ className: t, ...n }) {
21
+ return /* @__PURE__ */ r(a.Trigger, {
22
+ "data-slot": "context-menu-trigger",
23
+ className: e("select-none", t),
24
+ ...n
25
+ });
26
+ }
27
+ function l({ className: t, align: n = "start", alignOffset: i = 4, side: o = "right", sideOffset: s = 0, ...c }) {
28
+ return /* @__PURE__ */ r(a.Portal, { children: /* @__PURE__ */ r(a.Positioner, {
29
+ className: "isolate z-50 outline-none",
30
+ align: n,
31
+ alignOffset: i,
32
+ side: o,
33
+ sideOffset: s,
34
+ children: /* @__PURE__ */ r(a.Popup, {
35
+ "data-slot": "context-menu-content",
36
+ className: e("z-50 max-h-(--available-height) min-w-36 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:fade-out-0 data-closed:zoom-out-95", t),
37
+ ...c
38
+ })
39
+ }) });
40
+ }
41
+ function u({ ...e }) {
42
+ return /* @__PURE__ */ r(a.Group, {
43
+ "data-slot": "context-menu-group",
44
+ ...e
45
+ });
46
+ }
47
+ function d({ className: t, inset: n, ...i }) {
48
+ return /* @__PURE__ */ r(a.GroupLabel, {
49
+ "data-slot": "context-menu-label",
50
+ "data-inset": n,
51
+ className: e("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7", t),
52
+ ...i
53
+ });
54
+ }
55
+ function f({ className: t, inset: n, variant: i = "default", ...o }) {
56
+ return /* @__PURE__ */ r(a.Item, {
57
+ "data-slot": "context-menu-item",
58
+ "data-inset": n,
59
+ "data-variant": i,
60
+ className: e("group/context-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 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 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive", t),
61
+ ...o
62
+ });
63
+ }
64
+ function p({ ...e }) {
65
+ return /* @__PURE__ */ r(a.SubmenuRoot, {
66
+ "data-slot": "context-menu-sub",
67
+ ...e
68
+ });
69
+ }
70
+ function m({ className: t, inset: o, children: s, ...c }) {
71
+ return /* @__PURE__ */ i(a.SubmenuTrigger, {
72
+ "data-slot": "context-menu-sub-trigger",
73
+ "data-inset": o,
74
+ 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 data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
75
+ ...c,
76
+ children: [s, /* @__PURE__ */ r(n, { className: "ml-auto" })]
77
+ });
78
+ }
79
+ function h({ ...e }) {
80
+ return /* @__PURE__ */ r(l, {
81
+ "data-slot": "context-menu-sub-content",
82
+ className: "shadow-lg",
83
+ side: "right",
84
+ ...e
85
+ });
86
+ }
87
+ function g({ className: n, children: o, checked: s, inset: c, ...l }) {
88
+ return /* @__PURE__ */ i(a.CheckboxItem, {
89
+ "data-slot": "context-menu-checkbox-item",
90
+ "data-inset": c,
91
+ 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 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),
92
+ checked: s,
93
+ ...l,
94
+ children: [/* @__PURE__ */ r("span", {
95
+ className: "pointer-events-none absolute right-2",
96
+ children: /* @__PURE__ */ r(a.CheckboxItemIndicator, { children: /* @__PURE__ */ r(t, {}) })
97
+ }), o]
98
+ });
99
+ }
100
+ function _({ ...e }) {
101
+ return /* @__PURE__ */ r(a.RadioGroup, {
102
+ "data-slot": "context-menu-radio-group",
103
+ ...e
104
+ });
105
+ }
106
+ function v({ className: n, children: o, inset: s, ...c }) {
107
+ return /* @__PURE__ */ i(a.RadioItem, {
108
+ "data-slot": "context-menu-radio-item",
109
+ "data-inset": s,
110
+ 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 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),
111
+ ...c,
112
+ children: [/* @__PURE__ */ r("span", {
113
+ className: "pointer-events-none absolute right-2",
114
+ children: /* @__PURE__ */ r(a.RadioItemIndicator, { children: /* @__PURE__ */ r(t, {}) })
115
+ }), o]
116
+ });
117
+ }
118
+ function y({ className: t, ...n }) {
119
+ return /* @__PURE__ */ r(a.Separator, {
120
+ "data-slot": "context-menu-separator",
121
+ className: e("-mx-1 my-1 h-px bg-border", t),
122
+ ...n
123
+ });
124
+ }
125
+ function b({ className: t, ...n }) {
126
+ return /* @__PURE__ */ r("span", {
127
+ "data-slot": "context-menu-shortcut",
128
+ className: e("ml-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground", t),
129
+ ...n
130
+ });
131
+ }
71
132
  //#endregion
72
- export { c as ContextMenu, v as ContextMenuCheckboxItem, g as ContextMenuContent, u as ContextMenuGroup, _ as ContextMenuItem, b as ContextMenuLabel, d as ContextMenuPortal, p as ContextMenuRadioGroup, y as ContextMenuRadioItem, x as ContextMenuSeparator, S as ContextMenuShortcut, f as ContextMenuSub, h as ContextMenuSubContent, m as ContextMenuSubTrigger, l as ContextMenuTrigger };
133
+ export { o as ContextMenu, g as ContextMenuCheckboxItem, l as ContextMenuContent, u as ContextMenuGroup, f as ContextMenuItem, d as ContextMenuLabel, s as ContextMenuPortal, _ as ContextMenuRadioGroup, v as ContextMenuRadioItem, y as ContextMenuSeparator, b as ContextMenuShortcut, p as ContextMenuSub, h as ContextMenuSubContent, m as ContextMenuSubTrigger, c as ContextMenuTrigger };
@@ -1,88 +1,93 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../lib/utils.js";
3
- import "react";
4
- import { XIcon as t } from "lucide-react";
5
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
6
- import * as i from "@radix-ui/react-dialog";
3
+ import { Button as t } from "./button.js";
4
+ import { XIcon as n } from "lucide-react";
5
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
6
+ import * as a from "react";
7
+ import { Dialog as o } from "@base-ui/react/dialog";
7
8
  //#region src/components/ui/dialog.tsx
8
- function a({ ...e }) {
9
- return /* @__PURE__ */ n(i.Root, {
9
+ function s({ ...e }) {
10
+ return /* @__PURE__ */ r(o.Root, {
10
11
  "data-slot": "dialog",
11
12
  ...e
12
13
  });
13
14
  }
14
- function o({ className: t, ...r }) {
15
- return /* @__PURE__ */ n(i.Trigger, {
16
- "data-slot": "dialog-trigger",
17
- className: e("cursor-pointer", t),
18
- ...r
19
- });
20
- }
21
- function s({ ...e }) {
22
- return /* @__PURE__ */ n(i.Portal, {
15
+ var c = a.forwardRef(({ ...e }, t) => /* @__PURE__ */ r(o.Trigger, {
16
+ ref: t,
17
+ "data-slot": "dialog-trigger",
18
+ ...e
19
+ }));
20
+ c.displayName = "DialogTrigger";
21
+ function l({ ...e }) {
22
+ return /* @__PURE__ */ r(o.Portal, {
23
23
  "data-slot": "dialog-portal",
24
24
  ...e
25
25
  });
26
26
  }
27
- function c({ className: t, ...r }) {
28
- return /* @__PURE__ */ n(i.Close, {
29
- "data-slot": "dialog-close",
30
- className: e("cursor-pointer", t),
31
- ...r
32
- });
33
- }
34
- function l({ className: t, ...r }) {
35
- return /* @__PURE__ */ n(i.Overlay, {
27
+ var u = a.forwardRef(({ ...e }, t) => /* @__PURE__ */ r(o.Close, {
28
+ ref: t,
29
+ "data-slot": "dialog-close",
30
+ ...e
31
+ }));
32
+ u.displayName = "DialogClose";
33
+ function d({ className: t, ...n }) {
34
+ return /* @__PURE__ */ r(o.Backdrop, {
36
35
  "data-slot": "dialog-overlay",
37
- className: e("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", t),
38
- ...r
36
+ className: e("fixed inset-0 isolate z-50 bg-black/80 backdrop-blur-sm duration-200 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", t),
37
+ ...n
39
38
  });
40
39
  }
41
- function u({ className: a, children: o, showCloseButton: c = !0, ...u }) {
42
- return /* @__PURE__ */ r(s, {
43
- "data-slot": "dialog-portal",
44
- children: [/* @__PURE__ */ n(l, {}), /* @__PURE__ */ r(i.Content, {
45
- "data-slot": "dialog-content",
46
- className: e("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-border p-6 shadow-lg duration-200 sm:max-w-xl md:max-w-2xl lg:max-w-3xl", a),
47
- ...u,
48
- children: [o, c && /* @__PURE__ */ r(i.Close, {
49
- "data-slot": "dialog-close",
50
- className: "ring-offset-background cursor-pointer focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
51
- children: [/* @__PURE__ */ n(t, {}), /* @__PURE__ */ n("span", {
52
- className: "sr-only",
53
- children: "Close"
54
- })]
55
- })]
40
+ var f = a.forwardRef(({ className: a, children: s, showCloseButton: c = !0, ...u }, f) => /* @__PURE__ */ i(l, { children: [/* @__PURE__ */ r(d, {}), /* @__PURE__ */ i(o.Popup, {
41
+ ref: f,
42
+ "data-slot": "dialog-content",
43
+ className: e("fixed top-1/2 left-1/2 z-50 grid w-[90vw] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-2xl bg-popover/90 backdrop-blur-xl p-6 text-sm text-popover-foreground shadow-2xl ring-1 ring-border duration-200 outline-none 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", a),
44
+ ...u,
45
+ children: [s, c && /* @__PURE__ */ i(o.Close, {
46
+ "data-slot": "dialog-close",
47
+ render: /* @__PURE__ */ r(t, {
48
+ variant: "ghost",
49
+ className: "absolute top-4 right-4 rounded-full",
50
+ size: "icon-sm"
51
+ }),
52
+ children: [/* @__PURE__ */ r(n, {}), /* @__PURE__ */ r("span", {
53
+ className: "sr-only",
54
+ children: "Close"
56
55
  })]
57
- });
58
- }
59
- function d({ className: t, ...r }) {
60
- return /* @__PURE__ */ n("div", {
56
+ })]
57
+ })] }));
58
+ f.displayName = "DialogContent";
59
+ function p({ className: t, ...n }) {
60
+ return /* @__PURE__ */ r("div", {
61
61
  "data-slot": "dialog-header",
62
- className: e("flex flex-col gap-2 text-center sm:text-left", t),
63
- ...r
62
+ className: e("flex flex-col gap-2", t),
63
+ ...n
64
64
  });
65
65
  }
66
- function f({ className: t, ...r }) {
67
- return /* @__PURE__ */ n("div", {
66
+ function m({ className: n, showCloseButton: a = !1, children: s, ...c }) {
67
+ return /* @__PURE__ */ i("div", {
68
68
  "data-slot": "dialog-footer",
69
- className: e("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", t),
70
- ...r
69
+ className: e("flex flex-col-reverse gap-2 pt-2 sm:flex-row sm:justify-end", n),
70
+ ...c,
71
+ children: [s, a && /* @__PURE__ */ r(o.Close, {
72
+ render: /* @__PURE__ */ r(t, { variant: "outline" }),
73
+ children: "Close"
74
+ })]
71
75
  });
72
76
  }
73
- function p({ className: t, ...r }) {
74
- return /* @__PURE__ */ n(i.Title, {
77
+ function h({ className: t, ...n }) {
78
+ return /* @__PURE__ */ r(o.Title, {
75
79
  "data-slot": "dialog-title",
76
- className: e("text-lg leading-none font-semibold", t),
77
- ...r
80
+ className: e("font-heading text-base leading-none font-medium", t),
81
+ ...n
78
82
  });
79
83
  }
80
- function m({ className: t, ...r }) {
81
- return /* @__PURE__ */ n(i.Description, {
84
+ function g({ className: t, ...n }) {
85
+ return /* @__PURE__ */ r(o.Description, {
82
86
  "data-slot": "dialog-description",
83
- className: e("text-muted-foreground text-sm", t),
84
- ...r
87
+ render: /* @__PURE__ */ r("div", {}),
88
+ className: e("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", t),
89
+ ...n
85
90
  });
86
91
  }
87
92
  //#endregion
88
- export { a as Dialog, c as DialogClose, u as DialogContent, m as DialogDescription, f as DialogFooter, d as DialogHeader, l as DialogOverlay, s as DialogPortal, p as DialogTitle, o as DialogTrigger };
93
+ export { s as Dialog, u as DialogClose, f as DialogContent, g as DialogDescription, m as DialogFooter, p as DialogHeader, d as DialogOverlay, l as DialogPortal, h as DialogTitle, c as DialogTrigger };
@@ -1,80 +1,121 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../lib/utils.js";
3
- import "react";
4
3
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
5
- import { Drawer as r } from "vaul";
4
+ import * as r from "react";
5
+ import { Drawer as i } from "@base-ui/react/drawer";
6
6
  //#region src/components/ui/drawer.tsx
7
- function i({ ...e }) {
8
- return /* @__PURE__ */ t(r.Root, {
9
- "data-slot": "drawer",
10
- ...e
7
+ var a = r.createContext(null);
8
+ function o() {
9
+ let e = r.useContext(a);
10
+ if (!e) throw Error("useDrawer must be used within a Drawer.");
11
+ return e;
12
+ }
13
+ function s({ modal: e = !0, showSwipeHandle: n = !1, snapPoints: o, swipeDirection: s = "down", ...c }) {
14
+ let l = o != null && o.length > 0, u = r.useMemo(() => ({
15
+ hasSnapPoints: l,
16
+ modal: e,
17
+ showSwipeHandle: n,
18
+ swipeDirection: s
19
+ }), [
20
+ l,
21
+ e,
22
+ n,
23
+ s
24
+ ]);
25
+ return /* @__PURE__ */ t(a.Provider, {
26
+ value: u,
27
+ children: /* @__PURE__ */ t(i.Root, {
28
+ "data-slot": "drawer",
29
+ modal: e,
30
+ snapPoints: o,
31
+ swipeDirection: s,
32
+ ...c
33
+ })
11
34
  });
12
35
  }
13
- function a({ className: n, ...i }) {
14
- return /* @__PURE__ */ t(r.Trigger, {
36
+ function c({ ...e }) {
37
+ return /* @__PURE__ */ t(i.Trigger, {
15
38
  "data-slot": "drawer-trigger",
16
- className: e("cursor-pointer", n),
17
- ...i
39
+ ...e
18
40
  });
19
41
  }
20
- function o({ ...e }) {
21
- return /* @__PURE__ */ t(r.Portal, {
42
+ function l({ ...e }) {
43
+ return /* @__PURE__ */ t(i.Portal, {
22
44
  "data-slot": "drawer-portal",
23
45
  ...e
24
46
  });
25
47
  }
26
- function s({ className: n, ...i }) {
27
- return /* @__PURE__ */ t(r.Close, {
48
+ function u({ ...e }) {
49
+ return /* @__PURE__ */ t(i.Close, {
28
50
  "data-slot": "drawer-close",
29
- className: e("cursor-pointer", n),
30
- ...i
51
+ ...e
31
52
  });
32
53
  }
33
- function c({ className: n, ...i }) {
34
- return /* @__PURE__ */ t(r.Overlay, {
54
+ function d({ className: n, ...r }) {
55
+ return /* @__PURE__ */ t(i.Backdrop, {
35
56
  "data-slot": "drawer-overlay",
36
- className: e("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", n),
37
- ...i
57
+ className: e("fixed inset-0 z-50 min-h-dvh bg-black/10 opacity-[max(var(--drawer-overlay-min-opacity,0),calc(1-var(--drawer-swipe-progress)))] transition-opacity duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] select-none data-ending-style:pointer-events-none data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-snap-points:[--drawer-overlay-min-opacity:0.5] data-starting-style:opacity-0 data-swiping:duration-0 supports-backdrop-filter:backdrop-blur-xs supports-[-webkit-touch-callout:none]:absolute", n),
58
+ ...r
38
59
  });
39
60
  }
40
- function l({ className: i, children: a, ...s }) {
41
- return /* @__PURE__ */ n(o, {
61
+ function f({ className: n, ...r }) {
62
+ return /* @__PURE__ */ t("div", {
63
+ "data-slot": "drawer-swipe-handle",
64
+ "aria-hidden": "true",
65
+ className: e("relative z-10 flex shrink-0 cursor-grab transition-opacity duration-200 group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-[swipe-axis=x]/drawer-popup:h-full group-data-[swipe-axis=x]/drawer-popup:w-3 group-data-[swipe-axis=x]/drawer-popup:items-center group-data-[swipe-axis=y]/drawer-popup:h-3 group-data-[swipe-axis=y]/drawer-popup:w-full group-data-[swipe-axis=y]/drawer-popup:justify-center group-data-[swipe-direction=down]/drawer-popup:items-end group-data-[swipe-direction=left]/drawer-popup:order-last group-data-[swipe-direction=left]/drawer-popup:justify-start group-data-[swipe-direction=right]/drawer-popup:justify-end group-data-[swipe-direction=up]/drawer-popup:order-last group-data-[swipe-direction=up]/drawer-popup:items-start after:block after:shrink-0 after:rounded-full after:bg-muted group-data-[swipe-axis=x]/drawer-popup:after:h-24 group-data-[swipe-axis=x]/drawer-popup:after:w-1 group-data-[swipe-axis=y]/drawer-popup:after:h-1 group-data-[swipe-axis=y]/drawer-popup:after:w-24 active:cursor-grabbing", n),
66
+ ...r
67
+ });
68
+ }
69
+ function p({ className: r, children: a, ...s }) {
70
+ let { hasSnapPoints: c, modal: u, showSwipeHandle: p, swipeDirection: m } = o(), h = m === "down" || m === "up" ? "y" : "x";
71
+ return /* @__PURE__ */ n(l, {
42
72
  "data-slot": "drawer-portal",
43
- children: [/* @__PURE__ */ t(c, {}), /* @__PURE__ */ n(r.Content, {
44
- "data-slot": "drawer-content",
45
- className: e("group/drawer-content bg-background fixed z-50 flex h-auto flex-col", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm", i),
46
- ...s,
47
- children: [/* @__PURE__ */ t("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }), a]
73
+ children: [u === !0 && /* @__PURE__ */ t(d, { "data-snap-points": c ? "" : void 0 }), /* @__PURE__ */ t(i.Viewport, {
74
+ "data-slot": "drawer-viewport",
75
+ "data-modal": u,
76
+ className: "pointer-events-none fixed inset-0 z-50 select-none data-[modal=true]:pointer-events-auto",
77
+ children: /* @__PURE__ */ n(i.Popup, {
78
+ "data-slot": "drawer-popup",
79
+ "data-swipe-axis": h,
80
+ "data-snap-points": c ? "" : void 0,
81
+ className: e("group/drawer-popup pointer-events-auto fixed z-50 m-(--drawer-inset,0px) flex h-(--drawer-content-height) max-h-(--drawer-content-max-height,none) min-h-0 w-(--drawer-content-width,auto) transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))] flex-col bg-popover text-sm text-popover-foreground transition-[transform,height,opacity,filter] duration-450 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-transform outline-none select-none [interpolate-size:allow-keywords] data-[swipe-direction=down]:rounded-t-xl data-[swipe-direction=down]:border-t data-[swipe-direction=left]:rounded-r-xl data-[swipe-direction=left]:border-r data-[swipe-direction=right]:rounded-l-xl data-[swipe-direction=right]:border-l data-[swipe-direction=up]:rounded-b-xl data-[swipe-direction=up]:border-b", "data-nested-drawer-open:overflow-hidden data-nested-drawer-open:brightness-95", "after:pointer-events-none after:absolute after:bg-(--drawer-bleed-background,var(--color-popover)) data-[swipe-axis=x]:after:inset-y-0 data-[swipe-axis=x]:after:w-(--bleed) data-[swipe-axis=y]:after:inset-x-0 data-[swipe-axis=y]:after:h-(--bleed) data-[swipe-direction=down]:after:top-full data-[swipe-direction=left]:after:right-full data-[swipe-direction=right]:after:left-full data-[swipe-direction=up]:after:bottom-full", "[--drawer-content-height:var(--drawer-height,auto)] data-[swipe-axis=x]:[--drawer-content-width:75%] data-[swipe-axis=y]:[--drawer-content-max-height:calc(100dvh-6rem)] data-[swipe-axis=y]:data-snap-points:[--drawer-content-height:100dvh] data-[swipe-axis=x]:sm:[--drawer-content-width:24rem]", "[--bleed:3rem] [--peek:1rem] [--stack-height:var(--drawer-frontmost-height,var(--drawer-height,0px))] [--stack-peek-offset:max(0px,calc((var(--nested-drawers)-var(--stack-progress))*var(--peek)))] [--stack-progress:clamp(0,var(--drawer-swipe-progress),1)] [--stack-scale-base:max(0,calc(1-(var(--nested-drawers)*var(--stack-step))))] [--stack-scale:clamp(0,calc(var(--stack-scale-base)+(var(--stack-step)*var(--stack-progress))),1)] [--stack-shrink:calc(1-var(--stack-scale))] [--stack-step:0.05]", "data-ending-style:transform-(--closed-transform) data-ending-style:opacity-[0.9999] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-nested-drawer-swiping:duration-0 data-ending-style:data-nested-drawer-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-starting-style:transform-(--closed-transform) data-swiping:duration-0 data-ending-style:data-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)]", "data-[swipe-axis=y]:inset-x-0 data-[swipe-axis=y]:data-nested-drawer-open:h-(--stack-height)", "data-[swipe-axis=x]:inset-y-0 data-[swipe-axis=x]:flex-row", "data-[swipe-direction=down]:bottom-0 data-[swipe-direction=down]:origin-bottom data-[swipe-direction=down]:[--closed-transform:translate3d(0,calc(100%+var(--drawer-inset,0px)+2px),0)] data-[swipe-direction=down]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)-var(--stack-peek-offset)-(var(--stack-shrink)*var(--stack-height)))]", "data-[swipe-direction=up]:top-0 data-[swipe-direction=up]:origin-top data-[swipe-direction=up]:[--closed-transform:translate3d(0,calc(-100%-var(--drawer-inset,0px)-2px),0)] data-[swipe-direction=up]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)+var(--stack-peek-offset)+(var(--stack-shrink)*var(--stack-height)))]", "data-[swipe-direction=left]:left-0 data-[swipe-direction=left]:origin-left data-[swipe-direction=left]:[--closed-transform:translate3d(calc(-100%-var(--drawer-inset,0px)-2px),0,0)] data-[swipe-direction=left]:[--translate-x:calc(var(--drawer-swipe-movement-x)+var(--stack-peek-offset)+(var(--stack-shrink)*100%))]", "data-[swipe-direction=right]:right-0 data-[swipe-direction=right]:origin-right data-[swipe-direction=right]:[--closed-transform:translate3d(calc(100%+var(--drawer-inset,0px)+2px),0,0)] data-[swipe-direction=right]:[--translate-x:calc(var(--drawer-swipe-movement-x)-var(--stack-peek-offset)-(var(--stack-shrink)*100%))]", r),
82
+ ...s,
83
+ children: [p && /* @__PURE__ */ t(f, {}), /* @__PURE__ */ t(i.Content, {
84
+ "data-slot": "drawer-content",
85
+ className: e("flex min-h-0 flex-1 flex-col overflow-hidden overscroll-contain rounded-[inherit] transition-opacity duration-300 ease-[cubic-bezier(0.45,1.005,0,1.005)] select-text group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-swiping/drawer-popup:select-none"),
86
+ children: a
87
+ })]
88
+ })
48
89
  })]
49
90
  });
50
91
  }
51
- function u({ className: n, ...r }) {
92
+ function m({ className: n, ...r }) {
52
93
  return /* @__PURE__ */ t("div", {
53
94
  "data-slot": "drawer-header",
54
- className: e("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left", n),
95
+ className: e("flex shrink-0 flex-col gap-0.5 p-4 pb-0 group-data-[swipe-axis=y]/drawer-popup:text-center md:gap-0.5 md:text-left", n),
55
96
  ...r
56
97
  });
57
98
  }
58
- function d({ className: n, ...r }) {
99
+ function h({ className: n, ...r }) {
59
100
  return /* @__PURE__ */ t("div", {
60
101
  "data-slot": "drawer-footer",
61
- className: e("mt-auto flex flex-col gap-2 p-4", n),
102
+ className: e("mt-auto flex shrink-0 flex-col gap-2 p-4 pt-0", n),
62
103
  ...r
63
104
  });
64
105
  }
65
- function f({ className: n, ...i }) {
66
- return /* @__PURE__ */ t(r.Title, {
106
+ function g({ className: n, ...r }) {
107
+ return /* @__PURE__ */ t(i.Title, {
67
108
  "data-slot": "drawer-title",
68
- className: e("text-foreground font-semibold", n),
69
- ...i
109
+ className: e("font-heading text-base font-medium text-foreground", n),
110
+ ...r
70
111
  });
71
112
  }
72
- function p({ className: n, ...i }) {
73
- return /* @__PURE__ */ t(r.Description, {
113
+ function _({ className: n, ...r }) {
114
+ return /* @__PURE__ */ t(i.Description, {
74
115
  "data-slot": "drawer-description",
75
- className: e("text-muted-foreground text-sm", n),
76
- ...i
116
+ className: e("text-sm text-balance text-muted-foreground", n),
117
+ ...r
77
118
  });
78
119
  }
79
120
  //#endregion
80
- export { i as Drawer, s as DrawerClose, l as DrawerContent, p as DrawerDescription, d as DrawerFooter, u as DrawerHeader, c as DrawerOverlay, o as DrawerPortal, f as DrawerTitle, a as DrawerTrigger };
121
+ export { s as Drawer, u as DrawerClose, p as DrawerContent, _ as DrawerDescription, h as DrawerFooter, m as DrawerHeader, d as DrawerOverlay, l as DrawerPortal, f as DrawerSwipeHandle, g as DrawerTitle, c as DrawerTrigger };