@foundrykit/primitives 2.0.9 → 2.1.1

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 (146) hide show
  1. package/dist/{chunk-HS46TIMU.js → chunk-2UG6OCGA.js} +1 -1
  2. package/dist/chunk-3NQR7JZR.js +128 -0
  3. package/dist/{chunk-XCPGTXEJ.js → chunk-5RFGKG4K.js} +1 -1
  4. package/dist/chunk-B5YCE3UP.js +57 -0
  5. package/dist/chunk-F2TEA6ER.js +138 -0
  6. package/dist/{chunk-46UI3AUE.js → chunk-SEDTBIZW.js} +3 -3
  7. package/dist/chunk-SIQHWNPH.js +45 -0
  8. package/dist/chunk-STRBREHN.js +17 -0
  9. package/dist/components/button/index.cjs +3 -3
  10. package/dist/components/button/index.js +1 -1
  11. package/dist/components/card/index.cjs +1 -1
  12. package/dist/components/card/index.js +1 -1
  13. package/dist/components/dialog/index.cjs +182 -0
  14. package/dist/components/dialog/index.d.cts +38 -0
  15. package/dist/components/dialog/index.d.ts +38 -0
  16. package/dist/components/dialog/index.js +25 -0
  17. package/dist/components/input/index.cjs +1 -1
  18. package/dist/components/input/index.js +1 -1
  19. package/dist/components/input-group/index.cjs +270 -0
  20. package/dist/components/input-group/index.d.cts +44 -0
  21. package/dist/components/input-group/index.d.ts +44 -0
  22. package/dist/components/input-group/index.js +153 -0
  23. package/dist/components/section/index.cjs +41 -0
  24. package/dist/components/section/index.d.cts +27 -0
  25. package/dist/components/section/index.d.ts +27 -0
  26. package/dist/components/section/index.js +6 -0
  27. package/dist/components/sheet/index.cjs +170 -0
  28. package/dist/components/sheet/index.d.cts +31 -0
  29. package/dist/components/sheet/index.d.ts +31 -0
  30. package/dist/components/sheet/index.js +21 -0
  31. package/dist/components/toggle/index.cjs +81 -0
  32. package/dist/components/toggle/index.d.cts +26 -0
  33. package/dist/components/toggle/index.d.ts +26 -0
  34. package/dist/components/toggle/index.js +9 -0
  35. package/dist/components/tooltip/index.cjs +95 -0
  36. package/dist/components/tooltip/index.d.cts +25 -0
  37. package/dist/components/tooltip/index.d.ts +25 -0
  38. package/dist/components/tooltip/index.js +13 -0
  39. package/dist/index.cjs +112 -96
  40. package/dist/index.d.cts +12 -105
  41. package/dist/index.d.ts +12 -105
  42. package/dist/index.js +104 -406
  43. package/package.json +206 -10
  44. package/CHANGELOG.md +0 -230
  45. package/postcss.config.mjs +0 -6
  46. package/registry.json +0 -64
  47. package/src/components/accordion/config.ts +0 -28
  48. package/src/components/accordion/index.tsx +0 -80
  49. package/src/components/alert/config.ts +0 -40
  50. package/src/components/alert/index.tsx +0 -80
  51. package/src/components/alert-dialog/config.ts +0 -28
  52. package/src/components/alert-dialog/index.tsx +0 -188
  53. package/src/components/aspect-ratio/config.ts +0 -27
  54. package/src/components/aspect-ratio/index.tsx +0 -24
  55. package/src/components/avatar/config.ts +0 -46
  56. package/src/components/avatar/index.tsx +0 -67
  57. package/src/components/badge/config.ts +0 -56
  58. package/src/components/badge/index.tsx +0 -56
  59. package/src/components/breadcrumb/config.ts +0 -121
  60. package/src/components/breadcrumb/index.tsx +0 -127
  61. package/src/components/button/config.ts +0 -97
  62. package/src/components/button/index.tsx +0 -86
  63. package/src/components/button-group/config.ts +0 -39
  64. package/src/components/button-group/index.tsx +0 -99
  65. package/src/components/card/config.ts +0 -89
  66. package/src/components/card/index.tsx +0 -90
  67. package/src/components/checkbox/config.ts +0 -46
  68. package/src/components/checkbox/index.tsx +0 -41
  69. package/src/components/collapsible/config.ts +0 -27
  70. package/src/components/collapsible/index.tsx +0 -47
  71. package/src/components/context-menu/config.ts +0 -28
  72. package/src/components/context-menu/index.tsx +0 -271
  73. package/src/components/dialog/config.ts +0 -582
  74. package/src/components/dialog/index.tsx +0 -162
  75. package/src/components/direction/config.ts +0 -28
  76. package/src/components/direction/index.tsx +0 -27
  77. package/src/components/drawer/config.ts +0 -28
  78. package/src/components/drawer/index.tsx +0 -153
  79. package/src/components/dropdown/config.ts +0 -262
  80. package/src/components/dropdown/index.tsx +0 -280
  81. package/src/components/empty/config.ts +0 -38
  82. package/src/components/empty/index.tsx +0 -127
  83. package/src/components/field/config.ts +0 -40
  84. package/src/components/field/index.tsx +0 -252
  85. package/src/components/hover-card/config.ts +0 -27
  86. package/src/components/hover-card/index.tsx +0 -56
  87. package/src/components/input/config.ts +0 -64
  88. package/src/components/input/index.tsx +0 -32
  89. package/src/components/input-group/config.ts +0 -209
  90. package/src/components/input-group/index.tsx +0 -177
  91. package/src/components/item/config.ts +0 -52
  92. package/src/components/item/index.tsx +0 -215
  93. package/src/components/kbd/config.ts +0 -38
  94. package/src/components/kbd/index.tsx +0 -40
  95. package/src/components/label/config.ts +0 -72
  96. package/src/components/label/index.tsx +0 -32
  97. package/src/components/menubar/config.ts +0 -28
  98. package/src/components/menubar/index.tsx +0 -295
  99. package/src/components/native-select/config.ts +0 -40
  100. package/src/components/native-select/index.tsx +0 -40
  101. package/src/components/navigation-menu/config.ts +0 -32
  102. package/src/components/navigation-menu/index.tsx +0 -188
  103. package/src/components/popover/config.ts +0 -222
  104. package/src/components/popover/index.tsx +0 -60
  105. package/src/components/progress/config.ts +0 -42
  106. package/src/components/progress/index.tsx +0 -39
  107. package/src/components/radio-group/config.ts +0 -303
  108. package/src/components/radio-group/index.tsx +0 -58
  109. package/src/components/resizable/config.ts +0 -28
  110. package/src/components/resizable/index.tsx +0 -67
  111. package/src/components/scroll-area/config.ts +0 -17
  112. package/src/components/scroll-area/index.tsx +0 -70
  113. package/src/components/select/config.ts +0 -277
  114. package/src/components/select/index.tsx +0 -202
  115. package/src/components/separator/config.ts +0 -63
  116. package/src/components/separator/index.tsx +0 -38
  117. package/src/components/sheet/config.ts +0 -16
  118. package/src/components/sheet/index.tsx +0 -153
  119. package/src/components/skeleton/config.ts +0 -77
  120. package/src/components/skeleton/index.tsx +0 -22
  121. package/src/components/slider/config.ts +0 -46
  122. package/src/components/slider/index.tsx +0 -76
  123. package/src/components/sonner/config.ts +0 -27
  124. package/src/components/sonner/index.tsx +0 -37
  125. package/src/components/spinner/config.ts +0 -40
  126. package/src/components/spinner/index.tsx +0 -30
  127. package/src/components/switch/config.ts +0 -171
  128. package/src/components/switch/index.tsx +0 -40
  129. package/src/components/table/config.ts +0 -38
  130. package/src/components/table/index.tsx +0 -135
  131. package/src/components/tabs/config.ts +0 -335
  132. package/src/components/tabs/index.tsx +0 -82
  133. package/src/components/textarea/config.ts +0 -117
  134. package/src/components/textarea/index.tsx +0 -26
  135. package/src/components/toggle/config.ts +0 -67
  136. package/src/components/toggle/index.tsx +0 -59
  137. package/src/components/toggle-group/config.ts +0 -46
  138. package/src/components/toggle-group/index.tsx +0 -106
  139. package/src/components/tooltip/config.ts +0 -16
  140. package/src/components/tooltip/index.tsx +0 -75
  141. package/src/components/typography/config.ts +0 -38
  142. package/src/components/typography/index.tsx +0 -172
  143. package/src/index.ts +0 -291
  144. package/tsconfig.json +0 -9
  145. package/tsconfig.lint.json +0 -8
  146. package/tsup.config.ts +0 -55
