@deftui/react 0.0.6 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,6 +11,7 @@ shadcn 组件使用 `components.json` 中的 `base-vega` 风格和 Lucide 图标
11
11
 
12
12
  | ID | File | Docs | Modifications |
13
13
  | --- | --- | --- | --- |
14
+ | `@coss/empty` | [coss/empty.tsx](coss/empty.tsx) | [Empty](https://coss.com/ui/docs/components/empty) | — |
14
15
  | `@coss/form` | [coss/form.tsx](coss/form.tsx) | [Form](https://coss.com/ui/docs/components/form) | — |
15
16
  | `@coss/scroll-area` | [coss/scroll-area.tsx](coss/scroll-area.tsx) | [Scroll Area](https://coss.com/ui/docs/components/scroll-area) | — |
16
17
  | `@coss/use-copy-to-clipboard` | [coss/hooks/use-copy-to-clipboard.ts](coss/hooks/use-copy-to-clipboard.ts) | [useCopyToClipboard](https://coss.com/ui/docs/hooks/use-copy-to-clipboard) | — |
@@ -28,7 +29,6 @@ shadcn 组件使用 `components.json` 中的 `base-vega` 风格和 Lucide 图标
28
29
  | `direction` | [shadcn/direction.tsx](shadcn/direction.tsx) | [Direction](https://ui.shadcn.com/docs/components/base/direction) | — |
29
30
  | `drawer` | [shadcn/drawer.tsx](shadcn/drawer.tsx) | [Drawer](https://ui.shadcn.com/docs/components/base/drawer) | 额外导出 `createDrawerHandle` 及其类型 |
30
31
  | `dropdown-menu` | [shadcn/dropdown-menu.tsx](shadcn/dropdown-menu.tsx) | [Dropdown Menu](https://ui.shadcn.com/docs/components/base/dropdown-menu) | — |
31
- | `empty` | [shadcn/empty.tsx](shadcn/empty.tsx) | [Empty](https://ui.shadcn.com/docs/components/base/empty) | — |
32
32
  | `field` | [shadcn/field.tsx](shadcn/field.tsx) | [Field](https://ui.shadcn.com/docs/components/base/field) | — |
33
33
  | `input` | [shadcn/input.tsx](shadcn/input.tsx) | [Input](https://ui.shadcn.com/docs/components/base/input) | 参考 coss ui 处理自动填充的文字颜色,用背景色过渡抑制浏览器底色、内阴影绘制填充色 |
34
34
  | `input-group` | [shadcn/input-group.tsx](shadcn/input-group.tsx) | [Input Group](https://ui.shadcn.com/docs/components/base/input-group) | — |
@@ -0,0 +1,12 @@
1
+ import { VariantProps } from "class-variance-authority";
2
+ import React from "react";
3
+ declare const emptyMediaVariants: (props?: ({
4
+ variant?: "default" | "icon" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ export declare function Empty({ className, ...props }: React.ComponentProps<"div">): React.ReactElement;
7
+ export declare function EmptyHeader({ className, ...props }: React.ComponentProps<"div">): React.ReactElement;
8
+ export declare function EmptyMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>): React.ReactElement;
9
+ export declare function EmptyTitle({ className, ...props }: React.ComponentProps<"div">): React.ReactElement;
10
+ export declare function EmptyDescription({ className, ...props }: React.ComponentProps<"p">): React.ReactElement;
11
+ export declare function EmptyContent({ className, ...props }: React.ComponentProps<"div">): React.ReactElement;
12
+ export {};
@@ -0,0 +1,74 @@
1
+ import { cn } from "../shadcn/lib/utils.mjs";
2
+ import { cva } from "class-variance-authority";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ // src/vendor/coss/empty.tsx
5
+ const emptyMediaVariants = cva("flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
6
+ defaultVariants: { variant: "default" },
7
+ variants: { variant: {
8
+ default: "bg-transparent",
9
+ icon: "relative flex size-9 shrink-0 items-center justify-center rounded-md border bg-card not-dark:bg-clip-padding text-foreground shadow-sm/5 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)] [&_svg:not([class*='size-'])]:size-4.5"
10
+ } }
11
+ });
12
+ function Empty({ className, ...props }) {
13
+ return /* @__PURE__ */ jsx("div", {
14
+ className: cn("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 text-balance px-6 py-12 text-center md:py-20", className),
15
+ "data-slot": "empty",
16
+ ...props
17
+ });
18
+ }
19
+ function EmptyHeader({ className, ...props }) {
20
+ return /* @__PURE__ */ jsx("div", {
21
+ className: cn("flex max-w-sm flex-col items-center text-center", className),
22
+ "data-slot": "empty-header",
23
+ ...props
24
+ });
25
+ }
26
+ function EmptyMedia({ className, variant = "default", ...props }) {
27
+ return /* @__PURE__ */ jsxs("div", {
28
+ className: cn("relative mb-6", className),
29
+ "data-slot": "empty-media",
30
+ "data-variant": variant,
31
+ ...props,
32
+ children: [variant === "icon" && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
33
+ "aria-hidden": "true",
34
+ className: cn(emptyMediaVariants({
35
+ className,
36
+ variant
37
+ }), "pointer-events-none absolute bottom-px origin-bottom-left -translate-x-0.5 -rotate-10 scale-84 shadow-none")
38
+ }), /* @__PURE__ */ jsx("div", {
39
+ "aria-hidden": "true",
40
+ className: cn(emptyMediaVariants({
41
+ className,
42
+ variant
43
+ }), "pointer-events-none absolute bottom-px origin-bottom-right translate-x-0.5 rotate-10 scale-84 shadow-none")
44
+ })] }), /* @__PURE__ */ jsx("div", {
45
+ className: cn(emptyMediaVariants({
46
+ className,
47
+ variant
48
+ })),
49
+ ...props
50
+ })]
51
+ });
52
+ }
53
+ function EmptyTitle({ className, ...props }) {
54
+ return /* @__PURE__ */ jsx("div", {
55
+ className: cn("font-bold font-heading text-xl", className),
56
+ "data-slot": "empty-title",
57
+ ...props
58
+ });
59
+ }
60
+ function EmptyDescription({ className, ...props }) {
61
+ return /* @__PURE__ */ jsx("div", {
62
+ className: cn("text-muted-foreground text-sm [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4 [[data-slot=empty-title]+&]:mt-1", className),
63
+ "data-slot": "empty-description",
64
+ ...props
65
+ });
66
+ }
67
+ function EmptyContent({ className, ...props }) {
68
+ return /* @__PURE__ */ jsx("div", {
69
+ className: cn("flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm", className),
70
+ "data-slot": "empty-content",
71
+ ...props
72
+ });
73
+ }
74
+ export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
@@ -2,8 +2,8 @@
2
2
  import { Button } from "./button.mjs";
3
3
  import { cn } from "cn";
4
4
  import "react";
5
- import { AlertDialog } from "@base-ui/react/alert-dialog";
6
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { AlertDialog } from "@base-ui/react/alert-dialog";
7
7
  // src/vendor/shadcn/alert-dialog.tsx
8
8
  function AlertDialog$1({ ...props }) {
9
9
  return /* @__PURE__ */ jsx(AlertDialog.Root, {
@@ -1,8 +1,8 @@
1
1
  import { cn } from "cn";
2
2
  import { mergeProps } from "@base-ui/react/merge-props";
3
3
  import "react";
4
- import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
5
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
6
6
  import { useRender } from "@base-ui/react/use-render";
7
7
  // src/vendor/shadcn/breadcrumb.tsx
8
8
  function Breadcrumb({ className, ...props }) {
@@ -1,8 +1,8 @@
1
1
  import { Spinner } from "./spinner.mjs";
2
2
  import { cn } from "cn";
3
3
  import { cva } from "class-variance-authority";
4
- import { Button } from "@base-ui/react/button";
5
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ import { Button } from "@base-ui/react/button";
6
6
  // src/vendor/shadcn/button.tsx
7
7
  const buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 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", {
8
8
  variants: {
@@ -2,8 +2,8 @@
2
2
  import { Button, buttonVariants } from "./button.mjs";
3
3
  import { cn } from "cn";
4
4
  import * as React$1 from "react";
5
- import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
6
5
  import { jsx } from "react/jsx-runtime";
6
+ import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
7
7
  import { DayPicker, getDefaultClassNames } from "@daypicker/react";
8
8
  // src/vendor/shadcn/calendar.tsx
9
9
  function Calendar({ className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", locale, formatters, components, ...props }) {
@@ -2,8 +2,8 @@
2
2
  import { Button } from "./button.mjs";
3
3
  import { cn } from "cn";
4
4
  import * as React$1 from "react";
5
- import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
6
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
7
7
  import useEmblaCarousel from "embla-carousel-react";
8
8
  // src/vendor/shadcn/carousel.tsx
9
9
  const CarouselContext = React$1.createContext(null);
@@ -3,8 +3,8 @@ import { Button } from "./button.mjs";
3
3
  import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "./input-group.mjs";
4
4
  import { cn } from "cn";
5
5
  import "react";
6
- import { CheckIcon, ChevronDownIcon, XIcon } from "lucide-react";
7
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { CheckIcon, ChevronDownIcon, XIcon } from "lucide-react";
8
8
  import { Combobox } from "@base-ui/react";
9
9
  // src/vendor/shadcn/combobox.tsx
10
10
  const Combobox$1 = Combobox.Root;
@@ -2,8 +2,8 @@
2
2
  import { Button } from "./button.mjs";
3
3
  import { cn } from "cn";
4
4
  import "react";
5
- import { XIcon } from "lucide-react";
6
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { XIcon } from "lucide-react";
7
7
  import { Dialog } from "@base-ui/react/dialog";
8
8
  // src/vendor/shadcn/dialog.tsx
9
9
  function Dialog$1({ ...props }) {
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { cn } from "cn";
3
3
  import "react";
4
- import { CheckIcon, ChevronRightIcon } from "lucide-react";
5
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { CheckIcon, ChevronRightIcon } from "lucide-react";
6
6
  import { Menu } from "@base-ui/react/menu";
7
7
  // src/vendor/shadcn/dropdown-menu.tsx
8
8
  function DropdownMenu({ ...props }) {
@@ -1,8 +1,8 @@
1
1
  import { Button } from "./button.mjs";
2
2
  import { cn } from "cn";
3
3
  import "react";
4
- import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
5
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
6
6
  // src/vendor/shadcn/pagination.tsx
7
7
  function Pagination({ className, ...props }) {
8
8
  return /* @__PURE__ */ jsx("nav", {
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { cn } from "cn";
3
3
  import "react";
4
- import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
5
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
6
6
  import { Select } from "@base-ui/react/select";
7
7
  // src/vendor/shadcn/select.tsx
8
8
  const Select$1 = Select.Root;
@@ -2,8 +2,8 @@
2
2
  import { Button } from "./button.mjs";
3
3
  import { cn } from "cn";
4
4
  import "react";
5
- import { XIcon } from "lucide-react";
6
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { XIcon } from "lucide-react";
7
7
  import { Dialog } from "@base-ui/react/dialog";
8
8
  // src/vendor/shadcn/sheet.tsx
9
9
  function Sheet({ ...props }) {
@@ -9,8 +9,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
- import { PanelLeftIcon } from "lucide-react";
13
12
  import { jsx, jsxs } from "react/jsx-runtime";
13
+ import { PanelLeftIcon } from "lucide-react";
14
14
  import { useRender } from "@base-ui/react/use-render";
15
15
  // src/vendor/shadcn/sidebar.tsx
16
16
  const SIDEBAR_COOKIE_NAME = "sidebar_state";
@@ -1,6 +1,6 @@
1
1
  import { cn } from "cn";
2
- import { Loader2Icon } from "lucide-react";
3
2
  import { jsx } from "react/jsx-runtime";
3
+ import { Loader2Icon } from "lucide-react";
4
4
  // src/vendor/shadcn/spinner.tsx
5
5
  function Spinner({ className, ...props }) {
6
6
  return /* @__PURE__ */ jsx(Loader2Icon, {
@@ -2,8 +2,8 @@
2
2
  import { Button } from "./button.mjs";
3
3
  import { cn } from "cn";
4
4
  import "react";
5
- import { CircleCheckIcon, InfoIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon, XIcon } from "lucide-react";
6
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { CircleCheckIcon, InfoIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon, XIcon } from "lucide-react";
7
7
  import { Toast } from "@base-ui/react/toast";
8
8
  // src/vendor/shadcn/toast.tsx
9
9
  const toast = Toast.createToastManager();
@@ -6,8 +6,8 @@ import { Skeleton } from "../shadcn/skeleton.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
- import { ChevronLeftIcon, ChevronRightIcon, DownloadIcon, EllipsisIcon, ImageOffIcon, XIcon, ZoomInIcon, ZoomOutIcon } from "lucide-react";
10
9
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
10
+ import { ChevronLeftIcon, ChevronRightIcon, DownloadIcon, EllipsisIcon, ImageOffIcon, XIcon, ZoomInIcon, ZoomOutIcon } from "lucide-react";
11
11
  import { useRender } from "@base-ui/react/use-render";
12
12
  import { Dialog } from "@base-ui/react/dialog";
13
13
  import { Menu } from "@base-ui/react/menu";
@@ -6,7 +6,6 @@ type ASTProps = Omit<React.ComponentProps<typeof Breadcrumb$1>, "children"> & {
6
6
  declare function BreadcrumbAST({ children, ...props }: ASTProps): React.JSX.Element;
7
7
  export declare const Breadcrumb: typeof Breadcrumb$1 & {
8
8
  AST: typeof BreadcrumbAST;
9
- Root: typeof Breadcrumb$1;
10
9
  List: typeof BreadcrumbList;
11
10
  Item: typeof BreadcrumbItem;
12
11
  Separator: typeof BreadcrumbSeparator;
@@ -11,7 +11,6 @@ function BreadcrumbAST({ children, ...props }) {
11
11
  }
12
12
  const Breadcrumb = /* @__PURE__ */ Object.assign(Breadcrumb$1, {
13
13
  AST: BreadcrumbAST,
14
- Root: Breadcrumb$1,
15
14
  List: BreadcrumbList,
16
15
  Item: BreadcrumbItem,
17
16
  Separator: BreadcrumbSeparator,
@@ -4,8 +4,8 @@ import { Popover, PopoverContent, PopoverTrigger } from "../vendor/shadcn/popove
4
4
  import { Calendar } from "../vendor/shadcn/calendar.mjs";
5
5
  import { cn } from "cn";
6
6
  import { useState } from "react";
7
- import { CalendarIcon } from "lucide-react";
8
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
+ import { CalendarIcon } from "lucide-react";
9
9
  import { format } from "date-fns";
10
10
  // src/widgets/datetime-picker.tsx
11
11
  function TimePicker({ className, step = "1", ...props }) {
@@ -1,3 +1,4 @@
1
+ import { Empty as Empty$1, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "../vendor/coss/empty.mjs";
1
2
  import { Button } from "../vendor/shadcn/button.mjs";
2
3
  import { AlertDialog as AlertDialog$1, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHandle, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, createAlertDialogHandle } from "../vendor/shadcn/alert-dialog.mjs";
3
4
  import { Separator } from "../vendor/shadcn/separator.mjs";
@@ -7,7 +8,6 @@ import { ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, Co
7
8
  import { Dialog as Dialog$1, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHandle, DialogHeader, DialogTitle, DialogTrigger, createDialogHandle } from "../vendor/shadcn/dialog.mjs";
8
9
  import { Drawer as Drawer$1, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHandle, DrawerHeader, DrawerTitle, DrawerTrigger, createDrawerHandle } from "../vendor/shadcn/drawer.mjs";
9
10
  import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "../vendor/shadcn/dropdown-menu.mjs";
10
- import { Empty as Empty$1, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "../vendor/shadcn/empty.mjs";
11
11
  import { Label } from "../vendor/shadcn/label.mjs";
12
12
  import { Field as Field$1, FieldDescription, FieldError, FieldLabel } from "../vendor/shadcn/field.mjs";
13
13
  import { InputGroup as InputGroup$1, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea } from "../vendor/shadcn/input-group.mjs";
@@ -38,17 +38,14 @@ import { ScrollArea } from "../vendor/coss/scroll-area.mjs";
38
38
  import { Form } from "../vendor/coss/form.mjs";
39
39
  import { IconSwap } from "../vendor/tailored/icon-swap.mjs";
40
40
  export declare const Kbd: typeof Kbd$1 & {
41
- Root: typeof Kbd$1;
42
41
  Group: typeof KbdGroup;
43
42
  };
44
43
  export declare const Tabs: typeof Tabs$1 & {
45
- Root: typeof Tabs$1;
46
44
  List: typeof TabsList;
47
45
  Trigger: typeof TabsTrigger;
48
46
  Content: typeof TabsContent;
49
47
  };
50
48
  export declare const Card: typeof Card$1 & {
51
- Root: typeof Card$1;
52
49
  Header: typeof CardHeader;
53
50
  Content: typeof CardContent;
54
51
  Footer: typeof CardFooter;
@@ -57,13 +54,11 @@ export declare const Card: typeof Card$1 & {
57
54
  Description: typeof CardDescription;
58
55
  };
59
56
  export declare const Field: typeof Field$1 & {
60
- Root: typeof Field$1;
61
57
  Label: typeof FieldLabel;
62
58
  Description: typeof FieldDescription;
63
59
  Error: typeof FieldError;
64
60
  };
65
61
  export declare const Empty: typeof Empty$1 & {
66
- Root: typeof Empty$1;
67
62
  Header: typeof EmptyHeader;
68
63
  Content: typeof EmptyContent;
69
64
  Media: typeof EmptyMedia;
@@ -71,7 +66,6 @@ export declare const Empty: typeof Empty$1 & {
71
66
  Description: typeof EmptyDescription;
72
67
  };
73
68
  export declare const Table: typeof Table$1 & {
74
- Root: typeof Table$1;
75
69
  Header: typeof TableHeader;
76
70
  Body: typeof TableBody;
77
71
  Footer: typeof TableFooter;
@@ -80,11 +74,9 @@ export declare const Table: typeof Table$1 & {
80
74
  Cell: typeof TableCell;
81
75
  };
82
76
  export declare const Radio: typeof RadioGroupItem & {
83
- Root: typeof RadioGroupItem;
84
77
  Group: typeof RadioGroup;
85
78
  };
86
79
  export declare const Select: typeof import("@base-ui/react").SelectRoot & {
87
- Root: typeof import("@base-ui/react").SelectRoot;
88
80
  Trigger: typeof SelectTrigger;
89
81
  Value: typeof SelectValue;
90
82
  Content: typeof SelectContent;
@@ -94,7 +86,6 @@ export declare const Select: typeof import("@base-ui/react").SelectRoot & {
94
86
  Item: typeof SelectItem;
95
87
  };
96
88
  export declare const Drawer: typeof Drawer$1 & {
97
- Root: typeof Drawer$1;
98
89
  Trigger: typeof DrawerTrigger;
99
90
  Close: typeof DrawerClose;
100
91
  Content: typeof DrawerContent;
@@ -104,7 +95,6 @@ export declare const Drawer: typeof Drawer$1 & {
104
95
  Description: typeof DrawerDescription;
105
96
  };
106
97
  export declare const Dialog: typeof Dialog$1 & {
107
- Root: typeof Dialog$1;
108
98
  Trigger: typeof DialogTrigger;
109
99
  Close: typeof DialogClose;
110
100
  Content: typeof DialogContent;
@@ -115,19 +105,16 @@ export declare const Dialog: typeof Dialog$1 & {
115
105
  };
116
106
  export declare const Tooltip: typeof Tooltip$1 & {
117
107
  Provider: typeof TooltipProvider;
118
- Root: typeof Tooltip$1;
119
108
  Trigger: typeof TooltipTrigger;
120
109
  Content: typeof TooltipContent;
121
110
  };
122
111
  export declare const Popover: typeof Popover$1 & {
123
- Root: typeof Popover$1;
124
112
  Trigger: typeof PopoverTrigger;
125
113
  Content: typeof PopoverContent;
126
114
  Title: typeof PopoverTitle;
127
115
  Description: typeof PopoverDescription;
128
116
  };
129
117
  export declare const Dropdown: typeof DropdownMenu & {
130
- Root: typeof DropdownMenu;
131
118
  Trigger: typeof DropdownMenuTrigger;
132
119
  Content: typeof DropdownMenuContent;
133
120
  Sub: typeof DropdownMenuSub;
@@ -143,14 +130,12 @@ export declare const Dropdown: typeof DropdownMenu & {
143
130
  CheckboxItem: typeof DropdownMenuCheckboxItem;
144
131
  };
145
132
  export declare const Progress: typeof Progress$1 & {
146
- Root: typeof Progress$1;
147
133
  Label: typeof ProgressLabel;
148
134
  Value: typeof ProgressValue;
149
135
  Track: typeof ProgressTrack;
150
136
  Indicator: typeof ProgressIndicator;
151
137
  };
152
138
  export declare const AlertDialog: typeof AlertDialog$1 & {
153
- Root: typeof AlertDialog$1;
154
139
  Trigger: typeof AlertDialogTrigger;
155
140
  Close: typeof AlertDialogCancel;
156
141
  Action: typeof AlertDialogAction;
@@ -161,12 +146,10 @@ export declare const AlertDialog: typeof AlertDialog$1 & {
161
146
  Description: typeof AlertDialogDescription;
162
147
  };
163
148
  export declare const ButtonGroup: typeof ButtonGroup$1 & {
164
- Root: typeof ButtonGroup$1;
165
149
  Text: typeof ButtonGroupText;
166
150
  Separator: typeof ButtonGroupSeparator;
167
151
  };
168
152
  export declare const InputGroup: typeof InputGroup$1 & {
169
- Root: typeof InputGroup$1;
170
153
  Addon: typeof InputGroupAddon;
171
154
  AddonText: typeof InputGroupText;
172
155
  Input: typeof InputGroupInput;
@@ -174,7 +157,6 @@ export declare const InputGroup: typeof InputGroup$1 & {
174
157
  Button: typeof InputGroupButton;
175
158
  };
176
159
  export declare const Combobox: typeof import("@base-ui/react").ComboboxRoot & {
177
- Root: typeof import("@base-ui/react").ComboboxRoot;
178
160
  Content: typeof ComboboxContent;
179
161
  Empty: typeof ComboboxEmpty;
180
162
  List: typeof ComboboxList;
@@ -1,3 +1,4 @@
1
+ import { Empty as Empty$1, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "../vendor/coss/empty.mjs";
1
2
  import { Spinner } from "../vendor/shadcn/spinner.mjs";
2
3
  import { Button } from "../vendor/shadcn/button.mjs";
3
4
  import { AlertDialog as AlertDialog$1, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, createAlertDialogHandle } from "../vendor/shadcn/alert-dialog.mjs";
@@ -11,7 +12,6 @@ import { Combobox as Combobox$1, ComboboxChip, ComboboxChips, ComboboxChipsInput
11
12
  import { Dialog as Dialog$1, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, createDialogHandle } from "../vendor/shadcn/dialog.mjs";
12
13
  import { Drawer as Drawer$1, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, createDrawerHandle } from "../vendor/shadcn/drawer.mjs";
13
14
  import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "../vendor/shadcn/dropdown-menu.mjs";
14
- import { Empty as Empty$1, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "../vendor/shadcn/empty.mjs";
15
15
  import { Label } from "../vendor/shadcn/label.mjs";
16
16
  import { Field as Field$1, FieldDescription, FieldError, FieldLabel } from "../vendor/shadcn/field.mjs";
17
17
  import { Kbd as Kbd$1, KbdGroup } from "../vendor/shadcn/kbd.mjs";
@@ -35,18 +35,13 @@ import { ScrollArea } from "../vendor/coss/scroll-area.mjs";
35
35
  import { Form } from "../vendor/coss/form.mjs";
36
36
  import { IconSwap } from "../vendor/tailored/icon-swap.mjs";
37
37
  // src/widgets/index.ts
38
- const Kbd = /* @__PURE__ */ Object.assign(Kbd$1, {
39
- Root: Kbd$1,
40
- Group: KbdGroup
41
- });
38
+ const Kbd = /* @__PURE__ */ Object.assign(Kbd$1, { Group: KbdGroup });
42
39
  const Tabs = /* @__PURE__ */ Object.assign(Tabs$1, {
43
- Root: Tabs$1,
44
40
  List: TabsList,
45
41
  Trigger: TabsTrigger,
46
42
  Content: TabsContent
47
43
  });
48
44
  const Card = /* @__PURE__ */ Object.assign(Card$1, {
49
- Root: Card$1,
50
45
  Header: CardHeader,
51
46
  Content: CardContent,
52
47
  Footer: CardFooter,
@@ -55,13 +50,11 @@ const Card = /* @__PURE__ */ Object.assign(Card$1, {
55
50
  Description: CardDescription
56
51
  });
57
52
  const Field = /* @__PURE__ */ Object.assign(Field$1, {
58
- Root: Field$1,
59
53
  Label: FieldLabel,
60
54
  Description: FieldDescription,
61
55
  Error: FieldError
62
56
  });
63
57
  const Empty = /* @__PURE__ */ Object.assign(Empty$1, {
64
- Root: Empty$1,
65
58
  Header: EmptyHeader,
66
59
  Content: EmptyContent,
67
60
  Media: EmptyMedia,
@@ -69,7 +62,6 @@ const Empty = /* @__PURE__ */ Object.assign(Empty$1, {
69
62
  Description: EmptyDescription
70
63
  });
71
64
  const Table = /* @__PURE__ */ Object.assign(Table$1, {
72
- Root: Table$1,
73
65
  Header: TableHeader,
74
66
  Body: TableBody,
75
67
  Footer: TableFooter,
@@ -77,12 +69,8 @@ const Table = /* @__PURE__ */ Object.assign(Table$1, {
77
69
  Head: TableHead,
78
70
  Cell: TableCell
79
71
  });
80
- const Radio = /* @__PURE__ */ Object.assign(RadioGroupItem, {
81
- Root: RadioGroupItem,
82
- Group: RadioGroup
83
- });
72
+ const Radio = /* @__PURE__ */ Object.assign(RadioGroupItem, { Group: RadioGroup });
84
73
  const Select = /* @__PURE__ */ Object.assign(Select$1, {
85
- Root: Select$1,
86
74
  Trigger: SelectTrigger,
87
75
  Value: SelectValue,
88
76
  Content: SelectContent,
@@ -92,7 +80,6 @@ const Select = /* @__PURE__ */ Object.assign(Select$1, {
92
80
  Item: SelectItem
93
81
  });
94
82
  const Drawer = /* @__PURE__ */ Object.assign(Drawer$1, {
95
- Root: Drawer$1,
96
83
  Trigger: DrawerTrigger,
97
84
  Close: DrawerClose,
98
85
  Content: DrawerContent,
@@ -102,7 +89,6 @@ const Drawer = /* @__PURE__ */ Object.assign(Drawer$1, {
102
89
  Description: DrawerDescription
103
90
  });
104
91
  const Dialog = /* @__PURE__ */ Object.assign(Dialog$1, {
105
- Root: Dialog$1,
106
92
  Trigger: DialogTrigger,
107
93
  Close: DialogClose,
108
94
  Content: DialogContent,
@@ -113,19 +99,16 @@ const Dialog = /* @__PURE__ */ Object.assign(Dialog$1, {
113
99
  });
114
100
  const Tooltip = /* @__PURE__ */ Object.assign(Tooltip$1, {
115
101
  Provider: TooltipProvider,
116
- Root: Tooltip$1,
117
102
  Trigger: TooltipTrigger,
118
103
  Content: TooltipContent
119
104
  });
120
105
  const Popover = /* @__PURE__ */ Object.assign(Popover$1, {
121
- Root: Popover$1,
122
106
  Trigger: PopoverTrigger,
123
107
  Content: PopoverContent,
124
108
  Title: PopoverTitle,
125
109
  Description: PopoverDescription
126
110
  });
127
111
  const Dropdown = /* @__PURE__ */ Object.assign(DropdownMenu, {
128
- Root: DropdownMenu,
129
112
  Trigger: DropdownMenuTrigger,
130
113
  Content: DropdownMenuContent,
131
114
  Sub: DropdownMenuSub,
@@ -141,14 +124,12 @@ const Dropdown = /* @__PURE__ */ Object.assign(DropdownMenu, {
141
124
  CheckboxItem: DropdownMenuCheckboxItem
142
125
  });
143
126
  const Progress = /* @__PURE__ */ Object.assign(Progress$1, {
144
- Root: Progress$1,
145
127
  Label: ProgressLabel,
146
128
  Value: ProgressValue,
147
129
  Track: ProgressTrack,
148
130
  Indicator: ProgressIndicator
149
131
  });
150
132
  const AlertDialog = /* @__PURE__ */ Object.assign(AlertDialog$1, {
151
- Root: AlertDialog$1,
152
133
  Trigger: AlertDialogTrigger,
153
134
  Close: AlertDialogCancel,
154
135
  Action: AlertDialogAction,
@@ -159,12 +140,10 @@ const AlertDialog = /* @__PURE__ */ Object.assign(AlertDialog$1, {
159
140
  Description: AlertDialogDescription
160
141
  });
161
142
  const ButtonGroup = /* @__PURE__ */ Object.assign(ButtonGroup$1, {
162
- Root: ButtonGroup$1,
163
143
  Text: ButtonGroupText,
164
144
  Separator: ButtonGroupSeparator
165
145
  });
166
146
  const InputGroup = /* @__PURE__ */ Object.assign(InputGroup$1, {
167
- Root: InputGroup$1,
168
147
  Addon: InputGroupAddon,
169
148
  AddonText: InputGroupText,
170
149
  Input: InputGroupInput,
@@ -172,7 +151,6 @@ const InputGroup = /* @__PURE__ */ Object.assign(InputGroup$1, {
172
151
  Button: InputGroupButton
173
152
  });
174
153
  const Combobox = /* @__PURE__ */ Object.assign(Combobox$1, {
175
- Root: Combobox$1,
176
154
  Content: ComboboxContent,
177
155
  Empty: ComboboxEmpty,
178
156
  List: ComboboxList,
@@ -2,12 +2,10 @@ import { Carousel as Carousel$1, CarouselContent, CarouselItem, CarouselNext, Ca
2
2
  import { Lightbox as Lightbox$1, 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";
3
3
  import { ComponentProps, ReactNode } from "react";
4
4
  export declare const Lightbox: typeof Lightbox$1 & {
5
- Root: typeof Lightbox$1;
6
5
  Trigger: typeof LightboxTrigger;
7
6
  Content: typeof LightboxContent;
8
7
  };
9
8
  export declare const Carousel: typeof Carousel$1 & {
10
- Root: typeof Carousel$1;
11
9
  Content: typeof CarouselContent;
12
10
  Previous: typeof CarouselPrevious;
13
11
  Next: typeof CarouselNext;
@@ -5,12 +5,10 @@ import { useEffect, useImperativeHandle, useRef, useState } from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  // src/widgets/multimedia.tsx
7
7
  const Lightbox = /* @__PURE__ */ Object.assign(Lightbox$1, {
8
- Root: Lightbox$1,
9
8
  Trigger: LightboxTrigger,
10
9
  Content: LightboxContent
11
10
  });
12
11
  const Carousel = /* @__PURE__ */ Object.assign(Carousel$1, {
13
- Root: Carousel$1,
14
12
  Content: CarouselContent,
15
13
  Previous: CarouselPrevious,
16
14
  Next: CarouselNext,
@@ -1,6 +1,5 @@
1
1
  import { Pagination as Pagination$1, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "../vendor/shadcn/pagination.mjs";
2
2
  export declare const Pagination: typeof Pagination$1 & {
3
- Root: typeof Pagination$1;
4
3
  Content: typeof PaginationContent;
5
4
  Item: typeof PaginationItem;
6
5
  Link: typeof PaginationLink;
@@ -1,7 +1,6 @@
1
1
  import { Pagination as Pagination$1, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "../vendor/shadcn/pagination.mjs";
2
2
  // src/widgets/pagination.tsx
3
3
  const Pagination = /* @__PURE__ */ Object.assign(Pagination$1, {
4
- Root: Pagination$1,
5
4
  Content: PaginationContent,
6
5
  Item: PaginationItem,
7
6
  Link: PaginationLink,
@@ -1,7 +1,6 @@
1
1
  import { Sidebar as Sidebar$1, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar } from "../vendor/shadcn/sidebar.mjs";
2
2
  export declare const Sidebar: typeof Sidebar$1 & {
3
3
  Provider: typeof SidebarProvider;
4
- Root: typeof Sidebar$1;
5
4
  Inset: typeof SidebarInset;
6
5
  Trigger: typeof SidebarTrigger;
7
6
  Header: typeof SidebarHeader;
@@ -2,7 +2,6 @@ import { Sidebar as Sidebar$1, SidebarContent, SidebarFooter, SidebarGroup, Side
2
2
  // src/widgets/sidebar.tsx
3
3
  const Sidebar = /* @__PURE__ */ Object.assign(Sidebar$1, {
4
4
  Provider: SidebarProvider,
5
- Root: Sidebar$1,
6
5
  Inset: SidebarInset,
7
6
  Trigger: SidebarTrigger,
8
7
  Header: SidebarHeader,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deftui/react",
3
- "version": "0.0.6",
3
+ "version": "0.1.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/KiriRainCat/deftui.git",
@@ -1,11 +0,0 @@
1
- import { VariantProps } from "class-variance-authority";
2
- declare function Empty({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
3
- declare function EmptyHeader({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
4
- declare const emptyMediaVariants: (props?: ({
5
- variant?: "default" | "icon" | null | undefined;
6
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
- declare function EmptyMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>): import("react").JSX.Element;
8
- declare function EmptyTitle({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
9
- declare function EmptyDescription({ className, ...props }: React.ComponentProps<"p">): import("react").JSX.Element;
10
- declare function EmptyContent({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
11
- export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
@@ -1,58 +0,0 @@
1
- import { cn } from "cn";
2
- import { cva } from "class-variance-authority";
3
- import { jsx } from "react/jsx-runtime";
4
- // src/vendor/shadcn/empty.tsx
5
- function Empty({ className, ...props }) {
6
- return /* @__PURE__ */ jsx("div", {
7
- "data-slot": "empty",
8
- className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-lg border-dashed p-12 text-center text-balance", className),
9
- ...props
10
- });
11
- }
12
- function EmptyHeader({ className, ...props }) {
13
- return /* @__PURE__ */ jsx("div", {
14
- "data-slot": "empty-header",
15
- className: cn("flex max-w-sm flex-col items-center gap-2", className),
16
- ...props
17
- });
18
- }
19
- const emptyMediaVariants = cva("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
20
- variants: { variant: {
21
- default: "bg-transparent",
22
- icon: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6"
23
- } },
24
- defaultVariants: { variant: "default" }
25
- });
26
- function EmptyMedia({ className, variant = "default", ...props }) {
27
- return /* @__PURE__ */ jsx("div", {
28
- "data-slot": "empty-icon",
29
- "data-variant": variant,
30
- className: cn(emptyMediaVariants({
31
- variant,
32
- className
33
- })),
34
- ...props
35
- });
36
- }
37
- function EmptyTitle({ className, ...props }) {
38
- return /* @__PURE__ */ jsx("div", {
39
- "data-slot": "empty-title",
40
- className: cn("text-lg font-medium tracking-tight", className),
41
- ...props
42
- });
43
- }
44
- function EmptyDescription({ className, ...props }) {
45
- return /* @__PURE__ */ jsx("div", {
46
- "data-slot": "empty-description",
47
- className: cn("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
48
- ...props
49
- });
50
- }
51
- function EmptyContent({ className, ...props }) {
52
- return /* @__PURE__ */ jsx("div", {
53
- "data-slot": "empty-content",
54
- className: cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance", className),
55
- ...props
56
- });
57
- }
58
- export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };