@inspirare/design-system 0.0.23 → 0.0.25

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 +116 -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 +38 -37
  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 +32 -0
  216. package/src/components/ui/select.tsx +172 -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,96 +1,156 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../lib/utils.js";
3
- import "react";
4
3
  import { CheckIcon as t, ChevronDownIcon as n, ChevronUpIcon as r } from "lucide-react";
5
4
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
- import * as o from "@radix-ui/react-select";
5
+ import * as o from "react";
6
+ import { Select as s } from "@base-ui/react/select";
7
7
  //#region src/components/ui/select.tsx
8
- function s({ ...e }) {
9
- return /* @__PURE__ */ i(o.Root, {
10
- "data-slot": "select",
11
- ...e
8
+ var c = o.createContext(null);
9
+ function l({ children: e, ...t }) {
10
+ let [n, r] = o.useState({}), a = {
11
+ ...o.useMemo(() => {
12
+ let t = {}, n = (e) => {
13
+ o.Children.forEach(e, (e) => {
14
+ if (o.isValidElement(e)) {
15
+ if (e.props && e.props.value !== void 0 && e.props.children) {
16
+ let n = "";
17
+ o.Children.forEach(e.props.children, (e) => {
18
+ (typeof e == "string" || typeof e == "number") && (n += e);
19
+ }), n && (t[e.props.value] = n);
20
+ }
21
+ e.props && e.props.children && n(e.props.children);
22
+ }
23
+ });
24
+ };
25
+ return n(e), t;
26
+ }, [e]),
27
+ ...n
28
+ }, l = o.useCallback((e, t) => {
29
+ r((n) => n[e] === t ? n : {
30
+ ...n,
31
+ [e]: t
32
+ });
33
+ }, []), u = o.useCallback((e) => a[e], [a]);
34
+ return /* @__PURE__ */ i(c.Provider, {
35
+ value: {
36
+ registerLabel: l,
37
+ getLabel: u
38
+ },
39
+ children: /* @__PURE__ */ i(s.Root, {
40
+ ...t,
41
+ children: e
42
+ })
12
43
  });
13
44
  }
14
- function c({ ...e }) {
15
- return /* @__PURE__ */ i(o.Group, {
45
+ function u({ className: t, ...n }) {
46
+ return /* @__PURE__ */ i(s.Group, {
16
47
  "data-slot": "select-group",
17
- ...e
48
+ className: e("scroll-my-1 p-1", t),
49
+ ...n
18
50
  });
19
51
  }
20
- function l({ ...e }) {
21
- return /* @__PURE__ */ i(o.Value, {
52
+ function d({ className: t, children: n, ...r }) {
53
+ let a = o.useContext(c);
54
+ return /* @__PURE__ */ i(s.Value, {
22
55
  "data-slot": "select-value",
23
- ...e
56
+ className: e("flex flex-1 text-left", t),
57
+ ...r,
58
+ children: n || ((e) => {
59
+ if (!e) return null;
60
+ if (a) {
61
+ if (Array.isArray(e)) return e.map((e) => a.getLabel(e) || e).join(", ");
62
+ let t = a.getLabel(e);
63
+ if (t) return t;
64
+ }
65
+ return e;
66
+ })
24
67
  });
25
68
  }
26
- function u({ className: t, size: r = "default", children: s, ...c }) {
27
- return /* @__PURE__ */ a(o.Trigger, {
69
+ function f({ className: t, size: r = "default", children: o, ...c }) {
70
+ return /* @__PURE__ */ a(s.Trigger, {
28
71
  "data-slot": "select-trigger",
29
72
  "data-size": r,
30
- className: e("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit cursor-pointer items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
73
+ className: e("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
31
74
  ...c,
32
- children: [s, /* @__PURE__ */ i(o.Icon, {
33
- asChild: !0,
34
- children: /* @__PURE__ */ i(n, { className: "size-4 opacity-50" })
35
- })]
75
+ children: [o, /* @__PURE__ */ i(s.Icon, { render: /* @__PURE__ */ i(n, { className: "pointer-events-none size-4 text-muted-foreground" }) })]
36
76
  });
37
77
  }
38
- function d({ className: t, children: n, position: r = "popper", ...s }) {
39
- return /* @__PURE__ */ i(o.Portal, { children: /* @__PURE__ */ a(o.Content, {
40
- "data-slot": "select-content",
41
- 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md", r === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", t),
42
- position: r,
43
- ...s,
44
- children: [
45
- /* @__PURE__ */ i(h, {}),
46
- /* @__PURE__ */ i(o.Viewport, {
47
- className: e("p-1", r === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),
48
- children: n
49
- }),
50
- /* @__PURE__ */ i(g, {})
51
- ]
78
+ function p({ className: t, children: n, side: r = "bottom", sideOffset: o = 4, align: c = "center", alignOffset: l = 0, alignItemWithTrigger: u = !0, ...d }) {
79
+ return /* @__PURE__ */ i(s.Portal, { children: /* @__PURE__ */ i(s.Positioner, {
80
+ side: r,
81
+ sideOffset: o,
82
+ align: c,
83
+ alignOffset: l,
84
+ alignItemWithTrigger: u,
85
+ className: "isolate z-50",
86
+ children: /* @__PURE__ */ a(s.Popup, {
87
+ "data-slot": "select-content",
88
+ "data-align-trigger": u,
89
+ className: e("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=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),
90
+ ...d,
91
+ children: [
92
+ /* @__PURE__ */ i(_, {}),
93
+ /* @__PURE__ */ i(s.List, { children: n }),
94
+ /* @__PURE__ */ i(v, {})
95
+ ]
96
+ })
52
97
  }) });
53
98
  }
54
- function f({ className: t, ...n }) {
55
- return /* @__PURE__ */ i(o.Label, {
99
+ function m({ className: t, ...n }) {
100
+ return /* @__PURE__ */ i(s.GroupLabel, {
56
101
  "data-slot": "select-label",
57
- className: e("text-muted-foreground px-2 py-1.5 text-xs", t),
102
+ className: e("px-1.5 py-1 text-xs text-muted-foreground", t),
58
103
  ...n
59
104
  });
60
105
  }
61
- function p({ className: n, children: r, ...s }) {
62
- return /* @__PURE__ */ a(o.Item, {
106
+ function h({ className: n, children: r, value: l, ...u }) {
107
+ let d = o.useContext(c), f = o.useRef(null);
108
+ return o.useEffect(() => {
109
+ if (l !== void 0 && f.current && d) {
110
+ let e = f.current.textContent;
111
+ e && d.registerLabel(l, e.trim());
112
+ }
113
+ }, [
114
+ l,
115
+ d,
116
+ r
117
+ ]), /* @__PURE__ */ a(s.Item, {
118
+ value: l,
63
119
  "data-slot": "select-item",
64
- className: e("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", n),
65
- ...s,
66
- children: [/* @__PURE__ */ i("span", {
67
- className: "absolute right-2 flex size-3.5 items-center justify-center",
68
- children: /* @__PURE__ */ i(o.ItemIndicator, { children: /* @__PURE__ */ i(t, { className: "size-4" }) })
69
- }), /* @__PURE__ */ i(o.ItemText, { children: r })]
120
+ className: e("relative flex w-full 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 not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", n),
121
+ ...u,
122
+ children: [/* @__PURE__ */ i(s.ItemText, {
123
+ ref: f,
124
+ className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap",
125
+ children: r
126
+ }), /* @__PURE__ */ i(s.ItemIndicator, {
127
+ render: /* @__PURE__ */ i("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
128
+ children: /* @__PURE__ */ i(t, { className: "pointer-events-none" })
129
+ })]
70
130
  });
71
131
  }
72
- function m({ className: t, ...n }) {
73
- return /* @__PURE__ */ i(o.Separator, {
132
+ function g({ className: t, ...n }) {
133
+ return /* @__PURE__ */ i(s.Separator, {
74
134
  "data-slot": "select-separator",
75
- className: e("bg-border pointer-events-none -mx-1 my-1 h-px", t),
135
+ className: e("pointer-events-none -mx-1 my-1 h-px bg-border", t),
76
136
  ...n
77
137
  });
78
138
  }
79
- function h({ className: t, ...n }) {
80
- return /* @__PURE__ */ i(o.ScrollUpButton, {
139
+ function _({ className: t, ...n }) {
140
+ return /* @__PURE__ */ i(s.ScrollUpArrow, {
81
141
  "data-slot": "select-scroll-up-button",
82
- className: e("flex cursor-pointer items-center justify-center py-1", t),
142
+ className: e("top-0 z-10 flex w-full cursor-pointer items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", t),
83
143
  ...n,
84
- children: /* @__PURE__ */ i(r, { className: "size-4" })
144
+ children: /* @__PURE__ */ i(r, {})
85
145
  });
86
146
  }
87
- function g({ className: t, ...r }) {
88
- return /* @__PURE__ */ i(o.ScrollDownButton, {
147
+ function v({ className: t, ...r }) {
148
+ return /* @__PURE__ */ i(s.ScrollDownArrow, {
89
149
  "data-slot": "select-scroll-down-button",
90
- className: e("flex cursor-pointer items-center justify-center py-1", t),
150
+ className: e("bottom-0 z-10 flex w-full cursor-pointer items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", t),
91
151
  ...r,
92
- children: /* @__PURE__ */ i(n, { className: "size-4" })
152
+ children: /* @__PURE__ */ i(n, {})
93
153
  });
94
154
  }
95
155
  //#endregion
96
- export { s as Select, d as SelectContent, c as SelectGroup, p as SelectItem, f as SelectLabel, g as SelectScrollDownButton, h as SelectScrollUpButton, m as SelectSeparator, u as SelectTrigger, l as SelectValue };
156
+ export { l as Select, p as SelectContent, u as SelectGroup, h as SelectItem, m as SelectLabel, v as SelectScrollDownButton, _ as SelectScrollUpButton, g as SelectSeparator, f as SelectTrigger, d as SelectValue };
@@ -1,16 +1,14 @@
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-separator";
4
+ import { Separator as n } from "@base-ui/react/separator";
6
5
  //#region src/components/ui/separator.tsx
7
- function r({ className: r, orientation: i = "horizontal", decorative: a = !0, ...o }) {
8
- return /* @__PURE__ */ t(n.Root, {
6
+ function r({ className: r, orientation: i = "horizontal", ...a }) {
7
+ return /* @__PURE__ */ t(n, {
9
8
  "data-slot": "separator",
10
- decorative: a,
11
9
  orientation: i,
12
- className: e("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", r),
13
- ...o
10
+ className: e("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch", r),
11
+ ...a
14
12
  });
15
13
  }
16
14
  //#endregion
@@ -1,84 +1,89 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../lib/utils.js";
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";
3
6
  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";
7
+ import { Dialog as a } from "@base-ui/react/dialog";
7
8
  //#region src/components/ui/sheet.tsx
8
- function a({ ...e }) {
9
- return /* @__PURE__ */ n(i.Root, {
9
+ function o({ ...e }) {
10
+ return /* @__PURE__ */ r(a.Root, {
10
11
  "data-slot": "sheet",
11
12
  ...e
12
13
  });
13
14
  }
14
- function o({ className: t, ...r }) {
15
- return /* @__PURE__ */ n(i.Trigger, {
15
+ function s({ ...e }) {
16
+ return /* @__PURE__ */ r(a.Trigger, {
16
17
  "data-slot": "sheet-trigger",
17
- className: e("cursor-pointer", t),
18
- ...r
18
+ ...e
19
19
  });
20
20
  }
21
- function s({ className: t, ...r }) {
22
- return /* @__PURE__ */ n(i.Close, {
21
+ function c({ ...e }) {
22
+ return /* @__PURE__ */ r(a.Close, {
23
23
  "data-slot": "sheet-close",
24
- className: e("cursor-pointer", t),
25
- ...r
24
+ ...e
26
25
  });
27
26
  }
28
- function c({ ...e }) {
29
- return /* @__PURE__ */ n(i.Portal, {
27
+ function l({ ...e }) {
28
+ return /* @__PURE__ */ r(a.Portal, {
30
29
  "data-slot": "sheet-portal",
31
30
  ...e
32
31
  });
33
32
  }
34
- function l({ className: t, ...r }) {
35
- return /* @__PURE__ */ n(i.Overlay, {
33
+ function u({ className: t, ...n }) {
34
+ return /* @__PURE__ */ r(a.Backdrop, {
36
35
  "data-slot": "sheet-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 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs", t),
37
+ ...n
39
38
  });
40
39
  }
41
- function u({ className: a, children: o, side: s = "right", ...u }) {
42
- return /* @__PURE__ */ r(c, { children: [/* @__PURE__ */ n(l, {}), /* @__PURE__ */ r(i.Content, {
40
+ function d({ className: o, children: s, side: c = "right", showCloseButton: d = !0, ...f }) {
41
+ return /* @__PURE__ */ i(l, { children: [/* @__PURE__ */ r(u, {}), /* @__PURE__ */ i(a.Popup, {
43
42
  "data-slot": "sheet-content",
44
- className: e("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500", s === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", s === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", s === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", s === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", a),
45
- ...u,
46
- children: [o, /* @__PURE__ */ r(i.Close, {
47
- className: "ring-offset-background cursor-pointer focus:ring-ring data-[state=open]:bg-secondary 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",
48
- children: [/* @__PURE__ */ n(t, { className: "size-4" }), /* @__PURE__ */ n("span", {
43
+ "data-side": c,
44
+ className: e("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", o),
45
+ ...f,
46
+ children: [s, d && /* @__PURE__ */ i(a.Close, {
47
+ "data-slot": "sheet-close",
48
+ render: /* @__PURE__ */ r(t, {
49
+ variant: "ghost",
50
+ className: "absolute top-3 right-3",
51
+ size: "icon-sm"
52
+ }),
53
+ children: [/* @__PURE__ */ r(n, {}), /* @__PURE__ */ r("span", {
49
54
  className: "sr-only",
50
55
  children: "Close"
51
56
  })]
52
57
  })]
53
58
  })] });
54
59
  }
55
- function d({ className: t, ...r }) {
56
- return /* @__PURE__ */ n("div", {
60
+ function f({ className: t, ...n }) {
61
+ return /* @__PURE__ */ r("div", {
57
62
  "data-slot": "sheet-header",
58
- className: e("flex flex-col gap-1.5 p-4", t),
59
- ...r
63
+ className: e("flex flex-col gap-0.5 p-4", t),
64
+ ...n
60
65
  });
61
66
  }
62
- function f({ className: t, ...r }) {
63
- return /* @__PURE__ */ n("div", {
67
+ function p({ className: t, ...n }) {
68
+ return /* @__PURE__ */ r("div", {
64
69
  "data-slot": "sheet-footer",
65
70
  className: e("mt-auto flex flex-col gap-2 p-4", t),
66
- ...r
71
+ ...n
67
72
  });
68
73
  }
69
- function p({ className: t, ...r }) {
70
- return /* @__PURE__ */ n(i.Title, {
74
+ function m({ className: t, ...n }) {
75
+ return /* @__PURE__ */ r(a.Title, {
71
76
  "data-slot": "sheet-title",
72
- className: e("text-foreground font-semibold", t),
73
- ...r
77
+ className: e("font-heading text-base font-medium text-foreground", t),
78
+ ...n
74
79
  });
75
80
  }
76
- function m({ className: t, ...r }) {
77
- return /* @__PURE__ */ n(i.Description, {
81
+ function h({ className: t, ...n }) {
82
+ return /* @__PURE__ */ r(a.Description, {
78
83
  "data-slot": "sheet-description",
79
- className: e("text-muted-foreground text-sm", t),
80
- ...r
84
+ className: e("text-sm text-muted-foreground", t),
85
+ ...n
81
86
  });
82
87
  }
83
88
  //#endregion
84
- export { a as Sheet, s as SheetClose, u as SheetContent, m as SheetDescription, f as SheetFooter, d as SheetHeader, p as SheetTitle, o as SheetTrigger };
89
+ export { o as Sheet, c as SheetClose, d as SheetContent, h as SheetDescription, p as SheetFooter, f as SheetHeader, m as SheetTitle, s as SheetTrigger };