@foundrykit/primitives 2.1.3 → 2.2.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.
- package/dist/components/accordion/index.js +60 -6
- package/dist/components/alert/index.js +62 -6
- package/dist/components/alert-dialog/index.js +142 -13
- package/dist/components/aspect-ratio/index.js +9 -3
- package/dist/components/avatar/index.js +50 -5
- package/dist/components/badge/index.js +37 -4
- package/dist/components/breadcrumb/index.js +95 -9
- package/dist/components/button-group/index.js +74 -6
- package/dist/components/card/index.js +66 -8
- package/dist/components/checkbox/index.js +30 -3
- package/dist/components/collapsible/index.js +33 -7
- package/dist/components/context-menu/index.js +208 -17
- package/dist/components/dialog/index.js +126 -12
- package/dist/components/direction/index.js +10 -2
- package/dist/components/drawer/index.js +118 -12
- package/dist/components/dropdown/index.js +216 -17
- package/dist/components/empty/index.js +95 -9
- package/dist/components/field/index.js +211 -13
- package/dist/components/hover-card/index.js +35 -5
- package/dist/components/item/index.js +178 -14
- package/dist/components/kbd/index.js +27 -4
- package/dist/components/label/index.js +21 -3
- package/dist/components/menubar/index.js +235 -18
- package/dist/components/native-select/index.js +25 -3
- package/dist/components/navigation-menu/index.js +161 -11
- package/dist/components/popover/index.js +40 -6
- package/dist/components/progress/index.js +30 -3
- package/dist/components/radio-group/index.js +43 -4
- package/dist/components/resizable/index.js +43 -5
- package/dist/components/scroll-area/index.js +58 -4
- package/dist/components/section/index.js +13 -3
- package/dist/components/select/index.js +159 -12
- package/dist/components/sheet/index.js +118 -10
- package/dist/components/skeleton/index.js +13 -3
- package/dist/components/slider/index.js +64 -3
- package/dist/components/sonner/index.js +21 -4
- package/dist/components/spinner/index.js +19 -3
- package/dist/components/switch/index.js +30 -3
- package/dist/components/table/index.js +105 -10
- package/dist/components/tabs/index.js +63 -6
- package/dist/components/toggle/index.js +41 -4
- package/dist/components/toggle-group/index.js +80 -4
- package/dist/components/tooltip/index.js +51 -6
- package/dist/components/typography/index.js +147 -14
- package/dist/index.js +208 -255
- package/package.json +3 -3
- package/dist/chunk-25N35Z5M.js +0 -42
- package/dist/chunk-2JOT4DV4.js +0 -66
- package/dist/chunk-2SBGU5XA.js +0 -233
- package/dist/chunk-2UG6OCGA.js +0 -75
- package/dist/chunk-3BAO7TAS.js +0 -105
- package/dist/chunk-3NQR7JZR.js +0 -128
- package/dist/chunk-3QUMCM5K.js +0 -225
- package/dist/chunk-3TZXV53R.js +0 -55
- package/dist/chunk-3UKWAM5M.js +0 -33
- package/dist/chunk-44I6VK3H.js +0 -105
- package/dist/chunk-67UXTT4O.js +0 -116
- package/dist/chunk-727ACUWN.js +0 -82
- package/dist/chunk-76APYFRN.js +0 -29
- package/dist/chunk-AJAAMJYH.js +0 -12
- package/dist/chunk-B5YCE3UP.js +0 -57
- package/dist/chunk-BIFBYERK.js +0 -69
- package/dist/chunk-DXZ4GUQO.js +0 -33
- package/dist/chunk-ED6T7ZZN.js +0 -130
- package/dist/chunk-EEAK2RWF.js +0 -23
- package/dist/chunk-F2TEA6ER.js +0 -138
- package/dist/chunk-FF5D53KL.js +0 -69
- package/dist/chunk-FRIOQFPE.js +0 -171
- package/dist/chunk-G2YBCHWR.js +0 -46
- package/dist/chunk-GKCBSG2W.js +0 -67
- package/dist/chunk-GPEL656S.js +0 -84
- package/dist/chunk-JKKCRFYB.js +0 -36
- package/dist/chunk-JTSIBZS4.js +0 -194
- package/dist/chunk-MCXSVXO4.js +0 -24
- package/dist/chunk-MMZJQ7RW.js +0 -33
- package/dist/chunk-MYIUX3DT.js +0 -62
- package/dist/chunk-P5KEJOBH.js +0 -155
- package/dist/chunk-PAO3DSEF.js +0 -48
- package/dist/chunk-PLLG76QJ.js +0 -32
- package/dist/chunk-SDYKJVXX.js +0 -253
- package/dist/chunk-SIQHWNPH.js +0 -45
- package/dist/chunk-SKR3J46C.js +0 -17
- package/dist/chunk-STRBREHN.js +0 -17
- package/dist/chunk-SUEPE6OX.js +0 -47
- package/dist/chunk-TA23RNS4.js +0 -162
- package/dist/chunk-TRXU4SOJ.js +0 -224
- package/dist/chunk-U7JIOR7A.js +0 -172
- package/dist/chunk-VPBVKBZ7.js +0 -25
- package/dist/chunk-W4XY3SNY.js +0 -40
- package/dist/chunk-YT2ZIMZI.js +0 -16
- package/dist/components/accordion/index.cjs +0 -104
- package/dist/components/accordion/index.d.cts +0 -25
- package/dist/components/alert/index.cjs +0 -96
- package/dist/components/alert/index.d.cts +0 -28
- package/dist/components/alert-dialog/index.cjs +0 -200
- package/dist/components/alert-dialog/index.d.cts +0 -42
- package/dist/components/aspect-ratio/index.cjs +0 -47
- package/dist/components/aspect-ratio/index.d.cts +0 -19
- package/dist/components/avatar/index.cjs +0 -92
- package/dist/components/avatar/index.d.cts +0 -24
- package/dist/components/badge/index.cjs +0 -67
- package/dist/components/badge/index.d.cts +0 -24
- package/dist/components/breadcrumb/index.cjs +0 -135
- package/dist/components/breadcrumb/index.d.cts +0 -33
- package/dist/components/button/index.cjs +0 -87
- package/dist/components/button/index.d.cts +0 -28
- package/dist/components/button-group/index.cjs +0 -142
- package/dist/components/button-group/index.d.cts +0 -33
- package/dist/components/card/index.cjs +0 -104
- package/dist/components/card/index.d.cts +0 -27
- package/dist/components/checkbox/index.cjs +0 -68
- package/dist/components/checkbox/index.d.cts +0 -17
- package/dist/components/collapsible/index.cjs +0 -73
- package/dist/components/collapsible/index.d.cts +0 -22
- package/dist/components/context-menu/index.cjs +0 -274
- package/dist/components/context-menu/index.d.cts +0 -48
- package/dist/components/dialog/index.cjs +0 -182
- package/dist/components/dialog/index.d.cts +0 -38
- package/dist/components/direction/index.cjs +0 -39
- package/dist/components/direction/index.d.cts +0 -20
- package/dist/components/drawer/index.cjs +0 -164
- package/dist/components/drawer/index.d.cts +0 -35
- package/dist/components/dropdown/index.cjs +0 -282
- package/dist/components/dropdown/index.d.cts +0 -52
- package/dist/components/empty/index.cjs +0 -135
- package/dist/components/empty/index.d.cts +0 -38
- package/dist/components/field/index.cjs +0 -269
- package/dist/components/field/index.d.cts +0 -42
- package/dist/components/hover-card/index.cjs +0 -77
- package/dist/components/hover-card/index.d.cts +0 -22
- package/dist/components/input/index.cjs +0 -47
- package/dist/components/input/index.d.cts +0 -17
- package/dist/components/input-group/index.cjs +0 -270
- package/dist/components/input-group/index.d.cts +0 -44
- package/dist/components/item/index.cjs +0 -262
- package/dist/components/item/index.d.cts +0 -47
- package/dist/components/kbd/index.cjs +0 -57
- package/dist/components/kbd/index.d.cts +0 -19
- package/dist/components/label/index.cjs +0 -59
- package/dist/components/label/index.d.cts +0 -16
- package/dist/components/menubar/index.cjs +0 -303
- package/dist/components/menubar/index.d.cts +0 -49
- package/dist/components/native-select/index.cjs +0 -53
- package/dist/components/native-select/index.d.cts +0 -19
- package/dist/components/navigation-menu/index.cjs +0 -215
- package/dist/components/navigation-menu/index.d.cts +0 -37
- package/dist/components/popover/index.cjs +0 -84
- package/dist/components/popover/index.d.cts +0 -23
- package/dist/components/progress/index.cjs +0 -68
- package/dist/components/progress/index.d.cts +0 -16
- package/dist/components/radio-group/index.cjs +0 -83
- package/dist/components/radio-group/index.d.cts +0 -22
- package/dist/components/resizable/index.cjs +0 -75
- package/dist/components/resizable/index.d.cts +0 -25
- package/dist/components/scroll-area/index.cjs +0 -98
- package/dist/components/scroll-area/index.d.cts +0 -21
- package/dist/components/section/index.cjs +0 -41
- package/dist/components/section/index.d.cts +0 -27
- package/dist/components/select/index.cjs +0 -215
- package/dist/components/select/index.d.cts +0 -36
- package/dist/components/separator/index.cjs +0 -63
- package/dist/components/separator/index.d.cts +0 -18
- package/dist/components/sheet/index.cjs +0 -170
- package/dist/components/sheet/index.d.cts +0 -31
- package/dist/components/skeleton/index.cjs +0 -41
- package/dist/components/skeleton/index.d.cts +0 -14
- package/dist/components/slider/index.cjs +0 -102
- package/dist/components/slider/index.d.cts +0 -19
- package/dist/components/sonner/index.cjs +0 -51
- package/dist/components/sonner/index.d.cts +0 -18
- package/dist/components/spinner/index.cjs +0 -47
- package/dist/components/spinner/index.d.cts +0 -17
- package/dist/components/switch/index.cjs +0 -68
- package/dist/components/switch/index.d.cts +0 -17
- package/dist/components/table/index.cjs +0 -147
- package/dist/components/table/index.d.cts +0 -35
- package/dist/components/tabs/index.cjs +0 -107
- package/dist/components/tabs/index.d.cts +0 -27
- package/dist/components/textarea/index.cjs +0 -44
- package/dist/components/textarea/index.d.cts +0 -15
- package/dist/components/toggle/index.cjs +0 -81
- package/dist/components/toggle/index.d.cts +0 -26
- package/dist/components/toggle-group/index.cjs +0 -120
- package/dist/components/toggle-group/index.d.cts +0 -27
- package/dist/components/tooltip/index.cjs +0 -95
- package/dist/components/tooltip/index.d.cts +0 -25
- package/dist/components/typography/index.cjs +0 -197
- package/dist/components/typography/index.d.cts +0 -28
- package/dist/index.cjs +0 -4094
- package/dist/index.d.cts +0 -83
|
@@ -1,135 +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/breadcrumb/index.tsx
|
|
21
|
-
var breadcrumb_exports = {};
|
|
22
|
-
__export(breadcrumb_exports, {
|
|
23
|
-
Breadcrumb: () => Breadcrumb,
|
|
24
|
-
BreadcrumbEllipsis: () => BreadcrumbEllipsis,
|
|
25
|
-
BreadcrumbItem: () => BreadcrumbItem,
|
|
26
|
-
BreadcrumbLink: () => BreadcrumbLink,
|
|
27
|
-
BreadcrumbList: () => BreadcrumbList,
|
|
28
|
-
BreadcrumbPage: () => BreadcrumbPage,
|
|
29
|
-
BreadcrumbSeparator: () => BreadcrumbSeparator
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(breadcrumb_exports);
|
|
32
|
-
var import_utils = require("@foundrykit/utils");
|
|
33
|
-
var import_react_slot = require("@radix-ui/react-slot");
|
|
34
|
-
var import_lucide_react = require("lucide-react");
|
|
35
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
-
function Breadcrumb({ ...props }) {
|
|
37
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
38
|
-
}
|
|
39
|
-
function BreadcrumbList({ className, ...props }) {
|
|
40
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
41
|
-
"ol",
|
|
42
|
-
{
|
|
43
|
-
"data-slot": "breadcrumb-list",
|
|
44
|
-
className: (0, import_utils.cn)(
|
|
45
|
-
"text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
|
|
46
|
-
className
|
|
47
|
-
),
|
|
48
|
-
...props
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
function BreadcrumbItem({ className, ...props }) {
|
|
53
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
-
"li",
|
|
55
|
-
{
|
|
56
|
-
"data-slot": "breadcrumb-item",
|
|
57
|
-
className: (0, import_utils.cn)("inline-flex items-center gap-1.5", className),
|
|
58
|
-
...props
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
function BreadcrumbLink({
|
|
63
|
-
asChild,
|
|
64
|
-
className,
|
|
65
|
-
...props
|
|
66
|
-
}) {
|
|
67
|
-
const Comp = asChild ? import_react_slot.Slot : "a";
|
|
68
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
69
|
-
Comp,
|
|
70
|
-
{
|
|
71
|
-
"data-slot": "breadcrumb-link",
|
|
72
|
-
className: (0, import_utils.cn)("hover:text-foreground transition-colors", className),
|
|
73
|
-
...props
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
function BreadcrumbPage({ className, ...props }) {
|
|
78
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
79
|
-
"span",
|
|
80
|
-
{
|
|
81
|
-
"data-slot": "breadcrumb-page",
|
|
82
|
-
role: "link",
|
|
83
|
-
"aria-disabled": "true",
|
|
84
|
-
"aria-current": "page",
|
|
85
|
-
className: (0, import_utils.cn)("text-foreground font-normal", className),
|
|
86
|
-
...props
|
|
87
|
-
}
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
function BreadcrumbSeparator({
|
|
91
|
-
children,
|
|
92
|
-
className,
|
|
93
|
-
...props
|
|
94
|
-
}) {
|
|
95
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
96
|
-
"li",
|
|
97
|
-
{
|
|
98
|
-
"data-slot": "breadcrumb-separator",
|
|
99
|
-
role: "presentation",
|
|
100
|
-
"aria-hidden": "true",
|
|
101
|
-
className: (0, import_utils.cn)("[&>svg]:size-3.5", className),
|
|
102
|
-
...props,
|
|
103
|
-
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronRight, {})
|
|
104
|
-
}
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
function BreadcrumbEllipsis({
|
|
108
|
-
className,
|
|
109
|
-
...props
|
|
110
|
-
}) {
|
|
111
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
112
|
-
"span",
|
|
113
|
-
{
|
|
114
|
-
"data-slot": "breadcrumb-ellipsis",
|
|
115
|
-
role: "presentation",
|
|
116
|
-
"aria-hidden": "true",
|
|
117
|
-
className: (0, import_utils.cn)("flex size-9 items-center justify-center", className),
|
|
118
|
-
...props,
|
|
119
|
-
children: [
|
|
120
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.MoreHorizontal, { className: "size-4" }),
|
|
121
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "More" })
|
|
122
|
-
]
|
|
123
|
-
}
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
127
|
-
0 && (module.exports = {
|
|
128
|
-
Breadcrumb,
|
|
129
|
-
BreadcrumbEllipsis,
|
|
130
|
-
BreadcrumbItem,
|
|
131
|
-
BreadcrumbLink,
|
|
132
|
-
BreadcrumbList,
|
|
133
|
-
BreadcrumbPage,
|
|
134
|
-
BreadcrumbSeparator
|
|
135
|
-
});
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Breadcrumb navigation landmark (`<nav aria-label="breadcrumb">`). Compose the
|
|
6
|
-
* trail with {@link BreadcrumbList}, {@link BreadcrumbItem},
|
|
7
|
-
* {@link BreadcrumbLink}, {@link BreadcrumbPage} (current page),
|
|
8
|
-
* {@link BreadcrumbSeparator} and {@link BreadcrumbEllipsis}.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```tsx
|
|
12
|
-
* <Breadcrumb>
|
|
13
|
-
* <BreadcrumbList>
|
|
14
|
-
* <BreadcrumbItem><BreadcrumbLink href="/">Home</BreadcrumbLink></BreadcrumbItem>
|
|
15
|
-
* <BreadcrumbSeparator />
|
|
16
|
-
* <BreadcrumbItem><BreadcrumbPage>Settings</BreadcrumbPage></BreadcrumbItem>
|
|
17
|
-
* </BreadcrumbList>
|
|
18
|
-
* </Breadcrumb>
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
declare function Breadcrumb({ ...props }: React.ComponentProps<'nav'>): react_jsx_runtime.JSX.Element;
|
|
22
|
-
declare function BreadcrumbList({ className, ...props }: React.ComponentProps<'ol'>): react_jsx_runtime.JSX.Element;
|
|
23
|
-
declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<'li'>): react_jsx_runtime.JSX.Element;
|
|
24
|
-
/** Interactive breadcrumb link (`<a>`, or any element via `asChild` + Radix `Slot`). */
|
|
25
|
-
declare function BreadcrumbLink({ asChild, className, ...props }: React.ComponentProps<'a'> & {
|
|
26
|
-
asChild?: boolean;
|
|
27
|
-
}): react_jsx_runtime.JSX.Element;
|
|
28
|
-
declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
|
|
29
|
-
/** Visual separator between items; defaults to a chevron when no children are given. */
|
|
30
|
-
declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<'li'>): react_jsx_runtime.JSX.Element;
|
|
31
|
-
declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
|
|
32
|
-
|
|
33
|
-
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
|
@@ -1,87 +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/button/index.tsx
|
|
21
|
-
var button_exports = {};
|
|
22
|
-
__export(button_exports, {
|
|
23
|
-
Button: () => Button,
|
|
24
|
-
buttonVariants: () => buttonVariants
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(button_exports);
|
|
27
|
-
var import_utils = require("@foundrykit/utils");
|
|
28
|
-
var import_react_slot = require("@radix-ui/react-slot");
|
|
29
|
-
var import_class_variance_authority = require("class-variance-authority");
|
|
30
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
|
-
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
32
|
-
"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 shrink-0 items-center justify-center gap-2 rounded-[var(--button-radius,calc(var(--radius)-2px))] font-[var(--button-weight,500)] text-sm whitespace-nowrap [text-transform:var(--button-case,none)] transition-all outline-none focus-visible:ring-[3px] active:not-disabled:scale-[var(--motion-press-scale,0.97)] disabled:pointer-events-none disabled:opacity-50 motion-reduce:active:not-disabled:scale-100 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
33
|
-
{
|
|
34
|
-
variants: {
|
|
35
|
-
variant: {
|
|
36
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90 shadow-xs",
|
|
37
|
-
destructive: "bg-destructive hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white shadow-xs",
|
|
38
|
-
outline: "bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border shadow-xs",
|
|
39
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-xs",
|
|
40
|
-
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
41
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
42
|
-
"inline-link": "inline align-baseline text-inherit underline underline-offset-4 hover:text-inherit",
|
|
43
|
-
navlink: "text-foreground hover:text-accent-foreground underline-offset-4 hover:underline"
|
|
44
|
-
},
|
|
45
|
-
size: {
|
|
46
|
-
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
47
|
-
sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
48
|
-
lg: "h-10 px-6 has-[>svg]:px-4",
|
|
49
|
-
icon: "size-9"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
// The link-style variants read as inline text, not a button box: strip the
|
|
53
|
-
// height/padding/radius that `size` would otherwise apply, across all sizes.
|
|
54
|
-
compoundVariants: [
|
|
55
|
-
{
|
|
56
|
-
variant: ["inline-link", "navlink"],
|
|
57
|
-
className: "h-auto rounded-none p-0 has-[>svg]:px-0"
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
defaultVariants: {
|
|
61
|
-
variant: "default",
|
|
62
|
-
size: "default"
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
);
|
|
66
|
-
function Button({
|
|
67
|
-
className,
|
|
68
|
-
variant,
|
|
69
|
-
size,
|
|
70
|
-
asChild = false,
|
|
71
|
-
...props
|
|
72
|
-
}) {
|
|
73
|
-
const Comp = asChild ? import_react_slot.Slot : "button";
|
|
74
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
75
|
-
Comp,
|
|
76
|
-
{
|
|
77
|
-
"data-slot": "button",
|
|
78
|
-
className: (0, import_utils.cn)(buttonVariants({ variant, size, className })),
|
|
79
|
-
...props
|
|
80
|
-
}
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
84
|
-
0 && (module.exports = {
|
|
85
|
-
Button,
|
|
86
|
-
buttonVariants
|
|
87
|
-
});
|
|
@@ -1,28 +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 { VariantProps } from 'class-variance-authority';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
|
|
6
|
-
declare const buttonVariants: (props?: ({
|
|
7
|
-
variant?: "default" | "link" | "destructive" | "secondary" | "outline" | "ghost" | "inline-link" | "navlink" | null | undefined;
|
|
8
|
-
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
9
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
|
-
interface ButtonProps extends React.ComponentProps<'button'>, VariantProps<typeof buttonVariants> {
|
|
11
|
-
/** Render as the child element (via Radix `Slot`) instead of a `<button>`. */
|
|
12
|
-
asChild?: boolean;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Clickable button with `variant` (default, destructive, outline, secondary,
|
|
16
|
-
* ghost, link, inline-link, navlink) and `size` (default, sm, lg, icon) styles from
|
|
17
|
-
* {@link buttonVariants}. Pass `asChild` to render a different element (e.g. a
|
|
18
|
-
* link) while keeping the button styling.
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```tsx
|
|
22
|
-
* <Button variant="outline" size="sm">Cancel</Button>
|
|
23
|
-
* <Button asChild><a href="/docs">Docs</a></Button>
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
declare function Button({ className, variant, size, asChild, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
27
|
-
|
|
28
|
-
export { Button, type ButtonProps, buttonVariants };
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/components/button-group/index.tsx
|
|
31
|
-
var button_group_exports = {};
|
|
32
|
-
__export(button_group_exports, {
|
|
33
|
-
ButtonGroup: () => ButtonGroup,
|
|
34
|
-
ButtonGroupSeparator: () => ButtonGroupSeparator,
|
|
35
|
-
ButtonGroupText: () => ButtonGroupText,
|
|
36
|
-
buttonGroupVariants: () => buttonGroupVariants
|
|
37
|
-
});
|
|
38
|
-
module.exports = __toCommonJS(button_group_exports);
|
|
39
|
-
var import_utils2 = require("@foundrykit/utils");
|
|
40
|
-
var import_react_slot = require("@radix-ui/react-slot");
|
|
41
|
-
var import_class_variance_authority = require("class-variance-authority");
|
|
42
|
-
|
|
43
|
-
// src/components/separator/index.tsx
|
|
44
|
-
var import_utils = require("@foundrykit/utils");
|
|
45
|
-
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
46
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
47
|
-
function Separator({
|
|
48
|
-
className,
|
|
49
|
-
orientation = "horizontal",
|
|
50
|
-
decorative = true,
|
|
51
|
-
...props
|
|
52
|
-
}) {
|
|
53
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
-
SeparatorPrimitive.Root,
|
|
55
|
-
{
|
|
56
|
-
"data-slot": "separator",
|
|
57
|
-
decorative,
|
|
58
|
-
orientation,
|
|
59
|
-
className: (0, import_utils.cn)(
|
|
60
|
-
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
61
|
-
className
|
|
62
|
-
),
|
|
63
|
-
...props
|
|
64
|
-
}
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// src/components/button-group/index.tsx
|
|
69
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
70
|
-
var buttonGroupVariants = (0, import_class_variance_authority.cva)(
|
|
71
|
-
"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
72
|
-
{
|
|
73
|
-
variants: {
|
|
74
|
-
orientation: {
|
|
75
|
-
horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
|
|
76
|
-
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
defaultVariants: {
|
|
80
|
-
orientation: "horizontal"
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
);
|
|
84
|
-
function ButtonGroup({
|
|
85
|
-
className,
|
|
86
|
-
orientation,
|
|
87
|
-
...props
|
|
88
|
-
}) {
|
|
89
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
90
|
-
"div",
|
|
91
|
-
{
|
|
92
|
-
"data-slot": "button-group",
|
|
93
|
-
"data-orientation": orientation,
|
|
94
|
-
role: "group",
|
|
95
|
-
className: (0, import_utils2.cn)(buttonGroupVariants({ orientation }), className),
|
|
96
|
-
...props
|
|
97
|
-
}
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
function ButtonGroupText({
|
|
101
|
-
className,
|
|
102
|
-
asChild = false,
|
|
103
|
-
...props
|
|
104
|
-
}) {
|
|
105
|
-
const Comp = asChild ? import_react_slot.Slot : "div";
|
|
106
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
107
|
-
Comp,
|
|
108
|
-
{
|
|
109
|
-
"data-slot": "button-group-text",
|
|
110
|
-
className: (0, import_utils2.cn)(
|
|
111
|
-
"bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
112
|
-
className
|
|
113
|
-
),
|
|
114
|
-
...props
|
|
115
|
-
}
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
function ButtonGroupSeparator({
|
|
119
|
-
className,
|
|
120
|
-
orientation = "vertical",
|
|
121
|
-
...props
|
|
122
|
-
}) {
|
|
123
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
124
|
-
Separator,
|
|
125
|
-
{
|
|
126
|
-
"data-slot": "button-group-separator",
|
|
127
|
-
orientation,
|
|
128
|
-
className: (0, import_utils2.cn)(
|
|
129
|
-
"bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto",
|
|
130
|
-
className
|
|
131
|
-
),
|
|
132
|
-
...props
|
|
133
|
-
}
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
137
|
-
0 && (module.exports = {
|
|
138
|
-
ButtonGroup,
|
|
139
|
-
ButtonGroupSeparator,
|
|
140
|
-
ButtonGroupText,
|
|
141
|
-
buttonGroupVariants
|
|
142
|
-
});
|
|
@@ -1,33 +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 { VariantProps } from 'class-variance-authority';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import { Separator } from '../separator/index.cjs';
|
|
6
|
-
import '@radix-ui/react-separator';
|
|
7
|
-
|
|
8
|
-
declare const buttonGroupVariants: (props?: ({
|
|
9
|
-
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
10
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
|
-
/**
|
|
12
|
-
* Groups related buttons (and compatible controls) into a single connected
|
|
13
|
-
* cluster, merging their adjacent borders and corners. Use `orientation`
|
|
14
|
-
* (`horizontal`/`vertical`) and compose with {@link ButtonGroupText} and
|
|
15
|
-
* {@link ButtonGroupSeparator}.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```tsx
|
|
19
|
-
* <ButtonGroup>
|
|
20
|
-
* <Button variant="outline">Prev</Button>
|
|
21
|
-
* <Button variant="outline">Next</Button>
|
|
22
|
-
* </ButtonGroup>
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
declare function ButtonGroup({ className, orientation, ...props }: React.ComponentProps<'div'> & VariantProps<typeof buttonGroupVariants>): react_jsx_runtime.JSX.Element;
|
|
26
|
-
/** Non-interactive label segment inside a {@link ButtonGroup}; set `asChild` to render custom markup. */
|
|
27
|
-
declare function ButtonGroupText({ className, asChild, ...props }: React.ComponentProps<'div'> & {
|
|
28
|
-
asChild?: boolean;
|
|
29
|
-
}): react_jsx_runtime.JSX.Element;
|
|
30
|
-
/** Divider between segments of a {@link ButtonGroup}; defaults to a vertical orientation. */
|
|
31
|
-
declare function ButtonGroupSeparator({ className, orientation, ...props }: React.ComponentProps<typeof Separator>): react_jsx_runtime.JSX.Element;
|
|
32
|
-
|
|
33
|
-
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
|
|
@@ -1,104 +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/card/index.tsx
|
|
21
|
-
var card_exports = {};
|
|
22
|
-
__export(card_exports, {
|
|
23
|
-
Card: () => Card,
|
|
24
|
-
CardContent: () => CardContent,
|
|
25
|
-
CardDescription: () => CardDescription,
|
|
26
|
-
CardFooter: () => CardFooter,
|
|
27
|
-
CardHeader: () => CardHeader,
|
|
28
|
-
CardTitle: () => CardTitle
|
|
29
|
-
});
|
|
30
|
-
module.exports = __toCommonJS(card_exports);
|
|
31
|
-
var import_utils = require("@foundrykit/utils");
|
|
32
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
|
-
function Card({ className, ...props }) {
|
|
34
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
35
|
-
"div",
|
|
36
|
-
{
|
|
37
|
-
"data-slot": "card",
|
|
38
|
-
className: (0, import_utils.cn)(
|
|
39
|
-
"bg-card text-card-foreground rounded-[var(--card-radius,calc(var(--radius)+4px))] border shadow",
|
|
40
|
-
className
|
|
41
|
-
),
|
|
42
|
-
...props
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
function CardHeader({ className, ...props }) {
|
|
47
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
48
|
-
"div",
|
|
49
|
-
{
|
|
50
|
-
"data-slot": "card-header",
|
|
51
|
-
className: (0, import_utils.cn)("flex flex-col space-y-1.5 p-6", className),
|
|
52
|
-
...props
|
|
53
|
-
}
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
function CardTitle({ className, ...props }) {
|
|
57
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
58
|
-
"h3",
|
|
59
|
-
{
|
|
60
|
-
"data-slot": "card-title",
|
|
61
|
-
className: (0, import_utils.cn)("leading-none font-semibold tracking-tight", className),
|
|
62
|
-
...props
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
function CardDescription({ className, ...props }) {
|
|
67
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
68
|
-
"p",
|
|
69
|
-
{
|
|
70
|
-
"data-slot": "card-description",
|
|
71
|
-
className: (0, import_utils.cn)("text-muted-foreground text-sm", className),
|
|
72
|
-
...props
|
|
73
|
-
}
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
function CardContent({ className, ...props }) {
|
|
77
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
78
|
-
"div",
|
|
79
|
-
{
|
|
80
|
-
"data-slot": "card-content",
|
|
81
|
-
className: (0, import_utils.cn)("p-6 pt-0", className),
|
|
82
|
-
...props
|
|
83
|
-
}
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
function CardFooter({ className, ...props }) {
|
|
87
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
88
|
-
"div",
|
|
89
|
-
{
|
|
90
|
-
"data-slot": "card-footer",
|
|
91
|
-
className: (0, import_utils.cn)("flex items-center p-6 pt-0", className),
|
|
92
|
-
...props
|
|
93
|
-
}
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
97
|
-
0 && (module.exports = {
|
|
98
|
-
Card,
|
|
99
|
-
CardContent,
|
|
100
|
-
CardDescription,
|
|
101
|
-
CardFooter,
|
|
102
|
-
CardHeader,
|
|
103
|
-
CardTitle
|
|
104
|
-
});
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Bordered, rounded surface container for grouping related content. Compose with
|
|
6
|
-
* {@link CardHeader}, {@link CardTitle}, {@link CardDescription},
|
|
7
|
-
* {@link CardContent} and {@link CardFooter}.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```tsx
|
|
11
|
-
* <Card>
|
|
12
|
-
* <CardHeader>
|
|
13
|
-
* <CardTitle>Title</CardTitle>
|
|
14
|
-
* <CardDescription>Subtitle</CardDescription>
|
|
15
|
-
* </CardHeader>
|
|
16
|
-
* <CardContent>Body</CardContent>
|
|
17
|
-
* </Card>
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
declare function Card({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
21
|
-
declare function CardHeader({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
22
|
-
declare function CardTitle({ className, ...props }: React.ComponentProps<'h3'>): react_jsx_runtime.JSX.Element;
|
|
23
|
-
declare function CardDescription({ className, ...props }: React.ComponentProps<'p'>): react_jsx_runtime.JSX.Element;
|
|
24
|
-
declare function CardContent({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
25
|
-
declare function CardFooter({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
26
|
-
|
|
27
|
-
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
@@ -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/checkbox/index.tsx
|
|
32
|
-
var checkbox_exports = {};
|
|
33
|
-
__export(checkbox_exports, {
|
|
34
|
-
Checkbox: () => Checkbox
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(checkbox_exports);
|
|
37
|
-
var import_utils = require("@foundrykit/utils");
|
|
38
|
-
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
|
|
39
|
-
var import_lucide_react = require("lucide-react");
|
|
40
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
|
-
function Checkbox({
|
|
42
|
-
className,
|
|
43
|
-
...props
|
|
44
|
-
}) {
|
|
45
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
46
|
-
CheckboxPrimitive.Root,
|
|
47
|
-
{
|
|
48
|
-
"data-slot": "checkbox",
|
|
49
|
-
className: (0, import_utils.cn)(
|
|
50
|
-
"border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-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 peer size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
51
|
-
className
|
|
52
|
-
),
|
|
53
|
-
...props,
|
|
54
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
55
|
-
CheckboxPrimitive.Indicator,
|
|
56
|
-
{
|
|
57
|
-
"data-slot": "checkbox-indicator",
|
|
58
|
-
className: "flex items-center justify-center text-current transition-none",
|
|
59
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CheckIcon, { className: "size-3.5" })
|
|
60
|
-
}
|
|
61
|
-
)
|
|
62
|
-
}
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
66
|
-
0 && (module.exports = {
|
|
67
|
-
Checkbox
|
|
68
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Checkbox built on Radix `Checkbox.Root`, rendering a check icon in its
|
|
7
|
-
* indicator when checked. Supports controlled/uncontrolled state, indeterminate,
|
|
8
|
-
* disabled and `aria-invalid` styling via the underlying Radix props.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```tsx
|
|
12
|
-
* <Checkbox checked={value} onCheckedChange={setValue} />
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
|
-
declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
16
|
-
|
|
17
|
-
export { Checkbox };
|