@codefast/ui 0.3.10 → 0.3.11-canary.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/CHANGELOG.md +19 -0
- package/README.md +277 -167
- package/dist/components/accordion.cjs +5 -5
- package/dist/components/accordion.d.ts +4 -4
- package/dist/components/accordion.js +5 -5
- package/dist/components/alert-dialog.cjs +9 -9
- package/dist/components/alert-dialog.d.ts +11 -11
- package/dist/components/alert-dialog.js +9 -9
- package/dist/components/alert.cjs +5 -5
- package/dist/components/alert.d.ts +5 -5
- package/dist/components/alert.js +5 -5
- package/dist/components/aspect-ratio.d.ts +2 -2
- package/dist/components/avatar.cjs +3 -3
- package/dist/components/avatar.d.ts +2 -2
- package/dist/components/avatar.js +3 -3
- package/dist/components/badge.cjs +7 -7
- package/dist/components/badge.d.ts +3 -3
- package/dist/components/badge.js +7 -7
- package/dist/components/breadcrumb.cjs +6 -8
- package/dist/components/breadcrumb.d.ts +8 -8
- package/dist/components/breadcrumb.js +6 -8
- package/dist/components/button-group.cjs +8 -8
- package/dist/components/button-group.d.ts +5 -5
- package/dist/components/button-group.js +8 -8
- package/dist/components/button.cjs +17 -17
- package/dist/components/button.d.ts +6 -6
- package/dist/components/button.js +17 -17
- package/dist/components/calendar.cjs +35 -35
- package/dist/components/calendar.d.ts +5 -5
- package/dist/components/calendar.js +35 -35
- package/dist/components/card.cjs +7 -7
- package/dist/components/card.d.ts +8 -8
- package/dist/components/card.js +7 -7
- package/dist/components/carousel.cjs +20 -20
- package/dist/components/carousel.d.ts +10 -10
- package/dist/components/carousel.js +20 -20
- package/dist/components/chart.cjs +42 -42
- package/dist/components/chart.d.ts +12 -11
- package/dist/components/chart.js +42 -42
- package/dist/components/checkbox-cards.cjs +2 -2
- package/dist/components/checkbox-cards.d.ts +2 -2
- package/dist/components/checkbox-cards.js +2 -2
- package/dist/components/checkbox-group.cjs +2 -2
- package/dist/components/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group.js +2 -2
- package/dist/components/checkbox.cjs +1 -1
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.js +1 -1
- package/dist/components/collapsible.d.ts +2 -2
- package/dist/components/command.cjs +10 -10
- package/dist/components/command.d.ts +4 -4
- package/dist/components/command.js +10 -10
- package/dist/components/context-menu.cjs +10 -10
- package/dist/components/context-menu.d.ts +4 -4
- package/dist/components/context-menu.js +10 -10
- package/dist/components/dialog.cjs +12 -12
- package/dist/components/dialog.d.ts +10 -10
- package/dist/components/dialog.js +12 -12
- package/dist/components/drawer.cjs +9 -9
- package/dist/components/drawer.d.ts +9 -9
- package/dist/components/drawer.js +9 -9
- package/dist/components/dropdown-menu.cjs +10 -10
- package/dist/components/dropdown-menu.d.ts +4 -4
- package/dist/components/dropdown-menu.js +10 -10
- package/dist/components/empty.cjs +10 -10
- package/dist/components/empty.d.ts +9 -9
- package/dist/components/empty.js +10 -10
- package/dist/components/field.cjs +17 -17
- package/dist/components/field.d.ts +14 -14
- package/dist/components/field.js +17 -17
- package/dist/components/form.cjs +8 -8
- package/dist/components/form.d.ts +10 -10
- package/dist/components/form.js +8 -8
- package/dist/components/hover-card.cjs +3 -3
- package/dist/components/hover-card.d.ts +2 -2
- package/dist/components/hover-card.js +3 -3
- package/dist/components/input-group.cjs +20 -20
- package/dist/components/input-group.d.ts +15 -15
- package/dist/components/input-group.js +20 -20
- package/dist/components/input-number.cjs +7 -7
- package/dist/components/input-number.d.ts +2 -2
- package/dist/components/input-number.js +7 -7
- package/dist/components/input-otp.cjs +4 -4
- package/dist/components/input-otp.d.ts +6 -6
- package/dist/components/input-otp.js +4 -4
- package/dist/components/input-password.cjs +6 -6
- package/dist/components/input-password.d.ts +3 -3
- package/dist/components/input-password.js +6 -6
- package/dist/components/input-search.cjs +4 -4
- package/dist/components/input-search.d.ts +3 -3
- package/dist/components/input-search.js +4 -4
- package/dist/components/input.cjs +1 -1
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +1 -1
- package/dist/components/item.cjs +23 -23
- package/dist/components/item.d.ts +12 -12
- package/dist/components/item.js +23 -23
- package/dist/components/kbd.cjs +2 -2
- package/dist/components/kbd.d.ts +3 -3
- package/dist/components/kbd.js +2 -2
- package/dist/components/label.cjs +1 -1
- package/dist/components/label.d.ts +2 -2
- package/dist/components/label.js +1 -1
- package/dist/components/menubar.cjs +13 -13
- package/dist/components/menubar.d.ts +4 -4
- package/dist/components/menubar.js +13 -13
- package/dist/components/native-select.cjs +2 -2
- package/dist/components/native-select.d.ts +4 -4
- package/dist/components/native-select.js +2 -2
- package/dist/components/navigation-menu.cjs +10 -10
- package/dist/components/navigation-menu.d.ts +2 -2
- package/dist/components/navigation-menu.js +10 -10
- package/dist/components/pagination.cjs +6 -6
- package/dist/components/pagination.d.ts +10 -10
- package/dist/components/pagination.js +6 -6
- package/dist/components/popover.cjs +3 -3
- package/dist/components/popover.d.ts +3 -3
- package/dist/components/popover.js +3 -3
- package/dist/components/progress-circle.cjs +22 -22
- package/dist/components/progress-circle.d.ts +5 -5
- package/dist/components/progress-circle.js +22 -22
- package/dist/components/progress.cjs +2 -2
- package/dist/components/progress.d.ts +2 -2
- package/dist/components/progress.js +2 -2
- package/dist/components/radio-cards.cjs +3 -3
- package/dist/components/radio-cards.d.ts +2 -2
- package/dist/components/radio-cards.js +3 -3
- package/dist/components/radio-group.cjs +3 -3
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.js +3 -3
- package/dist/components/radio.cjs +1 -1
- package/dist/components/radio.d.ts +2 -2
- package/dist/components/radio.js +1 -1
- package/dist/components/resizable.cjs +3 -3
- package/dist/components/resizable.d.ts +2 -2
- package/dist/components/resizable.js +3 -3
- package/dist/components/scroll-area.cjs +31 -31
- package/dist/components/scroll-area.d.ts +5 -5
- package/dist/components/scroll-area.js +31 -31
- package/dist/components/select.cjs +9 -9
- package/dist/components/select.d.ts +5 -5
- package/dist/components/select.js +9 -9
- package/dist/components/separator.cjs +9 -9
- package/dist/components/separator.d.ts +5 -5
- package/dist/components/separator.js +9 -9
- package/dist/components/sheet.cjs +17 -17
- package/dist/components/sheet.d.ts +9 -9
- package/dist/components/sheet.js +17 -17
- package/dist/components/sidebar.cjs +65 -65
- package/dist/components/sidebar.d.ts +31 -31
- package/dist/components/sidebar.js +65 -65
- package/dist/components/skeleton.cjs +1 -1
- package/dist/components/skeleton.d.ts +2 -2
- package/dist/components/skeleton.js +1 -1
- package/dist/components/slider.cjs +4 -4
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/slider.js +4 -4
- package/dist/components/sonner.cjs +4 -4
- package/dist/components/sonner.d.ts +3 -3
- package/dist/components/sonner.js +4 -4
- package/dist/components/spinner.cjs +5 -5
- package/dist/components/spinner.d.ts +2 -2
- package/dist/components/spinner.js +5 -5
- package/dist/components/switch.cjs +2 -2
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/switch.js +2 -2
- package/dist/components/table.cjs +8 -8
- package/dist/components/table.d.ts +9 -9
- package/dist/components/table.js +8 -8
- package/dist/components/tabs.cjs +4 -4
- package/dist/components/tabs.d.ts +2 -2
- package/dist/components/tabs.js +4 -4
- package/dist/components/textarea.cjs +1 -1
- package/dist/components/textarea.d.ts +2 -2
- package/dist/components/textarea.js +1 -1
- package/dist/components/toggle-group.cjs +5 -5
- package/dist/components/toggle-group.d.ts +4 -4
- package/dist/components/toggle-group.js +5 -5
- package/dist/components/toggle.cjs +8 -8
- package/dist/components/toggle.d.ts +3 -3
- package/dist/components/toggle.js +8 -8
- package/dist/components/tooltip.cjs +2 -2
- package/dist/components/tooltip.d.ts +3 -3
- package/dist/components/tooltip.js +2 -2
- package/dist/css/preset.css +4 -4
- package/dist/css/style.css +3 -3
- package/dist/hooks/use-copy-to-clipboard.cjs +1 -1
- package/dist/hooks/use-copy-to-clipboard.d.ts +1 -1
- package/dist/hooks/use-copy-to-clipboard.js +1 -1
- package/dist/hooks/use-media-query.cjs +3 -3
- package/dist/hooks/use-media-query.js +3 -3
- package/dist/hooks/use-mutation-observer.d.ts +1 -1
- package/dist/hooks/use-pagination.cjs +1 -1
- package/dist/hooks/use-pagination.js +1 -1
- package/dist/index.d.ts +130 -130
- package/dist/primitives/checkbox-group.cjs +3 -3
- package/dist/primitives/checkbox-group.d.ts +11 -11
- package/dist/primitives/checkbox-group.js +3 -3
- package/dist/primitives/input-number.cjs +46 -46
- package/dist/primitives/input-number.d.ts +8 -8
- package/dist/primitives/input-number.js +46 -46
- package/dist/primitives/input.cjs +7 -7
- package/dist/primitives/input.d.ts +4 -4
- package/dist/primitives/input.js +7 -7
- package/dist/primitives/progress-circle.cjs +8 -8
- package/dist/primitives/progress-circle.d.ts +7 -7
- package/dist/primitives/progress-circle.js +8 -8
- package/package.json +38 -42
|
@@ -65,30 +65,30 @@ const external_skeleton_cjs_namespaceObject = require("./skeleton.cjs");
|
|
|
65
65
|
const external_tooltip_cjs_namespaceObject = require("./tooltip.cjs");
|
|
66
66
|
const use_is_mobile_cjs_namespaceObject = require("../hooks/use-is-mobile.cjs");
|
|
67
67
|
const sidebarMenuButtonVariants = (0, tailwind_variants_namespaceObject.tv)({
|
|
68
|
-
base:
|
|
68
|
+
base: "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-3 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 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 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
69
69
|
defaultVariants: {
|
|
70
|
-
size:
|
|
71
|
-
variant:
|
|
70
|
+
size: "md",
|
|
71
|
+
variant: "default"
|
|
72
72
|
},
|
|
73
73
|
variants: {
|
|
74
74
|
size: {
|
|
75
|
-
sm:
|
|
76
|
-
md:
|
|
77
|
-
lg:
|
|
75
|
+
sm: "h-7 text-xs",
|
|
76
|
+
md: "h-8 text-sm",
|
|
77
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
|
|
78
78
|
},
|
|
79
79
|
variant: {
|
|
80
|
-
default:
|
|
81
|
-
outline:
|
|
80
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
81
|
+
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))]"
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
|
-
const SIDEBAR_COOKIE_NAME =
|
|
85
|
+
const SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
86
86
|
const SIDEBAR_COOKIE_MAX_AGE = 604800;
|
|
87
|
-
const SIDEBAR_WIDTH =
|
|
88
|
-
const SIDEBAR_WIDTH_MOBILE =
|
|
89
|
-
const SIDEBAR_WIDTH_ICON =
|
|
90
|
-
const SIDEBAR_KEYBOARD_SHORTCUT =
|
|
91
|
-
const SIDEBAR_PROVIDER_NAME =
|
|
87
|
+
const SIDEBAR_WIDTH = "16rem";
|
|
88
|
+
const SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
89
|
+
const SIDEBAR_WIDTH_ICON = "3.0625rem";
|
|
90
|
+
const SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
91
|
+
const SIDEBAR_PROVIDER_NAME = "SidebarProvider";
|
|
92
92
|
const [SidebarContextProvider, useSidebar] = (0, react_context_namespaceObject.createContext)(SIDEBAR_PROVIDER_NAME);
|
|
93
93
|
function SidebarProvider({ children, className, defaultOpen = true, onOpenChange: setOpenProperty, open: openProperty, style, ...props }) {
|
|
94
94
|
const isMobile = (0, use_is_mobile_cjs_namespaceObject.useIsMobile)();
|
|
@@ -96,7 +96,7 @@ function SidebarProvider({ children, className, defaultOpen = true, onOpenChange
|
|
|
96
96
|
const [isOpen, setIsOpen] = (0, external_react_namespaceObject.useState)(defaultOpen);
|
|
97
97
|
const open = openProperty ?? isOpen;
|
|
98
98
|
const setOpen = (0, external_react_namespaceObject.useCallback)((value)=>{
|
|
99
|
-
const openState =
|
|
99
|
+
const openState = "function" == typeof value ? value(open) : value;
|
|
100
100
|
if (setOpenProperty) setOpenProperty(openState);
|
|
101
101
|
else setIsOpen(openState);
|
|
102
102
|
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState.toString()}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE.toString()}`;
|
|
@@ -118,14 +118,14 @@ function SidebarProvider({ children, className, defaultOpen = true, onOpenChange
|
|
|
118
118
|
toggleSidebar();
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
|
-
window.addEventListener(
|
|
121
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
122
122
|
return ()=>{
|
|
123
|
-
window.removeEventListener(
|
|
123
|
+
window.removeEventListener("keydown", handleKeyDown);
|
|
124
124
|
};
|
|
125
125
|
}, [
|
|
126
126
|
toggleSidebar
|
|
127
127
|
]);
|
|
128
|
-
const state = open ?
|
|
128
|
+
const state = open ? "expanded" : "collapsed";
|
|
129
129
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SidebarContextProvider, {
|
|
130
130
|
isMobile: isMobile,
|
|
131
131
|
open: open,
|
|
@@ -137,11 +137,11 @@ function SidebarProvider({ children, className, defaultOpen = true, onOpenChange
|
|
|
137
137
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipProvider, {
|
|
138
138
|
delayDuration: 0,
|
|
139
139
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
140
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
140
|
+
className: (0, tailwind_variants_namespaceObject.cn)("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar", className),
|
|
141
141
|
"data-slot": "sidebar-wrapper",
|
|
142
142
|
style: {
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
144
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
145
145
|
...style
|
|
146
146
|
},
|
|
147
147
|
...props,
|
|
@@ -150,11 +150,11 @@ function SidebarProvider({ children, className, defaultOpen = true, onOpenChange
|
|
|
150
150
|
})
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
const SIDEBAR_NAME =
|
|
154
|
-
function Sidebar({ children, className, collapsible =
|
|
153
|
+
const SIDEBAR_NAME = "Sidebar";
|
|
154
|
+
function Sidebar({ children, className, collapsible = "offcanvas", side = "left", variant = "sidebar", ...props }) {
|
|
155
155
|
const { isMobile, openMobile, setOpenMobile, state } = useSidebar(SIDEBAR_NAME);
|
|
156
|
-
if (
|
|
157
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
156
|
+
if ("none" === collapsible) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
157
|
+
className: (0, tailwind_variants_namespaceObject.cn)("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground", className),
|
|
158
158
|
"data-slot": "sidebar",
|
|
159
159
|
...props,
|
|
160
160
|
children: children
|
|
@@ -164,13 +164,13 @@ function Sidebar({ children, className, collapsible = 'offcanvas', side = 'left'
|
|
|
164
164
|
onOpenChange: setOpenMobile,
|
|
165
165
|
...props,
|
|
166
166
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_sheet_cjs_namespaceObject.SheetContent, {
|
|
167
|
-
className: "
|
|
167
|
+
className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
168
168
|
"data-mobile": "true",
|
|
169
169
|
"data-sidebar": "sidebar",
|
|
170
170
|
"data-slot": "sidebar",
|
|
171
171
|
side: side,
|
|
172
172
|
style: {
|
|
173
|
-
|
|
173
|
+
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
174
174
|
},
|
|
175
175
|
children: [
|
|
176
176
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_sheet_cjs_namespaceObject.SheetHeader, {
|
|
@@ -192,23 +192,23 @@ function Sidebar({ children, className, collapsible = 'offcanvas', side = 'left'
|
|
|
192
192
|
})
|
|
193
193
|
});
|
|
194
194
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
195
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
196
|
-
"data-collapsible":
|
|
195
|
+
className: (0, tailwind_variants_namespaceObject.cn)("group peer hidden text-sidebar-foreground md:block", className),
|
|
196
|
+
"data-collapsible": "collapsed" === state ? collapsible : "",
|
|
197
197
|
"data-side": side,
|
|
198
198
|
"data-slot": "sidebar",
|
|
199
199
|
"data-state": state,
|
|
200
200
|
"data-variant": variant,
|
|
201
201
|
children: [
|
|
202
202
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
203
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
203
|
+
className: (0, tailwind_variants_namespaceObject.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)"),
|
|
204
204
|
"data-slot": "sidebar-gap"
|
|
205
205
|
}),
|
|
206
206
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
207
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
207
|
+
className: (0, tailwind_variants_namespaceObject.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),
|
|
208
208
|
"data-slot": "sidebar-container",
|
|
209
209
|
...props,
|
|
210
210
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
211
|
-
className: "
|
|
211
|
+
className: "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",
|
|
212
212
|
"data-sidebar": "sidebar",
|
|
213
213
|
"data-slot": "sidebar-inner",
|
|
214
214
|
children: children
|
|
@@ -217,11 +217,11 @@ function Sidebar({ children, className, collapsible = 'offcanvas', side = 'left'
|
|
|
217
217
|
]
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
|
-
const SIDEBAR_TRIGGER_NAME =
|
|
220
|
+
const SIDEBAR_TRIGGER_NAME = "SidebarTrigger";
|
|
221
221
|
function SidebarTrigger({ className, onClick, ...props }) {
|
|
222
222
|
const { toggleSidebar } = useSidebar(SIDEBAR_TRIGGER_NAME);
|
|
223
223
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button, {
|
|
224
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
224
|
+
className: (0, tailwind_variants_namespaceObject.cn)("size-7", className),
|
|
225
225
|
"data-sidebar": "trigger",
|
|
226
226
|
"data-slot": "sidebar-trigger",
|
|
227
227
|
size: "icon",
|
|
@@ -240,11 +240,11 @@ function SidebarTrigger({ className, onClick, ...props }) {
|
|
|
240
240
|
]
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
|
-
const SIDEBAR_RAIL_NAME =
|
|
243
|
+
const SIDEBAR_RAIL_NAME = "SidebarRail";
|
|
244
244
|
function SidebarRail({ className, ...props }) {
|
|
245
245
|
const { toggleSidebar } = useSidebar(SIDEBAR_RAIL_NAME);
|
|
246
246
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
247
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
247
|
+
className: (0, tailwind_variants_namespaceObject.cn)("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[collapsible=offcanvas]:translate-x-0 group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-0.5 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar hover:after:bg-sidebar-border in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize sm:flex [[data-side=left][data-collapsible=offcanvas]_&]:-right-2 [[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-collapsible=offcanvas]_&]:-left-2 [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", className),
|
|
248
248
|
"data-sidebar": "rail",
|
|
249
249
|
"data-slot": "sidebar-rail",
|
|
250
250
|
title: "Toggle Sidebar",
|
|
@@ -255,14 +255,14 @@ function SidebarRail({ className, ...props }) {
|
|
|
255
255
|
}
|
|
256
256
|
function SidebarInset({ className, ...props }) {
|
|
257
257
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("main", {
|
|
258
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
258
|
+
className: (0, tailwind_variants_namespaceObject.cn)("relative flex w-full min-w-0 flex-1 flex-col bg-background 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),
|
|
259
259
|
"data-slot": "sidebar-inset",
|
|
260
260
|
...props
|
|
261
261
|
});
|
|
262
262
|
}
|
|
263
263
|
function SidebarInput({ className, ...props }) {
|
|
264
264
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_cjs_namespaceObject.Input, {
|
|
265
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
265
|
+
className: (0, tailwind_variants_namespaceObject.cn)("h-8 w-full bg-background shadow-none", className),
|
|
266
266
|
"data-sidebar": "input",
|
|
267
267
|
"data-slot": "sidebar-input",
|
|
268
268
|
...props
|
|
@@ -270,7 +270,7 @@ function SidebarInput({ className, ...props }) {
|
|
|
270
270
|
}
|
|
271
271
|
function SidebarHeader({ className, ...props }) {
|
|
272
272
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
273
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
273
|
+
className: (0, tailwind_variants_namespaceObject.cn)("flex flex-col gap-2 p-2", className),
|
|
274
274
|
"data-sidebar": "header",
|
|
275
275
|
"data-slot": "sidebar-header",
|
|
276
276
|
...props
|
|
@@ -278,7 +278,7 @@ function SidebarHeader({ className, ...props }) {
|
|
|
278
278
|
}
|
|
279
279
|
function SidebarFooter({ className, ...props }) {
|
|
280
280
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
281
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
281
|
+
className: (0, tailwind_variants_namespaceObject.cn)("flex flex-col gap-2 p-2", className),
|
|
282
282
|
"data-sidebar": "footer",
|
|
283
283
|
"data-slot": "sidebar-footer",
|
|
284
284
|
...props
|
|
@@ -286,7 +286,7 @@ function SidebarFooter({ className, ...props }) {
|
|
|
286
286
|
}
|
|
287
287
|
function SidebarSeparator({ className, ...props }) {
|
|
288
288
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_separator_cjs_namespaceObject.Separator, {
|
|
289
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
289
|
+
className: (0, tailwind_variants_namespaceObject.cn)("mx-2 w-auto bg-sidebar-border", className),
|
|
290
290
|
"data-sidebar": "separator",
|
|
291
291
|
"data-slot": "sidebar-separator",
|
|
292
292
|
...props
|
|
@@ -294,7 +294,7 @@ function SidebarSeparator({ className, ...props }) {
|
|
|
294
294
|
}
|
|
295
295
|
function SidebarContent({ className, ...props }) {
|
|
296
296
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
297
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
297
|
+
className: (0, tailwind_variants_namespaceObject.cn)("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
|
|
298
298
|
"data-sidebar": "content",
|
|
299
299
|
"data-slot": "sidebar-content",
|
|
300
300
|
...props
|
|
@@ -302,25 +302,25 @@ function SidebarContent({ className, ...props }) {
|
|
|
302
302
|
}
|
|
303
303
|
function SidebarGroup({ className, ...props }) {
|
|
304
304
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
305
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
305
|
+
className: (0, tailwind_variants_namespaceObject.cn)("relative flex w-full min-w-0 flex-col p-2", className),
|
|
306
306
|
"data-sidebar": "group",
|
|
307
307
|
"data-slot": "sidebar-group",
|
|
308
308
|
...props
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
311
|
function SidebarGroupLabel({ asChild = false, className, ...props }) {
|
|
312
|
-
const Component = asChild ? react_slot_namespaceObject.Slot :
|
|
312
|
+
const Component = asChild ? react_slot_namespaceObject.Slot : "div";
|
|
313
313
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, {
|
|
314
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
314
|
+
className: (0, tailwind_variants_namespaceObject.cn)("flex h-8 shrink-0 items-center truncate rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-3 [&>svg]:size-4 [&>svg]:shrink-0", className),
|
|
315
315
|
"data-sidebar": "group-label",
|
|
316
316
|
"data-slot": "sidebar-group-label",
|
|
317
317
|
...props
|
|
318
318
|
});
|
|
319
319
|
}
|
|
320
320
|
function SidebarGroupAction({ asChild = false, className, ...props }) {
|
|
321
|
-
const Component = asChild ? react_slot_namespaceObject.Slot :
|
|
321
|
+
const Component = asChild ? react_slot_namespaceObject.Slot : "button";
|
|
322
322
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, {
|
|
323
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
323
|
+
className: (0, tailwind_variants_namespaceObject.cn)("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-3 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", className),
|
|
324
324
|
"data-sidebar": "group-action",
|
|
325
325
|
"data-slot": "sidebar-group-action",
|
|
326
326
|
...props
|
|
@@ -328,7 +328,7 @@ function SidebarGroupAction({ asChild = false, className, ...props }) {
|
|
|
328
328
|
}
|
|
329
329
|
function SidebarGroupContent({ className, ...props }) {
|
|
330
330
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
331
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
331
|
+
className: (0, tailwind_variants_namespaceObject.cn)("w-full text-sm", className),
|
|
332
332
|
"data-sidebar": "group-content",
|
|
333
333
|
"data-slot": "sidebar-group-content",
|
|
334
334
|
...props
|
|
@@ -336,7 +336,7 @@ function SidebarGroupContent({ className, ...props }) {
|
|
|
336
336
|
}
|
|
337
337
|
function SidebarMenu({ className, ...props }) {
|
|
338
338
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("ul", {
|
|
339
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
339
|
+
className: (0, tailwind_variants_namespaceObject.cn)("flex w-full min-w-0 flex-col gap-1", className),
|
|
340
340
|
"data-sidebar": "menu",
|
|
341
341
|
"data-slot": "sidebar-menu",
|
|
342
342
|
...props
|
|
@@ -344,15 +344,15 @@ function SidebarMenu({ className, ...props }) {
|
|
|
344
344
|
}
|
|
345
345
|
function SidebarMenuItem({ className, ...props }) {
|
|
346
346
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("li", {
|
|
347
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
347
|
+
className: (0, tailwind_variants_namespaceObject.cn)("group/menu-item relative", className),
|
|
348
348
|
"data-sidebar": "menu-item",
|
|
349
349
|
"data-slot": "sidebar-menu-item",
|
|
350
350
|
...props
|
|
351
351
|
});
|
|
352
352
|
}
|
|
353
|
-
const SIDEBAR_MENU_BUTTON_NAME =
|
|
354
|
-
function SidebarMenuButton({ asChild = false, className, isActive = false, size =
|
|
355
|
-
const Component = asChild ? react_slot_namespaceObject.Slot :
|
|
353
|
+
const SIDEBAR_MENU_BUTTON_NAME = "SidebarMenuButton";
|
|
354
|
+
function SidebarMenuButton({ asChild = false, className, isActive = false, size = "md", tooltip, variant = "default", ...props }) {
|
|
355
|
+
const Component = asChild ? react_slot_namespaceObject.Slot : "button";
|
|
356
356
|
const { isMobile, state } = useSidebar(SIDEBAR_MENU_BUTTON_NAME);
|
|
357
357
|
const button = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, {
|
|
358
358
|
className: (0, tailwind_variants_namespaceObject.cn)(sidebarMenuButtonVariants({
|
|
@@ -366,7 +366,7 @@ function SidebarMenuButton({ asChild = false, className, isActive = false, size
|
|
|
366
366
|
...props
|
|
367
367
|
});
|
|
368
368
|
if (!tooltip) return button;
|
|
369
|
-
if (
|
|
369
|
+
if ("string" == typeof tooltip) tooltip = {
|
|
370
370
|
children: tooltip
|
|
371
371
|
};
|
|
372
372
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_tooltip_cjs_namespaceObject.Tooltip, {
|
|
@@ -377,7 +377,7 @@ function SidebarMenuButton({ asChild = false, className, isActive = false, size
|
|
|
377
377
|
}),
|
|
378
378
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipContent, {
|
|
379
379
|
align: "center",
|
|
380
|
-
hidden:
|
|
380
|
+
hidden: "collapsed" !== state || isMobile,
|
|
381
381
|
side: "right",
|
|
382
382
|
...tooltip
|
|
383
383
|
})
|
|
@@ -385,9 +385,9 @@ function SidebarMenuButton({ asChild = false, className, isActive = false, size
|
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
387
|
function SidebarMenuAction({ asChild = false, className, showOnHover = false, ...props }) {
|
|
388
|
-
const Component = asChild ? react_slot_namespaceObject.Slot :
|
|
388
|
+
const Component = asChild ? react_slot_namespaceObject.Slot : "button";
|
|
389
389
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, {
|
|
390
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
390
|
+
className: (0, tailwind_variants_namespaceObject.cn)("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-3 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground data-[state=open]:opacity-100 md:opacity-0", className),
|
|
391
391
|
"data-sidebar": "menu-action",
|
|
392
392
|
"data-slot": "sidebar-menu-action",
|
|
393
393
|
...props
|
|
@@ -395,7 +395,7 @@ function SidebarMenuAction({ asChild = false, className, showOnHover = false, ..
|
|
|
395
395
|
}
|
|
396
396
|
function SidebarMenuBadge({ className, ...props }) {
|
|
397
397
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
398
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
398
|
+
className: (0, tailwind_variants_namespaceObject.cn)("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1", className),
|
|
399
399
|
"data-sidebar": "menu-badge",
|
|
400
400
|
"data-slot": "sidebar-menu-badge",
|
|
401
401
|
...props
|
|
@@ -404,7 +404,7 @@ function SidebarMenuBadge({ className, ...props }) {
|
|
|
404
404
|
function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
405
405
|
const [width] = (0, external_react_namespaceObject.useState)(()=>`${String(Math.floor(40 * Math.random()) + 50)}%`);
|
|
406
406
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
407
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
407
|
+
className: (0, tailwind_variants_namespaceObject.cn)("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
408
408
|
"data-sidebar": "menu-skeleton",
|
|
409
409
|
"data-slot": "sidebar-menu-skeleton",
|
|
410
410
|
...props,
|
|
@@ -417,7 +417,7 @@ function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
|
417
417
|
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
418
418
|
"data-sidebar": "menu-skeleton-text",
|
|
419
419
|
style: {
|
|
420
|
-
|
|
420
|
+
"--skeleton-width": width
|
|
421
421
|
}
|
|
422
422
|
})
|
|
423
423
|
]
|
|
@@ -425,7 +425,7 @@ function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
|
425
425
|
}
|
|
426
426
|
function SidebarMenuSub({ className, ...props }) {
|
|
427
427
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("ul", {
|
|
428
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
428
|
+
className: (0, tailwind_variants_namespaceObject.cn)("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden", className),
|
|
429
429
|
"data-sidebar": "menu-sub",
|
|
430
430
|
"data-slot": "sidebar-menu-sub",
|
|
431
431
|
...props
|
|
@@ -433,16 +433,16 @@ function SidebarMenuSub({ className, ...props }) {
|
|
|
433
433
|
}
|
|
434
434
|
function SidebarMenuSubItem({ className, ...props }) {
|
|
435
435
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("li", {
|
|
436
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
436
|
+
className: (0, tailwind_variants_namespaceObject.cn)("group/menu-sub-item relative", className),
|
|
437
437
|
"data-sidebar": "menu-sub-item",
|
|
438
438
|
"data-slot": "sidebar-menu-sub-item",
|
|
439
439
|
...props
|
|
440
440
|
});
|
|
441
441
|
}
|
|
442
|
-
function SidebarMenuSubButton({ asChild = false, className, isActive = false, size =
|
|
443
|
-
const Component = asChild ? react_slot_namespaceObject.Slot :
|
|
442
|
+
function SidebarMenuSubButton({ asChild = false, className, isActive = false, size = "md", ...props }) {
|
|
443
|
+
const Component = asChild ? react_slot_namespaceObject.Slot : "a";
|
|
444
444
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, {
|
|
445
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
445
|
+
className: (0, tailwind_variants_namespaceObject.cn)("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-3 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground", "sm" === size && "text-xs", "md" === size && "text-sm", "group-data-[collapsible=icon]:hidden", className),
|
|
446
446
|
"data-active": isActive,
|
|
447
447
|
"data-sidebar": "menu-sub-button",
|
|
448
448
|
"data-size": size,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { VariantProps } from
|
|
2
|
-
import type { ComponentProps, Dispatch, JSX, SetStateAction } from
|
|
3
|
-
import { Button } from
|
|
4
|
-
import { Input } from
|
|
5
|
-
import { Separator } from
|
|
6
|
-
import { TooltipContent } from
|
|
1
|
+
import type { VariantProps } from "@codefast/tailwind-variants";
|
|
2
|
+
import type { ComponentProps, Dispatch, JSX, SetStateAction } from "react";
|
|
3
|
+
import { Button } from "./button";
|
|
4
|
+
import { Input } from "./input";
|
|
5
|
+
import { Separator } from "./separator";
|
|
6
|
+
import { TooltipContent } from "./tooltip";
|
|
7
7
|
declare const sidebarMenuButtonVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
|
|
8
8
|
size: {
|
|
9
9
|
sm: string;
|
|
@@ -21,79 +21,79 @@ interface SidebarContextValue {
|
|
|
21
21
|
openMobile: boolean;
|
|
22
22
|
setOpen: (open: boolean) => void;
|
|
23
23
|
setOpenMobile: Dispatch<SetStateAction<boolean>>;
|
|
24
|
-
state:
|
|
24
|
+
state: "collapsed" | "expanded";
|
|
25
25
|
toggleSidebar: () => void;
|
|
26
26
|
}
|
|
27
27
|
declare const useSidebar: (consumerName: string) => SidebarContextValue;
|
|
28
|
-
interface SidebarProviderProps extends ComponentProps<
|
|
28
|
+
interface SidebarProviderProps extends ComponentProps<"div"> {
|
|
29
29
|
defaultOpen?: boolean;
|
|
30
30
|
onOpenChange?: (open: boolean) => void;
|
|
31
31
|
open?: boolean;
|
|
32
32
|
}
|
|
33
33
|
declare function SidebarProvider({ children, className, defaultOpen, onOpenChange: setOpenProperty, open: openProperty, style, ...props }: SidebarProviderProps): JSX.Element;
|
|
34
|
-
interface SidebarProps extends ComponentProps<
|
|
35
|
-
collapsible?:
|
|
36
|
-
side?:
|
|
37
|
-
variant?:
|
|
34
|
+
interface SidebarProps extends ComponentProps<"div"> {
|
|
35
|
+
collapsible?: "icon" | "none" | "offcanvas";
|
|
36
|
+
side?: "left" | "right";
|
|
37
|
+
variant?: "floating" | "inset" | "sidebar";
|
|
38
38
|
}
|
|
39
39
|
declare function Sidebar({ children, className, collapsible, side, variant, ...props }: SidebarProps): JSX.Element;
|
|
40
40
|
type SidebarTriggerProps = ComponentProps<typeof Button>;
|
|
41
41
|
declare function SidebarTrigger({ className, onClick, ...props }: SidebarTriggerProps): JSX.Element;
|
|
42
|
-
type SidebarRailProps = ComponentProps<
|
|
42
|
+
type SidebarRailProps = ComponentProps<"button">;
|
|
43
43
|
declare function SidebarRail({ className, ...props }: SidebarRailProps): JSX.Element;
|
|
44
|
-
type SidebarInsetProps = ComponentProps<
|
|
44
|
+
type SidebarInsetProps = ComponentProps<"main">;
|
|
45
45
|
declare function SidebarInset({ className, ...props }: SidebarInsetProps): JSX.Element;
|
|
46
46
|
type SidebarInputProps = ComponentProps<typeof Input>;
|
|
47
47
|
declare function SidebarInput({ className, ...props }: SidebarInputProps): JSX.Element;
|
|
48
|
-
type SidebarHeaderProps = ComponentProps<
|
|
48
|
+
type SidebarHeaderProps = ComponentProps<"div">;
|
|
49
49
|
declare function SidebarHeader({ className, ...props }: SidebarHeaderProps): JSX.Element;
|
|
50
|
-
type SidebarFooterProps = ComponentProps<
|
|
50
|
+
type SidebarFooterProps = ComponentProps<"div">;
|
|
51
51
|
declare function SidebarFooter({ className, ...props }: SidebarFooterProps): JSX.Element;
|
|
52
52
|
type SidebarSeparatorProps = ComponentProps<typeof Separator>;
|
|
53
53
|
declare function SidebarSeparator({ className, ...props }: SidebarSeparatorProps): JSX.Element;
|
|
54
|
-
type SidebarContentProps = ComponentProps<
|
|
54
|
+
type SidebarContentProps = ComponentProps<"div">;
|
|
55
55
|
declare function SidebarContent({ className, ...props }: SidebarContentProps): JSX.Element;
|
|
56
|
-
type SidebarGroupProps = ComponentProps<
|
|
56
|
+
type SidebarGroupProps = ComponentProps<"div">;
|
|
57
57
|
declare function SidebarGroup({ className, ...props }: SidebarGroupProps): JSX.Element;
|
|
58
|
-
interface SidebarGroupLabelProps extends ComponentProps<
|
|
58
|
+
interface SidebarGroupLabelProps extends ComponentProps<"div"> {
|
|
59
59
|
asChild?: boolean;
|
|
60
60
|
}
|
|
61
61
|
declare function SidebarGroupLabel({ asChild, className, ...props }: SidebarGroupLabelProps): JSX.Element;
|
|
62
|
-
interface SidebarGroupActionProps extends ComponentProps<
|
|
62
|
+
interface SidebarGroupActionProps extends ComponentProps<"button"> {
|
|
63
63
|
asChild?: boolean;
|
|
64
64
|
}
|
|
65
65
|
declare function SidebarGroupAction({ asChild, className, ...props }: SidebarGroupActionProps): JSX.Element;
|
|
66
|
-
type SidebarGroupContentProps = ComponentProps<
|
|
66
|
+
type SidebarGroupContentProps = ComponentProps<"div">;
|
|
67
67
|
declare function SidebarGroupContent({ className, ...props }: SidebarGroupContentProps): JSX.Element;
|
|
68
|
-
type SidebarMenuProps = ComponentProps<
|
|
68
|
+
type SidebarMenuProps = ComponentProps<"ul">;
|
|
69
69
|
declare function SidebarMenu({ className, ...props }: SidebarMenuProps): JSX.Element;
|
|
70
|
-
type SidebarMenuItemProps = ComponentProps<
|
|
70
|
+
type SidebarMenuItemProps = ComponentProps<"li">;
|
|
71
71
|
declare function SidebarMenuItem({ className, ...props }: SidebarMenuItemProps): JSX.Element;
|
|
72
|
-
interface SidebarMenuButtonProps extends ComponentProps<
|
|
72
|
+
interface SidebarMenuButtonProps extends ComponentProps<"button">, VariantProps<typeof sidebarMenuButtonVariants> {
|
|
73
73
|
asChild?: boolean;
|
|
74
74
|
isActive?: boolean;
|
|
75
75
|
tooltip?: ComponentProps<typeof TooltipContent> | string;
|
|
76
76
|
}
|
|
77
77
|
declare function SidebarMenuButton({ asChild, className, isActive, size, tooltip, variant, ...props }: SidebarMenuButtonProps): JSX.Element;
|
|
78
|
-
interface SidebarMenuActionProps extends ComponentProps<
|
|
78
|
+
interface SidebarMenuActionProps extends ComponentProps<"button"> {
|
|
79
79
|
asChild?: boolean;
|
|
80
80
|
showOnHover?: boolean;
|
|
81
81
|
}
|
|
82
82
|
declare function SidebarMenuAction({ asChild, className, showOnHover, ...props }: SidebarMenuActionProps): JSX.Element;
|
|
83
|
-
type SidebarMenuBadgeProps = ComponentProps<
|
|
83
|
+
type SidebarMenuBadgeProps = ComponentProps<"div">;
|
|
84
84
|
declare function SidebarMenuBadge({ className, ...props }: SidebarMenuBadgeProps): JSX.Element;
|
|
85
|
-
interface SidebarMenuSkeletonProps extends ComponentProps<
|
|
85
|
+
interface SidebarMenuSkeletonProps extends ComponentProps<"div"> {
|
|
86
86
|
showIcon?: boolean;
|
|
87
87
|
}
|
|
88
88
|
declare function SidebarMenuSkeleton({ className, showIcon, ...props }: SidebarMenuSkeletonProps): JSX.Element;
|
|
89
|
-
type SidebarMenuSubProps = ComponentProps<
|
|
89
|
+
type SidebarMenuSubProps = ComponentProps<"ul">;
|
|
90
90
|
declare function SidebarMenuSub({ className, ...props }: SidebarMenuSubProps): JSX.Element;
|
|
91
|
-
type SidebarMenuSubItemProps = ComponentProps<
|
|
91
|
+
type SidebarMenuSubItemProps = ComponentProps<"li">;
|
|
92
92
|
declare function SidebarMenuSubItem({ className, ...props }: SidebarMenuSubItemProps): JSX.Element;
|
|
93
|
-
interface SidebarMenuSubButtonProps extends ComponentProps<
|
|
93
|
+
interface SidebarMenuSubButtonProps extends ComponentProps<"a"> {
|
|
94
94
|
asChild?: boolean;
|
|
95
95
|
isActive?: boolean;
|
|
96
|
-
size?:
|
|
96
|
+
size?: "md" | "sm";
|
|
97
97
|
}
|
|
98
98
|
declare function SidebarMenuSubButton({ asChild, className, isActive, size, ...props }: SidebarMenuSubButtonProps): JSX.Element;
|
|
99
99
|
export { sidebarMenuButtonVariants };
|