@foundrykit/primitives 2.1.3 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. package/README.md +11 -0
  2. package/dist/{chunk-SEDTBIZW.js → chunk-OMPTY5WQ.js} +1 -1
  3. package/dist/components/accordion/index.js +60 -6
  4. package/dist/components/alert/index.js +62 -6
  5. package/dist/components/alert-dialog/index.js +142 -13
  6. package/dist/components/aspect-ratio/index.js +9 -3
  7. package/dist/components/avatar/index.js +50 -5
  8. package/dist/components/badge/index.js +37 -4
  9. package/dist/components/breadcrumb/index.js +95 -9
  10. package/dist/components/button/index.js +1 -1
  11. package/dist/components/button-group/index.js +74 -6
  12. package/dist/components/card/index.js +66 -8
  13. package/dist/components/checkbox/index.js +30 -3
  14. package/dist/components/collapsible/index.js +33 -7
  15. package/dist/components/context-menu/index.js +208 -17
  16. package/dist/components/dialog/index.js +126 -12
  17. package/dist/components/direction/index.js +10 -2
  18. package/dist/components/drawer/index.js +118 -12
  19. package/dist/components/dropdown/index.js +216 -17
  20. package/dist/components/empty/index.js +95 -9
  21. package/dist/components/field/index.js +211 -13
  22. package/dist/components/hover-card/index.js +35 -5
  23. package/dist/components/input-group/index.d.ts +1 -1
  24. package/dist/components/input-group/index.js +1 -1
  25. package/dist/components/item/index.js +178 -14
  26. package/dist/components/kbd/index.js +27 -4
  27. package/dist/components/label/index.js +21 -3
  28. package/dist/components/menubar/index.js +235 -18
  29. package/dist/components/native-select/index.js +25 -3
  30. package/dist/components/navigation-menu/index.js +161 -11
  31. package/dist/components/popover/index.js +40 -6
  32. package/dist/components/progress/index.js +30 -3
  33. package/dist/components/radio-group/index.js +43 -4
  34. package/dist/components/resizable/index.js +43 -5
  35. package/dist/components/scroll-area/index.js +58 -4
  36. package/dist/components/section/index.js +13 -3
  37. package/dist/components/select/index.js +159 -12
  38. package/dist/components/sheet/index.js +118 -10
  39. package/dist/components/skeleton/index.js +13 -3
  40. package/dist/components/slider/index.js +64 -3
  41. package/dist/components/sonner/index.js +21 -4
  42. package/dist/components/spinner/index.js +19 -3
  43. package/dist/components/switch/index.js +30 -3
  44. package/dist/components/table/index.js +105 -10
  45. package/dist/components/tabs/index.js +63 -6
  46. package/dist/components/toggle/index.js +41 -4
  47. package/dist/components/toggle-group/index.js +80 -4
  48. package/dist/components/tooltip/index.js +51 -6
  49. package/dist/components/typography/index.js +147 -14
  50. package/dist/index.d.ts +1 -0
  51. package/dist/index.js +221 -254
  52. package/package.json +3 -3
  53. package/dist/chunk-25N35Z5M.js +0 -42
  54. package/dist/chunk-2JOT4DV4.js +0 -66
  55. package/dist/chunk-2SBGU5XA.js +0 -233
  56. package/dist/chunk-2UG6OCGA.js +0 -75
  57. package/dist/chunk-3BAO7TAS.js +0 -105
  58. package/dist/chunk-3NQR7JZR.js +0 -128
  59. package/dist/chunk-3QUMCM5K.js +0 -225
  60. package/dist/chunk-3TZXV53R.js +0 -55
  61. package/dist/chunk-3UKWAM5M.js +0 -33
  62. package/dist/chunk-44I6VK3H.js +0 -105
  63. package/dist/chunk-67UXTT4O.js +0 -116
  64. package/dist/chunk-727ACUWN.js +0 -82
  65. package/dist/chunk-76APYFRN.js +0 -29
  66. package/dist/chunk-AJAAMJYH.js +0 -12
  67. package/dist/chunk-B5YCE3UP.js +0 -57
  68. package/dist/chunk-BIFBYERK.js +0 -69
  69. package/dist/chunk-DXZ4GUQO.js +0 -33
  70. package/dist/chunk-ED6T7ZZN.js +0 -130
  71. package/dist/chunk-EEAK2RWF.js +0 -23
  72. package/dist/chunk-F2TEA6ER.js +0 -138
  73. package/dist/chunk-FF5D53KL.js +0 -69
  74. package/dist/chunk-FRIOQFPE.js +0 -171
  75. package/dist/chunk-G2YBCHWR.js +0 -46
  76. package/dist/chunk-GKCBSG2W.js +0 -67
  77. package/dist/chunk-GPEL656S.js +0 -84
  78. package/dist/chunk-JKKCRFYB.js +0 -36
  79. package/dist/chunk-JTSIBZS4.js +0 -194
  80. package/dist/chunk-MCXSVXO4.js +0 -24
  81. package/dist/chunk-MMZJQ7RW.js +0 -33
  82. package/dist/chunk-MYIUX3DT.js +0 -62
  83. package/dist/chunk-P5KEJOBH.js +0 -155
  84. package/dist/chunk-PAO3DSEF.js +0 -48
  85. package/dist/chunk-PLLG76QJ.js +0 -32
  86. package/dist/chunk-SDYKJVXX.js +0 -253
  87. package/dist/chunk-SIQHWNPH.js +0 -45
  88. package/dist/chunk-SKR3J46C.js +0 -17
  89. package/dist/chunk-STRBREHN.js +0 -17
  90. package/dist/chunk-SUEPE6OX.js +0 -47
  91. package/dist/chunk-TA23RNS4.js +0 -162
  92. package/dist/chunk-TRXU4SOJ.js +0 -224
  93. package/dist/chunk-U7JIOR7A.js +0 -172
  94. package/dist/chunk-VPBVKBZ7.js +0 -25
  95. package/dist/chunk-W4XY3SNY.js +0 -40
  96. package/dist/chunk-YT2ZIMZI.js +0 -16
  97. package/dist/components/accordion/index.cjs +0 -104
  98. package/dist/components/accordion/index.d.cts +0 -25
  99. package/dist/components/alert/index.cjs +0 -96
  100. package/dist/components/alert/index.d.cts +0 -28
  101. package/dist/components/alert-dialog/index.cjs +0 -200
  102. package/dist/components/alert-dialog/index.d.cts +0 -42
  103. package/dist/components/aspect-ratio/index.cjs +0 -47
  104. package/dist/components/aspect-ratio/index.d.cts +0 -19
  105. package/dist/components/avatar/index.cjs +0 -92
  106. package/dist/components/avatar/index.d.cts +0 -24
  107. package/dist/components/badge/index.cjs +0 -67
  108. package/dist/components/badge/index.d.cts +0 -24
  109. package/dist/components/breadcrumb/index.cjs +0 -135
  110. package/dist/components/breadcrumb/index.d.cts +0 -33
  111. package/dist/components/button/index.cjs +0 -87
  112. package/dist/components/button/index.d.cts +0 -28
  113. package/dist/components/button-group/index.cjs +0 -142
  114. package/dist/components/button-group/index.d.cts +0 -33
  115. package/dist/components/card/index.cjs +0 -104
  116. package/dist/components/card/index.d.cts +0 -27
  117. package/dist/components/checkbox/index.cjs +0 -68
  118. package/dist/components/checkbox/index.d.cts +0 -17
  119. package/dist/components/collapsible/index.cjs +0 -73
  120. package/dist/components/collapsible/index.d.cts +0 -22
  121. package/dist/components/context-menu/index.cjs +0 -274
  122. package/dist/components/context-menu/index.d.cts +0 -48
  123. package/dist/components/dialog/index.cjs +0 -182
  124. package/dist/components/dialog/index.d.cts +0 -38
  125. package/dist/components/direction/index.cjs +0 -39
  126. package/dist/components/direction/index.d.cts +0 -20
  127. package/dist/components/drawer/index.cjs +0 -164
  128. package/dist/components/drawer/index.d.cts +0 -35
  129. package/dist/components/dropdown/index.cjs +0 -282
  130. package/dist/components/dropdown/index.d.cts +0 -52
  131. package/dist/components/empty/index.cjs +0 -135
  132. package/dist/components/empty/index.d.cts +0 -38
  133. package/dist/components/field/index.cjs +0 -269
  134. package/dist/components/field/index.d.cts +0 -42
  135. package/dist/components/hover-card/index.cjs +0 -77
  136. package/dist/components/hover-card/index.d.cts +0 -22
  137. package/dist/components/input/index.cjs +0 -47
  138. package/dist/components/input/index.d.cts +0 -17
  139. package/dist/components/input-group/index.cjs +0 -270
  140. package/dist/components/input-group/index.d.cts +0 -44
  141. package/dist/components/item/index.cjs +0 -262
  142. package/dist/components/item/index.d.cts +0 -47
  143. package/dist/components/kbd/index.cjs +0 -57
  144. package/dist/components/kbd/index.d.cts +0 -19
  145. package/dist/components/label/index.cjs +0 -59
  146. package/dist/components/label/index.d.cts +0 -16
  147. package/dist/components/menubar/index.cjs +0 -303
  148. package/dist/components/menubar/index.d.cts +0 -49
  149. package/dist/components/native-select/index.cjs +0 -53
  150. package/dist/components/native-select/index.d.cts +0 -19
  151. package/dist/components/navigation-menu/index.cjs +0 -215
  152. package/dist/components/navigation-menu/index.d.cts +0 -37
  153. package/dist/components/popover/index.cjs +0 -84
  154. package/dist/components/popover/index.d.cts +0 -23
  155. package/dist/components/progress/index.cjs +0 -68
  156. package/dist/components/progress/index.d.cts +0 -16
  157. package/dist/components/radio-group/index.cjs +0 -83
  158. package/dist/components/radio-group/index.d.cts +0 -22
  159. package/dist/components/resizable/index.cjs +0 -75
  160. package/dist/components/resizable/index.d.cts +0 -25
  161. package/dist/components/scroll-area/index.cjs +0 -98
  162. package/dist/components/scroll-area/index.d.cts +0 -21
  163. package/dist/components/section/index.cjs +0 -41
  164. package/dist/components/section/index.d.cts +0 -27
  165. package/dist/components/select/index.cjs +0 -215
  166. package/dist/components/select/index.d.cts +0 -36
  167. package/dist/components/separator/index.cjs +0 -63
  168. package/dist/components/separator/index.d.cts +0 -18
  169. package/dist/components/sheet/index.cjs +0 -170
  170. package/dist/components/sheet/index.d.cts +0 -31
  171. package/dist/components/skeleton/index.cjs +0 -41
  172. package/dist/components/skeleton/index.d.cts +0 -14
  173. package/dist/components/slider/index.cjs +0 -102
  174. package/dist/components/slider/index.d.cts +0 -19
  175. package/dist/components/sonner/index.cjs +0 -51
  176. package/dist/components/sonner/index.d.cts +0 -18
  177. package/dist/components/spinner/index.cjs +0 -47
  178. package/dist/components/spinner/index.d.cts +0 -17
  179. package/dist/components/switch/index.cjs +0 -68
  180. package/dist/components/switch/index.d.cts +0 -17
  181. package/dist/components/table/index.cjs +0 -147
  182. package/dist/components/table/index.d.cts +0 -35
  183. package/dist/components/tabs/index.cjs +0 -107
  184. package/dist/components/tabs/index.d.cts +0 -27
  185. package/dist/components/textarea/index.cjs +0 -44
  186. package/dist/components/textarea/index.d.cts +0 -15
  187. package/dist/components/toggle/index.cjs +0 -81
  188. package/dist/components/toggle/index.d.cts +0 -26
  189. package/dist/components/toggle-group/index.cjs +0 -120
  190. package/dist/components/toggle-group/index.d.cts +0 -27
  191. package/dist/components/tooltip/index.cjs +0 -95
  192. package/dist/components/tooltip/index.d.cts +0 -25
  193. package/dist/components/typography/index.cjs +0 -197
  194. package/dist/components/typography/index.d.cts +0 -28
  195. package/dist/index.cjs +0 -4094
  196. package/dist/index.d.cts +0 -83
