@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,170 +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/sheet/index.tsx
32
- var sheet_exports = {};
33
- __export(sheet_exports, {
34
- Sheet: () => Sheet,
35
- SheetClose: () => SheetClose,
36
- SheetContent: () => SheetContent,
37
- SheetDescription: () => SheetDescription,
38
- SheetFooter: () => SheetFooter,
39
- SheetHeader: () => SheetHeader,
40
- SheetTitle: () => SheetTitle,
41
- SheetTrigger: () => SheetTrigger
42
- });
43
- module.exports = __toCommonJS(sheet_exports);
44
- var import_utils = require("@foundrykit/utils");
45
- var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
46
- var import_lucide_react = require("lucide-react");
47
- var import_jsx_runtime = require("react/jsx-runtime");
48
- function Sheet({ ...props }) {
49
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
50
- }
51
- function SheetTrigger({
52
- ...props
53
- }) {
54
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
55
- }
56
- function SheetClose({
57
- ...props
58
- }) {
59
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
60
- }
61
- function SheetPortal({
62
- ...props
63
- }) {
64
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
65
- }
66
- function SheetOverlay({
67
- className,
68
- ...props
69
- }) {
70
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
71
- SheetPrimitive.Overlay,
72
- {
73
- "data-slot": "sheet-overlay",
74
- className: (0, import_utils.cn)(
75
- "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",
76
- className
77
- ),
78
- ...props
79
- }
80
- );
81
- }
82
- function SheetContent({
83
- className,
84
- children,
85
- side = "right",
86
- ...props
87
- }) {
88
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SheetPortal, { children: [
89
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetOverlay, {}),
90
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
91
- SheetPrimitive.Content,
92
- {
93
- "data-slot": "sheet-content",
94
- className: (0, import_utils.cn)(
95
- "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
96
- side === "right" && "motion-safe:data-[state=closed]:slide-out-to-right motion-safe:data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
97
- side === "left" && "motion-safe:data-[state=closed]:slide-out-to-left motion-safe:data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
98
- side === "top" && "motion-safe:data-[state=closed]:slide-out-to-top motion-safe:data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
99
- side === "bottom" && "motion-safe:data-[state=closed]:slide-out-to-bottom motion-safe:data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
100
- className
101
- ),
102
- ...props,
103
- children: [
104
- children,
105
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
106
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.XIcon, { className: "size-4" }),
107
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Close" })
108
- ] })
109
- ]
110
- }
111
- )
112
- ] });
113
- }
114
- function SheetHeader({ className, ...props }) {
115
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
116
- "div",
117
- {
118
- "data-slot": "sheet-header",
119
- className: (0, import_utils.cn)("flex flex-col gap-1.5 p-4", className),
120
- ...props
121
- }
122
- );
123
- }
124
- function SheetFooter({ className, ...props }) {
125
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
126
- "div",
127
- {
128
- "data-slot": "sheet-footer",
129
- className: (0, import_utils.cn)("mt-auto flex flex-col gap-2 p-4", className),
130
- ...props
131
- }
132
- );
133
- }
134
- function SheetTitle({
135
- className,
136
- ...props
137
- }) {
138
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
139
- SheetPrimitive.Title,
140
- {
141
- "data-slot": "sheet-title",
142
- className: (0, import_utils.cn)("text-foreground font-semibold", className),
143
- ...props
144
- }
145
- );
146
- }
147
- function SheetDescription({
148
- className,
149
- ...props
150
- }) {
151
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
152
- SheetPrimitive.Description,
153
- {
154
- "data-slot": "sheet-description",
155
- className: (0, import_utils.cn)("text-muted-foreground text-sm", className),
156
- ...props
157
- }
158
- );
159
- }
160
- // Annotate the CommonJS export names for ESM import in node:
161
- 0 && (module.exports = {
162
- Sheet,
163
- SheetClose,
164
- SheetContent,
165
- SheetDescription,
166
- SheetFooter,
167
- SheetHeader,
168
- SheetTitle,
169
- SheetTrigger
170
- });
@@ -1,31 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as DialogPrimitive from '@radix-ui/react-dialog';
3
- import * as React from 'react';
4
-
5
- /**
6
- * Slide-in panel (drawer) built on the Radix Dialog primitive. Compose with
7
- * {@link SheetTrigger}, {@link SheetContent}, {@link SheetHeader},
8
- * {@link SheetTitle}, {@link SheetDescription} and {@link SheetFooter}.
9
- * {@link SheetContent} slides from a chosen `side` and includes a close button.
10
- *
11
- * @example
12
- * ```tsx
13
- * <Sheet>
14
- * <SheetTrigger>Open</SheetTrigger>
15
- * <SheetContent side="left">...</SheetContent>
16
- * </Sheet>
17
- * ```
18
- */
19
- declare function Sheet({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
20
- declare function SheetTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
21
- declare function SheetClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): react_jsx_runtime.JSX.Element;
22
- /** Portalled sheet panel that slides in from `side` (`top`/`right`/`bottom`/`left`, default `right`) over an overlay, with a built-in close button. */
23
- declare function SheetContent({ className, children, side, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
24
- side?: 'top' | 'right' | 'bottom' | 'left';
25
- }): react_jsx_runtime.JSX.Element;
26
- declare function SheetHeader({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
27
- declare function SheetFooter({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
28
- declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime.JSX.Element;
29
- declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime.JSX.Element;
30
-
31
- export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
@@ -1,41 +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/skeleton/index.tsx
21
- var skeleton_exports = {};
22
- __export(skeleton_exports, {
23
- Skeleton: () => Skeleton
24
- });
25
- module.exports = __toCommonJS(skeleton_exports);
26
- var import_utils = require("@foundrykit/utils");
27
- var import_jsx_runtime = require("react/jsx-runtime");
28
- function Skeleton({ className, ...props }) {
29
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
30
- "div",
31
- {
32
- "data-slot": "skeleton",
33
- className: (0, import_utils.cn)("bg-accent animate-pulse rounded-md", className),
34
- ...props
35
- }
36
- );
37
- }
38
- // Annotate the CommonJS export names for ESM import in node:
39
- 0 && (module.exports = {
40
- Skeleton
41
- });
@@ -1,14 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- /**
4
- * Placeholder block with a pulse animation for loading states. Size and shape it
5
- * with `className`.
6
- *
7
- * @example
8
- * ```tsx
9
- * <Skeleton className="h-4 w-32" />
10
- * ```
11
- */
12
- declare function Skeleton({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
13
-
14
- export { Skeleton };
@@ -1,102 +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/slider/index.tsx
32
- var slider_exports = {};
33
- __export(slider_exports, {
34
- Slider: () => Slider
35
- });
36
- module.exports = __toCommonJS(slider_exports);
37
- var import_utils = require("@foundrykit/utils");
38
- var SliderPrimitive = __toESM(require("@radix-ui/react-slider"), 1);
39
- var React = __toESM(require("react"), 1);
40
- var import_jsx_runtime = require("react/jsx-runtime");
41
- function Slider({
42
- className,
43
- defaultValue,
44
- value,
45
- min = 0,
46
- max = 100,
47
- "aria-label": ariaLabel,
48
- ...props
49
- }) {
50
- const _values = React.useMemo(
51
- () => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
52
- [value, defaultValue, min, max]
53
- );
54
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
55
- SliderPrimitive.Root,
56
- {
57
- "data-slot": "slider",
58
- defaultValue,
59
- value,
60
- min,
61
- max,
62
- className: (0, import_utils.cn)(
63
- "relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
64
- className
65
- ),
66
- ...props,
67
- children: [
68
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
69
- SliderPrimitive.Track,
70
- {
71
- "data-slot": "slider-track",
72
- className: (0, import_utils.cn)(
73
- "bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
74
- ),
75
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
76
- SliderPrimitive.Range,
77
- {
78
- "data-slot": "slider-range",
79
- className: (0, import_utils.cn)(
80
- "bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
81
- )
82
- }
83
- )
84
- }
85
- ),
86
- Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
87
- SliderPrimitive.Thumb,
88
- {
89
- "data-slot": "slider-thumb",
90
- "aria-label": ariaLabel,
91
- className: "border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
92
- },
93
- index
94
- ))
95
- ]
96
- }
97
- );
98
- }
99
- // Annotate the CommonJS export names for ESM import in node:
100
- 0 && (module.exports = {
101
- Slider
102
- });
@@ -1,19 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as SliderPrimitive from '@radix-ui/react-slider';
3
- import * as React from 'react';
4
-
5
- /**
6
- * Slider built on Radix `Slider.Root`. Supports single or multiple thumbs by
7
- * passing an array to `value`/`defaultValue`. Works horizontally or vertically
8
- * via the `orientation` prop. `aria-label` names each thumb (the focusable
9
- * `role="slider"` element), not the root.
10
- *
11
- * @example
12
- * ```tsx
13
- * <Slider defaultValue={[50]} max={100} step={1} />
14
- * <Slider defaultValue={[25, 75]} max={100} step={1} />
15
- * ```
16
- */
17
- declare function Slider({ className, defaultValue, value, min, max, 'aria-label': ariaLabel, ...props }: React.ComponentProps<typeof SliderPrimitive.Root>): react_jsx_runtime.JSX.Element;
18
-
19
- export { Slider };
@@ -1,51 +0,0 @@
1
- "use strict";
2
- "use client";
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/components/sonner/index.tsx
22
- var sonner_exports = {};
23
- __export(sonner_exports, {
24
- Toaster: () => Toaster,
25
- toast: () => import_sonner.toast
26
- });
27
- module.exports = __toCommonJS(sonner_exports);
28
- var import_next_themes = require("next-themes");
29
- var import_sonner = require("sonner");
30
- var import_jsx_runtime = require("react/jsx-runtime");
31
- function Toaster({ ...props }) {
32
- const { theme = "system" } = (0, import_next_themes.useTheme)();
33
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
34
- import_sonner.Toaster,
35
- {
36
- theme,
37
- className: "toaster group",
38
- style: {
39
- "--normal-bg": "var(--popover)",
40
- "--normal-text": "var(--popover-foreground)",
41
- "--normal-border": "var(--border)"
42
- },
43
- ...props
44
- }
45
- );
46
- }
47
- // Annotate the CommonJS export names for ESM import in node:
48
- 0 && (module.exports = {
49
- Toaster,
50
- toast
51
- });
@@ -1,18 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ToasterProps } from 'sonner';
3
- export { toast } from 'sonner';
4
-
5
- /**
6
- * Toast notifications powered by Sonner, automatically themed via
7
- * `next-themes`. Render a single `Toaster` near the root of your app and
8
- * trigger notifications imperatively with the re-exported {@link toast}.
9
- *
10
- * @example
11
- * ```tsx
12
- * <Toaster />
13
- * <button onClick={() => toast('Saved!')}>Save</button>
14
- * ```
15
- */
16
- declare function Toaster({ ...props }: ToasterProps): react_jsx_runtime.JSX.Element;
17
-
18
- export { Toaster };
@@ -1,47 +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/spinner/index.tsx
21
- var spinner_exports = {};
22
- __export(spinner_exports, {
23
- Spinner: () => Spinner
24
- });
25
- module.exports = __toCommonJS(spinner_exports);
26
- var import_utils = require("@foundrykit/utils");
27
- var import_lucide_react = require("lucide-react");
28
- var import_jsx_runtime = require("react/jsx-runtime");
29
- function Spinner({
30
- className,
31
- ...props
32
- }) {
33
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
34
- import_lucide_react.Loader2Icon,
35
- {
36
- role: "status",
37
- "aria-label": "Loading",
38
- "data-slot": "spinner",
39
- className: (0, import_utils.cn)("size-4 animate-spin", className),
40
- ...props
41
- }
42
- );
43
- }
44
- // Annotate the CommonJS export names for ESM import in node:
45
- 0 && (module.exports = {
46
- Spinner
47
- });
@@ -1,17 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { Loader2Icon } from 'lucide-react';
3
- import * as React from 'react';
4
-
5
- /**
6
- * Loading indicator built on the lucide `Loader2Icon` with a continuous
7
- * spin animation. Adjust the size and color through `className` (e.g.
8
- * `size-6 text-muted-foreground`).
9
- *
10
- * @example
11
- * ```tsx
12
- * <Spinner className="size-6 text-muted-foreground" />
13
- * ```
14
- */
15
- declare function Spinner({ className, ...props }: React.ComponentProps<typeof Loader2Icon>): react_jsx_runtime.JSX.Element;
16
-
17
- export { Spinner };
@@ -1,68 +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/switch/index.tsx
32
- var switch_exports = {};
33
- __export(switch_exports, {
34
- Switch: () => Switch
35
- });
36
- module.exports = __toCommonJS(switch_exports);
37
- var import_utils = require("@foundrykit/utils");
38
- var SwitchPrimitive = __toESM(require("@radix-ui/react-switch"), 1);
39
- var import_jsx_runtime = require("react/jsx-runtime");
40
- function Switch({
41
- className,
42
- ...props
43
- }) {
44
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
45
- SwitchPrimitive.Root,
46
- {
47
- "data-slot": "switch",
48
- className: (0, import_utils.cn)(
49
- "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 peer inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
50
- className
51
- ),
52
- ...props,
53
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
54
- SwitchPrimitive.Thumb,
55
- {
56
- "data-slot": "switch-thumb",
57
- className: (0, import_utils.cn)(
58
- "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"
59
- )
60
- }
61
- )
62
- }
63
- );
64
- }
65
- // Annotate the CommonJS export names for ESM import in node:
66
- 0 && (module.exports = {
67
- Switch
68
- });
@@ -1,17 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as SwitchPrimitive from '@radix-ui/react-switch';
3
- import * as React from 'react';
4
-
5
- /**
6
- * Toggle switch built on Radix `Switch.Root` with a sliding thumb. Supports
7
- * controlled/uncontrolled state and disabled styling via the underlying Radix
8
- * props (`checked`/`onCheckedChange`).
9
- *
10
- * @example
11
- * ```tsx
12
- * <Switch checked={on} onCheckedChange={setOn} />
13
- * ```
14
- */
15
- declare function Switch({ className, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root>): react_jsx_runtime.JSX.Element;
16
-
17
- export { Switch };