@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
@@ -1,147 +0,0 @@
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/table/index.tsx
21
- var table_exports = {};
22
- __export(table_exports, {
23
- Table: () => Table,
24
- TableBody: () => TableBody,
25
- TableCaption: () => TableCaption,
26
- TableCell: () => TableCell,
27
- TableFooter: () => TableFooter,
28
- TableHead: () => TableHead,
29
- TableHeader: () => TableHeader,
30
- TableRow: () => TableRow
31
- });
32
- module.exports = __toCommonJS(table_exports);
33
- var import_utils = require("@foundrykit/utils");
34
- var import_jsx_runtime = require("react/jsx-runtime");
35
- function Table({ className, ...props }) {
36
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
37
- "div",
38
- {
39
- "data-slot": "table-container",
40
- className: "relative w-full overflow-x-auto",
41
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
42
- "table",
43
- {
44
- "data-slot": "table",
45
- className: (0, import_utils.cn)("w-full caption-bottom text-sm", className),
46
- ...props
47
- }
48
- )
49
- }
50
- );
51
- }
52
- function TableHeader({ className, ...props }) {
53
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
54
- "thead",
55
- {
56
- "data-slot": "table-header",
57
- className: (0, import_utils.cn)("[&_tr]:border-b", className),
58
- ...props
59
- }
60
- );
61
- }
62
- function TableBody({ className, ...props }) {
63
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
64
- "tbody",
65
- {
66
- "data-slot": "table-body",
67
- className: (0, import_utils.cn)("[&_tr:last-child]:border-0", className),
68
- ...props
69
- }
70
- );
71
- }
72
- function TableFooter({ className, ...props }) {
73
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
74
- "tfoot",
75
- {
76
- "data-slot": "table-footer",
77
- className: (0, import_utils.cn)(
78
- "bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
79
- className
80
- ),
81
- ...props
82
- }
83
- );
84
- }
85
- function TableRow({ className, ...props }) {
86
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
87
- "tr",
88
- {
89
- "data-slot": "table-row",
90
- className: (0, import_utils.cn)(
91
- "hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
92
- className
93
- ),
94
- ...props
95
- }
96
- );
97
- }
98
- function TableHead({ className, ...props }) {
99
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
100
- "th",
101
- {
102
- "data-slot": "table-head",
103
- className: (0, import_utils.cn)(
104
- "text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
105
- className
106
- ),
107
- ...props
108
- }
109
- );
110
- }
111
- function TableCell({ className, ...props }) {
112
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
113
- "td",
114
- {
115
- "data-slot": "table-cell",
116
- className: (0, import_utils.cn)(
117
- "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
118
- className
119
- ),
120
- ...props
121
- }
122
- );
123
- }
124
- function TableCaption({
125
- className,
126
- ...props
127
- }) {
128
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
129
- "caption",
130
- {
131
- "data-slot": "table-caption",
132
- className: (0, import_utils.cn)("text-muted-foreground mt-4 text-sm", className),
133
- ...props
134
- }
135
- );
136
- }
137
- // Annotate the CommonJS export names for ESM import in node:
138
- 0 && (module.exports = {
139
- Table,
140
- TableBody,
141
- TableCaption,
142
- TableCell,
143
- TableFooter,
144
- TableHead,
145
- TableHeader,
146
- TableRow
147
- });
@@ -1,35 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as React from 'react';
3
-
4
- /**
5
- * Responsive data table. Wraps a native `<table>` in a horizontally
6
- * scrollable container and composes with {@link TableHeader},
7
- * {@link TableBody}, {@link TableFooter}, {@link TableRow},
8
- * {@link TableHead}, {@link TableCell} and {@link TableCaption}.
9
- *
10
- * @example
11
- * ```tsx
12
- * <Table>
13
- * <TableHeader>
14
- * <TableRow>
15
- * <TableHead>Name</TableHead>
16
- * </TableRow>
17
- * </TableHeader>
18
- * <TableBody>
19
- * <TableRow>
20
- * <TableCell>Acme</TableCell>
21
- * </TableRow>
22
- * </TableBody>
23
- * </Table>
24
- * ```
25
- */
26
- declare function Table({ className, ...props }: React.ComponentProps<'table'>): react_jsx_runtime.JSX.Element;
27
- declare function TableHeader({ className, ...props }: React.ComponentProps<'thead'>): react_jsx_runtime.JSX.Element;
28
- declare function TableBody({ className, ...props }: React.ComponentProps<'tbody'>): react_jsx_runtime.JSX.Element;
29
- declare function TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>): react_jsx_runtime.JSX.Element;
30
- declare function TableRow({ className, ...props }: React.ComponentProps<'tr'>): react_jsx_runtime.JSX.Element;
31
- declare function TableHead({ className, ...props }: React.ComponentProps<'th'>): react_jsx_runtime.JSX.Element;
32
- declare function TableCell({ className, ...props }: React.ComponentProps<'td'>): react_jsx_runtime.JSX.Element;
33
- declare function TableCaption({ className, ...props }: React.ComponentProps<'caption'>): react_jsx_runtime.JSX.Element;
34
-
35
- export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
@@ -1,107 +0,0 @@
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 import_utils = require("@foundrykit/utils");
41
- var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
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 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
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
- });
@@ -1,27 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as TabsPrimitive from '@radix-ui/react-tabs';
3
- import * as React from 'react';
4
-
5
- /**
6
- * Tabbed interface root built on Radix `Tabs.Root`. Compose with
7
- * {@link TabsList} containing {@link TabsTrigger}s and matching
8
- * {@link TabsContent} panels; manage the active tab via Radix
9
- * `value`/`defaultValue`/`onValueChange`.
10
- *
11
- * @example
12
- * ```tsx
13
- * <Tabs defaultValue="a">
14
- * <TabsList>
15
- * <TabsTrigger value="a">A</TabsTrigger>
16
- * <TabsTrigger value="b">B</TabsTrigger>
17
- * </TabsList>
18
- * <TabsContent value="a">Panel A</TabsContent>
19
- * </Tabs>
20
- * ```
21
- */
22
- declare function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): react_jsx_runtime.JSX.Element;
23
- declare function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>): react_jsx_runtime.JSX.Element;
24
- declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
25
- declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): react_jsx_runtime.JSX.Element;
26
-
27
- export { Tabs, TabsContent, TabsList, TabsTrigger };
@@ -1,44 +0,0 @@
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 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none 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
- });
@@ -1,15 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as React from 'react';
3
-
4
- /**
5
- * Styled multi-line text input wrapping the native `<textarea>`. Auto-sizes to
6
- * content and includes focus-ring, disabled and `aria-invalid` styling.
7
- *
8
- * @example
9
- * ```tsx
10
- * <Textarea placeholder="Write a message" />
11
- * ```
12
- */
13
- declare function Textarea({ className, ...props }: React.ComponentProps<'textarea'>): react_jsx_runtime.JSX.Element;
14
-
15
- export { Textarea };
@@ -1,81 +0,0 @@
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/toggle/index.tsx
32
- var toggle_exports = {};
33
- __export(toggle_exports, {
34
- Toggle: () => Toggle,
35
- toggleVariants: () => toggleVariants
36
- });
37
- module.exports = __toCommonJS(toggle_exports);
38
- var import_utils = require("@foundrykit/utils");
39
- var TogglePrimitive = __toESM(require("@radix-ui/react-toggle"), 1);
40
- var import_class_variance_authority = require("class-variance-authority");
41
- var import_jsx_runtime = require("react/jsx-runtime");
42
- var toggleVariants = (0, import_class_variance_authority.cva)(
43
- "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",
44
- {
45
- variants: {
46
- variant: {
47
- default: "bg-transparent",
48
- outline: "border-input hover:bg-accent hover:text-accent-foreground border bg-transparent shadow-xs"
49
- },
50
- size: {
51
- default: "h-9 min-w-9 px-2",
52
- sm: "h-8 min-w-8 px-1.5",
53
- lg: "h-10 min-w-10 px-2.5"
54
- }
55
- },
56
- defaultVariants: {
57
- variant: "default",
58
- size: "default"
59
- }
60
- }
61
- );
62
- function Toggle({
63
- className,
64
- variant,
65
- size,
66
- ...props
67
- }) {
68
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
69
- TogglePrimitive.Root,
70
- {
71
- "data-slot": "toggle",
72
- className: (0, import_utils.cn)(toggleVariants({ variant, size, className })),
73
- ...props
74
- }
75
- );
76
- }
77
- // Annotate the CommonJS export names for ESM import in node:
78
- 0 && (module.exports = {
79
- Toggle,
80
- toggleVariants
81
- });
@@ -1,26 +0,0 @@
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 TogglePrimitive from '@radix-ui/react-toggle';
4
- import { VariantProps } from 'class-variance-authority';
5
- import * as React from 'react';
6
-
7
- declare const toggleVariants: (props?: ({
8
- variant?: "default" | "outline" | null | undefined;
9
- size?: "default" | "sm" | "lg" | null | undefined;
10
- } & class_variance_authority_types.ClassProp) | undefined) => string;
11
- /**
12
- * Two-state toggle button built on Radix `Toggle.Root`, styled via
13
- * {@link toggleVariants} with a `variant` (default, outline) and `size`
14
- * (default, sm, lg). Control the pressed state with Radix
15
- * `pressed`/`onPressedChange`.
16
- *
17
- * @example
18
- * ```tsx
19
- * <Toggle variant="outline" pressed={bold} onPressedChange={setBold}>
20
- * <BoldIcon />
21
- * </Toggle>
22
- * ```
23
- */
24
- declare function Toggle({ className, variant, size, ...props }: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime.JSX.Element;
25
-
26
- export { Toggle, toggleVariants };
@@ -1,120 +0,0 @@
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/toggle-group/index.tsx
32
- var toggle_group_exports = {};
33
- __export(toggle_group_exports, {
34
- ToggleGroup: () => ToggleGroup,
35
- ToggleGroupItem: () => ToggleGroupItem
36
- });
37
- module.exports = __toCommonJS(toggle_group_exports);
38
- var import_utils = require("@foundrykit/utils");
39
- var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"), 1);
40
- var import_class_variance_authority = require("class-variance-authority");
41
- var React = __toESM(require("react"), 1);
42
- var import_jsx_runtime = require("react/jsx-runtime");
43
- var toggleGroupItemVariants = (0, import_class_variance_authority.cva)(
44
- "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",
45
- {
46
- variants: {
47
- variant: {
48
- default: "bg-transparent",
49
- outline: "border-input hover:bg-accent hover:text-accent-foreground border bg-transparent shadow-xs"
50
- },
51
- size: {
52
- default: "h-9 min-w-9 px-2",
53
- sm: "h-8 min-w-8 px-1.5",
54
- lg: "h-10 min-w-10 px-2.5"
55
- }
56
- },
57
- defaultVariants: {
58
- variant: "default",
59
- size: "default"
60
- }
61
- }
62
- );
63
- var ToggleGroupContext = React.createContext({
64
- size: "default",
65
- variant: "default"
66
- });
67
- function ToggleGroup({
68
- className,
69
- variant,
70
- size,
71
- children,
72
- ...props
73
- }) {
74
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
75
- ToggleGroupPrimitive.Root,
76
- {
77
- "data-slot": "toggle-group",
78
- "data-variant": variant,
79
- "data-size": size,
80
- className: (0, import_utils.cn)(
81
- "group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
82
- className
83
- ),
84
- ...props,
85
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
86
- }
87
- );
88
- }
89
- function ToggleGroupItem({
90
- className,
91
- children,
92
- variant,
93
- size,
94
- ...props
95
- }) {
96
- const context = React.useContext(ToggleGroupContext);
97
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
98
- ToggleGroupPrimitive.Item,
99
- {
100
- "data-slot": "toggle-group-item",
101
- "data-variant": context.variant || variant,
102
- "data-size": context.size || size,
103
- className: (0, import_utils.cn)(
104
- toggleGroupItemVariants({
105
- variant: context.variant || variant,
106
- size: context.size || size
107
- }),
108
- "min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",
109
- className
110
- ),
111
- ...props,
112
- children
113
- }
114
- );
115
- }
116
- // Annotate the CommonJS export names for ESM import in node:
117
- 0 && (module.exports = {
118
- ToggleGroup,
119
- ToggleGroupItem
120
- });
@@ -1,27 +0,0 @@
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 ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
4
- import { VariantProps } from 'class-variance-authority';
5
- import * as React from 'react';
6
-
7
- declare const toggleGroupItemVariants: (props?: ({
8
- variant?: "default" | "outline" | null | undefined;
9
- size?: "default" | "sm" | "lg" | null | undefined;
10
- } & class_variance_authority_types.ClassProp) | undefined) => string;
11
- /**
12
- * Set of two-state buttons built on Radix `ToggleGroup.Root`. Choose single- or
13
- * multiple-selection with `type`, and share `variant`/`size` with every
14
- * {@link ToggleGroupItem} via context.
15
- *
16
- * @example
17
- * ```tsx
18
- * <ToggleGroup type="single" variant="outline">
19
- * <ToggleGroupItem value="left"><AlignLeft /></ToggleGroupItem>
20
- * <ToggleGroupItem value="center"><AlignCenter /></ToggleGroupItem>
21
- * </ToggleGroup>
22
- * ```
23
- */
24
- declare function ToggleGroup({ className, variant, size, children, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleGroupItemVariants>): react_jsx_runtime.JSX.Element;
25
- declare function ToggleGroupItem({ className, children, variant, size, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleGroupItemVariants>): react_jsx_runtime.JSX.Element;
26
-
27
- export { ToggleGroup, ToggleGroupItem };