@warmio/ui 1.5.2 → 2.0.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/README.md +18 -13
- package/dist/badge.js +2 -2
- package/dist/button.js +4 -1
- package/dist/chunks/chunk-A2PN77YE.js +42 -0
- package/dist/chunks/{chunk-F74Y4WRX.js → chunk-DHV2A22F.js} +14 -13
- package/dist/chunks/chunk-DOOSH3V6.js +72 -0
- package/dist/chunks/chunk-EIEA5RJJ.js +97 -0
- package/dist/chunks/{chunk-HQTC542T.js → chunk-FKGHMPVW.js} +141 -345
- package/dist/chunks/{chunk-JXSJTIX7.js → chunk-K36HD5J5.js} +4 -4
- package/dist/chunks/{chunk-GY4XJ6EX.js → chunk-L6L3GVGM.js} +2 -1
- package/dist/chunks/{chunk-2CO2BZLI.js → chunk-MGX6ZL6Q.js} +9 -53
- package/dist/chunks/{chunk-B47G2BJV.js → chunk-MVUHHKBL.js} +37 -79
- package/dist/chunks/chunk-PJUNSOJK.js +116 -0
- package/dist/chunks/chunk-RVVHR7RY.js +0 -0
- package/dist/chunks/chunk-U7D32UN3.js +0 -0
- package/dist/chunks/chunk-W24JGQWM.js +65 -0
- package/dist/dropdown-menu.js +4 -5
- package/dist/entries/badge.css +178 -0
- package/dist/entries/button.css +422 -0
- package/dist/entries/dropdown-menu.css +167 -0
- package/dist/entries/index.css +2789 -0
- package/dist/entries/logo.css +147 -0
- package/dist/entries/product-header.css +88 -0
- package/dist/entries/sheet.css +666 -0
- package/dist/entries/sidebar.css +2108 -0
- package/dist/entries/text.css +97 -0
- package/dist/index.js +17 -15
- package/dist/logo.js +2 -2
- package/dist/product-header.js +2 -2
- package/dist/sheet.js +5 -4
- package/dist/sidebar.css +129 -0
- package/dist/sidebar.js +7 -5
- package/dist/text.css +121 -0
- package/dist/text.js +2 -2
- package/package.json +12 -4
- package/types/button.d.ts +65 -9
- package/types/sidebar.d.ts +9 -2
- package/types/text.d.ts +8 -2
- package/dist/chunks/chunk-3AVFUXCV.js +0 -76
- package/dist/chunks/chunk-6V6K5G72.js +0 -80
- package/dist/chunks/chunk-A2NLFM6R.js +0 -227
- package/dist/chunks/chunk-IK5RHPN3.js +0 -93
- package/dist/chunks/chunk-OU7YQUU2.js +0 -84
- package/dist/chunks/chunk-VIB7OX7D.js +0 -10
|
@@ -1,28 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Button
|
|
3
|
+
} from "./chunk-L6L3GVGM.js";
|
|
1
4
|
import {
|
|
2
5
|
FluidMenuHighlights
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DHV2A22F.js";
|
|
4
7
|
import {
|
|
5
|
-
Button,
|
|
6
8
|
Sheet,
|
|
7
9
|
SheetContent,
|
|
8
10
|
SheetDescription,
|
|
9
11
|
SheetHeader,
|
|
10
12
|
SheetTitle
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EIEA5RJJ.js";
|
|
12
14
|
import {
|
|
13
15
|
FluidOverlay
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import {
|
|
16
|
-
cn
|
|
17
|
-
} from "./chunk-VIB7OX7D.js";
|
|
16
|
+
} from "./chunk-K36HD5J5.js";
|
|
18
17
|
|
|
19
|
-
// ../ui/src/warmio/sidebar.tsx
|
|
18
|
+
// ../ui/src/warmio/sidebar/sidebar.tsx
|
|
20
19
|
import * as React6 from "react";
|
|
21
20
|
|
|
22
21
|
// ../ui/src/components/sidebar.tsx
|
|
23
22
|
import * as React4 from "react";
|
|
24
23
|
import { flushSync } from "react-dom";
|
|
25
|
-
import { cva } from "class-variance-authority";
|
|
26
24
|
|
|
27
25
|
// ../ui/src/hooks/use-mobile.ts
|
|
28
26
|
import * as React from "react";
|
|
@@ -69,9 +67,14 @@ function RenderSlot({
|
|
|
69
67
|
});
|
|
70
68
|
}
|
|
71
69
|
|
|
72
|
-
// ../ui/src/warmio/tooltip.tsx
|
|
70
|
+
// ../ui/src/warmio/tooltip/tooltip.tsx
|
|
73
71
|
import * as React3 from "react";
|
|
74
72
|
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
73
|
+
|
|
74
|
+
// ../ui/src/types/tooltip.types.ts
|
|
75
|
+
var TOOLTIP_EXIT_DURATION_MS = 0;
|
|
76
|
+
|
|
77
|
+
// ../ui/src/warmio/tooltip/tooltip.tsx
|
|
75
78
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
76
79
|
function Tooltip({
|
|
77
80
|
delay: _delay,
|
|
@@ -79,7 +82,14 @@ function Tooltip({
|
|
|
79
82
|
followCursor,
|
|
80
83
|
...props
|
|
81
84
|
}) {
|
|
82
|
-
return /* @__PURE__ */ jsx(
|
|
85
|
+
return /* @__PURE__ */ jsx(
|
|
86
|
+
TooltipPrimitive.Root,
|
|
87
|
+
{
|
|
88
|
+
...props,
|
|
89
|
+
trackCursorAxis: followCursor ?? "none",
|
|
90
|
+
disableHoverablePopup: true
|
|
91
|
+
}
|
|
92
|
+
);
|
|
83
93
|
}
|
|
84
94
|
function TooltipTrigger({
|
|
85
95
|
asChild = false,
|
|
@@ -92,7 +102,16 @@ function TooltipTrigger({
|
|
|
92
102
|
...props
|
|
93
103
|
}) {
|
|
94
104
|
const resolvedRender = render ?? (asChild && React3.isValidElement(children) ? children : void 0);
|
|
95
|
-
return /* @__PURE__ */ jsx(
|
|
105
|
+
return /* @__PURE__ */ jsx(
|
|
106
|
+
TooltipPrimitive.Trigger,
|
|
107
|
+
{
|
|
108
|
+
"data-slot": "tooltip-trigger",
|
|
109
|
+
render: resolvedRender,
|
|
110
|
+
...props,
|
|
111
|
+
closeDelay: TOOLTIP_EXIT_DURATION_MS,
|
|
112
|
+
children: resolvedRender ? void 0 : children
|
|
113
|
+
}
|
|
114
|
+
);
|
|
96
115
|
}
|
|
97
116
|
function TooltipContent({
|
|
98
117
|
side = "top",
|
|
@@ -102,11 +121,10 @@ function TooltipContent({
|
|
|
102
121
|
children,
|
|
103
122
|
ref,
|
|
104
123
|
render,
|
|
124
|
+
className: _className,
|
|
125
|
+
style: _style,
|
|
105
126
|
...props
|
|
106
127
|
}) {
|
|
107
|
-
const contentProps = { ...props };
|
|
108
|
-
Reflect.deleteProperty(contentProps, "className");
|
|
109
|
-
Reflect.deleteProperty(contentProps, "style");
|
|
110
128
|
return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
111
129
|
TooltipPrimitive.Positioner,
|
|
112
130
|
{
|
|
@@ -114,18 +132,17 @@ function TooltipContent({
|
|
|
114
132
|
align,
|
|
115
133
|
alignOffset,
|
|
116
134
|
sideOffset,
|
|
117
|
-
|
|
135
|
+
"data-slot": "tooltip-positioner",
|
|
118
136
|
children: /* @__PURE__ */ jsxs(
|
|
119
137
|
TooltipPrimitive.Popup,
|
|
120
138
|
{
|
|
121
|
-
...
|
|
139
|
+
...props,
|
|
122
140
|
ref,
|
|
123
141
|
"data-slot": "tooltip-content",
|
|
124
|
-
|
|
125
|
-
render: (props2, state) => /* @__PURE__ */ jsx(
|
|
142
|
+
render: (popupProps, state) => /* @__PURE__ */ jsx(
|
|
126
143
|
FluidOverlay,
|
|
127
144
|
{
|
|
128
|
-
props:
|
|
145
|
+
props: popupProps,
|
|
129
146
|
state,
|
|
130
147
|
render,
|
|
131
148
|
motion: "tooltip",
|
|
@@ -134,14 +151,8 @@ function TooltipContent({
|
|
|
134
151
|
}
|
|
135
152
|
),
|
|
136
153
|
children: [
|
|
137
|
-
/* @__PURE__ */ jsx("div", {
|
|
138
|
-
/* @__PURE__ */ jsx(
|
|
139
|
-
TooltipPrimitive.Arrow,
|
|
140
|
-
{
|
|
141
|
-
"data-slot": "tooltip-arrow",
|
|
142
|
-
className: "h-2 w-4 bg-chart-tooltip-background data-[side=top]:top-full data-[side=top]:-translate-y-px data-[side=top]:[clip-path:polygon(0_0,100%_0,50%_100%)] data-[side=bottom]:bottom-full data-[side=bottom]:translate-y-px data-[side=bottom]:[clip-path:polygon(50%_0,100%_100%,0_100%)] data-[side=left]:left-full data-[side=left]:h-4 data-[side=left]:w-2 data-[side=left]:-translate-x-px data-[side=left]:[clip-path:polygon(0_0,100%_50%,0_100%)] data-[side=right]:right-full data-[side=right]:h-4 data-[side=right]:w-2 data-[side=right]:translate-x-px data-[side=right]:[clip-path:polygon(100%_0,100%_100%,0_50%)] data-[side=inline-start]:left-full data-[side=inline-start]:h-4 data-[side=inline-start]:w-2 data-[side=inline-start]:-translate-x-px data-[side=inline-start]:[clip-path:polygon(0_0,100%_50%,0_100%)] data-[side=inline-end]:right-full data-[side=inline-end]:h-4 data-[side=inline-end]:w-2 data-[side=inline-end]:translate-x-px data-[side=inline-end]:[clip-path:polygon(100%_0,100%_100%,0_50%)]"
|
|
143
|
-
}
|
|
144
|
-
)
|
|
154
|
+
/* @__PURE__ */ jsx("div", { "data-slot": "tooltip-body", children }),
|
|
155
|
+
/* @__PURE__ */ jsx(TooltipPrimitive.Arrow, { "data-slot": "tooltip-arrow" })
|
|
145
156
|
]
|
|
146
157
|
}
|
|
147
158
|
)
|
|
@@ -161,8 +172,6 @@ function readSidebarCookie(cookie) {
|
|
|
161
172
|
}
|
|
162
173
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
163
174
|
var SIDEBAR_HOVER_CLOSE_DELAY_MS = 200;
|
|
164
|
-
var TABLET_ICON_SIDEBAR_QUERY = "(min-width: 768px) and (max-width: 1279px)";
|
|
165
|
-
var getServerForceIconSidebarSnapshot = () => false;
|
|
166
175
|
function isSidebarHoverRetentionTarget(target) {
|
|
167
176
|
if (!(target instanceof Element)) {
|
|
168
177
|
return false;
|
|
@@ -181,22 +190,6 @@ function useSidebar() {
|
|
|
181
190
|
}
|
|
182
191
|
return context;
|
|
183
192
|
}
|
|
184
|
-
function subscribeToForceIconSidebar(onStoreChange) {
|
|
185
|
-
const mql = window.matchMedia(TABLET_ICON_SIDEBAR_QUERY);
|
|
186
|
-
mql.addEventListener("change", onStoreChange);
|
|
187
|
-
return () => mql.removeEventListener("change", onStoreChange);
|
|
188
|
-
}
|
|
189
|
-
function getForceIconSidebarSnapshot() {
|
|
190
|
-
return window.matchMedia(TABLET_ICON_SIDEBAR_QUERY).matches;
|
|
191
|
-
}
|
|
192
|
-
function useForceIconSidebar(forceIconAtTablet) {
|
|
193
|
-
const isTablet = React4.useSyncExternalStore(
|
|
194
|
-
subscribeToForceIconSidebar,
|
|
195
|
-
getForceIconSidebarSnapshot,
|
|
196
|
-
getServerForceIconSidebarSnapshot
|
|
197
|
-
);
|
|
198
|
-
return forceIconAtTablet && isTablet;
|
|
199
|
-
}
|
|
200
193
|
function SidebarProvider({
|
|
201
194
|
defaultOpen = true,
|
|
202
195
|
open: openProp,
|
|
@@ -205,12 +198,12 @@ function SidebarProvider({
|
|
|
205
198
|
style,
|
|
206
199
|
forceIconAtTablet = false,
|
|
207
200
|
allowUserCollapse = true,
|
|
201
|
+
allowDesktopCollapse = allowUserCollapse,
|
|
208
202
|
expandOnHover = false,
|
|
209
203
|
children,
|
|
210
204
|
...props
|
|
211
205
|
}) {
|
|
212
206
|
const isMobile = useIsMobile();
|
|
213
|
-
const forceIcon = useForceIconSidebar(forceIconAtTablet);
|
|
214
207
|
const [openMobile, setOpenMobile] = React4.useState(false);
|
|
215
208
|
const [hoverExpanded, setHoverExpandedState] = React4.useState(false);
|
|
216
209
|
const [sidebarMotionEnabled, setSidebarMotionEnabled] = React4.useState(expandOnHover);
|
|
@@ -224,16 +217,16 @@ function SidebarProvider({
|
|
|
224
217
|
sidebarWrapperRef.current = node;
|
|
225
218
|
};
|
|
226
219
|
React4.useLayoutEffect(() => {
|
|
227
|
-
if (expandOnHover || cookieHydratedRef.current) return;
|
|
220
|
+
if (expandOnHover || !allowDesktopCollapse || cookieHydratedRef.current) return;
|
|
228
221
|
const stored = readSidebarCookie(document.cookie);
|
|
229
222
|
if (stored === null) return;
|
|
230
223
|
cookieHydratedRef.current = true;
|
|
231
224
|
_setOpen(stored);
|
|
232
|
-
}, [expandOnHover]);
|
|
225
|
+
}, [allowDesktopCollapse, expandOnHover]);
|
|
233
226
|
const open = openProp ?? _open;
|
|
234
227
|
const setOpen = React4.useCallback(
|
|
235
228
|
(openState) => {
|
|
236
|
-
if (!
|
|
229
|
+
if (!allowDesktopCollapse) {
|
|
237
230
|
return;
|
|
238
231
|
}
|
|
239
232
|
if (setOpenProp) {
|
|
@@ -243,7 +236,7 @@ function SidebarProvider({
|
|
|
243
236
|
}
|
|
244
237
|
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
245
238
|
},
|
|
246
|
-
[
|
|
239
|
+
[allowDesktopCollapse, setOpenProp]
|
|
247
240
|
);
|
|
248
241
|
const setHoverExpanded = React4.useCallback(
|
|
249
242
|
(expanded) => {
|
|
@@ -258,20 +251,21 @@ function SidebarProvider({
|
|
|
258
251
|
if (!allowUserCollapse) {
|
|
259
252
|
return;
|
|
260
253
|
}
|
|
261
|
-
if (
|
|
254
|
+
if (isMobile) {
|
|
255
|
+
setSidebarMotionEnabled(true);
|
|
256
|
+
return setOpenMobile((open2) => !open2);
|
|
257
|
+
}
|
|
258
|
+
if (!allowDesktopCollapse || expandOnHover) {
|
|
262
259
|
return;
|
|
263
260
|
}
|
|
264
261
|
setSidebarMotionEnabled(true);
|
|
265
|
-
return
|
|
266
|
-
}, [allowUserCollapse, expandOnHover, isMobile, open, setOpen]);
|
|
267
|
-
const toggleSidebarEvent = React4.useEffectEvent(toggleSidebar);
|
|
262
|
+
return setOpen(!open);
|
|
263
|
+
}, [allowDesktopCollapse, allowUserCollapse, expandOnHover, isMobile, open, setOpen]);
|
|
268
264
|
let state = open ? "expanded" : "collapsed";
|
|
269
|
-
if (forceIcon && isMobile === false) {
|
|
270
|
-
state = "collapsed";
|
|
271
|
-
}
|
|
272
265
|
if (expandOnHover && isMobile === false) {
|
|
273
266
|
state = hoverExpanded ? "expanded" : "collapsed";
|
|
274
267
|
}
|
|
268
|
+
const toggleSidebarEvent = React4.useEffectEvent(toggleSidebar);
|
|
275
269
|
const contextValue = React4.useMemo(
|
|
276
270
|
() => ({
|
|
277
271
|
state,
|
|
@@ -283,6 +277,7 @@ function SidebarProvider({
|
|
|
283
277
|
toggleSidebar,
|
|
284
278
|
sidebarMotionEnabled,
|
|
285
279
|
expandOnHover,
|
|
280
|
+
forceIconAtTablet,
|
|
286
281
|
setHoverExpanded
|
|
287
282
|
}),
|
|
288
283
|
[
|
|
@@ -295,11 +290,12 @@ function SidebarProvider({
|
|
|
295
290
|
toggleSidebar,
|
|
296
291
|
sidebarMotionEnabled,
|
|
297
292
|
expandOnHover,
|
|
293
|
+
forceIconAtTablet,
|
|
298
294
|
setHoverExpanded
|
|
299
295
|
]
|
|
300
296
|
);
|
|
301
297
|
React4.useEffect(() => {
|
|
302
|
-
if (!allowUserCollapse || expandOnHover) {
|
|
298
|
+
if (!allowUserCollapse || !allowDesktopCollapse || expandOnHover) {
|
|
303
299
|
return;
|
|
304
300
|
}
|
|
305
301
|
const handleKeyDown = (event) => {
|
|
@@ -310,7 +306,7 @@ function SidebarProvider({
|
|
|
310
306
|
};
|
|
311
307
|
window.addEventListener("keydown", handleKeyDown);
|
|
312
308
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
313
|
-
}, [allowUserCollapse, expandOnHover]);
|
|
309
|
+
}, [allowDesktopCollapse, allowUserCollapse, expandOnHover]);
|
|
314
310
|
return /* @__PURE__ */ jsx2(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx2(
|
|
315
311
|
"div",
|
|
316
312
|
{
|
|
@@ -318,10 +314,7 @@ function SidebarProvider({
|
|
|
318
314
|
"data-slot": "sidebar-wrapper",
|
|
319
315
|
"data-force-icon-at-tablet": forceIconAtTablet ? "true" : void 0,
|
|
320
316
|
style,
|
|
321
|
-
className
|
|
322
|
-
"group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",
|
|
323
|
-
className
|
|
324
|
-
),
|
|
317
|
+
className,
|
|
325
318
|
...props,
|
|
326
319
|
children
|
|
327
320
|
}
|
|
@@ -445,44 +438,6 @@ function useSidebarHoverExpand({
|
|
|
445
438
|
}, [expandOnHover, isMobile, setHoverExpanded, state]);
|
|
446
439
|
return { openFromHover, scheduleCloseFromHover };
|
|
447
440
|
}
|
|
448
|
-
function getDesktopSidebarMotionClassNames(sidebarMotionEnabled, expandOnHover) {
|
|
449
|
-
if (!sidebarMotionEnabled) {
|
|
450
|
-
return { container: null, gap: null };
|
|
451
|
-
}
|
|
452
|
-
if (expandOnHover) {
|
|
453
|
-
return {
|
|
454
|
-
container: "transition-[width] duration-300 ease-out motion-reduce:transition-none",
|
|
455
|
-
gap: null
|
|
456
|
-
};
|
|
457
|
-
}
|
|
458
|
-
return {
|
|
459
|
-
container: "transition-[left,right,width] duration-300 ease-linear motion-reduce:transition-none",
|
|
460
|
-
gap: "transition-[width] duration-300 ease-linear motion-reduce:transition-none"
|
|
461
|
-
};
|
|
462
|
-
}
|
|
463
|
-
function getDesktopSidebarGapClassName(expandOnHover, variant, motionClassName) {
|
|
464
|
-
if (expandOnHover) {
|
|
465
|
-
return "relative w-(--sidebar-width-icon) bg-transparent group-data-[side=right]:rotate-180";
|
|
466
|
-
}
|
|
467
|
-
const collapsedIconWidthClassName = variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)";
|
|
468
|
-
return cn(
|
|
469
|
-
"relative w-(--sidebar-width) bg-transparent",
|
|
470
|
-
motionClassName,
|
|
471
|
-
"group-data-[collapsible=offcanvas]:w-0",
|
|
472
|
-
"group-data-[side=right]:rotate-180",
|
|
473
|
-
collapsedIconWidthClassName
|
|
474
|
-
);
|
|
475
|
-
}
|
|
476
|
-
function getDesktopSidebarContainerClassName(expandOnHover, variant, motionClassName, className) {
|
|
477
|
-
const collapsedIconClassName = variant === "floating" || variant === "inset" ? "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";
|
|
478
|
-
return cn(
|
|
479
|
-
"fixed inset-y-0 hidden h-svh w-(--sidebar-width) data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",
|
|
480
|
-
expandOnHover ? "z-[var(--z-sidebar-overlay)]" : "z-10",
|
|
481
|
-
motionClassName,
|
|
482
|
-
collapsedIconClassName,
|
|
483
|
-
className
|
|
484
|
-
);
|
|
485
|
-
}
|
|
486
441
|
function Sidebar({
|
|
487
442
|
side = "left",
|
|
488
443
|
variant = "sidebar",
|
|
@@ -514,23 +469,8 @@ function Sidebar({
|
|
|
514
469
|
setHoverExpanded,
|
|
515
470
|
state
|
|
516
471
|
});
|
|
517
|
-
const desktopMotionClassNames = getDesktopSidebarMotionClassNames(
|
|
518
|
-
sidebarMotionEnabled,
|
|
519
|
-
expandOnHover
|
|
520
|
-
);
|
|
521
472
|
if (resolvedCollapsible === "none") {
|
|
522
|
-
return /* @__PURE__ */ jsx2(
|
|
523
|
-
"div",
|
|
524
|
-
{
|
|
525
|
-
"data-slot": "sidebar",
|
|
526
|
-
className: cn(
|
|
527
|
-
"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",
|
|
528
|
-
className
|
|
529
|
-
),
|
|
530
|
-
...props,
|
|
531
|
-
children
|
|
532
|
-
}
|
|
533
|
-
);
|
|
473
|
+
return /* @__PURE__ */ jsx2("div", { "data-slot": "sidebar", className, ...props, children });
|
|
534
474
|
}
|
|
535
475
|
if (isMobile) {
|
|
536
476
|
return /* @__PURE__ */ jsx2(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs2(
|
|
@@ -539,15 +479,14 @@ function Sidebar({
|
|
|
539
479
|
dir,
|
|
540
480
|
"data-sidebar": "sidebar",
|
|
541
481
|
"data-mobile": "true",
|
|
542
|
-
className: "w-[var(--sidebar-width-mobile)] bg-sidebar p-0 text-sidebar-foreground dark:bg-card",
|
|
543
482
|
showCloseButton: false,
|
|
544
483
|
side,
|
|
545
484
|
children: [
|
|
546
|
-
/* @__PURE__ */ jsxs2(SheetHeader, {
|
|
485
|
+
/* @__PURE__ */ jsxs2(SheetHeader, { "data-visually-hidden": "", children: [
|
|
547
486
|
/* @__PURE__ */ jsx2(SheetTitle, { children: "Sidebar" }),
|
|
548
487
|
/* @__PURE__ */ jsx2(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
549
488
|
] }),
|
|
550
|
-
/* @__PURE__ */ jsx2("div", {
|
|
489
|
+
/* @__PURE__ */ jsx2("div", { "data-sidebar": "mobile-body", children })
|
|
551
490
|
]
|
|
552
491
|
}
|
|
553
492
|
) });
|
|
@@ -555,36 +494,21 @@ function Sidebar({
|
|
|
555
494
|
return /* @__PURE__ */ jsxs2(
|
|
556
495
|
"div",
|
|
557
496
|
{
|
|
558
|
-
className: "group peer hidden text-sidebar-foreground md:block",
|
|
559
497
|
"data-state": state,
|
|
560
498
|
"data-collapsible": state === "collapsed" ? resolvedCollapsible : "",
|
|
561
499
|
"data-expand-on-hover": expandOnHover ? "true" : void 0,
|
|
500
|
+
"data-motion": sidebarMotionEnabled ? expandOnHover ? "hover" : "toggle" : void 0,
|
|
562
501
|
"data-variant": variant,
|
|
563
502
|
"data-side": side,
|
|
564
503
|
"data-slot": "sidebar",
|
|
565
504
|
children: [
|
|
566
|
-
/* @__PURE__ */ jsx2(
|
|
567
|
-
"div",
|
|
568
|
-
{
|
|
569
|
-
"data-slot": "sidebar-gap",
|
|
570
|
-
className: getDesktopSidebarGapClassName(
|
|
571
|
-
expandOnHover,
|
|
572
|
-
variant,
|
|
573
|
-
desktopMotionClassNames.gap
|
|
574
|
-
)
|
|
575
|
-
}
|
|
576
|
-
),
|
|
505
|
+
/* @__PURE__ */ jsx2("div", { "data-slot": "sidebar-gap" }),
|
|
577
506
|
/* @__PURE__ */ jsx2(
|
|
578
507
|
"div",
|
|
579
508
|
{
|
|
580
509
|
"data-slot": "sidebar-container",
|
|
581
510
|
"data-side": side,
|
|
582
|
-
className
|
|
583
|
-
expandOnHover,
|
|
584
|
-
variant,
|
|
585
|
-
desktopMotionClassNames.container,
|
|
586
|
-
className
|
|
587
|
-
),
|
|
511
|
+
className,
|
|
588
512
|
...props,
|
|
589
513
|
onPointerEnter: (event) => {
|
|
590
514
|
onPointerEnter?.(event);
|
|
@@ -613,34 +537,25 @@ function Sidebar({
|
|
|
613
537
|
}
|
|
614
538
|
scheduleCloseFromHover();
|
|
615
539
|
},
|
|
616
|
-
children: /* @__PURE__ */ jsx2(
|
|
617
|
-
"div",
|
|
618
|
-
{
|
|
619
|
-
"data-sidebar": "sidebar",
|
|
620
|
-
"data-slot": "sidebar-inner",
|
|
621
|
-
className: cn(
|
|
622
|
-
"flex size-full flex-col bg-sidebar",
|
|
623
|
-
variant === "floating" && "overflow-hidden rounded-[var(--warm-inset-radius,1.5rem)] [corner-shape:squircle] border border-[var(--warm-inset-border)] bg-[var(--warm-inset-frame,var(--card))] [--card-background:var(--warm-inset-frame,var(--card))] [--warm-inset-border:var(--warm-card-default-border-outer,var(--warm-inset-border-base))] [--card-edge-border:var(--warm-card-default-border-outer,var(--border))] shadow-card-edge"
|
|
624
|
-
),
|
|
625
|
-
children
|
|
626
|
-
}
|
|
627
|
-
)
|
|
540
|
+
children: /* @__PURE__ */ jsx2("div", { "data-sidebar": "sidebar", "data-slot": "sidebar-inner", children })
|
|
628
541
|
}
|
|
629
542
|
)
|
|
630
543
|
]
|
|
631
544
|
}
|
|
632
545
|
);
|
|
633
546
|
}
|
|
634
|
-
function SidebarTrigger({
|
|
547
|
+
function SidebarTrigger({
|
|
548
|
+
className: _className,
|
|
549
|
+
onClick,
|
|
550
|
+
...props
|
|
551
|
+
}) {
|
|
635
552
|
const { isMobile, toggleSidebar } = useSidebar();
|
|
636
553
|
return /* @__PURE__ */ jsxs2(
|
|
637
554
|
Button,
|
|
638
555
|
{
|
|
639
556
|
"data-sidebar": "trigger",
|
|
640
|
-
"data-slot": "sidebar-trigger",
|
|
641
557
|
variant: "ghost",
|
|
642
|
-
|
|
643
|
-
className: cn(className),
|
|
558
|
+
presentation: "sidebarIcon",
|
|
644
559
|
onClick: (event) => {
|
|
645
560
|
onClick?.(event);
|
|
646
561
|
toggleSidebar();
|
|
@@ -648,70 +563,25 @@ function SidebarTrigger({ className, onClick, ...props }) {
|
|
|
648
563
|
...props,
|
|
649
564
|
children: [
|
|
650
565
|
isMobile ? /* @__PURE__ */ jsx2(MenuIcon, {}) : /* @__PURE__ */ jsx2(PanelLeftIcon, {}),
|
|
651
|
-
/* @__PURE__ */ jsx2("span", {
|
|
566
|
+
/* @__PURE__ */ jsx2("span", { "data-visually-hidden": "", children: "Toggle Sidebar" })
|
|
652
567
|
]
|
|
653
568
|
}
|
|
654
569
|
);
|
|
655
570
|
}
|
|
656
571
|
function SidebarInset({ className, ...props }) {
|
|
657
|
-
return /* @__PURE__ */ jsx2(
|
|
658
|
-
"main",
|
|
659
|
-
{
|
|
660
|
-
"data-slot": "sidebar-inset",
|
|
661
|
-
className: cn(
|
|
662
|
-
"relative flex min-h-0 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",
|
|
663
|
-
className
|
|
664
|
-
),
|
|
665
|
-
...props
|
|
666
|
-
}
|
|
667
|
-
);
|
|
572
|
+
return /* @__PURE__ */ jsx2("main", { "data-slot": "sidebar-inset", className, ...props });
|
|
668
573
|
}
|
|
669
574
|
function SidebarHeader({ className, ...props }) {
|
|
670
|
-
return /* @__PURE__ */ jsx2(
|
|
671
|
-
"div",
|
|
672
|
-
{
|
|
673
|
-
"data-slot": "sidebar-header",
|
|
674
|
-
"data-sidebar": "header",
|
|
675
|
-
className: cn("flex flex-col gap-2 p-2", className),
|
|
676
|
-
...props
|
|
677
|
-
}
|
|
678
|
-
);
|
|
575
|
+
return /* @__PURE__ */ jsx2("div", { "data-slot": "sidebar-header", "data-sidebar": "header", className, ...props });
|
|
679
576
|
}
|
|
680
577
|
function SidebarFooter({ className, ...props }) {
|
|
681
|
-
return /* @__PURE__ */ jsx2(
|
|
682
|
-
"div",
|
|
683
|
-
{
|
|
684
|
-
"data-slot": "sidebar-footer",
|
|
685
|
-
"data-sidebar": "footer",
|
|
686
|
-
className: cn("flex flex-col gap-2 p-2", className),
|
|
687
|
-
...props
|
|
688
|
-
}
|
|
689
|
-
);
|
|
578
|
+
return /* @__PURE__ */ jsx2("div", { "data-slot": "sidebar-footer", "data-sidebar": "footer", className, ...props });
|
|
690
579
|
}
|
|
691
580
|
function SidebarContent({ className, ...props }) {
|
|
692
|
-
return /* @__PURE__ */ jsx2(
|
|
693
|
-
"div",
|
|
694
|
-
{
|
|
695
|
-
"data-slot": "sidebar-content",
|
|
696
|
-
"data-sidebar": "content",
|
|
697
|
-
className: cn(
|
|
698
|
-
"no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
699
|
-
className
|
|
700
|
-
),
|
|
701
|
-
...props
|
|
702
|
-
}
|
|
703
|
-
);
|
|
581
|
+
return /* @__PURE__ */ jsx2("div", { "data-slot": "sidebar-content", "data-sidebar": "content", className, ...props });
|
|
704
582
|
}
|
|
705
583
|
function SidebarGroup({ className, ...props }) {
|
|
706
|
-
return /* @__PURE__ */ jsx2(
|
|
707
|
-
"div",
|
|
708
|
-
{
|
|
709
|
-
"data-slot": "sidebar-group",
|
|
710
|
-
"data-sidebar": "group",
|
|
711
|
-
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
712
|
-
...props
|
|
713
|
-
}
|
|
714
|
-
);
|
|
584
|
+
return /* @__PURE__ */ jsx2("div", { "data-slot": "sidebar-group", "data-sidebar": "group", className, ...props });
|
|
715
585
|
}
|
|
716
586
|
function SidebarGroupLabel({
|
|
717
587
|
className,
|
|
@@ -727,10 +597,7 @@ function SidebarGroupLabel({
|
|
|
727
597
|
render,
|
|
728
598
|
"data-slot": "sidebar-group-label",
|
|
729
599
|
"data-sidebar": "group-label",
|
|
730
|
-
className
|
|
731
|
-
"flex h-8 shrink-0 items-center rounded-lg px-2 text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:mt-0 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
732
|
-
className
|
|
733
|
-
),
|
|
600
|
+
className,
|
|
734
601
|
...props
|
|
735
602
|
}
|
|
736
603
|
);
|
|
@@ -741,93 +608,65 @@ function SidebarGroupContent({ className, ...props }) {
|
|
|
741
608
|
{
|
|
742
609
|
"data-slot": "sidebar-group-content",
|
|
743
610
|
"data-sidebar": "group-content",
|
|
744
|
-
className
|
|
611
|
+
className,
|
|
745
612
|
...props
|
|
746
613
|
}
|
|
747
614
|
);
|
|
748
615
|
}
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
616
|
+
function SidebarMenu({
|
|
617
|
+
className,
|
|
618
|
+
fluidHighlights = true,
|
|
619
|
+
spacing = "default",
|
|
620
|
+
children,
|
|
621
|
+
...props
|
|
622
|
+
}) {
|
|
755
623
|
return /* @__PURE__ */ jsxs2(
|
|
756
624
|
"ul",
|
|
757
625
|
{
|
|
758
626
|
"data-slot": "sidebar-menu",
|
|
759
627
|
"data-sidebar": "menu",
|
|
760
|
-
"data-fluid-menu": "sidebar",
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
sidebarMenuSpacingClassName[spacing],
|
|
764
|
-
className
|
|
765
|
-
),
|
|
628
|
+
"data-fluid-menu": fluidHighlights ? "sidebar" : void 0,
|
|
629
|
+
"data-spacing": spacing,
|
|
630
|
+
className,
|
|
766
631
|
...props,
|
|
767
632
|
children: [
|
|
768
633
|
children,
|
|
769
|
-
/* @__PURE__ */ jsx2(FluidMenuHighlights, { kind: "sidebar" })
|
|
634
|
+
fluidHighlights ? /* @__PURE__ */ jsx2(FluidMenuHighlights, { kind: "sidebar" }) : null
|
|
770
635
|
]
|
|
771
636
|
}
|
|
772
637
|
);
|
|
773
638
|
}
|
|
774
639
|
function SidebarMenuItem({ className, ...props }) {
|
|
775
|
-
return /* @__PURE__ */ jsx2(
|
|
776
|
-
"li",
|
|
777
|
-
{
|
|
778
|
-
"data-slot": "sidebar-menu-item",
|
|
779
|
-
"data-sidebar": "menu-item",
|
|
780
|
-
className: cn("group/menu-item relative", className),
|
|
781
|
-
...props
|
|
782
|
-
}
|
|
783
|
-
);
|
|
640
|
+
return /* @__PURE__ */ jsx2("li", { "data-slot": "sidebar-menu-item", "data-sidebar": "menu-item", className, ...props });
|
|
784
641
|
}
|
|
785
|
-
var sidebarMenuButtonVariants = cva(
|
|
786
|
-
"peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg p-2 text-left ring-sidebar-ring outline-hidden transition-[width,height,padding,background-color,color,box-shadow] duration-160 ease-out motion-reduce:transition-none group-has-data-[sidebar=menu-action]/menu-item:pr-4 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 focus-visible:ring-inset 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-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:rounded-full data-active:bg-[var(--button-primary-bg)] data-active:bg-[image:var(--button-primary-gradient)] data-active:text-[color:var(--button-primary-foreground)] data-active:shadow-[var(--button-primary-shadow)] data-active:hover:bg-[var(--button-primary-hover)] data-active:hover:bg-[image:var(--button-primary-gradient-hover)] data-active:hover:text-[color:var(--button-primary-foreground)] [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:transition-[color,stroke-width] [&_svg]:duration-80 group-hover/menu-item:[&_svg]:stroke-[2] group-focus-within/menu-item:[&_svg]:stroke-[2] [&>span:last-child]:truncate",
|
|
787
|
-
{
|
|
788
|
-
variants: {
|
|
789
|
-
variant: {
|
|
790
|
-
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
791
|
-
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))]"
|
|
792
|
-
},
|
|
793
|
-
size: {
|
|
794
|
-
default: "h-8",
|
|
795
|
-
sm: "h-7",
|
|
796
|
-
lg: "h-12 group-data-[collapsible=icon]:p-0!"
|
|
797
|
-
}
|
|
798
|
-
},
|
|
799
|
-
defaultVariants: {
|
|
800
|
-
variant: "default",
|
|
801
|
-
size: "default"
|
|
802
|
-
}
|
|
803
|
-
}
|
|
804
|
-
);
|
|
805
642
|
function SidebarMenuButton({
|
|
806
643
|
asChild = false,
|
|
807
644
|
isActive = false,
|
|
808
645
|
variant = "default",
|
|
809
646
|
size = "default",
|
|
810
647
|
tooltip,
|
|
648
|
+
tooltipOnForceIcon = false,
|
|
811
649
|
className,
|
|
812
650
|
render,
|
|
813
651
|
...props
|
|
814
652
|
}) {
|
|
815
|
-
const { isMobile, state } = useSidebar();
|
|
653
|
+
const { forceIconAtTablet, isMobile, state } = useSidebar();
|
|
816
654
|
const button = /* @__PURE__ */ jsx2(
|
|
817
655
|
RenderSlot,
|
|
818
656
|
{
|
|
657
|
+
...props,
|
|
819
658
|
defaultTagName: "button",
|
|
820
659
|
asChild,
|
|
821
660
|
render,
|
|
661
|
+
className,
|
|
822
662
|
"data-slot": "sidebar-menu-button",
|
|
823
663
|
"data-sidebar": "menu-button",
|
|
824
|
-
"data-size": size,
|
|
825
|
-
"data-
|
|
826
|
-
|
|
827
|
-
...props
|
|
664
|
+
"data-size": size ?? void 0,
|
|
665
|
+
"data-variant": variant ?? void 0,
|
|
666
|
+
"data-active": isActive ? "" : void 0
|
|
828
667
|
}
|
|
829
668
|
);
|
|
830
|
-
if (!tooltip || state !== "collapsed"
|
|
669
|
+
if (!tooltip || isMobile || state !== "collapsed" && !(tooltipOnForceIcon && forceIconAtTablet)) {
|
|
831
670
|
return button;
|
|
832
671
|
}
|
|
833
672
|
const tooltipContent = typeof tooltip === "string" ? { children: tooltip } : tooltip;
|
|
@@ -842,75 +681,38 @@ function SidebarMenuBadge({ className, ...props }) {
|
|
|
842
681
|
{
|
|
843
682
|
"data-slot": "sidebar-menu-badge",
|
|
844
683
|
"data-sidebar": "menu-badge",
|
|
845
|
-
className
|
|
846
|
-
"pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-lg px-2 text-sidebar-foreground tabular-nums select-none 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 peer-data-active/menu-button:text-sidebar-accent-foreground",
|
|
847
|
-
className
|
|
848
|
-
),
|
|
684
|
+
className,
|
|
849
685
|
...props
|
|
850
686
|
}
|
|
851
687
|
);
|
|
852
688
|
}
|
|
853
689
|
|
|
854
|
-
// ../ui/src/warmio/sidebar-compositions.tsx
|
|
690
|
+
// ../ui/src/warmio/sidebar-compositions/sidebar-compositions.tsx
|
|
855
691
|
import * as React5 from "react";
|
|
856
692
|
import { ChevronUp, UserRound } from "lucide-react";
|
|
857
693
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
858
694
|
function SidebarBrand({ actions, collapsed, expanded }) {
|
|
859
|
-
return /* @__PURE__ */ jsxs3("div", {
|
|
860
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
}),
|
|
864
|
-
/* @__PURE__ */ jsx3(
|
|
865
|
-
"span",
|
|
866
|
-
{
|
|
867
|
-
"aria-hidden": "true",
|
|
868
|
-
className: "pointer-events-none absolute inset-0 hidden size-8 items-center justify-center rounded-lg text-sidebar-foreground group-data-[collapsible=icon]:flex",
|
|
869
|
-
inert: true,
|
|
870
|
-
children: React5.cloneElement(collapsed, {
|
|
871
|
-
className: "flex size-full items-center justify-center"
|
|
872
|
-
})
|
|
873
|
-
}
|
|
874
|
-
)
|
|
695
|
+
return /* @__PURE__ */ jsxs3("div", { "data-slot": "sidebar-brand", children: [
|
|
696
|
+
/* @__PURE__ */ jsxs3("div", { "data-sidebar-brand-mark": "true", children: [
|
|
697
|
+
expanded,
|
|
698
|
+
/* @__PURE__ */ jsx3("span", { "aria-hidden": "true", "data-sidebar-brand-collapsed": "true", inert: true, children: collapsed })
|
|
875
699
|
] }),
|
|
876
|
-
actions ? /* @__PURE__ */ jsx3(
|
|
877
|
-
"div",
|
|
878
|
-
{
|
|
879
|
-
className: "flex items-center gap-2 group-data-[collapsible=icon]:hidden",
|
|
880
|
-
"data-sidebar-hide-when-collapsed": "true",
|
|
881
|
-
children: actions
|
|
882
|
-
}
|
|
883
|
-
) : null
|
|
700
|
+
actions ? /* @__PURE__ */ jsx3("div", { "data-sidebar-hide-when-collapsed": "true", children: actions }) : null
|
|
884
701
|
] });
|
|
885
702
|
}
|
|
886
703
|
var SidebarAccountTrigger = React5.forwardRef(function SidebarAccountTrigger2({ avatar, className: _className, email, label, style: _style, ...props }, ref) {
|
|
887
704
|
return /* @__PURE__ */ jsxs3(SidebarMenuButton2, { ...props, ref, presentation: "account", children: [
|
|
888
|
-
/* @__PURE__ */ jsx3(
|
|
889
|
-
|
|
890
|
-
{
|
|
891
|
-
|
|
892
|
-
className: "grid size-8 shrink-0 place-items-center rounded-lg bg-sidebar-primary text-xs font-medium text-sidebar-primary-foreground group-data-[collapsible=icon]:size-8 group-data-[collapsible=icon]:rounded-full",
|
|
893
|
-
children: avatar ?? /* @__PURE__ */ jsx3(UserRound, { className: "size-4", "aria-hidden": "true" })
|
|
894
|
-
}
|
|
895
|
-
),
|
|
896
|
-
/* @__PURE__ */ jsxs3("div", { className: "min-w-0 flex-1 text-left group-data-[collapsible=icon]:hidden", children: [
|
|
897
|
-
/* @__PURE__ */ jsx3("div", { "data-slot": "sidebar-account-label", className: "truncate", title: label, children: label }),
|
|
898
|
-
/* @__PURE__ */ jsx3(
|
|
899
|
-
"div",
|
|
900
|
-
{
|
|
901
|
-
"data-slot": "sidebar-account-email",
|
|
902
|
-
className: "truncate text-sidebar-foreground/60",
|
|
903
|
-
title: email,
|
|
904
|
-
children: email
|
|
905
|
-
}
|
|
906
|
-
)
|
|
705
|
+
/* @__PURE__ */ jsx3("div", { "data-slot": "sidebar-account-avatar", children: avatar ?? /* @__PURE__ */ jsx3(UserRound, { "aria-hidden": "true" }) }),
|
|
706
|
+
/* @__PURE__ */ jsxs3("div", { "data-sidebar": "account-details", children: [
|
|
707
|
+
/* @__PURE__ */ jsx3("div", { "data-slot": "sidebar-account-label", title: label, children: label }),
|
|
708
|
+
/* @__PURE__ */ jsx3("div", { "data-slot": "sidebar-account-email", title: email, children: email })
|
|
907
709
|
] }),
|
|
908
|
-
/* @__PURE__ */ jsx3(ChevronUp, {
|
|
710
|
+
/* @__PURE__ */ jsx3(ChevronUp, { "data-sidebar-account-chevron": "true" })
|
|
909
711
|
] });
|
|
910
712
|
});
|
|
911
713
|
SidebarAccountTrigger.displayName = "WarmSidebarAccountTrigger";
|
|
912
714
|
|
|
913
|
-
// ../ui/src/warmio/sidebar.tsx
|
|
715
|
+
// ../ui/src/warmio/sidebar/sidebar.tsx
|
|
914
716
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
915
717
|
function SidebarProvider2({
|
|
916
718
|
className: _className,
|
|
@@ -918,8 +720,7 @@ function SidebarProvider2({
|
|
|
918
720
|
style: _style,
|
|
919
721
|
...props
|
|
920
722
|
}) {
|
|
921
|
-
|
|
922
|
-
return /* @__PURE__ */ jsx4(SidebarProvider, { ...props, className: presentationClassName });
|
|
723
|
+
return /* @__PURE__ */ jsx4(SidebarProvider, { ...props, "data-presentation": presentation ?? "shell" });
|
|
923
724
|
}
|
|
924
725
|
function Sidebar2({
|
|
925
726
|
className: _className,
|
|
@@ -942,13 +743,7 @@ function SidebarInset2({
|
|
|
942
743
|
style: _style,
|
|
943
744
|
...props
|
|
944
745
|
}) {
|
|
945
|
-
return /* @__PURE__ */ jsx4(
|
|
946
|
-
SidebarInset,
|
|
947
|
-
{
|
|
948
|
-
...props,
|
|
949
|
-
className: presentation === "product" ? "min-h-0 min-w-0 overflow-auto" : void 0
|
|
950
|
-
}
|
|
951
|
-
);
|
|
746
|
+
return /* @__PURE__ */ jsx4(SidebarInset, { ...props, "data-presentation": presentation });
|
|
952
747
|
}
|
|
953
748
|
function SidebarHeader2({
|
|
954
749
|
className: _className,
|
|
@@ -956,8 +751,7 @@ function SidebarHeader2({
|
|
|
956
751
|
style: _style,
|
|
957
752
|
...props
|
|
958
753
|
}) {
|
|
959
|
-
|
|
960
|
-
return /* @__PURE__ */ jsx4(SidebarHeader, { ...props, className });
|
|
754
|
+
return /* @__PURE__ */ jsx4(SidebarHeader, { ...props, "data-presentation": presentation });
|
|
961
755
|
}
|
|
962
756
|
function SidebarContent2({
|
|
963
757
|
className: _className,
|
|
@@ -965,8 +759,7 @@ function SidebarContent2({
|
|
|
965
759
|
style: _style,
|
|
966
760
|
...props
|
|
967
761
|
}) {
|
|
968
|
-
|
|
969
|
-
return /* @__PURE__ */ jsx4(SidebarContent, { ...props, className });
|
|
762
|
+
return /* @__PURE__ */ jsx4(SidebarContent, { ...props, "data-presentation": presentation });
|
|
970
763
|
}
|
|
971
764
|
function SidebarFooter2({
|
|
972
765
|
className: _className,
|
|
@@ -974,8 +767,7 @@ function SidebarFooter2({
|
|
|
974
767
|
style: _style,
|
|
975
768
|
...props
|
|
976
769
|
}) {
|
|
977
|
-
|
|
978
|
-
return /* @__PURE__ */ jsx4(SidebarFooter, { ...props, className });
|
|
770
|
+
return /* @__PURE__ */ jsx4(SidebarFooter, { ...props, "data-presentation": presentation });
|
|
979
771
|
}
|
|
980
772
|
function SidebarGroup2({
|
|
981
773
|
className: _className,
|
|
@@ -984,8 +776,14 @@ function SidebarGroup2({
|
|
|
984
776
|
style: _style,
|
|
985
777
|
...props
|
|
986
778
|
}) {
|
|
987
|
-
|
|
988
|
-
|
|
779
|
+
return /* @__PURE__ */ jsx4(
|
|
780
|
+
SidebarGroup,
|
|
781
|
+
{
|
|
782
|
+
...props,
|
|
783
|
+
"data-collapsed": collapsed ? "true" : void 0,
|
|
784
|
+
"data-presentation": presentation
|
|
785
|
+
}
|
|
786
|
+
);
|
|
989
787
|
}
|
|
990
788
|
function SidebarGroupContent2({
|
|
991
789
|
className: _className,
|
|
@@ -1000,8 +798,7 @@ function SidebarGroupLabel2({
|
|
|
1000
798
|
style: _style,
|
|
1001
799
|
...props
|
|
1002
800
|
}) {
|
|
1003
|
-
|
|
1004
|
-
return /* @__PURE__ */ jsx4(SidebarGroupLabel, { ...props, "data-presentation": presentation, className });
|
|
801
|
+
return /* @__PURE__ */ jsx4(SidebarGroupLabel, { ...props, "data-presentation": presentation });
|
|
1005
802
|
}
|
|
1006
803
|
function SidebarMenu2({ className: _className, style: _style, ...props }) {
|
|
1007
804
|
return /* @__PURE__ */ jsx4(SidebarMenu, { ...props });
|
|
@@ -1014,20 +811,28 @@ function SidebarMenuItem2({
|
|
|
1014
811
|
return /* @__PURE__ */ jsx4(SidebarMenuItem, { ...props });
|
|
1015
812
|
}
|
|
1016
813
|
var SidebarMenuButton2 = React6.forwardRef(
|
|
1017
|
-
function SidebarMenuButton3({
|
|
814
|
+
function SidebarMenuButton3({
|
|
815
|
+
className: _className,
|
|
816
|
+
collapsed = false,
|
|
817
|
+
disabled,
|
|
818
|
+
isActive = false,
|
|
819
|
+
presentation,
|
|
820
|
+
style: _style,
|
|
821
|
+
...props
|
|
822
|
+
}, ref) {
|
|
823
|
+
const isSidebarIcon = presentation === "sidebarIcon";
|
|
1018
824
|
return /* @__PURE__ */ jsx4(
|
|
1019
825
|
SidebarMenuButton,
|
|
1020
826
|
{
|
|
1021
827
|
...props,
|
|
1022
828
|
disabled,
|
|
829
|
+
isActive,
|
|
1023
830
|
ref,
|
|
1024
831
|
"data-fluid-menu-disabled": presentation === "disabled" || void 0,
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
(disabled || presentation === "disabled") && "text-muted-foreground/60"
|
|
1030
|
-
)
|
|
832
|
+
"data-presentation": presentation,
|
|
833
|
+
"data-collapsed": collapsed || presentation === "previewCollapsed" ? "true" : void 0,
|
|
834
|
+
"data-muted": disabled || presentation === "disabled" ? "" : void 0,
|
|
835
|
+
...isSidebarIcon ? { "data-warm-button": "", "data-variant": "ghost", "data-size": "icon" } : {}
|
|
1031
836
|
}
|
|
1032
837
|
);
|
|
1033
838
|
}
|
|
@@ -1039,16 +844,7 @@ function SidebarMenuBadge2({
|
|
|
1039
844
|
style: _style,
|
|
1040
845
|
...props
|
|
1041
846
|
}) {
|
|
1042
|
-
return /* @__PURE__ */ jsx4(
|
|
1043
|
-
SidebarMenuBadge,
|
|
1044
|
-
{
|
|
1045
|
-
...props,
|
|
1046
|
-
className: cn(
|
|
1047
|
-
"text-sidebar-foreground peer-hover/menu-button:text-sidebar-foreground peer-data-active/menu-button:text-[color:var(--button-primary-foreground)]",
|
|
1048
|
-
presentation === "attention" && "animate-pulse"
|
|
1049
|
-
)
|
|
1050
|
-
}
|
|
1051
|
-
);
|
|
847
|
+
return /* @__PURE__ */ jsx4(SidebarMenuBadge, { ...props, "data-presentation": presentation });
|
|
1052
848
|
}
|
|
1053
849
|
function SidebarTrigger2({
|
|
1054
850
|
className: _className,
|