@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
@@ -0,0 +1,14 @@
1
+ import { render } from '@testing-library/react';
2
+ import { axe } from 'jest-axe';
3
+ import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from "./select";
4
+
5
+ describe('Select Accessibility', () => {
6
+ it('should have no accessibility violations in basic render', async () => {
7
+ const Wrapper = () => (
8
+ <Select><SelectTrigger aria-label="Select a theme" className="w-[180px]"><SelectValue placeholder="Theme" /></SelectTrigger><SelectContent><SelectItem value="light">Light</SelectItem><SelectItem value="dark">Dark</SelectItem><SelectItem value="system">System</SelectItem></SelectContent></Select>
9
+ );
10
+ const { container } = render(<Wrapper />);
11
+ const results = await axe(container);
12
+ expect(results).toHaveNoViolations();
13
+ });
14
+ });
@@ -1,27 +1,68 @@
1
- "use client";
1
+ "use client"
2
2
 
3
- import * as React from "react";
4
- import * as SelectPrimitive from "@radix-ui/react-select";
5
- import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
3
+ import * as React from "react"
4
+ import { Select as SelectPrimitive } from "@base-ui/react/select"
6
5
 
7
- import { cn } from "@/lib/utils";
6
+ import { cn } from "@/lib/utils"
7
+ import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react"
8
8
 
9
- function Select({
10
- ...props
11
- }: React.ComponentProps<typeof SelectPrimitive.Root>) {
12
- return <SelectPrimitive.Root data-slot="select" {...props} />;
13
- }
9
+ const SelectContext = React.createContext<{
10
+ registerLabel: (val: any, label: string) => void;
11
+ getLabel: (val: any) => string | undefined;
12
+ } | null>(null);
14
13
 
