@raydenui/ui 0.9.7 → 0.10.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 (309) hide show
  1. package/README.md +124 -49
  2. package/dist/Table-DCNSxua1.d.cts +31 -0
  3. package/dist/Table-DCNSxua1.d.ts +31 -0
  4. package/dist/blocks/ApplicationShellBlock.cjs +157 -0
  5. package/dist/blocks/ApplicationShellBlock.js +154 -0
  6. package/dist/blocks/CheckoutReviewBlock.cjs +16 -0
  7. package/dist/blocks/CheckoutReviewBlock.js +13 -0
  8. package/dist/blocks/CommandPaletteBlock.cjs +334 -0
  9. package/dist/blocks/CommandPaletteBlock.js +331 -0
  10. package/dist/blocks/CreateAccountBlock.cjs +147 -0
  11. package/dist/blocks/CreateAccountBlock.js +143 -0
  12. package/dist/blocks/EmptyStateBlock.cjs +19 -0
  13. package/dist/blocks/EmptyStateBlock.js +16 -0
  14. package/dist/blocks/FeatureOverviewBlock.cjs +54 -0
  15. package/dist/blocks/FeatureOverviewBlock.js +51 -0
  16. package/dist/blocks/HeaderBlock.cjs +230 -0
  17. package/dist/blocks/HeaderBlock.js +227 -0
  18. package/dist/blocks/KpiOverviewBlock.cjs +63 -0
  19. package/dist/blocks/KpiOverviewBlock.js +60 -0
  20. package/dist/blocks/LoginBlock.cjs +66 -0
  21. package/dist/blocks/LoginBlock.js +63 -0
  22. package/dist/blocks/NotificationsBlock.cjs +17 -0
  23. package/dist/blocks/NotificationsBlock.js +14 -0
  24. package/dist/blocks/PageHeaderBlock.cjs +121 -0
  25. package/dist/blocks/PageHeaderBlock.js +118 -0
  26. package/dist/blocks/PricingPlansBlock.cjs +146 -0
  27. package/dist/blocks/PricingPlansBlock.js +143 -0
  28. package/dist/blocks/ProductCollectionBlock.cjs +37 -0
  29. package/dist/blocks/ProductCollectionBlock.js +34 -0
  30. package/dist/blocks/ProductDetailBlock.cjs +30 -0
  31. package/dist/blocks/ProductDetailBlock.js +27 -0
  32. package/dist/blocks/ProductHeroBlock.cjs +83 -0
  33. package/dist/blocks/ProductHeroBlock.js +80 -0
  34. package/dist/blocks/ProfileSettingsBlock.cjs +130 -0
  35. package/dist/blocks/ProfileSettingsBlock.js +126 -0
  36. package/dist/blocks/QuickSendBlock.cjs +11 -0
  37. package/dist/blocks/QuickSendBlock.js +8 -0
  38. package/dist/blocks/RecentTransactionsBlock.cjs +13 -0
  39. package/dist/blocks/RecentTransactionsBlock.js +10 -0
  40. package/dist/blocks/SearchableTableBlock.cjs +91 -0
  41. package/dist/blocks/SearchableTableBlock.js +88 -0
  42. package/dist/blocks/ShoppingCartBlock.cjs +16 -0
  43. package/dist/blocks/ShoppingCartBlock.js +13 -0
  44. package/dist/blocks/SiteFooterBlock.cjs +69 -0
  45. package/dist/blocks/SiteFooterBlock.js +66 -0
  46. package/dist/blocks/TableBlock.cjs +20 -0
  47. package/dist/blocks/TableBlock.js +17 -0
  48. package/dist/blocks/TaskListBlock.cjs +198 -0
  49. package/dist/blocks/TaskListBlock.js +195 -0
  50. package/dist/blocks/WorkspaceSwitcherBlock.cjs +291 -0
  51. package/dist/blocks/WorkspaceSwitcherBlock.js +288 -0
  52. package/dist/blocks/commerce.cjs +44 -0
  53. package/dist/blocks/commerce.js +35 -0
  54. package/dist/blocks/index.cjs +53 -0
  55. package/dist/blocks/index.js +24 -0
  56. package/dist/blocks.d.cts +1820 -0
  57. package/dist/blocks.d.ts +1820 -0
  58. package/dist/chart.cjs +13 -0
  59. package/dist/chart.d.cts +59 -0
  60. package/dist/chart.d.ts +59 -0
  61. package/dist/chart.js +5 -0
  62. package/dist/components/Accordion/Accordion.cjs +94 -0
  63. package/dist/components/Accordion/Accordion.js +91 -0
  64. package/dist/components/Accordion/index.cjs +8 -0
  65. package/dist/components/Accordion/index.js +1 -0
  66. package/dist/components/ActivityFeed/ActivityContent.cjs +40 -0
  67. package/dist/components/ActivityFeed/ActivityContent.js +37 -0
  68. package/dist/components/ActivityFeed/ActivityItem.cjs +19 -0
  69. package/dist/components/ActivityFeed/ActivityItem.js +16 -0
  70. package/dist/components/ActivityFeed/index.cjs +7 -0
  71. package/dist/components/ActivityFeed/index.js +2 -0
  72. package/dist/components/Alert/Alert.cjs +42 -0
  73. package/dist/components/Alert/Alert.js +39 -0
  74. package/dist/components/Alert/index.cjs +5 -0
  75. package/dist/components/Alert/index.js +1 -0
  76. package/dist/components/Avatar/Avatar.cjs +101 -0
  77. package/dist/components/Avatar/Avatar.js +98 -0
  78. package/dist/components/Avatar/index.cjs +6 -0
  79. package/dist/components/Avatar/index.js +1 -0
  80. package/dist/components/Badge/Badge.cjs +53 -0
  81. package/dist/components/Badge/Badge.js +50 -0
  82. package/dist/components/Badge/index.cjs +5 -0
  83. package/dist/components/Badge/index.js +1 -0
  84. package/dist/components/Banner/Banner.cjs +83 -0
  85. package/dist/components/Banner/Banner.js +80 -0
  86. package/dist/components/Banner/index.cjs +5 -0
  87. package/dist/components/Banner/index.js +1 -0
  88. package/dist/components/Breadcrumb/Breadcrumb.cjs +31 -0
  89. package/dist/components/Breadcrumb/Breadcrumb.js +28 -0
  90. package/dist/components/Breadcrumb/index.cjs +5 -0
  91. package/dist/components/Breadcrumb/index.js +1 -0
  92. package/dist/components/Button/Button.cjs +88 -0
  93. package/dist/components/Button/Button.js +85 -0
  94. package/dist/components/Button/index.cjs +5 -0
  95. package/dist/components/Button/index.js +1 -0
  96. package/dist/components/ButtonGroup/ButtonGroup.cjs +8 -0
  97. package/dist/components/ButtonGroup/ButtonGroup.js +5 -0
  98. package/dist/components/ButtonGroup/ButtonGroupItem.cjs +15 -0
  99. package/dist/components/ButtonGroup/ButtonGroupItem.js +12 -0
  100. package/dist/components/ButtonGroup/index.cjs +7 -0
  101. package/dist/components/ButtonGroup/index.js +2 -0
  102. package/dist/components/Card/Card.cjs +94 -0
  103. package/dist/components/Card/Card.js +91 -0
  104. package/dist/components/Card/index.cjs +9 -0
  105. package/dist/components/Card/index.js +1 -0
  106. package/dist/components/Chart/Chart.cjs +160 -0
  107. package/dist/components/Chart/Chart.js +153 -0
  108. package/dist/components/Chart/index.cjs +10 -0
  109. package/dist/components/Chart/index.js +2 -0
  110. package/dist/components/Chart/theme.cjs +67 -0
  111. package/dist/components/Chart/theme.js +62 -0
  112. package/dist/components/Chip/Chip.cjs +18 -0
  113. package/dist/components/Chip/Chip.js +15 -0
  114. package/dist/components/Chip/index.cjs +5 -0
  115. package/dist/components/Chip/index.js +1 -0
  116. package/dist/components/Counter/Counter.cjs +74 -0
  117. package/dist/components/Counter/Counter.js +71 -0
  118. package/dist/components/Counter/index.cjs +6 -0
  119. package/dist/components/Counter/index.js +1 -0
  120. package/dist/components/DatePicker/DatePicker.cjs +343 -0
  121. package/dist/components/DatePicker/DatePicker.js +340 -0
  122. package/dist/components/DatePicker/index.cjs +5 -0
  123. package/dist/components/DatePicker/index.js +1 -0
  124. package/dist/components/Divider/Divider.cjs +31 -0
  125. package/dist/components/Divider/Divider.js +28 -0
  126. package/dist/components/Divider/index.cjs +5 -0
  127. package/dist/components/Divider/index.js +1 -0
  128. package/dist/components/DropdownMenu/DropdownMenu.cjs +108 -0
  129. package/dist/components/DropdownMenu/DropdownMenu.js +105 -0
  130. package/dist/components/DropdownMenu/index.cjs +11 -0
  131. package/dist/components/DropdownMenu/index.js +1 -0
  132. package/dist/components/EmptyStateIllustration/EmptyStateIllustration.cjs +42 -0
  133. package/dist/components/EmptyStateIllustration/EmptyStateIllustration.js +39 -0
  134. package/dist/components/EmptyStateIllustration/illustrations.cjs +3322 -0
  135. package/dist/components/EmptyStateIllustration/illustrations.js +3319 -0
  136. package/dist/components/EmptyStateIllustration/index.cjs +7 -0
  137. package/dist/components/EmptyStateIllustration/index.js +2 -0
  138. package/dist/components/FileUpload/FileUpload.cjs +116 -0
  139. package/dist/components/FileUpload/FileUpload.js +113 -0
  140. package/dist/components/FileUpload/FileUploadDropZone.cjs +58 -0
  141. package/dist/components/FileUpload/FileUploadDropZone.js +55 -0
  142. package/dist/components/FileUpload/FileUploadIcons.cjs +55 -0
  143. package/dist/components/FileUpload/FileUploadIcons.js +50 -0
  144. package/dist/components/FileUpload/FileUploadItem.cjs +34 -0
  145. package/dist/components/FileUpload/FileUploadItem.js +31 -0
  146. package/dist/components/FileUpload/index.cjs +9 -0
  147. package/dist/components/FileUpload/index.js +3 -0
  148. package/dist/components/FormControl/Checkbox.cjs +27 -0
  149. package/dist/components/FormControl/Checkbox.js +24 -0
  150. package/dist/components/FormControl/Radio.cjs +15 -0
  151. package/dist/components/FormControl/Radio.js +12 -0
  152. package/dist/components/FormControl/Toggle.cjs +15 -0
  153. package/dist/components/FormControl/Toggle.js +12 -0
  154. package/dist/components/FormControl/index.cjs +9 -0
  155. package/dist/components/FormControl/index.js +3 -0
  156. package/dist/components/Icon/Icon.cjs +70 -0
  157. package/dist/components/Icon/Icon.js +34 -0
  158. package/dist/components/Icon/catalog.cjs +1672 -0
  159. package/dist/components/Icon/catalog.js +1669 -0
  160. package/dist/components/Icon/icons.cjs +5621 -0
  161. package/dist/components/Icon/icons.js +5610 -0
  162. package/dist/components/Icon/index.cjs +8 -0
  163. package/dist/components/Icon/index.js +2 -0
  164. package/dist/components/Input/Input.cjs +64 -0
  165. package/dist/components/Input/Input.js +61 -0
  166. package/dist/components/Input/index.cjs +5 -0
  167. package/dist/components/Input/index.js +1 -0
  168. package/dist/components/MetricsCard/MetricsCard.cjs +107 -0
  169. package/dist/components/MetricsCard/MetricsCard.js +104 -0
  170. package/dist/components/MetricsCard/index.cjs +5 -0
  171. package/dist/components/MetricsCard/index.js +1 -0
  172. package/dist/components/Modal/Modal.cjs +126 -0
  173. package/dist/components/Modal/Modal.js +123 -0
  174. package/dist/components/Modal/index.cjs +5 -0
  175. package/dist/components/Modal/index.js +1 -0
  176. package/dist/components/Pagination/Pagination.cjs +42 -0
  177. package/dist/components/Pagination/Pagination.js +39 -0
  178. package/dist/components/Pagination/index.cjs +5 -0
  179. package/dist/components/Pagination/index.js +1 -0
  180. package/dist/components/ProgressBar/ProgressBar.cjs +34 -0
  181. package/dist/components/ProgressBar/ProgressBar.js +31 -0
  182. package/dist/components/ProgressBar/index.cjs +5 -0
  183. package/dist/components/ProgressBar/index.js +1 -0
  184. package/dist/components/ProgressCircle/ProgressCircle.cjs +34 -0
  185. package/dist/components/ProgressCircle/ProgressCircle.js +31 -0
  186. package/dist/components/ProgressCircle/index.cjs +5 -0
  187. package/dist/components/ProgressCircle/index.js +1 -0
  188. package/dist/components/Select/Select.cjs +84 -0
  189. package/dist/components/Select/Select.js +80 -0
  190. package/dist/components/Select/SelectOption.cjs +26 -0
  191. package/dist/components/Select/SelectOption.js +23 -0
  192. package/dist/components/Select/index.cjs +7 -0
  193. package/dist/components/Select/index.js +2 -0
  194. package/dist/components/SidebarMenu/SidebarMenu.cjs +85 -0
  195. package/dist/components/SidebarMenu/SidebarMenu.js +81 -0
  196. package/dist/components/SidebarMenu/SidebarMenuItem.cjs +126 -0
  197. package/dist/components/SidebarMenu/SidebarMenuItem.js +122 -0
  198. package/dist/components/SidebarMenu/SidebarMenuSection.cjs +14 -0
  199. package/dist/components/SidebarMenu/SidebarMenuSection.js +11 -0
  200. package/dist/components/SidebarMenu/index.cjs +12 -0
  201. package/dist/components/SidebarMenu/index.js +4 -0
  202. package/dist/components/Slider/Slider.cjs +161 -0
  203. package/dist/components/Slider/Slider.js +158 -0
  204. package/dist/components/Slider/index.cjs +6 -0
  205. package/dist/components/Slider/index.js +1 -0
  206. package/dist/components/Spinner/Spinner.cjs +93 -0
  207. package/dist/components/Spinner/Spinner.js +90 -0
  208. package/dist/components/Spinner/index.cjs +5 -0
  209. package/dist/components/Spinner/index.js +1 -0
  210. package/dist/components/Stepper/Stepper.cjs +82 -0
  211. package/dist/components/Stepper/Stepper.js +79 -0
  212. package/dist/components/Stepper/index.cjs +7 -0
  213. package/dist/components/Stepper/index.js +1 -0
  214. package/dist/components/Table/Table.cjs +25 -0
  215. package/dist/components/Table/Table.js +22 -0
  216. package/dist/components/Table/index.cjs +10 -0
  217. package/dist/components/Table/index.js +1 -0
  218. package/dist/components/Table/useTableSelection.cjs +60 -0
  219. package/dist/components/Table/useTableSelection.js +57 -0
  220. package/dist/components/Tabs/Tab.cjs +70 -0
  221. package/dist/components/Tabs/Tab.js +67 -0
  222. package/dist/components/Tabs/Tabs.cjs +133 -0
  223. package/dist/components/Tabs/Tabs.js +129 -0
  224. package/dist/components/Tabs/index.cjs +7 -0
  225. package/dist/components/Tabs/index.js +2 -0
  226. package/dist/components/Tooltip/Tooltip.cjs +101 -0
  227. package/dist/components/Tooltip/Tooltip.js +98 -0
  228. package/dist/components/Tooltip/index.cjs +5 -0
  229. package/dist/components/Tooltip/index.js +1 -0
  230. package/dist/context/ThemeContext.cjs +97 -0
  231. package/dist/context/ThemeContext.js +92 -0
  232. package/dist/fonts/README.md +13 -0
  233. package/dist/fonts/hanken-grotesk-cyrillic-ext-italic.woff2 +0 -0
  234. package/dist/fonts/hanken-grotesk-cyrillic-ext-normal.woff2 +0 -0
  235. package/dist/fonts/hanken-grotesk-latin-ext-italic.woff2 +0 -0
  236. package/dist/fonts/hanken-grotesk-latin-ext-normal.woff2 +0 -0
  237. package/dist/fonts/hanken-grotesk-latin-italic.woff2 +0 -0
  238. package/dist/fonts/hanken-grotesk-latin-normal.woff2 +0 -0
  239. package/dist/fonts/hanken-grotesk-vietnamese-italic.woff2 +0 -0
  240. package/dist/fonts/hanken-grotesk-vietnamese-normal.woff2 +0 -0
  241. package/dist/fonts/hankengrotesk-LICENSE.txt +94 -0
  242. package/dist/fonts/manrope-LICENSE.txt +93 -0
  243. package/dist/fonts/manrope-cyrillic-ext-normal.woff2 +0 -0
  244. package/dist/fonts/manrope-cyrillic-normal.woff2 +0 -0
  245. package/dist/fonts/manrope-greek-normal.woff2 +0 -0
  246. package/dist/fonts/manrope-latin-ext-normal.woff2 +0 -0
  247. package/dist/fonts/manrope-latin-normal.woff2 +0 -0
  248. package/dist/fonts/manrope-vietnamese-normal.woff2 +0 -0
  249. package/dist/fonts.css +148 -0
  250. package/dist/hooks/form/index.cjs +11 -0
  251. package/dist/hooks/form/index.js +3 -0
  252. package/dist/hooks/form/useRaydenFormControl.cjs +81 -0
  253. package/dist/hooks/form/useRaydenFormControl.js +76 -0
  254. package/dist/hooks/form/useRaydenInput.cjs +38 -0
  255. package/dist/hooks/form/useRaydenInput.js +35 -0
  256. package/dist/hooks/form/useRaydenSelect.cjs +45 -0
  257. package/dist/hooks/form/useRaydenSelect.js +42 -0
  258. package/dist/hooks/index.cjs +17 -0
  259. package/dist/hooks/index.js +1 -0
  260. package/dist/hooks/useBodyScrollLock.cjs +24 -0
  261. package/dist/hooks/useBodyScrollLock.js +21 -0
  262. package/dist/hooks/useCollisionAwareSide.cjs +72 -0
  263. package/dist/hooks/useCollisionAwareSide.js +69 -0
  264. package/dist/hooks/useControllableValue.cjs +16 -0
  265. package/dist/hooks/useControllableValue.js +13 -0
  266. package/dist/hooks/useDismissableLayer.cjs +100 -0
  267. package/dist/hooks/useDismissableLayer.js +97 -0
  268. package/dist/hooks/usePopupList.cjs +101 -0
  269. package/dist/hooks/usePopupList.js +98 -0
  270. package/dist/icons-8yD7I5jO.d.cts +430 -0
  271. package/dist/icons-8yD7I5jO.d.ts +430 -0
  272. package/dist/icons.cjs +2111 -418
  273. package/dist/icons.d.cts +1256 -429
  274. package/dist/icons.d.ts +1256 -429
  275. package/dist/icons.js +2089 -1
  276. package/dist/index.cjs +128 -15046
  277. package/dist/index.d.cts +697 -662
  278. package/dist/index.d.ts +697 -662
  279. package/dist/index.js +43 -14962
  280. package/dist/motion/Collapse.cjs +28 -0
  281. package/dist/motion/Collapse.js +25 -0
  282. package/dist/motion/MotionProvider.cjs +43 -0
  283. package/dist/motion/MotionProvider.js +38 -0
  284. package/dist/motion/Pressable.cjs +46 -0
  285. package/dist/motion/Pressable.js +43 -0
  286. package/dist/motion/Reveal.cjs +19 -0
  287. package/dist/motion/Reveal.js +16 -0
  288. package/dist/motion/SharedLayout.cjs +46 -0
  289. package/dist/motion/SharedLayout.js +43 -0
  290. package/dist/motion/index.cjs +19 -0
  291. package/dist/motion/index.js +6 -0
  292. package/dist/motion/presence.cjs +58 -0
  293. package/dist/motion/presence.js +55 -0
  294. package/dist/motion/presets.cjs +88 -0
  295. package/dist/motion/presets.js +84 -0
  296. package/dist/motion.d.cts +51 -0
  297. package/dist/motion.d.ts +51 -0
  298. package/dist/preset.cjs +356 -195
  299. package/dist/preset.d.cts +111 -32
  300. package/dist/preset.d.ts +111 -32
  301. package/dist/preset.js +353 -187
  302. package/dist/presets-Ba5QndHg.d.cts +144 -0
  303. package/dist/presets-Ba5QndHg.d.ts +144 -0
  304. package/dist/styles.css +1 -1
  305. package/dist/utils/cn.cjs +38 -0
  306. package/dist/utils/cn.js +35 -0
  307. package/dist/utils/resolveIcon.cjs +18 -0
  308. package/dist/utils/resolveIcon.js +15 -0
  309. package/package.json +79 -21
