@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,24 @@
1
+ // src/components/label/index.tsx
2
+ import * as LabelPrimitive from "@radix-ui/react-label";
3
+ import { cn } from "@foundrykit/utils";
4
+ import { jsx } from "react/jsx-runtime";
5
+ function Label({
6
+ className,
7
+ ...props
8
+ }) {
9
+ return /* @__PURE__ */ jsx(
10
+ LabelPrimitive.Root,
11
+ {
12
+ "data-slot": "label",
13
+ className: cn(
14
+ "flex select-none items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50",
15
+ className
16
+ ),
17
+ ...props
18
+ }
19
+ );
20
+ }
21
+
22
+ export {
23
+ Label
24
+ };
@@ -0,0 +1,17 @@
1
+ // src/components/skeleton/index.tsx
2
+ import { cn } from "@foundrykit/utils";
3
+ import { jsx } from "react/jsx-runtime";
4
+ function Skeleton({ className, ...props }) {
5
+ return /* @__PURE__ */ jsx(
6
+ "div",
7
+ {
8
+ "data-slot": "skeleton",
9
+ className: cn("bg-accent animate-pulse rounded-md", className),
10
+ ...props
11
+ }
12
+ );
13
+ }
14
+
15
+ export {
16
+ Skeleton
17
+ };
@@ -0,0 +1,33 @@
1
+ // src/components/switch/index.tsx
2
+ import * as SwitchPrimitive from "@radix-ui/react-switch";
3
+ import { cn } from "@foundrykit/utils";
4
+ import { jsx } from "react/jsx-runtime";
5
+ function Switch({
6
+ className,
7
+ ...props
8
+ }) {
9
+ return /* @__PURE__ */ jsx(
10
+ SwitchPrimitive.Root,
11
+ {
12
+ "data-slot": "switch",
13
+ className: cn(
14
+ "data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 shadow-xs peer inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent outline-none transition-all focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
15
+ className
16
+ ),
17
+ ...props,
18
+ children: /* @__PURE__ */ jsx(
19
+ SwitchPrimitive.Thumb,
20
+ {
21
+ "data-slot": "switch-thumb",
22
+ className: cn(
23
+ "bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
24
+ )
25
+ }
26
+ )
27
+ }
28
+ );
29
+ }
30
+
31
+ export {
32
+ Switch
33
+ };
@@ -0,0 +1,63 @@
1
+ // src/components/card/index.tsx
2
+ import * as React from "react";
3
+ import { cn } from "@foundrykit/utils";
4
+ import { jsx } from "react/jsx-runtime";
5
+ var Card = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6
+ "div",
7
+ {
8
+ ref,
9
+ className: cn(
10
+ "bg-card text-card-foreground rounded-xl border shadow",
11
+ className
12
+ ),
13
+ ...props
14
+ }
15
+ ));
16
+ Card.displayName = "Card";
17
+ var CardHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
18
+ "div",
19
+ {
20
+ ref,
21
+ className: cn("flex flex-col space-y-1.5 p-6", className),
22
+ ...props
23
+ }
24
+ ));
25
+ CardHeader.displayName = "CardHeader";
26
+ var CardTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
27
+ "h3",
28
+ {
29
+ ref,
30
+ className: cn("font-semibold leading-none tracking-tight", className),
31
+ ...props
32
+ }
33
+ ));
34
+ CardTitle.displayName = "CardTitle";
35
+ var CardDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
36
+ "p",
37
+ {
38
+ ref,
39
+ className: cn("text-muted-foreground text-sm", className),
40
+ ...props
41
+ }
42
+ ));
43
+ CardDescription.displayName = "CardDescription";
44
+ var CardContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
45
+ CardContent.displayName = "CardContent";
46
+ var CardFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
47
+ "div",
48
+ {
49
+ ref,
50
+ className: cn("flex items-center p-6 pt-0", className),
51
+ ...props
52
+ }
53
+ ));
54
+ CardFooter.displayName = "CardFooter";
55
+
56
+ export {
57
+ Card,
58
+ CardHeader,
59
+ CardTitle,
60
+ CardDescription,
61
+ CardContent,
62
+ CardFooter
63
+ };
@@ -0,0 +1,105 @@
1
+ // src/components/breadcrumb/index.tsx
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import { ChevronRight, MoreHorizontal } from "lucide-react";
4
+ import { cn } from "@foundrykit/utils";
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 break-words text-sm 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
+ }
96
+
97
+ export {
98
+ Breadcrumb,
99
+ BreadcrumbList,
100
+ BreadcrumbItem,
101
+ BreadcrumbLink,
102
+ BreadcrumbPage,
103
+ BreadcrumbSeparator,
104
+ BreadcrumbEllipsis
105
+ };
@@ -0,0 +1,55 @@
1
+ // src/components/avatar/index.tsx
2
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
3
+ import { cn } from "@foundrykit/utils";
4
+ import { jsx } from "react/jsx-runtime";
5
+ function Avatar({
6
+ className,
7
+ ...props
8
+ }) {
9
+ return /* @__PURE__ */ jsx(
10
+ AvatarPrimitive.Root,
11
+ {
12
+ "data-slot": "avatar",
13
+ className: cn(
14
+ "relative flex size-8 shrink-0 overflow-hidden rounded-full",
15
+ className
16
+ ),
17
+ ...props
18
+ }
19
+ );
20
+ }
21
+ function AvatarImage({
22
+ className,
23
+ ...props
24
+ }) {
25
+ return /* @__PURE__ */ jsx(
26
+ AvatarPrimitive.Image,
27
+ {
28
+ "data-slot": "avatar-image",
29
+ className: cn("aspect-square size-full", className),
30
+ ...props
31
+ }
32
+ );
33
+ }
34
+ function AvatarFallback({
35
+ className,
36
+ ...props
37
+ }) {
38
+ return /* @__PURE__ */ jsx(
39
+ AvatarPrimitive.Fallback,
40
+ {
41
+ "data-slot": "avatar-fallback",
42
+ className: cn(
43
+ "bg-muted flex size-full items-center justify-center rounded-full",
44
+ className
45
+ ),
46
+ ...props
47
+ }
48
+ );
49
+ }
50
+
51
+ export {
52
+ Avatar,
53
+ AvatarImage,
54
+ AvatarFallback
55
+ };
@@ -0,0 +1,47 @@
1
+ // src/components/radio-group/index.tsx
2
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
3
+ import { CircleIcon } from "lucide-react";
4
+ import { cn } from "@foundrykit/utils";
5
+ import { jsx } from "react/jsx-runtime";
6
+ function RadioGroup({
7
+ className,
8
+ ...props
9
+ }) {
10
+ return /* @__PURE__ */ jsx(
11
+ RadioGroupPrimitive.Root,
12
+ {
13
+ "data-slot": "radio-group",
14
+ className: cn("grid gap-3", className),
15
+ ...props
16
+ }
17
+ );
18
+ }
19
+ function RadioGroupItem({
20
+ className,
21
+ ...props
22
+ }) {
23
+ return /* @__PURE__ */ jsx(
24
+ RadioGroupPrimitive.Item,
25
+ {
26
+ "data-slot": "radio-group-item",
27
+ className: cn(
28
+ "border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 shadow-xs aspect-square size-4 shrink-0 rounded-full border outline-none transition-[color,box-shadow] focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
29
+ className
30
+ ),
31
+ ...props,
32
+ children: /* @__PURE__ */ jsx(
33
+ RadioGroupPrimitive.Indicator,
34
+ {
35
+ "data-slot": "radio-group-indicator",
36
+ className: "relative flex items-center justify-center",
37
+ children: /* @__PURE__ */ jsx(CircleIcon, { className: "fill-primary absolute left-1/2 top-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
38
+ }
39
+ )
40
+ }
41
+ );
42
+ }
43
+
44
+ export {
45
+ RadioGroup,
46
+ RadioGroupItem
47
+ };
@@ -0,0 +1,52 @@
1
+ // src/components/button/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 buttonVariants = cva(
7
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-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",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
12
+ destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
13
+ outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
14
+ secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
15
+ ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
16
+ link: "text-primary underline-offset-4 hover:underline"
17
+ },
18
+ size: {
19
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
20
+ sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
21
+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
22
+ icon: "size-9"
23
+ }
24
+ },
25
+ defaultVariants: {
26
+ variant: "default",
27
+ size: "default"
28
+ }
29
+ }
30
+ );
31
+ function Button({
32
+ className,
33
+ variant,
34
+ size,
35
+ asChild = false,
36
+ ...props
37
+ }) {
38
+ const Comp = asChild ? Slot : "button";
39
+ return /* @__PURE__ */ jsx(
40
+ Comp,
41
+ {
42
+ "data-slot": "button",
43
+ className: cn(buttonVariants({ variant, size, className })),
44
+ ...props
45
+ }
46
+ );
47
+ }
48
+
49
+ export {
50
+ buttonVariants,
51
+ Button
52
+ };
@@ -0,0 +1,92 @@
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/avatar/index.tsx
32
+ var avatar_exports = {};
33
+ __export(avatar_exports, {
34
+ Avatar: () => Avatar,
35
+ AvatarFallback: () => AvatarFallback,
36
+ AvatarImage: () => AvatarImage
37
+ });
38
+ module.exports = __toCommonJS(avatar_exports);
39
+ var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"), 1);
40
+ var import_utils = require("@foundrykit/utils");
41
+ var import_jsx_runtime = require("react/jsx-runtime");
42
+ function Avatar({
43
+ className,
44
+ ...props
45
+ }) {
46
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
47
+ AvatarPrimitive.Root,
48
+ {
49
+ "data-slot": "avatar",
50
+ className: (0, import_utils.cn)(
51
+ "relative flex size-8 shrink-0 overflow-hidden rounded-full",
52
+ className
53
+ ),
54
+ ...props
55
+ }
56
+ );
57
+ }
58
+ function AvatarImage({
59
+ className,
60
+ ...props
61
+ }) {
62
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
63
+ AvatarPrimitive.Image,
64
+ {
65
+ "data-slot": "avatar-image",
66
+ className: (0, import_utils.cn)("aspect-square size-full", className),
67
+ ...props
68
+ }
69
+ );
70
+ }
71
+ function AvatarFallback({
72
+ className,
73
+ ...props
74
+ }) {
75
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
76
+ AvatarPrimitive.Fallback,
77
+ {
78
+ "data-slot": "avatar-fallback",
79
+ className: (0, import_utils.cn)(
80
+ "bg-muted flex size-full items-center justify-center rounded-full",
81
+ className
82
+ ),
83
+ ...props
84
+ }
85
+ );
86
+ }
87
+ // Annotate the CommonJS export names for ESM import in node:
88
+ 0 && (module.exports = {
89
+ Avatar,
90
+ AvatarFallback,
91
+ AvatarImage
92
+ });
@@ -0,0 +1,9 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
4
+
5
+ declare function Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>): react_jsx_runtime.JSX.Element;
6
+ declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): react_jsx_runtime.JSX.Element;
7
+ declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): react_jsx_runtime.JSX.Element;
8
+
9
+ export { Avatar, AvatarFallback, AvatarImage };
@@ -0,0 +1,9 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
4
+
5
+ declare function Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>): react_jsx_runtime.JSX.Element;
6
+ declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): react_jsx_runtime.JSX.Element;
7
+ declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): react_jsx_runtime.JSX.Element;
8
+
9
+ export { Avatar, AvatarFallback, AvatarImage };
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import {
3
+ Avatar,
4
+ AvatarFallback,
5
+ AvatarImage
6
+ } from "../../chunk-VVNIYCKH.js";
7
+ export {
8
+ Avatar,
9
+ AvatarFallback,
10
+ AvatarImage
11
+ };
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components/badge/index.tsx
21
+ var badge_exports = {};
22
+ __export(badge_exports, {
23
+ Badge: () => Badge,
24
+ badgeVariants: () => badgeVariants
25
+ });
26
+ module.exports = __toCommonJS(badge_exports);
27
+ var import_react_slot = require("@radix-ui/react-slot");
28
+ var import_class_variance_authority = require("class-variance-authority");
29
+ var import_utils = require("@foundrykit/utils");
30
+ var import_jsx_runtime = require("react/jsx-runtime");
31
+ var badgeVariants = (0, import_class_variance_authority.cva)(
32
+ "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",
33
+ {
34
+ variants: {
35
+ variant: {
36
+ default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
37
+ secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
38
+ 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",
39
+ outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
40
+ }
41
+ },
42
+ defaultVariants: {
43
+ variant: "default"
44
+ }
45
+ }
46
+ );
47
+ function Badge({
48
+ className,
49
+ variant,
50
+ asChild = false,
51
+ ...props
52
+ }) {
53
+ const Comp = asChild ? import_react_slot.Slot : "span";
54
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
55
+ Comp,
56
+ {
57
+ "data-slot": "badge",
58
+ className: (0, import_utils.cn)(badgeVariants({ variant }), className),
59
+ ...props
60
+ }
61
+ );
62
+ }
63
+ // Annotate the CommonJS export names for ESM import in node:
64
+ 0 && (module.exports = {
65
+ Badge,
66
+ badgeVariants
67
+ });
@@ -0,0 +1,13 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as class_variance_authority_types from 'class-variance-authority/types';
3
+ import * as React from 'react';
4
+ import { VariantProps } from 'class-variance-authority';
5
+
6
+ declare const badgeVariants: (props?: ({
7
+ variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
8
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
9
+ declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
10
+ asChild?: boolean;
11
+ }): react_jsx_runtime.JSX.Element;
12
+
13
+ export { Badge, badgeVariants };
@@ -0,0 +1,13 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as class_variance_authority_types from 'class-variance-authority/types';
3
+ import * as React from 'react';
4
+ import { VariantProps } from 'class-variance-authority';
5
+
6
+ declare const badgeVariants: (props?: ({
7
+ variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
8
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
9
+ declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
10
+ asChild?: boolean;
11
+ }): react_jsx_runtime.JSX.Element;
12
+
13
+ export { Badge, badgeVariants };
@@ -0,0 +1,8 @@
1
+ import {
2
+ Badge,
3
+ badgeVariants
4
+ } from "../../chunk-FUWID6MC.js";
5
+ export {
6
+ Badge,
7
+ badgeVariants
8
+ };