@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,107 @@
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/tabs/index.tsx
32
+ var tabs_exports = {};
33
+ __export(tabs_exports, {
34
+ Tabs: () => Tabs,
35
+ TabsContent: () => TabsContent,
36
+ TabsList: () => TabsList,
37
+ TabsTrigger: () => TabsTrigger
38
+ });
39
+ module.exports = __toCommonJS(tabs_exports);
40
+ var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
41
+ var import_utils = require("@foundrykit/utils");
42
+ var import_jsx_runtime = require("react/jsx-runtime");
43
+ function Tabs({
44
+ className,
45
+ ...props
46
+ }) {
47
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
48
+ TabsPrimitive.Root,
49
+ {
50
+ "data-slot": "tabs",
51
+ className: (0, import_utils.cn)("flex flex-col gap-2", className),
52
+ ...props
53
+ }
54
+ );
55
+ }
56
+ function TabsList({
57
+ className,
58
+ ...props
59
+ }) {
60
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
61
+ TabsPrimitive.List,
62
+ {
63
+ "data-slot": "tabs-list",
64
+ className: (0, import_utils.cn)(
65
+ "bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
66
+ className
67
+ ),
68
+ ...props
69
+ }
70
+ );
71
+ }
72
+ function TabsTrigger({
73
+ className,
74
+ ...props
75
+ }) {
76
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
77
+ TabsPrimitive.Trigger,
78
+ {
79
+ "data-slot": "tabs-trigger",
80
+ className: (0, import_utils.cn)(
81
+ "data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md border border-transparent px-2 py-1 text-sm font-medium transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
82
+ className
83
+ ),
84
+ ...props
85
+ }
86
+ );
87
+ }
88
+ function TabsContent({
89
+ className,
90
+ ...props
91
+ }) {
92
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
93
+ TabsPrimitive.Content,
94
+ {
95
+ "data-slot": "tabs-content",
96
+ className: (0, import_utils.cn)("flex-1 outline-none", className),
97
+ ...props
98
+ }
99
+ );
100
+ }
101
+ // Annotate the CommonJS export names for ESM import in node:
102
+ 0 && (module.exports = {
103
+ Tabs,
104
+ TabsContent,
105
+ TabsList,
106
+ TabsTrigger
107
+ });
@@ -0,0 +1,10 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import * as TabsPrimitive from '@radix-ui/react-tabs';
4
+
5
+ declare function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): react_jsx_runtime.JSX.Element;
6
+ declare function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>): react_jsx_runtime.JSX.Element;
7
+ declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
8
+ declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): react_jsx_runtime.JSX.Element;
9
+
10
+ export { Tabs, TabsContent, TabsList, TabsTrigger };
@@ -0,0 +1,10 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import * as TabsPrimitive from '@radix-ui/react-tabs';
4
+
5
+ declare function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): react_jsx_runtime.JSX.Element;
6
+ declare function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>): react_jsx_runtime.JSX.Element;
7
+ declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
8
+ declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): react_jsx_runtime.JSX.Element;
9
+
10
+ export { Tabs, TabsContent, TabsList, TabsTrigger };
@@ -0,0 +1,13 @@
1
+ "use client";
2
+ import {
3
+ Tabs,
4
+ TabsContent,
5
+ TabsList,
6
+ TabsTrigger
7
+ } from "../../chunk-FYCANIVJ.js";
8
+ export {
9
+ Tabs,
10
+ TabsContent,
11
+ TabsList,
12
+ TabsTrigger
13
+ };
@@ -0,0 +1,44 @@
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/textarea/index.tsx
21
+ var textarea_exports = {};
22
+ __export(textarea_exports, {
23
+ Textarea: () => Textarea
24
+ });
25
+ module.exports = __toCommonJS(textarea_exports);
26
+ var import_utils = require("@foundrykit/utils");
27
+ var import_jsx_runtime = require("react/jsx-runtime");
28
+ function Textarea({ className, ...props }) {
29
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
30
+ "textarea",
31
+ {
32
+ "data-slot": "textarea",
33
+ className: (0, import_utils.cn)(
34
+ "border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 field-sizing-content shadow-xs flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base outline-none transition-[color,box-shadow] focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
35
+ className
36
+ ),
37
+ ...props
38
+ }
39
+ );
40
+ }
41
+ // Annotate the CommonJS export names for ESM import in node:
42
+ 0 && (module.exports = {
43
+ Textarea
44
+ });
@@ -0,0 +1,6 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ declare function Textarea({ className, ...props }: React.ComponentProps<'textarea'>): react_jsx_runtime.JSX.Element;
5
+
6
+ export { Textarea };
@@ -0,0 +1,6 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ declare function Textarea({ className, ...props }: React.ComponentProps<'textarea'>): react_jsx_runtime.JSX.Element;
5
+
6
+ export { Textarea };
@@ -0,0 +1,6 @@
1
+ import {
2
+ Textarea
3
+ } from "../../chunk-I44GXEPN.js";
4
+ export {
5
+ Textarea
6
+ };