15
- function SelectGroup({
16
- ...props
17
- }: React.ComponentProps<typeof SelectPrimitive.Group>) {
18
- return <SelectPrimitive.Group data-slot="select-group" {...props} />;
14
+ function Select({ children, ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {
15
+ const [labels, setLabels] = React.useState<Record<string, string>>({});
16
+
17
+ const registerLabel = React.useCallback((val: any, label: string) => {
18
+ setLabels((prev) => {
19
+ if (prev[val] === label) return prev;
20
+ return { ...prev, [val]: label };
21
+ });
22
+ }, []);
23
+
24
+ const getLabel = React.useCallback((val: any) => labels[val], [labels]);
25
+
26
+ return (
27
+ <SelectContext.Provider value={{ registerLabel, getLabel }}>
28
+ <SelectPrimitive.Root {...props}>
29
+ {children}
30
+ </SelectPrimitive.Root>
31
+ </SelectContext.Provider>
32
+ )
33
+ }
34
+ function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {
35
+ return (
36
+ <SelectPrimitive.Group
37
+ data-slot="select-group"
38
+ className={cn("scroll-my-1 p-1", className)}
39
+ {...props}
40
+ />
41
+ )
19
42
  }
20
43
 
21
- function SelectValue({
22
- ...props
23
- }: React.ComponentProps<typeof SelectPrimitive.Value>) {
24
- return <SelectPrimitive.Value data-slot="select-value" {...props} />;
44
+ function SelectValue({ className, children, ...props }: SelectPrimitive.Value.Props) {
45
+ const ctx = React.useContext(SelectContext);
46
+
47
+ return (
48
+ <SelectPrimitive.Value
49
+ data-slot="select-value"
50
+ className={cn("flex flex-1 text-left", className)}
51
+ {...props}
52
+ >
53
+ {children ? children : (val: any) => {
54
+ if (!val) return null;
55
+ if (ctx) {
56
+ if (Array.isArray(val)) {
57
+ return val.map(v => ctx.getLabel(v) || v).join(', ');
58
+ }
59
+ const label = ctx.getLabel(val);
60
+ if (label) return label;
61
+ }
62
+ return val;
63
+ }}
64
+ </SelectPrimitive.Value>
65
+ )
25
66
  }
26
67
 
27
68
  function SelectTrigger({
@@ -29,146 +70,172 @@ function SelectTrigger({
29
70
  size = "default",
30
71
  children,
31
72
  ...props
32
- }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
33
- size?: "sm" | "default";
73
+ }: SelectPrimitive.Trigger.Props & {
74
+ size?: "sm" | "default"
34
75
  }) {
35
76
  return (
36
77
  <SelectPrimitive.Trigger
37
78
  data-slot="select-trigger"
38
79
  data-size={size}
39
80
  className={cn(
40
- "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",
81
+ "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",
41
82
  className
42
83
  )}
43
84
  {...props}
44
85
  >
45
86
  {children}
46
- <SelectPrimitive.Icon asChild>
47
- <ChevronDownIcon className="size-4 opacity-50" />
48
- </SelectPrimitive.Icon>
87
+ <SelectPrimitive.Icon
88
+ render={
89
+ <ChevronDownIcon className="pointer-events-none size-4 text-muted-foreground" />
90
+ }
91
+ />
49
92
  </SelectPrimitive.Trigger>
50
- );
93
+ )
51
94
  }
52
95
 
53
96
  function SelectContent({
54
97
  className,
55
98
  children,
56
- position = "popper",
99
+ side = "bottom",
100
+ sideOffset = 4,
101
+ align = "center",
102
+ alignOffset = 0,
103
+ alignItemWithTrigger = true,
57
104
  ...props
58
- }: React.ComponentProps<typeof SelectPrimitive.Content>) {
105
+ }: SelectPrimitive.Popup.Props &
106
+ Pick<
107
+ SelectPrimitive.Positioner.Props,
108
+ "align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger"
109
+ >) {
59
110
  return (
60
111
  <SelectPrimitive.Portal>
61
- <SelectPrimitive.Content
62
- data-slot="select-content"
63
- className={cn(
64
- "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",
65
- position === "popper" &&
66
- "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
67
- className
68
- )}
69
- position={position}
70
- {...props}
112
+ <SelectPrimitive.Positioner
113
+ side={side}
114
+ sideOffset={sideOffset}
115
+ align={align}
116
+ alignOffset={alignOffset}
117
+ alignItemWithTrigger={alignItemWithTrigger}
118
+ className="isolate z-50"
71
119
  >
72
- <SelectScrollUpButton />
73
- <SelectPrimitive.Viewport
74
- className={cn(
75
- "p-1",
76
- position === "popper" &&
77
- "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
78
- )}
120
+ <SelectPrimitive.Popup
121
+ data-slot="select-content"
122
+ data-align-trigger={alignItemWithTrigger}
123
+ className={cn("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", className )}
124
+ {...props}
79
125
  >
80
- {children}
81
- </SelectPrimitive.Viewport>
82
- <SelectScrollDownButton />
83
- </SelectPrimitive.Content>
126
+ <SelectScrollUpButton />
127
+ <SelectPrimitive.List>{children}</SelectPrimitive.List>
128
+ <SelectScrollDownButton />
129
+ </SelectPrimitive.Popup>
130
+ </SelectPrimitive.Positioner>
84
131
  </SelectPrimitive.Portal>
85
- );
132
+ )
86
133
  }
87
134
 
88
135
  function SelectLabel({
89
136
  className,
90
137
  ...props
91
- }: React.ComponentProps<typeof SelectPrimitive.Label>) {
138
+ }: SelectPrimitive.GroupLabel.Props) {
92
139
  return (
93
- <SelectPrimitive.Label
140
+ <SelectPrimitive.GroupLabel
94
141
  data-slot="select-label"
95
- className={cn("text-muted-foreground px-2 py-1.5 text-xs", className)}
142
+ className={cn("px-1.5 py-1 text-xs text-muted-foreground", className)}
96
143
  {...props}
97
144
  />
98
- );
145
+ )
99
146
  }
100
147
 
