@foundrykit/primitives 2.1.3 → 2.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 (196) hide show
  1. package/README.md +11 -0
  2. package/dist/{chunk-SEDTBIZW.js → chunk-OMPTY5WQ.js} +1 -1
  3. package/dist/components/accordion/index.js +60 -6
  4. package/dist/components/alert/index.js +62 -6
  5. package/dist/components/alert-dialog/index.js +142 -13
  6. package/dist/components/aspect-ratio/index.js +9 -3
  7. package/dist/components/avatar/index.js +50 -5
  8. package/dist/components/badge/index.js +37 -4
  9. package/dist/components/breadcrumb/index.js +95 -9
  10. package/dist/components/button/index.js +1 -1
  11. package/dist/components/button-group/index.js +74 -6
  12. package/dist/components/card/index.js +66 -8
  13. package/dist/components/checkbox/index.js +30 -3
  14. package/dist/components/collapsible/index.js +33 -7
  15. package/dist/components/context-menu/index.js +208 -17
  16. package/dist/components/dialog/index.js +126 -12
  17. package/dist/components/direction/index.js +10 -2
  18. package/dist/components/drawer/index.js +118 -12
  19. package/dist/components/dropdown/index.js +216 -17
  20. package/dist/components/empty/index.js +95 -9
  21. package/dist/components/field/index.js +211 -13
  22. package/dist/components/hover-card/index.js +35 -5
  23. package/dist/components/input-group/index.d.ts +1 -1
  24. package/dist/components/input-group/index.js +1 -1
  25. package/dist/components/item/index.js +178 -14
  26. package/dist/components/kbd/index.js +27 -4
  27. package/dist/components/label/index.js +21 -3
  28. package/dist/components/menubar/index.js +235 -18
  29. package/dist/components/native-select/index.js +25 -3
  30. package/dist/components/navigation-menu/index.js +161 -11
  31. package/dist/components/popover/index.js +40 -6
  32. package/dist/components/progress/index.js +30 -3
  33. package/dist/components/radio-group/index.js +43 -4
  34. package/dist/components/resizable/index.js +43 -5
  35. package/dist/components/scroll-area/index.js +58 -4
  36. package/dist/components/section/index.js +13 -3
  37. package/dist/components/select/index.js +159 -12
  38. package/dist/components/sheet/index.js +118 -10
  39. package/dist/components/skeleton/index.js +13 -3
  40. package/dist/components/slider/index.js +64 -3
  41. package/dist/components/sonner/index.js +21 -4
  42. package/dist/components/spinner/index.js +19 -3
  43. package/dist/components/switch/index.js +30 -3
  44. package/dist/components/table/index.js +105 -10
  45. package/dist/components/tabs/index.js +63 -6
  46. package/dist/components/toggle/index.js +41 -4
  47. package/dist/components/toggle-group/index.js +80 -4
  48. package/dist/components/tooltip/index.js +51 -6
  49. package/dist/components/typography/index.js +147 -14
  50. package/dist/index.d.ts +1 -0
  51. package/dist/index.js +221 -254
  52. package/package.json +3 -3
  53. package/dist/chunk-25N35Z5M.js +0 -42
  54. package/dist/chunk-2JOT4DV4.js +0 -66
  55. package/dist/chunk-2SBGU5XA.js +0 -233
  56. package/dist/chunk-2UG6OCGA.js +0 -75
  57. package/dist/chunk-3BAO7TAS.js +0 -105
  58. package/dist/chunk-3NQR7JZR.js +0 -128
  59. package/dist/chunk-3QUMCM5K.js +0 -225
  60. package/dist/chunk-3TZXV53R.js +0 -55
  61. package/dist/chunk-3UKWAM5M.js +0 -33
  62. package/dist/chunk-44I6VK3H.js +0 -105
  63. package/dist/chunk-67UXTT4O.js +0 -116
  64. package/dist/chunk-727ACUWN.js +0 -82
  65. package/dist/chunk-76APYFRN.js +0 -29
  66. package/dist/chunk-AJAAMJYH.js +0 -12
  67. package/dist/chunk-B5YCE3UP.js +0 -57
  68. package/dist/chunk-BIFBYERK.js +0 -69
  69. package/dist/chunk-DXZ4GUQO.js +0 -33
  70. package/dist/chunk-ED6T7ZZN.js +0 -130
  71. package/dist/chunk-EEAK2RWF.js +0 -23
  72. package/dist/chunk-F2TEA6ER.js +0 -138
  73. package/dist/chunk-FF5D53KL.js +0 -69
  74. package/dist/chunk-FRIOQFPE.js +0 -171
  75. package/dist/chunk-G2YBCHWR.js +0 -46
  76. package/dist/chunk-GKCBSG2W.js +0 -67
  77. package/dist/chunk-GPEL656S.js +0 -84
  78. package/dist/chunk-JKKCRFYB.js +0 -36
  79. package/dist/chunk-JTSIBZS4.js +0 -194
  80. package/dist/chunk-MCXSVXO4.js +0 -24
  81. package/dist/chunk-MMZJQ7RW.js +0 -33
  82. package/dist/chunk-MYIUX3DT.js +0 -62
  83. package/dist/chunk-P5KEJOBH.js +0 -155
  84. package/dist/chunk-PAO3DSEF.js +0 -48
  85. package/dist/chunk-PLLG76QJ.js +0 -32
  86. package/dist/chunk-SDYKJVXX.js +0 -253
  87. package/dist/chunk-SIQHWNPH.js +0 -45
  88. package/dist/chunk-SKR3J46C.js +0 -17
  89. package/dist/chunk-STRBREHN.js +0 -17
  90. package/dist/chunk-SUEPE6OX.js +0 -47
  91. package/dist/chunk-TA23RNS4.js +0 -162
  92. package/dist/chunk-TRXU4SOJ.js +0 -224
  93. package/dist/chunk-U7JIOR7A.js +0 -172
  94. package/dist/chunk-VPBVKBZ7.js +0 -25
  95. package/dist/chunk-W4XY3SNY.js +0 -40
  96. package/dist/chunk-YT2ZIMZI.js +0 -16
  97. package/dist/components/accordion/index.cjs +0 -104
  98. package/dist/components/accordion/index.d.cts +0 -25
  99. package/dist/components/alert/index.cjs +0 -96
  100. package/dist/components/alert/index.d.cts +0 -28
  101. package/dist/components/alert-dialog/index.cjs +0 -200
  102. package/dist/components/alert-dialog/index.d.cts +0 -42
  103. package/dist/components/aspect-ratio/index.cjs +0 -47
  104. package/dist/components/aspect-ratio/index.d.cts +0 -19
  105. package/dist/components/avatar/index.cjs +0 -92
  106. package/dist/components/avatar/index.d.cts +0 -24
  107. package/dist/components/badge/index.cjs +0 -67
  108. package/dist/components/badge/index.d.cts +0 -24
  109. package/dist/components/breadcrumb/index.cjs +0 -135
  110. package/dist/components/breadcrumb/index.d.cts +0 -33
  111. package/dist/components/button/index.cjs +0 -87
  112. package/dist/components/button/index.d.cts +0 -28
  113. package/dist/components/button-group/index.cjs +0 -142
  114. package/dist/components/button-group/index.d.cts +0 -33
  115. package/dist/components/card/index.cjs +0 -104
  116. package/dist/components/card/index.d.cts +0 -27
  117. package/dist/components/checkbox/index.cjs +0 -68
  118. package/dist/components/checkbox/index.d.cts +0 -17
  119. package/dist/components/collapsible/index.cjs +0 -73
  120. package/dist/components/collapsible/index.d.cts +0 -22
  121. package/dist/components/context-menu/index.cjs +0 -274
  122. package/dist/components/context-menu/index.d.cts +0 -48
  123. package/dist/components/dialog/index.cjs +0 -182
  124. package/dist/components/dialog/index.d.cts +0 -38
  125. package/dist/components/direction/index.cjs +0 -39
  126. package/dist/components/direction/index.d.cts +0 -20
  127. package/dist/components/drawer/index.cjs +0 -164
  128. package/dist/components/drawer/index.d.cts +0 -35
  129. package/dist/components/dropdown/index.cjs +0 -282
  130. package/dist/components/dropdown/index.d.cts +0 -52
  131. package/dist/components/empty/index.cjs +0 -135
  132. package/dist/components/empty/index.d.cts +0 -38
  133. package/dist/components/field/index.cjs +0 -269
  134. package/dist/components/field/index.d.cts +0 -42
  135. package/dist/components/hover-card/index.cjs +0 -77
  136. package/dist/components/hover-card/index.d.cts +0 -22
  137. package/dist/components/input/index.cjs +0 -47
  138. package/dist/components/input/index.d.cts +0 -17
  139. package/dist/components/input-group/index.cjs +0 -270
  140. package/dist/components/input-group/index.d.cts +0 -44
  141. package/dist/components/item/index.cjs +0 -262
  142. package/dist/components/item/index.d.cts +0 -47
  143. package/dist/components/kbd/index.cjs +0 -57
  144. package/dist/components/kbd/index.d.cts +0 -19
  145. package/dist/components/label/index.cjs +0 -59
  146. package/dist/components/label/index.d.cts +0 -16
  147. package/dist/components/menubar/index.cjs +0 -303
  148. package/dist/components/menubar/index.d.cts +0 -49
  149. package/dist/components/native-select/index.cjs +0 -53
  150. package/dist/components/native-select/index.d.cts +0 -19
  151. package/dist/components/navigation-menu/index.cjs +0 -215
  152. package/dist/components/navigation-menu/index.d.cts +0 -37
  153. package/dist/components/popover/index.cjs +0 -84
  154. package/dist/components/popover/index.d.cts +0 -23
  155. package/dist/components/progress/index.cjs +0 -68
  156. package/dist/components/progress/index.d.cts +0 -16
  157. package/dist/components/radio-group/index.cjs +0 -83
  158. package/dist/components/radio-group/index.d.cts +0 -22
  159. package/dist/components/resizable/index.cjs +0 -75
  160. package/dist/components/resizable/index.d.cts +0 -25
  161. package/dist/components/scroll-area/index.cjs +0 -98
  162. package/dist/components/scroll-area/index.d.cts +0 -21
  163. package/dist/components/section/index.cjs +0 -41
  164. package/dist/components/section/index.d.cts +0 -27
  165. package/dist/components/select/index.cjs +0 -215
  166. package/dist/components/select/index.d.cts +0 -36
  167. package/dist/components/separator/index.cjs +0 -63
  168. package/dist/components/separator/index.d.cts +0 -18
  169. package/dist/components/sheet/index.cjs +0 -170
  170. package/dist/components/sheet/index.d.cts +0 -31
  171. package/dist/components/skeleton/index.cjs +0 -41
  172. package/dist/components/skeleton/index.d.cts +0 -14
  173. package/dist/components/slider/index.cjs +0 -102
  174. package/dist/components/slider/index.d.cts +0 -19
  175. package/dist/components/sonner/index.cjs +0 -51
  176. package/dist/components/sonner/index.d.cts +0 -18
  177. package/dist/components/spinner/index.cjs +0 -47
  178. package/dist/components/spinner/index.d.cts +0 -17
  179. package/dist/components/switch/index.cjs +0 -68
  180. package/dist/components/switch/index.d.cts +0 -17
  181. package/dist/components/table/index.cjs +0 -147
  182. package/dist/components/table/index.d.cts +0 -35
  183. package/dist/components/tabs/index.cjs +0 -107
  184. package/dist/components/tabs/index.d.cts +0 -27
  185. package/dist/components/textarea/index.cjs +0 -44
  186. package/dist/components/textarea/index.d.cts +0 -15
  187. package/dist/components/toggle/index.cjs +0 -81
  188. package/dist/components/toggle/index.d.cts +0 -26
  189. package/dist/components/toggle-group/index.cjs +0 -120
  190. package/dist/components/toggle-group/index.d.cts +0 -27
  191. package/dist/components/tooltip/index.cjs +0 -95
  192. package/dist/components/tooltip/index.d.cts +0 -25
  193. package/dist/components/typography/index.cjs +0 -197
  194. package/dist/components/typography/index.d.cts +0 -28
  195. package/dist/index.cjs +0 -4094
  196. package/dist/index.d.cts +0 -83
