@stagewise/ui 0.1.0

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 (266) hide show
  1. package/README.md +135 -0
  2. package/package.json +80 -0
  3. package/src/components/ui/accordion.tsx +66 -0
  4. package/src/components/ui/alert-dialog.tsx +185 -0
  5. package/src/components/ui/alert.tsx +76 -0
  6. package/src/components/ui/aspect-ratio.tsx +22 -0
  7. package/src/components/ui/avatar.tsx +107 -0
  8. package/src/components/ui/badge.tsx +52 -0
  9. package/src/components/ui/breadcrumb.tsx +125 -0
  10. package/src/components/ui/bubble.tsx +128 -0
  11. package/src/components/ui/button-group.tsx +87 -0
  12. package/src/components/ui/button.tsx +58 -0
  13. package/src/components/ui/calendar.tsx +221 -0
  14. package/src/components/ui/card.tsx +103 -0
  15. package/src/components/ui/carousel.tsx +240 -0
  16. package/src/components/ui/chart.tsx +371 -0
  17. package/src/components/ui/checkbox.tsx +30 -0
  18. package/src/components/ui/collapsible.tsx +19 -0
  19. package/src/components/ui/combobox.tsx +295 -0
  20. package/src/components/ui/command.tsx +348 -0
  21. package/src/components/ui/context-menu.tsx +271 -0
  22. package/src/components/ui/dialog.tsx +160 -0
  23. package/src/components/ui/direction.tsx +4 -0
  24. package/src/components/ui/drawer.tsx +228 -0
  25. package/src/components/ui/dropdown-menu.tsx +266 -0
  26. package/src/components/ui/empty.tsx +104 -0
  27. package/src/components/ui/field.tsx +236 -0
  28. package/src/components/ui/hover-card.tsx +51 -0
  29. package/src/components/ui/input-group.tsx +158 -0
  30. package/src/components/ui/input-otp.tsx +85 -0
  31. package/src/components/ui/input.tsx +20 -0
  32. package/src/components/ui/item.tsx +201 -0
  33. package/src/components/ui/kbd.tsx +26 -0
  34. package/src/components/ui/label.tsx +20 -0
  35. package/src/components/ui/marker.tsx +71 -0
  36. package/src/components/ui/menubar.tsx +280 -0
  37. package/src/components/ui/message.tsx +92 -0
  38. package/src/components/ui/native-select.tsx +61 -0
  39. package/src/components/ui/navigation-menu.tsx +168 -0
  40. package/src/components/ui/pagination.tsx +130 -0
  41. package/src/components/ui/popover.tsx +88 -0
  42. package/src/components/ui/progress.tsx +83 -0
  43. package/src/components/ui/questionnaire.tsx +324 -0
  44. package/src/components/ui/radio-group.tsx +36 -0
  45. package/src/components/ui/resizable.tsx +50 -0
  46. package/src/components/ui/scroll-area.tsx +53 -0
  47. package/src/components/ui/select.tsx +201 -0
  48. package/src/components/ui/separator.tsx +23 -0
  49. package/src/components/ui/sheet.tsx +136 -0
  50. package/src/components/ui/sidebar.tsx +723 -0
  51. package/src/components/ui/skeleton.tsx +13 -0
  52. package/src/components/ui/slider.tsx +52 -0
  53. package/src/components/ui/spinner.tsx +10 -0
  54. package/src/components/ui/switch.tsx +32 -0
  55. package/src/components/ui/table.tsx +114 -0
  56. package/src/components/ui/tabs.tsx +82 -0
  57. package/src/components/ui/textarea.tsx +18 -0
  58. package/src/components/ui/toast.tsx +234 -0
  59. package/src/components/ui/toggle-group.tsx +87 -0
  60. package/src/components/ui/toggle.tsx +43 -0
  61. package/src/components/ui/tooltip.tsx +66 -0
  62. package/src/fonts/OFL.txt +92 -0
  63. package/src/fonts/geist-variable-italic.woff2 +0 -0
  64. package/src/fonts/geist-variable.woff2 +0 -0
  65. package/src/hooks/use-mobile.ts +19 -0
  66. package/src/icons/custom/index.ts +1 -0
  67. package/src/icons/custom/ui-outline-18/Icon.tsx +28 -0
  68. package/src/icons/custom/ui-outline-18/IconBrowserTab.tsx +40 -0
  69. package/src/icons/custom/ui-outline-18/IconNewTerminal.tsx +77 -0
  70. package/src/icons/custom/ui-outline-18/index.ts +3 -0
  71. package/src/icons/index.ts +52 -0
  72. package/src/icons/nucleo/LICENSE.md +29 -0
  73. package/src/icons/nucleo/core-outline-24/Icon.tsx +27 -0
  74. package/src/icons/nucleo/core-outline-24/IconArrowUpOutline24.tsx +36 -0
  75. package/src/icons/nucleo/core-outline-24/IconBluetoothOutline24.tsx +26 -0
  76. package/src/icons/nucleo/core-outline-24/IconTrash2Outline24.tsx +76 -0
  77. package/src/icons/nucleo/core-outline-24/IconUsbOutline24.tsx +64 -0
  78. package/src/icons/nucleo/core-outline-24/index.ts +5 -0
  79. package/src/icons/nucleo/index.ts +48 -0
  80. package/src/icons/nucleo/micro-bold/Icon.tsx +27 -0
  81. package/src/icons/nucleo/micro-bold/IconArrowLeft.tsx +28 -0
  82. package/src/icons/nucleo/micro-bold/IconArrowRight.tsx +28 -0
  83. package/src/icons/nucleo/micro-bold/IconArrowRotateAnticlockwise.tsx +27 -0
  84. package/src/icons/nucleo/micro-bold/IconChevronLeft.tsx +16 -0
  85. package/src/icons/nucleo/micro-bold/IconChevronRight.tsx +16 -0
  86. package/src/icons/nucleo/micro-bold/IconClipboardContent.tsx +59 -0
  87. package/src/icons/nucleo/micro-bold/IconMagicWandSparkle.tsx +44 -0
  88. package/src/icons/nucleo/micro-bold/IconTriangleWarning.tsx +30 -0
  89. package/src/icons/nucleo/micro-bold/IconXmark.tsx +31 -0
  90. package/src/icons/nucleo/micro-bold/index.ts +10 -0
  91. package/src/icons/nucleo/social-media/Icon.tsx +27 -0
  92. package/src/icons/nucleo/social-media/IconApple.tsx +12 -0
  93. package/src/icons/nucleo/social-media/IconGithub.tsx +11 -0
  94. package/src/icons/nucleo/social-media/IconGoogle.tsx +20 -0
  95. package/src/icons/nucleo/social-media/index.ts +4 -0
  96. package/src/icons/nucleo/ui-fill-18/Icon.tsx +27 -0
  97. package/src/icons/nucleo/ui-fill-18/IconArrowLeftFill18.tsx +17 -0
  98. package/src/icons/nucleo/ui-fill-18/IconArrowRightFill18.tsx +17 -0
  99. package/src/icons/nucleo/ui-fill-18/IconCheckFill18.tsx +12 -0
  100. package/src/icons/nucleo/ui-fill-18/IconChevronDownFill18.tsx +12 -0
  101. package/src/icons/nucleo/ui-fill-18/IconGlobe2Fill18.tsx +17 -0
  102. package/src/icons/nucleo/ui-fill-18/IconLinkFill18.tsx +21 -0
  103. package/src/icons/nucleo/ui-fill-18/IconMediaStopFill18.tsx +17 -0
  104. package/src/icons/nucleo/ui-fill-18/IconPinTackFill18.tsx +17 -0
  105. package/src/icons/nucleo/ui-fill-18/IconPlusFill18.tsx +17 -0
  106. package/src/icons/nucleo/ui-fill-18/IconVolumeUpFill18.tsx +22 -0
  107. package/src/icons/nucleo/ui-fill-18/IconVolumeXmarkFill18.tsx +17 -0
  108. package/src/icons/nucleo/ui-fill-18/IconXmarkFill18.tsx +17 -0
  109. package/src/icons/nucleo/ui-fill-18/index.ts +13 -0
  110. package/src/icons/nucleo/ui-fill-duo-18/Icon.tsx +27 -0
  111. package/src/icons/nucleo/ui-fill-duo-18/IconBrainNodesFillDuo18.tsx +32 -0
  112. package/src/icons/nucleo/ui-fill-duo-18/IconCloudeCodeFillDuo18.tsx +25 -0
  113. package/src/icons/nucleo/ui-fill-duo-18/IconDatabaseFillDuo18.tsx +24 -0
  114. package/src/icons/nucleo/ui-fill-duo-18/IconDownload4FillDuo18.tsx +18 -0
  115. package/src/icons/nucleo/ui-fill-duo-18/IconEarthFillDuo18.tsx +20 -0
  116. package/src/icons/nucleo/ui-fill-duo-18/IconFinderFillDuo18.tsx +36 -0
  117. package/src/icons/nucleo/ui-fill-duo-18/IconFolderContent2FillDuo18.tsx +22 -0
  118. package/src/icons/nucleo/ui-fill-duo-18/IconGear3FillDuo18.tsx +18 -0
  119. package/src/icons/nucleo/ui-fill-duo-18/IconHistoryFillDuo18.tsx +20 -0
  120. package/src/icons/nucleo/ui-fill-duo-18/IconLockKeyFillDuo18.tsx +24 -0
  121. package/src/icons/nucleo/ui-fill-duo-18/IconNoteFillDuo18.tsx +34 -0
  122. package/src/icons/nucleo/ui-fill-duo-18/IconPenDrawSparkleFillDuo18.tsx +34 -0
  123. package/src/icons/nucleo/ui-fill-duo-18/IconServerFillDuo18.tsx +22 -0
  124. package/src/icons/nucleo/ui-fill-duo-18/IconSpace3dFillDuo18.tsx +24 -0
  125. package/src/icons/nucleo/ui-fill-duo-18/IconTriangleWarningFillDuo18.tsx +24 -0
  126. package/src/icons/nucleo/ui-fill-duo-18/index.ts +16 -0
  127. package/src/icons/nucleo/ui-outline-18/Icon.tsx +27 -0
  128. package/src/icons/nucleo/ui-outline-18/IconArrowDownOutline18.tsx +33 -0
  129. package/src/icons/nucleo/ui-outline-18/IconArrowRightOutline18.tsx +34 -0
  130. package/src/icons/nucleo/ui-outline-18/IconArrowUpRightOutline18.tsx +34 -0
  131. package/src/icons/nucleo/ui-outline-18/IconArrowsOppositeDirectionXOutline18.tsx +54 -0
  132. package/src/icons/nucleo/ui-outline-18/IconArrowsToCenterOutline18.tsx +101 -0
  133. package/src/icons/nucleo/ui-outline-18/IconBanOutline18.tsx +37 -0
  134. package/src/icons/nucleo/ui-outline-18/IconBellDotOutline18.tsx +43 -0
  135. package/src/icons/nucleo/ui-outline-18/IconBookOpen5Outline18.tsx +40 -0
  136. package/src/icons/nucleo/ui-outline-18/IconBookOpenOutline18.tsx +32 -0
  137. package/src/icons/nucleo/ui-outline-18/IconBooks2Outline18.tsx +100 -0
  138. package/src/icons/nucleo/ui-outline-18/IconBoxSparkleOutline18.tsx +75 -0
  139. package/src/icons/nucleo/ui-outline-18/IconBrainOutline18.tsx +57 -0
  140. package/src/icons/nucleo/ui-outline-18/IconBranchOutOutline18.tsx +52 -0
  141. package/src/icons/nucleo/ui-outline-18/IconBugOutline18.tsx +98 -0
  142. package/src/icons/nucleo/ui-outline-18/IconCameraOutline18.tsx +42 -0
  143. package/src/icons/nucleo/ui-outline-18/IconChartPieOutline18.tsx +30 -0
  144. package/src/icons/nucleo/ui-outline-18/IconCheck2Outline18.tsx +23 -0
  145. package/src/icons/nucleo/ui-outline-18/IconCheckOutline18.tsx +23 -0
  146. package/src/icons/nucleo/ui-outline-18/IconChevronDownOutline18.tsx +22 -0
  147. package/src/icons/nucleo/ui-outline-18/IconChevronExpandYOutline18.tsx +31 -0
  148. package/src/icons/nucleo/ui-outline-18/IconChevronLeftOutline18.tsx +22 -0
  149. package/src/icons/nucleo/ui-outline-18/IconChevronReduceYOutline18.tsx +31 -0
  150. package/src/icons/nucleo/ui-outline-18/IconChevronRightOutline18.tsx +22 -0
  151. package/src/icons/nucleo/ui-outline-18/IconChevronUpOutline18.tsx +22 -0
  152. package/src/icons/nucleo/ui-outline-18/IconCircleCheckOutline18.tsx +32 -0
  153. package/src/icons/nucleo/ui-outline-18/IconCircleInfoOutline18.tsx +37 -0
  154. package/src/icons/nucleo/ui-outline-18/IconCircleQuestionOutline18.tsx +39 -0
  155. package/src/icons/nucleo/ui-outline-18/IconClipboardContentOutline18.tsx +60 -0
  156. package/src/icons/nucleo/ui-outline-18/IconClipboardOutline18.tsx +37 -0
  157. package/src/icons/nucleo/ui-outline-18/IconClone2Outline18.tsx +32 -0
  158. package/src/icons/nucleo/ui-outline-18/IconCloneDashed2Outline18.tsx +49 -0
  159. package/src/icons/nucleo/ui-outline-18/IconCodeBranchOutline18.tsx +65 -0
  160. package/src/icons/nucleo/ui-outline-18/IconCodeCommitOutline18.tsx +48 -0
  161. package/src/icons/nucleo/ui-outline-18/IconColorPaletteOutline18.tsx +56 -0
  162. package/src/icons/nucleo/ui-outline-18/IconConnection2Outline18.tsx +43 -0
  163. package/src/icons/nucleo/ui-outline-18/IconCopyIdOutline18.tsx +52 -0
  164. package/src/icons/nucleo/ui-outline-18/IconCopyOutline18.tsx +32 -0
  165. package/src/icons/nucleo/ui-outline-18/IconCreditCardOutline18.tsx +61 -0
  166. package/src/icons/nucleo/ui-outline-18/IconDatabaseSearchOutline18.tsx +64 -0
  167. package/src/icons/nucleo/ui-outline-18/IconDotsOutline18.tsx +46 -0
  168. package/src/icons/nucleo/ui-outline-18/IconDownload4Outline18.tsx +43 -0
  169. package/src/icons/nucleo/ui-outline-18/IconEarthOutline18.tsx +47 -0
  170. package/src/icons/nucleo/ui-outline-18/IconEarthSearchOutline18.tsx +61 -0
  171. package/src/icons/nucleo/ui-outline-18/IconEnvelopeOutline18.tsx +38 -0
  172. package/src/icons/nucleo/ui-outline-18/IconEye2Outline18.tsx +34 -0
  173. package/src/icons/nucleo/ui-outline-18/IconEyeOutline18.tsx +32 -0
  174. package/src/icons/nucleo/ui-outline-18/IconFilePenOutline18.tsx +56 -0
  175. package/src/icons/nucleo/ui-outline-18/IconFileSearchOutline18.tsx +64 -0
  176. package/src/icons/nucleo/ui-outline-18/IconFloppyDiskOutline18.tsx +40 -0
  177. package/src/icons/nucleo/ui-outline-18/IconFolder5Outline18.tsx +37 -0
  178. package/src/icons/nucleo/ui-outline-18/IconFolderCloudOutline18.tsx +39 -0
  179. package/src/icons/nucleo/ui-outline-18/IconFolderOpenOutline18.tsx +31 -0
  180. package/src/icons/nucleo/ui-outline-18/IconFolderOutline18.tsx +32 -0
  181. package/src/icons/nucleo/ui-outline-18/IconFolderPenOutline18.tsx +40 -0
  182. package/src/icons/nucleo/ui-outline-18/IconFolderPlusOutline18.tsx +48 -0
  183. package/src/icons/nucleo/ui-outline-18/IconFolderSearchOutline18.tsx +48 -0
  184. package/src/icons/nucleo/ui-outline-18/IconGear2Outline18.tsx +193 -0
  185. package/src/icons/nucleo/ui-outline-18/IconGear3Outline18.tsx +32 -0
  186. package/src/icons/nucleo/ui-outline-18/IconGlobe3Outline18.tsx +61 -0
  187. package/src/icons/nucleo/ui-outline-18/IconGripDotsVerticalOutline18.tsx +74 -0
  188. package/src/icons/nucleo/ui-outline-18/IconHardDriveOutline18.tsx +40 -0
  189. package/src/icons/nucleo/ui-outline-18/IconHelpChatOutline18.tsx +47 -0
  190. package/src/icons/nucleo/ui-outline-18/IconHotDrinkOutline18.tsx +60 -0
  191. package/src/icons/nucleo/ui-outline-18/IconImageSparkle3Outline18.tsx +41 -0
  192. package/src/icons/nucleo/ui-outline-18/IconKey2Outline18.tsx +61 -0
  193. package/src/icons/nucleo/ui-outline-18/IconLoader6Outline18.tsx +23 -0
  194. package/src/icons/nucleo/ui-outline-18/IconLocation2Outline18.tsx +45 -0
  195. package/src/icons/nucleo/ui-outline-18/IconLockKeyOutline18.tsx +58 -0
  196. package/src/icons/nucleo/ui-outline-18/IconMagicWandOutline18.tsx +32 -0
  197. package/src/icons/nucleo/ui-outline-18/IconMagnifierMinusOutline18.tsx +39 -0
  198. package/src/icons/nucleo/ui-outline-18/IconMagnifierOutline18.tsx +32 -0
  199. package/src/icons/nucleo/ui-outline-18/IconMagnifierPlusOutline18.tsx +48 -0
  200. package/src/icons/nucleo/ui-outline-18/IconMicrophone3Outline18.tsx +57 -0
  201. package/src/icons/nucleo/ui-outline-18/IconMinusOutline18.tsx +25 -0
  202. package/src/icons/nucleo/ui-outline-18/IconMoonOutline18.tsx +23 -0
  203. package/src/icons/nucleo/ui-outline-18/IconMsgSleepOutline18.tsx +41 -0
  204. package/src/icons/nucleo/ui-outline-18/IconMsgWritingOutline18.tsx +42 -0
  205. package/src/icons/nucleo/ui-outline-18/IconMusicOutline18.tsx +67 -0
  206. package/src/icons/nucleo/ui-outline-18/IconOctagonWarningOutline18.tsx +35 -0
  207. package/src/icons/nucleo/ui-outline-18/IconOpenExternalOutline18.tsx +51 -0
  208. package/src/icons/nucleo/ui-outline-18/IconOpenRectArrowInOutline18.tsx +43 -0
  209. package/src/icons/nucleo/ui-outline-18/IconPanelLeftOutline18.tsx +39 -0
  210. package/src/icons/nucleo/ui-outline-18/IconPaperclip2Outline18.tsx +22 -0
  211. package/src/icons/nucleo/ui-outline-18/IconPen2Outline18.tsx +35 -0
  212. package/src/icons/nucleo/ui-outline-18/IconPenDrawSparkleOutline18.tsx +46 -0
  213. package/src/icons/nucleo/ui-outline-18/IconPenOutline18.tsx +23 -0
  214. package/src/icons/nucleo/ui-outline-18/IconPenPlusOutline18.tsx +47 -0
  215. package/src/icons/nucleo/ui-outline-18/IconPenWriting3Outline18.tsx +31 -0
  216. package/src/icons/nucleo/ui-outline-18/IconPhoneOutline18.tsx +23 -0
  217. package/src/icons/nucleo/ui-outline-18/IconPinTackOutline18.tsx +35 -0
  218. package/src/icons/nucleo/ui-outline-18/IconPinTackSlashOutline18.tsx +47 -0
  219. package/src/icons/nucleo/ui-outline-18/IconPlusOutline18.tsx +38 -0
  220. package/src/icons/nucleo/ui-outline-18/IconPowerOffOutline18.tsx +36 -0
  221. package/src/icons/nucleo/ui-outline-18/IconPresentationScreenVideoOutline18.tsx +55 -0
  222. package/src/icons/nucleo/ui-outline-18/IconPuzzlePieceOutline18.tsx +22 -0
  223. package/src/icons/nucleo/ui-outline-18/IconRedoOutline18.tsx +32 -0
  224. package/src/icons/nucleo/ui-outline-18/IconRefreshAnticlockwiseOutline18.tsx +48 -0
  225. package/src/icons/nucleo/ui-outline-18/IconReuseOutline18.tsx +50 -0
  226. package/src/icons/nucleo/ui-outline-18/IconSearchContentOutline18.tsx +81 -0
  227. package/src/icons/nucleo/ui-outline-18/IconServerOutline18.tsx +73 -0
  228. package/src/icons/nucleo/ui-outline-18/IconSideProfileSparkleOutline18.tsx +28 -0
  229. package/src/icons/nucleo/ui-outline-18/IconSidebarLeftHideOutline18.tsx +49 -0
  230. package/src/icons/nucleo/ui-outline-18/IconSidebarLeftShowOutline18.tsx +49 -0
  231. package/src/icons/nucleo/ui-outline-18/IconSidebarRightHideOutline18.tsx +48 -0
  232. package/src/icons/nucleo/ui-outline-18/IconSidebarRightShowOutline18.tsx +48 -0
  233. package/src/icons/nucleo/ui-outline-18/IconSparkleOutline18.tsx +43 -0
  234. package/src/icons/nucleo/ui-outline-18/IconSpeakerOutline18.tsx +47 -0
  235. package/src/icons/nucleo/ui-outline-18/IconSplitViewOutline18.tsx +32 -0
  236. package/src/icons/nucleo/ui-outline-18/IconSquareCodeOutline18.tsx +40 -0
  237. package/src/icons/nucleo/ui-outline-18/IconSquareDashedOutline18.tsx +94 -0
  238. package/src/icons/nucleo/ui-outline-18/IconSquareTerminalOutline18.tsx +48 -0
  239. package/src/icons/nucleo/ui-outline-18/IconSunOutline18.tsx +121 -0
  240. package/src/icons/nucleo/ui-outline-18/IconTerminalOutline18.tsx +35 -0
  241. package/src/icons/nucleo/ui-outline-18/IconTextAlignLeft2Outline18.tsx +60 -0
  242. package/src/icons/nucleo/ui-outline-18/IconTextBgColorOutline18.tsx +48 -0
  243. package/src/icons/nucleo/ui-outline-18/IconTextColorOutline18.tsx +48 -0
  244. package/src/icons/nucleo/ui-outline-18/IconThumbsDownOutline18.tsx +36 -0
  245. package/src/icons/nucleo/ui-outline-18/IconThumbsUpOutline18.tsx +37 -0
  246. package/src/icons/nucleo/ui-outline-18/IconTrashOutline18.tsx +41 -0
  247. package/src/icons/nucleo/ui-outline-18/IconTriangleWarningOutline18.tsx +37 -0
  248. package/src/icons/nucleo/ui-outline-18/IconUndoOutline18.tsx +32 -0
  249. package/src/icons/nucleo/ui-outline-18/IconVersionsOutline18.tsx +46 -0
  250. package/src/icons/nucleo/ui-outline-18/IconVideoOutline18.tsx +45 -0
  251. package/src/icons/nucleo/ui-outline-18/IconWaveformLinesOutline18.tsx +80 -0
  252. package/src/icons/nucleo/ui-outline-18/IconWindowCodeOutline18.tsx +62 -0
  253. package/src/icons/nucleo/ui-outline-18/IconWindowPointerOutline18.tsx +51 -0
  254. package/src/icons/nucleo/ui-outline-18/IconXmarkOutline18.tsx +38 -0
  255. package/src/icons/nucleo/ui-outline-18/index.ts +128 -0
  256. package/src/index.ts +66 -0
  257. package/src/lib/utils.ts +6 -0
  258. package/src/plugin/index.ts +611 -0
  259. package/src/styles/animations.css +59 -0
  260. package/src/styles/bridge.css +117 -0
  261. package/src/styles/derived-utilities.css +179 -0
  262. package/src/styles/fonts.css +23 -0
  263. package/src/styles/index.css +72 -0
  264. package/src/styles/palette.css +189 -0
  265. package/src/styles/tailwind-tokens.css +56 -0
  266. package/src/styles/theme.css +103 -0
