@mivabyte/ui 26.9.21 → 26.10.3
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 +130 -39
- package/dist/components/ui/alert-dialog.cjs +4 -4
- package/dist/components/ui/alert-dialog.cjs.map +1 -1
- package/dist/components/ui/alert-dialog.js +4 -4
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.cjs +2 -2
- package/dist/components/ui/alert.cjs.map +1 -1
- package/dist/components/ui/alert.js +2 -2
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/button-group.cjs.map +1 -1
- package/dist/components/ui/button-group.d.ts.map +1 -1
- package/dist/components/ui/button-group.js.map +1 -1
- package/dist/components/ui/button.cjs +4 -4
- package/dist/components/ui/button.cjs.map +1 -1
- package/dist/components/ui/button.js +4 -4
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/calendar.cjs +36 -25
- package/dist/components/ui/calendar.cjs.map +1 -1
- package/dist/components/ui/calendar.d.cts +5 -3
- package/dist/components/ui/calendar.d.ts +5 -3
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar.js +36 -25
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/carousel.cjs +4 -4
- package/dist/components/ui/carousel.cjs.map +1 -1
- package/dist/components/ui/carousel.js +4 -4
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/checkbox.cjs +1 -1
- package/dist/components/ui/checkbox.cjs.map +1 -1
- package/dist/components/ui/checkbox.js +1 -1
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/combobox.cjs +4 -4
- package/dist/components/ui/combobox.cjs.map +1 -1
- package/dist/components/ui/combobox.js +4 -4
- package/dist/components/ui/combobox.js.map +1 -1
- package/dist/components/ui/command.cjs +25 -27
- package/dist/components/ui/command.cjs.map +1 -1
- package/dist/components/ui/command.js +24 -26
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/date-picker.cjs +36 -24
- package/dist/components/ui/date-picker.cjs.map +1 -1
- package/dist/components/ui/date-picker.js +36 -24
- package/dist/components/ui/date-picker.js.map +1 -1
- package/dist/components/ui/dialog.cjs +18 -20
- package/dist/components/ui/dialog.cjs.map +1 -1
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +17 -19
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/empty.cjs +1 -1
- package/dist/components/ui/empty.cjs.map +1 -1
- package/dist/components/ui/empty.js +1 -1
- package/dist/components/ui/empty.js.map +1 -1
- package/dist/components/ui/field.cjs +2 -2
- package/dist/components/ui/field.cjs.map +1 -1
- package/dist/components/ui/field.js +2 -2
- package/dist/components/ui/field.js.map +1 -1
- package/dist/components/ui/form.cjs +158 -0
- package/dist/components/ui/form.cjs.map +1 -0
- package/dist/components/ui/form.d.cts +24 -0
- package/dist/components/ui/form.d.ts +25 -0
- package/dist/components/ui/form.d.ts.map +1 -0
- package/dist/components/ui/form.js +128 -0
- package/dist/components/ui/form.js.map +1 -0
- package/dist/components/ui/input-group.cjs.map +1 -1
- package/dist/components/ui/input-group.d.ts.map +1 -1
- package/dist/components/ui/input-group.js.map +1 -1
- package/dist/components/ui/message.cjs +5 -2
- package/dist/components/ui/message.cjs.map +1 -1
- package/dist/components/ui/message.d.cts +1 -1
- package/dist/components/ui/message.d.ts +1 -1
- package/dist/components/ui/message.d.ts.map +1 -1
- package/dist/components/ui/message.js +6 -3
- package/dist/components/ui/message.js.map +1 -1
- package/dist/components/ui/pagination.cjs +4 -4
- package/dist/components/ui/pagination.cjs.map +1 -1
- package/dist/components/ui/pagination.js +4 -4
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/progress.cjs +3 -2
- package/dist/components/ui/progress.cjs.map +1 -1
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/progress.js +3 -2
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/radio-group.cjs +2 -2
- package/dist/components/ui/radio-group.cjs.map +1 -1
- package/dist/components/ui/radio-group.js +2 -2
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/sheet.cjs +18 -20
- package/dist/components/ui/sheet.cjs.map +1 -1
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +17 -19
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sidebar.cjs +61 -63
- package/dist/components/ui/sidebar.cjs.map +1 -1
- package/dist/components/ui/sidebar.js +60 -62
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/slider.cjs +2 -2
- package/dist/components/ui/slider.cjs.map +1 -1
- package/dist/components/ui/slider.js +2 -2
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/sonner.cjs +53 -0
- package/dist/components/ui/sonner.cjs.map +1 -0
- package/dist/components/ui/sonner.d.cts +4 -0
- package/dist/components/ui/sonner.d.ts +5 -0
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/components/ui/sonner.js +51 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/switch.cjs +2 -2
- package/dist/components/ui/switch.cjs.map +1 -1
- package/dist/components/ui/switch.js +2 -2
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/toast.cjs +301 -9
- package/dist/components/ui/toast.cjs.map +1 -1
- package/dist/components/ui/toast.d.cts +16 -2
- package/dist/components/ui/toast.d.ts +16 -2
- package/dist/components/ui/toast.d.ts.map +1 -1
- package/dist/components/ui/toast.js +272 -1
- package/dist/components/ui/toast.js.map +1 -1
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -5
- package/dist/index.d.ts +3 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/render-child.cjs +37 -0
- package/dist/lib/render-child.cjs.map +1 -0
- package/dist/lib/render-child.d.cts +22 -0
- package/dist/lib/render-child.d.ts +23 -0
- package/dist/lib/render-child.d.ts.map +1 -0
- package/dist/lib/render-child.js +15 -0
- package/dist/lib/render-child.js.map +1 -0
- package/dist/styles.css +1 -1
- package/package.json +49 -47
- package/dist/components/ui/container.cjs +0 -69
- package/dist/components/ui/container.cjs.map +0 -1
- package/dist/components/ui/container.d.cts +0 -11
- package/dist/components/ui/container.d.ts +0 -12
- package/dist/components/ui/container.d.ts.map +0 -1
- package/dist/components/ui/container.js +0 -46
- package/dist/components/ui/container.js.map +0 -1
- package/dist/components/ui/kbd-group.cjs +0 -74
- package/dist/components/ui/kbd-group.cjs.map +0 -1
- package/dist/components/ui/kbd-group.d.cts +0 -9
- package/dist/components/ui/kbd-group.d.ts +0 -10
- package/dist/components/ui/kbd-group.d.ts.map +0 -1
- package/dist/components/ui/kbd-group.js +0 -51
- package/dist/components/ui/kbd-group.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React8 = require('react');
|
|
4
4
|
var reactSlot = require('@radix-ui/react-slot');
|
|
5
5
|
var classVarianceAuthority = require('class-variance-authority');
|
|
6
6
|
var lucideReact = require('lucide-react');
|
|
@@ -29,7 +29,7 @@ function _interopNamespace(e) {
|
|
|
29
29
|
return Object.freeze(n);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var React8__namespace = /*#__PURE__*/_interopNamespace(React8);
|
|
33
33
|
var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
|
|
34
34
|
var SheetPrimitive__namespace = /*#__PURE__*/_interopNamespace(SheetPrimitive);
|
|
35
35
|
var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
|
|
@@ -48,7 +48,7 @@ function getServerSnapshot() {
|
|
|
48
48
|
return false;
|
|
49
49
|
}
|
|
50
50
|
function useIsMobile() {
|
|
51
|
-
return
|
|
51
|
+
return React8__namespace.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
52
52
|
}
|
|
53
53
|
function cn(...inputs) {
|
|
54
54
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
@@ -58,17 +58,17 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
58
58
|
{
|
|
59
59
|
variants: {
|
|
60
60
|
variant: {
|
|
61
|
-
default: "bg-primary text-primary-foreground shadow-surface hover:bg-primary-hover",
|
|
62
|
-
primary: "bg-primary text-primary-foreground shadow-surface hover:bg-primary-hover",
|
|
61
|
+
default: "border border-primary-border bg-primary text-primary-foreground shadow-surface hover:bg-primary-hover",
|
|
62
|
+
primary: "border border-primary-border bg-primary text-primary-foreground shadow-surface hover:bg-primary-hover",
|
|
63
63
|
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
64
64
|
outline: "border border-input bg-surface shadow-surface hover:bg-accent hover:text-accent-foreground",
|
|
65
|
-
secondary: "bg-secondary text-secondary-foreground shadow-surface hover:bg-
|
|
65
|
+
secondary: "border border-secondary-border bg-secondary text-secondary-foreground shadow-surface hover:bg-secondary-hover",
|
|
66
66
|
accent: "bg-accent-muted text-accent-foreground hover:bg-accent shadow-surface",
|
|
67
67
|
subtle: "bg-accent text-accent-foreground hover:bg-accent-muted",
|
|
68
68
|
inverse: "bg-foreground text-background shadow-sm hover:bg-foreground/90",
|
|
69
69
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
70
70
|
navigation: "hover:bg-accent hover:text-accent-foreground",
|
|
71
|
-
link: "text-
|
|
71
|
+
link: "text-link underline-offset-4 hover:underline"
|
|
72
72
|
},
|
|
73
73
|
size: {
|
|
74
74
|
default: "h-[var(--control-height)] px-4 py-2",
|
|
@@ -91,7 +91,7 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
);
|
|
94
|
-
var Button =
|
|
94
|
+
var Button = React8__namespace.forwardRef(
|
|
95
95
|
({
|
|
96
96
|
className,
|
|
97
97
|
variant,
|
|
@@ -110,7 +110,7 @@ var Button = React7__namespace.forwardRef(
|
|
|
110
110
|
const isDisabled = Boolean(disabled || loading);
|
|
111
111
|
const slotted = asChild || Boolean(render);
|
|
112
112
|
const Comp = slotted ? reactSlot.Slot : "button";
|
|
113
|
-
const content = render ?
|
|
113
|
+
const content = render ? React8__namespace.cloneElement(
|
|
114
114
|
render,
|
|
115
115
|
void 0,
|
|
116
116
|
children ?? render.props.children
|
|
@@ -139,7 +139,7 @@ var Button = React7__namespace.forwardRef(
|
|
|
139
139
|
}
|
|
140
140
|
);
|
|
141
141
|
Button.displayName = "Button";
|
|
142
|
-
var Input =
|
|
142
|
+
var Input = React8__namespace.forwardRef(
|
|
143
143
|
({ className, type, ...props }, ref) => {
|
|
144
144
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
145
145
|
"input",
|
|
@@ -156,7 +156,7 @@ var Input = React7__namespace.forwardRef(
|
|
|
156
156
|
}
|
|
157
157
|
);
|
|
158
158
|
Input.displayName = "Input";
|
|
159
|
-
var Separator =
|
|
159
|
+
var Separator = React8__namespace.forwardRef(
|
|
160
160
|
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
161
161
|
SeparatorPrimitive__namespace.Root,
|
|
162
162
|
{
|
|
@@ -173,33 +173,31 @@ var Separator = React7__namespace.forwardRef(
|
|
|
173
173
|
)
|
|
174
174
|
);
|
|
175
175
|
Separator.displayName = SeparatorPrimitive__namespace.Root.displayName;
|
|
176
|
+
function mergeRenderedChild(render, children) {
|
|
177
|
+
if (!React8__namespace.isValidElement(render)) return render;
|
|
178
|
+
return React8__namespace.cloneElement(
|
|
179
|
+
render,
|
|
180
|
+
void 0,
|
|
181
|
+
render.props.children ?? children
|
|
182
|
+
);
|
|
183
|
+
}
|
|
176
184
|
var Sheet = SheetPrimitive__namespace.Root;
|
|
177
|
-
var SheetTrigger =
|
|
185
|
+
var SheetTrigger = React8__namespace.forwardRef(({ render, children, ...props }, ref) => {
|
|
178
186
|
if (render) {
|
|
179
|
-
|
|
180
|
-
render,
|
|
181
|
-
void 0,
|
|
182
|
-
render.props.children ?? children
|
|
183
|
-
) : render;
|
|
184
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Trigger, { ref, asChild: true, ...props, children: renderedChild });
|
|
187
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Trigger, { ref, asChild: true, ...props, children: mergeRenderedChild(render, children) });
|
|
185
188
|
}
|
|
186
189
|
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Trigger, { ref, ...props, children });
|
|
187
190
|
});
|
|
188
191
|
SheetTrigger.displayName = SheetPrimitive__namespace.Trigger.displayName;
|
|
189
|
-
var SheetClose =
|
|
192
|
+
var SheetClose = React8__namespace.forwardRef(({ render, children, ...props }, ref) => {
|
|
190
193
|
if (render) {
|
|
191
|
-
|
|
192
|
-
render,
|
|
193
|
-
void 0,
|
|
194
|
-
render.props.children ?? children
|
|
195
|
-
) : render;
|
|
196
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Close, { ref, asChild: true, ...props, children: renderedChild });
|
|
194
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Close, { ref, asChild: true, ...props, children: mergeRenderedChild(render, children) });
|
|
197
195
|
}
|
|
198
196
|
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Close, { ref, ...props, children });
|
|
199
197
|
});
|
|
200
198
|
SheetClose.displayName = SheetPrimitive__namespace.Close.displayName;
|
|
201
199
|
var SheetPortal = SheetPrimitive__namespace.Portal;
|
|
202
|
-
var SheetOverlay =
|
|
200
|
+
var SheetOverlay = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
203
201
|
SheetPrimitive__namespace.Overlay,
|
|
204
202
|
{
|
|
205
203
|
className: cn(
|
|
@@ -227,7 +225,7 @@ var sheetVariants = classVarianceAuthority.cva(
|
|
|
227
225
|
}
|
|
228
226
|
}
|
|
229
227
|
);
|
|
230
|
-
var SheetContent =
|
|
228
|
+
var SheetContent = React8__namespace.forwardRef(
|
|
231
229
|
({
|
|
232
230
|
side = "right",
|
|
233
231
|
className,
|
|
@@ -279,7 +277,7 @@ var SheetHeader = ({
|
|
|
279
277
|
}
|
|
280
278
|
);
|
|
281
279
|
SheetHeader.displayName = "SheetHeader";
|
|
282
|
-
var SheetTitle =
|
|
280
|
+
var SheetTitle = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
283
281
|
SheetPrimitive__namespace.Title,
|
|
284
282
|
{
|
|
285
283
|
ref,
|
|
@@ -288,7 +286,7 @@ var SheetTitle = React7__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
288
286
|
}
|
|
289
287
|
));
|
|
290
288
|
SheetTitle.displayName = SheetPrimitive__namespace.Title.displayName;
|
|
291
|
-
var SheetDescription =
|
|
289
|
+
var SheetDescription = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
292
290
|
SheetPrimitive__namespace.Description,
|
|
293
291
|
{
|
|
294
292
|
ref,
|
|
@@ -312,7 +310,7 @@ function Skeleton({
|
|
|
312
310
|
var TooltipProvider = TooltipPrimitive__namespace.Provider;
|
|
313
311
|
var Tooltip = TooltipPrimitive__namespace.Root;
|
|
314
312
|
var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
|
|
315
|
-
var TooltipContent =
|
|
313
|
+
var TooltipContent = React8__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
316
314
|
TooltipPrimitive__namespace.Content,
|
|
317
315
|
{
|
|
318
316
|
ref,
|
|
@@ -331,15 +329,15 @@ var SIDEBAR_WIDTH = "16rem";
|
|
|
331
329
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
332
330
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
333
331
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
334
|
-
var SidebarContext =
|
|
332
|
+
var SidebarContext = React8__namespace.createContext(null);
|
|
335
333
|
function useSidebar() {
|
|
336
|
-
const context =
|
|
334
|
+
const context = React8__namespace.useContext(SidebarContext);
|
|
337
335
|
if (!context) {
|
|
338
336
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
339
337
|
}
|
|
340
338
|
return context;
|
|
341
339
|
}
|
|
342
|
-
var SidebarProvider =
|
|
340
|
+
var SidebarProvider = React8__namespace.forwardRef(
|
|
343
341
|
({
|
|
344
342
|
defaultOpen = true,
|
|
345
343
|
open: openProp,
|
|
@@ -352,9 +350,9 @@ var SidebarProvider = React7__namespace.forwardRef(
|
|
|
352
350
|
...props
|
|
353
351
|
}, ref) => {
|
|
354
352
|
const isMobile = useIsMobile();
|
|
355
|
-
const [openMobile, setOpenMobile] =
|
|
356
|
-
const triggerRef =
|
|
357
|
-
const [_open, _setOpen] =
|
|
353
|
+
const [openMobile, setOpenMobile] = React8__namespace.useState(false);
|
|
354
|
+
const triggerRef = React8__namespace.useRef(null);
|
|
355
|
+
const [_open, _setOpen] = React8__namespace.useState(() => {
|
|
358
356
|
if (storageKey && typeof localStorage !== "undefined") {
|
|
359
357
|
const saved = localStorage.getItem(storageKey);
|
|
360
358
|
if (saved !== null) {
|
|
@@ -364,7 +362,7 @@ var SidebarProvider = React7__namespace.forwardRef(
|
|
|
364
362
|
return defaultOpen;
|
|
365
363
|
});
|
|
366
364
|
const open = openProp ?? _open;
|
|
367
|
-
const setOpen =
|
|
365
|
+
const setOpen = React8__namespace.useCallback(
|
|
368
366
|
(value) => {
|
|
369
367
|
const openState = typeof value === "function" ? value(open) : value;
|
|
370
368
|
if (setOpenProp) {
|
|
@@ -379,10 +377,10 @@ var SidebarProvider = React7__namespace.forwardRef(
|
|
|
379
377
|
},
|
|
380
378
|
[setOpenProp, open, storageKey]
|
|
381
379
|
);
|
|
382
|
-
const toggleSidebar =
|
|
380
|
+
const toggleSidebar = React8__namespace.useCallback(() => {
|
|
383
381
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
384
382
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
385
|
-
|
|
383
|
+
React8__namespace.useEffect(() => {
|
|
386
384
|
const handleKeyDown = (event) => {
|
|
387
385
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
388
386
|
const target = event.target;
|
|
@@ -397,7 +395,7 @@ var SidebarProvider = React7__namespace.forwardRef(
|
|
|
397
395
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
398
396
|
}, [toggleSidebar]);
|
|
399
397
|
const state = open ? "expanded" : "collapsed";
|
|
400
|
-
const contextValue =
|
|
398
|
+
const contextValue = React8__namespace.useMemo(
|
|
401
399
|
() => ({
|
|
402
400
|
state,
|
|
403
401
|
open,
|
|
@@ -430,7 +428,7 @@ var SidebarProvider = React7__namespace.forwardRef(
|
|
|
430
428
|
}
|
|
431
429
|
);
|
|
432
430
|
SidebarProvider.displayName = "SidebarProvider";
|
|
433
|
-
var Sidebar =
|
|
431
|
+
var Sidebar = React8__namespace.forwardRef(
|
|
434
432
|
({
|
|
435
433
|
side = "left",
|
|
436
434
|
variant = "sidebar",
|
|
@@ -536,7 +534,7 @@ var Sidebar = React7__namespace.forwardRef(
|
|
|
536
534
|
}
|
|
537
535
|
);
|
|
538
536
|
Sidebar.displayName = "Sidebar";
|
|
539
|
-
var SidebarTrigger =
|
|
537
|
+
var SidebarTrigger = React8__namespace.forwardRef(({ className, onClick, label, ...props }, ref) => {
|
|
540
538
|
const { toggleSidebar, triggerRef, open, openMobile, isMobile } = useSidebar();
|
|
541
539
|
const isExpanded = isMobile ? openMobile : open;
|
|
542
540
|
const triggerLabel = label ?? props["aria-label"] ?? "Toggle consumer navigation";
|
|
@@ -569,7 +567,7 @@ var SidebarTrigger = React7__namespace.forwardRef(({ className, onClick, label,
|
|
|
569
567
|
);
|
|
570
568
|
});
|
|
571
569
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
572
|
-
var SidebarRail =
|
|
570
|
+
var SidebarRail = React8__namespace.forwardRef(({ className, label, ...props }, ref) => {
|
|
573
571
|
const { toggleSidebar } = useSidebar();
|
|
574
572
|
const railLabel = label ?? props["aria-label"] ?? "Toggle Sidebar";
|
|
575
573
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -595,7 +593,7 @@ var SidebarRail = React7__namespace.forwardRef(({ className, label, ...props },
|
|
|
595
593
|
);
|
|
596
594
|
});
|
|
597
595
|
SidebarRail.displayName = "SidebarRail";
|
|
598
|
-
var SidebarInset =
|
|
596
|
+
var SidebarInset = React8__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
599
597
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
600
598
|
"main",
|
|
601
599
|
{
|
|
@@ -610,7 +608,7 @@ var SidebarInset = React7__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
610
608
|
);
|
|
611
609
|
});
|
|
612
610
|
SidebarInset.displayName = "SidebarInset";
|
|
613
|
-
var SidebarInput =
|
|
611
|
+
var SidebarInput = React8__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
614
612
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
615
613
|
Input,
|
|
616
614
|
{
|
|
@@ -625,7 +623,7 @@ var SidebarInput = React7__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
625
623
|
);
|
|
626
624
|
});
|
|
627
625
|
SidebarInput.displayName = "SidebarInput";
|
|
628
|
-
var SidebarHeader =
|
|
626
|
+
var SidebarHeader = React8__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
629
627
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
630
628
|
"div",
|
|
631
629
|
{
|
|
@@ -637,7 +635,7 @@ var SidebarHeader = React7__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
637
635
|
);
|
|
638
636
|
});
|
|
639
637
|
SidebarHeader.displayName = "SidebarHeader";
|
|
640
|
-
var SidebarFooter =
|
|
638
|
+
var SidebarFooter = React8__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
641
639
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
642
640
|
"div",
|
|
643
641
|
{
|
|
@@ -649,7 +647,7 @@ var SidebarFooter = React7__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
649
647
|
);
|
|
650
648
|
});
|
|
651
649
|
SidebarFooter.displayName = "SidebarFooter";
|
|
652
|
-
var SidebarSeparator =
|
|
650
|
+
var SidebarSeparator = React8__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
653
651
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
654
652
|
Separator,
|
|
655
653
|
{
|
|
@@ -661,7 +659,7 @@ var SidebarSeparator = React7__namespace.forwardRef(({ className, ...props }, re
|
|
|
661
659
|
);
|
|
662
660
|
});
|
|
663
661
|
SidebarSeparator.displayName = "SidebarSeparator";
|
|
664
|
-
var SidebarContent =
|
|
662
|
+
var SidebarContent = React8__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
665
663
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
666
664
|
"div",
|
|
667
665
|
{
|
|
@@ -676,7 +674,7 @@ var SidebarContent = React7__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
676
674
|
);
|
|
677
675
|
});
|
|
678
676
|
SidebarContent.displayName = "SidebarContent";
|
|
679
|
-
var SidebarGroup =
|
|
677
|
+
var SidebarGroup = React8__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
680
678
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
681
679
|
"div",
|
|
682
680
|
{
|
|
@@ -688,7 +686,7 @@ var SidebarGroup = React7__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
688
686
|
);
|
|
689
687
|
});
|
|
690
688
|
SidebarGroup.displayName = "SidebarGroup";
|
|
691
|
-
var SidebarGroupLabel =
|
|
689
|
+
var SidebarGroupLabel = React8__namespace.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
692
690
|
const Comp = asChild ? reactSlot.Slot : "div";
|
|
693
691
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
694
692
|
Comp,
|
|
@@ -705,7 +703,7 @@ var SidebarGroupLabel = React7__namespace.forwardRef(({ className, asChild = fal
|
|
|
705
703
|
);
|
|
706
704
|
});
|
|
707
705
|
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
708
|
-
var SidebarGroupAction =
|
|
706
|
+
var SidebarGroupAction = React8__namespace.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
709
707
|
const Comp = asChild ? reactSlot.Slot : "button";
|
|
710
708
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
711
709
|
Comp,
|
|
@@ -724,7 +722,7 @@ var SidebarGroupAction = React7__namespace.forwardRef(({ className, asChild = fa
|
|
|
724
722
|
);
|
|
725
723
|
});
|
|
726
724
|
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
727
|
-
var SidebarGroupContent =
|
|
725
|
+
var SidebarGroupContent = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
728
726
|
"div",
|
|
729
727
|
{
|
|
730
728
|
ref,
|
|
@@ -734,7 +732,7 @@ var SidebarGroupContent = React7__namespace.forwardRef(({ className, ...props },
|
|
|
734
732
|
}
|
|
735
733
|
));
|
|
736
734
|
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
737
|
-
var SidebarMenu =
|
|
735
|
+
var SidebarMenu = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
738
736
|
"ul",
|
|
739
737
|
{
|
|
740
738
|
ref,
|
|
@@ -744,7 +742,7 @@ var SidebarMenu = React7__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
744
742
|
}
|
|
745
743
|
));
|
|
746
744
|
SidebarMenu.displayName = "SidebarMenu";
|
|
747
|
-
var SidebarMenuItem =
|
|
745
|
+
var SidebarMenuItem = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
748
746
|
"li",
|
|
749
747
|
{
|
|
750
748
|
ref,
|
|
@@ -774,7 +772,7 @@ var sidebarMenuButtonVariants = classVarianceAuthority.cva(
|
|
|
774
772
|
}
|
|
775
773
|
}
|
|
776
774
|
);
|
|
777
|
-
var SidebarMenuButton =
|
|
775
|
+
var SidebarMenuButton = React8__namespace.forwardRef(
|
|
778
776
|
({
|
|
779
777
|
asChild = false,
|
|
780
778
|
isActive = false,
|
|
@@ -820,7 +818,7 @@ var SidebarMenuButton = React7__namespace.forwardRef(
|
|
|
820
818
|
}
|
|
821
819
|
);
|
|
822
820
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
823
|
-
var SidebarMenuAction =
|
|
821
|
+
var SidebarMenuAction = React8__namespace.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
824
822
|
const Comp = asChild ? reactSlot.Slot : "button";
|
|
825
823
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
826
824
|
Comp,
|
|
@@ -843,7 +841,7 @@ var SidebarMenuAction = React7__namespace.forwardRef(({ className, asChild = fal
|
|
|
843
841
|
);
|
|
844
842
|
});
|
|
845
843
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
846
|
-
var SidebarMenuBadge =
|
|
844
|
+
var SidebarMenuBadge = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
847
845
|
"div",
|
|
848
846
|
{
|
|
849
847
|
ref,
|
|
@@ -861,8 +859,8 @@ var SidebarMenuBadge = React7__namespace.forwardRef(({ className, ...props }, re
|
|
|
861
859
|
}
|
|
862
860
|
));
|
|
863
861
|
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
864
|
-
var SidebarMenuSkeleton =
|
|
865
|
-
const width =
|
|
862
|
+
var SidebarMenuSkeleton = React8__namespace.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
863
|
+
const width = React8__namespace.useMemo(() => {
|
|
866
864
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
867
865
|
}, []);
|
|
868
866
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -895,7 +893,7 @@ var SidebarMenuSkeleton = React7__namespace.forwardRef(({ className, showIcon =
|
|
|
895
893
|
);
|
|
896
894
|
});
|
|
897
895
|
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
898
|
-
var SidebarMenuSub =
|
|
896
|
+
var SidebarMenuSub = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
899
897
|
"ul",
|
|
900
898
|
{
|
|
901
899
|
ref,
|
|
@@ -909,9 +907,9 @@ var SidebarMenuSub = React7__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
909
907
|
}
|
|
910
908
|
));
|
|
911
909
|
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
912
|
-
var SidebarMenuSubItem =
|
|
910
|
+
var SidebarMenuSubItem = React8__namespace.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, ...props }));
|
|
913
911
|
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
914
|
-
var SidebarMenuSubButton =
|
|
912
|
+
var SidebarMenuSubButton = React8__namespace.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
915
913
|
const Comp = asChild ? reactSlot.Slot : "a";
|
|
916
914
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
917
915
|
Comp,
|