@foundrykit/primitives 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/components.json +20 -0
  2. package/dist/chunk-A3U73FA7.js +33 -0
  3. package/dist/chunk-AADRFFPH.js +171 -0
  4. package/dist/chunk-FUWID6MC.js +42 -0
  5. package/dist/chunk-FYCANIVJ.js +69 -0
  6. package/dist/chunk-I44GXEPN.js +20 -0
  7. package/dist/chunk-J4CRGO2P.js +46 -0
  8. package/dist/chunk-J57CV3VT.js +28 -0
  9. package/dist/chunk-KZMSLRLW.js +25 -0
  10. package/dist/chunk-PHMEWMFS.js +233 -0
  11. package/dist/chunk-QL4XJD7Y.js +24 -0
  12. package/dist/chunk-SKR3J46C.js +17 -0
  13. package/dist/chunk-U2EIVYWP.js +33 -0
  14. package/dist/chunk-UZIMC7AQ.js +63 -0
  15. package/dist/chunk-VSXKLSEP.js +105 -0
  16. package/dist/chunk-VVNIYCKH.js +55 -0
  17. package/dist/chunk-XQAJQKO7.js +47 -0
  18. package/dist/chunk-YTUI6MCB.js +52 -0
  19. package/dist/components/avatar/index.cjs +92 -0
  20. package/dist/components/avatar/index.d.cts +9 -0
  21. package/dist/components/avatar/index.d.ts +9 -0
  22. package/dist/components/avatar/index.js +11 -0
  23. package/dist/components/badge/index.cjs +67 -0
  24. package/dist/components/badge/index.d.cts +13 -0
  25. package/dist/components/badge/index.d.ts +13 -0
  26. package/dist/components/badge/index.js +8 -0
  27. package/dist/components/breadcrumb/index.cjs +135 -0
  28. package/dist/components/breadcrumb/index.d.cts +14 -0
  29. package/dist/components/breadcrumb/index.d.ts +14 -0
  30. package/dist/components/breadcrumb/index.js +18 -0
  31. package/dist/components/button/index.cjs +77 -0
  32. package/dist/components/button/index.d.cts +15 -0
  33. package/dist/components/button/index.d.ts +15 -0
  34. package/dist/components/button/index.js +8 -0
  35. package/dist/components/card/index.cjs +102 -0
  36. package/dist/components/card/index.d.cts +10 -0
  37. package/dist/components/card/index.d.ts +10 -0
  38. package/dist/components/card/index.js +16 -0
  39. package/dist/components/checkbox/index.cjs +68 -0
  40. package/dist/components/checkbox/index.d.cts +7 -0
  41. package/dist/components/checkbox/index.d.ts +7 -0
  42. package/dist/components/checkbox/index.js +7 -0
  43. package/dist/components/dropdown/index.cjs +282 -0
  44. package/dist/components/dropdown/index.d.cts +28 -0
  45. package/dist/components/dropdown/index.d.ts +28 -0
  46. package/dist/components/dropdown/index.js +35 -0
  47. package/dist/components/input/index.cjs +59 -0
  48. package/dist/components/input/index.d.cts +7 -0
  49. package/dist/components/input/index.d.ts +7 -0
  50. package/dist/components/input/index.js +6 -0
  51. package/dist/components/label/index.cjs +59 -0
  52. package/dist/components/label/index.d.cts +7 -0
  53. package/dist/components/label/index.d.ts +7 -0
  54. package/dist/components/label/index.js +7 -0
  55. package/dist/components/popover/index.cjs +84 -0
  56. package/dist/components/popover/index.d.cts +10 -0
  57. package/dist/components/popover/index.d.ts +10 -0
  58. package/dist/components/popover/index.js +13 -0
  59. package/dist/components/radio-group/index.cjs +83 -0
  60. package/dist/components/radio-group/index.d.cts +8 -0
  61. package/dist/components/radio-group/index.d.ts +8 -0
  62. package/dist/components/radio-group/index.js +9 -0
  63. package/dist/components/select/index.cjs +215 -0
  64. package/dist/components/select/index.d.cts +18 -0
  65. package/dist/components/select/index.d.ts +18 -0
  66. package/dist/components/select/index.js +25 -0
  67. package/dist/components/separator/index.cjs +63 -0
  68. package/dist/components/separator/index.d.cts +7 -0
  69. package/dist/components/separator/index.d.ts +7 -0
  70. package/dist/components/separator/index.js +7 -0
  71. package/dist/components/skeleton/index.cjs +41 -0
  72. package/dist/components/skeleton/index.d.cts +5 -0
  73. package/dist/components/skeleton/index.d.ts +5 -0
  74. package/dist/components/skeleton/index.js +6 -0
  75. package/dist/components/switch/index.cjs +68 -0
  76. package/dist/components/switch/index.d.cts +7 -0
  77. package/dist/components/switch/index.d.ts +7 -0
  78. package/dist/components/switch/index.js +7 -0
  79. package/dist/components/tabs/index.cjs +107 -0
  80. package/dist/components/tabs/index.d.cts +10 -0
  81. package/dist/components/tabs/index.d.ts +10 -0
  82. package/dist/components/tabs/index.js +13 -0
  83. package/dist/components/textarea/index.cjs +44 -0
  84. package/dist/components/textarea/index.d.cts +6 -0
  85. package/dist/components/textarea/index.d.ts +6 -0
  86. package/dist/components/textarea/index.js +6 -0
  87. package/dist/index.cjs +1275 -0
  88. package/dist/index.d.cts +46 -0
  89. package/dist/index.d.ts +46 -0
  90. package/dist/index.js +298 -0
  91. package/eslint.config.js +4 -0
  92. package/package.json +67 -0
  93. package/postcss.config.mjs +6 -0
  94. package/registry.json +51 -0
  95. package/src/components/avatar/config.ts +46 -0
  96. package/src/components/avatar/index.tsx +53 -0
  97. package/src/components/badge/config.ts +56 -0
  98. package/src/components/badge/index.tsx +46 -0
  99. package/src/components/breadcrumb/config.ts +121 -0
  100. package/src/components/breadcrumb/index.tsx +109 -0
  101. package/src/components/button/config.ts +76 -0
  102. package/src/components/button/index.tsx +62 -0
  103. package/src/components/card/config.ts +89 -0
  104. package/src/components/card/index.tsx +83 -0
  105. package/src/components/checkbox/config.ts +46 -0
  106. package/src/components/checkbox/index.tsx +32 -0
  107. package/src/components/dialog/config.ts +582 -0
  108. package/src/components/dialog/index.tsx +143 -0
  109. package/src/components/dropdown/config.ts +262 -0
  110. package/src/components/dropdown/index.tsx +257 -0
  111. package/src/components/input/config.ts +64 -0
  112. package/src/components/input/index.tsx +25 -0
  113. package/src/components/label/config.ts +72 -0
  114. package/src/components/label/index.tsx +24 -0
  115. package/src/components/popover/config.ts +219 -0
  116. package/src/components/popover/index.tsx +48 -0
  117. package/src/components/radio-group/config.ts +303 -0
  118. package/src/components/radio-group/index.tsx +45 -0
  119. package/src/components/select/config.ts +277 -0
  120. package/src/components/select/index.tsx +185 -0
  121. package/src/components/separator/config.ts +63 -0
  122. package/src/components/separator/index.tsx +28 -0
  123. package/src/components/skeleton/config.ts +77 -0
  124. package/src/components/skeleton/index.tsx +13 -0
  125. package/src/components/switch/config.ts +165 -0
  126. package/src/components/switch/index.tsx +31 -0
  127. package/src/components/tabs/config.ts +335 -0
  128. package/src/components/tabs/index.tsx +66 -0
  129. package/src/components/textarea/config.ts +117 -0
  130. package/src/components/textarea/index.tsx +18 -0
  131. package/src/index.ts +87 -0
  132. package/tsconfig.json +9 -0
  133. package/tsconfig.lint.json +8 -0
  134. package/tsup.config.ts +29 -0