@@ -0,0 +1,266 @@
1
+ import * as React from "react"
2
+ import { Menu as MenuPrimitive } from "@base-ui/react/menu"
3
+
4
+ import { cn } from "../../lib/utils"
5
+ import { IconChevronRightOutline18, IconCheckOutline18 } from "../../icons"
6
+
7
+ function DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {
8
+ return <MenuPrimitive.Root data-slot="dropdown-menu" {...props} />
9
+ }
10
+
11
+ function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props) {
12
+ return <MenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
13
+ }
14
+
15
+ function DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props) {
16
+ return <MenuPrimitive.Trigger data-slot="dropdown-menu-trigger" {...props} />
17
+ }
18
+
19
+ function DropdownMenuContent({
20
+ align = "start",
21
+ alignOffset = 0,
22
+ side = "bottom",
23
+ sideOffset = 4,
24
+ className,
25
+ ...props
26
+ }: MenuPrimitive.Popup.Props &
27
+ Pick<
28
+ MenuPrimitive.Positioner.Props,
29
+ "align" | "alignOffset" | "side" | "sideOffset"
30
+ >) {
31
+ return (
32
+ <MenuPrimitive.Portal>
33
+ <MenuPrimitive.Positioner
34
+ className="isolate z-50 outline-none"
35
+ align={align}
36
+ alignOffset={alignOffset}
37
+ side={side}
38
+ sideOffset={sideOffset}
39
+ >
40
+ <MenuPrimitive.Popup
41
+ data-slot="dropdown-menu-content"
42
+ className={cn("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!", className )}
43
+ {...props}
44
+ />
45
+ </MenuPrimitive.Positioner>
46
+ </MenuPrimitive.Portal>
47
+ )
48
+ }
49
+
50
+ function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props) {
51
+ return <MenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
52
+ }
53
+
54
+ function DropdownMenuLabel({
55
+ className,
56
+ inset,
57
+ ...props
58
+ }: React.ComponentProps<"div"> & {
59
+ inset?: boolean
60
+ }) {
61
+ return (
62
+ <div
63
+ data-slot="dropdown-menu-label"
64
+ data-inset={inset}
65
+ className={cn(
66
+ "px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
67
+ className
68
+ )}
69
+ {...props}
70
+ />
71
+ )
72
+ }
73
+
74
+ function DropdownMenuItem({
75
+ className,
76
+ inset,
77
+ variant = "default",
78
+ ...props
79
+ }: MenuPrimitive.Item.Props & {
80
+ inset?: boolean
81
+ variant?: "default" | "destructive"
82
+ }) {
83
+ return (
84
+ <MenuPrimitive.Item
85
+ data-slot="dropdown-menu-item"
86
+ data-inset={inset}
87
+ data-variant={variant}
88
+ className={cn(
89
+ "group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
90
+ className
91
+ )}
92
+ {...props}
93
+ />
94
+ )
95
+ }
96
+
97
+ function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props) {
98
+ return <MenuPrimitive.SubmenuRoot data-slot="dropdown-menu-sub" {...props} />
99
+ }
100
+
101
+ function DropdownMenuSubTrigger({
102
+ className,
103
+ inset,
104
+ children,
105
+ ...props
106
+ }: MenuPrimitive.SubmenuTrigger.Props & {
107
+ inset?: boolean
108
+ }) {
109
+ return (
110
+ <MenuPrimitive.SubmenuTrigger
111
+ data-slot="dropdown-menu-sub-trigger"
112
+ data-inset={inset}
113
+ className={cn(
114
+ "flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
115
+ className
116
+ )}
117
+ {...props}
118
+ >
119
+ {children}
120
+ <IconChevronRightOutline18 className="ml-auto" />
121
+ </MenuPrimitive.SubmenuTrigger>
122
+ )
123
+ }
124
+
125
+ function DropdownMenuSubContent({
126
+ align = "start",
127
+ alignOffset = -3,
128
+ side = "right",
129
+ sideOffset = 0,
130
+ className,
131
+ ...props
132
+ }: React.ComponentProps<typeof DropdownMenuContent>) {
133
+ return (
134
+ <DropdownMenuContent
135
+ data-slot="dropdown-menu-sub-content"
136
+ className={cn("w-auto min-w-[96px] rounded-lg p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!", className )}
137
+ align={align}
138
+ alignOffset={alignOffset}
139
+ side={side}
140
+ sideOffset={sideOffset}
141
+ {...props}
142
+ />
143
+ )
144
+ }
145
+
146
+ function DropdownMenuCheckboxItem({
147
+ className,
148
+ children,
149
+ checked,
150
+ inset,
151
+ ...props
152
+ }: MenuPrimitive.CheckboxItem.Props & {
153
+ inset?: boolean
154
+ }) {
155
+ return (
156
+ <MenuPrimitive.CheckboxItem
157
+ data-slot="dropdown-menu-checkbox-item"
158
+ data-inset={inset}
159
+ className={cn(
160
+ "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
161
+ className
162
+ )}
163
+ checked={checked}
164
+ {...props}
165
+ >
166
+ <span
167
+ className="pointer-events-none absolute right-2 flex items-center justify-center"
168
+ data-slot="dropdown-menu-checkbox-item-indicator"
169
+ >
170
+ <MenuPrimitive.CheckboxItemIndicator>
171
+ <IconCheckOutline18
172
+ />
173
+ </MenuPrimitive.CheckboxItemIndicator>
174
+ </span>
175
+ {children}
176
+ </MenuPrimitive.CheckboxItem>
177
+ )
178
+ }
179
+
180
+ function DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props) {
181
+ return (
182
+ <MenuPrimitive.RadioGroup
183
+ data-slot="dropdown-menu-radio-group"
184
+ {...props}
185
+ />
186
+ )
187
+ }
188
+
189
+ function DropdownMenuRadioItem({
190
+ className,
191
+ children,
192
+ inset,
193
+ ...props
194
+ }: MenuPrimitive.RadioItem.Props & {
195
+ inset?: boolean
196
+ }) {
197
+ return (
198
+ <MenuPrimitive.RadioItem
199
+ data-slot="dropdown-menu-radio-item"
200
+ data-inset={inset}
201
+ className={cn(
202
+ "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
203
+ className
204
+ )}
205
+ {...props}
206
+ >
207
+ <span
208
+ className="pointer-events-none absolute right-2 flex items-center justify-center"
209
+ data-slot="dropdown-menu-radio-item-indicator"
210
+ >
211
+ <MenuPrimitive.RadioItemIndicator>
212
+ <IconCheckOutline18
213
+ />
214
+ </MenuPrimitive.RadioItemIndicator>
215
+ </span>
216
+ {children}
217
+ </MenuPrimitive.RadioItem>
218
+ )
219
+ }
220
+
221
+ function DropdownMenuSeparator({
222
+ className,
223
+ ...props
224
+ }: MenuPrimitive.Separator.Props) {
225
+ return (
226
+ <MenuPrimitive.Separator
227
+ data-slot="dropdown-menu-separator"
228
+ className={cn("-mx-1 my-1 h-px bg-border", className)}
229
+ {...props}
230
+ />
231
+ )
232
+ }
233
+
234
+ function DropdownMenuShortcut({
235
+ className,
236
+ ...props
237
+ }: React.ComponentProps<"span">) {
238
+ return (
239
+ <span
240
+ data-slot="dropdown-menu-shortcut"
241
+ className={cn(
242
+ "ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",
243
+ className
244
+ )}
245
+ {...props}
246
+ />
247
+ )
248
+ }
249
+
250
+ export {
251
+ DropdownMenu,
252
+ DropdownMenuPortal,
253
+ DropdownMenuTrigger,
254
+ DropdownMenuContent,
255
+ DropdownMenuGroup,
256
+ DropdownMenuLabel,
257
+ DropdownMenuItem,
258
+ DropdownMenuCheckboxItem,
259
+ DropdownMenuRadioGroup,
260
+ DropdownMenuRadioItem,
261
+ DropdownMenuSeparator,
262
+ DropdownMenuShortcut,
263
+ DropdownMenuSub,
264
+ DropdownMenuSubTrigger,
265
+ DropdownMenuSubContent,
266
+ }
@@ -0,0 +1,104 @@
1
+ import { cva, type VariantProps } from "class-variance-authority"
2
+
3
+ import { cn } from "../../lib/utils"
4
+
5
+ function Empty({ className, ...props }: React.ComponentProps<"div">) {
6
+ return (
7
+ <div
8
+ data-slot="empty"
9
+ className={cn(
10
+ "flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",
11
+ className
12
+ )}
13
+ {...props}
14
+ />
15
+ )
16
+ }
17
+
18
+ function EmptyHeader({ className, ...props }: React.ComponentProps<"div">) {
19
+ return (
20
+ <div
21
+ data-slot="empty-header"
22
+ className={cn("flex max-w-sm flex-col items-center gap-2", className)}
23
+ {...props}
24
+ />
25
+ )
26
+ }
27
+
28
+ const emptyMediaVariants = cva(
29
+ "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
30
+ {
31
+ variants: {
32
+ variant: {
33
+ default: "bg-transparent",
34
+ icon: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4",
35
+ },
36
+ },
37
+ defaultVariants: {
38
+ variant: "default",
39
+ },
40
+ }
41
+ )
42
+
43
+ function EmptyMedia({
44
+ className,
45
+ variant = "default",
46
+ ...props
47
+ }: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>) {
48
+ return (
49
+ <div
50
+ data-slot="empty-icon"
51
+ data-variant={variant}
52
+ className={cn(emptyMediaVariants({ variant, className }))}
53
+ {...props}
54
+ />
55
+ )
56
+ }
57
+
58
+ function EmptyTitle({ className, ...props }: React.ComponentProps<"div">) {
59
+ return (
60
+ <div
61
+ data-slot="empty-title"
62
+ className={cn(
63
+ "font-heading text-sm font-medium tracking-tight",
64
+ className
65
+ )}
66
+ {...props}
67
+ />
68
+ )
69
+ }
70
+
71
+ function EmptyDescription({ className, ...props }: React.ComponentProps<"p">) {
72
+ return (
73
+ <div
74
+ data-slot="empty-description"
75
+ className={cn(
76
+ "text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
77
+ className
78
+ )}
79
+ {...props}
80
+ />
81
+ )
82
+ }
83
+
84
+ function EmptyContent({ className, ...props }: React.ComponentProps<"div">) {
85
+ return (
86
+ <div
87
+ data-slot="empty-content"
88
+ className={cn(
89
+ "flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance",
90
+ className
91
+ )}
92
+ {...props}
93
+ />
94
+ )
95
+ }
96
+
97
+ export {
98
+ Empty,
99
+ EmptyHeader,
100
+ EmptyTitle,
101
+ EmptyDescription,
102
+ EmptyContent,
103
+ EmptyMedia,
104
+ }
@@ -0,0 +1,236 @@
1
+ import { useMemo } from "react"
2
+ import { cva, type VariantProps } from "class-variance-authority"
3
+
4
+ import { cn } from "../../lib/utils"
5
+ import { Label } from "./label"
6
+ import { Separator } from "./separator"
7
+
8
+ function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">) {
9
+ return (
10
+ <fieldset
11
+ data-slot="field-set"
12
+ className={cn(
13
+ "flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
14
+ className
15
+ )}
16
+ {...props}
17
+ />
18
+ )
19
+ }
20
+
21
+ function FieldLegend({
22
+ className,
23
+ variant = "legend",
24
+ ...props
25
+ }: React.ComponentProps<"legend"> & { variant?: "legend" | "label" }) {
26
+ return (
27
+ <legend
28
+ data-slot="field-legend"
29
+ data-variant={variant}
30
+ className={cn(
31
+ "mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",
32
+ className
33
+ )}
34
+ {...props}
35
+ />
36
+ )
37
+ }
38
+
39
+ function FieldGroup({ className, ...props }: React.ComponentProps<"div">) {
40
+ return (
41
+ <div
42
+ data-slot="field-group"
43
+ className={cn(
44
+ "group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",
45
+ className
46
+ )}
47
+ {...props}
48
+ />
49
+ )
50
+ }
51
+
52
+ const fieldVariants = cva(
53
+ "group/field flex w-full gap-2 data-[invalid=true]:text-destructive",
54
+ {
55
+ variants: {
56
+ orientation: {
57
+ vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
58
+ horizontal:
59
+ "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
60
+ responsive:
61
+ "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
62
+ },
63
+ },
64
+ defaultVariants: {
65
+ orientation: "vertical",
66
+ },
67
+ }
68
+ )
69
+
70
+ function Field({
71
+ className,
72
+ orientation = "vertical",
73
+ ...props
74
+ }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>) {
75
+ return (
76
+ <div
77
+ role="group"
78
+ data-slot="field"
79
+ data-orientation={orientation}
80
+ className={cn(fieldVariants({ orientation }), className)}
81
+ {...props}
82
+ />
83
+ )
84
+ }
85
+
86
+ function FieldContent({ className, ...props }: React.ComponentProps<"div">) {
87
+ return (
88
+ <div
89
+ data-slot="field-content"
90
+ className={cn(
91
+ "group/field-content flex flex-1 flex-col gap-0.5 leading-snug",
92
+ className
93
+ )}
94
+ {...props}
95
+ />
96
+ )
97
+ }
98
+
99
+ function FieldLabel({
100
+ className,
101
+ ...props
102
+ }: React.ComponentProps<typeof Label>) {
103
+ return (
104
+ <Label
105
+ data-slot="field-label"
106
+ className={cn(
107
+ "group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10",
108
+ "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",
109
+ className
110
+ )}
111
+ {...props}
112
+ />
113
+ )
114
+ }
115
+
116
+ function FieldTitle({ className, ...props }: React.ComponentProps<"div">) {
117
+ return (
118
+ <div
119
+ data-slot="field-label"
120
+ className={cn(
121
+ "flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50",
122
+ className
123
+ )}
124
+ {...props}
125
+ />
126
+ )
127
+ }
128
+
129
+ function FieldDescription({ className, ...props }: React.ComponentProps<"p">) {
130
+ return (
131
+ <p
132
+ data-slot="field-description"
133
+ className={cn(
134
+ "text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5",
135
+ "last:mt-0 nth-last-2:-mt-1",
136
+ "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
137
+ className
138
+ )}
139
+ {...props}
140
+ />
141
+ )
142
+ }
143
+
144
+ function FieldSeparator({
145
+ children,
146
+ className,
147
+ ...props
148
+ }: React.ComponentProps<"div"> & {
149
+ children?: React.ReactNode
150
+ }) {
151
+ return (
152
+ <div
153
+ data-slot="field-separator"
154
+ data-content={!!children}
155
+ className={cn(
156
+ "relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
157
+ className
158
+ )}
159
+ {...props}
160
+ >
161
+ <Separator className="absolute inset-0 top-1/2" />
162
+ {children && (
163
+ <span
164
+ className="relative mx-auto block w-fit bg-background px-2 text-muted-foreground"
165
+ data-slot="field-separator-content"
166
+ >
167
+ {children}
168
+ </span>
169
+ )}
170
+ </div>
171
+ )
172
+ }
173
+
174
+ function FieldError({
175
+ className,
176
+ children,
177
+ errors,
178
+ ...props
179
+ }: React.ComponentProps<"div"> & {
180
+ errors?: Array<{ message?: string } | undefined>
181
+ }) {
182
+ const content = useMemo(() => {
183
+ if (children) {
184
+ return children
185
+ }
186
+
187
+ if (!errors?.length) {
188
+ return null
189
+ }
190
+
191
+ const uniqueErrors = [
192
+ ...new Map(errors.map((error) => [error?.message, error])).values(),
193
+ ]
194
+
195
+ if (uniqueErrors?.length == 1) {
196
+ return uniqueErrors[0]?.message
197
+ }
198
+
199
+ return (
200
+ <ul className="ml-4 flex list-disc flex-col gap-1">
201
+ {uniqueErrors.map(
202
+ (error, index) =>
203
+ error?.message && <li key={index}>{error.message}</li>
204
+ )}
205
+ </ul>
206
+ )
207
+ }, [children, errors])
208
+
209
+ if (!content) {
210
+ return null
211
+ }
212
+
213
+ return (
214
+ <div
215
+ role="alert"
216
+ data-slot="field-error"
217
+ className={cn("text-sm font-normal text-destructive", className)}
218
+ {...props}
219
+ >
220
+ {content}
221
+ </div>
222
+ )
223
+ }
224
+
225
+ export {
226
+ Field,
227
+ FieldLabel,
228
+ FieldDescription,
229
+ FieldError,
230
+ FieldGroup,
231
+ FieldLegend,
232
+ FieldSeparator,
233
+ FieldSet,
234
+ FieldContent,
235
+ FieldTitle,
236
+ }
@@ -0,0 +1,51 @@
1
+ "use client"
2
+
3
+ import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card"
4
+
5
+ import { cn } from "../../lib/utils"
6
+
7
+ function HoverCard({ ...props }: PreviewCardPrimitive.Root.Props) {
8
+ return <PreviewCardPrimitive.Root data-slot="hover-card" {...props} />
9
+ }
10
+
11
+ function HoverCardTrigger({ ...props }: PreviewCardPrimitive.Trigger.Props) {
12
+ return (
13
+ <PreviewCardPrimitive.Trigger data-slot="hover-card-trigger" {...props} />
14
+ )
15
+ }
16
+
17
+ function HoverCardContent({
18
+ className,
19
+ side = "bottom",
20
+ sideOffset = 4,
21
+ align = "center",
22
+ alignOffset = 4,
23
+ ...props
24
+ }: PreviewCardPrimitive.Popup.Props &
25
+ Pick<
26
+ PreviewCardPrimitive.Positioner.Props,
27
+ "align" | "alignOffset" | "side" | "sideOffset"
28
+ >) {
29
+ return (
30
+ <PreviewCardPrimitive.Portal data-slot="hover-card-portal">
31
+ <PreviewCardPrimitive.Positioner
32
+ align={align}
33
+ alignOffset={alignOffset}
34
+ side={side}
35
+ sideOffset={sideOffset}
36
+ className="isolate z-50"
37
+ >
38
+ <PreviewCardPrimitive.Popup
39
+ data-slot="hover-card-content"
40
+ className={cn(
41
+ "z-50 w-64 origin-(--transform-origin) rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
42
+ className
43
+ )}
44
+ {...props}
45
+ />
46
+ </PreviewCardPrimitive.Positioner>
47
+ </PreviewCardPrimitive.Portal>
48
+ )
49
+ }
50
+
51
+ export { HoverCard, HoverCardTrigger, HoverCardContent }