@@ -1,48 +0,0 @@
1
- // src/components/resizable/index.tsx
2
- import { cn } from "@foundrykit/utils";
3
- import { GripVerticalIcon } from "lucide-react";
4
- import { Group, Panel, Separator } from "react-resizable-panels";
5
- import { jsx } from "react/jsx-runtime";
6
- function ResizablePanelGroup({
7
- className,
8
- ...props
9
- }) {
10
- return /* @__PURE__ */ jsx(
11
- Group,
12
- {
13
- "data-slot": "resizable-panel-group",
14
- className: cn(
15
- "flex h-full w-full aria-[orientation=vertical]:flex-col",
16
- className
17
- ),
18
- ...props
19
- }
20
- );
21
- }
22
- function ResizablePanel({ ...props }) {
23
- return /* @__PURE__ */ jsx(Panel, { "data-slot": "resizable-panel", ...props });
24
- }
25
- function ResizableHandle({
26
- withHandle,
27
- className,
28
- ...props
29
- }) {
30
- return /* @__PURE__ */ jsx(
31
- Separator,
32
- {
33
- "data-slot": "resizable-handle",
34
- className: cn(
35
- "bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:outline-hidden aria-[orientation=vertical]:h-px aria-[orientation=vertical]:w-full aria-[orientation=vertical]:after:left-0 aria-[orientation=vertical]:after:h-1 aria-[orientation=vertical]:after:w-full aria-[orientation=vertical]:after:translate-x-0 aria-[orientation=vertical]:after:-translate-y-1/2",
36
- className
37
- ),
38
- ...props,
39
- children: withHandle && /* @__PURE__ */ jsx("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ jsx(GripVerticalIcon, { className: "size-2.5" }) })
40
- }
41
- );
42
- }
43
-
44
- export {
45
- ResizablePanelGroup,
46
- ResizablePanel,
47
- ResizableHandle
48
- };
@@ -1,32 +0,0 @@
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
- }
28
-
29
- export {
30
- Kbd,
31
- KbdGroup
32
- };
@@ -1,253 +0,0 @@
1
- // src/components/menubar/index.tsx
2
- import { cn } from "@foundrykit/utils";
3
- import * as MenubarPrimitive from "@radix-ui/react-menubar";
4
- import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
- function Menubar({
7
- className,
8
- ...props
9
- }) {
10
- return /* @__PURE__ */ jsx(
11
- MenubarPrimitive.Root,
12
- {
13
- "data-slot": "menubar",
14
- className: cn(
15
- "bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",
16
- className
17
- ),
18
- ...props
19
- }
20
- );
21
- }
22
- function MenubarMenu({
23
- ...props
24
- }) {
25
- return /* @__PURE__ */ jsx(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
26
- }
27
- function MenubarGroup({
28
- ...props
29
- }) {
30
- return /* @__PURE__ */ jsx(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
31
- }
32
- function MenubarPortal({
33
- ...props
34
- }) {
35
- return /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { "data-slot": "menubar-portal", ...props });
36
- }
37
- function MenubarRadioGroup({
38
- ...props
39
- }) {
40
- return /* @__PURE__ */ jsx(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
41
- }
42
- function MenubarTrigger({
43
- className,
44
- ...props
45
- }) {
46
- return /* @__PURE__ */ jsx(
47
- MenubarPrimitive.Trigger,
48
- {
49
- "data-slot": "menubar-trigger",
50
- className: cn(
51
- "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",
52
- className
53
- ),
54
- ...props
55
- }
56
- );
57
- }
58
- function MenubarContent({
59
- className,
60
- align = "start",
61
- alignOffset = -4,
62
- sideOffset = 8,
63
- ...props
64
- }) {
65
- return /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx(
66
- MenubarPrimitive.Content,
67
- {
68
- "data-slot": "menubar-content",
69
- align,
70
- alignOffset,
71
- sideOffset,
72
- className: cn(
73
- "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",
74
- className
75
- ),
76
- ...props
77
- }
78
- ) });
79
- }
80
- function MenubarItem({
81
- className,
82
- inset,
83
- variant = "default",
84
- ...props
85
- }) {
86
- return /* @__PURE__ */ jsx(
87
- MenubarPrimitive.Item,
88
- {
89
- "data-slot": "menubar-item",
90
- "data-inset": inset,
91
- "data-variant": variant,
92
- className: cn(
93
- "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",
94
- className
95
- ),
96
- ...props
97
- }
98
- );
99
- }
100
- function MenubarCheckboxItem({
101
- className,
102
- children,
103
- checked,
104
- ...props
105
- }) {
106
- return /* @__PURE__ */ jsxs(
107
- MenubarPrimitive.CheckboxItem,
108
- {
109
- "data-slot": "menubar-checkbox-item",
110
- className: cn(
111
- "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",
112
- className
113
- ),
114
- checked,
115
- ...props,
116
- children: [
117
- /* @__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" }) }) }),
118
- children
119
- ]
120
- }
121
- );
122
- }
123
- function MenubarRadioItem({
124
- className,
125
- children,
126
- ...props
127
- }) {
128
- return /* @__PURE__ */ jsxs(
129
- MenubarPrimitive.RadioItem,
130
- {
131
- "data-slot": "menubar-radio-item",
132
- className: cn(
133
- "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",
134
- className
135
- ),
136
- ...props,
137
- children: [
138
- /* @__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" }) }) }),
139
- children
140
- ]
141
- }
142
- );
143
- }
144
- function MenubarLabel({
145
- className,
146
- inset,
147
- ...props
148
- }) {
149
- return /* @__PURE__ */ jsx(
150
- MenubarPrimitive.Label,
151
- {
152
- "data-slot": "menubar-label",
153
- "data-inset": inset,
154
- className: cn(
155
- "px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
156
- className
157
- ),
158
- ...props
159
- }
160
- );
161
- }
162
- function MenubarSeparator({
163
- className,
164
- ...props
165
- }) {
166
- return /* @__PURE__ */ jsx(
167
- MenubarPrimitive.Separator,
168
- {
169
- "data-slot": "menubar-separator",
170
- className: cn("bg-border -mx-1 my-1 h-px", className),
171
- ...props
172
- }
173
- );
174
- }
175
- function MenubarShortcut({
176
- className,
177
- ...props
178
- }) {
179
- return /* @__PURE__ */ jsx(
180
- "span",
181
- {
182
- "data-slot": "menubar-shortcut",
183
- className: cn(
184
- "text-muted-foreground ml-auto text-xs tracking-widest",
185
- className
186
- ),
187
- ...props
188
- }
189
- );
190
- }
191
- function MenubarSub({
192
- ...props
193
- }) {
194
- return /* @__PURE__ */ jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
195
- }
196
- function MenubarSubTrigger({
197
- className,
198
- inset,
199
- children,
200
- ...props
201
- }) {
202
- return /* @__PURE__ */ jsxs(
203
- MenubarPrimitive.SubTrigger,
204
- {
205
- "data-slot": "menubar-sub-trigger",
206
- "data-inset": inset,
207
- className: cn(
208
- "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",
209
- className
210
- ),
211
- ...props,
212
- children: [
213
- children,
214
- /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })
215
- ]
216
- }
217
- );
218
- }
219
- function MenubarSubContent({
220
- className,
221
- ...props
222
- }) {
223
- return /* @__PURE__ */ jsx(
224
- MenubarPrimitive.SubContent,
225
- {
226
- "data-slot": "menubar-sub-content",
227
- className: cn(
228
- "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",
229
- className
230
- ),
231
- ...props
232
- }
233
- );
234
- }
235
-
236
- export {
237
- Menubar,
238
- MenubarMenu,
239
- MenubarGroup,
240
- MenubarPortal,
241
- MenubarRadioGroup,
242
- MenubarTrigger,
243
- MenubarContent,
244
- MenubarItem,
245
- MenubarCheckboxItem,
246
- MenubarRadioItem,
247
- MenubarLabel,
248
- MenubarSeparator,
249
- MenubarShortcut,
250
- MenubarSub,
251
- MenubarSubTrigger,
252
- MenubarSubContent
253
- };
@@ -1,45 +0,0 @@
1
- // src/components/toggle/index.tsx
2
- import { cn } from "@foundrykit/utils";
3
- import * as TogglePrimitive from "@radix-ui/react-toggle";
4
- import { cva } from "class-variance-authority";
5
- import { jsx } from "react/jsx-runtime";
6
- var toggleVariants = cva(
7
- "hover:bg-muted hover:text-muted-foreground data-[state=on]:bg-accent data-[state=on]:text-accent-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 inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
8
- {
9
- variants: {
10
- variant: {
11
- default: "bg-transparent",
12
- outline: "border-input hover:bg-accent hover:text-accent-foreground border bg-transparent shadow-xs"
13
- },
14
- size: {
15
- default: "h-9 min-w-9 px-2",
16
- sm: "h-8 min-w-8 px-1.5",
17
- lg: "h-10 min-w-10 px-2.5"
18
- }
19
- },
20
- defaultVariants: {
21
- variant: "default",
22
- size: "default"
23
- }
24
- }
25
- );
26
- function Toggle({
27
- className,
28
- variant,
29
- size,
30
- ...props
31
- }) {
32
- return /* @__PURE__ */ jsx(
33
- TogglePrimitive.Root,
34
- {
35
- "data-slot": "toggle",
36
- className: cn(toggleVariants({ variant, size, className })),
37
- ...props
38
- }
39
- );
40
- }
41
-
42
- export {
43
- toggleVariants,
44
- Toggle
45
- };
@@ -1,17 +0,0 @@
1
- // src/components/skeleton/index.tsx
2
- import { cn } from "@foundrykit/utils";
3
- import { jsx } from "react/jsx-runtime";
4
- function Skeleton({ className, ...props }) {
5
- return /* @__PURE__ */ jsx(
6
- "div",
7
- {
8
- "data-slot": "skeleton",
9
- className: cn("bg-accent animate-pulse rounded-md", className),
10
- ...props
11
- }
12
- );
13
- }
14
-
15
- export {
16
- Skeleton
17
- };
@@ -1,17 +0,0 @@
1
- // src/components/section/index.tsx
2
- import { jsx } from "react/jsx-runtime";
3
- function Section({ theme, className, ...props }) {
4
- return /* @__PURE__ */ jsx(
5
- "section",
6
- {
7
- "data-slot": "section",
8
- "data-section-theme": theme && theme !== "default" ? theme : void 0,
9
- className: ["py-12 md:py-20", className].filter(Boolean).join(" "),
10
- ...props
11
- }
12
- );
13
- }
14
-
15
- export {
16
- Section
17
- };
@@ -1,47 +0,0 @@
1
- // src/components/radio-group/index.tsx
2
- import { cn } from "@foundrykit/utils";
3
- import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
4
- import { CircleIcon } from "lucide-react";
5
- import { jsx } from "react/jsx-runtime";
6
- function RadioGroup({
7
- className,
8
- ...props
9
- }) {
10
- return /* @__PURE__ */ jsx(
11
- RadioGroupPrimitive.Root,
12
- {
13
- "data-slot": "radio-group",
14
- className: cn("grid gap-3", className),
15
- ...props
16
- }
17
- );
18
- }
19
- function RadioGroupItem({
20
- className,
21
- ...props
22
- }) {
23
- return /* @__PURE__ */ jsx(
24
- RadioGroupPrimitive.Item,
25
- {
26
- "data-slot": "radio-group-item",
27
- className: cn(
28
- "border-input text-primary 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 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
29
- className
30
- ),
31
- ...props,
32
- children: /* @__PURE__ */ jsx(
33
- RadioGroupPrimitive.Indicator,
34
- {
35
- "data-slot": "radio-group-indicator",
36
- className: "relative flex items-center justify-center",
37
- children: /* @__PURE__ */ jsx(CircleIcon, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
38
- }
39
- )
40
- }
41
- );
42
- }
43
-
44
- export {
45
- RadioGroup,
46
- RadioGroupItem
47
- };
@@ -1,162 +0,0 @@
1
- // src/components/typography/index.tsx
2
- import { cn } from "@foundrykit/utils";
3
- import { jsx } from "react/jsx-runtime";
4
- function TypographyH1({ className, ...props }) {
5
- return /* @__PURE__ */ jsx(
6
- "h1",
7
- {
8
- "data-slot": "typography-h1",
9
- className: cn(
10
- "scroll-m-20 text-4xl font-extrabold tracking-tight text-balance",
11
- className
12
- ),
13
- ...props
14
- }
15
- );
16
- }
17
- function TypographyH2({ className, ...props }) {
18
- return /* @__PURE__ */ jsx(
19
- "h2",
20
- {
21
- "data-slot": "typography-h2",
22
- className: cn(
23
- "scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0",
24
- className
25
- ),
26
- ...props
27
- }
28
- );
29
- }
30
- function TypographyH3({ className, ...props }) {
31
- return /* @__PURE__ */ jsx(
32
- "h3",
33
- {
34
- "data-slot": "typography-h3",
35
- className: cn(
36
- "scroll-m-20 text-2xl font-semibold tracking-tight",
37
- className
38
- ),
39
- ...props
40
- }
41
- );
42
- }
43
- function TypographyH4({ className, ...props }) {
44
- return /* @__PURE__ */ jsx(
45
- "h4",
46
- {
47
- "data-slot": "typography-h4",
48
- className: cn(
49
- "scroll-m-20 text-xl font-semibold tracking-tight",
50
- className
51
- ),
52
- ...props
53
- }
54
- );
55
- }
56
- function TypographyP({ className, ...props }) {
57
- return /* @__PURE__ */ jsx(
58
- "p",
59
- {
60
- "data-slot": "typography-p",
61
- className: cn("leading-7 [&:not(:first-child)]:mt-6", className),
62
- ...props
63
- }
64
- );
65
- }
66
- function TypographyBlockquote({
67
- className,
68
- ...props
69
- }) {
70
- return /* @__PURE__ */ jsx(
71
- "blockquote",
72
- {
73
- "data-slot": "typography-blockquote",
74
- className: cn("mt-6 border-l-2 pl-6 italic", className),
75
- ...props
76
- }
77
- );
78
- }
79
- function TypographyList({ className, ...props }) {
80
- return /* @__PURE__ */ jsx(
81
- "ul",
82
- {
83
- "data-slot": "typography-list",
84
- className: cn("my-6 ml-6 list-disc [&>li]:mt-2", className),
85
- ...props
86
- }
87
- );
88
- }
89
- function TypographyInlineCode({
90
- className,
91
- ...props
92
- }) {
93
- return /* @__PURE__ */ jsx(
94
- "code",
95
- {
96
- "data-slot": "typography-inline-code",
97
- className: cn(
98
- "bg-muted relative rounded px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold",
99
- className
100
- ),
101
- ...props
102
- }
103
- );
104
- }
105
- function TypographyLead({ className, ...props }) {
106
- return /* @__PURE__ */ jsx(
107
- "p",
108
- {
109
- "data-slot": "typography-lead",
110
- className: cn("text-muted-foreground text-xl", className),
111
- ...props
112
- }
113
- );
114
- }
115
- function TypographyLarge({ className, ...props }) {
116
- return /* @__PURE__ */ jsx(
117
- "div",
118
- {
119
- "data-slot": "typography-large",
120
- className: cn("text-lg font-semibold", className),
121
- ...props
122
- }
123
- );
124
- }
125
- function TypographySmall({
126
- className,
127
- ...props
128
- }) {
129
- return /* @__PURE__ */ jsx(
130
- "small",
131
- {
132
- "data-slot": "typography-small",
133
- className: cn("text-sm leading-none font-medium", className),
134
- ...props
135
- }
136
- );
137
- }
138
- function TypographyMuted({ className, ...props }) {
139
- return /* @__PURE__ */ jsx(
140
- "p",
141
- {
142
- "data-slot": "typography-muted",
143
- className: cn("text-muted-foreground text-sm", className),
144
- ...props
145
- }
146
- );
147
- }
148
-
149
- export {
150
- TypographyH1,
151
- TypographyH2,
152
- TypographyH3,
153
- TypographyH4,
154
- TypographyP,
155
- TypographyBlockquote,
156
- TypographyList,
157
- TypographyInlineCode,
158
- TypographyLead,
159
- TypographyLarge,
160
- TypographySmall,
161
- TypographyMuted
162
- };