@@ -0,0 +1,46 @@
1
+ export { Button, buttonVariants } from './components/button/index.cjs';
2
+ export { Input } from './components/input/index.cjs';
3
+ export { Badge, badgeVariants } from './components/badge/index.cjs';
4
+ export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './components/card/index.cjs';
5
+ export { Avatar, AvatarFallback, AvatarImage } from './components/avatar/index.cjs';
6
+ export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from './components/breadcrumb/index.cjs';
7
+ export { Checkbox } from './components/checkbox/index.cjs';
8
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from './components/dropdown/index.cjs';
9
+ export { Label } from './components/label/index.cjs';
10
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from './components/select/index.cjs';
11
+ export { RadioGroup, RadioGroupItem } from './components/radio-group/index.cjs';
12
+ export { Separator } from './components/separator/index.cjs';
13
+ export { Switch } from './components/switch/index.cjs';
14
+ export { Tabs, TabsContent, TabsList, TabsTrigger } from './components/tabs/index.cjs';
15
+ export { Textarea } from './components/textarea/index.cjs';
16
+ export { Skeleton } from './components/skeleton/index.cjs';
17
+ export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from './components/popover/index.cjs';
18
+ import * as react_jsx_runtime from 'react/jsx-runtime';
19
+ import * as React from 'react';
20
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
21
+ export { cn } from '@foundrykit/utils';
22
+ import 'class-variance-authority/types';
23
+ import 'class-variance-authority';
24
+ import '@radix-ui/react-avatar';
25
+ import '@radix-ui/react-checkbox';
26
+ import '@radix-ui/react-dropdown-menu';
27
+ import '@radix-ui/react-label';
28
+ import '@radix-ui/react-select';
29
+ import '@radix-ui/react-radio-group';
30
+ import '@radix-ui/react-separator';
31
+ import '@radix-ui/react-switch';
32
+ import '@radix-ui/react-tabs';
33
+ import '@radix-ui/react-popover';
34
+
35
+ declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
36
+ declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
37
+ declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): react_jsx_runtime.JSX.Element;
38
+ declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
39
+ showCloseButton?: boolean;
40
+ }): react_jsx_runtime.JSX.Element;
41
+ declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
42
+ declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
43
+ declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime.JSX.Element;
44
+ declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime.JSX.Element;
45
+
46
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger };
@@ -0,0 +1,46 @@
1
+ export { Button, buttonVariants } from './components/button/index.js';
2
+ export { Input } from './components/input/index.js';
3
+ export { Badge, badgeVariants } from './components/badge/index.js';
4
+ export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './components/card/index.js';
5
+ export { Avatar, AvatarFallback, AvatarImage } from './components/avatar/index.js';
6
+ export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from './components/breadcrumb/index.js';
7
+ export { Checkbox } from './components/checkbox/index.js';
8
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from './components/dropdown/index.js';
9
+ export { Label } from './components/label/index.js';
10
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from './components/select/index.js';
11
+ export { RadioGroup, RadioGroupItem } from './components/radio-group/index.js';
12
+ export { Separator } from './components/separator/index.js';
13
+ export { Switch } from './components/switch/index.js';
14
+ export { Tabs, TabsContent, TabsList, TabsTrigger } from './components/tabs/index.js';
15
+ export { Textarea } from './components/textarea/index.js';
16
+ export { Skeleton } from './components/skeleton/index.js';
17
+ export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from './components/popover/index.js';
18
+ import * as react_jsx_runtime from 'react/jsx-runtime';
19
+ import * as React from 'react';
20
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
21
+ export { cn } from '@foundrykit/utils';
22
+ import 'class-variance-authority/types';
23
+ import 'class-variance-authority';
24
+ import '@radix-ui/react-avatar';
25
+ import '@radix-ui/react-checkbox';
26
+ import '@radix-ui/react-dropdown-menu';
27
+ import '@radix-ui/react-label';
28
+ import '@radix-ui/react-select';
29
+ import '@radix-ui/react-radio-group';
30
+ import '@radix-ui/react-separator';
31
+ import '@radix-ui/react-switch';
32
+ import '@radix-ui/react-tabs';
33
+ import '@radix-ui/react-popover';
34
+
35
+ declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
36
+ declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
37
+ declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): react_jsx_runtime.JSX.Element;
38
+ declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
39
+ showCloseButton?: boolean;
40
+ }): react_jsx_runtime.JSX.Element;
41
+ declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
42
+ declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
43
+ declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime.JSX.Element;
44
+ declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime.JSX.Element;
45
+
46
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger };
package/dist/index.js ADDED
@@ -0,0 +1,298 @@
1
+ import {
2
+ Tabs,
3
+ TabsContent,
4
+ TabsList,
5
+ TabsTrigger
6
+ } from "./chunk-FYCANIVJ.js";
7
+ import {
8
+ Textarea
9
+ } from "./chunk-I44GXEPN.js";
10
+ import {
11
+ Input
12
+ } from "./chunk-KZMSLRLW.js";
13
+ import {
14
+ Label
15
+ } from "./chunk-QL4XJD7Y.js";
16
+ import {
17
+ Popover,
18
+ PopoverAnchor,
19
+ PopoverContent,
20
+ PopoverTrigger
21
+ } from "./chunk-J4CRGO2P.js";
22
+ import {
23
+ RadioGroup,
24
+ RadioGroupItem
25
+ } from "./chunk-XQAJQKO7.js";
26
+ import {
27
+ Select,
28
+ SelectContent,
29
+ SelectGroup,
30
+ SelectItem,
31
+ SelectLabel,
32
+ SelectScrollDownButton,
33
+ SelectScrollUpButton,
34
+ SelectSeparator,
35
+ SelectTrigger,
36
+ SelectValue
37
+ } from "./chunk-AADRFFPH.js";
38
+ import {
39
+ Separator
40
+ } from "./chunk-J57CV3VT.js";
41
+ import {
42
+ Skeleton
43
+ } from "./chunk-SKR3J46C.js";
44
+ import {
45
+ Switch
46
+ } from "./chunk-U2EIVYWP.js";
47
+ import {
48
+ Avatar,
49
+ AvatarFallback,
50
+ AvatarImage
51
+ } from "./chunk-VVNIYCKH.js";
52
+ import {
53
+ Badge,
54
+ badgeVariants
55
+ } from "./chunk-FUWID6MC.js";
56
+ import {
57
+ Breadcrumb,
58
+ BreadcrumbEllipsis,
59
+ BreadcrumbItem,
60
+ BreadcrumbLink,
61
+ BreadcrumbList,
62
+ BreadcrumbPage,
63
+ BreadcrumbSeparator
64
+ } from "./chunk-VSXKLSEP.js";
65
+ import {
66
+ Button,
67
+ buttonVariants
68
+ } from "./chunk-YTUI6MCB.js";
69
+ import {
70
+ Card,
71
+ CardContent,
72
+ CardDescription,
73
+ CardFooter,
74
+ CardHeader,
75
+ CardTitle
76
+ } from "./chunk-UZIMC7AQ.js";
77
+ import {
78
+ Checkbox
79
+ } from "./chunk-A3U73FA7.js";
80
+ import {
81
+ DropdownMenu,
82
+ DropdownMenuCheckboxItem,
83
+ DropdownMenuContent,
84
+ DropdownMenuGroup,
85
+ DropdownMenuItem,
86
+ DropdownMenuLabel,
87
+ DropdownMenuPortal,
88
+ DropdownMenuRadioGroup,
89
+ DropdownMenuRadioItem,
90
+ DropdownMenuSeparator,
91
+ DropdownMenuShortcut,
92
+ DropdownMenuSub,
93
+ DropdownMenuSubContent,
94
+ DropdownMenuSubTrigger,
95
+ DropdownMenuTrigger
96
+ } from "./chunk-PHMEWMFS.js";
97
+
98
+ // src/components/dialog/index.tsx
99
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
100
+ import { XIcon } from "lucide-react";
101
+ import { cn } from "@foundrykit/utils";
102
+ import { jsx, jsxs } from "react/jsx-runtime";
103
+ function Dialog({
104
+ ...props
105
+ }) {
106
+ return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
107
+ }
108
+ function DialogTrigger({
109
+ ...props
110
+ }) {
111
+ return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
112
+ }
113
+ function DialogPortal({
114
+ ...props
115
+ }) {
116
+ return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
117
+ }
118
+ function DialogClose({
119
+ ...props
120
+ }) {
121
+ return /* @__PURE__ */ jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
122
+ }
123
+ function DialogOverlay({
124
+ className,
125
+ ...props
126
+ }) {
127
+ return /* @__PURE__ */ jsx(
128
+ DialogPrimitive.Overlay,
129
+ {
130
+ "data-slot": "dialog-overlay",
131
+ className: cn(
132
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
133
+ className
134
+ ),
135
+ ...props
136
+ }
137
+ );
138
+ }
139
+ function DialogContent({
140
+ className,
141
+ children,
142
+ showCloseButton = true,
143
+ ...props
144
+ }) {
145
+ return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
146
+ /* @__PURE__ */ jsx(DialogOverlay, {}),
147
+ /* @__PURE__ */ jsxs(
148
+ DialogPrimitive.Content,
149
+ {
150
+ "data-slot": "dialog-content",
151
+ className: cn(
152
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
153
+ className
154
+ ),
155
+ ...props,
156
+ children: [
157
+ children,
158
+ showCloseButton && /* @__PURE__ */ jsxs(
159
+ DialogPrimitive.Close,
160
+ {
161
+ "data-slot": "dialog-close",
162
+ className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
163
+ children: [
164
+ /* @__PURE__ */ jsx(XIcon, {}),
165
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
166
+ ]
167
+ }
168
+ )
169
+ ]
170
+ }
171
+ )
172
+ ] });
173
+ }
174
+ function DialogHeader({ className, ...props }) {
175
+ return /* @__PURE__ */ jsx(
176
+ "div",
177
+ {
178
+ "data-slot": "dialog-header",
179
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
180
+ ...props
181
+ }
182
+ );
183
+ }
184
+ function DialogFooter({ className, ...props }) {
185
+ return /* @__PURE__ */ jsx(
186
+ "div",
187
+ {
188
+ "data-slot": "dialog-footer",
189
+ className: cn(
190
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
191
+ className
192
+ ),
193
+ ...props
194
+ }
195
+ );
196
+ }
197
+ function DialogTitle({
198
+ className,
199
+ ...props
200
+ }) {
201
+ return /* @__PURE__ */ jsx(
202
+ DialogPrimitive.Title,
203
+ {
204
+ "data-slot": "dialog-title",
205
+ className: cn("text-lg leading-none font-semibold", className),
206
+ ...props
207
+ }
208
+ );
209
+ }
210
+ function DialogDescription({
211
+ className,
212
+ ...props
213
+ }) {
214
+ return /* @__PURE__ */ jsx(
215
+ DialogPrimitive.Description,
216
+ {
217
+ "data-slot": "dialog-description",
218
+ className: cn("text-muted-foreground text-sm", className),
219
+ ...props
220
+ }
221
+ );
222
+ }
223
+
224
+ // src/index.ts
225
+ import { cn as cn2 } from "@foundrykit/utils";
226
+ export {
227
+ Avatar,
228
+ AvatarFallback,
229
+ AvatarImage,
230
+ Badge,
231
+ Breadcrumb,
232
+ BreadcrumbEllipsis,
233
+ BreadcrumbItem,
234
+ BreadcrumbLink,
235
+ BreadcrumbList,
236
+ BreadcrumbPage,
237
+ BreadcrumbSeparator,
238
+ Button,
239
+ Card,
240
+ CardContent,
241
+ CardDescription,
242
+ CardFooter,
243
+ CardHeader,
244
+ CardTitle,
245
+ Checkbox,
246
+ Dialog,
247
+ DialogClose,
248
+ DialogContent,
249
+ DialogDescription,
250
+ DialogFooter,
251
+ DialogHeader,
252
+ DialogTitle,
253
+ DialogTrigger,
254
+ DropdownMenu,
255
+ DropdownMenuCheckboxItem,
256
+ DropdownMenuContent,
257
+ DropdownMenuGroup,
258
+ DropdownMenuItem,
259
+ DropdownMenuLabel,
260
+ DropdownMenuPortal,
261
+ DropdownMenuRadioGroup,
262
+ DropdownMenuRadioItem,
263
+ DropdownMenuSeparator,
264
+ DropdownMenuShortcut,
265
+ DropdownMenuSub,
266
+ DropdownMenuSubContent,
267
+ DropdownMenuSubTrigger,
268
+ DropdownMenuTrigger,
269
+ Input,
270
+ Label,
271
+ Popover,
272
+ PopoverAnchor,
273
+ PopoverContent,
274
+ PopoverTrigger,
275
+ RadioGroup,
276
+ RadioGroupItem,
277
+ Select,
278
+ SelectContent,
279
+ SelectGroup,
280
+ SelectItem,
281
+ SelectLabel,
282
+ SelectScrollDownButton,
283
+ SelectScrollUpButton,
284
+ SelectSeparator,
285
+ SelectTrigger,
286
+ SelectValue,
287
+ Separator,
288
+ Skeleton,
289
+ Switch,
290
+ Tabs,
291
+ TabsContent,
292
+ TabsList,
293
+ TabsTrigger,
294
+ Textarea,
295
+ badgeVariants,
296
+ buttonVariants,
297
+ cn2 as cn
298
+ };
@@ -0,0 +1,4 @@
1
+ import { config } from "@foundrykit/eslint-config/react-internal"
2
+
3
+ /** @type {import("eslint").Linter.Config} */
4
+ export default config
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@foundrykit/primitives",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "private": false,
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js"
16
+ },
17
+ "./components/*": {
18
+ "types": "./dist/components/*.d.ts",
19
+ "import": "./dist/components/*.js"
20
+ }
21
+ },
22
+ "dependencies": {
23
+ "@radix-ui/react-avatar": "^1.1.3",
24
+ "@radix-ui/react-checkbox": "^1.3.3",
25
+ "@radix-ui/react-dialog": "^1.1.15",
26
+ "@radix-ui/react-dropdown-menu": "^2.1.16",
27
+ "@radix-ui/react-label": "^2.1.7",
28
+ "@radix-ui/react-popover": "^1.1.15",
29
+ "@radix-ui/react-radio-group": "^1.3.8",
30
+ "@radix-ui/react-select": "^2.2.6",
31
+ "@radix-ui/react-separator": "^1.1.7",
32
+ "@radix-ui/react-slot": "^1.2.3",
33
+ "@radix-ui/react-switch": "^1.2.6",
34
+ "@radix-ui/react-tabs": "^1.1.13",
35
+ "class-variance-authority": "^0.7.1",
36
+ "clsx": "^2.1.1",
37
+ "lucide-react": "^0.475.0",
38
+ "next-themes": "^0.4.6",
39
+ "react": "^19.1.1",
40
+ "react-dom": "^19.1.1",
41
+ "tailwind-merge": "^3.3.1",
42
+ "zod": "^3.25.76",
43
+ "@foundrykit/utils": "0.1.0",
44
+ "@foundrykit/types": "0.1.0"
45
+ },
46
+ "devDependencies": {
47
+ "@types/node": "^20.19.9",
48
+ "@types/react": "^19.1.9",
49
+ "@types/react-dom": "^19.1.7",
50
+ "eslint": "^9.0.0",
51
+ "fs-extra": "^11.2.0",
52
+ "tsup": "^8.0.0",
53
+ "typescript": "^5.9.2",
54
+ "@foundrykit/eslint-config": "0.1.0",
55
+ "@foundrykit/typescript-config": "0.1.0"
56
+ },
57
+ "peerDependencies": {
58
+ "react": "^19.1.1",
59
+ "react-dom": "^19.1.1"
60
+ },
61
+ "scripts": {
62
+ "build": "tsup --dts --format esm,cjs --clean",
63
+ "dev": "tsup --watch",
64
+ "lint": "eslint . --max-warnings 0",
65
+ "type-check": "tsc --noEmit"
66
+ }
67
+ }
@@ -0,0 +1,6 @@
1
+ /** @type {import('postcss-load-config').Config} */
2
+ const config = {
3
+ plugins: { "@tailwindcss/postcss": {} },
4
+ };
5
+
6
+ export default config;
package/registry.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "package": "@foundrykit/primitives",
3
+ "category": "primitives",
4
+ "components": [
5
+ {
6
+ "name": "button",
7
+ "description": "Versatile button component with multiple variants",
8
+ "tags": ["form", "interactive"],
9
+ "files": ["components/button.tsx"],
10
+ "props": {
11
+ "variant": ["default", "destructive", "outline", "secondary", "ghost", "link"],
12
+ "size": ["default", "sm", "lg", "icon"],
13
+ "asChild": "boolean"
14
+ }
15
+ },
16
+ {
17
+ "name": "input",
18
+ "description": "Form input component with consistent styling",
19
+ "tags": ["form"],
20
+ "files": ["components/input.tsx"],
21
+ "props": {
22
+ "type": "string",
23
+ "placeholder": "string",
24
+ "disabled": "boolean"
25
+ }
26
+ },
27
+ {
28
+ "name": "badge",
29
+ "description": "Small status indicators and labels",
30
+ "tags": ["status", "label"],
31
+ "files": ["components/badge.tsx"],
32
+ "props": {
33
+ "variant": ["default", "secondary", "destructive", "outline"]
34
+ }
35
+ },
36
+ {
37
+ "name": "card",
38
+ "description": "Container for content sections",
39
+ "tags": ["layout", "container"],
40
+ "files": ["components/card.tsx"],
41
+ "subcomponents": ["CardHeader", "CardTitle", "CardDescription", "CardContent", "CardFooter"]
42
+ },
43
+ {
44
+ "name": "avatar",
45
+ "description": "User profile pictures with fallback",
46
+ "tags": ["user", "profile"],
47
+ "files": ["components/avatar.tsx"],
48
+ "subcomponents": ["AvatarImage", "AvatarFallback"]
49
+ }
50
+ ]
51
+ }
@@ -0,0 +1,46 @@
1
+ import { ComponentConfig } from '@foundrykit/types';
2
+
3
+ export const avatarConfig: ComponentConfig = {
4
+ name: 'Avatar',
5
+ description: 'User avatar component with image fallback and initials',
6
+ category: 'primitives',
7
+ tags: ['user', 'profile', 'image'],
8
+ preview: {
9
+ type: 'static',
10
+ html: '<div class="flex h-12 w-full items-center justify-center rounded-md bg-gray-200"><div class="flex h-8 w-8 items-center justify-center rounded-full bg-gray-300"><div class="h-4 w-4 rounded-full bg-gray-600"></div></div></div>',
11
+ },
12
+ variants: [
13
+ {
14
+ name: 'Default',
15
+ description: 'Default avatar with fallback',
16
+ code: '<Avatar>JD</Avatar>',
17
+ preview: {
18
+ type: 'component',
19
+ component: 'Avatar',
20
+ props: { children: 'JD' },
21
+ },
22
+ },
23
+ {
24
+ name: 'With Image',
25
+ description: 'Avatar with user image',
26
+ code: '<Avatar src="/user.jpg" alt="User" />',
27
+ preview: {
28
+ type: 'component',
29
+ component: 'Avatar',
30
+ props: { src: '/user.jpg', alt: 'User' },
31
+ },
32
+ },
33
+ {
34
+ name: 'Large',
35
+ description: 'Large avatar size',
36
+ code: '<Avatar size="lg">JD</Avatar>',
37
+ preview: {
38
+ type: 'component',
39
+ component: 'Avatar',
40
+ props: { size: 'lg', children: 'JD' },
41
+ },
42
+ },
43
+ ],
44
+ dependencies: ['utils'],
45
+ files: ['components/primitives/avatar/index.tsx'],
46
+ };
@@ -0,0 +1,53 @@
1
+ 'use client';
2
+
3
+ import * as React from 'react';
4
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
5
+
6
+ import { cn } from '@foundrykit/utils';
7
+
8
+ function Avatar({
9
+ className,
10
+ ...props
11
+ }: React.ComponentProps<typeof AvatarPrimitive.Root>) {
12
+ return (
13
+ <AvatarPrimitive.Root
14
+ data-slot='avatar'
15
+ className={cn(
16
+ 'relative flex size-8 shrink-0 overflow-hidden rounded-full',
17
+ className
18
+ )}
19
+ {...props}
20
+ />
21
+ );
22
+ }
23
+
24
+ function AvatarImage({
25
+ className,
26
+ ...props
27
+ }: React.ComponentProps<typeof AvatarPrimitive.Image>) {
28
+ return (
29
+ <AvatarPrimitive.Image
30
+ data-slot='avatar-image'
31
+ className={cn('aspect-square size-full', className)}
32
+ {...props}
33
+ />
34
+ );
35
+ }
36
+
37
+ function AvatarFallback({
38
+ className,
39
+ ...props
40
+ }: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {
41
+ return (
42
+ <AvatarPrimitive.Fallback
43
+ data-slot='avatar-fallback'
44
+ className={cn(
45
+ 'bg-muted flex size-full items-center justify-center rounded-full',
46
+ className
47
+ )}
48
+ {...props}
49
+ />
50
+ );
51
+ }
52
+
53
+ export { Avatar, AvatarImage, AvatarFallback };
@@ -0,0 +1,56 @@
1
+ import { ComponentConfig } from '@foundrykit/types';
2
+
3
+ export const badgeConfig: ComponentConfig = {
4
+ name: 'Badge',
5
+ description: 'Small status indicators and labels',
6
+ category: 'primitives',
7
+ tags: ['status', 'label', 'indicator'],
8
+ preview: {
9
+ type: 'static',
10
+ html: '<div class="flex h-12 w-full items-center justify-center rounded-md bg-gray-200"><div class="flex h-6 w-16 items-center justify-center rounded-full bg-gray-300"><div class="mr-1 h-2 w-2 rounded-full bg-gray-600"></div><div class="h-1 w-6 rounded bg-gray-600"></div></div></div>',
11
+ },
12
+ variants: [
13
+ {
14
+ name: 'Default',
15
+ description: 'Default badge styling',
16
+ code: '<Badge>Default</Badge>',
17
+ preview: {
18
+ type: 'component',
19
+ component: 'Badge',
20
+ props: { children: 'Default' },
21
+ },
22
+ },
23
+ {
24
+ name: 'Secondary',
25
+ description: 'Secondary badge variant',
26
+ code: '<Badge variant="secondary">Secondary</Badge>',
27
+ preview: {
28
+ type: 'component',
29
+ component: 'Badge',
30
+ props: { variant: 'secondary', children: 'Secondary' },
31
+ },
32
+ },
33
+ {
34
+ name: 'Destructive',
35
+ description: 'Destructive badge variant',
36
+ code: '<Badge variant="destructive">Error</Badge>',
37
+ preview: {
38
+ type: 'component',
39
+ component: 'Badge',
40
+ props: { variant: 'destructive', children: 'Error' },
41
+ },
42
+ },
43
+ {
44
+ name: 'Outline',
45
+ description: 'Outline badge variant',
46
+ code: '<Badge variant="outline">Outline</Badge>',
47
+ preview: {
48
+ type: 'component',
49
+ component: 'Badge',
50
+ props: { variant: 'outline', children: 'Outline' },
51
+ },
52
+ },
53
+ ],
54
+ dependencies: ['utils'],
55
+ files: ['components/primitives/badge/index.tsx'],
56
+ };