@karakuri-ui/react 0.2.3 → 0.3.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 (244) hide show
  1. package/README.md +0 -1
  2. package/dist/components/ui/accordion.d.mts +40 -0
  3. package/dist/components/ui/accordion.d.ts +40 -0
  4. package/dist/components/ui/accordion.js +215 -0
  5. package/dist/components/ui/accordion.js.map +1 -0
  6. package/dist/components/ui/accordion.mjs +176 -0
  7. package/dist/components/ui/accordion.mjs.map +1 -0
  8. package/dist/components/ui/alert.d.mts +38 -0
  9. package/dist/components/ui/alert.d.ts +38 -0
  10. package/dist/components/ui/alert.js +217 -0
  11. package/dist/components/ui/alert.js.map +1 -0
  12. package/dist/components/ui/alert.mjs +180 -0
  13. package/dist/components/ui/alert.mjs.map +1 -0
  14. package/dist/components/ui/avatar.d.mts +223 -0
  15. package/dist/components/ui/avatar.d.ts +223 -0
  16. package/dist/components/ui/avatar.js +245 -0
  17. package/dist/components/ui/avatar.js.map +1 -0
  18. package/dist/components/ui/avatar.mjs +204 -0
  19. package/dist/components/ui/avatar.mjs.map +1 -0
  20. package/dist/components/ui/badge.d.mts +31 -0
  21. package/dist/components/ui/badge.d.ts +31 -0
  22. package/dist/components/ui/badge.js +205 -0
  23. package/dist/components/ui/badge.js.map +1 -0
  24. package/dist/components/ui/badge.mjs +170 -0
  25. package/dist/components/ui/badge.mjs.map +1 -0
  26. package/dist/components/ui/breadcrumb.d.mts +46 -0
  27. package/dist/components/ui/breadcrumb.d.ts +46 -0
  28. package/dist/components/ui/breadcrumb.js +201 -0
  29. package/dist/components/ui/breadcrumb.js.map +1 -0
  30. package/dist/components/ui/breadcrumb.mjs +160 -0
  31. package/dist/components/ui/breadcrumb.mjs.map +1 -0
  32. package/dist/components/ui/button-group.d.mts +22 -0
  33. package/dist/components/ui/button-group.d.ts +22 -0
  34. package/dist/components/ui/button-group.js +107 -0
  35. package/dist/components/ui/button-group.js.map +1 -0
  36. package/dist/components/ui/button-group.mjs +72 -0
  37. package/dist/components/ui/button-group.mjs.map +1 -0
  38. package/dist/components/ui/button.d.mts +31 -0
  39. package/dist/components/ui/button.d.ts +31 -0
  40. package/dist/components/ui/button.js +176 -0
  41. package/dist/components/ui/button.js.map +1 -0
  42. package/dist/components/ui/button.mjs +141 -0
  43. package/dist/components/ui/button.mjs.map +1 -0
  44. package/dist/components/ui/card.d.mts +60 -0
  45. package/dist/components/ui/card.d.ts +60 -0
  46. package/dist/components/ui/card.js +361 -0
  47. package/dist/components/ui/card.js.map +1 -0
  48. package/dist/components/ui/card.mjs +319 -0
  49. package/dist/components/ui/card.mjs.map +1 -0
  50. package/dist/{chart.d.mts → components/ui/chart.d.mts} +2 -18
  51. package/dist/{chart.d.ts → components/ui/chart.d.ts} +2 -18
  52. package/dist/{chart.js → components/ui/chart.js} +30 -55
  53. package/dist/components/ui/chart.js.map +1 -0
  54. package/dist/{chart.mjs → components/ui/chart.mjs} +22 -46
  55. package/dist/components/ui/chart.mjs.map +1 -0
  56. package/dist/components/ui/checkbox.d.mts +24 -0
  57. package/dist/components/ui/checkbox.d.ts +24 -0
  58. package/dist/components/ui/checkbox.js +173 -0
  59. package/dist/components/ui/checkbox.js.map +1 -0
  60. package/dist/components/ui/checkbox.mjs +138 -0
  61. package/dist/components/ui/checkbox.mjs.map +1 -0
  62. package/dist/components/ui/divider.d.mts +27 -0
  63. package/dist/components/ui/divider.d.ts +27 -0
  64. package/dist/components/ui/divider.js +147 -0
  65. package/dist/components/ui/divider.js.map +1 -0
  66. package/dist/components/ui/divider.mjs +112 -0
  67. package/dist/components/ui/divider.mjs.map +1 -0
  68. package/dist/components/ui/drawer.d.mts +36 -0
  69. package/dist/components/ui/drawer.d.ts +36 -0
  70. package/dist/components/ui/drawer.js +211 -0
  71. package/dist/components/ui/drawer.js.map +1 -0
  72. package/dist/components/ui/drawer.mjs +165 -0
  73. package/dist/components/ui/drawer.mjs.map +1 -0
  74. package/dist/components/ui/dropdown.d.mts +34 -0
  75. package/dist/components/ui/dropdown.d.ts +34 -0
  76. package/dist/components/ui/dropdown.js +295 -0
  77. package/dist/components/ui/dropdown.js.map +1 -0
  78. package/dist/components/ui/dropdown.mjs +248 -0
  79. package/dist/components/ui/dropdown.mjs.map +1 -0
  80. package/dist/components/ui/field.d.mts +26 -0
  81. package/dist/components/ui/field.d.ts +26 -0
  82. package/dist/components/ui/field.js +141 -0
  83. package/dist/components/ui/field.js.map +1 -0
  84. package/dist/components/ui/field.mjs +103 -0
  85. package/dist/components/ui/field.mjs.map +1 -0
  86. package/dist/components/ui/icon-button.d.mts +20 -0
  87. package/dist/components/ui/icon-button.d.ts +20 -0
  88. package/dist/components/ui/icon-button.js +147 -0
  89. package/dist/components/ui/icon-button.js.map +1 -0
  90. package/dist/components/ui/icon-button.mjs +112 -0
  91. package/dist/components/ui/icon-button.mjs.map +1 -0
  92. package/dist/components/ui/index.d.mts +55 -0
  93. package/dist/components/ui/index.d.ts +55 -0
  94. package/dist/components/ui/index.js +468 -0
  95. package/dist/components/ui/index.js.map +1 -0
  96. package/dist/components/ui/index.mjs +242 -0
  97. package/dist/components/ui/index.mjs.map +1 -0
  98. package/dist/components/ui/input.d.mts +20 -0
  99. package/dist/components/ui/input.d.ts +20 -0
  100. package/dist/components/ui/input.js +250 -0
  101. package/dist/components/ui/input.js.map +1 -0
  102. package/dist/components/ui/input.mjs +215 -0
  103. package/dist/components/ui/input.mjs.map +1 -0
  104. package/dist/components/ui/metric-card.d.mts +38 -0
  105. package/dist/components/ui/metric-card.d.ts +38 -0
  106. package/dist/components/ui/metric-card.js +250 -0
  107. package/dist/components/ui/metric-card.js.map +1 -0
  108. package/dist/components/ui/metric-card.mjs +209 -0
  109. package/dist/components/ui/metric-card.mjs.map +1 -0
  110. package/dist/components/ui/modal.d.mts +47 -0
  111. package/dist/components/ui/modal.d.ts +47 -0
  112. package/dist/components/ui/modal.js +371 -0
  113. package/dist/components/ui/modal.js.map +1 -0
  114. package/dist/components/ui/modal.mjs +313 -0
  115. package/dist/components/ui/modal.mjs.map +1 -0
  116. package/dist/components/ui/navigation-menu.d.mts +120 -0
  117. package/dist/components/ui/navigation-menu.d.ts +120 -0
  118. package/dist/components/ui/navigation-menu.js +521 -0
  119. package/dist/components/ui/navigation-menu.js.map +1 -0
  120. package/dist/components/ui/navigation-menu.mjs +478 -0
  121. package/dist/components/ui/navigation-menu.mjs.map +1 -0
  122. package/dist/components/ui/pagination.d.mts +113 -0
  123. package/dist/components/ui/pagination.d.ts +113 -0
  124. package/dist/components/ui/pagination.js +484 -0
  125. package/dist/components/ui/pagination.js.map +1 -0
  126. package/dist/components/ui/pagination.mjs +438 -0
  127. package/dist/components/ui/pagination.mjs.map +1 -0
  128. package/dist/components/ui/popover.d.mts +29 -0
  129. package/dist/components/ui/popover.d.ts +29 -0
  130. package/dist/components/ui/popover.js +165 -0
  131. package/dist/components/ui/popover.js.map +1 -0
  132. package/dist/components/ui/popover.mjs +124 -0
  133. package/dist/components/ui/popover.mjs.map +1 -0
  134. package/dist/components/ui/progress.d.mts +35 -0
  135. package/dist/components/ui/progress.d.ts +35 -0
  136. package/dist/components/ui/progress.js +194 -0
  137. package/dist/components/ui/progress.js.map +1 -0
  138. package/dist/components/ui/progress.mjs +159 -0
  139. package/dist/components/ui/progress.mjs.map +1 -0
  140. package/dist/components/ui/radio-group.d.mts +35 -0
  141. package/dist/components/ui/radio-group.d.ts +35 -0
  142. package/dist/components/ui/radio-group.js +174 -0
  143. package/dist/components/ui/radio-group.js.map +1 -0
  144. package/dist/components/ui/radio-group.mjs +137 -0
  145. package/dist/components/ui/radio-group.mjs.map +1 -0
  146. package/dist/components/ui/segmented.d.mts +25 -0
  147. package/dist/components/ui/segmented.d.ts +25 -0
  148. package/dist/components/ui/segmented.js +238 -0
  149. package/dist/components/ui/segmented.js.map +1 -0
  150. package/dist/components/ui/segmented.mjs +201 -0
  151. package/dist/components/ui/segmented.mjs.map +1 -0
  152. package/dist/components/ui/select.d.mts +20 -0
  153. package/dist/components/ui/select.d.ts +20 -0
  154. package/dist/components/ui/select.js +308 -0
  155. package/dist/components/ui/select.js.map +1 -0
  156. package/dist/components/ui/select.mjs +267 -0
  157. package/dist/components/ui/select.mjs.map +1 -0
  158. package/dist/components/ui/skeleton.d.mts +26 -0
  159. package/dist/components/ui/skeleton.d.ts +26 -0
  160. package/dist/components/ui/skeleton.js +144 -0
  161. package/dist/components/ui/skeleton.js.map +1 -0
  162. package/dist/components/ui/skeleton.mjs +109 -0
  163. package/dist/components/ui/skeleton.mjs.map +1 -0
  164. package/dist/components/ui/slider.d.mts +38 -0
  165. package/dist/components/ui/slider.d.ts +38 -0
  166. package/dist/components/ui/slider.js +180 -0
  167. package/dist/components/ui/slider.js.map +1 -0
  168. package/dist/components/ui/slider.mjs +145 -0
  169. package/dist/components/ui/slider.mjs.map +1 -0
  170. package/dist/components/ui/spinner.d.mts +23 -0
  171. package/dist/components/ui/spinner.d.ts +23 -0
  172. package/dist/components/ui/spinner.js +471 -0
  173. package/dist/components/ui/spinner.js.map +1 -0
  174. package/dist/components/ui/spinner.mjs +436 -0
  175. package/dist/components/ui/spinner.mjs.map +1 -0
  176. package/dist/components/ui/switch.d.mts +22 -0
  177. package/dist/components/ui/switch.d.ts +22 -0
  178. package/dist/components/ui/switch.js +173 -0
  179. package/dist/components/ui/switch.js.map +1 -0
  180. package/dist/components/ui/switch.mjs +138 -0
  181. package/dist/components/ui/switch.mjs.map +1 -0
  182. package/dist/components/ui/table.d.mts +60 -0
  183. package/dist/components/ui/table.d.ts +60 -0
  184. package/dist/components/ui/table.js +231 -0
  185. package/dist/components/ui/table.js.map +1 -0
  186. package/dist/components/ui/table.mjs +190 -0
  187. package/dist/components/ui/table.mjs.map +1 -0
  188. package/dist/components/ui/tabs.d.mts +31 -0
  189. package/dist/components/ui/tabs.d.ts +31 -0
  190. package/dist/components/ui/tabs.js +233 -0
  191. package/dist/components/ui/tabs.js.map +1 -0
  192. package/dist/components/ui/tabs.mjs +194 -0
  193. package/dist/components/ui/tabs.mjs.map +1 -0
  194. package/dist/components/ui/textarea.d.mts +19 -0
  195. package/dist/components/ui/textarea.d.ts +19 -0
  196. package/dist/components/ui/textarea.js +181 -0
  197. package/dist/components/ui/textarea.js.map +1 -0
  198. package/dist/components/ui/textarea.mjs +146 -0
  199. package/dist/components/ui/textarea.mjs.map +1 -0
  200. package/dist/components/ui/toast.d.mts +93 -0
  201. package/dist/components/ui/toast.d.ts +93 -0
  202. package/dist/components/ui/toast.js +429 -0
  203. package/dist/components/ui/toast.js.map +1 -0
  204. package/dist/components/ui/toast.mjs +393 -0
  205. package/dist/components/ui/toast.mjs.map +1 -0
  206. package/dist/components/ui/toggle-group.d.mts +42 -0
  207. package/dist/components/ui/toggle-group.d.ts +42 -0
  208. package/dist/components/ui/toggle-group.js +183 -0
  209. package/dist/components/ui/toggle-group.js.map +1 -0
  210. package/dist/components/ui/toggle-group.mjs +146 -0
  211. package/dist/components/ui/toggle-group.mjs.map +1 -0
  212. package/dist/components/ui/toggle.d.mts +19 -0
  213. package/dist/components/ui/toggle.d.ts +19 -0
  214. package/dist/components/ui/toggle.js +194 -0
  215. package/dist/components/ui/toggle.js.map +1 -0
  216. package/dist/components/ui/toggle.mjs +159 -0
  217. package/dist/components/ui/toggle.mjs.map +1 -0
  218. package/dist/components/ui/tooltip.d.mts +26 -0
  219. package/dist/components/ui/tooltip.d.ts +26 -0
  220. package/dist/components/ui/tooltip.js +128 -0
  221. package/dist/components/ui/tooltip.js.map +1 -0
  222. package/dist/components/ui/tooltip.mjs +88 -0
  223. package/dist/components/ui/tooltip.mjs.map +1 -0
  224. package/dist/lib/code-generator.d.mts +60 -0
  225. package/dist/lib/code-generator.d.ts +60 -0
  226. package/dist/lib/code-generator.js +224 -0
  227. package/dist/lib/code-generator.js.map +1 -0
  228. package/dist/lib/code-generator.mjs +159 -0
  229. package/dist/lib/code-generator.mjs.map +1 -0
  230. package/dist/lib/utils.d.mts +10 -0
  231. package/dist/lib/utils.d.ts +10 -0
  232. package/dist/lib/utils.js +33 -0
  233. package/dist/lib/utils.js.map +1 -0
  234. package/dist/lib/utils.mjs +9 -0
  235. package/dist/lib/utils.mjs.map +1 -0
  236. package/package.json +11 -11
  237. package/dist/chart.js.map +0 -1
  238. package/dist/chart.mjs.map +0 -1
  239. package/dist/index.d.mts +0 -1636
  240. package/dist/index.d.ts +0 -1636
  241. package/dist/index.js +0 -7291
  242. package/dist/index.js.map +0 -1
  243. package/dist/index.mjs +0 -7048
  244. package/dist/index.mjs.map +0 -1
