@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,20 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "new-york",
4
+ "rsc": true,
5
+ "tsx": true,
6
+ "tailwind": {
7
+ "config": "",
8
+ "css": "@foundrykit/tokens/globals.css",
9
+ "baseColor": "neutral",
10
+ "cssVariables": true
11
+ },
12
+ "iconLibrary": "lucide",
13
+ "aliases": {
14
+ "components": "@workspace/ui/components",
15
+ "utils": "@workspace/ui/lib/utils",
16
+ "hooks": "@workspace/ui/hooks",
17
+ "lib": "@workspace/ui/lib",
18
+ "ui": "@workspace/ui/components"
19
+ }
20
+ }
@@ -0,0 +1,33 @@
1
+ // src/components/checkbox/index.tsx
2
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
3
+ import { CheckIcon } from "lucide-react";
4
+ import { cn } from "@foundrykit/utils";
5
+ import { jsx } from "react/jsx-runtime";
6
+ function Checkbox({
7
+ className,
8
+ ...props
9
+ }) {
10
+ return /* @__PURE__ */ jsx(
11
+ CheckboxPrimitive.Root,
12
+ {
13
+ "data-slot": "checkbox",
14
+ className: cn(
15
+ "border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-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 shadow-xs peer size-4 shrink-0 rounded-[4px] border outline-none transition-shadow focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
16
+ className
17
+ ),
18
+ ...props,
19
+ children: /* @__PURE__ */ jsx(
20
+ CheckboxPrimitive.Indicator,
21
+ {
22
+ "data-slot": "checkbox-indicator",
23
+ className: "flex items-center justify-center text-current transition-none",
24
+ children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5" })
25
+ }
26
+ )
27
+ }
28
+ );
29
+ }
30
+
31
+ export {
32
+ Checkbox
33
+ };
@@ -0,0 +1,171 @@
1
+ // src/components/select/index.tsx
2
+ import * as SelectPrimitive from "@radix-ui/react-select";
3
+ import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
4
+ import { cn } from "@foundrykit/utils";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ function Select({
7
+ ...props
8
+ }) {
9
+ return /* @__PURE__ */ jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
10
+ }
11
+ function SelectGroup({
12
+ ...props
13
+ }) {
14
+ return /* @__PURE__ */ jsx(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
15
+ }
16
+ function SelectValue({
17
+ ...props
18
+ }) {
19
+ return /* @__PURE__ */ jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
20
+ }
21
+ function SelectTrigger({
22
+ className,
23
+ size = "default",
24
+ children,
25
+ ...props
26
+ }) {
27
+ return /* @__PURE__ */ jsxs(
28
+ SelectPrimitive.Trigger,
29
+ {
30
+ "data-slot": "select-trigger",
31
+ "data-size": size,
32
+ className: cn(
33
+ "border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-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 dark:hover:bg-input/50 shadow-xs flex w-fit items-center justify-between gap-2 whitespace-nowrap rounded-md border bg-transparent px-3 py-2 text-sm outline-none transition-[color,box-shadow] focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
34
+ className
35
+ ),
36
+ ...props,
37
+ children: [
38
+ children,
39
+ /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" }) })
40
+ ]
41
+ }
42
+ );
43
+ }
44
+ function SelectContent({
45
+ className,
46
+ children,
47
+ position = "popper",
48
+ ...props
49
+ }) {
50
+ return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
51
+ SelectPrimitive.Content,
52
+ {
53
+ "data-slot": "select-content",
54
+ className: cn(
55
+ "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 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 max-h-(--radix-select-content-available-height) origin-(--radix-select-content-transform-origin) relative z-50 min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border shadow-md",
56
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
57
+ className
58
+ ),
59
+ position,
60
+ ...props,
61
+ children: [
62
+ /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
63
+ /* @__PURE__ */ jsx(
64
+ SelectPrimitive.Viewport,
65
+ {
66
+ className: cn(
67
+ "p-1",
68
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
69
+ ),
70
+ children
71
+ }
72
+ ),
73
+ /* @__PURE__ */ jsx(SelectScrollDownButton, {})
74
+ ]
75
+ }
76
+ ) });
77
+ }
78
+ function SelectLabel({
79
+ className,
80
+ ...props
81
+ }) {
82
+ return /* @__PURE__ */ jsx(
83
+ SelectPrimitive.Label,
84
+ {
85
+ "data-slot": "select-label",
86
+ className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
87
+ ...props
88
+ }
89
+ );
90
+ }
91
+ function SelectItem({
92
+ className,
93
+ children,
94
+ ...props
95
+ }) {
96
+ return /* @__PURE__ */ jsxs(
97
+ SelectPrimitive.Item,
98
+ {
99
+ "data-slot": "select-item",
100
+ className: cn(
101
+ "focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-2 pr-8 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
102
+ className
103
+ ),
104
+ ...props,
105
+ children: [
106
+ /* @__PURE__ */ jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
107
+ /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
108
+ ]
109
+ }
110
+ );
111
+ }
112
+ function SelectSeparator({
113
+ className,
114
+ ...props
115
+ }) {
116
+ return /* @__PURE__ */ jsx(
117
+ SelectPrimitive.Separator,
118
+ {
119
+ "data-slot": "select-separator",
120
+ className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
121
+ ...props
122
+ }
123
+ );
124
+ }
125
+ function SelectScrollUpButton({
126
+ className,
127
+ ...props
128
+ }) {
129
+ return /* @__PURE__ */ jsx(
130
+ SelectPrimitive.ScrollUpButton,
131
+ {
132
+ "data-slot": "select-scroll-up-button",
133
+ className: cn(
134
+ "flex cursor-default items-center justify-center py-1",
135
+ className
136
+ ),
137
+ ...props,
138
+ children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4" })
139
+ }
140
+ );
141
+ }
142
+ function SelectScrollDownButton({
143
+ className,
144
+ ...props
145
+ }) {
146
+ return /* @__PURE__ */ jsx(
147
+ SelectPrimitive.ScrollDownButton,
148
+ {
149
+ "data-slot": "select-scroll-down-button",
150
+ className: cn(
151
+ "flex cursor-default items-center justify-center py-1",
152
+ className
153
+ ),
154
+ ...props,
155
+ children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
156
+ }
157
+ );
158
+ }
159
+
160
+ export {
161
+ Select,
162
+ SelectGroup,
163
+ SelectValue,
164
+ SelectTrigger,
165
+ SelectContent,
166
+ SelectLabel,
167
+ SelectItem,
168
+ SelectSeparator,
169
+ SelectScrollUpButton,
170
+ SelectScrollDownButton
171
+ };
@@ -0,0 +1,42 @@
1
+ // src/components/badge/index.tsx
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import { cva } from "class-variance-authority";
4
+ import { cn } from "@foundrykit/utils";
5
+ import { jsx } from "react/jsx-runtime";
6
+ var badgeVariants = cva(
7
+ "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
12
+ secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
13
+ destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
14
+ outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
15
+ }
16
+ },
17
+ defaultVariants: {
18
+ variant: "default"
19
+ }
20
+ }
21
+ );
22
+ function Badge({
23
+ className,
24
+ variant,
25
+ asChild = false,
26
+ ...props
27
+ }) {
28
+ const Comp = asChild ? Slot : "span";
29
+ return /* @__PURE__ */ jsx(
30
+ Comp,
31
+ {
32
+ "data-slot": "badge",
33
+ className: cn(badgeVariants({ variant }), className),
34
+ ...props
35
+ }
36
+ );
37
+ }
38
+
39
+ export {
40
+ badgeVariants,
41
+ Badge
42
+ };
@@ -0,0 +1,69 @@
1
+ // src/components/tabs/index.tsx
2
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
3
+ import { cn } from "@foundrykit/utils";
4
+ import { jsx } from "react/jsx-runtime";
5
+ function Tabs({
6
+ className,
7
+ ...props
8
+ }) {
9
+ return /* @__PURE__ */ jsx(
10
+ TabsPrimitive.Root,
11
+ {
12
+ "data-slot": "tabs",
13
+ className: cn("flex flex-col gap-2", className),
14
+ ...props
15
+ }
16
+ );
17
+ }
18
+ function TabsList({
19
+ className,
20
+ ...props
21
+ }) {
22
+ return /* @__PURE__ */ jsx(
23
+ TabsPrimitive.List,
24
+ {
25
+ "data-slot": "tabs-list",
26
+ className: cn(
27
+ "bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
28
+ className
29
+ ),
30
+ ...props
31
+ }
32
+ );
33
+ }
34
+ function TabsTrigger({
35
+ className,
36
+ ...props
37
+ }) {
38
+ return /* @__PURE__ */ jsx(
39
+ TabsPrimitive.Trigger,
40
+ {
41
+ "data-slot": "tabs-trigger",
42
+ className: cn(
43
+ "data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md border border-transparent px-2 py-1 text-sm font-medium transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
44
+ className
45
+ ),
46
+ ...props
47
+ }
48
+ );
49
+ }
50
+ function TabsContent({
51
+ className,
52
+ ...props
53
+ }) {
54
+ return /* @__PURE__ */ jsx(
55
+ TabsPrimitive.Content,
56
+ {
57
+ "data-slot": "tabs-content",
58
+ className: cn("flex-1 outline-none", className),
59
+ ...props
60
+ }
61
+ );
62
+ }
63
+
64
+ export {
65
+ Tabs,
66
+ TabsList,
67
+ TabsTrigger,
68
+ TabsContent
69
+ };
@@ -0,0 +1,20 @@
1
+ // src/components/textarea/index.tsx
2
+ import { cn } from "@foundrykit/utils";
3
+ import { jsx } from "react/jsx-runtime";
4
+ function Textarea({ className, ...props }) {
5
+ return /* @__PURE__ */ jsx(
6
+ "textarea",
7
+ {
8
+ "data-slot": "textarea",
9
+ className: cn(
10
+ "border-input placeholder:text-muted-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 field-sizing-content shadow-xs flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base outline-none transition-[color,box-shadow] focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
11
+ className
12
+ ),
13
+ ...props
14
+ }
15
+ );
16
+ }
17
+
18
+ export {
19
+ Textarea
20
+ };
@@ -0,0 +1,46 @@
1
+ // src/components/popover/index.tsx
2
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
3
+ import { cn } from "@foundrykit/utils";
4
+ import { jsx } from "react/jsx-runtime";
5
+ function Popover({
6
+ ...props
7
+ }) {
8
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
9
+ }
10
+ function PopoverTrigger({
11
+ ...props
12
+ }) {
13
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
14
+ }
15
+ function PopoverContent({
16
+ className,
17
+ align = "center",
18
+ sideOffset = 4,
19
+ ...props
20
+ }) {
21
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
22
+ PopoverPrimitive.Content,
23
+ {
24
+ "data-slot": "popover-content",
25
+ align,
26
+ sideOffset,
27
+ className: cn(
28
+ "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 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-popover-content-transform-origin) outline-hidden z-50 w-72 rounded-md border p-4 shadow-md",
29
+ className
30
+ ),
31
+ ...props
32
+ }
33
+ ) });
34
+ }
35
+ function PopoverAnchor({
36
+ ...props
37
+ }) {
38
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
39
+ }
40
+
41
+ export {
42
+ Popover,
43
+ PopoverTrigger,
44
+ PopoverContent,
45
+ PopoverAnchor
46
+ };
@@ -0,0 +1,28 @@
1
+ // src/components/separator/index.tsx
2
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
3
+ import { cn } from "@foundrykit/utils";
4
+ import { jsx } from "react/jsx-runtime";
5
+ function Separator({
6
+ className,
7
+ orientation = "horizontal",
8
+ decorative = true,
9
+ ...props
10
+ }) {
11
+ return /* @__PURE__ */ jsx(
12
+ SeparatorPrimitive.Root,
13
+ {
14
+ "data-slot": "separator",
15
+ decorative,
16
+ orientation,
17
+ className: cn(
18
+ "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px",
19
+ className
20
+ ),
21
+ ...props
22
+ }
23
+ );
24
+ }
25
+
26
+ export {
27
+ Separator
28
+ };
@@ -0,0 +1,25 @@
1
+ // src/components/input/index.tsx
2
+ import * as React from "react";
3
+ import { cn } from "@foundrykit/utils";
4
+ import { jsx } from "react/jsx-runtime";
5
+ var Input = React.forwardRef(
6
+ ({ className, type, ...props }, ref) => {
7
+ return /* @__PURE__ */ jsx(
8
+ "input",
9
+ {
10
+ type,
11
+ className: cn(
12
+ "border-input file:text-foreground placeholder:text-muted-foreground focus-visible:ring-ring flex h-9 w-full rounded-md border bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50",
13
+ className
14
+ ),
15
+ ref,
16
+ ...props
17
+ }
18
+ );
19
+ }
20
+ );
21
+ Input.displayName = "Input";
22
+
23
+ export {
24
+ Input
25
+ };
@@ -0,0 +1,233 @@
1
+ // src/components/dropdown/index.tsx
2
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
3
+ import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
4
+ import { cn } from "@foundrykit/utils";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ function DropdownMenu({
7
+ ...props
8
+ }) {
9
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
10
+ }
11
+ function DropdownMenuPortal({
12
+ ...props
13
+ }) {
14
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props });
15
+ }
16
+ function DropdownMenuTrigger({
17
+ ...props
18
+ }) {
19
+ return /* @__PURE__ */ jsx(
20
+ DropdownMenuPrimitive.Trigger,
21
+ {
22
+ "data-slot": "dropdown-menu-trigger",
23
+ ...props
24
+ }
25
+ );
26
+ }
27
+ function DropdownMenuContent({
28
+ className,
29
+ sideOffset = 4,
30
+ ...props
31
+ }) {
32
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
33
+ DropdownMenuPrimitive.Content,
34
+ {
35
+ "data-slot": "dropdown-menu-content",
36
+ sideOffset,
37
+ className: cn(
38
+ "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 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 max-h-(--radix-dropdown-menu-content-available-height) origin-(--radix-dropdown-menu-content-transform-origin) z-50 min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border p-1 shadow-md",
39
+ className
40
+ ),
41
+ ...props
42
+ }
43
+ ) });
44
+ }
45
+ function DropdownMenuGroup({
46
+ ...props
47
+ }) {
48
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
49
+ }
50
+ function DropdownMenuItem({
51
+ className,
52
+ inset,
53
+ variant = "default",
54
+ ...props
55
+ }) {
56
+ return /* @__PURE__ */ jsx(
57
+ DropdownMenuPrimitive.Item,
58
+ {
59
+ "data-slot": "dropdown-menu-item",
60
+ "data-inset": inset,
61
+ "data-variant": variant,
62
+ className: cn(
63
+ "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 outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
64
+ className
65
+ ),
66
+ ...props
67
+ }
68
+ );
69
+ }
70
+ function DropdownMenuCheckboxItem({
71
+ className,
72
+ children,
73
+ checked,
74
+ ...props
75
+ }) {
76
+ return /* @__PURE__ */ jsxs(
77
+ DropdownMenuPrimitive.CheckboxItem,
78
+ {
79
+ "data-slot": "dropdown-menu-checkbox-item",
80
+ className: cn(
81
+ "focus:bg-accent focus:text-accent-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-8 pr-2 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
82
+ className
83
+ ),
84
+ checked,
85
+ ...props,
86
+ children: [
87
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
88
+ children
89
+ ]
90
+ }
91
+ );
92
+ }
93
+ function DropdownMenuRadioGroup({
94
+ ...props
95
+ }) {
96
+ return /* @__PURE__ */ jsx(
97
+ DropdownMenuPrimitive.RadioGroup,
98
+ {
99
+ "data-slot": "dropdown-menu-radio-group",
100
+ ...props
101
+ }
102
+ );
103
+ }
104
+ function DropdownMenuRadioItem({
105
+ className,
106
+ children,
107
+ ...props
108
+ }) {
109
+ return /* @__PURE__ */ jsxs(
110
+ DropdownMenuPrimitive.RadioItem,
111
+ {
112
+ "data-slot": "dropdown-menu-radio-item",
113
+ className: cn(
114
+ "focus:bg-accent focus:text-accent-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-8 pr-2 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
115
+ className
116
+ ),
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(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
120
+ children
121
+ ]
122
+ }
123
+ );
124
+ }
125
+ function DropdownMenuLabel({
126
+ className,
127
+ inset,
128
+ ...props
129
+ }) {
130
+ return /* @__PURE__ */ jsx(
131
+ DropdownMenuPrimitive.Label,
132
+ {
133
+ "data-slot": "dropdown-menu-label",
134
+ "data-inset": inset,
135
+ className: cn(
136
+ "px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
137
+ className
138
+ ),
139
+ ...props
140
+ }
141
+ );
142
+ }
143
+ function DropdownMenuSeparator({
144
+ className,
145
+ ...props
146
+ }) {
147
+ return /* @__PURE__ */ jsx(
148
+ DropdownMenuPrimitive.Separator,
149
+ {
150
+ "data-slot": "dropdown-menu-separator",
151
+ className: cn("bg-border -mx-1 my-1 h-px", className),
152
+ ...props
153
+ }
154
+ );
155
+ }
156
+ function DropdownMenuShortcut({
157
+ className,
158
+ ...props
159
+ }) {
160
+ return /* @__PURE__ */ jsx(
161
+ "span",
162
+ {
163
+ "data-slot": "dropdown-menu-shortcut",
164
+ className: cn(
165
+ "text-muted-foreground ml-auto text-xs tracking-widest",
166
+ className
167
+ ),
168
+ ...props
169
+ }
170
+ );
171
+ }
172
+ function DropdownMenuSub({
173
+ ...props
174
+ }) {
175
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
176
+ }
177
+ function DropdownMenuSubTrigger({
178
+ className,
179
+ inset,
180
+ children,
181
+ ...props
182
+ }) {
183
+ return /* @__PURE__ */ jsxs(
184
+ DropdownMenuPrimitive.SubTrigger,
185
+ {
186
+ "data-slot": "dropdown-menu-sub-trigger",
187
+ "data-inset": inset,
188
+ className: cn(
189
+ "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground outline-hidden flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm data-[inset]:pl-8",
190
+ className
191
+ ),
192
+ ...props,
193
+ children: [
194
+ children,
195
+ /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })
196
+ ]
197
+ }
198
+ );
199
+ }
200
+ function DropdownMenuSubContent({
201
+ className,
202
+ ...props
203
+ }) {
204
+ return /* @__PURE__ */ jsx(
205
+ DropdownMenuPrimitive.SubContent,
206
+ {
207
+ "data-slot": "dropdown-menu-sub-content",
208
+ className: cn(
209
+ "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 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-dropdown-menu-content-transform-origin) z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg",
210
+ className
211
+ ),
212
+ ...props
213
+ }
214
+ );
215
+ }
216
+
217
+ export {
218
+ DropdownMenu,
219
+ DropdownMenuPortal,
220
+ DropdownMenuTrigger,
221
+ DropdownMenuContent,
222
+ DropdownMenuGroup,
223
+ DropdownMenuItem,
224
+ DropdownMenuCheckboxItem,
225
+ DropdownMenuRadioGroup,
226
+ DropdownMenuRadioItem,
227
+ DropdownMenuLabel,
228
+ DropdownMenuSeparator,
229
+ DropdownMenuShortcut,
230
+ DropdownMenuSub,
231
+ DropdownMenuSubTrigger,
232
+ DropdownMenuSubContent
233
+ };