@foundrykit/primitives 2.0.8 → 2.0.10
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/{chunk-D4X2ZO5T.js → chunk-2SBGU5XA.js} +2 -2
- package/dist/chunk-3NQR7JZR.js +128 -0
- package/dist/{chunk-3MEIDBWZ.js → chunk-3QUMCM5K.js} +2 -2
- package/dist/chunk-B5YCE3UP.js +57 -0
- package/dist/chunk-F2TEA6ER.js +138 -0
- package/dist/{chunk-5OSYIETI.js → chunk-FRIOQFPE.js} +1 -1
- package/dist/{chunk-EDKSYP4L.js → chunk-G2YBCHWR.js} +1 -1
- package/dist/{chunk-DKBMAFIR.js → chunk-GKCBSG2W.js} +2 -0
- package/dist/chunk-HS46TIMU.js +75 -0
- package/dist/{chunk-R3IEOV2B.js → chunk-P5KEJOBH.js} +1 -1
- package/dist/{chunk-FIRYLO5W.js → chunk-SDYKJVXX.js} +2 -2
- package/dist/chunk-SIQHWNPH.js +45 -0
- package/dist/{chunk-2PXD7LAX.js → chunk-U7JIOR7A.js} +3 -3
- package/dist/{chunk-VA4MKQN7.js → chunk-W4XY3SNY.js} +1 -1
- package/dist/chunk-XCPGTXEJ.js +23 -0
- package/dist/components/alert-dialog/index.cjs +1 -1
- package/dist/components/alert-dialog/index.js +1 -1
- package/dist/components/card/index.cjs +63 -61
- package/dist/components/card/index.d.cts +8 -7
- package/dist/components/card/index.d.ts +8 -7
- package/dist/components/card/index.js +1 -1
- package/dist/components/context-menu/index.cjs +2 -2
- package/dist/components/context-menu/index.js +1 -1
- package/dist/components/dialog/index.cjs +182 -0
- package/dist/components/dialog/index.d.cts +38 -0
- package/dist/components/dialog/index.d.ts +38 -0
- package/dist/components/dialog/index.js +25 -0
- package/dist/components/dropdown/index.cjs +2 -2
- package/dist/components/dropdown/index.js +1 -1
- package/dist/components/hover-card/index.cjs +1 -1
- package/dist/components/hover-card/index.js +1 -1
- package/dist/components/input/index.cjs +16 -28
- package/dist/components/input/index.d.cts +6 -5
- package/dist/components/input/index.d.ts +6 -5
- package/dist/components/input/index.js +1 -1
- package/dist/components/input-group/index.cjs +270 -0
- package/dist/components/input-group/index.d.cts +44 -0
- package/dist/components/input-group/index.d.ts +44 -0
- package/dist/components/input-group/index.js +153 -0
- package/dist/components/menubar/index.cjs +2 -2
- package/dist/components/menubar/index.js +1 -1
- package/dist/components/navigation-menu/index.cjs +3 -3
- package/dist/components/navigation-menu/index.js +1 -1
- package/dist/components/popover/index.cjs +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/select/index.cjs +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/sheet/index.cjs +170 -0
- package/dist/components/sheet/index.d.cts +31 -0
- package/dist/components/sheet/index.d.ts +31 -0
- package/dist/components/sheet/index.js +21 -0
- package/dist/components/slider/index.cjs +2 -0
- package/dist/components/slider/index.d.cts +3 -2
- package/dist/components/slider/index.d.ts +3 -2
- package/dist/components/slider/index.js +1 -1
- package/dist/components/toggle/index.cjs +81 -0
- package/dist/components/toggle/index.d.cts +26 -0
- package/dist/components/toggle/index.d.ts +26 -0
- package/dist/components/toggle/index.js +9 -0
- package/dist/components/tooltip/index.cjs +95 -0
- package/dist/components/tooltip/index.d.cts +25 -0
- package/dist/components/tooltip/index.d.ts +25 -0
- package/dist/components/tooltip/index.js +13 -0
- package/dist/index.cjs +107 -95
- package/dist/index.d.cts +11 -105
- package/dist/index.d.ts +11 -105
- package/dist/index.js +108 -414
- package/package.json +200 -8
- package/.turbo/turbo-build.log +0 -235
- package/.turbo/turbo-type-check.log +0 -4
- package/CHANGELOG.md +0 -224
- package/dist/chunk-DFGLEAZI.js +0 -63
- package/dist/chunk-RDQF3IQE.js +0 -25
- package/postcss.config.mjs +0 -6
- package/registry.json +0 -64
- package/src/components/accordion/config.ts +0 -28
- package/src/components/accordion/index.tsx +0 -80
- package/src/components/alert/config.ts +0 -40
- package/src/components/alert/index.tsx +0 -80
- package/src/components/alert-dialog/config.ts +0 -28
- package/src/components/alert-dialog/index.tsx +0 -188
- package/src/components/aspect-ratio/config.ts +0 -27
- package/src/components/aspect-ratio/index.tsx +0 -24
- package/src/components/avatar/config.ts +0 -46
- package/src/components/avatar/index.tsx +0 -67
- package/src/components/badge/config.ts +0 -56
- package/src/components/badge/index.tsx +0 -56
- package/src/components/breadcrumb/config.ts +0 -121
- package/src/components/breadcrumb/index.tsx +0 -127
- package/src/components/button/config.ts +0 -97
- package/src/components/button/index.tsx +0 -86
- package/src/components/button-group/config.ts +0 -39
- package/src/components/button-group/index.tsx +0 -99
- package/src/components/card/config.ts +0 -89
- package/src/components/card/index.tsx +0 -98
- package/src/components/checkbox/config.ts +0 -46
- package/src/components/checkbox/index.tsx +0 -41
- package/src/components/collapsible/config.ts +0 -27
- package/src/components/collapsible/index.tsx +0 -47
- package/src/components/context-menu/config.ts +0 -28
- package/src/components/context-menu/index.tsx +0 -271
- package/src/components/dialog/config.ts +0 -582
- package/src/components/dialog/index.tsx +0 -162
- package/src/components/direction/config.ts +0 -28
- package/src/components/direction/index.tsx +0 -27
- package/src/components/drawer/config.ts +0 -28
- package/src/components/drawer/index.tsx +0 -153
- package/src/components/dropdown/config.ts +0 -262
- package/src/components/dropdown/index.tsx +0 -280
- package/src/components/empty/config.ts +0 -38
- package/src/components/empty/index.tsx +0 -127
- package/src/components/field/config.ts +0 -40
- package/src/components/field/index.tsx +0 -252
- package/src/components/hover-card/config.ts +0 -27
- package/src/components/hover-card/index.tsx +0 -56
- package/src/components/input/config.ts +0 -64
- package/src/components/input/index.tsx +0 -33
- package/src/components/input-group/config.ts +0 -209
- package/src/components/input-group/index.tsx +0 -177
- package/src/components/item/config.ts +0 -52
- package/src/components/item/index.tsx +0 -215
- package/src/components/kbd/config.ts +0 -38
- package/src/components/kbd/index.tsx +0 -40
- package/src/components/label/config.ts +0 -72
- package/src/components/label/index.tsx +0 -32
- package/src/components/menubar/config.ts +0 -28
- package/src/components/menubar/index.tsx +0 -295
- package/src/components/native-select/config.ts +0 -40
- package/src/components/native-select/index.tsx +0 -40
- package/src/components/navigation-menu/config.ts +0 -32
- package/src/components/navigation-menu/index.tsx +0 -188
- package/src/components/popover/config.ts +0 -222
- package/src/components/popover/index.tsx +0 -60
- package/src/components/progress/config.ts +0 -42
- package/src/components/progress/index.tsx +0 -39
- package/src/components/radio-group/config.ts +0 -303
- package/src/components/radio-group/index.tsx +0 -58
- package/src/components/resizable/config.ts +0 -28
- package/src/components/resizable/index.tsx +0 -67
- package/src/components/scroll-area/config.ts +0 -17
- package/src/components/scroll-area/index.tsx +0 -70
- package/src/components/select/config.ts +0 -277
- package/src/components/select/index.tsx +0 -202
- package/src/components/separator/config.ts +0 -63
- package/src/components/separator/index.tsx +0 -38
- package/src/components/sheet/config.ts +0 -16
- package/src/components/sheet/index.tsx +0 -153
- package/src/components/skeleton/config.ts +0 -77
- package/src/components/skeleton/index.tsx +0 -22
- package/src/components/slider/config.ts +0 -46
- package/src/components/slider/index.tsx +0 -73
- package/src/components/sonner/config.ts +0 -27
- package/src/components/sonner/index.tsx +0 -37
- package/src/components/spinner/config.ts +0 -40
- package/src/components/spinner/index.tsx +0 -30
- package/src/components/switch/config.ts +0 -171
- package/src/components/switch/index.tsx +0 -40
- package/src/components/table/config.ts +0 -38
- package/src/components/table/index.tsx +0 -135
- package/src/components/tabs/config.ts +0 -335
- package/src/components/tabs/index.tsx +0 -82
- package/src/components/textarea/config.ts +0 -117
- package/src/components/textarea/index.tsx +0 -26
- package/src/components/toggle/config.ts +0 -67
- package/src/components/toggle/index.tsx +0 -59
- package/src/components/toggle-group/config.ts +0 -46
- package/src/components/toggle-group/index.tsx +0 -106
- package/src/components/tooltip/config.ts +0 -16
- package/src/components/tooltip/index.tsx +0 -75
- package/src/components/typography/config.ts +0 -38
- package/src/components/typography/index.tsx +0 -172
- package/src/index.ts +0 -291
- package/tsconfig.json +0 -9
- package/tsconfig.lint.json +0 -8
- package/tsup.config.ts +0 -55
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
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
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
|
|
30
20
|
// src/components/card/index.tsx
|
|
@@ -39,58 +29,70 @@ __export(card_exports, {
|
|
|
39
29
|
});
|
|
40
30
|
module.exports = __toCommonJS(card_exports);
|
|
41
31
|
var import_utils = require("@foundrykit/utils");
|
|
42
|
-
var React = __toESM(require("react"), 1);
|
|
43
32
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
))
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
))
|
|
93
|
-
|
|
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-xl 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
|
+
}
|
|
94
96
|
// Annotate the CommonJS export names for ESM import in node:
|
|
95
97
|
0 && (module.exports = {
|
|
96
98
|
Card,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Bordered, rounded surface container for grouping related content. Compose with
|
|
5
6
|
* {@link CardHeader}, {@link CardTitle}, {@link CardDescription},
|
|
6
|
-
* {@link CardContent} and {@link CardFooter}.
|
|
7
|
+
* {@link CardContent} and {@link CardFooter}.
|
|
7
8
|
*
|
|
8
9
|
* @example
|
|
9
10
|
* ```tsx
|
|
@@ -16,11 +17,11 @@ import * as React from 'react';
|
|
|
16
17
|
* </Card>
|
|
17
18
|
* ```
|
|
18
19
|
*/
|
|
19
|
-
declare
|
|
20
|
-
declare
|
|
21
|
-
declare
|
|
22
|
-
declare
|
|
23
|
-
declare
|
|
24
|
-
declare
|
|
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;
|
|
25
26
|
|
|
26
27
|
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Bordered, rounded surface container for grouping related content. Compose with
|
|
5
6
|
* {@link CardHeader}, {@link CardTitle}, {@link CardDescription},
|
|
6
|
-
* {@link CardContent} and {@link CardFooter}.
|
|
7
|
+
* {@link CardContent} and {@link CardFooter}.
|
|
7
8
|
*
|
|
8
9
|
* @example
|
|
9
10
|
* ```tsx
|
|
@@ -16,11 +17,11 @@ import * as React from 'react';
|
|
|
16
17
|
* </Card>
|
|
17
18
|
* ```
|
|
18
19
|
*/
|
|
19
|
-
declare
|
|
20
|
-
declare
|
|
21
|
-
declare
|
|
22
|
-
declare
|
|
23
|
-
declare
|
|
24
|
-
declare
|
|
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;
|
|
25
26
|
|
|
26
27
|
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
@@ -120,7 +120,7 @@ function ContextMenuSubContent({
|
|
|
120
120
|
{
|
|
121
121
|
"data-slot": "context-menu-sub-content",
|
|
122
122
|
className: (0, import_utils.cn)(
|
|
123
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
123
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 motion-safe:data-[state=closed]:zoom-out-95 motion-safe:data-[state=open]:zoom-in-95 motion-safe:data-[side=bottom]:slide-in-from-top-2 motion-safe:data-[side=left]:slide-in-from-right-2 motion-safe:data-[side=right]:slide-in-from-left-2 motion-safe:data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
124
124
|
className
|
|
125
125
|
),
|
|
126
126
|
...props
|
|
@@ -136,7 +136,7 @@ function ContextMenuContent({
|
|
|
136
136
|
{
|
|
137
137
|
"data-slot": "context-menu-content",
|
|
138
138
|
className: (0, import_utils.cn)(
|
|
139
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
139
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 motion-safe:data-[state=closed]:zoom-out-95 motion-safe:data-[state=open]:zoom-in-95 motion-safe:data-[side=bottom]:slide-in-from-top-2 motion-safe:data-[side=left]:slide-in-from-right-2 motion-safe:data-[side=right]:slide-in-from-left-2 motion-safe:data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
140
140
|
className
|
|
141
141
|
),
|
|
142
142
|
...props
|
|
@@ -0,0 +1,182 @@
|
|
|
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/dialog/index.tsx
|
|
32
|
+
var dialog_exports = {};
|
|
33
|
+
__export(dialog_exports, {
|
|
34
|
+
Dialog: () => Dialog,
|
|
35
|
+
DialogClose: () => DialogClose,
|
|
36
|
+
DialogContent: () => DialogContent,
|
|
37
|
+
DialogDescription: () => DialogDescription,
|
|
38
|
+
DialogFooter: () => DialogFooter,
|
|
39
|
+
DialogHeader: () => DialogHeader,
|
|
40
|
+
DialogOverlay: () => DialogOverlay,
|
|
41
|
+
DialogPortal: () => DialogPortal,
|
|
42
|
+
DialogTitle: () => DialogTitle,
|
|
43
|
+
DialogTrigger: () => DialogTrigger
|
|
44
|
+
});
|
|
45
|
+
module.exports = __toCommonJS(dialog_exports);
|
|
46
|
+
var import_utils = require("@foundrykit/utils");
|
|
47
|
+
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
48
|
+
var import_lucide_react = require("lucide-react");
|
|
49
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
50
|
+
function Dialog({
|
|
51
|
+
...props
|
|
52
|
+
}) {
|
|
53
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
54
|
+
}
|
|
55
|
+
function DialogTrigger({
|
|
56
|
+
...props
|
|
57
|
+
}) {
|
|
58
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
59
|
+
}
|
|
60
|
+
function DialogPortal({
|
|
61
|
+
...props
|
|
62
|
+
}) {
|
|
63
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
|
|
64
|
+
}
|
|
65
|
+
function DialogClose({
|
|
66
|
+
...props
|
|
67
|
+
}) {
|
|
68
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
|
|
69
|
+
}
|
|
70
|
+
function DialogOverlay({
|
|
71
|
+
className,
|
|
72
|
+
...props
|
|
73
|
+
}) {
|
|
74
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
75
|
+
DialogPrimitive.Overlay,
|
|
76
|
+
{
|
|
77
|
+
"data-slot": "dialog-overlay",
|
|
78
|
+
className: (0, import_utils.cn)(
|
|
79
|
+
"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",
|
|
80
|
+
className
|
|
81
|
+
),
|
|
82
|
+
...props
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
function DialogContent({
|
|
87
|
+
className,
|
|
88
|
+
children,
|
|
89
|
+
showCloseButton = true,
|
|
90
|
+
...props
|
|
91
|
+
}) {
|
|
92
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
93
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogOverlay, {}),
|
|
94
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
95
|
+
DialogPrimitive.Content,
|
|
96
|
+
{
|
|
97
|
+
"data-slot": "dialog-content",
|
|
98
|
+
className: (0, import_utils.cn)(
|
|
99
|
+
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 motion-safe:data-[state=closed]:zoom-out-95 motion-safe:data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
100
|
+
className
|
|
101
|
+
),
|
|
102
|
+
...props,
|
|
103
|
+
children: [
|
|
104
|
+
children,
|
|
105
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
106
|
+
DialogPrimitive.Close,
|
|
107
|
+
{
|
|
108
|
+
"data-slot": "dialog-close",
|
|
109
|
+
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground 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 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
110
|
+
children: [
|
|
111
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.XIcon, {}),
|
|
112
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Close" })
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
] });
|
|
120
|
+
}
|
|
121
|
+
function DialogHeader({ className, ...props }) {
|
|
122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
123
|
+
"div",
|
|
124
|
+
{
|
|
125
|
+
"data-slot": "dialog-header",
|
|
126
|
+
className: (0, import_utils.cn)("flex flex-col gap-2 text-center sm:text-left", className),
|
|
127
|
+
...props
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
function DialogFooter({ className, ...props }) {
|
|
132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
133
|
+
"div",
|
|
134
|
+
{
|
|
135
|
+
"data-slot": "dialog-footer",
|
|
136
|
+
className: (0, import_utils.cn)(
|
|
137
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
138
|
+
className
|
|
139
|
+
),
|
|
140
|
+
...props
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
function DialogTitle({
|
|
145
|
+
className,
|
|
146
|
+
...props
|
|
147
|
+
}) {
|
|
148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
149
|
+
DialogPrimitive.Title,
|
|
150
|
+
{
|
|
151
|
+
"data-slot": "dialog-title",
|
|
152
|
+
className: (0, import_utils.cn)("text-lg leading-none font-semibold", className),
|
|
153
|
+
...props
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
function DialogDescription({
|
|
158
|
+
className,
|
|
159
|
+
...props
|
|
160
|
+
}) {
|
|
161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
162
|
+
DialogPrimitive.Description,
|
|
163
|
+
{
|
|
164
|
+
"data-slot": "dialog-description",
|
|
165
|
+
className: (0, import_utils.cn)("text-muted-foreground text-sm", className),
|
|
166
|
+
...props
|
|
167
|
+
}
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
171
|
+
0 && (module.exports = {
|
|
172
|
+
Dialog,
|
|
173
|
+
DialogClose,
|
|
174
|
+
DialogContent,
|
|
175
|
+
DialogDescription,
|
|
176
|
+
DialogFooter,
|
|
177
|
+
DialogHeader,
|
|
178
|
+
DialogOverlay,
|
|
179
|
+
DialogPortal,
|
|
180
|
+
DialogTitle,
|
|
181
|
+
DialogTrigger
|
|
182
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
* Modal dialog root built on Radix `Dialog.Root`. Compose with
|
|
7
|
+
* {@link DialogTrigger}, {@link DialogContent} (which renders the overlay and an
|
|
8
|
+
* optional close button), {@link DialogHeader}, {@link DialogTitle},
|
|
9
|
+
* {@link DialogDescription} and {@link DialogFooter}.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <Dialog>
|
|
14
|
+
* <DialogTrigger>Open</DialogTrigger>
|
|
15
|
+
* <DialogContent>
|
|
16
|
+
* <DialogHeader><DialogTitle>Title</DialogTitle></DialogHeader>
|
|
17
|
+
* </DialogContent>
|
|
18
|
+
* </Dialog>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
22
|
+
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
23
|
+
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
24
|
+
declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): react_jsx_runtime.JSX.Element;
|
|
25
|
+
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): react_jsx_runtime.JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* Centered, animated dialog panel rendered in a portal over a dark overlay.
|
|
28
|
+
* Set `showCloseButton={false}` to hide the built-in top-right close button.
|
|
29
|
+
*/
|
|
30
|
+
declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
31
|
+
showCloseButton?: boolean;
|
|
32
|
+
}): react_jsx_runtime.JSX.Element;
|
|
33
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
34
|
+
declare function DialogFooter({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
35
|
+
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime.JSX.Element;
|
|
36
|
+
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime.JSX.Element;
|
|
37
|
+
|
|
38
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
* Modal dialog root built on Radix `Dialog.Root`. Compose with
|
|
7
|
+
* {@link DialogTrigger}, {@link DialogContent} (which renders the overlay and an
|
|
8
|
+
* optional close button), {@link DialogHeader}, {@link DialogTitle},
|
|
9
|
+
* {@link DialogDescription} and {@link DialogFooter}.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <Dialog>
|
|
14
|
+
* <DialogTrigger>Open</DialogTrigger>
|
|
15
|
+
* <DialogContent>
|
|
16
|
+
* <DialogHeader><DialogTitle>Title</DialogTitle></DialogHeader>
|
|
17
|
+
* </DialogContent>
|
|
18
|
+
* </Dialog>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
22
|
+
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
23
|
+
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
24
|
+
declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): react_jsx_runtime.JSX.Element;
|
|
25
|
+
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): react_jsx_runtime.JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* Centered, animated dialog panel rendered in a portal over a dark overlay.
|
|
28
|
+
* Set `showCloseButton={false}` to hide the built-in top-right close button.
|
|
29
|
+
*/
|
|
30
|
+
declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
31
|
+
showCloseButton?: boolean;
|
|
32
|
+
}): react_jsx_runtime.JSX.Element;
|
|
33
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
34
|
+
declare function DialogFooter({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
35
|
+
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime.JSX.Element;
|
|
36
|
+
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime.JSX.Element;
|
|
37
|
+
|
|
38
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Dialog,
|
|
4
|
+
DialogClose,
|
|
5
|
+
DialogContent,
|
|
6
|
+
DialogDescription,
|
|
7
|
+
DialogFooter,
|
|
8
|
+
DialogHeader,
|
|
9
|
+
DialogOverlay,
|
|
10
|
+
DialogPortal,
|
|
11
|
+
DialogTitle,
|
|
12
|
+
DialogTrigger
|
|
13
|
+
} from "../../chunk-F2TEA6ER.js";
|
|
14
|
+
export {
|
|
15
|
+
Dialog,
|
|
16
|
+
DialogClose,
|
|
17
|
+
DialogContent,
|
|
18
|
+
DialogDescription,
|
|
19
|
+
DialogFooter,
|
|
20
|
+
DialogHeader,
|
|
21
|
+
DialogOverlay,
|
|
22
|
+
DialogPortal,
|
|
23
|
+
DialogTitle,
|
|
24
|
+
DialogTrigger
|
|
25
|
+
};
|
|
@@ -84,7 +84,7 @@ function DropdownMenuContent({
|
|
|
84
84
|
"data-slot": "dropdown-menu-content",
|
|
85
85
|
sideOffset,
|
|
86
86
|
className: (0, import_utils.cn)(
|
|
87
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
87
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 motion-safe:data-[state=closed]:zoom-out-95 motion-safe:data-[state=open]:zoom-in-95 motion-safe:data-[side=bottom]:slide-in-from-top-2 motion-safe:data-[side=left]:slide-in-from-right-2 motion-safe:data-[side=right]:slide-in-from-left-2 motion-safe:data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
88
88
|
className
|
|
89
89
|
),
|
|
90
90
|
...props
|
|
@@ -255,7 +255,7 @@ function DropdownMenuSubContent({
|
|
|
255
255
|
{
|
|
256
256
|
"data-slot": "dropdown-menu-sub-content",
|
|
257
257
|
className: (0, import_utils.cn)(
|
|
258
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
258
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 motion-safe:data-[state=closed]:zoom-out-95 motion-safe:data-[state=open]:zoom-in-95 motion-safe:data-[side=bottom]:slide-in-from-top-2 motion-safe:data-[side=left]:slide-in-from-right-2 motion-safe:data-[side=right]:slide-in-from-left-2 motion-safe:data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
259
259
|
className
|
|
260
260
|
),
|
|
261
261
|
...props
|
|
@@ -62,7 +62,7 @@ function HoverCardContent({
|
|
|
62
62
|
align,
|
|
63
63
|
sideOffset,
|
|
64
64
|
className: (0, import_utils.cn)(
|
|
65
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
65
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 motion-safe:data-[state=closed]:zoom-out-95 motion-safe:data-[state=open]:zoom-in-95 motion-safe:data-[side=bottom]:slide-in-from-top-2 motion-safe:data-[side=left]:slide-in-from-right-2 motion-safe:data-[side=right]:slide-in-from-left-2 motion-safe:data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
66
66
|
className
|
|
67
67
|
),
|
|
68
68
|
...props
|