@foundrykit/primitives 2.1.3 → 2.2.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 (190) hide show
  1. package/dist/components/accordion/index.js +60 -6
  2. package/dist/components/alert/index.js +62 -6
  3. package/dist/components/alert-dialog/index.js +142 -13
  4. package/dist/components/aspect-ratio/index.js +9 -3
  5. package/dist/components/avatar/index.js +50 -5
  6. package/dist/components/badge/index.js +37 -4
  7. package/dist/components/breadcrumb/index.js +95 -9
  8. package/dist/components/button-group/index.js +74 -6
  9. package/dist/components/card/index.js +66 -8
  10. package/dist/components/checkbox/index.js +30 -3
  11. package/dist/components/collapsible/index.js +33 -7
  12. package/dist/components/context-menu/index.js +208 -17
  13. package/dist/components/dialog/index.js +126 -12
  14. package/dist/components/direction/index.js +10 -2
  15. package/dist/components/drawer/index.js +118 -12
  16. package/dist/components/dropdown/index.js +216 -17
  17. package/dist/components/empty/index.js +95 -9
  18. package/dist/components/field/index.js +211 -13
  19. package/dist/components/hover-card/index.js +35 -5
  20. package/dist/components/item/index.js +178 -14
  21. package/dist/components/kbd/index.js +27 -4
  22. package/dist/components/label/index.js +21 -3
  23. package/dist/components/menubar/index.js +235 -18
  24. package/dist/components/native-select/index.js +25 -3
  25. package/dist/components/navigation-menu/index.js +161 -11
  26. package/dist/components/popover/index.js +40 -6
  27. package/dist/components/progress/index.js +30 -3
  28. package/dist/components/radio-group/index.js +43 -4
  29. package/dist/components/resizable/index.js +43 -5
  30. package/dist/components/scroll-area/index.js +58 -4
  31. package/dist/components/section/index.js +13 -3
  32. package/dist/components/select/index.js +159 -12
  33. package/dist/components/sheet/index.js +118 -10
  34. package/dist/components/skeleton/index.js +13 -3
  35. package/dist/components/slider/index.js +64 -3
  36. package/dist/components/sonner/index.js +21 -4
  37. package/dist/components/spinner/index.js +19 -3
  38. package/dist/components/switch/index.js +30 -3
  39. package/dist/components/table/index.js +105 -10
  40. package/dist/components/tabs/index.js +63 -6
  41. package/dist/components/toggle/index.js +41 -4
  42. package/dist/components/toggle-group/index.js +80 -4
  43. package/dist/components/tooltip/index.js +51 -6
  44. package/dist/components/typography/index.js +147 -14
  45. package/dist/index.js +208 -255
  46. package/package.json +3 -3
  47. package/dist/chunk-25N35Z5M.js +0 -42
  48. package/dist/chunk-2JOT4DV4.js +0 -66
  49. package/dist/chunk-2SBGU5XA.js +0 -233
  50. package/dist/chunk-2UG6OCGA.js +0 -75
  51. package/dist/chunk-3BAO7TAS.js +0 -105
  52. package/dist/chunk-3NQR7JZR.js +0 -128
  53. package/dist/chunk-3QUMCM5K.js +0 -225
  54. package/dist/chunk-3TZXV53R.js +0 -55
  55. package/dist/chunk-3UKWAM5M.js +0 -33
  56. package/dist/chunk-44I6VK3H.js +0 -105
  57. package/dist/chunk-67UXTT4O.js +0 -116
  58. package/dist/chunk-727ACUWN.js +0 -82
  59. package/dist/chunk-76APYFRN.js +0 -29
  60. package/dist/chunk-AJAAMJYH.js +0 -12
  61. package/dist/chunk-B5YCE3UP.js +0 -57
  62. package/dist/chunk-BIFBYERK.js +0 -69
  63. package/dist/chunk-DXZ4GUQO.js +0 -33
  64. package/dist/chunk-ED6T7ZZN.js +0 -130
  65. package/dist/chunk-EEAK2RWF.js +0 -23
  66. package/dist/chunk-F2TEA6ER.js +0 -138
  67. package/dist/chunk-FF5D53KL.js +0 -69
  68. package/dist/chunk-FRIOQFPE.js +0 -171
  69. package/dist/chunk-G2YBCHWR.js +0 -46
  70. package/dist/chunk-GKCBSG2W.js +0 -67
  71. package/dist/chunk-GPEL656S.js +0 -84
  72. package/dist/chunk-JKKCRFYB.js +0 -36
  73. package/dist/chunk-JTSIBZS4.js +0 -194
  74. package/dist/chunk-MCXSVXO4.js +0 -24
  75. package/dist/chunk-MMZJQ7RW.js +0 -33
  76. package/dist/chunk-MYIUX3DT.js +0 -62
  77. package/dist/chunk-P5KEJOBH.js +0 -155
  78. package/dist/chunk-PAO3DSEF.js +0 -48
  79. package/dist/chunk-PLLG76QJ.js +0 -32
  80. package/dist/chunk-SDYKJVXX.js +0 -253
  81. package/dist/chunk-SIQHWNPH.js +0 -45
  82. package/dist/chunk-SKR3J46C.js +0 -17
  83. package/dist/chunk-STRBREHN.js +0 -17
  84. package/dist/chunk-SUEPE6OX.js +0 -47
  85. package/dist/chunk-TA23RNS4.js +0 -162
  86. package/dist/chunk-TRXU4SOJ.js +0 -224
  87. package/dist/chunk-U7JIOR7A.js +0 -172
  88. package/dist/chunk-VPBVKBZ7.js +0 -25
  89. package/dist/chunk-W4XY3SNY.js +0 -40
  90. package/dist/chunk-YT2ZIMZI.js +0 -16
  91. package/dist/components/accordion/index.cjs +0 -104
  92. package/dist/components/accordion/index.d.cts +0 -25
  93. package/dist/components/alert/index.cjs +0 -96
  94. package/dist/components/alert/index.d.cts +0 -28
  95. package/dist/components/alert-dialog/index.cjs +0 -200
  96. package/dist/components/alert-dialog/index.d.cts +0 -42
  97. package/dist/components/aspect-ratio/index.cjs +0 -47
  98. package/dist/components/aspect-ratio/index.d.cts +0 -19
  99. package/dist/components/avatar/index.cjs +0 -92
  100. package/dist/components/avatar/index.d.cts +0 -24
  101. package/dist/components/badge/index.cjs +0 -67
  102. package/dist/components/badge/index.d.cts +0 -24
  103. package/dist/components/breadcrumb/index.cjs +0 -135
  104. package/dist/components/breadcrumb/index.d.cts +0 -33
  105. package/dist/components/button/index.cjs +0 -87
  106. package/dist/components/button/index.d.cts +0 -28
  107. package/dist/components/button-group/index.cjs +0 -142
  108. package/dist/components/button-group/index.d.cts +0 -33
  109. package/dist/components/card/index.cjs +0 -104
  110. package/dist/components/card/index.d.cts +0 -27
  111. package/dist/components/checkbox/index.cjs +0 -68
  112. package/dist/components/checkbox/index.d.cts +0 -17
  113. package/dist/components/collapsible/index.cjs +0 -73
  114. package/dist/components/collapsible/index.d.cts +0 -22
  115. package/dist/components/context-menu/index.cjs +0 -274
  116. package/dist/components/context-menu/index.d.cts +0 -48
  117. package/dist/components/dialog/index.cjs +0 -182
  118. package/dist/components/dialog/index.d.cts +0 -38
  119. package/dist/components/direction/index.cjs +0 -39
  120. package/dist/components/direction/index.d.cts +0 -20
  121. package/dist/components/drawer/index.cjs +0 -164
  122. package/dist/components/drawer/index.d.cts +0 -35
  123. package/dist/components/dropdown/index.cjs +0 -282
  124. package/dist/components/dropdown/index.d.cts +0 -52
  125. package/dist/components/empty/index.cjs +0 -135
  126. package/dist/components/empty/index.d.cts +0 -38
  127. package/dist/components/field/index.cjs +0 -269
  128. package/dist/components/field/index.d.cts +0 -42
  129. package/dist/components/hover-card/index.cjs +0 -77
  130. package/dist/components/hover-card/index.d.cts +0 -22
  131. package/dist/components/input/index.cjs +0 -47
  132. package/dist/components/input/index.d.cts +0 -17
  133. package/dist/components/input-group/index.cjs +0 -270
  134. package/dist/components/input-group/index.d.cts +0 -44
  135. package/dist/components/item/index.cjs +0 -262
  136. package/dist/components/item/index.d.cts +0 -47
  137. package/dist/components/kbd/index.cjs +0 -57
  138. package/dist/components/kbd/index.d.cts +0 -19
  139. package/dist/components/label/index.cjs +0 -59
  140. package/dist/components/label/index.d.cts +0 -16
  141. package/dist/components/menubar/index.cjs +0 -303
  142. package/dist/components/menubar/index.d.cts +0 -49
  143. package/dist/components/native-select/index.cjs +0 -53
  144. package/dist/components/native-select/index.d.cts +0 -19
  145. package/dist/components/navigation-menu/index.cjs +0 -215
  146. package/dist/components/navigation-menu/index.d.cts +0 -37
  147. package/dist/components/popover/index.cjs +0 -84
  148. package/dist/components/popover/index.d.cts +0 -23
  149. package/dist/components/progress/index.cjs +0 -68
  150. package/dist/components/progress/index.d.cts +0 -16
  151. package/dist/components/radio-group/index.cjs +0 -83
  152. package/dist/components/radio-group/index.d.cts +0 -22
  153. package/dist/components/resizable/index.cjs +0 -75
  154. package/dist/components/resizable/index.d.cts +0 -25
  155. package/dist/components/scroll-area/index.cjs +0 -98
  156. package/dist/components/scroll-area/index.d.cts +0 -21
  157. package/dist/components/section/index.cjs +0 -41
  158. package/dist/components/section/index.d.cts +0 -27
  159. package/dist/components/select/index.cjs +0 -215
  160. package/dist/components/select/index.d.cts +0 -36
  161. package/dist/components/separator/index.cjs +0 -63
  162. package/dist/components/separator/index.d.cts +0 -18
  163. package/dist/components/sheet/index.cjs +0 -170
  164. package/dist/components/sheet/index.d.cts +0 -31
  165. package/dist/components/skeleton/index.cjs +0 -41
  166. package/dist/components/skeleton/index.d.cts +0 -14
  167. package/dist/components/slider/index.cjs +0 -102
  168. package/dist/components/slider/index.d.cts +0 -19
  169. package/dist/components/sonner/index.cjs +0 -51
  170. package/dist/components/sonner/index.d.cts +0 -18
  171. package/dist/components/spinner/index.cjs +0 -47
  172. package/dist/components/spinner/index.d.cts +0 -17
  173. package/dist/components/switch/index.cjs +0 -68
  174. package/dist/components/switch/index.d.cts +0 -17
  175. package/dist/components/table/index.cjs +0 -147
  176. package/dist/components/table/index.d.cts +0 -35
  177. package/dist/components/tabs/index.cjs +0 -107
  178. package/dist/components/tabs/index.d.cts +0 -27
  179. package/dist/components/textarea/index.cjs +0 -44
  180. package/dist/components/textarea/index.d.cts +0 -15
  181. package/dist/components/toggle/index.cjs +0 -81
  182. package/dist/components/toggle/index.d.cts +0 -26
  183. package/dist/components/toggle-group/index.cjs +0 -120
  184. package/dist/components/toggle-group/index.d.cts +0 -27
  185. package/dist/components/tooltip/index.cjs +0 -95
  186. package/dist/components/tooltip/index.d.cts +0 -25
  187. package/dist/components/typography/index.cjs +0 -197
  188. package/dist/components/typography/index.d.cts +0 -28
  189. package/dist/index.cjs +0 -4094
  190. package/dist/index.d.cts +0 -83