101
148
  function SelectItem({
102
149
  className,
103
150
  children,
151
+ value,
104
152
  ...props
105
- }: React.ComponentProps<typeof SelectPrimitive.Item>) {
153
+ }: SelectPrimitive.Item.Props) {
154
+ const ctx = React.useContext(SelectContext);
155
+ const textRef = React.useRef<HTMLDivElement>(null);
156
+
157
+ React.useEffect(() => {
158
+ if (value !== undefined && textRef.current && ctx) {
159
+ const text = textRef.current.textContent;
160
+ if (text) {
161
+ ctx.registerLabel(value, text.trim());
162
+ }
163
+ }
164
+ }, [value, ctx, children]);
165
+
106
166
  return (
107
167
  <SelectPrimitive.Item
168
+ value={value}
108
169
  data-slot="select-item"
109
170
  className={cn(
110
- "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",
171
+ "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",
111
172
  className
112
173
  )}
113
174
  {...props}
114
175
  >
115
- <span className="absolute right-2 flex size-3.5 items-center justify-center">
116
- <SelectPrimitive.ItemIndicator>
117
- <CheckIcon className="size-4" />
118
- </SelectPrimitive.ItemIndicator>
119
- </span>
120
- <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
176
+ <SelectPrimitive.ItemText ref={textRef} className="flex flex-1 shrink-0 gap-2 whitespace-nowrap">
177
+ {children}
178
+ </SelectPrimitive.ItemText>
179
+ <SelectPrimitive.ItemIndicator
180
+ render={
181
+ <span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center" />
182
+ }
183
+ >
184
+ <CheckIcon className="pointer-events-none" />
185
+ </SelectPrimitive.ItemIndicator>
121
186
  </SelectPrimitive.Item>
122
- );
187
+ )
123
188
  }
124
189
 
125
190
  function SelectSeparator({
126
191
  className,
127
192
  ...props
128
- }: React.ComponentProps<typeof SelectPrimitive.Separator>) {
193
+ }: SelectPrimitive.Separator.Props) {
129
194
  return (
130
195
  <SelectPrimitive.Separator
131
196
  data-slot="select-separator"
132
- className={cn("bg-border pointer-events-none -mx-1 my-1 h-px", className)}
197
+ className={cn("pointer-events-none -mx-1 my-1 h-px bg-border", className)}
133
198
  {...props}
134
199
  />
135
- );
200
+ )
136
201
  }
137
202
 
138
203
  function SelectScrollUpButton({
139
204
  className,
140
205
  ...props
141
- }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
206
+ }: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {
142
207
  return (
143
- <SelectPrimitive.ScrollUpButton
208
+ <SelectPrimitive.ScrollUpArrow
144
209
  data-slot="select-scroll-up-button"
145
210
  className={cn(
146
- "flex cursor-pointer items-center justify-center py-1",
211
+ "top-0 z-10 flex w-full cursor-pointer items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
147
212
  className
148
213
  )}
149
214
  {...props}
150
215
  >
151
- <ChevronUpIcon className="size-4" />
152
- </SelectPrimitive.ScrollUpButton>
153
- );
216
+ <ChevronUpIcon
217
+ />
218
+ </SelectPrimitive.ScrollUpArrow>
219
+ )
154
220
  }
155
221
 
156
222
  function SelectScrollDownButton({
157
223
  className,
158
224
  ...props
159
- }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
225
+ }: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {
160
226
  return (
161
- <SelectPrimitive.ScrollDownButton
227
+ <SelectPrimitive.ScrollDownArrow
162
228
  data-slot="select-scroll-down-button"
163
229
  className={cn(
164
- "flex cursor-pointer items-center justify-center py-1",
230
+ "bottom-0 z-10 flex w-full cursor-pointer items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
165
231
  className
166
232
  )}
167
233
  {...props}
168
234
  >
169
- <ChevronDownIcon className="size-4" />
170
- </SelectPrimitive.ScrollDownButton>
171
- );
235
+ <ChevronDownIcon
236
+ />
237
+ </SelectPrimitive.ScrollDownArrow>
238
+ )
172
239
  }
