@cmdniels/uikit 1.1.6 → 1.1.7
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/out/components/copy-input/CopyInput.js +2 -3
- package/out/components/error/Error.d.ts +2 -1
- package/out/components/item/ItemActions.d.ts +2 -2
- package/out/components/item/ItemContent.d.ts +2 -2
- package/out/components/item/ItemDescription.d.ts +2 -2
- package/out/components/item/ItemFooter.d.ts +2 -2
- package/out/components/item/ItemGroup.d.ts +2 -2
- package/out/components/item/ItemHeader.d.ts +2 -2
- package/out/components/item/ItemMedia.d.ts +2 -2
- package/out/components/item/ItemSeparator.d.ts +2 -2
- package/out/components/item/ItemTitle.d.ts +2 -2
- package/out/components/link-input/LinkInput.js +1 -1
- package/out/components/sheet/Sheet.d.ts +2 -0
- package/out/components/sheet/Sheet.js +18 -0
- package/out/components/sheet/SheetClose.d.ts +2 -0
- package/out/components/sheet/SheetClose.js +18 -0
- package/out/components/sheet/SheetContent.d.ts +5 -0
- package/out/components/sheet/SheetContent.js +23 -0
- package/out/components/sheet/SheetDescription.d.ts +2 -0
- package/out/components/sheet/SheetDescription.js +19 -0
- package/out/components/sheet/SheetFooter.d.ts +2 -0
- package/out/components/sheet/SheetFooter.js +18 -0
- package/out/components/sheet/SheetHeader.d.ts +2 -0
- package/out/components/sheet/SheetHeader.js +18 -0
- package/out/components/sheet/SheetOverlay.d.ts +2 -0
- package/out/components/sheet/SheetOverlay.js +19 -0
- package/out/components/sheet/SheetPortal.d.ts +2 -0
- package/out/components/sheet/SheetPortal.js +18 -0
- package/out/components/sheet/SheetTitle.d.ts +2 -0
- package/out/components/sheet/SheetTitle.js +19 -0
- package/out/components/sheet/SheetTrigger.d.ts +2 -0
- package/out/components/sheet/SheetTrigger.js +18 -0
- package/out/components/sidebar/Sidebar.d.ts +7 -0
- package/out/components/sidebar/Sidebar.js +43 -0
- package/out/components/sidebar/SidebarContent.d.ts +2 -0
- package/out/components/sidebar/SidebarContent.js +17 -0
- package/out/components/sidebar/SidebarFooter.d.ts +2 -0
- package/out/components/sidebar/SidebarFooter.js +17 -0
- package/out/components/sidebar/SidebarGroup.d.ts +2 -0
- package/out/components/sidebar/SidebarGroup.js +17 -0
- package/out/components/sidebar/SidebarGroupAction.d.ts +3 -0
- package/out/components/sidebar/SidebarGroupAction.js +28 -0
- package/out/components/sidebar/SidebarGroupContent.d.ts +2 -0
- package/out/components/sidebar/SidebarGroupContent.js +17 -0
- package/out/components/sidebar/SidebarGroupLabel.d.ts +3 -0
- package/out/components/sidebar/SidebarGroupLabel.js +28 -0
- package/out/components/sidebar/SidebarHeader.d.ts +2 -0
- package/out/components/sidebar/SidebarHeader.js +17 -0
- package/out/components/sidebar/SidebarInput.d.ts +3 -0
- package/out/components/sidebar/SidebarInput.js +18 -0
- package/out/components/sidebar/SidebarInset.d.ts +2 -0
- package/out/components/sidebar/SidebarInset.js +17 -0
- package/out/components/sidebar/SidebarMenu.d.ts +2 -0
- package/out/components/sidebar/SidebarMenu.js +17 -0
- package/out/components/sidebar/SidebarMenuAction.d.ts +5 -0
- package/out/components/sidebar/SidebarMenuAction.js +29 -0
- package/out/components/sidebar/SidebarMenuBadge.d.ts +2 -0
- package/out/components/sidebar/SidebarMenuBadge.js +17 -0
- package/out/components/sidebar/SidebarMenuButton.d.ts +9 -0
- package/out/components/sidebar/SidebarMenuButton.js +46 -0
- package/out/components/sidebar/SidebarMenuItem.d.ts +2 -0
- package/out/components/sidebar/SidebarMenuItem.js +17 -0
- package/out/components/sidebar/SidebarMenuSkeleton.d.ts +4 -0
- package/out/components/sidebar/SidebarMenuSkeleton.js +23 -0
- package/out/components/sidebar/SidebarMenuSub.d.ts +2 -0
- package/out/components/sidebar/SidebarMenuSub.js +17 -0
- package/out/components/sidebar/SidebarMenuSubButton.d.ts +6 -0
- package/out/components/sidebar/SidebarMenuSubButton.js +30 -0
- package/out/components/sidebar/SidebarMenuSubItem.d.ts +2 -0
- package/out/components/sidebar/SidebarMenuSubItem.js +17 -0
- package/out/components/sidebar/SidebarProvider.d.ts +23 -0
- package/out/components/sidebar/SidebarProvider.js +69 -0
- package/out/components/sidebar/SidebarRail.d.ts +2 -0
- package/out/components/sidebar/SidebarRail.js +20 -0
- package/out/components/sidebar/SidebarSeparator.d.ts +3 -0
- package/out/components/sidebar/SidebarSeparator.js +18 -0
- package/out/components/sidebar/SidebarTrigger.d.ts +3 -0
- package/out/components/sidebar/SidebarTrigger.js +25 -0
- package/out/components/sidebar/sidebarMenuButtonVariants.d.ts +5 -0
- package/out/components/sidebar/sidebarMenuButtonVariants.js +19 -0
- package/out/components/sidebar/useIsMobile.d.ts +1 -0
- package/out/components/sidebar/useIsMobile.js +14 -0
- package/out/components/sidebar/useSidebar.d.ts +9 -0
- package/out/components/sidebar/useSidebar.js +9 -0
- package/out/components/spinner/Spinner.d.ts +2 -1
- package/out/index.d.ts +29 -0
- package/out/index.js +31 -0
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
};
|
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { IconCopy } from "@tabler/icons-react";
|
|
15
|
-
import { useState, useRef, Children, isValidElement } from "react";
|
|
15
|
+
import { useState, useRef, Children, isValidElement, } from "react";
|
|
16
16
|
import Button from "../../components/button/Button";
|
|
17
17
|
import InputGroup from "../../components/input-group/InputGroup";
|
|
18
18
|
import InputGroupAddon from "../../components/input-group/InputGroupAddon";
|
|
@@ -31,8 +31,7 @@ export default function CopyInput(_a) {
|
|
|
31
31
|
const text = (_d = (_c = Children.map(children, (child) => {
|
|
32
32
|
if (isValidElement(child) && child.props.children) {
|
|
33
33
|
const inputGroupText = child.props.children;
|
|
34
|
-
if (isValidElement(inputGroupText) &&
|
|
35
|
-
inputGroupText.props.children) {
|
|
34
|
+
if (isValidElement(inputGroupText) && inputGroupText.props.children) {
|
|
36
35
|
const innerText = inputGroupText.props.children;
|
|
37
36
|
if (typeof innerText === "string" || typeof innerText === "number") {
|
|
38
37
|
return innerText;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { type HTMLAttributes } from "react";
|
|
2
|
+
export default function Error({ title, message, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
2
3
|
title: string;
|
|
3
4
|
message: string;
|
|
4
5
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare function ItemActions({ className, ...props }:
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
declare function ItemActions({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ItemActions;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare function ItemContent({ className, ...props }:
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
declare function ItemContent({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ItemContent;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare function ItemDescription({ className, ...props }:
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
declare function ItemDescription({ className, ...props }: ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ItemDescription;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare function ItemFooter({ className, ...props }:
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
declare function ItemFooter({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ItemFooter;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare function ItemGroup({ className, ...props }:
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
declare function ItemGroup({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ItemGroup;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare function ItemHeader({ className, ...props }:
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
declare function ItemHeader({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ItemHeader;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
2
|
import itemMediaVariants from "./itemMediaVariants";
|
|
3
3
|
import type { VariantProps } from "class-variance-authority";
|
|
4
|
-
declare function ItemMedia({ className, variant, ...props }:
|
|
4
|
+
declare function ItemMedia({ className, variant, ...props }: ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export default ItemMedia;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
2
|
import Separator from "../../components/separator/Separator";
|
|
3
|
-
declare function ItemSeparator({ className, ...props }:
|
|
3
|
+
declare function ItemSeparator({ className, ...props }: ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default ItemSeparator;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare function ItemTitle({ className, ...props }:
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
declare function ItemTitle({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ItemTitle;
|
|
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
};
|
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { IconExternalLink } from "@tabler/icons-react";
|
|
15
|
-
import { useState, useRef, isValidElement, Children } from "react";
|
|
15
|
+
import { useState, useRef, isValidElement, Children, } from "react";
|
|
16
16
|
import Button from "../../components/button/Button";
|
|
17
17
|
import InputGroup from "../../components/input-group/InputGroup";
|
|
18
18
|
import InputGroupAddon from "../../components/input-group/InputGroupAddon";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
|
|
15
|
+
export default function Sheet(_a) {
|
|
16
|
+
var props = __rest(_a, []);
|
|
17
|
+
return _jsx(SheetPrimitive.Root, Object.assign({ "data-slot": "sheet" }, props));
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
|
|
15
|
+
export default function SheetClose(_a) {
|
|
16
|
+
var props = __rest(_a, []);
|
|
17
|
+
return _jsx(SheetPrimitive.Close, Object.assign({ "data-slot": "sheet-close" }, props));
|
|
18
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
|
|
2
|
+
export default function SheetContent({ className, children, side, showCloseButton, ...props }: SheetPrimitive.Popup.Props & {
|
|
3
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
4
|
+
showCloseButton?: boolean;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
|
|
15
|
+
import { IconX } from "@tabler/icons-react";
|
|
16
|
+
import cn from "../../cn";
|
|
17
|
+
import Button from "../../components/button/Button";
|
|
18
|
+
import SheetOverlay from "./SheetOverlay";
|
|
19
|
+
import SheetPortal from "./SheetPortal";
|
|
20
|
+
export default function SheetContent(_a) {
|
|
21
|
+
var { className, children, side = "right", showCloseButton = true } = _a, props = __rest(_a, ["className", "children", "side", "showCloseButton"]);
|
|
22
|
+
return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Popup, Object.assign({ "data-slot": "sheet-content", "data-side": side, className: cn("fixed z-50 flex flex-col gap-4 bg-background bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10", className) }, props, { children: [children, showCloseButton && (_jsxs(SheetPrimitive.Close, { "data-slot": "sheet-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-4 right-4", size: "icon-sm" }), children: [_jsx(IconX, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] }))] }));
|
|
23
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
|
|
15
|
+
import cn from "../../cn";
|
|
16
|
+
export default function SheetDescription(_a) {
|
|
17
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
18
|
+
return (_jsx(SheetPrimitive.Description, Object.assign({ "data-slot": "sheet-description", className: cn("text-sm text-muted-foreground", className) }, props)));
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import cn from "../../cn";
|
|
15
|
+
export default function SheetFooter(_a) {
|
|
16
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
17
|
+
return _jsx("div", Object.assign({ "data-slot": "sheet-footer", className: cn("mt-auto flex flex-col gap-2 p-4", className) }, props));
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import cn from "../../cn";
|
|
15
|
+
export default function SheetHeader(_a) {
|
|
16
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
17
|
+
return _jsx("div", Object.assign({ "data-slot": "sheet-header", className: cn("flex flex-col gap-1.5 p-4", className) }, props));
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
|
|
15
|
+
import cn from "../../cn";
|
|
16
|
+
export default function SheetOverlay(_a) {
|
|
17
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
18
|
+
return (_jsx(SheetPrimitive.Backdrop, Object.assign({ "data-slot": "sheet-overlay", className: cn("fixed inset-0 z-50 bg-black/10 duration-100 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className) }, props)));
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
|
|
15
|
+
export default function SheetPortal(_a) {
|
|
16
|
+
var props = __rest(_a, []);
|
|
17
|
+
return _jsx(SheetPrimitive.Portal, Object.assign({ "data-slot": "sheet-portal" }, props));
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
|
|
15
|
+
import cn from "../../cn";
|
|
16
|
+
export default function SheetTitle(_a) {
|
|
17
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
18
|
+
return (_jsx(SheetPrimitive.Title, Object.assign({ "data-slot": "sheet-title", className: cn("font-medium text-foreground", className) }, props)));
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
|
|
15
|
+
export default function SheetTrigger(_a) {
|
|
16
|
+
var props = __rest(_a, []);
|
|
17
|
+
return _jsx(SheetPrimitive.Trigger, Object.assign({ "data-slot": "sheet-trigger" }, props));
|
|
18
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
declare function Sidebar({ side, variant, collapsible, className, children, ...props }: ComponentProps<"div"> & {
|
|
3
|
+
side?: "left" | "right";
|
|
4
|
+
variant?: "sidebar" | "floating" | "inset";
|
|
5
|
+
collapsible?: "offExamples" | "icon" | "none";
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default Sidebar;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import cn from "../../cn";
|
|
15
|
+
import Sheet from "../../components/sheet/Sheet";
|
|
16
|
+
import SheetContent from "../../components/sheet/SheetContent";
|
|
17
|
+
import SheetDescription from "../../components/sheet/SheetDescription";
|
|
18
|
+
import SheetHeader from "../../components/sheet/SheetHeader";
|
|
19
|
+
import SheetTitle from "../../components/sheet/SheetTitle";
|
|
20
|
+
import { SIDEBAR_WIDTH_MOBILE } from "./SidebarProvider";
|
|
21
|
+
import useSidebar from "./useSidebar";
|
|
22
|
+
function Sidebar(_a) {
|
|
23
|
+
var { side = "left", variant = "sidebar", collapsible = "offExamples", className, children } = _a, props = __rest(_a, ["side", "variant", "collapsible", "className", "children"]);
|
|
24
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
25
|
+
if (collapsible === "none") {
|
|
26
|
+
return (_jsx("div", Object.assign({ "data-slot": "sidebar", className: cn("flex h-full w-(--sidebar-width) flex-col bg-card text-card-foreground", className) }, props, { children: children })));
|
|
27
|
+
}
|
|
28
|
+
if (isMobile) {
|
|
29
|
+
return (_jsx(Sheet, Object.assign({ open: openMobile, onOpenChange: setOpenMobile }, props, { children: _jsxs(SheetContent, { "data-sidebar": "sidebar", "data-slot": "sidebar", "data-mobile": "true", className: "w-(--sidebar-width) bg-card p-0 text-card-foreground [&>button]:hidden", style: {
|
|
30
|
+
"--sidebar-width": SIDEBAR_WIDTH_MOBILE,
|
|
31
|
+
}, side: side, children: [_jsxs(SheetHeader, { className: "sr-only", children: [_jsx(SheetTitle, { children: "Sidebar" }), _jsx(SheetDescription, { children: "Displays the mobile sidebar." })] }), _jsx("div", { className: "flex size-full flex-col", children: children })] }) })));
|
|
32
|
+
}
|
|
33
|
+
return (_jsxs("div", { className: "group peer hidden text-card-foreground md:block", "data-state": state, "data-collapsible": state === "collapsed" ? collapsible : "", "data-variant": variant, "data-side": side, "data-slot": "sidebar", children: [_jsx("div", { "data-slot": "sidebar-gap", className: cn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offExamples]:w-0", "group-data-[side=right]:rotate-180", variant === "floating" || variant === "inset"
|
|
34
|
+
? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]"
|
|
35
|
+
: "group-data-[collapsible=icon]:w-(--sidebar-width-icon)") }), _jsx("div", Object.assign({ "data-slot": "sidebar-container", className: cn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex", side === "left"
|
|
36
|
+
? "left-0 group-data-[collapsible=offExamples]:left-[calc(var(--sidebar-width)*-1)]"
|
|
37
|
+
: "right-0 group-data-[collapsible=offExamples]:right-[calc(var(--sidebar-width)*-1)]",
|
|
38
|
+
// Adjust the padding for floating and inset variants.
|
|
39
|
+
variant === "floating" || variant === "inset"
|
|
40
|
+
? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]"
|
|
41
|
+
: "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", className) }, props, { children: _jsx("div", { "data-sidebar": "sidebar", "data-slot": "sidebar-inner", className: "flex size-full flex-col bg-card group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-border", children: children }) }))] }));
|
|
42
|
+
}
|
|
43
|
+
export default Sidebar;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import cn from "../../cn";
|
|
14
|
+
export default function SidebarContent(_a) {
|
|
15
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
16
|
+
return (_jsx("div", Object.assign({ "data-slot": "sidebar-content", "data-sidebar": "content", className: cn("scrollbar-hidden flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className) }, props)));
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import cn from "../../cn";
|
|
14
|
+
export default function SidebarFooter(_a) {
|
|
15
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
16
|
+
return (_jsx("div", Object.assign({ "data-slot": "sidebar-footer", "data-sidebar": "footer", className: cn("flex flex-col gap-2 p-2", className) }, props)));
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import cn from "../../cn";
|
|
14
|
+
export default function SidebarGroup(_a) {
|
|
15
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
16
|
+
return (_jsx("div", Object.assign({ "data-slot": "sidebar-group", "data-sidebar": "group", className: cn("relative flex w-full min-w-0 flex-col p-2", className) }, props)));
|
|
17
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
import { type ComponentProps } from "react";
|
|
3
|
+
export default function SidebarGroupAction({ className, render, ...props }: useRender.ComponentProps<"button"> & ComponentProps<"button">): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
13
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
14
|
+
import cn from "../../cn";
|
|
15
|
+
export default function SidebarGroupAction(_a) {
|
|
16
|
+
var { className, render } = _a, props = __rest(_a, ["className", "render"]);
|
|
17
|
+
return useRender({
|
|
18
|
+
defaultTagName: "button",
|
|
19
|
+
props: mergeProps({
|
|
20
|
+
className: cn("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-card-foreground ring-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", className),
|
|
21
|
+
}, props),
|
|
22
|
+
render,
|
|
23
|
+
state: {
|
|
24
|
+
slot: "sidebar-group-action",
|
|
25
|
+
sidebar: "group-action",
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import cn from "../../cn";
|
|
14
|
+
export default function SidebarGroupContent(_a) {
|
|
15
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
16
|
+
return (_jsx("div", Object.assign({ "data-slot": "sidebar-group-content", "data-sidebar": "group-content", className: cn("w-full text-sm", className) }, props)));
|
|
17
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
import { type ComponentProps } from "react";
|
|
3
|
+
export default function SidebarGroupLabel({ className, render, ...props }: useRender.ComponentProps<"div"> & ComponentProps<"div">): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
13
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
14
|
+
import cn from "../../cn";
|
|
15
|
+
export default function SidebarGroupLabel(_a) {
|
|
16
|
+
var { className, render } = _a, props = __rest(_a, ["className", "render"]);
|
|
17
|
+
return useRender({
|
|
18
|
+
defaultTagName: "div",
|
|
19
|
+
props: mergeProps({
|
|
20
|
+
className: cn("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-card-foreground/70 ring-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-2 [&>svg]:size-4 [&>svg]:shrink-0", className),
|
|
21
|
+
}, props),
|
|
22
|
+
render,
|
|
23
|
+
state: {
|
|
24
|
+
slot: "sidebar-group-label",
|
|
25
|
+
sidebar: "group-label",
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import cn from "../../cn";
|
|
14
|
+
export default function SidebarHeader(_a) {
|
|
15
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
16
|
+
return (_jsx("div", Object.assign({ "data-slot": "sidebar-header", "data-sidebar": "header", className: cn("flex flex-col gap-2 p-2", className) }, props)));
|
|
17
|
+
}
|