@@ -1,18 +1,182 @@
1
1
  import {
2
- Item,
3
- ItemActions,
4
- ItemContent,
5
- ItemDescription,
6
- ItemFooter,
7
- ItemGroup,
8
- ItemHeader,
9
- ItemMedia,
10
- ItemSeparator,
11
- ItemTitle,
12
- itemMediaVariants,
13
- itemVariants
14
- } from "../../chunk-JTSIBZS4.js";
15
- import "../../chunk-6DRII3XC.js";
2
+ Separator
3
+ } from "../../chunk-6DRII3XC.js";
4
+
5
+ // src/components/item/index.tsx
6
+ import { cn } from "@foundrykit/utils";
7
+ import { Slot } from "@radix-ui/react-slot";
8
+ import { cva } from "class-variance-authority";
9
+ import { jsx } from "react/jsx-runtime";
10
+ function ItemGroup({ className, ...props }) {
11
+ return /* @__PURE__ */ jsx(
12
+ "div",
13
+ {
14
+ role: "list",
15
+ "data-slot": "item-group",
16
+ className: cn("group/item-group flex flex-col", className),
17
+ ...props
18
+ }
19
+ );
20
+ }
21
+ function ItemSeparator({
22
+ className,
23
+ ...props
24
+ }) {
25
+ return /* @__PURE__ */ jsx(
26
+ Separator,
27
+ {
28
+ "data-slot": "item-separator",
29
+ orientation: "horizontal",
30
+ className: cn("my-0", className),
31
+ ...props
32
+ }
33
+ );
34
+ }
35
+ var itemVariants = cva(
36
+ "group/item focus-visible:border-ring focus-visible:ring-ring/50 [a]:hover:bg-accent/50 flex flex-wrap items-center rounded-md border border-transparent text-sm transition-colors duration-100 outline-none focus-visible:ring-[3px] [a]:transition-colors",
37
+ {
38
+ variants: {
39
+ variant: {
40
+ default: "bg-transparent",
41
+ outline: "border-border",
42
+ muted: "bg-muted/50"
43
+ },
44
+ size: {
45
+ default: "gap-4 p-4",
46
+ sm: "gap-2.5 px-4 py-3"
47
+ }
48
+ },
49
+ defaultVariants: {
50
+ variant: "default",
51
+ size: "default"
52
+ }
53
+ }
54
+ );
55
+ function Item({
56
+ className,
57
+ variant,
58
+ size,
59
+ asChild = false,
60
+ ...props
61
+ }) {
62
+ const Comp = asChild ? Slot : "div";
63
+ return /* @__PURE__ */ jsx(
64
+ Comp,
65
+ {
66
+ "data-slot": "item",
67
+ "data-variant": variant,
68
+ "data-size": size,
69
+ className: cn(itemVariants({ variant, size, className })),
70
+ ...props
71
+ }
72
+ );
73
+ }
74
+ var itemMediaVariants = cva(
75
+ "flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none",
76
+ {
77
+ variants: {
78
+ variant: {
79
+ default: "bg-transparent",
80
+ icon: "bg-muted size-8 rounded-sm border [&_svg:not([class*='size-'])]:size-4",
81
+ image: "size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover"
82
+ }
83
+ },
84
+ defaultVariants: {
85
+ variant: "default"
86
+ }
87
+ }
88
+ );
89
+ function ItemMedia({
90
+ className,
91
+ variant,
92
+ ...props
93
+ }) {
94
+ return /* @__PURE__ */ jsx(
95
+ "div",
96
+ {
97
+ "data-slot": "item-media",
98
+ "data-variant": variant,
99
+ className: cn(itemMediaVariants({ variant, className })),
100
+ ...props
101
+ }
102
+ );
103
+ }
104
+ function ItemContent({ className, ...props }) {
105
+ return /* @__PURE__ */ jsx(
106
+ "div",
107
+ {
108
+ "data-slot": "item-content",
109
+ className: cn(
110
+ "flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none",
111
+ className
112
+ ),
113
+ ...props
114
+ }
115
+ );
116
+ }
117
+ function ItemTitle({ className, ...props }) {
118
+ return /* @__PURE__ */ jsx(
119
+ "div",
120
+ {
121
+ "data-slot": "item-title",
122
+ className: cn(
123
+ "flex w-fit items-center gap-2 text-sm leading-snug font-medium",
124
+ className
125
+ ),
126
+ ...props
127
+ }
128
+ );
129
+ }
130
+ function ItemDescription({ className, ...props }) {
131
+ return /* @__PURE__ */ jsx(
132
+ "p",
133
+ {
134
+ "data-slot": "item-description",
135
+ className: cn(
136
+ "text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance",
137
+ "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
138
+ className
139
+ ),
140
+ ...props
141
+ }
142
+ );
143
+ }
144
+ function ItemActions({ className, ...props }) {
145
+ return /* @__PURE__ */ jsx(
146
+ "div",
147
+ {
148
+ "data-slot": "item-actions",
149
+ className: cn("flex items-center gap-2", className),
150
+ ...props
151
+ }
152
+ );
153
+ }
154
+ function ItemHeader({ className, ...props }) {
155
+ return /* @__PURE__ */ jsx(
156
+ "div",
157
+ {
158
+ "data-slot": "item-header",
159
+ className: cn(
160
+ "flex basis-full items-center justify-between gap-2",
161
+ className
162
+ ),
163
+ ...props
164
+ }
165
+ );
166
+ }
167
+ function ItemFooter({ className, ...props }) {
168
+ return /* @__PURE__ */ jsx(
169
+ "div",
170
+ {
171
+ "data-slot": "item-footer",
172
+ className: cn(
173
+ "flex basis-full items-center justify-between gap-2",
174
+ className
175
+ ),
176
+ ...props
177
+ }
178
+ );
179
+ }
16
180
  export {
17
181
  Item,
18
182
  ItemActions,
@@ -1,7 +1,30 @@
1
- import {
2
- Kbd,
3
- KbdGroup
4
- } from "../../chunk-PLLG76QJ.js";
1
+ // src/components/kbd/index.tsx
2
+ import { cn } from "@foundrykit/utils";
3
+ import { jsx } from "react/jsx-runtime";
4
+ function Kbd({ className, ...props }) {
5
+ return /* @__PURE__ */ jsx(
6
+ "kbd",
7
+ {
8
+ "data-slot": "kbd",
9
+ className: cn(
10
+ "bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none [&_svg:not([class*='size-'])]:size-3",
11
+ "[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",
12
+ className
13
+ ),
14
+ ...props
15
+ }
16
+ );
17
+ }
18
+ function KbdGroup({ className, ...props }) {
19
+ return /* @__PURE__ */ jsx(
20
+ "kbd",
21
+ {
22
+ "data-slot": "kbd-group",
23
+ className: cn("inline-flex items-center gap-1", className),
24
+ ...props
25
+ }
26
+ );
27
+ }
5
28
  export {
6
29
  Kbd,
7
30
  KbdGroup
@@ -1,7 +1,25 @@
1
1
  "use client";
2
- import {
3
- Label
4
- } from "../../chunk-MCXSVXO4.js";
2
+
3
+ // src/components/label/index.tsx
4
+ import { cn } from "@foundrykit/utils";
5
+ import * as LabelPrimitive from "@radix-ui/react-label";
6
+ import { jsx } from "react/jsx-runtime";
7
+ function Label({
8
+ className,
9
+ ...props
10
+ }) {
11
+ return /* @__PURE__ */ jsx(
12
+ LabelPrimitive.Root,
13
+ {
14
+ "data-slot": "label",
15
+ className: cn(
16
+ "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
17
+ className
18
+ ),
19
+ ...props
20
+ }
21
+ );
22
+ }
5
23
  export {
6
24
  Label
7
25
  };
@@ -1,22 +1,239 @@
1
1
  "use client";
2
- import {
3
- Menubar,
4
- MenubarCheckboxItem,
5
- MenubarContent,
6
- MenubarGroup,
7
- MenubarItem,
8
- MenubarLabel,
9
- MenubarMenu,
10
- MenubarPortal,
11
- MenubarRadioGroup,
12
- MenubarRadioItem,
13
- MenubarSeparator,
14
- MenubarShortcut,
15
- MenubarSub,
16
- MenubarSubContent,
17
- MenubarSubTrigger,
18
- MenubarTrigger
19
- } from "../../chunk-SDYKJVXX.js";
2
+
3
+ // src/components/menubar/index.tsx
4
+ import { cn } from "@foundrykit/utils";
5
+ import * as MenubarPrimitive from "@radix-ui/react-menubar";
6
+ import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ function Menubar({
9
+ className,
10
+ ...props
11
+ }) {
12
+ return /* @__PURE__ */ jsx(
13
+ MenubarPrimitive.Root,
14
+ {
15
+ "data-slot": "menubar",
16
+ className: cn(
17
+ "bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",
18
+ className
19
+ ),
20
+ ...props
21
+ }
22
+ );
23
+ }
24
+ function MenubarMenu({
25
+ ...props
26
+ }) {
27
+ return /* @__PURE__ */ jsx(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
28
+ }
29
+ function MenubarGroup({
30
+ ...props
31
+ }) {
32
+ return /* @__PURE__ */ jsx(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
33
+ }
34
+ function MenubarPortal({
35
+ ...props
36
+ }) {
37
+ return /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { "data-slot": "menubar-portal", ...props });
38
+ }
39
+ function MenubarRadioGroup({
40
+ ...props
41
+ }) {
42
+ return /* @__PURE__ */ jsx(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
43
+ }
44
+ function MenubarTrigger({
45
+ className,
46
+ ...props
47
+ }) {
48
+ return /* @__PURE__ */ jsx(
49
+ MenubarPrimitive.Trigger,
50
+ {
51
+ "data-slot": "menubar-trigger",
52
+ className: cn(
53
+ "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",
54
+ className
55
+ ),
56
+ ...props
57
+ }
58
+ );
59
+ }
60
+ function MenubarContent({
61
+ className,
62
+ align = "start",
63
+ alignOffset = -4,
64
+ sideOffset = 8,
65
+ ...props
66
+ }) {
67
+ return /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx(
68
+ MenubarPrimitive.Content,
69
+ {
70
+ "data-slot": "menubar-content",
71
+ align,
72
+ alignOffset,
73
+ sideOffset,
74
+ className: cn(
75
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 motion-safe:data-[state=closed]:zoom-out-95 motion-safe:data-[state=open]:zoom-in-95 motion-safe:data-[side=bottom]:slide-in-from-top-2 motion-safe:data-[side=left]:slide-in-from-right-2 motion-safe:data-[side=right]:slide-in-from-left-2 motion-safe:data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",
76
+ className
77
+ ),
78
+ ...props
79
+ }
80
+ ) });
81
+ }
82
+ function MenubarItem({
83
+ className,
84
+ inset,
85
+ variant = "default",
86
+ ...props
87
+ }) {
88
+ return /* @__PURE__ */ jsx(
89
+ MenubarPrimitive.Item,
90
+ {
91
+ "data-slot": "menubar-item",
92
+ "data-inset": inset,
93
+ "data-variant": variant,
94
+ className: cn(
95
+ "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
96
+ className
97
+ ),
98
+ ...props
99
+ }
100
+ );
101
+ }
102
+ function MenubarCheckboxItem({
103
+ className,
104
+ children,
105
+ checked,
106
+ ...props
107
+ }) {
108
+ return /* @__PURE__ */ jsxs(
109
+ MenubarPrimitive.CheckboxItem,
110
+ {
111
+ "data-slot": "menubar-checkbox-item",
112
+ className: cn(
113
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
114
+ className
115
+ ),
116
+ checked,
117
+ ...props,
118
+ children: [
119
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
120
+ children
121
+ ]
122
+ }
123
+ );
124
+ }
125
+ function MenubarRadioItem({
126
+ className,
127
+ children,
128
+ ...props
129
+ }) {
130
+ return /* @__PURE__ */ jsxs(
131
+ MenubarPrimitive.RadioItem,
132
+ {
133
+ "data-slot": "menubar-radio-item",
134
+ className: cn(
135
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
136
+ className
137
+ ),
138
+ ...props,
139
+ children: [
140
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
141
+ children
142
+ ]
143
+ }
144
+ );
145
+ }
146
+ function MenubarLabel({
147
+ className,
148
+ inset,
149
+ ...props
150
+ }) {
151
+ return /* @__PURE__ */ jsx(
152
+ MenubarPrimitive.Label,
153
+ {
154
+ "data-slot": "menubar-label",
155
+ "data-inset": inset,
156
+ className: cn(
157
+ "px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
158
+ className
159
+ ),
160
+ ...props
161
+ }
162
+ );
163
+ }
164
+ function MenubarSeparator({
165
+ className,
166
+ ...props
167
+ }) {
168
+ return /* @__PURE__ */ jsx(
169
+ MenubarPrimitive.Separator,
170
+ {
171
+ "data-slot": "menubar-separator",
172
+ className: cn("bg-border -mx-1 my-1 h-px", className),
173
+ ...props
174
+ }
175
+ );
176
+ }
177
+ function MenubarShortcut({
178
+ className,
179
+ ...props
180
+ }) {
181
+ return /* @__PURE__ */ jsx(
182
+ "span",
183
+ {
184
+ "data-slot": "menubar-shortcut",
185
+ className: cn(
186
+ "text-muted-foreground ml-auto text-xs tracking-widest",
187
+ className
188
+ ),
189
+ ...props
190
+ }
191
+ );
192
+ }
193
+ function MenubarSub({
194
+ ...props
195
+ }) {
196
+ return /* @__PURE__ */ jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
197
+ }
198
+ function MenubarSubTrigger({
199
+ className,
200
+ inset,
201
+ children,
202
+ ...props
203
+ }) {
204
+ return /* @__PURE__ */ jsxs(
205
+ MenubarPrimitive.SubTrigger,
206
+ {
207
+ "data-slot": "menubar-sub-trigger",
208
+ "data-inset": inset,
209
+ className: cn(
210
+ "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",
211
+ className
212
+ ),
213
+ ...props,
214
+ children: [
215
+ children,
216
+ /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })
217
+ ]
218
+ }
219
+ );
220
+ }
221
+ function MenubarSubContent({
222
+ className,
223
+ ...props
224
+ }) {
225
+ return /* @__PURE__ */ jsx(
226
+ MenubarPrimitive.SubContent,
227
+ {
228
+ "data-slot": "menubar-sub-content",
229
+ className: cn(
230
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 motion-safe:data-[state=closed]:zoom-out-95 motion-safe:data-[state=open]:zoom-in-95 motion-safe:data-[side=bottom]:slide-in-from-top-2 motion-safe:data-[side=left]:slide-in-from-right-2 motion-safe:data-[side=right]:slide-in-from-left-2 motion-safe:data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
231
+ className
232
+ ),
233
+ ...props
234
+ }
235
+ );
236
+ }
20
237
  export {
21
238
  Menubar,
22
239
  MenubarCheckboxItem,
@@ -1,6 +1,28 @@
1
- import {
2
- NativeSelect
3
- } from "../../chunk-76APYFRN.js";
1
+ // src/components/native-select/index.tsx
2
+ import { cn } from "@foundrykit/utils";
3
+ import { ChevronDownIcon } from "lucide-react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ function NativeSelect({
6
+ className,
7
+ children,
8
+ ...props
9
+ }) {
10
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "native-select-wrapper", className: "relative w-full", children: [
11
+ /* @__PURE__ */ jsx(
12
+ "select",
13
+ {
14
+ "data-slot": "native-select",
15
+ className: cn(
16
+ "border-input text-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 [&>option]:text-foreground flex h-9 w-full appearance-none items-center rounded-md border bg-transparent py-2 pr-8 pl-3 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
17
+ className
18
+ ),
19
+ ...props,
20
+ children
21
+ }
22
+ ),
23
+ /* @__PURE__ */ jsx(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none absolute top-1/2 right-3 size-4 -translate-y-1/2 opacity-50" })
24
+ ] });
25
+ }
4
26
  export {
5
27
  NativeSelect
6
28
  };