@@ -0,0 +1,34 @@
1
+ import * as React from 'react';
2
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
3
+
4
+ type DropdownMenuRadius = 'md' | 'lg' | 'xl';
5
+ type DropdownMenuSize = 'sm' | 'md' | 'lg';
6
+ declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
7
+ declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
8
+ declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
10
+ declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
11
+ declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
12
+ radius?: DropdownMenuRadius;
13
+ flush?: boolean;
14
+ size?: DropdownMenuSize;
15
+ } & React.RefAttributes<HTMLDivElement>>;
16
+ declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
17
+ inset?: boolean;
18
+ } & React.RefAttributes<HTMLDivElement>>;
19
+ declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
20
+ declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
21
+ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
22
+ inset?: boolean;
23
+ } & React.RefAttributes<HTMLDivElement>>;
24
+ declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
25
+ declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
26
+ inset?: boolean;
27
+ } & React.RefAttributes<HTMLDivElement>>;
28
+ declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
29
+ declare function DropdownMenuShortcut({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
30
+ declare namespace DropdownMenuShortcut {
31
+ var displayName: string;
32
+ }
33
+
34
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuRadius, DropdownMenuSeparator, DropdownMenuShortcut, type DropdownMenuSize, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
@@ -0,0 +1,34 @@
1
+ import * as React from 'react';
2
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
3
+
4
+ type DropdownMenuRadius = 'md' | 'lg' | 'xl';
5
+ type DropdownMenuSize = 'sm' | 'md' | 'lg';
6
+ declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
7
+ declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
8
+ declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
10
+ declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
11
+ declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
12
+ radius?: DropdownMenuRadius;
13
+ flush?: boolean;
14
+ size?: DropdownMenuSize;
15
+ } & React.RefAttributes<HTMLDivElement>>;
16
+ declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
17
+ inset?: boolean;
18
+ } & React.RefAttributes<HTMLDivElement>>;
19
+ declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
20
+ declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
21
+ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
22
+ inset?: boolean;
23
+ } & React.RefAttributes<HTMLDivElement>>;
24
+ declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
25
+ declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
26
+ inset?: boolean;
27
+ } & React.RefAttributes<HTMLDivElement>>;
28
+ declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
29
+ declare function DropdownMenuShortcut({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
30
+ declare namespace DropdownMenuShortcut {
31
+ var displayName: string;
32
+ }
33
+
34
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuRadius, DropdownMenuSeparator, DropdownMenuShortcut, type DropdownMenuSize, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
@@ -0,0 +1,295 @@
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var dropdown_exports = {};
31
+ __export(dropdown_exports, {
32
+ DropdownMenu: () => DropdownMenu,
33
+ DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
34
+ DropdownMenuContent: () => DropdownMenuContent,
35
+ DropdownMenuGroup: () => DropdownMenuGroup,
36
+ DropdownMenuItem: () => DropdownMenuItem,
37
+ DropdownMenuLabel: () => DropdownMenuLabel,
38
+ DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
39
+ DropdownMenuRadioItem: () => DropdownMenuRadioItem,
40
+ DropdownMenuSeparator: () => DropdownMenuSeparator,
41
+ DropdownMenuShortcut: () => DropdownMenuShortcut,
42
+ DropdownMenuSub: () => DropdownMenuSub,
43
+ DropdownMenuSubContent: () => DropdownMenuSubContent,
44
+ DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
45
+ DropdownMenuTrigger: () => DropdownMenuTrigger
46
+ });
47
+ module.exports = __toCommonJS(dropdown_exports);
48
+ var React = __toESM(require("react"));
49
+ var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
50
+ var import_utils = require("../../lib/utils");
51
+ const contentRadiusMap = {
52
+ md: "rounded-md",
53
+ // 6px
54
+ lg: "rounded-lg",
55
+ // 8px
56
+ xl: "rounded-xl"
57
+ // 12px (default)
58
+ };
59
+ const itemRadiusMap = {
60
+ md: "rounded",
61
+ // 4px — perceptual balance (67%)
62
+ lg: "rounded-md",
63
+ // 6px — perceptual balance (75%)
64
+ xl: "rounded-lg"
65
+ // 8px — perceptual balance (67%)
66
+ };
67
+ const itemSizeMap = {
68
+ sm: "px-2 py-1.5 text-xs",
69
+ md: "px-2 py-1.5 text-sm",
70
+ lg: "px-3 py-2.5 text-md"
71
+ };
72
+ const indicatorItemSizeMap = {
73
+ sm: "py-1.5 pl-6 pr-2 text-xs",
74
+ md: "py-1.5 pl-8 pr-2 text-sm",
75
+ lg: "py-2.5 pl-10 pr-3 text-md"
76
+ };
77
+ const indicatorSizeMap = {
78
+ sm: "left-2 h-3 w-3",
79
+ md: "left-2 h-3.5 w-3.5",
80
+ lg: "left-3 h-4 w-4"
81
+ };
82
+ const labelSizeMap = {
83
+ sm: "px-2 py-1.5 text-xs",
84
+ md: "px-2 py-1.5 text-xs",
85
+ lg: "px-3 py-2.5 text-xs"
86
+ };
87
+ const flushItemPaddingMap = {
88
+ sm: "px-3",
89
+ md: "px-3",
90
+ lg: "px-4"
91
+ };
92
+ const flushIndicatorItemPaddingMap = {
93
+ sm: "pl-7 pr-3",
94
+ md: "pl-9 pr-3",
95
+ lg: "pl-11 pr-4"
96
+ };
97
+ const insetSizeMap = {
98
+ sm: "pl-6",
99
+ md: "pl-8",
100
+ lg: "pl-10"
101
+ };
102
+ const DropdownMenuStyleContext = React.createContext({ radius: "lg", flush: false, size: "md" });
103
+ const DropdownMenu = DropdownMenuPrimitive.Root;
104
+ const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
105
+ const DropdownMenuGroup = DropdownMenuPrimitive.Group;
106
+ const DropdownMenuSub = DropdownMenuPrimitive.Sub;
107
+ const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
108
+ const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, radius = "md", flush = false, size = "md", onCloseAutoFocus, ...props }, ref) => /* @__PURE__ */ React.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React.createElement(DropdownMenuStyleContext.Provider, { value: { radius, flush, size } }, /* @__PURE__ */ React.createElement(
109
+ DropdownMenuPrimitive.Content,
110
+ {
111
+ ref,
112
+ sideOffset,
113
+ onCloseAutoFocus: (e) => {
114
+ e.preventDefault();
115
+ onCloseAutoFocus?.(e);
116
+ },
117
+ className: (0, import_utils.cn)(
118
+ "z-dropdown min-w-[8rem] overflow-hidden border border-border bg-background text-foreground shadow-lg",
119
+ flush ? "py-1" : "p-1",
120
+ contentRadiusMap[radius],
121
+ className
122
+ ),
123
+ ...props
124
+ }
125
+ ))));
126
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
127
+ const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => {
128
+ const { radius, flush, size } = React.useContext(DropdownMenuStyleContext);
129
+ return /* @__PURE__ */ React.createElement(
130
+ DropdownMenuPrimitive.Item,
131
+ {
132
+ ref,
133
+ className: (0, import_utils.cn)(
134
+ "relative flex cursor-default select-none items-center outline-none",
135
+ itemSizeMap[size],
136
+ !flush && itemRadiusMap[radius],
137
+ flush && flushItemPaddingMap[size],
138
+ "transition-colors duration-fast",
139
+ "focus:bg-background-muted",
140
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
141
+ inset && insetSizeMap[size],
142
+ className
143
+ ),
144
+ ...props
145
+ }
146
+ );
147
+ });
148
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
149
+ const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => {
150
+ const { radius, flush, size } = React.useContext(DropdownMenuStyleContext);
151
+ return /* @__PURE__ */ React.createElement(
152
+ DropdownMenuPrimitive.CheckboxItem,
153
+ {
154
+ ref,
155
+ className: (0, import_utils.cn)(
156
+ "relative flex cursor-default select-none items-center outline-none",
157
+ indicatorItemSizeMap[size],
158
+ !flush && itemRadiusMap[radius],
159
+ flush && flushIndicatorItemPaddingMap[size],
160
+ "transition-colors duration-fast",
161
+ "focus:bg-background-muted",
162
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
163
+ className
164
+ ),
165
+ checked,
166
+ ...props
167
+ },
168
+ /* @__PURE__ */ React.createElement("span", { className: (0, import_utils.cn)("absolute flex items-center justify-center", indicatorSizeMap[size]) }, /* @__PURE__ */ React.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React.createElement("svg", { className: "icon-xs", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 3, "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" })))),
169
+ children
170
+ );
171
+ });
172
+ DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
173
+ const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => {
174
+ const { radius, flush, size } = React.useContext(DropdownMenuStyleContext);
175
+ return /* @__PURE__ */ React.createElement(
176
+ DropdownMenuPrimitive.RadioItem,
177
+ {
178
+ ref,
179
+ className: (0, import_utils.cn)(
180
+ "relative flex cursor-default select-none items-center outline-none",
181
+ indicatorItemSizeMap[size],
182
+ !flush && itemRadiusMap[radius],
183
+ flush && flushIndicatorItemPaddingMap[size],
184
+ "transition-colors duration-fast",
185
+ "focus:bg-background-muted",
186
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
187
+ className
188
+ ),
189
+ ...props
190
+ },
191
+ /* @__PURE__ */ React.createElement("span", { className: (0, import_utils.cn)("absolute flex items-center justify-center", indicatorSizeMap[size]) }, /* @__PURE__ */ React.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React.createElement("svg", { className: "icon-xs", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "6" })))),
192
+ children
193
+ );
194
+ });
195
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
196
+ const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => {
197
+ const { flush, size } = React.useContext(DropdownMenuStyleContext);
198
+ return /* @__PURE__ */ React.createElement(
199
+ DropdownMenuPrimitive.Label,
200
+ {
201
+ ref,
202
+ className: (0, import_utils.cn)(
203
+ "font-semibold text-text-muted",
204
+ labelSizeMap[size],
205
+ flush && flushItemPaddingMap[size],
206
+ inset && insetSizeMap[size],
207
+ className
208
+ ),
209
+ ...props
210
+ }
211
+ );
212
+ });
213
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
214
+ const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => {
215
+ const { flush } = React.useContext(DropdownMenuStyleContext);
216
+ return /* @__PURE__ */ React.createElement(
217
+ DropdownMenuPrimitive.Separator,
218
+ {
219
+ ref,
220
+ className: (0, import_utils.cn)("h-px bg-border my-1", !flush && "-mx-1", className),
221
+ ...props
222
+ }
223
+ );
224
+ });
225
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
226
+ const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => {
227
+ const { radius, flush, size } = React.useContext(DropdownMenuStyleContext);
228
+ return /* @__PURE__ */ React.createElement(
229
+ DropdownMenuPrimitive.SubTrigger,
230
+ {
231
+ ref,
232
+ className: (0, import_utils.cn)(
233
+ "flex cursor-default select-none items-center outline-none",
234
+ itemSizeMap[size],
235
+ !flush && itemRadiusMap[radius],
236
+ flush && flushItemPaddingMap[size],
237
+ "focus:bg-background-muted data-[state=open]:bg-background-muted",
238
+ inset && insetSizeMap[size],
239
+ className
240
+ ),
241
+ ...props
242
+ },
243
+ children,
244
+ /* @__PURE__ */ React.createElement("svg", { className: "ml-auto icon-xs", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }))
245
+ );
246
+ });
247
+ DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
248
+ const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => {
249
+ const { radius, flush } = React.useContext(DropdownMenuStyleContext);
250
+ return /* @__PURE__ */ React.createElement(
251
+ DropdownMenuPrimitive.SubContent,
252
+ {
253
+ ref,
254
+ className: (0, import_utils.cn)(
255
+ "z-dropdown min-w-[8rem] overflow-hidden border border-border bg-background text-foreground shadow-lg",
256
+ flush ? "py-1" : "p-1",
257
+ contentRadiusMap[radius],
258
+ className
259
+ ),
260
+ ...props
261
+ }
262
+ );
263
+ });
264
+ DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
265
+ function DropdownMenuShortcut({
266
+ className,
267
+ ...props
268
+ }) {
269
+ return /* @__PURE__ */ React.createElement(
270
+ "span",
271
+ {
272
+ className: (0, import_utils.cn)("ml-auto pl-4 text-xs text-text-subtle tracking-widest", className),
273
+ ...props
274
+ }
275
+ );
276
+ }
277
+ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
278
+ // Annotate the CommonJS export names for ESM import in node:
279
+ 0 && (module.exports = {
280
+ DropdownMenu,
281
+ DropdownMenuCheckboxItem,
282
+ DropdownMenuContent,
283
+ DropdownMenuGroup,
284
+ DropdownMenuItem,
285
+ DropdownMenuLabel,
286
+ DropdownMenuRadioGroup,
287
+ DropdownMenuRadioItem,
288
+ DropdownMenuSeparator,
289
+ DropdownMenuShortcut,
290
+ DropdownMenuSub,
291
+ DropdownMenuSubContent,
292
+ DropdownMenuSubTrigger,
293
+ DropdownMenuTrigger
294
+ });
295
+ //# sourceMappingURL=dropdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/ui/dropdown.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'\nimport { cn } from '../../lib/utils'\n\n// Radius variants for Content and Item (concentric rounded rectangles)\ntype DropdownMenuRadius = 'md' | 'lg' | 'xl'\n\nconst contentRadiusMap: Record<DropdownMenuRadius, string> = {\n md: 'rounded-md', // 6px\n lg: 'rounded-lg', // 8px\n xl: 'rounded-xl', // 12px (default)\n}\n\nconst itemRadiusMap: Record<DropdownMenuRadius, string> = {\n md: 'rounded', // 4px — perceptual balance (67%)\n lg: 'rounded-md', // 6px — perceptual balance (75%)\n xl: 'rounded-lg', // 8px — perceptual balance (67%)\n}\n\n// Size variants\ntype DropdownMenuSize = 'sm' | 'md' | 'lg'\n\nconst itemSizeMap: Record<DropdownMenuSize, string> = {\n sm: 'px-2 py-1.5 text-xs',\n md: 'px-2 py-1.5 text-sm',\n lg: 'px-3 py-2.5 text-md',\n}\n\nconst indicatorItemSizeMap: Record<DropdownMenuSize, string> = {\n sm: 'py-1.5 pl-6 pr-2 text-xs',\n md: 'py-1.5 pl-8 pr-2 text-sm',\n lg: 'py-2.5 pl-10 pr-3 text-md',\n}\n\nconst indicatorSizeMap: Record<DropdownMenuSize, string> = {\n sm: 'left-2 h-3 w-3',\n md: 'left-2 h-3.5 w-3.5',\n lg: 'left-3 h-4 w-4',\n}\n\nconst labelSizeMap: Record<DropdownMenuSize, string> = {\n sm: 'px-2 py-1.5 text-xs',\n md: 'px-2 py-1.5 text-xs',\n lg: 'px-3 py-2.5 text-xs',\n}\n\nconst flushItemPaddingMap: Record<DropdownMenuSize, string> = {\n sm: 'px-3',\n md: 'px-3',\n lg: 'px-4',\n}\n\nconst flushIndicatorItemPaddingMap: Record<DropdownMenuSize, string> = {\n sm: 'pl-7 pr-3',\n md: 'pl-9 pr-3',\n lg: 'pl-11 pr-4',\n}\n\nconst insetSizeMap: Record<DropdownMenuSize, string> = {\n sm: 'pl-6',\n md: 'pl-8',\n lg: 'pl-10',\n}\n\n// Style context — propagates radius, flush, size from Content to children\nconst DropdownMenuStyleContext = React.createContext<{\n radius: DropdownMenuRadius\n flush: boolean\n size: DropdownMenuSize\n}>({ radius: 'lg', flush: false, size: 'md' })\n\n// Root — state management (controlled / uncontrolled)\nconst DropdownMenu = DropdownMenuPrimitive.Root\n\n// Trigger — the element that toggles the menu\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\n// Group — groups related items\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\n// Sub — submenu root\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\n// RadioGroup — radio selection group\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\n// Content — the floating panel (rendered in a Portal)\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> & {\n radius?: DropdownMenuRadius\n flush?: boolean\n size?: DropdownMenuSize\n }\n>(({ className, sideOffset = 4, radius = 'md', flush = false, size = 'md', onCloseAutoFocus, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuStyleContext.Provider value={{ radius, flush, size }}>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n onCloseAutoFocus={(e) => {\n e.preventDefault()\n onCloseAutoFocus?.(e)\n }}\n className={cn(\n 'z-dropdown min-w-[8rem] overflow-hidden border border-border bg-background text-foreground shadow-lg',\n flush ? 'py-1' : 'p-1',\n contentRadiusMap[radius],\n className\n )}\n {...props}\n />\n </DropdownMenuStyleContext.Provider>\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\n// Item — a single menu item\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => {\n const { radius, flush, size } = React.useContext(DropdownMenuStyleContext)\n return (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center outline-none',\n itemSizeMap[size],\n !flush && itemRadiusMap[radius],\n flush && flushItemPaddingMap[size],\n 'transition-colors duration-fast',\n 'focus:bg-background-muted',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n inset && insetSizeMap[size],\n className\n )}\n {...props}\n />\n )\n})\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\n// CheckboxItem — item with a checkbox indicator\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => {\n const { radius, flush, size } = React.useContext(DropdownMenuStyleContext)\n return (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center outline-none',\n indicatorItemSizeMap[size],\n !flush && itemRadiusMap[radius],\n flush && flushIndicatorItemPaddingMap[size],\n 'transition-colors duration-fast',\n 'focus:bg-background-muted',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className\n )}\n checked={checked}\n {...props}\n >\n <span className={cn('absolute flex items-center justify-center', indicatorSizeMap[size])}>\n <DropdownMenuPrimitive.ItemIndicator>\n <svg className=\"icon-xs\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={3} aria-hidden=\"true\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M5 13l4 4L19 7\" />\n </svg>\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n )\n})\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName\n\n// RadioItem — item within a RadioGroup\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => {\n const { radius, flush, size } = React.useContext(DropdownMenuStyleContext)\n return (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center outline-none',\n indicatorItemSizeMap[size],\n !flush && itemRadiusMap[radius],\n flush && flushIndicatorItemPaddingMap[size],\n 'transition-colors duration-fast',\n 'focus:bg-background-muted',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className\n )}\n {...props}\n >\n <span className={cn('absolute flex items-center justify-center', indicatorSizeMap[size])}>\n <DropdownMenuPrimitive.ItemIndicator>\n <svg className=\"icon-xs\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"6\" />\n </svg>\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n )\n})\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\n// Label — non-interactive group heading\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => {\n const { flush, size } = React.useContext(DropdownMenuStyleContext)\n return (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n 'font-semibold text-text-muted',\n labelSizeMap[size],\n flush && flushItemPaddingMap[size],\n inset && insetSizeMap[size],\n className\n )}\n {...props}\n />\n )\n})\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\n// Separator — visual divider between groups\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => {\n const { flush } = React.useContext(DropdownMenuStyleContext)\n return (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn('h-px bg-border my-1', !flush && '-mx-1', className)}\n {...props}\n />\n )\n})\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\n// SubTrigger — item that opens a submenu\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => {\n const { radius, flush, size } = React.useContext(DropdownMenuStyleContext)\n return (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center outline-none',\n itemSizeMap[size],\n !flush && itemRadiusMap[radius],\n flush && flushItemPaddingMap[size],\n 'focus:bg-background-muted data-[state=open]:bg-background-muted',\n inset && insetSizeMap[size],\n className\n )}\n {...props}\n >\n {children}\n <svg className=\"ml-auto icon-xs\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={2} aria-hidden=\"true\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M9 5l7 7-7 7\" />\n </svg>\n </DropdownMenuPrimitive.SubTrigger>\n )\n})\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName\n\n// SubContent — the floating panel for a submenu\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => {\n const { radius, flush } = React.useContext(DropdownMenuStyleContext)\n return (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'z-dropdown min-w-[8rem] overflow-hidden border border-border bg-background text-foreground shadow-lg',\n flush ? 'py-1' : 'p-1',\n contentRadiusMap[radius],\n className\n )}\n {...props}\n />\n )\n})\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName\n\n// Shortcut — keyboard shortcut hint text\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) {\n return (\n <span\n className={cn('ml-auto pl-4 text-xs text-text-subtle tracking-widest', className)}\n {...props}\n />\n )\n}\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut'\n\nexport type { DropdownMenuRadius, DropdownMenuSize }\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuGroup,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n DropdownMenuShortcut,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,YAAuB;AACvB,4BAAuC;AACvC,mBAAmB;AAKnB,MAAM,mBAAuD;AAAA,EAC3D,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AACN;AAEA,MAAM,gBAAoD;AAAA,EACxD,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AACN;AAKA,MAAM,cAAgD;AAAA,EACpD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,uBAAyD;AAAA,EAC7D,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,mBAAqD;AAAA,EACzD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,eAAiD;AAAA,EACrD,I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AAA,EACN;AAEJ;AACA,qBAAqB,cAAc;","names":[]}
@@ -0,0 +1,248 @@
1
+ "use client";
2
+ import * as React from "react";
3
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
4
+ import { cn } from "../../lib/utils";
5
+ const contentRadiusMap = {
6
+ md: "rounded-md",
7
+ // 6px
8
+ lg: "rounded-lg",
9
+ // 8px
10
+ xl: "rounded-xl"
11
+ // 12px (default)
12
+ };
13
+ const itemRadiusMap = {
14
+ md: "rounded",
15
+ // 4px — perceptual balance (67%)
16
+ lg: "rounded-md",
17
+ // 6px — perceptual balance (75%)
18
+ xl: "rounded-lg"
19
+ // 8px — perceptual balance (67%)
20
+ };
21
+ const itemSizeMap = {
22
+ sm: "px-2 py-1.5 text-xs",
23
+ md: "px-2 py-1.5 text-sm",
24
+ lg: "px-3 py-2.5 text-md"
25
+ };
26
+ const indicatorItemSizeMap = {
27
+ sm: "py-1.5 pl-6 pr-2 text-xs",
28
+ md: "py-1.5 pl-8 pr-2 text-sm",
29
+ lg: "py-2.5 pl-10 pr-3 text-md"
30
+ };
31
+ const indicatorSizeMap = {
32
+ sm: "left-2 h-3 w-3",
33
+ md: "left-2 h-3.5 w-3.5",
34
+ lg: "left-3 h-4 w-4"
35
+ };
36
+ const labelSizeMap = {
37
+ sm: "px-2 py-1.5 text-xs",
38
+ md: "px-2 py-1.5 text-xs",
39
+ lg: "px-3 py-2.5 text-xs"
40
+ };
41
+ const flushItemPaddingMap = {
42
+ sm: "px-3",
43
+ md: "px-3",
44
+ lg: "px-4"
45
+ };
46
+ const flushIndicatorItemPaddingMap = {
47
+ sm: "pl-7 pr-3",
48
+ md: "pl-9 pr-3",
49
+ lg: "pl-11 pr-4"
50
+ };
51
+ const insetSizeMap = {
52
+ sm: "pl-6",
53
+ md: "pl-8",
54
+ lg: "pl-10"
55
+ };
56
+ const DropdownMenuStyleContext = React.createContext({ radius: "lg", flush: false, size: "md" });
57
+ const DropdownMenu = DropdownMenuPrimitive.Root;
58
+ const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
59
+ const DropdownMenuGroup = DropdownMenuPrimitive.Group;
60
+ const DropdownMenuSub = DropdownMenuPrimitive.Sub;
61
+ const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
62
+ const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, radius = "md", flush = false, size = "md", onCloseAutoFocus, ...props }, ref) => /* @__PURE__ */ React.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React.createElement(DropdownMenuStyleContext.Provider, { value: { radius, flush, size } }, /* @__PURE__ */ React.createElement(
63
+ DropdownMenuPrimitive.Content,
64
+ {
65
+ ref,
66
+ sideOffset,
67
+ onCloseAutoFocus: (e) => {
68
+ e.preventDefault();
69
+ onCloseAutoFocus?.(e);
70
+ },
71
+ className: cn(
72
+ "z-dropdown min-w-[8rem] overflow-hidden border border-border bg-background text-foreground shadow-lg",
73
+ flush ? "py-1" : "p-1",
74
+ contentRadiusMap[radius],
75
+ className
76
+ ),
77
+ ...props
78
+ }
79
+ ))));
80
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
81
+ const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => {
82
+ const { radius, flush, size } = React.useContext(DropdownMenuStyleContext);
83
+ return /* @__PURE__ */ React.createElement(
84
+ DropdownMenuPrimitive.Item,
85
+ {
86
+ ref,
87
+ className: cn(
88
+ "relative flex cursor-default select-none items-center outline-none",
89
+ itemSizeMap[size],
90
+ !flush && itemRadiusMap[radius],
91
+ flush && flushItemPaddingMap[size],
92
+ "transition-colors duration-fast",
93
+ "focus:bg-background-muted",
94
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
95
+ inset && insetSizeMap[size],
96
+ className
97
+ ),
98
+ ...props
99
+ }
100
+ );
101
+ });
102
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
103
+ const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => {
104
+ const { radius, flush, size } = React.useContext(DropdownMenuStyleContext);
105
+ return /* @__PURE__ */ React.createElement(
106
+ DropdownMenuPrimitive.CheckboxItem,
107
+ {
108
+ ref,
109
+ className: cn(
110
+ "relative flex cursor-default select-none items-center outline-none",
111
+ indicatorItemSizeMap[size],
112
+ !flush && itemRadiusMap[radius],
113
+ flush && flushIndicatorItemPaddingMap[size],
114
+ "transition-colors duration-fast",
115
+ "focus:bg-background-muted",
116
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
117
+ className
118
+ ),
119
+ checked,
120
+ ...props
121
+ },
122
+ /* @__PURE__ */ React.createElement("span", { className: cn("absolute flex items-center justify-center", indicatorSizeMap[size]) }, /* @__PURE__ */ React.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React.createElement("svg", { className: "icon-xs", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 3, "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" })))),
123
+ children
124
+ );
125
+ });
126
+ DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
127
+ const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => {
128
+ const { radius, flush, size } = React.useContext(DropdownMenuStyleContext);
129
+ return /* @__PURE__ */ React.createElement(
130
+ DropdownMenuPrimitive.RadioItem,
131
+ {
132
+ ref,
133
+ className: cn(
134
+ "relative flex cursor-default select-none items-center outline-none",
135
+ indicatorItemSizeMap[size],
136
+ !flush && itemRadiusMap[radius],
137
+ flush && flushIndicatorItemPaddingMap[size],
138
+ "transition-colors duration-fast",
139
+ "focus:bg-background-muted",
140
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
141
+ className
142
+ ),
143
+ ...props
144
+ },
145
+ /* @__PURE__ */ React.createElement("span", { className: cn("absolute flex items-center justify-center", indicatorSizeMap[size]) }, /* @__PURE__ */ React.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React.createElement("svg", { className: "icon-xs", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "6" })))),
146
+ children
147
+ );
148
+ });
149
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
150
+ const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => {
151
+ const { flush, size } = React.useContext(DropdownMenuStyleContext);
152
+ return /* @__PURE__ */ React.createElement(
153
+ DropdownMenuPrimitive.Label,
154
+ {
155
+ ref,
156
+ className: cn(
157
+ "font-semibold text-text-muted",
158
+ labelSizeMap[size],
159
+ flush && flushItemPaddingMap[size],
160
+ inset && insetSizeMap[size],
161
+ className
162
+ ),
163
+ ...props
164
+ }
165
+ );
166
+ });
167
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
168
+ const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => {
169
+ const { flush } = React.useContext(DropdownMenuStyleContext);
170
+ return /* @__PURE__ */ React.createElement(
171
+ DropdownMenuPrimitive.Separator,
172
+ {
173
+ ref,
174
+ className: cn("h-px bg-border my-1", !flush && "-mx-1", className),
175
+ ...props
176
+ }
177
+ );
178
+ });
179
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
180
+ const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => {
181
+ const { radius, flush, size } = React.useContext(DropdownMenuStyleContext);
182
+ return /* @__PURE__ */ React.createElement(
183
+ DropdownMenuPrimitive.SubTrigger,
184
+ {
185
+ ref,
186
+ className: cn(
187
+ "flex cursor-default select-none items-center outline-none",
188
+ itemSizeMap[size],
189
+ !flush && itemRadiusMap[radius],
190
+ flush && flushItemPaddingMap[size],
191
+ "focus:bg-background-muted data-[state=open]:bg-background-muted",
192
+ inset && insetSizeMap[size],
193
+ className
194
+ ),
195
+ ...props
196
+ },
197
+ children,
198
+ /* @__PURE__ */ React.createElement("svg", { className: "ml-auto icon-xs", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }))
199
+ );
200
+ });
201
+ DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
202
+ const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => {
203
+ const { radius, flush } = React.useContext(DropdownMenuStyleContext);
204
+ return /* @__PURE__ */ React.createElement(
205
+ DropdownMenuPrimitive.SubContent,
206
+ {
207
+ ref,
208
+ className: cn(
209
+ "z-dropdown min-w-[8rem] overflow-hidden border border-border bg-background text-foreground shadow-lg",
210
+ flush ? "py-1" : "p-1",
211
+ contentRadiusMap[radius],
212
+ className
213
+ ),
214
+ ...props
215
+ }
216
+ );
217
+ });
218
+ DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
219
+ function DropdownMenuShortcut({
220
+ className,
221
+ ...props
222
+ }) {
223
+ return /* @__PURE__ */ React.createElement(
224
+ "span",
225
+ {
226
+ className: cn("ml-auto pl-4 text-xs text-text-subtle tracking-widest", className),
227
+ ...props
228
+ }
229
+ );
230
+ }
231
+ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
232
+ export {
233
+ DropdownMenu,
234
+ DropdownMenuCheckboxItem,
235
+ DropdownMenuContent,
236
+ DropdownMenuGroup,
237
+ DropdownMenuItem,
238
+ DropdownMenuLabel,
239
+ DropdownMenuRadioGroup,
240
+ DropdownMenuRadioItem,
241
+ DropdownMenuSeparator,
242
+ DropdownMenuShortcut,
243
+ DropdownMenuSub,
244
+ DropdownMenuSubContent,
245
+ DropdownMenuSubTrigger,
246
+ DropdownMenuTrigger
247
+ };
248
+ //# sourceMappingURL=dropdown.mjs.map