package/README.md CHANGED
@@ -55,11 +55,22 @@ import {
55
55
  `ScrollArea`
56
56
  - **Overlays:** `Dialog`, `Sheet`, `Popover`, `Tooltip`, `DropdownMenu`
57
57
  - **Display:** `Avatar`, `Skeleton`
58
+ - **Plus:** `InputGroup`, `Field`, `Item`, `Empty`, `Kbd`, `Spinner`, `Section`,
59
+ `Typography`, `Table`, `Drawer`, `Menubar`, `NavigationMenu`, `Resizable`,
60
+ `Sonner` and more; see `src/index.ts`
58
61
 
59
62
  `cn` (class merge helper) is re-exported for convenience. Every component and its
60
63
  sub-parts are exported from the package root; individual modules are also
61
64
  available via the `./components/*` subpath export.
62
65
 
66
+ ## Layering and the server/client boundary
67
+
68
+ Primitives are the lowest UI layer: each one is a single accessible control or surface (a thin Radix wrapper plus variants) with no data, app state or copy. Compositions with behaviour belong in `@foundrykit/components`, and CMS-aware page sections in `@foundrykit/blocks`. Style only through the semantic tokens in `@foundrykit/tailwind` (no raw palette classes or hex values), so a client brand file restyles everything.
69
+
70
+ The package root has no `'use client'` directive. Each component keeps its own, so server-safe parts (Section, Card, Typography, Table, Button, …) render as Server Components, and interactive parts are client references. `scripts/check-directives.mjs` runs after every build and fails if that boundary breaks. See the Hub docs, Primitives > Integration, for the full layering guide.
71
+
72
+ Registry metadata (name, variants, preview, `code:` example strings) for the Hub and CLI lives in `src/components/<name>/registry.ts`. The `code:` strings are hand-written and can drift from the Storybook stories, so update both together.
73
+
63
74
  ## Documentation
64
75
 
65
76
  Explore every component, variant, and state live in Storybook:
@@ -9,7 +9,7 @@ var buttonVariants = cva(
9
9
  variants: {
10
10
  variant: {
11
11
  default: "bg-primary text-primary-foreground hover:bg-primary/90 shadow-xs",
12
- destructive: "bg-destructive hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white shadow-xs",
12
+ destructive: "bg-destructive hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-destructive-foreground shadow-xs",
13
13
  outline: "bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border shadow-xs",
14
14
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-xs",
15
15
  ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
@@ -1,10 +1,64 @@
1
1
  "use client";
2
- import {
3
- Accordion,
4
- AccordionContent,
5
- AccordionItem,
6
- AccordionTrigger
7
- } from "../../chunk-2JOT4DV4.js";
2
+
3
+ // src/components/accordion/index.tsx
4
+ import { cn } from "@foundrykit/utils";
5
+ import * as AccordionPrimitive from "@radix-ui/react-accordion";
6
+ import { ChevronDownIcon } from "lucide-react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ function Accordion({
9
+ ...props
10
+ }) {
11
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
12
+ }
13
+ function AccordionItem({
14
+ className,
15
+ ...props
16
+ }) {
17
+ return /* @__PURE__ */ jsx(
18
+ AccordionPrimitive.Item,
19
+ {
20
+ "data-slot": "accordion-item",
21
+ className: cn("border-b last:border-b-0", className),
22
+ ...props
23
+ }
24
+ );
25
+ }
26
+ function AccordionTrigger({
27
+ className,
28
+ children,
29
+ ...props
30
+ }) {
31
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
32
+ AccordionPrimitive.Trigger,
33
+ {
34
+ "data-slot": "accordion-trigger",
35
+ className: cn(
36
+ "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
37
+ className
38
+ ),
39
+ ...props,
40
+ children: [
41
+ children,
42
+ /* @__PURE__ */ jsx(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
43
+ ]
44
+ }
45
+ ) });
46
+ }
47
+ function AccordionContent({
48
+ className,
49
+ children,
50
+ ...props
51
+ }) {
52
+ return /* @__PURE__ */ jsx(
53
+ AccordionPrimitive.Content,
54
+ {
55
+ "data-slot": "accordion-content",
56
+ className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
57
+ ...props,
58
+ children: /* @__PURE__ */ jsx("div", { className: cn("pt-0 pb-4", className), children })
59
+ }
60
+ );
61
+ }
8
62
  export {
9
63
  Accordion,
10
64
  AccordionContent,
@@ -1,9 +1,65 @@
1
- import {
2
- Alert,
3
- AlertDescription,
4
- AlertTitle,
5
- alertVariants
6
- } from "../../chunk-BIFBYERK.js";
1
+ // src/components/alert/index.tsx
2
+ import { cn } from "@foundrykit/utils";
3
+ import { cva } from "class-variance-authority";
4
+ import { jsx } from "react/jsx-runtime";
5
+ var alertVariants = cva(
6
+ "relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
7
+ {
8
+ variants: {
9
+ variant: {
10
+ default: "bg-background text-foreground",
11
+ destructive: "text-destructive bg-background *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current"
12
+ }
13
+ },
14
+ defaultVariants: {
15
+ variant: "default"
16
+ }
17
+ }
18
+ );
19
+ function Alert({
20
+ className,
21
+ variant,
22
+ ...props
23
+ }) {
24
+ return /* @__PURE__ */ jsx(
25
+ "div",
26
+ {
27
+ "data-slot": "alert",
28
+ role: "alert",
29
+ className: cn(alertVariants({ variant }), className),
30
+ ...props
31
+ }
32
+ );
33
+ }
34
+ function AlertTitle({ className, ...props }) {
35
+ return /* @__PURE__ */ jsx(
36
+ "div",
37
+ {
38
+ "data-slot": "alert-title",
39
+ className: cn(
40
+ "col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
41
+ className
42
+ ),
43
+ ...props
44
+ }
45
+ );
46
+ }
47
+ function AlertDescription({
48
+ className,
49
+ ...props
50
+ }) {
51
+ return /* @__PURE__ */ jsx(
52
+ "div",
53
+ {
54
+ "data-slot": "alert-description",
55
+ className: cn(
56
+ "text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
57
+ className
58
+ ),
59
+ ...props
60
+ }
61
+ );
62
+ }
7
63
  export {
8
64
  Alert,
9
65
  AlertDescription,
@@ -1,17 +1,146 @@
1
1
  "use client";
2
- import {
3
- AlertDialog,
4
- AlertDialogAction,
5
- AlertDialogCancel,
6
- AlertDialogContent,
7
- AlertDialogDescription,
8
- AlertDialogFooter,
9
- AlertDialogHeader,
10
- AlertDialogOverlay,
11
- AlertDialogPortal,
12
- AlertDialogTitle,
13
- AlertDialogTrigger
14
- } from "../../chunk-P5KEJOBH.js";
2
+
3
+ // src/components/alert-dialog/index.tsx
4
+ import { cn } from "@foundrykit/utils";
5
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ function AlertDialog({
8
+ ...props
9
+ }) {
10
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
11
+ }
12
+ function AlertDialogTrigger({
13
+ ...props
14
+ }) {
15
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
16
+ }
17
+ function AlertDialogPortal({
18
+ ...props
19
+ }) {
20
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props });
21
+ }
22
+ function AlertDialogOverlay({
23
+ className,
24
+ ...props
25
+ }) {
26
+ return /* @__PURE__ */ jsx(
27
+ AlertDialogPrimitive.Overlay,
28
+ {
29
+ "data-slot": "alert-dialog-overlay",
30
+ className: cn(
31
+ "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",
32
+ className
33
+ ),
34
+ ...props
35
+ }
36
+ );
37
+ }
38
+ function AlertDialogContent({
39
+ className,
40
+ ...props
41
+ }) {
42
+ return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
43
+ /* @__PURE__ */ jsx(AlertDialogOverlay, {}),
44
+ /* @__PURE__ */ jsx(
45
+ AlertDialogPrimitive.Content,
46
+ {
47
+ "data-slot": "alert-dialog-content",
48
+ className: cn(
49
+ "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-97 motion-safe:data-[state=open]:zoom-in-97 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",
50
+ className
51
+ ),
52
+ ...props
53
+ }
54
+ )
55
+ ] });
56
+ }
57
+ function AlertDialogHeader({
58
+ className,
59
+ ...props
60
+ }) {
61
+ return /* @__PURE__ */ jsx(
62
+ "div",
63
+ {
64
+ "data-slot": "alert-dialog-header",
65
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
66
+ ...props
67
+ }
68
+ );
69
+ }
70
+ function AlertDialogFooter({
71
+ className,
72
+ ...props
73
+ }) {
74
+ return /* @__PURE__ */ jsx(
75
+ "div",
76
+ {
77
+ "data-slot": "alert-dialog-footer",
78
+ className: cn(
79
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
80
+ className
81
+ ),
82
+ ...props
83
+ }
84
+ );
85
+ }
86
+ function AlertDialogTitle({
87
+ className,
88
+ ...props
89
+ }) {
90
+ return /* @__PURE__ */ jsx(
91
+ AlertDialogPrimitive.Title,
92
+ {
93
+ "data-slot": "alert-dialog-title",
94
+ className: cn("text-lg font-semibold", className),
95
+ ...props
96
+ }
97
+ );
98
+ }
99
+ function AlertDialogDescription({
100
+ className,
101
+ ...props
102
+ }) {
103
+ return /* @__PURE__ */ jsx(
104
+ AlertDialogPrimitive.Description,
105
+ {
106
+ "data-slot": "alert-dialog-description",
107
+ className: cn("text-muted-foreground text-sm", className),
108
+ ...props
109
+ }
110
+ );
111
+ }
112
+ function AlertDialogAction({
113
+ className,
114
+ ...props
115
+ }) {
116
+ return /* @__PURE__ */ jsx(
117
+ AlertDialogPrimitive.Action,
118
+ {
119
+ "data-slot": "alert-dialog-action",
120
+ className: cn(
121
+ "bg-primary text-primary-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 hover:bg-primary/90 inline-flex h-9 shrink-0 items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium whitespace-nowrap shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 has-[>svg]:px-3 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
122
+ className
123
+ ),
124
+ ...props
125
+ }
126
+ );
127
+ }
128
+ function AlertDialogCancel({
129
+ className,
130
+ ...props
131
+ }) {
132
+ return /* @__PURE__ */ jsx(
133
+ AlertDialogPrimitive.Cancel,
134
+ {
135
+ "data-slot": "alert-dialog-cancel",
136
+ className: cn(
137
+ "bg-background 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:border-input dark:hover:bg-input/50 hover:bg-accent hover:text-accent-foreground inline-flex h-9 shrink-0 items-center justify-center gap-2 rounded-md border px-4 py-2 text-sm font-medium whitespace-nowrap shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 has-[>svg]:px-3 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
138
+ className
139
+ ),
140
+ ...props
141
+ }
142
+ );
143
+ }
15
144
  export {
16
145
  AlertDialog,
17
146
  AlertDialogAction,
@@ -1,7 +1,13 @@
1
1
  "use client";
2
- import {
3
- AspectRatio
4
- } from "../../chunk-AJAAMJYH.js";
2
+
3
+ // src/components/aspect-ratio/index.tsx
4
+ import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
5
+ import { jsx } from "react/jsx-runtime";
6
+ function AspectRatio({
7
+ ...props
8
+ }) {
9
+ return /* @__PURE__ */ jsx(AspectRatioPrimitive.Root, { "data-slot": "aspect-ratio", ...props });
10
+ }
5
11
  export {
6
12
  AspectRatio
7
13
  };
@@ -1,9 +1,54 @@
1
1
  "use client";
2
- import {
3
- Avatar,
4
- AvatarFallback,
5
- AvatarImage
6
- } from "../../chunk-3TZXV53R.js";
2
+
3
+ // src/components/avatar/index.tsx
4
+ import { cn } from "@foundrykit/utils";
5
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
6
+ import { jsx } from "react/jsx-runtime";
7
+ function Avatar({
8
+ className,
9
+ ...props
10
+ }) {
11
+ return /* @__PURE__ */ jsx(
12
+ AvatarPrimitive.Root,
13
+ {
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
+ function AvatarImage({
24
+ className,
25
+ ...props
26
+ }) {
27
+ return /* @__PURE__ */ jsx(
28
+ AvatarPrimitive.Image,
29
+ {
30
+ "data-slot": "avatar-image",
31
+ className: cn("aspect-square size-full", className),
32
+ ...props
33
+ }
34
+ );
35
+ }
36
+ function AvatarFallback({
37
+ className,
38
+ ...props
39
+ }) {
40
+ return /* @__PURE__ */ jsx(
41
+ AvatarPrimitive.Fallback,
42
+ {
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
+ }
7
52
  export {
8
53
  Avatar,
9
54
  AvatarFallback,
@@ -1,7 +1,40 @@
1
- import {
2
- Badge,
3
- badgeVariants
4
- } from "../../chunk-25N35Z5M.js";
1
+ // src/components/badge/index.tsx
2
+ import { cn } from "@foundrykit/utils";
3
+ import { Slot } from "@radix-ui/react-slot";
4
+ import { cva } from "class-variance-authority";
5
+ import { jsx } from "react/jsx-runtime";
6
+ var badgeVariants = 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 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-md border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent",
12
+ secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent",
13
+ destructive: "bg-destructive [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-destructive-foreground border-transparent",
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
+ }
5
38
  export {
6
39
  Badge,
7
40
  badgeVariants
@@ -1,12 +1,98 @@
1
- import {
2
- Breadcrumb,
3
- BreadcrumbEllipsis,
4
- BreadcrumbItem,
5
- BreadcrumbLink,
6
- BreadcrumbList,
7
- BreadcrumbPage,
8
- BreadcrumbSeparator
9
- } from "../../chunk-3BAO7TAS.js";
1
+ // src/components/breadcrumb/index.tsx
2
+ import { cn } from "@foundrykit/utils";
3
+ import { Slot } from "@radix-ui/react-slot";
4
+ import { ChevronRight, MoreHorizontal } from "lucide-react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ function Breadcrumb({ ...props }) {
7
+ return /* @__PURE__ */ jsx("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
8
+ }
9
+ function BreadcrumbList({ className, ...props }) {
10
+ return /* @__PURE__ */ jsx(
11
+ "ol",
12
+ {
13
+ "data-slot": "breadcrumb-list",
14
+ className: cn(
15
+ "text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
16
+ className
17
+ ),
18
+ ...props
19
+ }
20
+ );
21
+ }
22
+ function BreadcrumbItem({ className, ...props }) {
23
+ return /* @__PURE__ */ jsx(
24
+ "li",
25
+ {
26
+ "data-slot": "breadcrumb-item",
27
+ className: cn("inline-flex items-center gap-1.5", className),
28
+ ...props
29
+ }
30
+ );
31
+ }
32
+ function BreadcrumbLink({
33
+ asChild,
34
+ className,
35
+ ...props
36
+ }) {
37
+ const Comp = asChild ? Slot : "a";
38
+ return /* @__PURE__ */ jsx(
39
+ Comp,
40
+ {
41
+ "data-slot": "breadcrumb-link",
42
+ className: cn("hover:text-foreground transition-colors", className),
43
+ ...props
44
+ }
45
+ );
46
+ }
47
+ function BreadcrumbPage({ className, ...props }) {
48
+ return /* @__PURE__ */ jsx(
49
+ "span",
50
+ {
51
+ "data-slot": "breadcrumb-page",
52
+ role: "link",
53
+ "aria-disabled": "true",
54
+ "aria-current": "page",
55
+ className: cn("text-foreground font-normal", className),
56
+ ...props
57
+ }
58
+ );
59
+ }
60
+ function BreadcrumbSeparator({
61
+ children,
62
+ className,
63
+ ...props
64
+ }) {
65
+ return /* @__PURE__ */ jsx(
66
+ "li",
67
+ {
68
+ "data-slot": "breadcrumb-separator",
69
+ role: "presentation",
70
+ "aria-hidden": "true",
71
+ className: cn("[&>svg]:size-3.5", className),
72
+ ...props,
73
+ children: children ?? /* @__PURE__ */ jsx(ChevronRight, {})
74
+ }
75
+ );
76
+ }
77
+ function BreadcrumbEllipsis({
78
+ className,
79
+ ...props
80
+ }) {
81
+ return /* @__PURE__ */ jsxs(
82
+ "span",
83
+ {
84
+ "data-slot": "breadcrumb-ellipsis",
85
+ role: "presentation",
86
+ "aria-hidden": "true",
87
+ className: cn("flex size-9 items-center justify-center", className),
88
+ ...props,
89
+ children: [
90
+ /* @__PURE__ */ jsx(MoreHorizontal, { className: "size-4" }),
91
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "More" })
92
+ ]
93
+ }
94
+ );
95
+ }
10
96
  export {
11
97
  Breadcrumb,
12
98
  BreadcrumbEllipsis,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Button,
3
3
  buttonVariants
4
- } from "../../chunk-SEDTBIZW.js";
4
+ } from "../../chunk-OMPTY5WQ.js";
5
5
  export {
6
6
  Button,
7
7
  buttonVariants
@@ -1,10 +1,78 @@
1
1
  import {
2
- ButtonGroup,
3
- ButtonGroupSeparator,
4
- ButtonGroupText,
5
- buttonGroupVariants
6
- } from "../../chunk-727ACUWN.js";
7
- import "../../chunk-6DRII3XC.js";
2
+ Separator
3
+ } from "../../chunk-6DRII3XC.js";
4
+
5
+ // src/components/button-group/index.tsx
6
+ import { cn } from "@foundrykit/utils";
7
+ import { Slot } from "@radix-ui/react-slot";
8
+ import { cva } from "class-variance-authority";
9
+ import { jsx } from "react/jsx-runtime";
10
+ var buttonGroupVariants = cva(
11
+ "flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
12
+ {
13
+ variants: {
14
+ orientation: {
15
+ horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
16
+ vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
17
+ }
18
+ },
19
+ defaultVariants: {
20
+ orientation: "horizontal"
21
+ }
22
+ }
23
+ );
24
+ function ButtonGroup({
25
+ className,
26
+ orientation,
27
+ ...props
28
+ }) {
29
+ return /* @__PURE__ */ jsx(
30
+ "div",
31
+ {
32
+ "data-slot": "button-group",
33
+ "data-orientation": orientation,
34
+ role: "group",
35
+ className: cn(buttonGroupVariants({ orientation }), className),
36
+ ...props
37
+ }
38
+ );
39
+ }
40
+ function ButtonGroupText({
41
+ className,
42
+ asChild = false,
43
+ ...props
44
+ }) {
45
+ const Comp = asChild ? Slot : "div";
46
+ return /* @__PURE__ */ jsx(
47
+ Comp,
48
+ {
49
+ "data-slot": "button-group-text",
50
+ className: cn(
51
+ "bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
52
+ className
53
+ ),
54
+ ...props
55
+ }
56
+ );
57
+ }
58
+ function ButtonGroupSeparator({
59
+ className,
60
+ orientation = "vertical",
61
+ ...props
62
+ }) {
63
+ return /* @__PURE__ */ jsx(
64
+ Separator,
65
+ {
66
+ "data-slot": "button-group-separator",
67
+ orientation,
68
+ className: cn(
69
+ "bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto",
70
+ className
71
+ ),
72
+ ...props
73
+ }
74
+ );
75
+ }
8
76
  export {
9
77
  ButtonGroup,
10
78
  ButtonGroupSeparator,