173
240
 
174
241
  export {
@@ -182,4 +249,4 @@ export {
182
249
  SelectSeparator,
183
250
  SelectTrigger,
184
251
  SelectValue,
185
- };
252
+ }
@@ -0,0 +1,19 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Separator } from "./separator";
3
+
4
+ const meta = {
5
+ title: 'Design System/Separator',
6
+ parameters: { layout: 'centered' },
7
+ tags: ['autodocs'],
8
+ } satisfies Meta;
9
+
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+
13
+ export const Default: Story = {
14
+ render: () => (
15
+ <div className="p-4 w-full h-full flex items-center justify-center">
16
+ <div><div className="space-y-1"><h4 className="text-sm font-medium leading-none">Radix Primitives</h4><p className="text-sm text-muted-foreground">An open-source UI component library.</p></div><Separator className="my-4" /><div className="flex h-5 items-center space-x-4 text-sm"><div>Blog</div><Separator orientation="vertical" /><div>Docs</div></div></div>
17
+ </div>
18
+ )
19
+ };
@@ -0,0 +1,14 @@
1
+ import { render } from '@testing-library/react';
2
+ import { axe } from 'jest-axe';
3
+ import { Separator } from "./separator";
4
+
5
+ describe('Separator Accessibility', () => {
6
+ it('should have no accessibility violations in basic render', async () => {
7
+ const Wrapper = () => (
8
+ <div><div className="space-y-1"><h4 className="text-sm font-medium leading-none">Radix Primitives</h4><p className="text-sm text-muted-foreground">An open-source UI component library.</p></div><Separator className="my-4" /><div className="flex h-5 items-center space-x-4 text-sm"><div>Blog</div><Separator orientation="vertical" /><div>Docs</div></div></div>
9
+ );
10
+ const { container } = render(<Wrapper />);
11
+ const results = await axe(container);
12
+ expect(results).toHaveNoViolations();
13
+ });
14
+ });
@@ -1,28 +1,25 @@
1
- "use client";
1
+ "use client"
2
2
 
3
- import * as React from "react";
4
- import * as SeparatorPrimitive from "@radix-ui/react-separator";
3
+ import { Separator as SeparatorPrimitive } from "@base-ui/react/separator"
5
4
 
6
- import { cn } from "@/lib/utils";
5
+ import { cn } from "@/lib/utils"
7
6
 
8
7
  function Separator({
9
8
  className,
10
9
  orientation = "horizontal",
11
- decorative = true,
12
10
  ...props
13
- }: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
11
+ }: SeparatorPrimitive.Props) {
14
12
  return (
15
- <SeparatorPrimitive.Root
13
+ <SeparatorPrimitive
16
14
  data-slot="separator"
17
- decorative={decorative}
18
15
  orientation={orientation}
19
16
  className={cn(
20
- "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
17
+ "shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
21
18
  className
22
19
  )}
23
20
  {...props}
24
21
  />
25
- );
22
+ )
26
23
  }
27
24
 
