@websolutespa/ask-ui 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion.d.mts +25 -0
- package/dist/components/accordion.mjs +55 -0
- package/dist/components/ai-elements/attachments.d.mts +94 -0
- package/dist/components/ai-elements/attachments.mjs +174 -0
- package/dist/components/ai-elements/conversation.d.mts +51 -0
- package/dist/components/ai-elements/conversation.mjs +85 -0
- package/dist/components/ai-elements/message.d.mts +89 -0
- package/dist/components/ai-elements/message.mjs +175 -0
- package/dist/components/ai-elements/prompt-input.d.mts +277 -0
- package/dist/components/ai-elements/prompt-input.mjs +703 -0
- package/dist/components/ai-elements/speech-input.d.mts +64 -0
- package/dist/components/ai-elements/speech-input.mjs +153 -0
- package/dist/components/alert-dialog.d.mts +60 -0
- package/dist/components/alert-dialog.mjs +101 -0
- package/dist/components/alert.d.mts +28 -0
- package/dist/components/alert.mjs +43 -0
- package/dist/components/aspect-ratio.d.mts +9 -0
- package/dist/components/aspect-ratio.mjs +12 -0
- package/dist/components/avatar.d.mts +34 -0
- package/dist/components/avatar.mjs +51 -0
- package/dist/components/badge.d.mts +19 -0
- package/dist/components/badge.mjs +27 -0
- package/dist/components/breadcrumb.d.mts +38 -0
- package/dist/components/breadcrumb.mjs +70 -0
- package/dist/components/button-group.d.mts +28 -0
- package/dist/components/button-group.mjs +38 -0
- package/dist/components/button.d.mts +21 -0
- package/dist/components/button.mjs +47 -0
- package/dist/components/calendar.d.mts +30 -0
- package/dist/components/calendar.mjs +109 -0
- package/dist/components/card.d.mts +37 -0
- package/dist/components/card.mjs +56 -0
- package/dist/components/carousel.d.mts +56 -0
- package/dist/components/carousel.mjs +132 -0
- package/dist/components/chart.d.mts +78 -0
- package/dist/components/chart.mjs +146 -0
- package/dist/components/checkbox.d.mts +11 -0
- package/dist/components/checkbox.mjs +21 -0
- package/dist/components/collapsible.d.mts +15 -0
- package/dist/components/collapsible.mjs +24 -0
- package/dist/components/combobox.d.mts +81 -0
- package/dist/components/combobox.mjs +163 -0
- package/dist/components/command.d.mts +54 -0
- package/dist/components/command.mjs +88 -0
- package/dist/components/context-menu.d.mts +85 -0
- package/dist/components/context-menu.mjs +125 -0
- package/dist/components/dialog.d.mts +51 -0
- package/dist/components/dialog.mjs +96 -0
- package/dist/components/direction.d.mts +15 -0
- package/dist/components/direction.mjs +14 -0
- package/dist/components/drawer.d.mts +47 -0
- package/dist/components/drawer.mjs +79 -0
- package/dist/components/dropdown-menu.d.mts +87 -0
- package/dist/components/dropdown-menu.mjs +131 -0
- package/dist/components/empty.d.mts +35 -0
- package/dist/components/empty.mjs +59 -0
- package/dist/components/field.d.mts +64 -0
- package/dist/components/field.mjs +110 -0
- package/dist/components/hover-card.d.mts +22 -0
- package/dist/components/hover-card.mjs +33 -0
- package/dist/components/input-group.d.mts +43 -0
- package/dist/components/input-group.mjs +79 -0
- package/dist/components/input-otp.d.mts +28 -0
- package/dist/components/input-otp.mjs +47 -0
- package/dist/components/input.d.mts +11 -0
- package/dist/components/input.mjs +14 -0
- package/dist/components/item.d.mts +62 -0
- package/dist/components/item.mjs +117 -0
- package/dist/components/kbd.d.mts +13 -0
- package/dist/components/kbd.mjs +19 -0
- package/dist/components/label.d.mts +11 -0
- package/dist/components/label.mjs +15 -0
- package/dist/components/menubar.d.mts +90 -0
- package/dist/components/menubar.mjs +135 -0
- package/dist/components/native-select.d.mts +21 -0
- package/dist/components/native-select.mjs +37 -0
- package/dist/components/navigation-menu.d.mts +46 -0
- package/dist/components/navigation-menu.mjs +80 -0
- package/dist/components/pagination.d.mts +45 -0
- package/dist/components/pagination.mjs +80 -0
- package/dist/components/popover.d.mts +34 -0
- package/dist/components/popover.mjs +56 -0
- package/dist/components/progress.d.mts +12 -0
- package/dist/components/progress.mjs +20 -0
- package/dist/components/radio-group.d.mts +15 -0
- package/dist/components/radio-group.mjs +27 -0
- package/dist/components/resizable.d.mts +20 -0
- package/dist/components/resizable.mjs +28 -0
- package/dist/components/scroll-area.d.mts +17 -0
- package/dist/components/scroll-area.mjs +37 -0
- package/dist/components/select.d.mts +53 -0
- package/dist/components/select.mjs +100 -0
- package/dist/components/separator.d.mts +13 -0
- package/dist/components/separator.mjs +17 -0
- package/dist/components/sheet.d.mts +42 -0
- package/dist/components/sheet.mjs +90 -0
- package/dist/components/sidebar.d.mts +167 -0
- package/dist/components/sidebar.mjs +374 -0
- package/dist/components/skeleton.d.mts +9 -0
- package/dist/components/skeleton.mjs +12 -0
- package/dist/components/slider.d.mts +15 -0
- package/dist/components/slider.mjs +36 -0
- package/dist/components/sonner.d.mts +9 -0
- package/dist/components/sonner.mjs +30 -0
- package/dist/components/spinner.d.mts +9 -0
- package/dist/components/spinner.mjs +14 -0
- package/dist/components/switch.d.mts +14 -0
- package/dist/components/switch.mjs +20 -0
- package/dist/components/table.d.mts +38 -0
- package/dist/components/table.mjs +67 -0
- package/dist/components/tabs.d.mts +30 -0
- package/dist/components/tabs.mjs +46 -0
- package/dist/components/textarea.d.mts +10 -0
- package/dist/components/textarea.mjs +13 -0
- package/dist/components/toggle-group.d.mts +28 -0
- package/dist/components/toggle-group.mjs +51 -0
- package/dist/components/toggle.d.mts +19 -0
- package/dist/components/toggle.mjs +37 -0
- package/dist/components/tooltip.d.mts +23 -0
- package/dist/components/tooltip.mjs +36 -0
- package/dist/exports/components.d.mts +61 -0
- package/dist/exports/components.mjs +61 -0
- package/dist/exports/hooks.d.mts +2 -0
- package/dist/exports/hooks.mjs +2 -0
- package/dist/exports/lib.d.mts +2 -0
- package/dist/exports/lib.mjs +2 -0
- package/dist/hooks/use-mobile.d.mts +4 -0
- package/dist/hooks/use-mobile.mjs +18 -0
- package/package.json +7 -7
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/utils.mjs";
|
|
3
|
+
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
4
|
+
import { Select } from "radix-ui";
|
|
5
|
+
import "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/select.tsx
|
|
8
|
+
function Select$1({ ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(Select.Root, {
|
|
10
|
+
"data-slot": "select",
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function SelectGroup({ className, ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx(Select.Group, {
|
|
16
|
+
"data-slot": "select-group",
|
|
17
|
+
className: cn("scroll-my-1 p-1", className),
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function SelectValue({ ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(Select.Value, {
|
|
23
|
+
"data-slot": "select-value",
|
|
24
|
+
...props
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsxs(Select.Trigger, {
|
|
29
|
+
"data-slot": "select-trigger",
|
|
30
|
+
"data-size": size,
|
|
31
|
+
className: cn("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
32
|
+
...props,
|
|
33
|
+
children: [children, /* @__PURE__ */ jsx(Select.Icon, {
|
|
34
|
+
asChild: true,
|
|
35
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" })
|
|
36
|
+
})]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function SelectContent({ className, children, position = "item-aligned", align = "center", ...props }) {
|
|
40
|
+
return /* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsxs(Select.Content, {
|
|
41
|
+
"data-slot": "select-content",
|
|
42
|
+
"data-align-trigger": position === "item-aligned",
|
|
43
|
+
className: cn("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
|
|
44
|
+
position,
|
|
45
|
+
align,
|
|
46
|
+
...props,
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
49
|
+
/* @__PURE__ */ jsx(Select.Viewport, {
|
|
50
|
+
"data-position": position,
|
|
51
|
+
className: cn("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)", position === "popper" && ""),
|
|
52
|
+
children
|
|
53
|
+
}),
|
|
54
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
55
|
+
]
|
|
56
|
+
}) });
|
|
57
|
+
}
|
|
58
|
+
function SelectLabel({ className, ...props }) {
|
|
59
|
+
return /* @__PURE__ */ jsx(Select.Label, {
|
|
60
|
+
"data-slot": "select-label",
|
|
61
|
+
className: cn("px-2 py-1.5 text-xs text-muted-foreground", className),
|
|
62
|
+
...props
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function SelectItem({ className, children, ...props }) {
|
|
66
|
+
return /* @__PURE__ */ jsxs(Select.Item, {
|
|
67
|
+
"data-slot": "select-item",
|
|
68
|
+
className: cn("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
69
|
+
...props,
|
|
70
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
71
|
+
className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center",
|
|
72
|
+
children: /* @__PURE__ */ jsx(Select.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "pointer-events-none" }) })
|
|
73
|
+
}), /* @__PURE__ */ jsx(Select.ItemText, { children })]
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function SelectSeparator({ className, ...props }) {
|
|
77
|
+
return /* @__PURE__ */ jsx(Select.Separator, {
|
|
78
|
+
"data-slot": "select-separator",
|
|
79
|
+
className: cn("pointer-events-none -mx-1 my-1 h-px bg-border", className),
|
|
80
|
+
...props
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function SelectScrollUpButton({ className, ...props }) {
|
|
84
|
+
return /* @__PURE__ */ jsx(Select.ScrollUpButton, {
|
|
85
|
+
"data-slot": "select-scroll-up-button",
|
|
86
|
+
className: cn("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
87
|
+
...props,
|
|
88
|
+
children: /* @__PURE__ */ jsx(ChevronUpIcon, {})
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function SelectScrollDownButton({ className, ...props }) {
|
|
92
|
+
return /* @__PURE__ */ jsx(Select.ScrollDownButton, {
|
|
93
|
+
"data-slot": "select-scroll-down-button",
|
|
94
|
+
className: cn("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
95
|
+
...props,
|
|
96
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, {})
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
//#endregion
|
|
100
|
+
export { Select$1 as Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Separator } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/separator.d.ts
|
|
6
|
+
declare function Separator$1({
|
|
7
|
+
className,
|
|
8
|
+
orientation,
|
|
9
|
+
decorative,
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof Separator.Root>): _$react_jsx_runtime0.JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Separator$1 as Separator };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/utils.mjs";
|
|
3
|
+
import { Separator } from "radix-ui";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/separator.tsx
|
|
7
|
+
function Separator$1({ className, orientation = "horizontal", decorative = true, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Separator.Root, {
|
|
9
|
+
"data-slot": "separator",
|
|
10
|
+
decorative,
|
|
11
|
+
orientation,
|
|
12
|
+
className: cn("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch", className),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Separator$1 as Separator };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Dialog } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/sheet.d.ts
|
|
6
|
+
declare function Sheet({
|
|
7
|
+
...props
|
|
8
|
+
}: React.ComponentProps<typeof Dialog.Root>): _$react_jsx_runtime0.JSX.Element;
|
|
9
|
+
declare function SheetTrigger({
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof Dialog.Trigger>): _$react_jsx_runtime0.JSX.Element;
|
|
12
|
+
declare function SheetClose({
|
|
13
|
+
...props
|
|
14
|
+
}: React.ComponentProps<typeof Dialog.Close>): _$react_jsx_runtime0.JSX.Element;
|
|
15
|
+
declare function SheetContent({
|
|
16
|
+
className,
|
|
17
|
+
children,
|
|
18
|
+
side,
|
|
19
|
+
showCloseButton,
|
|
20
|
+
...props
|
|
21
|
+
}: React.ComponentProps<typeof Dialog.Content> & {
|
|
22
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
23
|
+
showCloseButton?: boolean;
|
|
24
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
25
|
+
declare function SheetHeader({
|
|
26
|
+
className,
|
|
27
|
+
...props
|
|
28
|
+
}: React.ComponentProps<'div'>): _$react_jsx_runtime0.JSX.Element;
|
|
29
|
+
declare function SheetFooter({
|
|
30
|
+
className,
|
|
31
|
+
...props
|
|
32
|
+
}: React.ComponentProps<'div'>): _$react_jsx_runtime0.JSX.Element;
|
|
33
|
+
declare function SheetTitle({
|
|
34
|
+
className,
|
|
35
|
+
...props
|
|
36
|
+
}: React.ComponentProps<typeof Dialog.Title>): _$react_jsx_runtime0.JSX.Element;
|
|
37
|
+
declare function SheetDescription({
|
|
38
|
+
className,
|
|
39
|
+
...props
|
|
40
|
+
}: React.ComponentProps<typeof Dialog.Description>): _$react_jsx_runtime0.JSX.Element;
|
|
41
|
+
//#endregion
|
|
42
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/utils.mjs";
|
|
3
|
+
import { Button } from "./button.mjs";
|
|
4
|
+
import { XIcon } from "lucide-react";
|
|
5
|
+
import { Dialog } from "radix-ui";
|
|
6
|
+
import "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/sheet.tsx
|
|
9
|
+
function Sheet({ ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(Dialog.Root, {
|
|
11
|
+
"data-slot": "sheet",
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function SheetTrigger({ ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx(Dialog.Trigger, {
|
|
17
|
+
"data-slot": "sheet-trigger",
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function SheetClose({ ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(Dialog.Close, {
|
|
23
|
+
"data-slot": "sheet-close",
|
|
24
|
+
...props
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function SheetPortal({ ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsx(Dialog.Portal, {
|
|
29
|
+
"data-slot": "sheet-portal",
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function SheetOverlay({ className, ...props }) {
|
|
34
|
+
return /* @__PURE__ */ jsx(Dialog.Overlay, {
|
|
35
|
+
"data-slot": "sheet-overlay",
|
|
36
|
+
className: cn("fixed inset-0 z-50 bg-black/10 duration-100 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),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function SheetContent({ className, children, side = "right", showCloseButton = true, ...props }) {
|
|
41
|
+
return /* @__PURE__ */ jsxs(SheetPortal, { children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(Dialog.Content, {
|
|
42
|
+
"data-slot": "sheet-content",
|
|
43
|
+
"data-side": side,
|
|
44
|
+
className: cn("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground 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),
|
|
45
|
+
...props,
|
|
46
|
+
children: [children, showCloseButton && /* @__PURE__ */ jsx(Dialog.Close, {
|
|
47
|
+
"data-slot": "sheet-close",
|
|
48
|
+
asChild: true,
|
|
49
|
+
children: /* @__PURE__ */ jsxs(Button, {
|
|
50
|
+
variant: "ghost",
|
|
51
|
+
className: "absolute top-4 right-4",
|
|
52
|
+
size: "icon-sm",
|
|
53
|
+
children: [/* @__PURE__ */ jsx(XIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
54
|
+
className: "sr-only",
|
|
55
|
+
children: "Close"
|
|
56
|
+
})]
|
|
57
|
+
})
|
|
58
|
+
})]
|
|
59
|
+
})] });
|
|
60
|
+
}
|
|
61
|
+
function SheetHeader({ className, ...props }) {
|
|
62
|
+
return /* @__PURE__ */ jsx("div", {
|
|
63
|
+
"data-slot": "sheet-header",
|
|
64
|
+
className: cn("flex flex-col gap-1.5 p-4", className),
|
|
65
|
+
...props
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function SheetFooter({ className, ...props }) {
|
|
69
|
+
return /* @__PURE__ */ jsx("div", {
|
|
70
|
+
"data-slot": "sheet-footer",
|
|
71
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function SheetTitle({ className, ...props }) {
|
|
76
|
+
return /* @__PURE__ */ jsx(Dialog.Title, {
|
|
77
|
+
"data-slot": "sheet-title",
|
|
78
|
+
className: cn("font-medium text-foreground", className),
|
|
79
|
+
...props
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function SheetDescription({ className, ...props }) {
|
|
83
|
+
return /* @__PURE__ */ jsx(Dialog.Description, {
|
|
84
|
+
"data-slot": "sheet-description",
|
|
85
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
86
|
+
...props
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
//#endregion
|
|
90
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { Button } from "./button.mjs";
|
|
2
|
+
import { Separator } from "./separator.mjs";
|
|
3
|
+
import { TooltipContent } from "./tooltip.mjs";
|
|
4
|
+
import { Input } from "./input.mjs";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
7
|
+
import { VariantProps } from "class-variance-authority";
|
|
8
|
+
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
9
|
+
|
|
10
|
+
//#region src/components/sidebar.d.ts
|
|
11
|
+
type SidebarContextProps = {
|
|
12
|
+
state: 'expanded' | 'collapsed';
|
|
13
|
+
open: boolean;
|
|
14
|
+
setOpen: (open: boolean) => void;
|
|
15
|
+
openMobile: boolean;
|
|
16
|
+
setOpenMobile: (open: boolean) => void;
|
|
17
|
+
isMobile: boolean;
|
|
18
|
+
toggleSidebar: () => void;
|
|
19
|
+
};
|
|
20
|
+
declare function useSidebar(): SidebarContextProps;
|
|
21
|
+
declare function SidebarProvider({
|
|
22
|
+
defaultOpen,
|
|
23
|
+
open: openProp,
|
|
24
|
+
onOpenChange: setOpenProp,
|
|
25
|
+
className,
|
|
26
|
+
style,
|
|
27
|
+
children,
|
|
28
|
+
...props
|
|
29
|
+
}: React.ComponentProps<'div'> & {
|
|
30
|
+
defaultOpen?: boolean;
|
|
31
|
+
open?: boolean;
|
|
32
|
+
onOpenChange?: (open: boolean) => void;
|
|
33
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
34
|
+
declare function Sidebar({
|
|
35
|
+
side,
|
|
36
|
+
variant,
|
|
37
|
+
collapsible,
|
|
38
|
+
className,
|
|
39
|
+
children,
|
|
40
|
+
dir,
|
|
41
|
+
...props
|
|
42
|
+
}: React.ComponentProps<'div'> & {
|
|
43
|
+
side?: 'left' | 'right';
|
|
44
|
+
variant?: 'sidebar' | 'floating' | 'inset';
|
|
45
|
+
collapsible?: 'offcanvas' | 'icon' | 'none';
|
|
46
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
47
|
+
declare function SidebarTrigger({
|
|
48
|
+
className,
|
|
49
|
+
onClick,
|
|
50
|
+
...props
|
|
51
|
+
}: React.ComponentProps<typeof Button>): _$react_jsx_runtime0.JSX.Element;
|
|
52
|
+
declare function SidebarRail({
|
|
53
|
+
className,
|
|
54
|
+
...props
|
|
55
|
+
}: React.ComponentProps<'button'>): _$react_jsx_runtime0.JSX.Element;
|
|
56
|
+
declare function SidebarInset({
|
|
57
|
+
className,
|
|
58
|
+
...props
|
|
59
|
+
}: React.ComponentProps<'main'>): _$react_jsx_runtime0.JSX.Element;
|
|
60
|
+
declare function SidebarInput({
|
|
61
|
+
className,
|
|
62
|
+
...props
|
|
63
|
+
}: React.ComponentProps<typeof Input>): _$react_jsx_runtime0.JSX.Element;
|
|
64
|
+
declare function SidebarHeader({
|
|
65
|
+
className,
|
|
66
|
+
...props
|
|
67
|
+
}: React.ComponentProps<'div'>): _$react_jsx_runtime0.JSX.Element;
|
|
68
|
+
declare function SidebarFooter({
|
|
69
|
+
className,
|
|
70
|
+
...props
|
|
71
|
+
}: React.ComponentProps<'div'>): _$react_jsx_runtime0.JSX.Element;
|
|
72
|
+
declare function SidebarSeparator({
|
|
73
|
+
className,
|
|
74
|
+
...props
|
|
75
|
+
}: React.ComponentProps<typeof Separator>): _$react_jsx_runtime0.JSX.Element;
|
|
76
|
+
declare function SidebarContent({
|
|
77
|
+
className,
|
|
78
|
+
...props
|
|
79
|
+
}: React.ComponentProps<'div'>): _$react_jsx_runtime0.JSX.Element;
|
|
80
|
+
declare function SidebarGroup({
|
|
81
|
+
className,
|
|
82
|
+
...props
|
|
83
|
+
}: React.ComponentProps<'div'>): _$react_jsx_runtime0.JSX.Element;
|
|
84
|
+
declare function SidebarGroupLabel({
|
|
85
|
+
className,
|
|
86
|
+
asChild,
|
|
87
|
+
...props
|
|
88
|
+
}: React.ComponentProps<'div'> & {
|
|
89
|
+
asChild?: boolean;
|
|
90
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
91
|
+
declare function SidebarGroupAction({
|
|
92
|
+
className,
|
|
93
|
+
asChild,
|
|
94
|
+
...props
|
|
95
|
+
}: React.ComponentProps<'button'> & {
|
|
96
|
+
asChild?: boolean;
|
|
97
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
98
|
+
declare function SidebarGroupContent({
|
|
99
|
+
className,
|
|
100
|
+
...props
|
|
101
|
+
}: React.ComponentProps<'div'>): _$react_jsx_runtime0.JSX.Element;
|
|
102
|
+
declare function SidebarMenu({
|
|
103
|
+
className,
|
|
104
|
+
...props
|
|
105
|
+
}: React.ComponentProps<'ul'>): _$react_jsx_runtime0.JSX.Element;
|
|
106
|
+
declare function SidebarMenuItem({
|
|
107
|
+
className,
|
|
108
|
+
...props
|
|
109
|
+
}: React.ComponentProps<'li'>): _$react_jsx_runtime0.JSX.Element;
|
|
110
|
+
declare const sidebarMenuButtonVariants: (props?: ({
|
|
111
|
+
variant?: "default" | "outline" | null | undefined;
|
|
112
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
113
|
+
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
114
|
+
declare function SidebarMenuButton({
|
|
115
|
+
asChild,
|
|
116
|
+
isActive,
|
|
117
|
+
variant,
|
|
118
|
+
size,
|
|
119
|
+
tooltip,
|
|
120
|
+
className,
|
|
121
|
+
...props
|
|
122
|
+
}: React.ComponentProps<'button'> & {
|
|
123
|
+
asChild?: boolean;
|
|
124
|
+
isActive?: boolean;
|
|
125
|
+
tooltip?: string | React.ComponentProps<typeof TooltipContent>;
|
|
126
|
+
} & VariantProps<typeof sidebarMenuButtonVariants>): _$react_jsx_runtime0.JSX.Element;
|
|
127
|
+
declare function SidebarMenuAction({
|
|
128
|
+
className,
|
|
129
|
+
asChild,
|
|
130
|
+
showOnHover,
|
|
131
|
+
...props
|
|
132
|
+
}: React.ComponentProps<'button'> & {
|
|
133
|
+
asChild?: boolean;
|
|
134
|
+
showOnHover?: boolean;
|
|
135
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
136
|
+
declare function SidebarMenuBadge({
|
|
137
|
+
className,
|
|
138
|
+
...props
|
|
139
|
+
}: React.ComponentProps<'div'>): _$react_jsx_runtime0.JSX.Element;
|
|
140
|
+
declare function SidebarMenuSkeleton({
|
|
141
|
+
className,
|
|
142
|
+
showIcon,
|
|
143
|
+
...props
|
|
144
|
+
}: React.ComponentProps<'div'> & {
|
|
145
|
+
showIcon?: boolean;
|
|
146
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
147
|
+
declare function SidebarMenuSub({
|
|
148
|
+
className,
|
|
149
|
+
...props
|
|
150
|
+
}: React.ComponentProps<'ul'>): _$react_jsx_runtime0.JSX.Element;
|
|
151
|
+
declare function SidebarMenuSubItem({
|
|
152
|
+
className,
|
|
153
|
+
...props
|
|
154
|
+
}: React.ComponentProps<'li'>): _$react_jsx_runtime0.JSX.Element;
|
|
155
|
+
declare function SidebarMenuSubButton({
|
|
156
|
+
asChild,
|
|
157
|
+
size,
|
|
158
|
+
isActive,
|
|
159
|
+
className,
|
|
160
|
+
...props
|
|
161
|
+
}: React.ComponentProps<'a'> & {
|
|
162
|
+
asChild?: boolean;
|
|
163
|
+
size?: 'sm' | 'md';
|
|
164
|
+
isActive?: boolean;
|
|
165
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
166
|
+
//#endregion
|
|
167
|
+
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar };
|