@esmate/shadcn 1.0.0 → 1.0.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/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js +16 -0
- package/dist/hooks/use-zod-form.d.ts +8 -0
- package/dist/hooks/use-zod-form.js +10 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +6 -0
- package/dist/lib/zod.d.ts +1 -0
- package/dist/lib/zod.js +1 -0
- package/dist/styles/base.css +1 -0
- package/dist/styles/new-york.css +123 -0
- package/dist/ui/accordion.d.ts +7 -0
- package/dist/ui/accordion.js +39 -0
- package/dist/ui/alert-dialog.d.ts +14 -0
- package/dist/ui/alert-dialog.js +80 -0
- package/dist/ui/alert.d.ts +9 -0
- package/dist/ui/alert.js +39 -0
- package/dist/ui/aspect-ratio.d.ts +3 -0
- package/dist/ui/aspect-ratio.js +9 -0
- package/dist/ui/avatar.d.ts +6 -0
- package/dist/ui/avatar.js +26 -0
- package/dist/ui/badge.d.ts +9 -0
- package/dist/ui/badge.js +28 -0
- package/dist/ui/breadcrumb.d.ts +11 -0
- package/dist/ui/breadcrumb.js +66 -0
- package/dist/ui/button.d.ts +10 -0
- package/dist/ui/button.js +39 -0
- package/dist/ui/calendar.d.ts +4 -0
- package/dist/ui/calendar.js +53 -0
- package/dist/ui/card.d.ts +9 -0
- package/dist/ui/card.js +52 -0
- package/dist/ui/carousel.d.ts +19 -0
- package/dist/ui/carousel.js +135 -0
- package/dist/ui/chart.d.ts +40 -0
- package/dist/ui/chart.js +138 -0
- package/dist/ui/checkbox.d.ts +4 -0
- package/dist/ui/checkbox.js +18 -0
- package/dist/ui/collapsible.d.ts +5 -0
- package/dist/ui/collapsible.js +21 -0
- package/dist/ui/command.d.ts +16 -0
- package/dist/ui/command.js +77 -0
- package/dist/ui/context-menu.d.ts +25 -0
- package/dist/ui/context-menu.js +120 -0
- package/dist/ui/dialog.d.ts +13 -0
- package/dist/ui/dialog.js +78 -0
- package/dist/ui/drawer.d.ts +13 -0
- package/dist/ui/drawer.js +75 -0
- package/dist/ui/dropdown-menu.d.ts +25 -0
- package/dist/ui/dropdown-menu.js +121 -0
- package/dist/ui/form.d.ts +24 -0
- package/dist/ui/form.js +86 -0
- package/dist/ui/hover-card.d.ts +6 -0
- package/dist/ui/hover-card.js +28 -0
- package/dist/ui/input-otp.d.ts +11 -0
- package/dist/ui/input-otp.js +42 -0
- package/dist/ui/input.d.ts +3 -0
- package/dist/ui/input.js +11 -0
- package/dist/ui/label.d.ts +4 -0
- package/dist/ui/label.js +12 -0
- package/dist/ui/menubar.d.ts +26 -0
- package/dist/ui/menubar.js +131 -0
- package/dist/ui/navigation-menu.d.ts +14 -0
- package/dist/ui/navigation-menu.js +71 -0
- package/dist/ui/pagination.d.ts +13 -0
- package/dist/ui/pagination.js +71 -0
- package/dist/ui/popover.d.ts +7 -0
- package/dist/ui/popover.js +32 -0
- package/dist/ui/progress.d.ts +4 -0
- package/dist/ui/progress.js +18 -0
- package/dist/ui/radio-group.d.ts +5 -0
- package/dist/ui/radio-group.js +25 -0
- package/dist/ui/resizable.d.ts +8 -0
- package/dist/ui/resizable.js +30 -0
- package/dist/ui/scroll-area.d.ts +5 -0
- package/dist/ui/scroll-area.js +26 -0
- package/dist/ui/select.d.ts +15 -0
- package/dist/ui/select.js +89 -0
- package/dist/ui/separator.d.ts +4 -0
- package/dist/ui/separator.js +14 -0
- package/dist/ui/sheet.d.ts +13 -0
- package/dist/ui/sheet.js +78 -0
- package/dist/ui/sidebar.d.ts +69 -0
- package/dist/ui/sidebar.js +368 -0
- package/dist/ui/skeleton.d.ts +2 -0
- package/dist/ui/skeleton.js +9 -0
- package/dist/ui/slider.d.ts +4 -0
- package/dist/ui/slider.js +37 -0
- package/dist/ui/sonner.d.ts +3 -0
- package/dist/ui/sonner.js +17 -0
- package/dist/ui/switch.d.ts +4 -0
- package/dist/ui/switch.js +15 -0
- package/dist/ui/table.d.ts +10 -0
- package/dist/ui/table.js +63 -0
- package/dist/ui/tabs.d.ts +7 -0
- package/dist/ui/tabs.js +33 -0
- package/dist/ui/textarea.d.ts +3 -0
- package/dist/ui/textarea.js +10 -0
- package/dist/ui/toggle-group.d.ts +7 -0
- package/dist/ui/toggle-group.js +37 -0
- package/dist/ui/toggle.d.ts +9 -0
- package/dist/ui/toggle.js +34 -0
- package/dist/ui/tooltip.d.ts +7 -0
- package/dist/ui/tooltip.js +34 -0
- package/package.json +8 -8
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__radix_ui_react_slot_85c2da36__ from "@radix-ui/react-slot";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE_class_variance_authority_159ad65c__ from "class-variance-authority";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__ from "lucide-react";
|
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE__hooks_use_mobile_js_7eed1184__ from "../hooks/use-mobile.js";
|
|
7
|
+
import * as __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__ from "../lib/utils.js";
|
|
8
|
+
import * as __WEBPACK_EXTERNAL_MODULE__button_js_821b8d9d__ from "./button.js";
|
|
9
|
+
import * as __WEBPACK_EXTERNAL_MODULE__input_js_53f4619d__ from "./input.js";
|
|
10
|
+
import * as __WEBPACK_EXTERNAL_MODULE__separator_js_5c835db5__ from "./separator.js";
|
|
11
|
+
import * as __WEBPACK_EXTERNAL_MODULE__sheet_js_74439a1c__ from "./sheet.js";
|
|
12
|
+
import * as __WEBPACK_EXTERNAL_MODULE__skeleton_js_fad59023__ from "./skeleton.js";
|
|
13
|
+
import * as __WEBPACK_EXTERNAL_MODULE__tooltip_js_7570fc30__ from "./tooltip.js";
|
|
14
|
+
const SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
15
|
+
const SIDEBAR_COOKIE_MAX_AGE = 604800;
|
|
16
|
+
const SIDEBAR_WIDTH = "16rem";
|
|
17
|
+
const SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
18
|
+
const SIDEBAR_WIDTH_ICON = "3rem";
|
|
19
|
+
const SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
20
|
+
const SidebarContext = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createContext(null);
|
|
21
|
+
function useSidebar() {
|
|
22
|
+
const context = __WEBPACK_EXTERNAL_MODULE_react__.useContext(SidebarContext);
|
|
23
|
+
if (!context) throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
24
|
+
return context;
|
|
25
|
+
}
|
|
26
|
+
function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }) {
|
|
27
|
+
const isMobile = (0, __WEBPACK_EXTERNAL_MODULE__hooks_use_mobile_js_7eed1184__.useIsMobile)();
|
|
28
|
+
const [openMobile, setOpenMobile] = __WEBPACK_EXTERNAL_MODULE_react__.useState(false);
|
|
29
|
+
const [_open, _setOpen] = __WEBPACK_EXTERNAL_MODULE_react__.useState(defaultOpen);
|
|
30
|
+
const open = openProp ?? _open;
|
|
31
|
+
const setOpen = __WEBPACK_EXTERNAL_MODULE_react__.useCallback((value)=>{
|
|
32
|
+
const openState = "function" == typeof value ? value(open) : value;
|
|
33
|
+
if (setOpenProp) setOpenProp(openState);
|
|
34
|
+
else _setOpen(openState);
|
|
35
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
36
|
+
}, [
|
|
37
|
+
setOpenProp,
|
|
38
|
+
open
|
|
39
|
+
]);
|
|
40
|
+
const toggleSidebar = __WEBPACK_EXTERNAL_MODULE_react__.useCallback(()=>isMobile ? setOpenMobile((open)=>!open) : setOpen((open)=>!open), [
|
|
41
|
+
isMobile,
|
|
42
|
+
setOpen,
|
|
43
|
+
setOpenMobile
|
|
44
|
+
]);
|
|
45
|
+
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
46
|
+
const handleKeyDown = (event)=>{
|
|
47
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
48
|
+
event.preventDefault();
|
|
49
|
+
toggleSidebar();
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
53
|
+
return ()=>window.removeEventListener("keydown", handleKeyDown);
|
|
54
|
+
}, [
|
|
55
|
+
toggleSidebar
|
|
56
|
+
]);
|
|
57
|
+
const state = open ? "expanded" : "collapsed";
|
|
58
|
+
const contextValue = __WEBPACK_EXTERNAL_MODULE_react__.useMemo(()=>({
|
|
59
|
+
state,
|
|
60
|
+
open,
|
|
61
|
+
setOpen,
|
|
62
|
+
isMobile,
|
|
63
|
+
openMobile,
|
|
64
|
+
setOpenMobile,
|
|
65
|
+
toggleSidebar
|
|
66
|
+
}), [
|
|
67
|
+
state,
|
|
68
|
+
open,
|
|
69
|
+
setOpen,
|
|
70
|
+
isMobile,
|
|
71
|
+
openMobile,
|
|
72
|
+
setOpenMobile,
|
|
73
|
+
toggleSidebar
|
|
74
|
+
]);
|
|
75
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(SidebarContext.Provider, {
|
|
76
|
+
value: contextValue
|
|
77
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__tooltip_js_7570fc30__.TooltipProvider, {
|
|
78
|
+
delayDuration: 0
|
|
79
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
80
|
+
"data-slot": "sidebar-wrapper",
|
|
81
|
+
style: {
|
|
82
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
83
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
84
|
+
...style
|
|
85
|
+
},
|
|
86
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full", className),
|
|
87
|
+
...props
|
|
88
|
+
}, children)));
|
|
89
|
+
}
|
|
90
|
+
function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, ...props }) {
|
|
91
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
92
|
+
if ("none" === collapsible) return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
93
|
+
"data-slot": "sidebar",
|
|
94
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col", className),
|
|
95
|
+
...props
|
|
96
|
+
}, children);
|
|
97
|
+
if (isMobile) return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__sheet_js_74439a1c__.Sheet, {
|
|
98
|
+
open: openMobile,
|
|
99
|
+
onOpenChange: setOpenMobile,
|
|
100
|
+
...props
|
|
101
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__sheet_js_74439a1c__.SheetContent, {
|
|
102
|
+
"data-sidebar": "sidebar",
|
|
103
|
+
"data-slot": "sidebar",
|
|
104
|
+
"data-mobile": "true",
|
|
105
|
+
className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
|
|
106
|
+
style: {
|
|
107
|
+
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
108
|
+
},
|
|
109
|
+
side: side
|
|
110
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__sheet_js_74439a1c__.SheetHeader, {
|
|
111
|
+
className: "sr-only"
|
|
112
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__sheet_js_74439a1c__.SheetTitle, null, "Sidebar"), /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__sheet_js_74439a1c__.SheetDescription, null, "Displays the mobile sidebar.")), /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
113
|
+
className: "flex h-full w-full flex-col"
|
|
114
|
+
}, children)));
|
|
115
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
116
|
+
className: "group peer text-sidebar-foreground hidden md:block",
|
|
117
|
+
"data-state": state,
|
|
118
|
+
"data-collapsible": "collapsed" === state ? collapsible : "",
|
|
119
|
+
"data-variant": variant,
|
|
120
|
+
"data-side": side,
|
|
121
|
+
"data-slot": "sidebar"
|
|
122
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
123
|
+
"data-slot": "sidebar-gap",
|
|
124
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", "floating" === variant || "inset" === variant ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)")
|
|
125
|
+
}), /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
126
|
+
"data-slot": "sidebar-container",
|
|
127
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex", "left" === side ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]", "floating" === variant || "inset" === variant ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", className),
|
|
128
|
+
...props
|
|
129
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
130
|
+
"data-sidebar": "sidebar",
|
|
131
|
+
"data-slot": "sidebar-inner",
|
|
132
|
+
className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm"
|
|
133
|
+
}, children)));
|
|
134
|
+
}
|
|
135
|
+
function SidebarTrigger({ className, onClick, ...props }) {
|
|
136
|
+
const { toggleSidebar } = useSidebar();
|
|
137
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__button_js_821b8d9d__.Button, {
|
|
138
|
+
"data-sidebar": "trigger",
|
|
139
|
+
"data-slot": "sidebar-trigger",
|
|
140
|
+
variant: "ghost",
|
|
141
|
+
size: "icon",
|
|
142
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("size-7", className),
|
|
143
|
+
onClick: (event)=>{
|
|
144
|
+
null == onClick || onClick(event);
|
|
145
|
+
toggleSidebar();
|
|
146
|
+
},
|
|
147
|
+
...props
|
|
148
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__.PanelLeftIcon, null), /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("span", {
|
|
149
|
+
className: "sr-only"
|
|
150
|
+
}, "Toggle Sidebar"));
|
|
151
|
+
}
|
|
152
|
+
function SidebarRail({ className, ...props }) {
|
|
153
|
+
const { toggleSidebar } = useSidebar();
|
|
154
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("button", {
|
|
155
|
+
"data-sidebar": "rail",
|
|
156
|
+
"data-slot": "sidebar-rail",
|
|
157
|
+
"aria-label": "Toggle Sidebar",
|
|
158
|
+
tabIndex: -1,
|
|
159
|
+
onClick: toggleSidebar,
|
|
160
|
+
title: "Toggle Sidebar",
|
|
161
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex", "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", className),
|
|
162
|
+
...props
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
function SidebarInset({ className, ...props }) {
|
|
166
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("main", {
|
|
167
|
+
"data-slot": "sidebar-inset",
|
|
168
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-background relative flex w-full flex-1 flex-col", "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", className),
|
|
169
|
+
...props
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
function SidebarInput({ className, ...props }) {
|
|
173
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__input_js_53f4619d__.Input, {
|
|
174
|
+
"data-slot": "sidebar-input",
|
|
175
|
+
"data-sidebar": "input",
|
|
176
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-background h-8 w-full shadow-none", className),
|
|
177
|
+
...props
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
function SidebarHeader({ className, ...props }) {
|
|
181
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
182
|
+
"data-slot": "sidebar-header",
|
|
183
|
+
"data-sidebar": "header",
|
|
184
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("flex flex-col gap-2 p-2", className),
|
|
185
|
+
...props
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
function SidebarFooter({ className, ...props }) {
|
|
189
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
190
|
+
"data-slot": "sidebar-footer",
|
|
191
|
+
"data-sidebar": "footer",
|
|
192
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("flex flex-col gap-2 p-2", className),
|
|
193
|
+
...props
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
function SidebarSeparator({ className, ...props }) {
|
|
197
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__separator_js_5c835db5__.Separator, {
|
|
198
|
+
"data-slot": "sidebar-separator",
|
|
199
|
+
"data-sidebar": "separator",
|
|
200
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-sidebar-border mx-2 w-auto", className),
|
|
201
|
+
...props
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
function SidebarContent({ className, ...props }) {
|
|
205
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
206
|
+
"data-slot": "sidebar-content",
|
|
207
|
+
"data-sidebar": "content",
|
|
208
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
|
|
209
|
+
...props
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
function SidebarGroup({ className, ...props }) {
|
|
213
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
214
|
+
"data-slot": "sidebar-group",
|
|
215
|
+
"data-sidebar": "group",
|
|
216
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("relative flex w-full min-w-0 flex-col p-2", className),
|
|
217
|
+
...props
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
function SidebarGroupLabel({ className, asChild = false, ...props }) {
|
|
221
|
+
const Comp = asChild ? __WEBPACK_EXTERNAL_MODULE__radix_ui_react_slot_85c2da36__.Slot : "div";
|
|
222
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(Comp, {
|
|
223
|
+
"data-slot": "sidebar-group-label",
|
|
224
|
+
"data-sidebar": "group-label",
|
|
225
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0", className),
|
|
226
|
+
...props
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
function SidebarGroupAction({ className, asChild = false, ...props }) {
|
|
230
|
+
const Comp = asChild ? __WEBPACK_EXTERNAL_MODULE__radix_ui_react_slot_85c2da36__.Slot : "button";
|
|
231
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(Comp, {
|
|
232
|
+
"data-slot": "sidebar-group-action",
|
|
233
|
+
"data-sidebar": "group-action",
|
|
234
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 md:after:hidden", "group-data-[collapsible=icon]:hidden", className),
|
|
235
|
+
...props
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
function SidebarGroupContent({ className, ...props }) {
|
|
239
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
240
|
+
"data-slot": "sidebar-group-content",
|
|
241
|
+
"data-sidebar": "group-content",
|
|
242
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("w-full text-sm", className),
|
|
243
|
+
...props
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
function SidebarMenu({ className, ...props }) {
|
|
247
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("ul", {
|
|
248
|
+
"data-slot": "sidebar-menu",
|
|
249
|
+
"data-sidebar": "menu",
|
|
250
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("flex w-full min-w-0 flex-col gap-1", className),
|
|
251
|
+
...props
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
function SidebarMenuItem({ className, ...props }) {
|
|
255
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("li", {
|
|
256
|
+
"data-slot": "sidebar-menu-item",
|
|
257
|
+
"data-sidebar": "menu-item",
|
|
258
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("group/menu-item relative", className),
|
|
259
|
+
...props
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
const sidebarMenuButtonVariants = (0, __WEBPACK_EXTERNAL_MODULE_class_variance_authority_159ad65c__.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0", {
|
|
263
|
+
variants: {
|
|
264
|
+
variant: {
|
|
265
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
266
|
+
outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
|
267
|
+
},
|
|
268
|
+
size: {
|
|
269
|
+
default: "h-8 text-sm",
|
|
270
|
+
sm: "h-7 text-xs",
|
|
271
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
defaultVariants: {
|
|
275
|
+
variant: "default",
|
|
276
|
+
size: "default"
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
function SidebarMenuButton({ asChild = false, isActive = false, variant = "default", size = "default", tooltip, className, ...props }) {
|
|
280
|
+
const Comp = asChild ? __WEBPACK_EXTERNAL_MODULE__radix_ui_react_slot_85c2da36__.Slot : "button";
|
|
281
|
+
const { isMobile, state } = useSidebar();
|
|
282
|
+
const button = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(Comp, {
|
|
283
|
+
"data-slot": "sidebar-menu-button",
|
|
284
|
+
"data-sidebar": "menu-button",
|
|
285
|
+
"data-size": size,
|
|
286
|
+
"data-active": isActive,
|
|
287
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)(sidebarMenuButtonVariants({
|
|
288
|
+
variant,
|
|
289
|
+
size
|
|
290
|
+
}), className),
|
|
291
|
+
...props
|
|
292
|
+
});
|
|
293
|
+
if (!tooltip) return button;
|
|
294
|
+
if ("string" == typeof tooltip) tooltip = {
|
|
295
|
+
children: tooltip
|
|
296
|
+
};
|
|
297
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__tooltip_js_7570fc30__.Tooltip, null, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__tooltip_js_7570fc30__.TooltipTrigger, {
|
|
298
|
+
asChild: true
|
|
299
|
+
}, button), /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__tooltip_js_7570fc30__.TooltipContent, {
|
|
300
|
+
side: "right",
|
|
301
|
+
align: "center",
|
|
302
|
+
hidden: "collapsed" !== state || isMobile,
|
|
303
|
+
...tooltip
|
|
304
|
+
}));
|
|
305
|
+
}
|
|
306
|
+
function SidebarMenuAction({ className, asChild = false, showOnHover = false, ...props }) {
|
|
307
|
+
const Comp = asChild ? __WEBPACK_EXTERNAL_MODULE__radix_ui_react_slot_85c2da36__.Slot : "button";
|
|
308
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(Comp, {
|
|
309
|
+
"data-slot": "sidebar-menu-action",
|
|
310
|
+
"data-sidebar": "menu-action",
|
|
311
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 md:after:hidden", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", showOnHover && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0", className),
|
|
312
|
+
...props
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
function SidebarMenuBadge({ className, ...props }) {
|
|
316
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
317
|
+
"data-slot": "sidebar-menu-badge",
|
|
318
|
+
"data-sidebar": "menu-badge",
|
|
319
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none", "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", className),
|
|
320
|
+
...props
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
324
|
+
const width = __WEBPACK_EXTERNAL_MODULE_react__.useMemo(()=>`${Math.floor(40 * Math.random()) + 50}%`, []);
|
|
325
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
326
|
+
"data-slot": "sidebar-menu-skeleton",
|
|
327
|
+
"data-sidebar": "menu-skeleton",
|
|
328
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
329
|
+
...props
|
|
330
|
+
}, showIcon && /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__skeleton_js_fad59023__.Skeleton, {
|
|
331
|
+
className: "size-4 rounded-md",
|
|
332
|
+
"data-sidebar": "menu-skeleton-icon"
|
|
333
|
+
}), /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__skeleton_js_fad59023__.Skeleton, {
|
|
334
|
+
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
335
|
+
"data-sidebar": "menu-skeleton-text",
|
|
336
|
+
style: {
|
|
337
|
+
"--skeleton-width": width
|
|
338
|
+
}
|
|
339
|
+
}));
|
|
340
|
+
}
|
|
341
|
+
function SidebarMenuSub({ className, ...props }) {
|
|
342
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("ul", {
|
|
343
|
+
"data-slot": "sidebar-menu-sub",
|
|
344
|
+
"data-sidebar": "menu-sub",
|
|
345
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5", "group-data-[collapsible=icon]:hidden", className),
|
|
346
|
+
...props
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
function SidebarMenuSubItem({ className, ...props }) {
|
|
350
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("li", {
|
|
351
|
+
"data-slot": "sidebar-menu-sub-item",
|
|
352
|
+
"data-sidebar": "menu-sub-item",
|
|
353
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("group/menu-sub-item relative", className),
|
|
354
|
+
...props
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
function SidebarMenuSubButton({ asChild = false, size = "md", isActive = false, className, ...props }) {
|
|
358
|
+
const Comp = asChild ? __WEBPACK_EXTERNAL_MODULE__radix_ui_react_slot_85c2da36__.Slot : "a";
|
|
359
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(Comp, {
|
|
360
|
+
"data-slot": "sidebar-menu-sub-button",
|
|
361
|
+
"data-sidebar": "menu-sub-button",
|
|
362
|
+
"data-size": size,
|
|
363
|
+
"data-active": isActive,
|
|
364
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0", "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground", "sm" === size && "text-xs", "md" === size && "text-sm", "group-data-[collapsible=icon]:hidden", className),
|
|
365
|
+
...props
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__ from "../lib/utils.js";
|
|
2
|
+
function Skeleton({ className, ...props }) {
|
|
3
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
4
|
+
"data-slot": "skeleton",
|
|
5
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-accent animate-pulse rounded-md", className),
|
|
6
|
+
...props
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
export { Skeleton };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
3
|
+
declare function Slider({ className, defaultValue, value, min, max, ...props }: React.ComponentProps<typeof SliderPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export { Slider };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__radix_ui_react_slider_67d82a63__ from "@radix-ui/react-slider";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__ from "../lib/utils.js";
|
|
5
|
+
function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }) {
|
|
6
|
+
const _values = __WEBPACK_EXTERNAL_MODULE_react__.useMemo(()=>Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [
|
|
7
|
+
min,
|
|
8
|
+
max
|
|
9
|
+
], [
|
|
10
|
+
value,
|
|
11
|
+
defaultValue,
|
|
12
|
+
min,
|
|
13
|
+
max
|
|
14
|
+
]);
|
|
15
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_slider_67d82a63__.Root, {
|
|
16
|
+
"data-slot": "slider",
|
|
17
|
+
defaultValue: defaultValue,
|
|
18
|
+
value: value,
|
|
19
|
+
min: min,
|
|
20
|
+
max: max,
|
|
21
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.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
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_slider_67d82a63__.Track, {
|
|
24
|
+
"data-slot": "slider-track",
|
|
25
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.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
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_slider_67d82a63__.Range, {
|
|
27
|
+
"data-slot": "slider-range",
|
|
28
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")
|
|
29
|
+
})), Array.from({
|
|
30
|
+
length: _values.length
|
|
31
|
+
}, (_, index)=>/*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_slider_67d82a63__.Thumb, {
|
|
32
|
+
"data-slot": "slider-thumb",
|
|
33
|
+
key: index,
|
|
34
|
+
className: "border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
35
|
+
})));
|
|
36
|
+
}
|
|
37
|
+
export { Slider };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_next_themes_25055421__ from "next-themes";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE_sonner__ from "sonner";
|
|
4
|
+
const Toaster = ({ ...props })=>{
|
|
5
|
+
const { theme = "system" } = (0, __WEBPACK_EXTERNAL_MODULE_next_themes_25055421__.useTheme)();
|
|
6
|
+
return /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE_sonner__.Toaster, {
|
|
7
|
+
theme: theme,
|
|
8
|
+
className: "toaster group",
|
|
9
|
+
style: {
|
|
10
|
+
"--normal-bg": "var(--popover)",
|
|
11
|
+
"--normal-text": "var(--popover-foreground)",
|
|
12
|
+
"--normal-border": "var(--border)"
|
|
13
|
+
},
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
export { Toaster };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__radix_ui_react_switch_5e92b7ed__ from "@radix-ui/react-switch";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__ from "../lib/utils.js";
|
|
5
|
+
function Switch({ className, ...props }) {
|
|
6
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_switch_5e92b7ed__.Root, {
|
|
7
|
+
"data-slot": "switch",
|
|
8
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.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),
|
|
9
|
+
...props
|
|
10
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_switch_5e92b7ed__.Thumb, {
|
|
11
|
+
"data-slot": "switch-thumb",
|
|
12
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.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")
|
|
13
|
+
}));
|
|
14
|
+
}
|
|
15
|
+
export { Switch };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function Table({ className, ...props }: React.ComponentProps<"table">): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function TableRow({ className, ...props }: React.ComponentProps<"tr">): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function TableHead({ className, ...props }: React.ComponentProps<"th">): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function TableCell({ className, ...props }: React.ComponentProps<"td">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function TableCaption({ className, ...props }: React.ComponentProps<"caption">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|
package/dist/ui/table.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__ from "../lib/utils.js";
|
|
4
|
+
function Table({ className, ...props }) {
|
|
5
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
6
|
+
"data-slot": "table-container",
|
|
7
|
+
className: "relative w-full overflow-x-auto"
|
|
8
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("table", {
|
|
9
|
+
"data-slot": "table",
|
|
10
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("w-full caption-bottom text-sm", className),
|
|
11
|
+
...props
|
|
12
|
+
}));
|
|
13
|
+
}
|
|
14
|
+
function TableHeader({ className, ...props }) {
|
|
15
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("thead", {
|
|
16
|
+
"data-slot": "table-header",
|
|
17
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("[&_tr]:border-b", className),
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function TableBody({ className, ...props }) {
|
|
22
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("tbody", {
|
|
23
|
+
"data-slot": "table-body",
|
|
24
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("[&_tr:last-child]:border-0", className),
|
|
25
|
+
...props
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function TableFooter({ className, ...props }) {
|
|
29
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("tfoot", {
|
|
30
|
+
"data-slot": "table-footer",
|
|
31
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", className),
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function TableRow({ className, ...props }) {
|
|
36
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("tr", {
|
|
37
|
+
"data-slot": "table-row",
|
|
38
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", className),
|
|
39
|
+
...props
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function TableHead({ className, ...props }) {
|
|
43
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("th", {
|
|
44
|
+
"data-slot": "table-head",
|
|
45
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
|
|
46
|
+
...props
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function TableCell({ className, ...props }) {
|
|
50
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("td", {
|
|
51
|
+
"data-slot": "table-cell",
|
|
52
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
|
|
53
|
+
...props
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function TableCaption({ className, ...props }) {
|
|
57
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("caption", {
|
|
58
|
+
"data-slot": "table-caption",
|
|
59
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("text-muted-foreground mt-4 text-sm", className),
|
|
60
|
+
...props
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3
|
+
declare function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
package/dist/ui/tabs.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__radix_ui_react_tabs_7bf5a77b__ from "@radix-ui/react-tabs";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__ from "../lib/utils.js";
|
|
5
|
+
function Tabs({ className, ...props }) {
|
|
6
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_tabs_7bf5a77b__.Root, {
|
|
7
|
+
"data-slot": "tabs",
|
|
8
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("flex flex-col gap-2", className),
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function TabsList({ className, ...props }) {
|
|
13
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_tabs_7bf5a77b__.List, {
|
|
14
|
+
"data-slot": "tabs-list",
|
|
15
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]", className),
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function TabsTrigger({ className, ...props }) {
|
|
20
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_tabs_7bf5a77b__.Trigger, {
|
|
21
|
+
"data-slot": "tabs-trigger",
|
|
22
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.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),
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function TabsContent({ className, ...props }) {
|
|
27
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_tabs_7bf5a77b__.Content, {
|
|
28
|
+
"data-slot": "tabs-content",
|
|
29
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("flex-1 outline-none", className),
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__ from "../lib/utils.js";
|
|
3
|
+
function Textarea({ className, ...props }) {
|
|
4
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("textarea", {
|
|
5
|
+
"data-slot": "textarea",
|
|
6
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.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),
|
|
7
|
+
...props
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
export { Textarea };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
3
|
+
import { type VariantProps } from "class-variance-authority";
|
|
4
|
+
import { toggleVariants } from "./toggle";
|
|
5
|
+
declare function ToggleGroup({ className, variant, size, children, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function ToggleGroupItem({ className, children, variant, size, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { ToggleGroup, ToggleGroupItem };
|