@pixpilot/shadcn 0.3.1 → 0.4.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/_virtual/rolldown_runtime.cjs +25 -1
- package/dist/components/index.cjs +30 -1
- package/dist/components/index.js +30 -1
- package/dist/components/ui/OrContinueWithSeparator.cjs +30 -1
- package/dist/components/ui/OrContinueWithSeparator.js +27 -1
- package/dist/components/ui/alert-dialog.cjs +101 -1
- package/dist/components/ui/alert-dialog.js +87 -1
- package/dist/components/ui/alert.cjs +45 -1
- package/dist/components/ui/alert.js +39 -1
- package/dist/components/ui/avatar.cjs +37 -1
- package/dist/components/ui/avatar.js +31 -1
- package/dist/components/ui/badge.cjs +33 -1
- package/dist/components/ui/badge.js +27 -1
- package/dist/components/ui/button.cjs +52 -1
- package/dist/components/ui/button.js +46 -1
- package/dist/components/ui/calendar.cjs +113 -1
- package/dist/components/ui/calendar.js +107 -1
- package/dist/components/ui/card.cjs +67 -1
- package/dist/components/ui/card.js +58 -1
- package/dist/components/ui/checkbox.cjs +31 -1
- package/dist/components/ui/checkbox.js +26 -1
- package/dist/components/ui/command.cjs +104 -1
- package/dist/components/ui/command.js +91 -1
- package/dist/components/ui/dialog.cjs +102 -1
- package/dist/components/ui/dialog.js +88 -1
- package/dist/components/ui/dropdown-menu.cjs +144 -1
- package/dist/components/ui/dropdown-menu.js +125 -1
- package/dist/components/ui/file-upload.cjs +926 -1
- package/dist/components/ui/file-upload.js +910 -1
- package/dist/components/ui/form.cjs +101 -1
- package/dist/components/ui/form.js +89 -1
- package/dist/components/ui/index.cjs +29 -1
- package/dist/components/ui/index.js +29 -1
- package/dist/components/ui/input.cjs +20 -1
- package/dist/components/ui/input.js +17 -1
- package/dist/components/ui/label.cjs +21 -1
- package/dist/components/ui/label.js +17 -1
- package/dist/components/ui/pagination.cjs +92 -1
- package/dist/components/ui/pagination.js +82 -1
- package/dist/components/ui/popover.cjs +44 -1
- package/dist/components/ui/popover.js +37 -1
- package/dist/components/ui/radio-group.cjs +36 -1
- package/dist/components/ui/radio-group.js +30 -1
- package/dist/components/ui/select.cjs +116 -1
- package/dist/components/ui/select.js +102 -1
- package/dist/components/ui/separator.cjs +23 -1
- package/dist/components/ui/separator.js +19 -1
- package/dist/components/ui/shadcn-io/tags/index.cjs +146 -1
- package/dist/components/ui/shadcn-io/tags/index.js +134 -1
- package/dist/components/ui/shadcn-io/tags-input-inline/index.cjs +66 -1
- package/dist/components/ui/shadcn-io/tags-input-inline/index.js +57 -1
- package/dist/components/ui/sheet.cjs +96 -1
- package/dist/components/ui/sheet.js +84 -1
- package/dist/components/ui/slider.cjs +42 -1
- package/dist/components/ui/slider.js +38 -1
- package/dist/components/ui/switch.cjs +28 -1
- package/dist/components/ui/switch.js +24 -1
- package/dist/components/ui/tabs.cjs +45 -1
- package/dist/components/ui/tabs.js +38 -1
- package/dist/components/ui/textarea.cjs +19 -1
- package/dist/components/ui/textarea.js +16 -1
- package/dist/components/ui/tooltip.cjs +45 -1
- package/dist/components/ui/tooltip.js +38 -1
- package/dist/index.cjs +189 -1
- package/dist/index.js +34 -1
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/lib/utils.cjs +13 -1
- package/dist/lib/utils.js +10 -1
- package/package.json +16 -16
|
@@ -1 +1,66 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_utils = require('../../../../lib/utils.cjs');
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
5
|
+
let lucide_react = require("lucide-react");
|
|
6
|
+
lucide_react = require_rolldown_runtime.__toESM(lucide_react);
|
|
7
|
+
let __diceui_tags_input = require("@diceui/tags-input");
|
|
8
|
+
__diceui_tags_input = require_rolldown_runtime.__toESM(__diceui_tags_input);
|
|
9
|
+
|
|
10
|
+
//#region src/components/ui/shadcn-io/tags-input-inline/index.tsx
|
|
11
|
+
function TagsInputInLineRoot({ className,...props }) {
|
|
12
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__diceui_tags_input.Root, {
|
|
13
|
+
"data-slot": "tags-input",
|
|
14
|
+
className: require_utils.cn("flex w-full flex-col", className),
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function TagsInputInLineLabel({ className,...props }) {
|
|
19
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__diceui_tags_input.Label, {
|
|
20
|
+
"data-slot": "tags-input-label",
|
|
21
|
+
className: require_utils.cn("font-medium text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", className),
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function TagsInputInLineList({ className,...props }) {
|
|
26
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
27
|
+
"data-slot": "tags-input-list",
|
|
28
|
+
className: require_utils.cn("flex min-h-10 w-full flex-wrap items-center gap-1.5 rounded-md border border-input bg-background px-3 py-2 text-sm focus-within:ring-1 focus-within:ring-ring disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function TagsInputInLineInput({ className,...props }) {
|
|
33
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__diceui_tags_input.Input, {
|
|
34
|
+
"data-slot": "tags-input-input",
|
|
35
|
+
className: require_utils.cn("flex-1 bg-transparent outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function TagsInputInLineItem({ className, children,...props }) {
|
|
40
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__diceui_tags_input.Item, {
|
|
41
|
+
"data-slot": "tags-input-item",
|
|
42
|
+
className: require_utils.cn("inline-flex max-w-[calc(100%-8px)] items-center gap-1.5 rounded border bg-transparent px-2.5 py-1 text-sm focus:outline-hidden data-disabled:cursor-not-allowed data-editable:select-none data-editing:bg-transparent data-disabled:opacity-50 data-editing:ring-1 data-editing:ring-ring [&:not([data-editing])]:pr-1.5 [&[data-highlighted]:not([data-editing])]:bg-accent [&[data-highlighted]:not([data-editing])]:text-accent-foreground", className),
|
|
43
|
+
...props,
|
|
44
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__diceui_tags_input.ItemText, {
|
|
45
|
+
className: "truncate",
|
|
46
|
+
children
|
|
47
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__diceui_tags_input.ItemDelete, {
|
|
48
|
+
className: "size-4 shrink-0 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100",
|
|
49
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.X, { className: "size-3.5" })
|
|
50
|
+
})]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function TagsInputInLineClear({ ...props }) {
|
|
54
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__diceui_tags_input.Clear, {
|
|
55
|
+
"data-slot": "tags-input-clear",
|
|
56
|
+
...props
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
//#endregion
|
|
61
|
+
exports.TagsInputInLineClear = TagsInputInLineClear;
|
|
62
|
+
exports.TagsInputInLineInput = TagsInputInLineInput;
|
|
63
|
+
exports.TagsInputInLineItem = TagsInputInLineItem;
|
|
64
|
+
exports.TagsInputInLineLabel = TagsInputInLineLabel;
|
|
65
|
+
exports.TagsInputInLineList = TagsInputInLineList;
|
|
66
|
+
exports.TagsInputInLineRoot = TagsInputInLineRoot;
|
|
@@ -1 +1,57 @@
|
|
|
1
|
-
import{cn
|
|
1
|
+
import { cn } from "../../../../lib/utils.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { X } from "lucide-react";
|
|
4
|
+
import * as TagsInputPrimitive from "@diceui/tags-input";
|
|
5
|
+
|
|
6
|
+
//#region src/components/ui/shadcn-io/tags-input-inline/index.tsx
|
|
7
|
+
function TagsInputInLineRoot({ className,...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(TagsInputPrimitive.Root, {
|
|
9
|
+
"data-slot": "tags-input",
|
|
10
|
+
className: cn("flex w-full flex-col", className),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function TagsInputInLineLabel({ className,...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx(TagsInputPrimitive.Label, {
|
|
16
|
+
"data-slot": "tags-input-label",
|
|
17
|
+
className: cn("font-medium text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", className),
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function TagsInputInLineList({ className,...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx("div", {
|
|
23
|
+
"data-slot": "tags-input-list",
|
|
24
|
+
className: cn("flex min-h-10 w-full flex-wrap items-center gap-1.5 rounded-md border border-input bg-background px-3 py-2 text-sm focus-within:ring-1 focus-within:ring-ring disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
25
|
+
...props
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function TagsInputInLineInput({ className,...props }) {
|
|
29
|
+
return /* @__PURE__ */ jsx(TagsInputPrimitive.Input, {
|
|
30
|
+
"data-slot": "tags-input-input",
|
|
31
|
+
className: cn("flex-1 bg-transparent outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function TagsInputInLineItem({ className, children,...props }) {
|
|
36
|
+
return /* @__PURE__ */ jsxs(TagsInputPrimitive.Item, {
|
|
37
|
+
"data-slot": "tags-input-item",
|
|
38
|
+
className: cn("inline-flex max-w-[calc(100%-8px)] items-center gap-1.5 rounded border bg-transparent px-2.5 py-1 text-sm focus:outline-hidden data-disabled:cursor-not-allowed data-editable:select-none data-editing:bg-transparent data-disabled:opacity-50 data-editing:ring-1 data-editing:ring-ring [&:not([data-editing])]:pr-1.5 [&[data-highlighted]:not([data-editing])]:bg-accent [&[data-highlighted]:not([data-editing])]:text-accent-foreground", className),
|
|
39
|
+
...props,
|
|
40
|
+
children: [/* @__PURE__ */ jsx(TagsInputPrimitive.ItemText, {
|
|
41
|
+
className: "truncate",
|
|
42
|
+
children
|
|
43
|
+
}), /* @__PURE__ */ jsx(TagsInputPrimitive.ItemDelete, {
|
|
44
|
+
className: "size-4 shrink-0 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100",
|
|
45
|
+
children: /* @__PURE__ */ jsx(X, { className: "size-3.5" })
|
|
46
|
+
})]
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function TagsInputInLineClear({ ...props }) {
|
|
50
|
+
return /* @__PURE__ */ jsx(TagsInputPrimitive.Clear, {
|
|
51
|
+
"data-slot": "tags-input-clear",
|
|
52
|
+
...props
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
//#endregion
|
|
57
|
+
export { TagsInputInLineClear, TagsInputInLineInput, TagsInputInLineItem, TagsInputInLineLabel, TagsInputInLineList, TagsInputInLineRoot };
|
|
@@ -1 +1,96 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_utils = require('../../lib/utils.cjs');
|
|
3
|
+
require('../../lib/index.cjs');
|
|
4
|
+
let react = require("react");
|
|
5
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
8
|
+
let lucide_react = require("lucide-react");
|
|
9
|
+
lucide_react = require_rolldown_runtime.__toESM(lucide_react);
|
|
10
|
+
let __radix_ui_react_dialog = require("@radix-ui/react-dialog");
|
|
11
|
+
__radix_ui_react_dialog = require_rolldown_runtime.__toESM(__radix_ui_react_dialog);
|
|
12
|
+
|
|
13
|
+
//#region src/components/ui/sheet.tsx
|
|
14
|
+
function Sheet({ ...props }) {
|
|
15
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Root, {
|
|
16
|
+
"data-slot": "sheet",
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function SheetTrigger({ ...props }) {
|
|
21
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Trigger, {
|
|
22
|
+
"data-slot": "sheet-trigger",
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function SheetClose({ ...props }) {
|
|
27
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Close, {
|
|
28
|
+
"data-slot": "sheet-close",
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function SheetPortal({ ...props }) {
|
|
33
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Portal, {
|
|
34
|
+
"data-slot": "sheet-portal",
|
|
35
|
+
...props
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function SheetOverlay({ className,...props }) {
|
|
39
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Overlay, {
|
|
40
|
+
"data-slot": "sheet-overlay",
|
|
41
|
+
className: require_utils.cn("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", className),
|
|
42
|
+
...props
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function SheetContent({ className, children, side = "right",...props }) {
|
|
46
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SheetPortal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SheetOverlay, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dialog.Content, {
|
|
47
|
+
"data-slot": "sheet-content",
|
|
48
|
+
className: require_utils.cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500", side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", className),
|
|
49
|
+
...props,
|
|
50
|
+
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dialog.Close, {
|
|
51
|
+
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",
|
|
52
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.XIcon, { className: "size-4" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
53
|
+
className: "sr-only",
|
|
54
|
+
children: "Close"
|
|
55
|
+
})]
|
|
56
|
+
})]
|
|
57
|
+
})] });
|
|
58
|
+
}
|
|
59
|
+
function SheetHeader({ className,...props }) {
|
|
60
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
61
|
+
"data-slot": "sheet-header",
|
|
62
|
+
className: require_utils.cn("flex flex-col gap-1.5 p-4", className),
|
|
63
|
+
...props
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function SheetFooter({ className,...props }) {
|
|
67
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
68
|
+
"data-slot": "sheet-footer",
|
|
69
|
+
className: require_utils.cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
70
|
+
...props
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function SheetTitle({ className,...props }) {
|
|
74
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Title, {
|
|
75
|
+
"data-slot": "sheet-title",
|
|
76
|
+
className: require_utils.cn("text-foreground font-semibold", className),
|
|
77
|
+
...props
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function SheetDescription({ className,...props }) {
|
|
81
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Description, {
|
|
82
|
+
"data-slot": "sheet-description",
|
|
83
|
+
className: require_utils.cn("text-muted-foreground text-sm", className),
|
|
84
|
+
...props
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
//#endregion
|
|
89
|
+
exports.Sheet = Sheet;
|
|
90
|
+
exports.SheetClose = SheetClose;
|
|
91
|
+
exports.SheetContent = SheetContent;
|
|
92
|
+
exports.SheetDescription = SheetDescription;
|
|
93
|
+
exports.SheetFooter = SheetFooter;
|
|
94
|
+
exports.SheetHeader = SheetHeader;
|
|
95
|
+
exports.SheetTitle = SheetTitle;
|
|
96
|
+
exports.SheetTrigger = SheetTrigger;
|
|
@@ -1 +1,84 @@
|
|
|
1
|
-
import{cn
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import "../../lib/index.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { XIcon } from "lucide-react";
|
|
6
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
7
|
+
|
|
8
|
+
//#region src/components/ui/sheet.tsx
|
|
9
|
+
function Sheet({ ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Root, {
|
|
11
|
+
"data-slot": "sheet",
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function SheetTrigger({ ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Trigger, {
|
|
17
|
+
"data-slot": "sheet-trigger",
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function SheetClose({ ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Close, {
|
|
23
|
+
"data-slot": "sheet-close",
|
|
24
|
+
...props
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function SheetPortal({ ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Portal, {
|
|
29
|
+
"data-slot": "sheet-portal",
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function SheetOverlay({ className,...props }) {
|
|
34
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Overlay, {
|
|
35
|
+
"data-slot": "sheet-overlay",
|
|
36
|
+
className: cn("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", className),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function SheetContent({ className, children, side = "right",...props }) {
|
|
41
|
+
return /* @__PURE__ */ jsxs(SheetPortal, { children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(SheetPrimitive.Content, {
|
|
42
|
+
"data-slot": "sheet-content",
|
|
43
|
+
className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500", side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", className),
|
|
44
|
+
...props,
|
|
45
|
+
children: [children, /* @__PURE__ */ jsxs(SheetPrimitive.Close, {
|
|
46
|
+
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",
|
|
47
|
+
children: [/* @__PURE__ */ jsx(XIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
|
|
48
|
+
className: "sr-only",
|
|
49
|
+
children: "Close"
|
|
50
|
+
})]
|
|
51
|
+
})]
|
|
52
|
+
})] });
|
|
53
|
+
}
|
|
54
|
+
function SheetHeader({ className,...props }) {
|
|
55
|
+
return /* @__PURE__ */ jsx("div", {
|
|
56
|
+
"data-slot": "sheet-header",
|
|
57
|
+
className: cn("flex flex-col gap-1.5 p-4", className),
|
|
58
|
+
...props
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function SheetFooter({ className,...props }) {
|
|
62
|
+
return /* @__PURE__ */ jsx("div", {
|
|
63
|
+
"data-slot": "sheet-footer",
|
|
64
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
65
|
+
...props
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function SheetTitle({ className,...props }) {
|
|
69
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Title, {
|
|
70
|
+
"data-slot": "sheet-title",
|
|
71
|
+
className: cn("text-foreground font-semibold", className),
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function SheetDescription({ className,...props }) {
|
|
76
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Description, {
|
|
77
|
+
"data-slot": "sheet-description",
|
|
78
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
79
|
+
...props
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
//#endregion
|
|
84
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
|
|
@@ -1 +1,42 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_utils = require('../../lib/utils.cjs');
|
|
3
|
+
require('../../lib/index.cjs');
|
|
4
|
+
let react = require("react");
|
|
5
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
8
|
+
let __radix_ui_react_slider = require("@radix-ui/react-slider");
|
|
9
|
+
__radix_ui_react_slider = require_rolldown_runtime.__toESM(__radix_ui_react_slider);
|
|
10
|
+
|
|
11
|
+
//#region src/components/ui/slider.tsx
|
|
12
|
+
function Slider({ className, defaultValue, value, min = 0, max = 100,...props }) {
|
|
13
|
+
const _values = react.useMemo(() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max], [
|
|
14
|
+
value,
|
|
15
|
+
defaultValue,
|
|
16
|
+
min,
|
|
17
|
+
max
|
|
18
|
+
]);
|
|
19
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_slider.Root, {
|
|
20
|
+
"data-slot": "slider",
|
|
21
|
+
defaultValue,
|
|
22
|
+
value,
|
|
23
|
+
min,
|
|
24
|
+
max,
|
|
25
|
+
className: require_utils.cn("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", className),
|
|
26
|
+
...props,
|
|
27
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_slider.Track, {
|
|
28
|
+
"data-slot": "slider-track",
|
|
29
|
+
className: require_utils.cn("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),
|
|
30
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_slider.Range, {
|
|
31
|
+
"data-slot": "slider-range",
|
|
32
|
+
className: require_utils.cn("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")
|
|
33
|
+
})
|
|
34
|
+
}), Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_slider.Thumb, {
|
|
35
|
+
"data-slot": "slider-thumb",
|
|
36
|
+
className: "border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
37
|
+
}, index))]
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
exports.Slider = Slider;
|
|
@@ -1 +1,38 @@
|
|
|
1
|
-
import{cn
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import "../../lib/index.js";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
6
|
+
|
|
7
|
+
//#region src/components/ui/slider.tsx
|
|
8
|
+
function Slider({ className, defaultValue, value, min = 0, max = 100,...props }) {
|
|
9
|
+
const _values = React.useMemo(() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max], [
|
|
10
|
+
value,
|
|
11
|
+
defaultValue,
|
|
12
|
+
min,
|
|
13
|
+
max
|
|
14
|
+
]);
|
|
15
|
+
return /* @__PURE__ */ jsxs(SliderPrimitive.Root, {
|
|
16
|
+
"data-slot": "slider",
|
|
17
|
+
defaultValue,
|
|
18
|
+
value,
|
|
19
|
+
min,
|
|
20
|
+
max,
|
|
21
|
+
className: cn("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", className),
|
|
22
|
+
...props,
|
|
23
|
+
children: [/* @__PURE__ */ jsx(SliderPrimitive.Track, {
|
|
24
|
+
"data-slot": "slider-track",
|
|
25
|
+
className: cn("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),
|
|
26
|
+
children: /* @__PURE__ */ jsx(SliderPrimitive.Range, {
|
|
27
|
+
"data-slot": "slider-range",
|
|
28
|
+
className: cn("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")
|
|
29
|
+
})
|
|
30
|
+
}), Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx(SliderPrimitive.Thumb, {
|
|
31
|
+
"data-slot": "slider-thumb",
|
|
32
|
+
className: "border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
33
|
+
}, index))]
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
export { Slider };
|
|
@@ -1 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
5
|
+
const require_utils = require('../../lib/utils.cjs');
|
|
6
|
+
require('../../lib/index.cjs');
|
|
7
|
+
let react = require("react");
|
|
8
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
9
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
11
|
+
let __radix_ui_react_switch = require("@radix-ui/react-switch");
|
|
12
|
+
__radix_ui_react_switch = require_rolldown_runtime.__toESM(__radix_ui_react_switch);
|
|
13
|
+
|
|
14
|
+
//#region src/components/ui/switch.tsx
|
|
15
|
+
function Switch({ className,...props }) {
|
|
16
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_switch.Root, {
|
|
17
|
+
"data-slot": "switch",
|
|
18
|
+
className: require_utils.cn("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
19
|
+
...props,
|
|
20
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_switch.Thumb, {
|
|
21
|
+
"data-slot": "switch-thumb",
|
|
22
|
+
className: require_utils.cn("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
exports.Switch = Switch;
|
|
@@ -1 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
import "../../lib/index.js";
|
|
6
|
+
import "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
9
|
+
|
|
10
|
+
//#region src/components/ui/switch.tsx
|
|
11
|
+
function Switch({ className,...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(SwitchPrimitive.Root, {
|
|
13
|
+
"data-slot": "switch",
|
|
14
|
+
className: cn("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
15
|
+
...props,
|
|
16
|
+
children: /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, {
|
|
17
|
+
"data-slot": "switch-thumb",
|
|
18
|
+
className: cn("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { Switch };
|
|
@@ -1 +1,45 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_utils = require('../../lib/utils.cjs');
|
|
3
|
+
require('../../lib/index.cjs');
|
|
4
|
+
let react = require("react");
|
|
5
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
8
|
+
let __radix_ui_react_tabs = require("@radix-ui/react-tabs");
|
|
9
|
+
__radix_ui_react_tabs = require_rolldown_runtime.__toESM(__radix_ui_react_tabs);
|
|
10
|
+
|
|
11
|
+
//#region src/components/ui/tabs.tsx
|
|
12
|
+
function Tabs({ className,...props }) {
|
|
13
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tabs.Root, {
|
|
14
|
+
"data-slot": "tabs",
|
|
15
|
+
className: require_utils.cn("flex flex-col gap-2", className),
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function TabsList({ className,...props }) {
|
|
20
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tabs.List, {
|
|
21
|
+
"data-slot": "tabs-list",
|
|
22
|
+
className: require_utils.cn("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]", className),
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function TabsTrigger({ className,...props }) {
|
|
27
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tabs.Trigger, {
|
|
28
|
+
"data-slot": "tabs-trigger",
|
|
29
|
+
className: require_utils.cn("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function TabsContent({ className,...props }) {
|
|
34
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tabs.Content, {
|
|
35
|
+
"data-slot": "tabs-content",
|
|
36
|
+
className: require_utils.cn("flex-1 outline-none", className),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
exports.Tabs = Tabs;
|
|
43
|
+
exports.TabsContent = TabsContent;
|
|
44
|
+
exports.TabsList = TabsList;
|
|
45
|
+
exports.TabsTrigger = TabsTrigger;
|
|
@@ -1 +1,38 @@
|
|
|
1
|
-
import{cn
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import "../../lib/index.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
6
|
+
|
|
7
|
+
//#region src/components/ui/tabs.tsx
|
|
8
|
+
function Tabs({ className,...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(TabsPrimitive.Root, {
|
|
10
|
+
"data-slot": "tabs",
|
|
11
|
+
className: cn("flex flex-col gap-2", className),
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function TabsList({ className,...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx(TabsPrimitive.List, {
|
|
17
|
+
"data-slot": "tabs-list",
|
|
18
|
+
className: cn("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]", className),
|
|
19
|
+
...props
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function TabsTrigger({ className,...props }) {
|
|
23
|
+
return /* @__PURE__ */ jsx(TabsPrimitive.Trigger, {
|
|
24
|
+
"data-slot": "tabs-trigger",
|
|
25
|
+
className: cn("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
26
|
+
...props
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function TabsContent({ className,...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsx(TabsPrimitive.Content, {
|
|
31
|
+
"data-slot": "tabs-content",
|
|
32
|
+
className: cn("flex-1 outline-none", className),
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
@@ -1 +1,19 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_utils = require('../../lib/utils.cjs');
|
|
3
|
+
require('../../lib/index.cjs');
|
|
4
|
+
let react = require("react");
|
|
5
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
8
|
+
|
|
9
|
+
//#region src/components/ui/textarea.tsx
|
|
10
|
+
function Textarea({ className,...props }) {
|
|
11
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
12
|
+
"data-slot": "textarea",
|
|
13
|
+
className: require_utils.cn("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className),
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.Textarea = Textarea;
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
import{cn
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import "../../lib/index.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/ui/textarea.tsx
|
|
7
|
+
function Textarea({ className,...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx("textarea", {
|
|
9
|
+
"data-slot": "textarea",
|
|
10
|
+
className: cn("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Textarea };
|