@deftui/react 0.2.2 → 0.2.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/dist/index.d.mts +2 -6
- package/dist/index.mjs +2 -6
- package/dist/styles.tokens.css +20 -5
- package/dist/vendor/README.md +6 -6
- package/dist/vendor/coss/alert-dialog.d.mts +15 -0
- package/dist/vendor/coss/alert-dialog.mjs +75 -0
- package/dist/vendor/coss/dialog.d.mts +21 -0
- package/dist/vendor/coss/dialog.mjs +113 -0
- package/dist/vendor/coss/drawer.d.mts +34 -0
- package/dist/vendor/coss/drawer.mjs +158 -0
- package/dist/vendor/coss/empty.mjs +1 -1
- package/dist/vendor/shadcn/breadcrumb.mjs +1 -1
- package/dist/vendor/shadcn/button.d.mts +1 -1
- package/dist/vendor/shadcn/button.mjs +6 -3
- package/dist/vendor/shadcn/combobox.d.mts +1 -3
- package/dist/vendor/shadcn/combobox.mjs +1 -4
- package/dist/vendor/shadcn/sheet.mjs +1 -1
- package/dist/vendor/shadcn/sidebar.d.mts +1 -1
- package/dist/vendor/shadcn/sidebar.mjs +3 -3
- package/dist/vendor/tailored/lightbox.d.mts +1 -1
- package/dist/vendor/tailored/lightbox.mjs +4 -4
- package/dist/widgets/index.d.mts +21 -21
- package/dist/widgets/index.mjs +15 -14
- package/package.json +5 -5
- package/dist/vendor/shadcn/alert-dialog.d.mts +0 -17
- package/dist/vendor/shadcn/alert-dialog.mjs +0 -90
- package/dist/vendor/shadcn/dialog.d.mts +0 -17
- package/dist/vendor/shadcn/dialog.mjs +0 -94
- package/dist/vendor/shadcn/drawer.d.mts +0 -15
- package/dist/vendor/shadcn/drawer.mjs +0 -125
- package/dist/widgets/utils.d.mts +0 -5
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
2
|
import { Combobox } from "@base-ui/react";
|
|
3
|
-
import { ComboboxItemCollection, ComboboxPrimitiveValue, ComboboxPrimitiveValue as ComboboxPrimitiveValue$1, CreateComboboxItemsOptions } from "@base-ui/react/combobox";
|
|
4
3
|
declare function ComboboxValue({ ...props }: Combobox.Value.Props): React$1.JSX.Element;
|
|
5
4
|
declare function ComboboxInput({ className, children, disabled, showTrigger, showClear, ...props }: Combobox.Input.Props & {
|
|
6
5
|
showTrigger?: boolean;
|
|
@@ -19,5 +18,4 @@ declare function ComboboxChip({ className, children, showRemove, ...props }: Com
|
|
|
19
18
|
showRemove?: boolean;
|
|
20
19
|
}): React$1.JSX.Element;
|
|
21
20
|
declare function ComboboxChipsInput({ className, ...props }: Combobox.Input.Props): React$1.JSX.Element;
|
|
22
|
-
export
|
|
23
|
-
export { ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, type ComboboxItemCollection, ComboboxLabel, ComboboxList, type ComboboxPrimitiveValue$1 as ComboboxPrimitiveValue, ComboboxSeparator, ComboboxValue, type CreateComboboxItemsOptions };
|
|
21
|
+
export { ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxValue };
|
|
@@ -155,7 +155,4 @@ function ComboboxChipsInput({ className, ...props }) {
|
|
|
155
155
|
...props
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
|
-
|
|
159
|
-
return Combobox.createItems(...args);
|
|
160
|
-
}
|
|
161
|
-
export { Combobox$1 as Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, createComboboxItems };
|
|
158
|
+
export { Combobox$1 as Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue };
|
|
@@ -3,8 +3,8 @@ import { Button } from "./button.mjs";
|
|
|
3
3
|
import { cn } from "cn";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { XIcon } from "lucide-react";
|
|
7
6
|
import { Dialog } from "@base-ui/react/dialog";
|
|
7
|
+
import { XIcon } from "lucide-react";
|
|
8
8
|
// src/vendor/shadcn/sheet.tsx
|
|
9
9
|
function Sheet({ ...props }) {
|
|
10
10
|
return /* @__PURE__ */ jsx(Dialog.Root, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Button } from "./button.mjs";
|
|
2
|
+
import { Input } from "./input.mjs";
|
|
2
3
|
import { Separator } from "./separator.mjs";
|
|
3
4
|
import { TooltipContent } from "./tooltip.mjs";
|
|
4
|
-
import { Input } from "./input.mjs";
|
|
5
5
|
import { VariantProps } from "class-variance-authority";
|
|
6
6
|
import * as React$1 from "react";
|
|
7
7
|
import { useRender } from "@base-ui/react/use-render";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useIsMobile } from "../coss/hooks/use-media-query.mjs";
|
|
3
3
|
import { Button } from "./button.mjs";
|
|
4
|
-
import { Separator } from "./separator.mjs";
|
|
5
4
|
import { Input } from "./input.mjs";
|
|
6
|
-
import {
|
|
5
|
+
import { Separator } from "./separator.mjs";
|
|
7
6
|
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "./sheet.mjs";
|
|
7
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.mjs";
|
|
8
8
|
import { cn } from "cn";
|
|
9
9
|
import { cva } from "class-variance-authority";
|
|
10
10
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
11
11
|
import * as React$1 from "react";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { PanelLeftIcon } from "lucide-react";
|
|
14
13
|
import { useRender } from "@base-ui/react/use-render";
|
|
14
|
+
import { PanelLeftIcon } from "lucide-react";
|
|
15
15
|
// src/vendor/shadcn/sidebar.tsx
|
|
16
16
|
const SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
17
17
|
const SIDEBAR_COOKIE_MAX_AGE = 604800;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Button } from "../shadcn/button.mjs";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
|
-
import { useRender } from "@base-ui/react/use-render";
|
|
4
3
|
import { Dialog } from "@base-ui/react/dialog";
|
|
4
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
5
5
|
type LightboxOverlay = "blur" | "brightness";
|
|
6
6
|
type LightboxDirection = "ltr" | "rtl";
|
|
7
7
|
type LightboxChangeReason = "trigger-press" | "previous-press" | "next-press" | "thumbnail-press" | "swipe" | "keyboard" | "programmatic" | "items-change";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Spinner } from "../shadcn/spinner.mjs";
|
|
3
2
|
import { Button } from "../shadcn/button.mjs";
|
|
4
3
|
import { DropdownMenu, DropdownMenuItem, DropdownMenuTrigger } from "../shadcn/dropdown-menu.mjs";
|
|
5
4
|
import { Skeleton } from "../shadcn/skeleton.mjs";
|
|
5
|
+
import { Spinner } from "../shadcn/spinner.mjs";
|
|
6
6
|
import { cn } from "cn";
|
|
7
7
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
8
8
|
import * as React$1 from "react";
|
|
9
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
import { ChevronLeftIcon, ChevronRightIcon, DownloadIcon, EllipsisIcon, ImageOffIcon, XIcon, ZoomInIcon, ZoomOutIcon } from "lucide-react";
|
|
11
|
-
import { useRender } from "@base-ui/react/use-render";
|
|
12
10
|
import { Dialog } from "@base-ui/react/dialog";
|
|
11
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
12
|
+
import { ChevronLeftIcon, ChevronRightIcon, DownloadIcon, EllipsisIcon, ImageOffIcon, XIcon, ZoomInIcon, ZoomOutIcon } from "lucide-react";
|
|
13
|
+
import { ScrollArea } from "@base-ui/react/scroll-area";
|
|
13
14
|
import { Menu } from "@base-ui/react/menu";
|
|
14
15
|
import { animate, useReducedMotion } from "motion/react";
|
|
15
16
|
import { flushSync } from "react-dom";
|
|
16
|
-
import { ScrollArea } from "@base-ui/react/scroll-area";
|
|
17
17
|
// src/vendor/tailored/lightbox.tsx
|
|
18
18
|
const LIGHTBOX_STYLES = String.raw`
|
|
19
19
|
/* Keep child modals' transparent input blockers above the viewer. */
|
package/dist/widgets/index.d.mts
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
+
import { AlertDialogClose, AlertDialogContent as AlertDialogPopup, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogPrimitive, AlertDialogTitle, AlertDialogTrigger } from "../vendor/coss/alert-dialog.mjs";
|
|
2
|
+
import { DialogClose, DialogContent as DialogPopup, DialogDescription, DialogFooter, DialogHeader, DialogPanel, DialogPrimitive, DialogTitle, DialogTrigger } from "../vendor/coss/dialog.mjs";
|
|
3
|
+
import { Drawer as Drawer$1, DrawerClose, DrawerDescription, DrawerFooter, DrawerHeader, DrawerPanel, DrawerPopup, DrawerTitle, DrawerTrigger } from "../vendor/coss/drawer.mjs";
|
|
1
4
|
import { Empty as Empty$1, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "../vendor/coss/empty.mjs";
|
|
2
|
-
import { Button } from "../vendor/shadcn/button.mjs";
|
|
3
|
-
import { AlertDialog as AlertDialog$1, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHandle, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, createAlertDialogHandle } from "../vendor/shadcn/alert-dialog.mjs";
|
|
4
5
|
import { Breadcrumb as Breadcrumb$1, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "../vendor/shadcn/breadcrumb.mjs";
|
|
5
|
-
import { Separator } from "../vendor/shadcn/separator.mjs";
|
|
6
6
|
import { ButtonGroup as ButtonGroup$1, ButtonGroupSeparator, ButtonGroupText } from "../vendor/shadcn/button-group.mjs";
|
|
7
7
|
import { Calendar as Calendar$1, CalendarDayButton } from "../vendor/shadcn/calendar.mjs";
|
|
8
8
|
import { Card as Card$1, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "../vendor/shadcn/card.mjs";
|
|
9
|
-
import { ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem,
|
|
10
|
-
import { Dialog as Dialog$1, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHandle, DialogHeader, DialogTitle, DialogTrigger, createDialogHandle } from "../vendor/shadcn/dialog.mjs";
|
|
11
|
-
import { Drawer as Drawer$1, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHandle, DrawerHeader, DrawerTitle, DrawerTrigger, createDrawerHandle } from "../vendor/shadcn/drawer.mjs";
|
|
9
|
+
import { ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxValue } from "../vendor/shadcn/combobox.mjs";
|
|
12
10
|
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "../vendor/shadcn/dropdown-menu.mjs";
|
|
13
|
-
import { Label } from "../vendor/shadcn/label.mjs";
|
|
14
11
|
import { Field as Field$1, FieldDescription, FieldError, FieldLabel } from "../vendor/shadcn/field.mjs";
|
|
15
12
|
import { InputGroup as InputGroup$1, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea } from "../vendor/shadcn/input-group.mjs";
|
|
16
13
|
import { Kbd as Kbd$1, KbdGroup } from "../vendor/shadcn/kbd.mjs";
|
|
@@ -21,24 +18,26 @@ import { SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, S
|
|
|
21
18
|
import { Table as Table$1, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "../vendor/shadcn/table.mjs";
|
|
22
19
|
import { Tabs as Tabs$1, TabsContent, TabsList, TabsTrigger } from "../vendor/shadcn/tabs.mjs";
|
|
23
20
|
import { Tooltip as Tooltip$1, TooltipContent, TooltipProvider, TooltipTrigger } from "../vendor/shadcn/tooltip.mjs";
|
|
24
|
-
import "./utils.mjs";
|
|
25
|
-
import { Toaster, toast } from "../vendor/shadcn/toast.mjs";
|
|
26
21
|
import "./toast.mjs";
|
|
27
|
-
import { Input } from "../vendor/shadcn/input.mjs";
|
|
28
|
-
import { useSidebar } from "../vendor/shadcn/sidebar.mjs";
|
|
29
22
|
import { Sidebar } from "./sidebar.mjs";
|
|
30
23
|
import { DatePicker, DateRange, DateRangePicker, TimePicker } from "./datetime.mjs";
|
|
24
|
+
import { Toaster, toast } from "../vendor/shadcn/toast.mjs";
|
|
31
25
|
import { Dropzone, formatSize } from "./dropzone.mjs";
|
|
32
|
-
import { LightboxActions, LightboxBackdrop, LightboxCaptions, LightboxChangeReason, LightboxClose, LightboxContent, LightboxControl, LightboxControlContext, LightboxCounter, LightboxDownload, LightboxImageChangeEventDetails, LightboxImageItem, LightboxItem, LightboxMore, LightboxNext, LightboxOpenEventDetails, LightboxPrevious, LightboxProps, LightboxSlide, LightboxSlides, LightboxThumbnail, LightboxThumbnails, LightboxToolbar, LightboxTrigger, LightboxTriggerProps, LightboxVideoItem, LightboxViewport, LightboxZoom, LightboxZoomButton, useLightbox } from "../vendor/tailored/lightbox.mjs";
|
|
33
26
|
import { Carousel, Image, ImageProps, Lightbox } from "./multimedia.mjs";
|
|
27
|
+
import { useSidebar } from "../vendor/shadcn/sidebar.mjs";
|
|
34
28
|
import { Pagination } from "./pagination.mjs";
|
|
35
29
|
import { Form } from "../vendor/coss/form.mjs";
|
|
30
|
+
import { Label } from "../vendor/shadcn/label.mjs";
|
|
31
|
+
import { LightboxActions, LightboxBackdrop, LightboxCaptions, LightboxChangeReason, LightboxClose, LightboxContent, LightboxControl, LightboxControlContext, LightboxCounter, LightboxDownload, LightboxImageChangeEventDetails, LightboxImageItem, LightboxItem, LightboxMore, LightboxNext, LightboxOpenEventDetails, LightboxPrevious, LightboxProps, LightboxSlide, LightboxSlides, LightboxThumbnail, LightboxThumbnails, LightboxToolbar, LightboxTrigger, LightboxTriggerProps, LightboxVideoItem, LightboxViewport, LightboxZoom, LightboxZoomButton, useLightbox } from "../vendor/tailored/lightbox.mjs";
|
|
32
|
+
import { Input } from "../vendor/shadcn/input.mjs";
|
|
36
33
|
import { Badge } from "../vendor/shadcn/badge.mjs";
|
|
34
|
+
import { Button } from "../vendor/shadcn/button.mjs";
|
|
37
35
|
import { Switch } from "../vendor/shadcn/switch.mjs";
|
|
36
|
+
import { Checkbox } from "../vendor/shadcn/checkbox.mjs";
|
|
38
37
|
import { Spinner } from "../vendor/shadcn/spinner.mjs";
|
|
39
38
|
import { Skeleton } from "../vendor/shadcn/skeleton.mjs";
|
|
40
|
-
import { Checkbox } from "../vendor/shadcn/checkbox.mjs";
|
|
41
39
|
import { Textarea } from "../vendor/shadcn/textarea.mjs";
|
|
40
|
+
import { Separator } from "../vendor/shadcn/separator.mjs";
|
|
42
41
|
import { ScrollArea } from "../vendor/coss/scroll-area.mjs";
|
|
43
42
|
import { IconSwap } from "../vendor/tailored/icon-swap.mjs";
|
|
44
43
|
import { JsonViewer } from "../vendor/tailored/json-viewer.mjs";
|
|
@@ -94,17 +93,19 @@ export declare const Select: typeof import("@base-ui/react").SelectRoot & {
|
|
|
94
93
|
export declare const Drawer: typeof Drawer$1 & {
|
|
95
94
|
Trigger: typeof DrawerTrigger;
|
|
96
95
|
Close: typeof DrawerClose;
|
|
97
|
-
|
|
96
|
+
Popup: typeof DrawerPopup;
|
|
98
97
|
Header: typeof DrawerHeader;
|
|
98
|
+
Panel: typeof DrawerPanel;
|
|
99
99
|
Footer: typeof DrawerFooter;
|
|
100
100
|
Title: typeof DrawerTitle;
|
|
101
101
|
Description: typeof DrawerDescription;
|
|
102
102
|
};
|
|
103
|
-
export declare const Dialog:
|
|
103
|
+
export declare const Dialog: (<Payload>(props: DialogPrimitive.Root.Props<Payload>) => React.JSX.Element) & {
|
|
104
104
|
Trigger: typeof DialogTrigger;
|
|
105
105
|
Close: typeof DialogClose;
|
|
106
|
-
|
|
106
|
+
Popup: typeof DialogPopup;
|
|
107
107
|
Header: typeof DialogHeader;
|
|
108
|
+
Panel: typeof DialogPanel;
|
|
108
109
|
Footer: typeof DialogFooter;
|
|
109
110
|
Title: typeof DialogTitle;
|
|
110
111
|
Description: typeof DialogDescription;
|
|
@@ -167,11 +168,10 @@ export declare const Breadcrumb: typeof Breadcrumb$1 & {
|
|
|
167
168
|
Ellipsis: typeof BreadcrumbEllipsis;
|
|
168
169
|
Page: typeof BreadcrumbPage;
|
|
169
170
|
};
|
|
170
|
-
export declare const AlertDialog: typeof
|
|
171
|
+
export declare const AlertDialog: typeof AlertDialogPrimitive.Root & {
|
|
171
172
|
Trigger: typeof AlertDialogTrigger;
|
|
172
|
-
Close: typeof
|
|
173
|
-
|
|
174
|
-
Content: typeof AlertDialogContent;
|
|
173
|
+
Close: typeof AlertDialogClose;
|
|
174
|
+
Popup: typeof AlertDialogPopup;
|
|
175
175
|
Header: typeof AlertDialogHeader;
|
|
176
176
|
Footer: typeof AlertDialogFooter;
|
|
177
177
|
Title: typeof AlertDialogTitle;
|
|
@@ -188,4 +188,4 @@ export declare const InputGroup: typeof InputGroup$1 & {
|
|
|
188
188
|
Textarea: typeof InputGroupTextarea;
|
|
189
189
|
Button: typeof InputGroupButton;
|
|
190
190
|
};
|
|
191
|
-
export {
|
|
191
|
+
export { Badge, Button, Carousel, Checkbox, DatePicker, type DateRange, DateRangePicker, Dropzone, FileTree, type FileTreeNode, Form, IconSwap, Image, ImageProps, Input, JsonViewer, Label, Lightbox, type LightboxActions, type LightboxBackdrop, type LightboxCaptions, type LightboxChangeReason, type LightboxClose, type LightboxContent, type LightboxControl, type LightboxControlContext, type LightboxCounter, type LightboxDownload, type LightboxImageChangeEventDetails, type LightboxImageItem, type LightboxItem, type LightboxMore, type LightboxNext, type LightboxOpenEventDetails, type LightboxPrevious, type LightboxProps, type LightboxSlide, type LightboxSlides, type LightboxThumbnail, type LightboxThumbnails, type LightboxToolbar, type LightboxTrigger, type LightboxTriggerProps, type LightboxVideoItem, type LightboxViewport, type LightboxZoom, type LightboxZoomButton, Pagination, ScrollArea, Separator, Sidebar, Skeleton, Spinner, Switch, Textarea, TimePicker, Toaster as ToastProvider, formatSize, toast, type useLightbox, useSidebar };
|
package/dist/widgets/index.mjs
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AlertDialog as AlertDialog$1, AlertDialogClose, AlertDialogContent as AlertDialogPopup, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "../vendor/coss/alert-dialog.mjs";
|
|
2
2
|
import { Spinner } from "../vendor/shadcn/spinner.mjs";
|
|
3
3
|
import { Button } from "../vendor/shadcn/button.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { ScrollArea } from "../vendor/coss/scroll-area.mjs";
|
|
5
|
+
import { Dialog as Dialog$1, DialogClose, DialogContent as DialogPopup, DialogDescription, DialogFooter, DialogHeader, DialogPanel, DialogTitle, DialogTrigger } from "../vendor/coss/dialog.mjs";
|
|
6
|
+
import { Drawer as Drawer$1, DrawerClose, DrawerDescription, DrawerFooter, DrawerHeader, DrawerPanel, DrawerPopup, DrawerTitle, DrawerTrigger } from "../vendor/coss/drawer.mjs";
|
|
7
|
+
import { Empty as Empty$1, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "../vendor/coss/empty.mjs";
|
|
5
8
|
import { Breadcrumb as Breadcrumb$1, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "../vendor/shadcn/breadcrumb.mjs";
|
|
6
9
|
import { Separator } from "../vendor/shadcn/separator.mjs";
|
|
7
10
|
import { ButtonGroup as ButtonGroup$1, ButtonGroupSeparator, ButtonGroupText } from "../vendor/shadcn/button-group.mjs";
|
|
@@ -9,13 +12,11 @@ import { Calendar as Calendar$1, CalendarDayButton } from "../vendor/shadcn/cale
|
|
|
9
12
|
import { Card as Card$1, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "../vendor/shadcn/card.mjs";
|
|
10
13
|
import { Input } from "../vendor/shadcn/input.mjs";
|
|
11
14
|
import { Textarea } from "../vendor/shadcn/textarea.mjs";
|
|
12
|
-
import {
|
|
13
|
-
import { Combobox as Combobox$1, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxValue, createComboboxItems } from "../vendor/shadcn/combobox.mjs";
|
|
14
|
-
import { Dialog as Dialog$1, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, createDialogHandle } from "../vendor/shadcn/dialog.mjs";
|
|
15
|
-
import { Drawer as Drawer$1, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, createDrawerHandle } from "../vendor/shadcn/drawer.mjs";
|
|
15
|
+
import { Combobox as Combobox$1, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxValue } from "../vendor/shadcn/combobox.mjs";
|
|
16
16
|
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "../vendor/shadcn/dropdown-menu.mjs";
|
|
17
|
-
import { Label } from "../vendor/shadcn/label.mjs";
|
|
18
17
|
import { Field as Field$1, FieldDescription, FieldError, FieldLabel } from "../vendor/shadcn/field.mjs";
|
|
18
|
+
import { Label } from "../vendor/shadcn/label.mjs";
|
|
19
|
+
import { InputGroup as InputGroup$1, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea } from "../vendor/shadcn/input-group.mjs";
|
|
19
20
|
import { Kbd as Kbd$1, KbdGroup } from "../vendor/shadcn/kbd.mjs";
|
|
20
21
|
import { Popover as Popover$1, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger } from "../vendor/shadcn/popover.mjs";
|
|
21
22
|
import { Progress as Progress$1, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue } from "../vendor/shadcn/progress.mjs";
|
|
@@ -36,7 +37,6 @@ import { Form } from "../vendor/coss/form.mjs";
|
|
|
36
37
|
import { Badge } from "../vendor/shadcn/badge.mjs";
|
|
37
38
|
import { Switch } from "../vendor/shadcn/switch.mjs";
|
|
38
39
|
import { Checkbox } from "../vendor/shadcn/checkbox.mjs";
|
|
39
|
-
import { ScrollArea } from "../vendor/coss/scroll-area.mjs";
|
|
40
40
|
import { IconSwap } from "../vendor/tailored/icon-swap.mjs";
|
|
41
41
|
import { JsonViewer } from "../vendor/tailored/json-viewer.mjs";
|
|
42
42
|
import { FileTree } from "../vendor/tailored/file-tree.mjs";
|
|
@@ -88,8 +88,9 @@ const Select = /* @__PURE__ */ Object.assign(Select$1, {
|
|
|
88
88
|
const Drawer = /* @__PURE__ */ Object.assign(Drawer$1, {
|
|
89
89
|
Trigger: DrawerTrigger,
|
|
90
90
|
Close: DrawerClose,
|
|
91
|
-
|
|
91
|
+
Popup: DrawerPopup,
|
|
92
92
|
Header: DrawerHeader,
|
|
93
|
+
Panel: DrawerPanel,
|
|
93
94
|
Footer: DrawerFooter,
|
|
94
95
|
Title: DrawerTitle,
|
|
95
96
|
Description: DrawerDescription
|
|
@@ -97,8 +98,9 @@ const Drawer = /* @__PURE__ */ Object.assign(Drawer$1, {
|
|
|
97
98
|
const Dialog = /* @__PURE__ */ Object.assign(Dialog$1, {
|
|
98
99
|
Trigger: DialogTrigger,
|
|
99
100
|
Close: DialogClose,
|
|
100
|
-
|
|
101
|
+
Popup: DialogPopup,
|
|
101
102
|
Header: DialogHeader,
|
|
103
|
+
Panel: DialogPanel,
|
|
102
104
|
Footer: DialogFooter,
|
|
103
105
|
Title: DialogTitle,
|
|
104
106
|
Description: DialogDescription
|
|
@@ -161,9 +163,8 @@ const Breadcrumb = /* @__PURE__ */ Object.assign(Breadcrumb$1, {
|
|
|
161
163
|
});
|
|
162
164
|
const AlertDialog = /* @__PURE__ */ Object.assign(AlertDialog$1, {
|
|
163
165
|
Trigger: AlertDialogTrigger,
|
|
164
|
-
Close:
|
|
165
|
-
|
|
166
|
-
Content: AlertDialogContent,
|
|
166
|
+
Close: AlertDialogClose,
|
|
167
|
+
Popup: AlertDialogPopup,
|
|
167
168
|
Header: AlertDialogHeader,
|
|
168
169
|
Footer: AlertDialogFooter,
|
|
169
170
|
Title: AlertDialogTitle,
|
|
@@ -180,4 +181,4 @@ const InputGroup = /* @__PURE__ */ Object.assign(InputGroup$1, {
|
|
|
180
181
|
Textarea: InputGroupTextarea,
|
|
181
182
|
Button: InputGroupButton
|
|
182
183
|
});
|
|
183
|
-
export { AlertDialog, Badge, Breadcrumb, Button, ButtonGroup, Calendar, Card, Carousel, Checkbox, Combobox, DatePicker, DateRangePicker, Dialog, Drawer, Dropdown, Dropzone, Empty, Field, FileTree, Form, IconSwap, Image, Input, InputGroup, JsonViewer, Kbd, Label, Lightbox, Pagination, Popover, Progress, Radio, ScrollArea, Select, Separator, Sidebar, Skeleton, Spinner, Switch, Table, Tabs, Textarea, TimePicker, Toaster as ToastProvider, Tooltip,
|
|
184
|
+
export { AlertDialog, Badge, Breadcrumb, Button, ButtonGroup, Calendar, Card, Carousel, Checkbox, Combobox, DatePicker, DateRangePicker, Dialog, Drawer, Dropdown, Dropzone, Empty, Field, FileTree, Form, IconSwap, Image, Input, InputGroup, JsonViewer, Kbd, Label, Lightbox, Pagination, Popover, Progress, Radio, ScrollArea, Select, Separator, Sidebar, Skeleton, Spinner, Switch, Table, Tabs, Textarea, TimePicker, Toaster as ToastProvider, Tooltip, formatSize, toast, useSidebar };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deftui/react",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/KiriRainCat/deftui.git",
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"@daypicker/react": "^10.0.2",
|
|
37
37
|
"@fontsource-variable/inter": "^5.3.0",
|
|
38
38
|
"class-variance-authority": "^0.7.1",
|
|
39
|
-
"cn": "^0.5.
|
|
39
|
+
"cn": "^0.5.2",
|
|
40
40
|
"date-fns": "^4.4.0",
|
|
41
41
|
"embla-carousel-react": "^8.6.0",
|
|
42
|
-
"lucide-react": "^1.
|
|
43
|
-
"motion": "^14.
|
|
44
|
-
"radashi": "^13.0.
|
|
42
|
+
"lucide-react": "^1.70.0",
|
|
43
|
+
"motion": "^14.10.1",
|
|
44
|
+
"radashi": "^13.0.2",
|
|
45
45
|
"react-dropzone": "^20.1.4",
|
|
46
46
|
"tw-animate-css": "^1.4.0"
|
|
47
47
|
},
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Button } from "./button.mjs";
|
|
2
|
-
import * as React$1 from "react";
|
|
3
|
-
import { AlertDialog } from "@base-ui/react/alert-dialog";
|
|
4
|
-
declare function AlertDialog$1({ ...props }: AlertDialog.Root.Props): React$1.JSX.Element;
|
|
5
|
-
declare function AlertDialogTrigger({ ...props }: AlertDialog.Trigger.Props): React$1.JSX.Element;
|
|
6
|
-
declare function AlertDialogContent({ className, size, ...props }: AlertDialog.Popup.Props & {
|
|
7
|
-
size?: "default" | "sm";
|
|
8
|
-
}): React$1.JSX.Element;
|
|
9
|
-
declare function AlertDialogHeader({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
10
|
-
declare function AlertDialogFooter({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
11
|
-
declare function AlertDialogTitle({ className, ...props }: React$1.ComponentProps<typeof AlertDialog.Title>): React$1.JSX.Element;
|
|
12
|
-
declare function AlertDialogDescription({ className, ...props }: React$1.ComponentProps<typeof AlertDialog.Description>): React$1.JSX.Element;
|
|
13
|
-
declare function AlertDialogAction({ className, ...props }: React$1.ComponentProps<typeof Button>): React$1.JSX.Element;
|
|
14
|
-
declare function AlertDialogCancel({ className, variant, size, ...props }: AlertDialog.Close.Props & Pick<React$1.ComponentProps<typeof Button>, "variant" | "size">): React$1.JSX.Element;
|
|
15
|
-
export type AlertDialogHandle<Payload> = ReturnType<typeof AlertDialog.createHandle<Payload>>;
|
|
16
|
-
export declare function createAlertDialogHandle<Payload>(): AlertDialogHandle<Payload>;
|
|
17
|
-
export { AlertDialog$1 as AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger };
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { Button } from "./button.mjs";
|
|
3
|
-
import { cn } from "cn";
|
|
4
|
-
import "react";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { AlertDialog } from "@base-ui/react/alert-dialog";
|
|
7
|
-
// src/vendor/shadcn/alert-dialog.tsx
|
|
8
|
-
function AlertDialog$1({ ...props }) {
|
|
9
|
-
return /* @__PURE__ */ jsx(AlertDialog.Root, {
|
|
10
|
-
"data-slot": "alert-dialog",
|
|
11
|
-
...props
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
function AlertDialogTrigger({ ...props }) {
|
|
15
|
-
return /* @__PURE__ */ jsx(AlertDialog.Trigger, {
|
|
16
|
-
"data-slot": "alert-dialog-trigger",
|
|
17
|
-
...props
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
function AlertDialogPortal({ ...props }) {
|
|
21
|
-
return /* @__PURE__ */ jsx(AlertDialog.Portal, {
|
|
22
|
-
"data-slot": "alert-dialog-portal",
|
|
23
|
-
...props
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
function AlertDialogOverlay({ className, ...props }) {
|
|
27
|
-
return /* @__PURE__ */ jsx(AlertDialog.Backdrop, {
|
|
28
|
-
"data-slot": "alert-dialog-overlay",
|
|
29
|
-
className: cn("fixed inset-0 isolate 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),
|
|
30
|
-
...props
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
function AlertDialogContent({ className, size = "default", ...props }) {
|
|
34
|
-
return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialog.Popup, {
|
|
35
|
-
"data-slot": "alert-dialog-content",
|
|
36
|
-
"data-size": size,
|
|
37
|
-
className: cn("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg 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", className),
|
|
38
|
-
...props
|
|
39
|
-
})] });
|
|
40
|
-
}
|
|
41
|
-
function AlertDialogHeader({ className, ...props }) {
|
|
42
|
-
return /* @__PURE__ */ jsx("div", {
|
|
43
|
-
"data-slot": "alert-dialog-header",
|
|
44
|
-
className: cn("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className),
|
|
45
|
-
...props
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
function AlertDialogFooter({ className, ...props }) {
|
|
49
|
-
return /* @__PURE__ */ jsx("div", {
|
|
50
|
-
"data-slot": "alert-dialog-footer",
|
|
51
|
-
className: cn("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", className),
|
|
52
|
-
...props
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
function AlertDialogTitle({ className, ...props }) {
|
|
56
|
-
return /* @__PURE__ */ jsx(AlertDialog.Title, {
|
|
57
|
-
"data-slot": "alert-dialog-title",
|
|
58
|
-
className: cn("text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className),
|
|
59
|
-
...props
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
function AlertDialogDescription({ className, ...props }) {
|
|
63
|
-
return /* @__PURE__ */ jsx(AlertDialog.Description, {
|
|
64
|
-
"data-slot": "alert-dialog-description",
|
|
65
|
-
className: cn("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
|
|
66
|
-
...props
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
function AlertDialogAction({ className, ...props }) {
|
|
70
|
-
return /* @__PURE__ */ jsx(Button, {
|
|
71
|
-
"data-slot": "alert-dialog-action",
|
|
72
|
-
className: cn(className),
|
|
73
|
-
...props
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
function AlertDialogCancel({ className, variant = "outline", size = "default", ...props }) {
|
|
77
|
-
return /* @__PURE__ */ jsx(AlertDialog.Close, {
|
|
78
|
-
"data-slot": "alert-dialog-cancel",
|
|
79
|
-
className: cn(className),
|
|
80
|
-
render: /* @__PURE__ */ jsx(Button, {
|
|
81
|
-
variant,
|
|
82
|
-
size
|
|
83
|
-
}),
|
|
84
|
-
...props
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
function createAlertDialogHandle() {
|
|
88
|
-
return AlertDialog.createHandle();
|
|
89
|
-
}
|
|
90
|
-
export { AlertDialog$1 as AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, createAlertDialogHandle };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React$1 from "react";
|
|
2
|
-
import { Dialog } from "@base-ui/react/dialog";
|
|
3
|
-
declare function Dialog$1({ ...props }: Dialog.Root.Props): React$1.JSX.Element;
|
|
4
|
-
declare function DialogTrigger({ ...props }: Dialog.Trigger.Props): React$1.JSX.Element;
|
|
5
|
-
declare function DialogClose({ ...props }: Dialog.Close.Props): React$1.JSX.Element;
|
|
6
|
-
declare function DialogContent({ className, children, showCloseButton, ...props }: Dialog.Popup.Props & {
|
|
7
|
-
showCloseButton?: boolean;
|
|
8
|
-
}): React$1.JSX.Element;
|
|
9
|
-
declare function DialogHeader({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
10
|
-
declare function DialogFooter({ className, showCloseButton, children, ...props }: React$1.ComponentProps<"div"> & {
|
|
11
|
-
showCloseButton?: boolean;
|
|
12
|
-
}): React$1.JSX.Element;
|
|
13
|
-
declare function DialogTitle({ className, ...props }: Dialog.Title.Props): React$1.JSX.Element;
|
|
14
|
-
declare function DialogDescription({ className, ...props }: Dialog.Description.Props): React$1.JSX.Element;
|
|
15
|
-
export type DialogHandle<Payload> = ReturnType<typeof Dialog.createHandle<Payload>>;
|
|
16
|
-
export declare function createDialogHandle<Payload>(): DialogHandle<Payload>;
|
|
17
|
-
export { Dialog$1 as Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger };
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { Button } from "./button.mjs";
|
|
3
|
-
import { cn } from "cn";
|
|
4
|
-
import "react";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { XIcon } from "lucide-react";
|
|
7
|
-
import { Dialog } from "@base-ui/react/dialog";
|
|
8
|
-
// src/vendor/shadcn/dialog.tsx
|
|
9
|
-
function Dialog$1({ ...props }) {
|
|
10
|
-
return /* @__PURE__ */ jsx(Dialog.Root, {
|
|
11
|
-
"data-slot": "dialog",
|
|
12
|
-
...props
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
function DialogTrigger({ ...props }) {
|
|
16
|
-
return /* @__PURE__ */ jsx(Dialog.Trigger, {
|
|
17
|
-
"data-slot": "dialog-trigger",
|
|
18
|
-
...props
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
function DialogPortal({ ...props }) {
|
|
22
|
-
return /* @__PURE__ */ jsx(Dialog.Portal, {
|
|
23
|
-
"data-slot": "dialog-portal",
|
|
24
|
-
...props
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
function DialogClose({ ...props }) {
|
|
28
|
-
return /* @__PURE__ */ jsx(Dialog.Close, {
|
|
29
|
-
"data-slot": "dialog-close",
|
|
30
|
-
...props
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
function DialogOverlay({ className, ...props }) {
|
|
34
|
-
return /* @__PURE__ */ jsx(Dialog.Backdrop, {
|
|
35
|
-
"data-slot": "dialog-overlay",
|
|
36
|
-
className: cn("fixed inset-0 isolate 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 DialogContent({ className, children, showCloseButton = true, ...props }) {
|
|
41
|
-
return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(Dialog.Popup, {
|
|
42
|
-
"data-slot": "dialog-content",
|
|
43
|
-
className: cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md 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", className),
|
|
44
|
-
...props,
|
|
45
|
-
children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog.Close, {
|
|
46
|
-
"data-slot": "dialog-close",
|
|
47
|
-
render: /* @__PURE__ */ jsx(Button, {
|
|
48
|
-
variant: "ghost",
|
|
49
|
-
className: "absolute top-4 right-4",
|
|
50
|
-
size: "icon-sm"
|
|
51
|
-
}),
|
|
52
|
-
children: [/* @__PURE__ */ jsx(XIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
53
|
-
className: "sr-only",
|
|
54
|
-
children: "Close"
|
|
55
|
-
})]
|
|
56
|
-
})]
|
|
57
|
-
})] });
|
|
58
|
-
}
|
|
59
|
-
function DialogHeader({ className, ...props }) {
|
|
60
|
-
return /* @__PURE__ */ jsx("div", {
|
|
61
|
-
"data-slot": "dialog-header",
|
|
62
|
-
className: cn("flex flex-col gap-2", className),
|
|
63
|
-
...props
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
function DialogFooter({ className, showCloseButton = false, children, ...props }) {
|
|
67
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
68
|
-
"data-slot": "dialog-footer",
|
|
69
|
-
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
70
|
-
...props,
|
|
71
|
-
children: [children, showCloseButton && /* @__PURE__ */ jsx(Dialog.Close, {
|
|
72
|
-
render: /* @__PURE__ */ jsx(Button, { variant: "outline" }),
|
|
73
|
-
children: "Close"
|
|
74
|
-
})]
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
function DialogTitle({ className, ...props }) {
|
|
78
|
-
return /* @__PURE__ */ jsx(Dialog.Title, {
|
|
79
|
-
"data-slot": "dialog-title",
|
|
80
|
-
className: cn("leading-none font-medium", className),
|
|
81
|
-
...props
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
function DialogDescription({ className, ...props }) {
|
|
85
|
-
return /* @__PURE__ */ jsx(Dialog.Description, {
|
|
86
|
-
"data-slot": "dialog-description",
|
|
87
|
-
className: cn("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
|
|
88
|
-
...props
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
function createDialogHandle() {
|
|
92
|
-
return Dialog.createHandle();
|
|
93
|
-
}
|
|
94
|
-
export { Dialog$1 as Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, createDialogHandle };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React$1 from "react";
|
|
2
|
-
import { Drawer } from "@base-ui/react/drawer";
|
|
3
|
-
declare function Drawer$1({ modal, showSwipeHandle, snapPoints, swipeDirection, ...props }: Drawer.Root.Props & {
|
|
4
|
-
showSwipeHandle?: boolean;
|
|
5
|
-
}): React$1.JSX.Element;
|
|
6
|
-
declare function DrawerTrigger({ ...props }: Drawer.Trigger.Props): React$1.JSX.Element;
|
|
7
|
-
declare function DrawerClose({ ...props }: Drawer.Close.Props): React$1.JSX.Element;
|
|
8
|
-
declare function DrawerContent({ className, children, ...props }: Drawer.Popup.Props): React$1.JSX.Element;
|
|
9
|
-
declare function DrawerHeader({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
10
|
-
declare function DrawerFooter({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
11
|
-
declare function DrawerTitle({ className, ...props }: Drawer.Title.Props): React$1.JSX.Element;
|
|
12
|
-
declare function DrawerDescription({ className, ...props }: Drawer.Description.Props): React$1.JSX.Element;
|
|
13
|
-
export type DrawerHandle<Payload> = ReturnType<typeof Drawer.createHandle<Payload>>;
|
|
14
|
-
export declare function createDrawerHandle<Payload>(): DrawerHandle<Payload>;
|
|
15
|
-
export { Drawer$1 as Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger };
|