28
- export { Separator };
25
+ export { Separator }
@@ -0,0 +1,19 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Sheet, SheetTrigger, SheetContent, SheetHeader, SheetTitle, SheetDescription } from "./sheet";
3
+
4
+ const meta = {
5
+ title: 'Design System/Sheet',
6
+ parameters: { layout: 'centered' },
7
+ tags: ['autodocs'],
8
+ } satisfies Meta;
9
+
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+
13
+ export const Default: Story = {
14
+ render: () => (
15
+ <div className="p-4 w-full h-full flex items-center justify-center">
16
+ <Sheet><SheetTrigger className="px-4 py-2 border rounded">Open</SheetTrigger><SheetContent><SheetHeader><SheetTitle>Are you sure?</SheetTitle><SheetDescription>This action cannot be undone.</SheetDescription></SheetHeader></SheetContent></Sheet>
17
+ </div>
18
+ )
19
+ };
@@ -0,0 +1,14 @@
1
+ import { render } from '@testing-library/react';
2
+ import { axe } from 'jest-axe';
3
+ import { Sheet, SheetTrigger, SheetContent, SheetHeader, SheetTitle, SheetDescription } from "./sheet";
4
+
5
+ describe('Sheet Accessibility', () => {
6
+ it('should have no accessibility violations in basic render', async () => {
7
+ const Wrapper = () => (
8
+ <Sheet><SheetTrigger className="px-4 py-2 border rounded">Open</SheetTrigger><SheetContent><SheetHeader><SheetTitle>Are you sure?</SheetTitle><SheetDescription>This action cannot be undone.</SheetDescription></SheetHeader></SheetContent></Sheet>
9
+ );
10
+ const { container } = render(<Wrapper />);
11
+ const results = await axe(container);
12
+ expect(results).toHaveNoViolations();
13
+ });
14
+ });
@@ -1,108 +1,93 @@
1
- "use client";
1
+ "use client"
2
2
 
3
- import * as React from "react";
4
- import * as SheetPrimitive from "@radix-ui/react-dialog";
5
- import { XIcon } from "lucide-react";
3
+ import * as React from "react"
4
+ import { Dialog as SheetPrimitive } from "@base-ui/react/dialog"
6
5
 
7
- import { cn } from "@/lib/utils";
6
+ import { cn } from "@/lib/utils"
7
+ import { Button } from "@/components/ui/button"
8
+ import { XIcon } from "lucide-react"
8
9
 
9
- function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
10
- return <SheetPrimitive.Root data-slot="sheet" {...props} />;
10
+ function Sheet({ ...props }: SheetPrimitive.Root.Props) {
11
+ return <SheetPrimitive.Root data-slot="sheet" {...props} />
11
12
  }
12
13
 
