@softure-ai/theme-notion 0.0.0-stage → 0.1.1

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 (247) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/LICENSE +21 -0
  3. package/README.md +114 -2
  4. package/dist/index.d.ts +47 -0
  5. package/dist/index.d.ts.map +1 -0
  6. package/dist/index.js +49 -0
  7. package/dist/index.js.map +1 -0
  8. package/dist/lib/utils.d.ts +6 -0
  9. package/dist/lib/utils.d.ts.map +1 -0
  10. package/dist/lib/utils.js +8 -0
  11. package/dist/lib/utils.js.map +1 -0
  12. package/dist/messages/en.d.ts +29 -0
  13. package/dist/messages/en.d.ts.map +1 -0
  14. package/dist/messages/en.js +13 -0
  15. package/dist/messages/en.js.map +1 -0
  16. package/dist/messages/index.d.ts +30 -0
  17. package/dist/messages/index.d.ts.map +1 -0
  18. package/dist/messages/index.js +4 -0
  19. package/dist/messages/index.js.map +1 -0
  20. package/dist/notion/PageFrame.d.ts +11 -0
  21. package/dist/notion/PageFrame.d.ts.map +1 -0
  22. package/dist/notion/PageFrame.js +10 -0
  23. package/dist/notion/PageFrame.js.map +1 -0
  24. package/dist/notion/PageHeader.d.ts +16 -0
  25. package/dist/notion/PageHeader.d.ts.map +1 -0
  26. package/dist/notion/PageHeader.js +9 -0
  27. package/dist/notion/PageHeader.js.map +1 -0
  28. package/dist/notion/PropertyList.d.ts +12 -0
  29. package/dist/notion/PropertyList.d.ts.map +1 -0
  30. package/dist/notion/PropertyList.js +8 -0
  31. package/dist/notion/PropertyList.js.map +1 -0
  32. package/dist/notion/Status.d.ts +11 -0
  33. package/dist/notion/Status.d.ts.map +1 -0
  34. package/dist/notion/Status.js +21 -0
  35. package/dist/notion/Status.js.map +1 -0
  36. package/dist/notion/icon-stroke.d.ts +2 -0
  37. package/dist/notion/icon-stroke.d.ts.map +1 -0
  38. package/dist/notion/icon-stroke.js +3 -0
  39. package/dist/notion/icon-stroke.js.map +1 -0
  40. package/dist/notion/palette.d.ts +3 -0
  41. package/dist/notion/palette.d.ts.map +1 -0
  42. package/dist/notion/palette.js +4 -0
  43. package/dist/notion/palette.js.map +1 -0
  44. package/dist/sft-bridge.css +47 -0
  45. package/dist/theme.css +388 -0
  46. package/dist/tokens.d.ts +801 -0
  47. package/dist/tokens.d.ts.map +1 -0
  48. package/dist/tokens.js +139 -0
  49. package/dist/tokens.js.map +1 -0
  50. package/dist/ui/accordion.d.ts +8 -0
  51. package/dist/ui/accordion.d.ts.map +1 -0
  52. package/dist/ui/accordion.js +20 -0
  53. package/dist/ui/accordion.js.map +1 -0
  54. package/dist/ui/alert-dialog.d.ts +19 -0
  55. package/dist/ui/alert-dialog.d.ts.map +1 -0
  56. package/dist/ui/alert-dialog.js +44 -0
  57. package/dist/ui/alert-dialog.js.map +1 -0
  58. package/dist/ui/alert.d.ts +10 -0
  59. package/dist/ui/alert.d.ts.map +1 -0
  60. package/dist/ui/alert.js +35 -0
  61. package/dist/ui/alert.js.map +1 -0
  62. package/dist/ui/avatar.d.ts +12 -0
  63. package/dist/ui/avatar.d.ts.map +1 -0
  64. package/dist/ui/avatar.js +25 -0
  65. package/dist/ui/avatar.js.map +1 -0
  66. package/dist/ui/badge.d.ts +11 -0
  67. package/dist/ui/badge.d.ts.map +1 -0
  68. package/dist/ui/badge.js +41 -0
  69. package/dist/ui/badge.js.map +1 -0
  70. package/dist/ui/breadcrumb.d.ts +14 -0
  71. package/dist/ui/breadcrumb.d.ts.map +1 -0
  72. package/dist/ui/breadcrumb.js +30 -0
  73. package/dist/ui/breadcrumb.js.map +1 -0
  74. package/dist/ui/button-group.d.ts +12 -0
  75. package/dist/ui/button-group.d.ts.map +1 -0
  76. package/dist/ui/button-group.js +28 -0
  77. package/dist/ui/button-group.js.map +1 -0
  78. package/dist/ui/button.d.ts +11 -0
  79. package/dist/ui/button.d.ts.map +1 -0
  80. package/dist/ui/button.js +37 -0
  81. package/dist/ui/button.js.map +1 -0
  82. package/dist/ui/card.d.ts +10 -0
  83. package/dist/ui/card.d.ts.map +1 -0
  84. package/dist/ui/card.js +26 -0
  85. package/dist/ui/card.js.map +1 -0
  86. package/dist/ui/checkbox.d.ts +5 -0
  87. package/dist/ui/checkbox.d.ts.map +1 -0
  88. package/dist/ui/checkbox.js +11 -0
  89. package/dist/ui/checkbox.js.map +1 -0
  90. package/dist/ui/collapsible.d.ts +6 -0
  91. package/dist/ui/collapsible.d.ts.map +1 -0
  92. package/dist/ui/collapsible.js +14 -0
  93. package/dist/ui/collapsible.js.map +1 -0
  94. package/dist/ui/command.d.ts +19 -0
  95. package/dist/ui/command.d.ts.map +1 -0
  96. package/dist/ui/command.js +37 -0
  97. package/dist/ui/command.js.map +1 -0
  98. package/dist/ui/dialog.d.ts +19 -0
  99. package/dist/ui/dialog.d.ts.map +1 -0
  100. package/dist/ui/dialog.js +40 -0
  101. package/dist/ui/dialog.js.map +1 -0
  102. package/dist/ui/dropdown-menu.d.ts +26 -0
  103. package/dist/ui/dropdown-menu.d.ts.map +1 -0
  104. package/dist/ui/dropdown-menu.js +53 -0
  105. package/dist/ui/dropdown-menu.js.map +1 -0
  106. package/dist/ui/empty.d.ts +12 -0
  107. package/dist/ui/empty.d.ts.map +1 -0
  108. package/dist/ui/empty.js +34 -0
  109. package/dist/ui/empty.js.map +1 -0
  110. package/dist/ui/field.d.ts +25 -0
  111. package/dist/ui/field.d.ts.map +1 -0
  112. package/dist/ui/field.js +77 -0
  113. package/dist/ui/field.js.map +1 -0
  114. package/dist/ui/input-group.d.ts +17 -0
  115. package/dist/ui/input-group.d.ts.map +1 -0
  116. package/dist/ui/input-group.js +65 -0
  117. package/dist/ui/input-group.js.map +1 -0
  118. package/dist/ui/input.d.ts +4 -0
  119. package/dist/ui/input.d.ts.map +1 -0
  120. package/dist/ui/input.js +8 -0
  121. package/dist/ui/input.js.map +1 -0
  122. package/dist/ui/item.d.ts +24 -0
  123. package/dist/ui/item.d.ts.map +1 -0
  124. package/dist/ui/item.js +68 -0
  125. package/dist/ui/item.js.map +1 -0
  126. package/dist/ui/kbd.d.ts +4 -0
  127. package/dist/ui/kbd.d.ts.map +1 -0
  128. package/dist/ui/kbd.js +10 -0
  129. package/dist/ui/kbd.js.map +1 -0
  130. package/dist/ui/label.d.ts +5 -0
  131. package/dist/ui/label.d.ts.map +1 -0
  132. package/dist/ui/label.js +10 -0
  133. package/dist/ui/label.js.map +1 -0
  134. package/dist/ui/popover.d.ts +11 -0
  135. package/dist/ui/popover.d.ts.map +1 -0
  136. package/dist/ui/popover.js +28 -0
  137. package/dist/ui/popover.js.map +1 -0
  138. package/dist/ui/progress.d.ts +5 -0
  139. package/dist/ui/progress.d.ts.map +1 -0
  140. package/dist/ui/progress.js +10 -0
  141. package/dist/ui/progress.js.map +1 -0
  142. package/dist/ui/scroll-area.d.ts +6 -0
  143. package/dist/ui/scroll-area.d.ts.map +1 -0
  144. package/dist/ui/scroll-area.js +15 -0
  145. package/dist/ui/scroll-area.js.map +1 -0
  146. package/dist/ui/select.d.ts +16 -0
  147. package/dist/ui/select.d.ts.map +1 -0
  148. package/dist/ui/select.js +40 -0
  149. package/dist/ui/select.js.map +1 -0
  150. package/dist/ui/separator.d.ts +5 -0
  151. package/dist/ui/separator.d.ts.map +1 -0
  152. package/dist/ui/separator.js +10 -0
  153. package/dist/ui/separator.js.map +1 -0
  154. package/dist/ui/sheet.d.ts +16 -0
  155. package/dist/ui/sheet.d.ts.map +1 -0
  156. package/dist/ui/sheet.js +43 -0
  157. package/dist/ui/sheet.js.map +1 -0
  158. package/dist/ui/sidebar.d.ts +76 -0
  159. package/dist/ui/sidebar.d.ts.map +1 -0
  160. package/dist/ui/sidebar.js +216 -0
  161. package/dist/ui/sidebar.js.map +1 -0
  162. package/dist/ui/skeleton.d.ts +3 -0
  163. package/dist/ui/skeleton.d.ts.map +1 -0
  164. package/dist/ui/skeleton.js +7 -0
  165. package/dist/ui/skeleton.js.map +1 -0
  166. package/dist/ui/sonner.d.ts +4 -0
  167. package/dist/ui/sonner.d.ts.map +1 -0
  168. package/dist/ui/sonner.js +22 -0
  169. package/dist/ui/sonner.js.map +1 -0
  170. package/dist/ui/spinner.d.ts +3 -0
  171. package/dist/ui/spinner.d.ts.map +1 -0
  172. package/dist/ui/spinner.js +9 -0
  173. package/dist/ui/spinner.js.map +1 -0
  174. package/dist/ui/switch-thumb.d.ts +7 -0
  175. package/dist/ui/switch-thumb.d.ts.map +1 -0
  176. package/dist/ui/switch-thumb.js +7 -0
  177. package/dist/ui/switch-thumb.js.map +1 -0
  178. package/dist/ui/switch.d.ts +7 -0
  179. package/dist/ui/switch.d.ts.map +1 -0
  180. package/dist/ui/switch.js +11 -0
  181. package/dist/ui/switch.js.map +1 -0
  182. package/dist/ui/table.d.ts +11 -0
  183. package/dist/ui/table.d.ts.map +1 -0
  184. package/dist/ui/table.js +30 -0
  185. package/dist/ui/table.js.map +1 -0
  186. package/dist/ui/tabs.d.ts +12 -0
  187. package/dist/ui/tabs.d.ts.map +1 -0
  188. package/dist/ui/tabs.js +31 -0
  189. package/dist/ui/tabs.js.map +1 -0
  190. package/dist/ui/textarea.d.ts +4 -0
  191. package/dist/ui/textarea.d.ts.map +1 -0
  192. package/dist/ui/textarea.js +8 -0
  193. package/dist/ui/textarea.js.map +1 -0
  194. package/dist/ui/tooltip.d.ts +8 -0
  195. package/dist/ui/tooltip.d.ts.map +1 -0
  196. package/dist/ui/tooltip.js +19 -0
  197. package/dist/ui/tooltip.js.map +1 -0
  198. package/package.json +69 -4
  199. package/src/index.ts +50 -0
  200. package/src/lib/utils.ts +9 -0
  201. package/src/messages/en.ts +12 -0
  202. package/src/messages/index.ts +6 -0
  203. package/src/notion/PageFrame.tsx +18 -0
  204. package/src/notion/PageHeader.tsx +62 -0
  205. package/src/notion/PropertyList.tsx +38 -0
  206. package/src/notion/Status.tsx +44 -0
  207. package/src/notion/icon-stroke.ts +2 -0
  208. package/src/notion/palette.ts +5 -0
  209. package/src/sft-bridge.css +47 -0
  210. package/src/tokens.ts +140 -0
  211. package/src/ui/accordion.tsx +65 -0
  212. package/src/ui/alert-dialog.tsx +196 -0
  213. package/src/ui/alert.tsx +74 -0
  214. package/src/ui/avatar.tsx +108 -0
  215. package/src/ui/badge.tsx +63 -0
  216. package/src/ui/breadcrumb.tsx +113 -0
  217. package/src/ui/button-group.tsx +83 -0
  218. package/src/ui/button.tsx +62 -0
  219. package/src/ui/card.tsx +91 -0
  220. package/src/ui/checkbox.tsx +31 -0
  221. package/src/ui/collapsible.tsx +33 -0
  222. package/src/ui/command.tsx +185 -0
  223. package/src/ui/dialog.tsx +162 -0
  224. package/src/ui/dropdown-menu.tsx +256 -0
  225. package/src/ui/empty.tsx +103 -0
  226. package/src/ui/field.tsx +248 -0
  227. package/src/ui/input-group.tsx +170 -0
  228. package/src/ui/input.tsx +20 -0
  229. package/src/ui/item.tsx +193 -0
  230. package/src/ui/kbd.tsx +28 -0
  231. package/src/ui/label.tsx +23 -0
  232. package/src/ui/popover.tsx +88 -0
  233. package/src/ui/progress.tsx +30 -0
  234. package/src/ui/scroll-area.tsx +57 -0
  235. package/src/ui/select.tsx +189 -0
  236. package/src/ui/separator.tsx +27 -0
  237. package/src/ui/sheet.tsx +146 -0
  238. package/src/ui/sidebar.tsx +744 -0
  239. package/src/ui/skeleton.tsx +13 -0
  240. package/src/ui/sonner.tsx +39 -0
  241. package/src/ui/spinner.tsx +16 -0
  242. package/src/ui/switch-thumb.ts +6 -0
  243. package/src/ui/switch.tsx +36 -0
  244. package/src/ui/table.tsx +115 -0
  245. package/src/ui/tabs.tsx +90 -0
  246. package/src/ui/textarea.tsx +17 -0
  247. package/src/ui/tooltip.tsx +55 -0