@@ -7,7 +7,7 @@ function Card({ className, ...props }) {
7
7
  {
8
8
  "data-slot": "card",
9
9
  className: cn(
10
- "bg-card text-card-foreground rounded-xl border shadow",
10
+ "bg-card text-card-foreground rounded-[var(--card-radius,calc(var(--radius)+4px))] border shadow",
11
11
  className
12
12
  ),
13
13
  ...props
@@ -0,0 +1,128 @@
1
+ // src/components/sheet/index.tsx
2
+ import { cn } from "@foundrykit/utils";
3
+ import * as SheetPrimitive from "@radix-ui/react-dialog";
4
+ import { XIcon } from "lucide-react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ function Sheet({ ...props }) {
7
+ return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
8
+ }
9
+ function SheetTrigger({
10
+ ...props
11
+ }) {
12
+ return /* @__PURE__ */ jsx(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
13
+ }
14
+ function SheetClose({
15
+ ...props
16
+ }) {
17
+ return /* @__PURE__ */ jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
18
+ }
19
+ function SheetPortal({
20
+ ...props
21
+ }) {
22
+ return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
23
+ }
24
+ function SheetOverlay({
25
+ className,
26
+ ...props
27
+ }) {
28
+ return /* @__PURE__ */ jsx(
29
+ SheetPrimitive.Overlay,
30
+ {
31
+ "data-slot": "sheet-overlay",
32
+ className: cn(
33
+ "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",
34
+ className
35
+ ),
36
+ ...props
37
+ }
38
+ );
39
+ }
40
+ function SheetContent({
41
+ className,
42
+ children,
43
+ side = "right",
44
+ ...props
45
+ }) {
46
+ return /* @__PURE__ */ jsxs(SheetPortal, { children: [
47
+ /* @__PURE__ */ jsx(SheetOverlay, {}),
48
+ /* @__PURE__ */ jsxs(
49
+ SheetPrimitive.Content,
50
+ {
51
+ "data-slot": "sheet-content",
52
+ className: cn(
53
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
54
+ side === "right" && "motion-safe:data-[state=closed]:slide-out-to-right motion-safe:data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
55
+ side === "left" && "motion-safe:data-[state=closed]:slide-out-to-left motion-safe:data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
56
+ side === "top" && "motion-safe:data-[state=closed]:slide-out-to-top motion-safe:data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
57
+ side === "bottom" && "motion-safe:data-[state=closed]:slide-out-to-bottom motion-safe:data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
58
+ className
59
+ ),
60
+ ...props,
61
+ children: [
62
+ children,
63
+ /* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary 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", children: [
64
+ /* @__PURE__ */ jsx(XIcon, { className: "size-4" }),
65
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
66
+ ] })
67
+ ]
68
+ }
69
+ )
70
+ ] });
71
+ }
72
+ function SheetHeader({ className, ...props }) {
73
+ return /* @__PURE__ */ jsx(
74
+ "div",
75
+ {
76
+ "data-slot": "sheet-header",
77
+ className: cn("flex flex-col gap-1.5 p-4", className),
78
+ ...props
79
+ }
80
+ );
81
+ }
82
+ function SheetFooter({ className, ...props }) {
83
+ return /* @__PURE__ */ jsx(
84
+ "div",
85
+ {
86
+ "data-slot": "sheet-footer",
87
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
88
+ ...props
89
+ }
90
+ );
91
+ }
92
+ function SheetTitle({
93
+ className,
94
+ ...props
95
+ }) {
96
+ return /* @__PURE__ */ jsx(
97
+ SheetPrimitive.Title,
98
+ {
99
+ "data-slot": "sheet-title",
100
+ className: cn("text-foreground font-semibold", className),
101
+ ...props
102
+ }
103
+ );
104
+ }
105
+ function SheetDescription({
106
+ className,
107
+ ...props
108
+ }) {
109
+ return /* @__PURE__ */ jsx(
110
+ SheetPrimitive.Description,
111
+ {
112
+ "data-slot": "sheet-description",
113
+ className: cn("text-muted-foreground text-sm", className),
114
+ ...props
115
+ }
116
+ );
117
+ }
118
+
119
+ export {
120
+ Sheet,
121
+ SheetTrigger,
122
+ SheetClose,
123
+ SheetContent,
124
+ SheetHeader,
125
+ SheetFooter,
126
+ SheetTitle,
127
+ SheetDescription
128
+ };
@@ -8,7 +8,7 @@ function Input({ className, type, ...props }) {
8
8
  type,
9
9
  "data-slot": "input",
10
10
  className: cn(
11
- "border-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
11
+ "border-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 flex h-[var(--input-height,2.25rem)] w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
12
12
  "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
13
13
  "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
14
14
  className
@@ -0,0 +1,57 @@
1
+ // src/components/tooltip/index.tsx
2
+ import { cn } from "@foundrykit/utils";
3
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ function TooltipProvider({
6
+ delayDuration = 0,
7
+ ...props
8
+ }) {
9
+ return /* @__PURE__ */ jsx(
10
+ TooltipPrimitive.Provider,
11
+ {
12
+ "data-slot": "tooltip-provider",
13
+ delayDuration,
14
+ ...props
15
+ }
16
+ );
17
+ }
18
+ function Tooltip({
19
+ ...props
20
+ }) {
21
+ return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
22
+ }
23
+ function TooltipTrigger({
24
+ ...props
25
+ }) {
26
+ return /* @__PURE__ */ jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
27
+ }
28
+ function TooltipContent({
29
+ className,
30
+ sideOffset = 0,
31
+ children,
32
+ ...props
33
+ }) {
34
+ return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
35
+ TooltipPrimitive.Content,
36
+ {
37
+ "data-slot": "tooltip-content",
38
+ sideOffset,
39
+ className: cn(
40
+ "bg-primary text-primary-foreground animate-in fade-in-0 motion-safe:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 motion-safe:data-[state=closed]:zoom-out-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 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
41
+ className
42
+ ),
43
+ ...props,
44
+ children: [
45
+ children,
46
+ /* @__PURE__ */ jsx(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
47
+ ]
48
+ }
49
+ ) });
50
+ }
51
+
52
+ export {
53
+ TooltipProvider,
54
+ Tooltip,
55
+ TooltipTrigger,
56
+ TooltipContent
57
+ };
@@ -0,0 +1,138 @@
1
+ // src/components/dialog/index.tsx
2
+ import { cn } from "@foundrykit/utils";
3
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
4
+ import { XIcon } from "lucide-react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ function Dialog({
7
+ ...props
8
+ }) {
9
+ return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
10
+ }
11
+ function DialogTrigger({
12
+ ...props
13
+ }) {
14
+ return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
15
+ }
16
+ function DialogPortal({
17
+ ...props
18
+ }) {
19
+ return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
20
+ }
21
+ function DialogClose({
22
+ ...props
23
+ }) {
24
+ return /* @__PURE__ */ jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
25
+ }
26
+ function DialogOverlay({
27
+ className,
28
+ ...props
29
+ }) {
30
+ return /* @__PURE__ */ jsx(
31
+ DialogPrimitive.Overlay,
32
+ {
33
+ "data-slot": "dialog-overlay",
34
+ className: cn(
35
+ "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",
36
+ className
37
+ ),
38
+ ...props
39
+ }
40
+ );
41
+ }
42
+ function DialogContent({
43
+ className,
44
+ children,
45
+ showCloseButton = true,
46
+ ...props
47
+ }) {
48
+ return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
49
+ /* @__PURE__ */ jsx(DialogOverlay, {}),
50
+ /* @__PURE__ */ jsxs(
51
+ DialogPrimitive.Content,
52
+ {
53
+ "data-slot": "dialog-content",
54
+ className: cn(
55
+ "bg-background 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 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",
56
+ className
57
+ ),
58
+ ...props,
59
+ children: [
60
+ children,
61
+ showCloseButton && /* @__PURE__ */ jsxs(
62
+ DialogPrimitive.Close,
63
+ {
64
+ "data-slot": "dialog-close",
65
+ 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",
66
+ children: [
67
+ /* @__PURE__ */ jsx(XIcon, {}),
68
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
69
+ ]
70
+ }
71
+ )
72
+ ]
73
+ }
74
+ )
75
+ ] });
76
+ }
77
+ function DialogHeader({ className, ...props }) {
78
+ return /* @__PURE__ */ jsx(
79
+ "div",
80
+ {
81
+ "data-slot": "dialog-header",
82
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
83
+ ...props
84
+ }
85
+ );
86
+ }
87
+ function DialogFooter({ className, ...props }) {
88
+ return /* @__PURE__ */ jsx(
89
+ "div",
90
+ {
91
+ "data-slot": "dialog-footer",
92
+ className: cn(
93
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
94
+ className
95
+ ),
96
+ ...props
97
+ }
98
+ );
99
+ }
100
+ function DialogTitle({
101
+ className,
102
+ ...props
103
+ }) {
104
+ return /* @__PURE__ */ jsx(
105
+ DialogPrimitive.Title,
106
+ {
107
+ "data-slot": "dialog-title",
108
+ className: cn("text-lg leading-none font-semibold", className),
109
+ ...props
110
+ }
111
+ );
112
+ }
113
+ function DialogDescription({
114
+ className,
115
+ ...props
116
+ }) {
117
+ return /* @__PURE__ */ jsx(
118
+ DialogPrimitive.Description,
119
+ {
120
+ "data-slot": "dialog-description",
121
+ className: cn("text-muted-foreground text-sm", className),
122
+ ...props
123
+ }
124
+ );
125
+ }
126
+
127
+ export {
128
+ Dialog,
129
+ DialogTrigger,
130
+ DialogPortal,
131
+ DialogClose,
132
+ DialogOverlay,
133
+ DialogContent,
134
+ DialogHeader,
135
+ DialogFooter,
136
+ DialogTitle,
137
+ DialogDescription
138
+ };
@@ -4,7 +4,7 @@ import { Slot } from "@radix-ui/react-slot";
4
4
  import { cva } from "class-variance-authority";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  var buttonVariants = cva(
7
- "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 shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all 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",
7
+ "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 shrink-0 items-center justify-center gap-2 rounded-[var(--button-radius,calc(var(--radius)-2px))] font-[var(--button-weight,500)] text-sm whitespace-nowrap [text-transform:var(--button-case,none)] transition-all outline-none focus-visible:ring-[3px] active:not-disabled:scale-[var(--motion-press-scale,0.97)] disabled:pointer-events-none disabled:opacity-50 motion-reduce:active:not-disabled:scale-100 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
8
8
  {
9
9
  variants: {
10
10
  variant: {
@@ -19,8 +19,8 @@ var buttonVariants = cva(
19
19
  },
20
20
  size: {
21
21
  default: "h-9 px-4 py-2 has-[>svg]:px-3",
22
- sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
23
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
22
+ sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
23
+ lg: "h-10 px-6 has-[>svg]:px-4",
24
24
  icon: "size-9"
25
25
  }
26
26
  },
@@ -0,0 +1,45 @@
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
+ };
@@ -0,0 +1,17 @@
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
+ };
@@ -29,7 +29,7 @@ var import_react_slot = require("@radix-ui/react-slot");
29
29
  var import_class_variance_authority = require("class-variance-authority");
30
30
  var import_jsx_runtime = require("react/jsx-runtime");
31
31
  var buttonVariants = (0, import_class_variance_authority.cva)(
32
- "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 shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all 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",
32
+ "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 shrink-0 items-center justify-center gap-2 rounded-[var(--button-radius,calc(var(--radius)-2px))] font-[var(--button-weight,500)] text-sm whitespace-nowrap [text-transform:var(--button-case,none)] transition-all outline-none focus-visible:ring-[3px] active:not-disabled:scale-[var(--motion-press-scale,0.97)] disabled:pointer-events-none disabled:opacity-50 motion-reduce:active:not-disabled:scale-100 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
33
33
  {
34
34
  variants: {
35
35
  variant: {
@@ -44,8 +44,8 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
44
44
  },
45
45
  size: {
46
46
  default: "h-9 px-4 py-2 has-[>svg]:px-3",
47
- sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
48
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
47
+ sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
48
+ lg: "h-10 px-6 has-[>svg]:px-4",
49
49
  icon: "size-9"
50
50
  }
51
51
  },
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Button,
3
3
  buttonVariants
4
- } from "../../chunk-46UI3AUE.js";
4
+ } from "../../chunk-SEDTBIZW.js";
5
5
  export {
6
6
  Button,
7
7
  buttonVariants
@@ -36,7 +36,7 @@ function Card({ className, ...props }) {
36
36
  {
37
37
  "data-slot": "card",
38
38
  className: (0, import_utils.cn)(
39
- "bg-card text-card-foreground rounded-xl border shadow",
39
+ "bg-card text-card-foreground rounded-[var(--card-radius,calc(var(--radius)+4px))] border shadow",
40
40
  className
41
41
  ),
42
42
  ...props
@@ -5,7 +5,7 @@ import {
5
5
  CardFooter,
6
6
  CardHeader,
7
7
  CardTitle
8
- } from "../../chunk-HS46TIMU.js";
8
+ } from "../../chunk-2UG6OCGA.js";
9
9
  export {
10
10
  Card,
11
11
  CardContent,
@@ -0,0 +1,182 @@
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+
31
+ // src/components/dialog/index.tsx
32
+ var dialog_exports = {};
33
+ __export(dialog_exports, {
34
+ Dialog: () => Dialog,
35
+ DialogClose: () => DialogClose,
36
+ DialogContent: () => DialogContent,
37
+ DialogDescription: () => DialogDescription,
38
+ DialogFooter: () => DialogFooter,
39
+ DialogHeader: () => DialogHeader,
40
+ DialogOverlay: () => DialogOverlay,
41
+ DialogPortal: () => DialogPortal,
42
+ DialogTitle: () => DialogTitle,
43
+ DialogTrigger: () => DialogTrigger
44
+ });
45
+ module.exports = __toCommonJS(dialog_exports);
46
+ var import_utils = require("@foundrykit/utils");
47
+ var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
48
+ var import_lucide_react = require("lucide-react");
49
+ var import_jsx_runtime = require("react/jsx-runtime");
50
+ function Dialog({
51
+ ...props
52
+ }) {
53
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
54
+ }
55
+ function DialogTrigger({
56
+ ...props
57
+ }) {
58
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
59
+ }
60
+ function DialogPortal({
61
+ ...props
62
+ }) {
63
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
64
+ }
65
+ function DialogClose({
66
+ ...props
67
+ }) {
68
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
69
+ }
70
+ function DialogOverlay({
71
+ className,
72
+ ...props
73
+ }) {
74
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
75
+ DialogPrimitive.Overlay,
76
+ {
77
+ "data-slot": "dialog-overlay",
78
+ className: (0, import_utils.cn)(
79
+ "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",
80
+ className
81
+ ),
82
+ ...props
83
+ }
84
+ );
85
+ }
86
+ function DialogContent({
87
+ className,
88
+ children,
89
+ showCloseButton = true,
90
+ ...props
91
+ }) {
92
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [
93
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogOverlay, {}),
94
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
95
+ DialogPrimitive.Content,
96
+ {
97
+ "data-slot": "dialog-content",
98
+ className: (0, import_utils.cn)(
99
+ "bg-background 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 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",
100
+ className
101
+ ),
102
+ ...props,
103
+ children: [
104
+ children,
105
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
106
+ DialogPrimitive.Close,
107
+ {
108
+ "data-slot": "dialog-close",
109
+ 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",
110
+ children: [
111
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.XIcon, {}),
112
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Close" })
113
+ ]
114
+ }
115
+ )
116
+ ]
117
+ }
118
+ )
119
+ ] });
120
+ }
121
+ function DialogHeader({ className, ...props }) {
122
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
123
+ "div",
124
+ {
125
+ "data-slot": "dialog-header",
126
+ className: (0, import_utils.cn)("flex flex-col gap-2 text-center sm:text-left", className),
127
+ ...props
128
+ }
129
+ );
130
+ }
131
+ function DialogFooter({ className, ...props }) {
132
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
133
+ "div",
134
+ {
135
+ "data-slot": "dialog-footer",
136
+ className: (0, import_utils.cn)(
137
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
138
+ className
139
+ ),
140
+ ...props
141
+ }
142
+ );
143
+ }
144
+ function DialogTitle({
145
+ className,
146
+ ...props
147
+ }) {
148
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
149
+ DialogPrimitive.Title,
150
+ {
151
+ "data-slot": "dialog-title",
152
+ className: (0, import_utils.cn)("text-lg leading-none font-semibold", className),
153
+ ...props
154
+ }
155
+ );
156
+ }
157
+ function DialogDescription({
158
+ className,
159
+ ...props
160
+ }) {
161
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
162
+ DialogPrimitive.Description,
163
+ {
164
+ "data-slot": "dialog-description",
165
+ className: (0, import_utils.cn)("text-muted-foreground text-sm", className),
166
+ ...props
167
+ }
168
+ );
169
+ }
170
+ // Annotate the CommonJS export names for ESM import in node:
171
+ 0 && (module.exports = {
172
+ Dialog,
173
+ DialogClose,
174
+ DialogContent,
175
+ DialogDescription,
176
+ DialogFooter,
177
+ DialogHeader,
178
+ DialogOverlay,
179
+ DialogPortal,
180
+ DialogTitle,
181
+ DialogTrigger
182
+ });