@@ -0,0 +1,105 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { createContext, useContext, useRef, forwardRef, } from "react";
3
+ import { useControllableValue } from "../../hooks/useControllableValue.js";
4
+ import { usePopupList } from "../../hooks/usePopupList.js";
5
+ import { cn } from "../../utils/cn.js";
6
+ import { useCollisionAwareSide } from "../../hooks/useCollisionAwareSide.js";
7
+ import { resolveIcon } from "../../utils/resolveIcon.js";
8
+ const DropdownMenuContext = createContext(null);
9
+ function useDropdownMenuContext() {
10
+ const ctx = useContext(DropdownMenuContext);
11
+ if (!ctx)
12
+ throw new Error("DropdownMenu compound components must be used within <DropdownMenu>");
13
+ return ctx;
14
+ }
15
+ export const DropdownMenu = forwardRef(({ open: controlledOpen, defaultOpen = false, onOpenChange, children, className, ...rest }, ref) => {
16
+ const [open, setOpen] = useControllableValue(controlledOpen, defaultOpen, onOpenChange);
17
+ const containerRef = useRef(null);
18
+ const triggerRef = useRef(null);
19
+ const contentRef = useRef(null);
20
+ const { close, onTriggerKeyDown, onListKeyDown } = usePopupList({
21
+ open,
22
+ setOpen,
23
+ containerRef,
24
+ triggerRef,
25
+ listRef: contentRef,
26
+ role: "menuitem",
27
+ });
28
+ return (_jsx(DropdownMenuContext.Provider, { value: {
29
+ open,
30
+ setOpen,
31
+ triggerRef,
32
+ contentRef,
33
+ close,
34
+ onTriggerKeyDown,
35
+ onListKeyDown,
36
+ }, children: _jsx("div", { ref: (node) => {
37
+ containerRef.current = node;
38
+ if (typeof ref === "function")
39
+ ref(node);
40
+ else if (ref)
41
+ ref.current = node;
42
+ }, ...rest, className: cn("relative inline-flex", className), children: children }) }));
43
+ });
44
+ DropdownMenu.displayName = "DropdownMenu";
45
+ export const DropdownMenuTrigger = forwardRef(({ onClick, onKeyDown, children, className, ...rest }, ref) => {
46
+ const { open, setOpen, triggerRef, onTriggerKeyDown } = useDropdownMenuContext();
47
+ return (_jsx("button", { ref: (node) => {
48
+ triggerRef.current = node;
49
+ if (typeof ref === "function")
50
+ ref(node);
51
+ else if (ref)
52
+ ref.current = node;
53
+ }, type: "button", "aria-expanded": open, "aria-haspopup": "menu", onKeyDown: (event) => {
54
+ onKeyDown?.(event);
55
+ onTriggerKeyDown(event);
56
+ }, onClick: (e) => {
57
+ onClick?.(e);
58
+ if (!e.defaultPrevented)
59
+ setOpen(!open);
60
+ }, className: className, ...rest, children: children }));
61
+ });
62
+ DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
63
+ export const DropdownMenuContent = forwardRef(({ align = "end", sideOffset = 4, children, className, onKeyDown, ...rest }, ref) => {
64
+ const { open, triggerRef, contentRef, onListKeyDown } = useDropdownMenuContext();
65
+ // The menu always opened downward, so near the bottom edge it ran off-screen.
66
+ const menuSide = useCollisionAwareSide("bottom", open, triggerRef, contentRef);
67
+ if (!open)
68
+ return null;
69
+ return (_jsx("div", { ref: (node) => {
70
+ contentRef.current = node;
71
+ if (typeof ref === "function")
72
+ ref(node);
73
+ else if (ref)
74
+ ref.current = node;
75
+ }, role: "menu", "aria-orientation": "vertical", onKeyDown: (event) => {
76
+ onKeyDown?.(event);
77
+ onListKeyDown(event);
78
+ }, className: cn("absolute z-50 min-w-[200px] overflow-hidden rounded-lg bg-surface py-1", "shadow-lg ring-1 ring-black/5", "animate-in fade-in-0 zoom-in-95", menuSide === "top" ? "bottom-full" : "top-full", align === "end" ? "right-0" : "left-0", className), style: menuSide === "top" ? { marginBottom: sideOffset } : { marginTop: sideOffset }, ...rest, children: children }));
79
+ });
80
+ DropdownMenuContent.displayName = "DropdownMenuContent";
81
+ export const DropdownMenuGroup = forwardRef(({ className, ...rest }, ref) => (_jsx("div", { ref: ref, role: "group", className: cn("py-1", className), ...rest })));
82
+ DropdownMenuGroup.displayName = "DropdownMenuGroup";
83
+ export const DropdownMenuLabel = forwardRef(({ description, children, className, ...rest }, ref) => (_jsxs("div", { ref: ref, className: cn("px-4 py-2", className), ...rest, children: [_jsx("p", { className: "text-body-sm font-semibold text-on-surface", children: children }), description && _jsx("p", { className: "text-body-sm text-on-surface-muted", children: description })] })));
84
+ DropdownMenuLabel.displayName = "DropdownMenuLabel";
85
+ export const DropdownMenuItem = forwardRef(({ icon, shortcut, selected = false, disabled = false, destructive = false, onSelect, onClick, children, className, ...rest }, ref) => {
86
+ const { close } = useDropdownMenuContext();
87
+ const handleClick = (e) => {
88
+ if (disabled)
89
+ return;
90
+ onClick?.(e);
91
+ if (e.defaultPrevented)
92
+ return;
93
+ close(true);
94
+ onSelect?.();
95
+ };
96
+ const resolvedIcon = resolveIcon(icon, "md");
97
+ return (_jsxs("button", { ref: ref, type: "button", role: "menuitem", tabIndex: -1, disabled: disabled, onClick: handleClick, className: cn("flex w-full items-center gap-1 px-4 py-2 text-left text-body-sm outline-none transition-colors", disabled
98
+ ? "bg-grey-100 text-grey-500 cursor-not-allowed"
99
+ : destructive
100
+ ? "text-error-500 hover:bg-error-50 focus:bg-error-100"
101
+ : "text-on-surface hover:bg-grey-50 focus:bg-grey-100", className), ...rest, children: [_jsxs("div", { className: "flex flex-1 items-center gap-3", children: [resolvedIcon && (_jsx("span", { className: cn("shrink-0 size-5", disabled && "opacity-50"), children: resolvedIcon })), _jsx("span", { className: "flex-1", children: children })] }), shortcut && (_jsx("kbd", { className: "ml-2 shrink-0 rounded bg-grey-50 border border-grey-100 px-1 text-body-sm text-grey-600", children: shortcut })), selected && (_jsx("span", { className: "ml-2 shrink-0", children: _jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "text-[#1671D9]", children: [_jsx("circle", { cx: "8", cy: "8", r: "8", fill: "currentColor" }), _jsx("path", { d: "M11.5 5.5L6.5 10.5L4.5 8.5", stroke: "white", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })] }) }))] }));
102
+ });
103
+ DropdownMenuItem.displayName = "DropdownMenuItem";
104
+ export const DropdownMenuSeparator = forwardRef(({ className, ...rest }, ref) => (_jsx("div", { ref: ref, role: "separator", className: cn("my-1 h-px bg-grey-100", className), ...rest })));
105
+ DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DropdownMenuSeparator = exports.DropdownMenuItem = exports.DropdownMenuLabel = exports.DropdownMenuGroup = exports.DropdownMenuContent = exports.DropdownMenuTrigger = exports.DropdownMenu = void 0;
4
+ var DropdownMenu_1 = require("./DropdownMenu.cjs");
5
+ Object.defineProperty(exports, "DropdownMenu", { enumerable: true, get: function () { return DropdownMenu_1.DropdownMenu; } });
6
+ Object.defineProperty(exports, "DropdownMenuTrigger", { enumerable: true, get: function () { return DropdownMenu_1.DropdownMenuTrigger; } });
7
+ Object.defineProperty(exports, "DropdownMenuContent", { enumerable: true, get: function () { return DropdownMenu_1.DropdownMenuContent; } });
8
+ Object.defineProperty(exports, "DropdownMenuGroup", { enumerable: true, get: function () { return DropdownMenu_1.DropdownMenuGroup; } });
9
+ Object.defineProperty(exports, "DropdownMenuLabel", { enumerable: true, get: function () { return DropdownMenu_1.DropdownMenuLabel; } });
10
+ Object.defineProperty(exports, "DropdownMenuItem", { enumerable: true, get: function () { return DropdownMenu_1.DropdownMenuItem; } });
11
+ Object.defineProperty(exports, "DropdownMenuSeparator", { enumerable: true, get: function () { return DropdownMenu_1.DropdownMenuSeparator; } });
@@ -0,0 +1 @@
1
+ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuSeparator, } from "./DropdownMenu.js";
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EmptyStateIllustration = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const cn_1 = require("../../utils/cn.cjs");
7
+ const illustrations_1 = require("./illustrations.cjs");
8
+ // ─── Default primary palette used in colored SVGs ──────────────────
9
+ const DEFAULT_PALETTE = [
10
+ "#FFECE5", // primary-50
11
+ "#FCD2C2", // primary-75
12
+ "#FCB59A", // primary-100
13
+ "#FA9874", // primary-150
14
+ "#F77A4A", // primary-200
15
+ "#F56630", // primary-400
16
+ "#EB5017", // primary-500
17
+ "#CC400C", // primary-600
18
+ "#AD3307", // primary-700
19
+ "#8F2802", // primary-800
20
+ "#711E00", // primary-900
21
+ ];
22
+ // ─── Component ─────────────────────────────────────────────────────
23
+ exports.EmptyStateIllustration = (0, react_1.forwardRef)(({ name, colored = true, palette, size = 150, className, ...rest }, ref) => {
24
+ const rawSvg = colored ? illustrations_1.coloredIllustrations[name] : illustrations_1.greyIllustrations[name];
25
+ // Apply custom palette via string replacement
26
+ const svgContent = (0, react_1.useMemo)(() => {
27
+ if (!colored || !palette || palette.length === 0)
28
+ return rawSvg;
29
+ let result = rawSvg;
30
+ const len = Math.min(palette.length, DEFAULT_PALETTE.length);
31
+ for (let i = 0; i < len; i++) {
32
+ const from = DEFAULT_PALETTE[i];
33
+ const to = palette[i];
34
+ if (from !== to) {
35
+ result = result.split(from).join(to.toUpperCase());
36
+ }
37
+ }
38
+ return result;
39
+ }, [rawSvg, colored, palette]);
40
+ return ((0, jsx_runtime_1.jsx)("div", { ref: ref, className: (0, cn_1.cn)("inline-flex shrink-0 items-center justify-center", className), ...rest, children: (0, jsx_runtime_1.jsx)("svg", { width: size, height: size, viewBox: "0 0 150 150", fill: "none", xmlns: "http://www.w3.org/2000/svg", dangerouslySetInnerHTML: { __html: svgContent } }) }));
41
+ });
42
+ exports.EmptyStateIllustration.displayName = "EmptyStateIllustration";
@@ -0,0 +1,39 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef, useMemo } from "react";
3
+ import { cn } from "../../utils/cn.js";
4
+ import { coloredIllustrations, greyIllustrations } from "./illustrations.js";
5
+ // ─── Default primary palette used in colored SVGs ──────────────────
6
+ const DEFAULT_PALETTE = [
7
+ "#FFECE5", // primary-50
8
+ "#FCD2C2", // primary-75
9
+ "#FCB59A", // primary-100
10
+ "#FA9874", // primary-150
11
+ "#F77A4A", // primary-200
12
+ "#F56630", // primary-400
13
+ "#EB5017", // primary-500
14
+ "#CC400C", // primary-600
15
+ "#AD3307", // primary-700
16
+ "#8F2802", // primary-800
17
+ "#711E00", // primary-900
18
+ ];
19
+ // ─── Component ─────────────────────────────────────────────────────
20
+ export const EmptyStateIllustration = forwardRef(({ name, colored = true, palette, size = 150, className, ...rest }, ref) => {
21
+ const rawSvg = colored ? coloredIllustrations[name] : greyIllustrations[name];
22
+ // Apply custom palette via string replacement
23
+ const svgContent = useMemo(() => {
24
+ if (!colored || !palette || palette.length === 0)
25
+ return rawSvg;
26
+ let result = rawSvg;
27
+ const len = Math.min(palette.length, DEFAULT_PALETTE.length);
28
+ for (let i = 0; i < len; i++) {
29
+ const from = DEFAULT_PALETTE[i];
30
+ const to = palette[i];
31
+ if (from !== to) {
32
+ result = result.split(from).join(to.toUpperCase());
33
+ }
34
+ }
35
+ return result;
36
+ }, [rawSvg, colored, palette]);
37
+ return (_jsx("div", { ref: ref, className: cn("inline-flex shrink-0 items-center justify-center", className), ...rest, children: _jsx("svg", { width: size, height: size, viewBox: "0 0 150 150", fill: "none", xmlns: "http://www.w3.org/2000/svg", dangerouslySetInnerHTML: { __html: svgContent } }) }));
38
+ });
39
+ EmptyStateIllustration.displayName = "EmptyStateIllustration";