13
- function SheetTrigger({
14
- className,
15
- ...props
16
- }: React.ComponentProps<typeof SheetPrimitive.Trigger>) {
17
- return (
18
- <SheetPrimitive.Trigger
19
- data-slot="sheet-trigger"
20
- className={cn("cursor-pointer", className)}
21
- {...props}
22
- />
23
- );
14
+ function SheetTrigger({ ...props }: SheetPrimitive.Trigger.Props) {
15
+ return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />
24
16
  }
25
17
 
26
- function SheetClose({
27
- className,
28
- ...props
29
- }: React.ComponentProps<typeof SheetPrimitive.Close>) {
30
- return (
31
- <SheetPrimitive.Close
32
- data-slot="sheet-close"
33
- className={cn("cursor-pointer", className)}
34
- {...props}
35
- />
36
- );
18
+ function SheetClose({ ...props }: SheetPrimitive.Close.Props) {
19
+ return <SheetPrimitive.Close data-slot="sheet-close" {...props} />
37
20
  }
38
21
 
39
- function SheetPortal({
40
- ...props
41
- }: React.ComponentProps<typeof SheetPrimitive.Portal>) {
42
- return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />;
22
+ function SheetPortal({ ...props }: SheetPrimitive.Portal.Props) {
23
+ return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />
43
24
  }
44
25
 
45
- function SheetOverlay({
46
- className,
47
- ...props
48
- }: React.ComponentProps<typeof SheetPrimitive.Overlay>) {
26
+ function SheetOverlay({ className, ...props }: SheetPrimitive.Backdrop.Props) {
49
27
  return (
50
- <SheetPrimitive.Overlay
28
+ <SheetPrimitive.Backdrop
51
29
  data-slot="sheet-overlay"
52
30
  className={cn(
53
- "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",
31
+ "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",
54
32
  className
55
33
  )}
56
34
  {...props}
57
35
  />
58
- );
36
+ )
59
37
  }
60
38
 
61
39
  function SheetContent({
62
40
  className,
63
41
  children,
64
42
  side = "right",
43
+ showCloseButton = true,
65
44
  ...props
66
- }: React.ComponentProps<typeof SheetPrimitive.Content> & {
67
- side?: "top" | "right" | "bottom" | "left";
45
+ }: SheetPrimitive.Popup.Props & {
46
+ side?: "top" | "right" | "bottom" | "left"
47
+ showCloseButton?: boolean
68
48
  }) {
69
49
  return (
70
50
  <SheetPortal>
71
51
  <SheetOverlay />
72
- <SheetPrimitive.Content
52
+ <SheetPrimitive.Popup
73
53
  data-slot="sheet-content"
54
+ data-side={side}
74
55
  className={cn(
75
- "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",
76
- side === "right" &&
77
- "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",
78
- side === "left" &&
79
- "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",
80
- side === "top" &&
81
- "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
82
- side === "bottom" &&
83
- "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
56
+ "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",
84
57
  className
85
58
  )}
86
59
  {...props}
87
60
  >
88
61
  {children}
89
- <SheetPrimitive.Close 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">
90
- <XIcon className="size-4" />
91
- <span className="sr-only">Close</span>
92
- </SheetPrimitive.Close>
93
- </SheetPrimitive.Content>
62
+ {showCloseButton && (
63
+ <SheetPrimitive.Close
64
+ data-slot="sheet-close"
65
+ render={
66
+ <Button
67
+ variant="ghost"
68
+ className="absolute top-3 right-3"
69
+ size="icon-sm"
70
+ />
71
+ }
72
+ >
73
+ <XIcon
74
+ />
75
+ <span className="sr-only">Close</span>
76
+ </SheetPrimitive.Close>
77
+ )}
78
+ </SheetPrimitive.Popup>
94
79
  </SheetPortal>
95
- );
80
+ )
96
81
  }
97
82
 
98
83
  function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
99
84
  return (
100
85
  <div
101
86
  data-slot="sheet-header"
102
- className={cn("flex flex-col gap-1.5 p-4", className)}
87
+ className={cn("flex flex-col gap-0.5 p-4", className)}
103
88
  {...props}
104
89
  />
105
- );
90
+ )
106
91
  }
107
92
 
108
93
  function SheetFooter({ className, ...props }: React.ComponentProps<"div">) {
@@ -112,33 +97,33 @@ function SheetFooter({ className, ...props }: React.ComponentProps<"div">) {
112
97
  className={cn("mt-auto flex flex-col gap-2 p-4", className)}
113
98
  {...props}
114
99
  />
115
- );
100
+ )
116
101
  }
117
102
 
118
- function SheetTitle({
119
- className,
120
- ...props
121
- }: React.ComponentProps<typeof SheetPrimitive.Title>) {
103
+ function SheetTitle({ className, ...props }: SheetPrimitive.Title.Props) {
122
104
  return (
123
105
  <SheetPrimitive.Title
124
106
  data-slot="sheet-title"
125
- className={cn("text-foreground font-semibold", className)}
107
+ className={cn(
108
+ "font-heading text-base font-medium text-foreground",
109
+ className
110
+ )}
126
111
  {...props}
127
112
  />
128
- );
113
+ )
129
114
  }
130
115
 
131
116
  function SheetDescription({
132
117
  className,
133
118
  ...props
134
- }: React.ComponentProps<typeof SheetPrimitive.Description>) {
119
+ }: SheetPrimitive.Description.Props) {
135
120
  return (
136
121
  <SheetPrimitive.Description
137
122
  data-slot="sheet-description"
138
- className={cn("text-muted-foreground text-sm", className)}
123
+ className={cn("text-sm text-muted-foreground", className)}
139
124
  {...props}
140
125
  />
141
- );
126
+ )
142
127
  }
143
128
 
144
129
  export {
@@ -150,4 +135,4 @@ export {
150
135
  SheetFooter,
151
136
  SheetTitle,
152
137
  SheetDescription,
153
- };
138
+ }