@@ -0,0 +1,189 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { cn } from "../lib/utils.js"
5
+ import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"
6
+ import { Select as SelectPrimitive } from "radix-ui"
7
+
8
+ function Select({
9
+ ...props
10
+ }: React.ComponentProps<typeof SelectPrimitive.Root>) {
11
+ return <SelectPrimitive.Root data-slot="select" {...props} />
12
+ }
13
+
14
+ function SelectGroup({
15
+ ...props
16
+ }: React.ComponentProps<typeof SelectPrimitive.Group>) {
17
+ return <SelectPrimitive.Group data-slot="select-group" {...props} />
18
+ }
19
+
20
+ function SelectValue({
21
+ ...props
22
+ }: React.ComponentProps<typeof SelectPrimitive.Value>) {
23
+ return <SelectPrimitive.Value data-slot="select-value" {...props} />
24
+ }
25
+
26
+ function SelectTrigger({
27
+ className,
28
+ size = "default",
29
+ children,
30
+ ...props
31
+ }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
32
+ size?: "sm" | "default"
33
+ }) {
34
+ return (
35
+ <SelectPrimitive.Trigger
36
+ data-slot="select-trigger"
37
+ data-size={size}
38
+ className={cn(
39
+ "flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-field px-2.5 py-1 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-7 data-[size=sm]:h-6 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
40
+ className
41
+ )}
42
+ {...props}
43
+ >
44
+ {children}
45
+ <SelectPrimitive.Icon asChild>
46
+ <ChevronDownIcon className="size-4 opacity-50" />
47
+ </SelectPrimitive.Icon>
48
+ </SelectPrimitive.Trigger>
49
+ )
50
+ }
51
+
52
+ function SelectContent({
53
+ className,
54
+ children,
55
+ position = "item-aligned",
56
+ align = "center",
57
+ ...props
58
+ }: React.ComponentProps<typeof SelectPrimitive.Content>) {
59
+ return (
60
+ <SelectPrimitive.Portal>
61
+ <SelectPrimitive.Content
62
+ data-slot="select-content"
63
+ className={cn(
64
+ "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-xl bg-popover text-popover-foreground shadow-menu data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
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
+ align={align}
71
+ {...props}
72
+ >
73
+ <SelectScrollUpButton />
74
+ <SelectPrimitive.Viewport
75
+ className={cn(
76
+ "p-1",
77
+ position === "popper" &&
78
+ "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
79
+ )}
80
+ >
81
+ {children}
82
+ </SelectPrimitive.Viewport>
83
+ <SelectScrollDownButton />
84
+ </SelectPrimitive.Content>
85
+ </SelectPrimitive.Portal>
86
+ )
87
+ }
88
+
89
+ function SelectLabel({
90
+ className,
91
+ ...props
92
+ }: React.ComponentProps<typeof SelectPrimitive.Label>) {
93
+ return (
94
+ <SelectPrimitive.Label
95
+ data-slot="select-label"
96
+ className={cn("px-2 py-1.5 text-xs text-muted-foreground", className)}
97
+ {...props}
98
+ />
99
+ )
100
+ }
101
+
102
+ function SelectItem({
103
+ className,
104
+ children,
105
+ ...props
106
+ }: React.ComponentProps<typeof SelectPrimitive.Item>) {
107
+ return (
108
+ <SelectPrimitive.Item
109
+ data-slot="select-item"
110
+ className={cn(
111
+ "relative flex w-full cursor-default items-center gap-2 rounded-md py-1 min-h-7 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent 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",
112
+ className
113
+ )}
114
+ {...props}
115
+ >
116
+ <span
117
+ data-slot="select-item-indicator"
118
+ className="absolute right-2 flex size-3.5 items-center justify-center"
119
+ >
120
+ <SelectPrimitive.ItemIndicator>
121
+ <CheckIcon className="size-4" />
122
+ </SelectPrimitive.ItemIndicator>
123
+ </span>
124
+ <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
125
+ </SelectPrimitive.Item>
126
+ )
127
+ }
128
+
129
+ function SelectSeparator({
130
+ className,
131
+ ...props
132
+ }: React.ComponentProps<typeof SelectPrimitive.Separator>) {
133
+ return (
134
+ <SelectPrimitive.Separator
135
+ data-slot="select-separator"
136
+ className={cn("pointer-events-none -mx-1 my-1 h-px bg-border", className)}
137
+ {...props}
138
+ />
139
+ )
140
+ }
141
+
142
+ function SelectScrollUpButton({
143
+ className,
144
+ ...props
145
+ }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
146
+ return (
147
+ <SelectPrimitive.ScrollUpButton
148
+ data-slot="select-scroll-up-button"
149
+ className={cn(
150
+ "flex cursor-default items-center justify-center py-1",
151
+ className
152
+ )}
153
+ {...props}
154
+ >
155
+ <ChevronUpIcon className="flex cursor-default items-center justify-center py-1" />
156
+ </SelectPrimitive.ScrollUpButton>
157
+ )
158
+ }
159
+
160
+ function SelectScrollDownButton({
161
+ className,
162
+ ...props
163
+ }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
164
+ return (
165
+ <SelectPrimitive.ScrollDownButton
166
+ data-slot="select-scroll-down-button"
167
+ className={cn(
168
+ "flex cursor-default items-center justify-center py-1",
169
+ className
170
+ )}
171
+ {...props}
172
+ >
173
+ <ChevronDownIcon className="size-4" />
174
+ </SelectPrimitive.ScrollDownButton>
175
+ )
176
+ }
177
+
178
+ export {
179
+ Select,
180
+ SelectContent,
181
+ SelectGroup,
182
+ SelectItem,
183
+ SelectLabel,
184
+ SelectScrollDownButton,
185
+ SelectScrollUpButton,
186
+ SelectSeparator,
187
+ SelectTrigger,
188
+ SelectValue,
189
+ }
@@ -0,0 +1,27 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { cn } from "../lib/utils.js"
5
+ import { Separator as SeparatorPrimitive } from "radix-ui"
6
+
7
+ function Separator({
8
+ className,
9
+ orientation = "horizontal",
10
+ decorative = true,
11
+ ...props
12
+ }: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
13
+ return (
14
+ <SeparatorPrimitive.Root
15
+ data-slot="separator"
16
+ decorative={decorative}
17
+ orientation={orientation}
18
+ className={cn(
19
+ "shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
20
+ className
21
+ )}
22
+ {...props}
23
+ />
24
+ )
25
+ }
26
+
27
+ export { Separator }
@@ -0,0 +1,146 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { en as messages } from "../messages/en.js"
5
+ import { cn } from "../lib/utils.js"
6
+ import { XIcon } from "lucide-react"
7
+ import { Dialog as SheetPrimitive } from "radix-ui"
8
+
9
+ function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
10
+ return <SheetPrimitive.Root data-slot="sheet" {...props} />
11
+ }
12
+
13
+ function SheetTrigger({
14
+ ...props
15
+ }: React.ComponentProps<typeof SheetPrimitive.Trigger>) {
16
+ return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />
17
+ }
18
+
19
+ function SheetClose({
20
+ ...props
21
+ }: React.ComponentProps<typeof SheetPrimitive.Close>) {
22
+ return <SheetPrimitive.Close data-slot="sheet-close" {...props} />
23
+ }
24
+
25
+ function SheetPortal({
26
+ ...props
27
+ }: React.ComponentProps<typeof SheetPrimitive.Portal>) {
28
+ return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />
29
+ }
30
+
31
+ function SheetOverlay({
32
+ className,
33
+ ...props
34
+ }: React.ComponentProps<typeof SheetPrimitive.Overlay>) {
35
+ return (
36
+ <SheetPrimitive.Overlay
37
+ data-slot="sheet-overlay"
38
+ className={cn(
39
+ "fixed inset-0 z-50 bg-overlay data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
40
+ className
41
+ )}
42
+ {...props}
43
+ />
44
+ )
45
+ }
46
+
47
+ function SheetContent({
48
+ className,
49
+ children,
50
+ side = "right",
51
+ showCloseButton = true,
52
+ closeLabel = messages.sheet.close,
53
+ ...props
54
+ }: React.ComponentProps<typeof SheetPrimitive.Content> & {
55
+ side?: "top" | "right" | "bottom" | "left"
56
+ showCloseButton?: boolean
57
+ // The close button's hidden text, from the app's message layer.
58
+ closeLabel?: string
59
+ }) {
60
+ return (
61
+ <SheetPortal>
62
+ <SheetOverlay />
63
+ <SheetPrimitive.Content
64
+ data-slot="sheet-content"
65
+ className={cn(
66
+ "fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500",
67
+ side === "right" &&
68
+ "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
69
+ side === "left" &&
70
+ "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
71
+ side === "top" &&
72
+ "inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
73
+ side === "bottom" &&
74
+ "inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
75
+ className
76
+ )}
77
+ {...props}
78
+ >
79
+ {children}
80
+ {showCloseButton && (
81
+ <SheetPrimitive.Close className="absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary">
82
+ <XIcon className="size-4" />
83
+ <span className="sr-only">{closeLabel}</span>
84
+ </SheetPrimitive.Close>
85
+ )}
86
+ </SheetPrimitive.Content>
87
+ </SheetPortal>
88
+ )
89
+ }
90
+
91
+ function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
92
+ return (
93
+ <div
94
+ data-slot="sheet-header"
95
+ className={cn("flex flex-col gap-1.5 p-4", className)}
96
+ {...props}
97
+ />
98
+ )
99
+ }
100
+
101
+ function SheetFooter({ className, ...props }: React.ComponentProps<"div">) {
102
+ return (
103
+ <div
104
+ data-slot="sheet-footer"
105
+ className={cn("mt-auto flex flex-col gap-2 p-4", className)}
106
+ {...props}
107
+ />
108
+ )
109
+ }
110
+
111
+ function SheetTitle({
112
+ className,
113
+ ...props
114
+ }: React.ComponentProps<typeof SheetPrimitive.Title>) {
115
+ return (
116
+ <SheetPrimitive.Title
117
+ data-slot="sheet-title"
118
+ className={cn("font-semibold text-foreground", className)}
119
+ {...props}
120
+ />
121
+ )
122
+ }
123
+
124
+ function SheetDescription({
125
+ className,
126
+ ...props
127
+ }: React.ComponentProps<typeof SheetPrimitive.Description>) {
128
+ return (
129
+ <SheetPrimitive.Description
130
+ data-slot="sheet-description"
131
+ className={cn("text-sm text-muted-foreground", className)}
132
+ {...props}
133
+ />
134
+ )
135
+ }
136
+
137
+ export {
138
+ Sheet,
139
+ SheetTrigger,
140
+ SheetClose,
141
+ SheetContent,
142
+ SheetHeader,
143
+ SheetFooter,
144
+ SheetTitle,
145
+ SheetDescription,
146
+ }