@cmdniels/uikit 1.2.0 → 1.3.1
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/out/components/dialog/Dialog.d.ts +2 -0
- package/out/components/dialog/Dialog.js +18 -0
- package/out/components/dialog/DialogClose.d.ts +2 -0
- package/out/components/dialog/DialogClose.js +18 -0
- package/out/components/dialog/DialogContent.d.ts +4 -0
- package/out/components/dialog/DialogContent.js +23 -0
- package/out/components/dialog/DialogDescription.d.ts +2 -0
- package/out/components/dialog/DialogDescription.js +19 -0
- package/out/components/dialog/DialogFooter.d.ts +4 -0
- package/out/components/dialog/DialogFooter.js +20 -0
- package/out/components/dialog/DialogHeader.d.ts +2 -0
- package/out/components/dialog/DialogHeader.js +18 -0
- package/out/components/dialog/DialogOverlay.d.ts +2 -0
- package/out/components/dialog/DialogOverlay.js +19 -0
- package/out/components/dialog/DialogPortal.d.ts +2 -0
- package/out/components/dialog/DialogPortal.js +18 -0
- package/out/components/dialog/DialogTitle.d.ts +2 -0
- package/out/components/dialog/DialogTitle.js +19 -0
- package/out/components/dialog/DialogTrigger.d.ts +2 -0
- package/out/components/dialog/DialogTrigger.js +18 -0
- package/out/components/sonner/Toaster.js +7 -3
- package/out/index.d.ts +10 -0
- package/out/index.js +11 -0
- package/package.json +4 -3
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
15
|
+
export default function Dialog(_a) {
|
|
16
|
+
var props = __rest(_a, []);
|
|
17
|
+
return _jsx(DialogPrimitive.Root, Object.assign({ "data-slot": "dialog" }, props));
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
15
|
+
export default function DialogClose(_a) {
|
|
16
|
+
var props = __rest(_a, []);
|
|
17
|
+
return _jsx(DialogPrimitive.Close, Object.assign({ "data-slot": "dialog-close" }, props));
|
|
18
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
15
|
+
import { IconX } from "@tabler/icons-react";
|
|
16
|
+
import cn from "../../cn";
|
|
17
|
+
import Button from "../../components/button/Button";
|
|
18
|
+
import DialogOverlay from "./DialogOverlay";
|
|
19
|
+
import DialogPortal from "./DialogPortal";
|
|
20
|
+
export default function DialogContent(_a) {
|
|
21
|
+
var { className, children, showCloseButton = true } = _a, props = __rest(_a, ["className", "children", "showCloseButton"]);
|
|
22
|
+
return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Popup, Object.assign({ "data-slot": "dialog-content", className: cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-1/2 gap-6 rounded-xl bg-background p-6 text-sm ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className) }, props, { children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-4 right-4", size: "icon-sm" }), children: [_jsx(IconX, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] }))] }));
|
|
23
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
15
|
+
import cn from "../../cn";
|
|
16
|
+
export default function DialogDescription(_a) {
|
|
17
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
18
|
+
return (_jsx(DialogPrimitive.Description, Object.assign({ "data-slot": "dialog-description", className: cn("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className) }, props)));
|
|
19
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
15
|
+
import cn from "../../cn";
|
|
16
|
+
import Button from "../../components/button/Button";
|
|
17
|
+
export default function DialogFooter(_a) {
|
|
18
|
+
var { className, showCloseButton = false, children } = _a, props = __rest(_a, ["className", "showCloseButton", "children"]);
|
|
19
|
+
return (_jsxs("div", Object.assign({ "data-slot": "dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className) }, props, { children: [children, showCloseButton && (_jsx(DialogPrimitive.Close, { render: _jsx(Button, { variant: "outline" }), children: "Close" }))] })));
|
|
20
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import cn from "../../cn";
|
|
15
|
+
export default function DialogHeader(_a) {
|
|
16
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
17
|
+
return _jsx("div", Object.assign({ "data-slot": "dialog-header", className: cn("flex flex-col gap-2", className) }, props));
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
15
|
+
import cn from "../../cn";
|
|
16
|
+
export default function DialogOverlay(_a) {
|
|
17
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
18
|
+
return (_jsx(DialogPrimitive.Backdrop, Object.assign({ "data-slot": "dialog-overlay", className: cn("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className) }, props)));
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
15
|
+
export default function DialogPortal(_a) {
|
|
16
|
+
var props = __rest(_a, []);
|
|
17
|
+
return _jsx(DialogPrimitive.Portal, Object.assign({ "data-slot": "dialog-portal" }, props));
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
15
|
+
import cn from "../../cn";
|
|
16
|
+
export default function DialogTitle(_a) {
|
|
17
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
18
|
+
return (_jsx(DialogPrimitive.Title, Object.assign({ "data-slot": "dialog-title", className: cn("leading-none font-medium", className) }, props)));
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
15
|
+
export default function DialogTrigger(_a) {
|
|
16
|
+
var props = __rest(_a, []);
|
|
17
|
+
return _jsx(DialogPrimitive.Trigger, Object.assign({ "data-slot": "dialog-trigger" }, props));
|
|
18
|
+
}
|
|
@@ -25,13 +25,17 @@ export default function Toaster(_a) {
|
|
|
25
25
|
error: _jsx(IconAlertOctagon, { className: "size-4" }),
|
|
26
26
|
loading: _jsx(IconLoader, { className: "size-4 animate-spin" }),
|
|
27
27
|
}, style: {
|
|
28
|
-
"--normal-bg": "var(--
|
|
29
|
-
"--normal-text": "var(--
|
|
28
|
+
"--normal-bg": "var(--card)",
|
|
29
|
+
"--normal-text": "var(--card-foreground)",
|
|
30
30
|
"--normal-border": "var(--border)",
|
|
31
31
|
"--border-radius": "var(--radius)",
|
|
32
32
|
}, toastOptions: {
|
|
33
33
|
classNames: {
|
|
34
|
-
toast: "cn-toast",
|
|
34
|
+
toast: "cn-toast backdrop-blur-xs",
|
|
35
|
+
success: "bg-green-50/80! text-green-700! border-green-300! dark:bg-green-950/80! dark:text-green-300! dark:border-green-700!",
|
|
36
|
+
error: "bg-red-50/80! text-red-700! border-red-300! dark:bg-red-950/80! dark:text-red-300! dark:border-red-700!",
|
|
37
|
+
warning: "bg-yellow-50/80! text-yellow-700! border-yellow-300! dark:bg-yellow-950/80! dark:text-yellow-300! dark:border-yellow-700!",
|
|
38
|
+
info: "bg-blue-50/80! text-blue-700! border-blue-300! dark:bg-blue-950/80! dark:text-blue-300! dark:border-blue-700!",
|
|
35
39
|
},
|
|
36
40
|
} }, props)));
|
|
37
41
|
}
|
package/out/index.d.ts
CHANGED
|
@@ -75,6 +75,16 @@ export { default as ContextMenuSubTrigger } from "./components/context-menu/Cont
|
|
|
75
75
|
export { default as ContextMenuTrigger } from "./components/context-menu/ContextMenuTrigger";
|
|
76
76
|
export { default as CopyInput } from "./components/copy-input/CopyInput";
|
|
77
77
|
export { default as DatePicker } from "./components/date-picker/DatePicker";
|
|
78
|
+
export { default as Dialog } from "./components/dialog/Dialog";
|
|
79
|
+
export { default as DialogClose } from "./components/dialog/DialogClose";
|
|
80
|
+
export { default as DialogContent } from "./components/dialog/DialogContent";
|
|
81
|
+
export { default as DialogDescription } from "./components/dialog/DialogDescription";
|
|
82
|
+
export { default as DialogFooter } from "./components/dialog/DialogFooter";
|
|
83
|
+
export { default as DialogHeader } from "./components/dialog/DialogHeader";
|
|
84
|
+
export { default as DialogOverlay } from "./components/dialog/DialogOverlay";
|
|
85
|
+
export { default as DialogPortal } from "./components/dialog/DialogPortal";
|
|
86
|
+
export { default as DialogTitle } from "./components/dialog/DialogTitle";
|
|
87
|
+
export { default as DialogTrigger } from "./components/dialog/DialogTrigger";
|
|
78
88
|
export { default as DropdownMenu } from "./components/dropdown-menu/DropdownMenu";
|
|
79
89
|
export { default as DropdownMenuCheckboxItem } from "./components/dropdown-menu/DropdownMenuCheckboxItem";
|
|
80
90
|
export { default as DropdownMenuContent } from "./components/dropdown-menu/DropdownMenuContent";
|
package/out/index.js
CHANGED
|
@@ -88,6 +88,17 @@ export { default as ContextMenuTrigger } from "./components/context-menu/Context
|
|
|
88
88
|
export { default as CopyInput } from "./components/copy-input/CopyInput";
|
|
89
89
|
// Date Picker
|
|
90
90
|
export { default as DatePicker } from "./components/date-picker/DatePicker";
|
|
91
|
+
// Dialog
|
|
92
|
+
export { default as Dialog } from "./components/dialog/Dialog";
|
|
93
|
+
export { default as DialogClose } from "./components/dialog/DialogClose";
|
|
94
|
+
export { default as DialogContent } from "./components/dialog/DialogContent";
|
|
95
|
+
export { default as DialogDescription } from "./components/dialog/DialogDescription";
|
|
96
|
+
export { default as DialogFooter } from "./components/dialog/DialogFooter";
|
|
97
|
+
export { default as DialogHeader } from "./components/dialog/DialogHeader";
|
|
98
|
+
export { default as DialogOverlay } from "./components/dialog/DialogOverlay";
|
|
99
|
+
export { default as DialogPortal } from "./components/dialog/DialogPortal";
|
|
100
|
+
export { default as DialogTitle } from "./components/dialog/DialogTitle";
|
|
101
|
+
export { default as DialogTrigger } from "./components/dialog/DialogTrigger";
|
|
91
102
|
// Dropdown Menu
|
|
92
103
|
export { default as DropdownMenu } from "./components/dropdown-menu/DropdownMenu";
|
|
93
104
|
export { default as DropdownMenuCheckboxItem } from "./components/dropdown-menu/DropdownMenuCheckboxItem";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmdniels/uikit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"sideEffects": false,
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@clerk/themes": "^2.4.46",
|
|
33
|
-
"recharts": "^3.6.0",
|
|
34
33
|
"next": "^14.0.0 || ^15.0.0 || ^16.0.0",
|
|
35
34
|
"react": "^18.0.0 || ^19.0.0",
|
|
36
|
-
"react-dom": "^18.0.0 || ^19.0.0"
|
|
35
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
36
|
+
"recharts": "^3.6.0"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@base-ui/react": "^1.0.0",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
42
42
|
"@dnd-kit/sortable": "^10.0.0",
|
|
43
43
|
"@dnd-kit/utilities": "^3.2.2",
|
|
44
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
44
45
|
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
45
46
|
"@tabler/icons-react": "^3.35.0",
|
|
46
47
|
"@tailwindcss/postcss": "^4",
|