@deftui/react 0.3.2 → 0.3.4

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 CHANGED
@@ -25,9 +25,9 @@ import { Form } from "./vendor/coss/form.mjs";
25
25
  import { ScrollArea } from "./vendor/coss/scroll-area.mjs";
26
26
  import { IconSwap } from "./vendor/tailored/icon-swap.mjs";
27
27
  import { JsonViewer } from "./vendor/tailored/json-viewer.mjs";
28
- import { AlertDialog, Breadcrumb, ButtonGroup, Card, Cascader, Combobox, Dialog, Drawer, Dropdown, Empty, Field, Frame, InputGroup, Kbd, Popover, Progress, Radio, Select, Table, Tabs, Timeline, Tooltip } from "./widgets/index.mjs";
28
+ import { AlertDialog, Avatar, Breadcrumb, ButtonGroup, Card, Cascader, Combobox, ContextMenu, Dialog, Drawer, Dropdown, Empty, Field, Frame, InputGroup, Kbd, Popover, Progress, Radio, Select, Table, Tabs, Timeline, Tooltip } from "./widgets/index.mjs";
29
29
  import { cn } from "cn";
30
30
  import { cva } from "class-variance-authority";
31
31
  import { mergeProps } from "@base-ui/react/merge-props";
32
32
  export * from "react-dropzone";
33
- export { AlertDialog, Badge, Breadcrumb, Button, ButtonGroup, Calendar, Card, Carousel, Cascader, type CascaderChangeDetails, type CascaderLabels, type CascaderMode, type CascaderNode, type CascaderProps, type CascaderSingleProps, Checkbox, Combobox, DatePicker, type DateRange, DateRangePicker, Dialog, Drawer, Dropdown, Dropzone, Empty, Field, Form, Frame, IconSwap, Image, ImageProps, Input, InputGroup, JsonViewer, Kbd, 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, Popover, Progress, Radio, ScrollArea, Select, Separator, Sidebar, Skeleton, Spinner, Switch, Table, Tabs, Textarea, TimePicker, Timeline, Toaster as ToastProvider, Tooltip, cn, cva, formatBytes, mergeProps, toast, useCopyToClipboard, useDropzone, useIsMobile, type useLightbox, useMediaQuery, useSidebar };
33
+ export { AlertDialog, Avatar, Badge, Breadcrumb, Button, ButtonGroup, Calendar, Card, Carousel, Cascader, type CascaderChangeDetails, type CascaderLabels, type CascaderMode, type CascaderNode, type CascaderProps, type CascaderSingleProps, Checkbox, Combobox, ContextMenu, DatePicker, type DateRange, DateRangePicker, Dialog, Drawer, Dropdown, Dropzone, Empty, Field, Form, Frame, IconSwap, Image, ImageProps, Input, InputGroup, JsonViewer, Kbd, 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, Popover, Progress, Radio, ScrollArea, Select, Separator, Sidebar, Skeleton, Spinner, Switch, Table, Tabs, Textarea, TimePicker, Timeline, Toaster as ToastProvider, Tooltip, cn, cva, formatBytes, mergeProps, toast, useCopyToClipboard, useDropzone, useIsMobile, type useLightbox, useMediaQuery, useSidebar };
package/dist/index.mjs CHANGED
@@ -22,8 +22,8 @@ import { Checkbox } from "./vendor/shadcn/checkbox.mjs";
22
22
  import { Form } from "./vendor/coss/form.mjs";
23
23
  import { IconSwap } from "./vendor/tailored/icon-swap.mjs";
24
24
  import { JsonViewer } from "./vendor/tailored/json-viewer.mjs";
25
- import { AlertDialog, Breadcrumb, ButtonGroup, Card, Cascader, Combobox, Dialog, Drawer, Dropdown, Empty, Field, Frame, InputGroup, Kbd, Popover, Progress, Radio, Select, Table, Tabs, Timeline, Tooltip } from "./widgets/index.mjs";
25
+ import { AlertDialog, Avatar, Breadcrumb, ButtonGroup, Card, Cascader, Combobox, ContextMenu, Dialog, Drawer, Dropdown, Empty, Field, Frame, InputGroup, Kbd, Popover, Progress, Radio, Select, Table, Tabs, Timeline, Tooltip } from "./widgets/index.mjs";
26
26
  import { cn } from "cn";
27
27
  import { cva } from "class-variance-authority";
28
28
  import { mergeProps } from "@base-ui/react/merge-props";
29
- export { AlertDialog, Badge, Breadcrumb, Button, ButtonGroup, Calendar, Card, Carousel, Cascader, Checkbox, Combobox, DatePicker, DateRangePicker, Dialog, Drawer, Dropdown, Dropzone, Empty, Field, Form, Frame, IconSwap, Image, Input, InputGroup, JsonViewer, Kbd, Label, Lightbox, Pagination, Popover, Progress, Radio, ScrollArea, Select, Separator, Sidebar, Skeleton, Spinner, Switch, Table, Tabs, Textarea, TimePicker, Timeline, Toaster as ToastProvider, Tooltip, cn, cva, formatBytes, mergeProps, toast, useCopyToClipboard, useDropzone, useIsMobile, useMediaQuery, useSidebar };
29
+ export { AlertDialog, Avatar, Badge, Breadcrumb, Button, ButtonGroup, Calendar, Card, Carousel, Cascader, Checkbox, Combobox, ContextMenu, DatePicker, DateRangePicker, Dialog, Drawer, Dropdown, Dropzone, Empty, Field, Form, Frame, IconSwap, Image, Input, InputGroup, JsonViewer, Kbd, Label, Lightbox, Pagination, Popover, Progress, Radio, ScrollArea, Select, Separator, Sidebar, Skeleton, Spinner, Switch, Table, Tabs, Textarea, TimePicker, Timeline, Toaster as ToastProvider, Tooltip, cn, cva, formatBytes, mergeProps, toast, useCopyToClipboard, useDropzone, useIsMobile, useMediaQuery, useSidebar };
@@ -25,6 +25,7 @@ shadcn 组件使用 `components.json` 中的 `base-vega` 风格和 Lucide 图标
25
25
  | `@reui/cascader` | [reui.io/cascader/cascader.tsx](reui.io/cascader/cascader.tsx) | [Cascader](https://reui.io/docs/components/cascader) | 重映射 `scroll-area` 与 `spinner` 的导入 |
26
26
  | `@reui/frame` | [reui.io/frame.tsx](reui.io/frame.tsx) | [Frame](https://reui.io/docs/components/base/frame) | — |
27
27
  | `@reui/timeline` | [reui.io/timeline.tsx](reui.io/timeline.tsx) | [Timeline](https://reui.io/docs/components/timeline) | — |
28
+ | `avatar` | [shadcn/avatar.tsx](shadcn/avatar.tsx) | [Avatar](https://ui.shadcn.com/docs/components/base/avatar) | — |
28
29
  | `badge` | [shadcn/badge.tsx](shadcn/badge.tsx) | [Badge](https://ui.shadcn.com/docs/components/base/badge) | 提供 `info`、`success`、`warning` 语义变体 |
29
30
  | `breadcrumb` | [shadcn/breadcrumb.tsx](shadcn/breadcrumb.tsx) | [Breadcrumb](https://ui.shadcn.com/docs/components/base/breadcrumb) | 未显式指定 `BreadcrumbList` 则自动包裹 |
30
31
  | `button` | [shadcn/button.tsx](shadcn/button.tsx) | [Button](https://ui.shadcn.com/docs/components/base/button) | `pill` 提供全圆角;`isPending` 提供加载态;提供额外 `destructive` 系列样式变体 |
@@ -32,6 +33,7 @@ shadcn 组件使用 `components.json` 中的 `base-vega` 风格和 Lucide 图标
32
33
  | `carousel` | [shadcn/carousel.tsx](shadcn/carousel.tsx) | [Carousel](https://ui.shadcn.com/docs/components/base/carousel) | — |
33
34
  | `checkbox` | [shadcn/checkbox.tsx](shadcn/checkbox.tsx) | [Checkbox](https://ui.shadcn.com/docs/components/base/checkbox) | — |
34
35
  | `combobox` | [shadcn/combobox.tsx](shadcn/combobox.tsx) | [Combobox](https://ui.shadcn.com/docs/components/base/combobox) | 将选中标记移至左侧 |
36
+ | `context-menu` | [shadcn/context-menu.tsx](shadcn/context-menu.tsx) | [Context Menu](https://ui.shadcn.com/docs/components/base/context-menu) | — |
35
37
  | `direction` | [shadcn/direction.tsx](shadcn/direction.tsx) | [Direction](https://ui.shadcn.com/docs/components/base/direction) | — |
36
38
  | `dropdown-menu` | [shadcn/dropdown-menu.tsx](shadcn/dropdown-menu.tsx) | [Dropdown Menu](https://ui.shadcn.com/docs/components/base/dropdown-menu) | — |
37
39
  | `field` | [shadcn/field.tsx](shadcn/field.tsx) | [Field](https://ui.shadcn.com/docs/components/base/field) | — |
@@ -0,0 +1,11 @@
1
+ import * as React$1 from "react";
2
+ import { Avatar } from "@base-ui/react/avatar";
3
+ declare function Avatar$1({ className, size, ...props }: Avatar.Root.Props & {
4
+ size?: "default" | "sm" | "lg";
5
+ }): React$1.JSX.Element;
6
+ declare function AvatarImage({ className, ...props }: Avatar.Image.Props): React$1.JSX.Element;
7
+ declare function AvatarFallback({ className, ...props }: Avatar.Fallback.Props): React$1.JSX.Element;
8
+ declare function AvatarBadge({ className, ...props }: React$1.ComponentProps<"span">): React$1.JSX.Element;
9
+ declare function AvatarGroup({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
10
+ declare function AvatarGroupCount({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
11
+ export { Avatar$1 as Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage };
@@ -0,0 +1,50 @@
1
+ "use client";
2
+ import { cn } from "cn";
3
+ import "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { Avatar } from "@base-ui/react/avatar";
6
+ // src/vendor/shadcn/avatar.tsx
7
+ function Avatar$1({ className, size = "default", ...props }) {
8
+ return /* @__PURE__ */ jsx(Avatar.Root, {
9
+ "data-slot": "avatar",
10
+ "data-size": size,
11
+ className: cn("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten", className),
12
+ ...props
13
+ });
14
+ }
15
+ function AvatarImage({ className, ...props }) {
16
+ return /* @__PURE__ */ jsx(Avatar.Image, {
17
+ "data-slot": "avatar-image",
18
+ className: cn("aspect-square size-full rounded-full object-cover", className),
19
+ ...props
20
+ });
21
+ }
22
+ function AvatarFallback({ className, ...props }) {
23
+ return /* @__PURE__ */ jsx(Avatar.Fallback, {
24
+ "data-slot": "avatar-fallback",
25
+ className: cn("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs", className),
26
+ ...props
27
+ });
28
+ }
29
+ function AvatarBadge({ className, ...props }) {
30
+ return /* @__PURE__ */ jsx("span", {
31
+ "data-slot": "avatar-badge",
32
+ className: cn("absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", className),
33
+ ...props
34
+ });
35
+ }
36
+ function AvatarGroup({ className, ...props }) {
37
+ return /* @__PURE__ */ jsx("div", {
38
+ "data-slot": "avatar-group",
39
+ className: cn("group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background", className),
40
+ ...props
41
+ });
42
+ }
43
+ function AvatarGroupCount({ className, ...props }) {
44
+ return /* @__PURE__ */ jsx("div", {
45
+ "data-slot": "avatar-group-count",
46
+ className: cn("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3", className),
47
+ ...props
48
+ });
49
+ }
50
+ export { Avatar$1 as Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage };
@@ -0,0 +1,28 @@
1
+ import * as React$1 from "react";
2
+ import { ContextMenu } from "@base-ui/react/context-menu";
3
+ declare function ContextMenu$1({ ...props }: ContextMenu.Root.Props): React$1.JSX.Element;
4
+ declare function ContextMenuTrigger({ className, ...props }: ContextMenu.Trigger.Props): React$1.JSX.Element;
5
+ declare function ContextMenuContent({ className, align, alignOffset, side, sideOffset, ...props }: ContextMenu.Popup.Props & Pick<ContextMenu.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): React$1.JSX.Element;
6
+ declare function ContextMenuGroup({ ...props }: ContextMenu.Group.Props): React$1.JSX.Element;
7
+ declare function ContextMenuLabel({ className, inset, ...props }: ContextMenu.GroupLabel.Props & {
8
+ inset?: boolean;
9
+ }): React$1.JSX.Element;
10
+ declare function ContextMenuItem({ className, inset, variant, ...props }: ContextMenu.Item.Props & {
11
+ inset?: boolean;
12
+ variant?: "default" | "destructive";
13
+ }): React$1.JSX.Element;
14
+ declare function ContextMenuSub({ ...props }: ContextMenu.SubmenuRoot.Props): React$1.JSX.Element;
15
+ declare function ContextMenuSubTrigger({ className, inset, children, ...props }: ContextMenu.SubmenuTrigger.Props & {
16
+ inset?: boolean;
17
+ }): React$1.JSX.Element;
18
+ declare function ContextMenuSubContent({ ...props }: React$1.ComponentProps<typeof ContextMenuContent>): React$1.JSX.Element;
19
+ declare function ContextMenuCheckboxItem({ className, children, checked, inset, ...props }: ContextMenu.CheckboxItem.Props & {
20
+ inset?: boolean;
21
+ }): React$1.JSX.Element;
22
+ declare function ContextMenuRadioGroup({ ...props }: ContextMenu.RadioGroup.Props): React$1.JSX.Element;
23
+ declare function ContextMenuRadioItem({ className, children, inset, ...props }: ContextMenu.RadioItem.Props & {
24
+ inset?: boolean;
25
+ }): React$1.JSX.Element;
26
+ declare function ContextMenuSeparator({ className, ...props }: ContextMenu.Separator.Props): React$1.JSX.Element;
27
+ declare function ContextMenuShortcut({ className, ...props }: React$1.ComponentProps<"span">): React$1.JSX.Element;
28
+ export { ContextMenu$1 as ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger };
@@ -0,0 +1,126 @@
1
+ "use client";
2
+ import { cn } from "cn";
3
+ import "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { CheckIcon, ChevronRightIcon } from "lucide-react";
6
+ import { ContextMenu } from "@base-ui/react/context-menu";
7
+ // src/vendor/shadcn/context-menu.tsx
8
+ function ContextMenu$1({ ...props }) {
9
+ return /* @__PURE__ */ jsx(ContextMenu.Root, {
10
+ "data-slot": "context-menu",
11
+ ...props
12
+ });
13
+ }
14
+ function ContextMenuTrigger({ className, ...props }) {
15
+ return /* @__PURE__ */ jsx(ContextMenu.Trigger, {
16
+ "data-slot": "context-menu-trigger",
17
+ className: cn("select-none", className),
18
+ ...props
19
+ });
20
+ }
21
+ function ContextMenuContent({ className, align = "start", alignOffset = 4, side = "right", sideOffset = 0, ...props }) {
22
+ return /* @__PURE__ */ jsx(ContextMenu.Portal, { children: /* @__PURE__ */ jsx(ContextMenu.Positioner, {
23
+ className: "isolate z-50 outline-none",
24
+ align,
25
+ alignOffset,
26
+ side,
27
+ sideOffset,
28
+ children: /* @__PURE__ */ jsx(ContextMenu.Popup, {
29
+ "data-slot": "context-menu-content",
30
+ className: cn("z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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", className),
31
+ ...props
32
+ })
33
+ }) });
34
+ }
35
+ function ContextMenuGroup({ ...props }) {
36
+ return /* @__PURE__ */ jsx(ContextMenu.Group, {
37
+ "data-slot": "context-menu-group",
38
+ ...props
39
+ });
40
+ }
41
+ function ContextMenuLabel({ className, inset, ...props }) {
42
+ return /* @__PURE__ */ jsx(ContextMenu.GroupLabel, {
43
+ "data-slot": "context-menu-label",
44
+ "data-inset": inset,
45
+ className: cn("px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:pl-8", className),
46
+ ...props
47
+ });
48
+ }
49
+ function ContextMenuItem({ className, inset, variant = "default", ...props }) {
50
+ return /* @__PURE__ */ jsx(ContextMenu.Item, {
51
+ "data-slot": "context-menu-item",
52
+ "data-inset": inset,
53
+ "data-variant": variant,
54
+ className: cn("group/context-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive", className),
55
+ ...props
56
+ });
57
+ }
58
+ function ContextMenuSub({ ...props }) {
59
+ return /* @__PURE__ */ jsx(ContextMenu.SubmenuRoot, {
60
+ "data-slot": "context-menu-sub",
61
+ ...props
62
+ });
63
+ }
64
+ function ContextMenuSubTrigger({ className, inset, children, ...props }) {
65
+ return /* @__PURE__ */ jsxs(ContextMenu.SubmenuTrigger, {
66
+ "data-slot": "context-menu-sub-trigger",
67
+ "data-inset": inset,
68
+ className: cn("flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
69
+ ...props,
70
+ children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })]
71
+ });
72
+ }
73
+ function ContextMenuSubContent({ ...props }) {
74
+ return /* @__PURE__ */ jsx(ContextMenuContent, {
75
+ "data-slot": "context-menu-sub-content",
76
+ className: "shadow-lg",
77
+ side: "right",
78
+ ...props
79
+ });
80
+ }
81
+ function ContextMenuCheckboxItem({ className, children, checked, inset, ...props }) {
82
+ return /* @__PURE__ */ jsxs(ContextMenu.CheckboxItem, {
83
+ "data-slot": "context-menu-checkbox-item",
84
+ "data-inset": inset,
85
+ className: cn("relative flex 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 data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
86
+ checked,
87
+ ...props,
88
+ children: [/* @__PURE__ */ jsx("span", {
89
+ className: "pointer-events-none absolute right-2",
90
+ children: /* @__PURE__ */ jsx(ContextMenu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
91
+ }), children]
92
+ });
93
+ }
94
+ function ContextMenuRadioGroup({ ...props }) {
95
+ return /* @__PURE__ */ jsx(ContextMenu.RadioGroup, {
96
+ "data-slot": "context-menu-radio-group",
97
+ ...props
98
+ });
99
+ }
100
+ function ContextMenuRadioItem({ className, children, inset, ...props }) {
101
+ return /* @__PURE__ */ jsxs(ContextMenu.RadioItem, {
102
+ "data-slot": "context-menu-radio-item",
103
+ "data-inset": inset,
104
+ className: cn("relative flex 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 data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
105
+ ...props,
106
+ children: [/* @__PURE__ */ jsx("span", {
107
+ className: "pointer-events-none absolute right-2",
108
+ children: /* @__PURE__ */ jsx(ContextMenu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
109
+ }), children]
110
+ });
111
+ }
112
+ function ContextMenuSeparator({ className, ...props }) {
113
+ return /* @__PURE__ */ jsx(ContextMenu.Separator, {
114
+ "data-slot": "context-menu-separator",
115
+ className: cn("-mx-1 my-1 h-px bg-border", className),
116
+ ...props
117
+ });
118
+ }
119
+ function ContextMenuShortcut({ className, ...props }) {
120
+ return /* @__PURE__ */ jsx("span", {
121
+ "data-slot": "context-menu-shortcut",
122
+ className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground", className),
123
+ ...props
124
+ });
125
+ }
126
+ export { ContextMenu$1 as ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger };
@@ -12,10 +12,12 @@ import { CascaderBack, CascaderBreadcrumb, CascaderInput, CascaderNav, CascaderV
12
12
  import { CascaderVirtualItems } from "../vendor/reui.io/cascader/cascader-virtual.mjs";
13
13
  import { Frame as Frame$1, FrameDescription, FrameFooter, FrameHeader, FramePanel, FrameTitle } from "../vendor/reui.io/frame.mjs";
14
14
  import { Timeline as Timeline$1, TimelineContent, TimelineDate, TimelineHeader, TimelineIndicator, TimelineItem, TimelineSeparator, TimelineTitle } from "../vendor/reui.io/timeline.mjs";
15
+ import { Avatar as Avatar$1, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage } from "../vendor/shadcn/avatar.mjs";
15
16
  import { Breadcrumb as Breadcrumb$1, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "../vendor/shadcn/breadcrumb.mjs";
16
17
  import { Separator } from "../vendor/shadcn/separator.mjs";
17
18
  import { ButtonGroup as ButtonGroup$1, ButtonGroupSeparator, ButtonGroupText } from "../vendor/shadcn/button-group.mjs";
18
19
  import { ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxValue } from "../vendor/shadcn/combobox.mjs";
20
+ import { ContextMenu as ContextMenu$1, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger } from "../vendor/shadcn/context-menu.mjs";
19
21
  import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "../vendor/shadcn/dropdown-menu.mjs";
20
22
  import { Label } from "../vendor/shadcn/label.mjs";
21
23
  import { Field as Field$1, FieldDescription, FieldError, FieldLabel } from "../vendor/shadcn/field.mjs";
@@ -58,7 +60,7 @@ export declare const Kbd: typeof Kbd$1 & {
58
60
  export declare const Tabs: typeof Tabs$1 & {
59
61
  List: typeof TabsList;
60
62
  Trigger: typeof TabsTrigger;
61
- Content: typeof TabsContent;
63
+ Panel: typeof TabsContent;
62
64
  };
63
65
  /** https://coss.com/ui/docs/components/card */
64
66
  export declare const Card: typeof Card$1 & {
@@ -109,17 +111,17 @@ export declare const Radio: typeof RadioGroupItem & {
109
111
  export declare const Select: typeof import("@base-ui/react").SelectRoot & {
110
112
  Trigger: typeof SelectTrigger;
111
113
  Value: typeof SelectValue;
112
- Content: typeof SelectContent;
113
- Separator: typeof SelectSeparator;
114
+ Popup: typeof SelectContent;
114
115
  Group: typeof SelectGroup;
116
+ Separator: typeof SelectSeparator;
115
117
  Label: typeof SelectLabel;
116
118
  Item: typeof SelectItem;
117
119
  };
118
120
  /** https://coss.com/ui/docs/components/drawer */
119
121
  export declare const Drawer: typeof Drawer$1 & {
120
122
  Trigger: typeof DrawerTrigger;
121
- Close: typeof DrawerClose;
122
123
  Popup: typeof DrawerPopup;
124
+ Close: typeof DrawerClose;
123
125
  Header: typeof DrawerHeader;
124
126
  Panel: typeof DrawerPanel;
125
127
  Footer: typeof DrawerFooter;
@@ -129,8 +131,8 @@ export declare const Drawer: typeof Drawer$1 & {
129
131
  /** https://coss.com/ui/docs/components/dialog */
130
132
  export declare const Dialog: (<Payload>(props: DialogPrimitive.Root.Props<Payload>) => React.JSX.Element) & {
131
133
  Trigger: typeof DialogTrigger;
132
- Close: typeof DialogClose;
133
134
  Popup: typeof DialogPopup;
135
+ Close: typeof DialogClose;
134
136
  Header: typeof DialogHeader;
135
137
  Panel: typeof DialogPanel;
136
138
  Footer: typeof DialogFooter;
@@ -141,12 +143,12 @@ export declare const Dialog: (<Payload>(props: DialogPrimitive.Root.Props<Payloa
141
143
  export declare const Tooltip: typeof Tooltip$1 & {
142
144
  Provider: typeof TooltipProvider;
143
145
  Trigger: typeof TooltipTrigger;
144
- Content: typeof TooltipContent;
146
+ Popup: typeof TooltipContent;
145
147
  };
146
148
  /** https://ui.shadcn.com/docs/components/base/popover */
147
149
  export declare const Popover: typeof Popover$1 & {
148
150
  Trigger: typeof PopoverTrigger;
149
- Content: typeof PopoverContent;
151
+ Popup: typeof PopoverContent;
150
152
  Title: typeof PopoverTitle;
151
153
  Description: typeof PopoverDescription;
152
154
  };
@@ -181,7 +183,7 @@ export declare const Cascader: typeof Cascader$1 & {
181
183
  /** https://ui.shadcn.com/docs/components/base/dropdown-menu */
182
184
  export declare const Dropdown: typeof DropdownMenu & {
183
185
  Trigger: typeof DropdownMenuTrigger;
184
- Content: typeof DropdownMenuContent;
186
+ Popup: typeof DropdownMenuContent;
185
187
  Sub: typeof DropdownMenuSub;
186
188
  SubTrigger: typeof DropdownMenuSubTrigger;
187
189
  SubContent: typeof DropdownMenuSubContent;
@@ -196,13 +198,13 @@ export declare const Dropdown: typeof DropdownMenu & {
196
198
  };
197
199
  /** https://ui.shadcn.com/docs/components/base/combobox */
198
200
  export declare const Combobox: typeof import("@base-ui/react").ComboboxRoot & {
199
- Content: typeof ComboboxContent;
201
+ Popup: typeof ComboboxContent;
200
202
  Empty: typeof ComboboxEmpty;
201
203
  List: typeof ComboboxList;
202
204
  Input: typeof ComboboxInput;
205
+ Value: typeof ComboboxValue;
203
206
  ChipsInput: typeof ComboboxChipsInput;
204
207
  Chips: typeof ComboboxChips;
205
- Value: typeof ComboboxValue;
206
208
  Chip: typeof ComboboxChip;
207
209
  Group: typeof ComboboxGroup;
208
210
  GroupLabel: typeof ComboboxLabel;
@@ -236,11 +238,27 @@ export declare const Breadcrumb: typeof Breadcrumb$1 & {
236
238
  Ellipsis: typeof BreadcrumbEllipsis;
237
239
  Page: typeof BreadcrumbPage;
238
240
  };
241
+ /** https://ui.shadcn.com/docs/components/base/context-menu */
242
+ export declare const ContextMenu: typeof ContextMenu$1 & {
243
+ Trigger: typeof ContextMenuTrigger;
244
+ Popup: typeof ContextMenuContent;
245
+ Sub: typeof ContextMenuSub;
246
+ SubTrigger: typeof ContextMenuSubTrigger;
247
+ SubContent: typeof ContextMenuSubContent;
248
+ Group: typeof ContextMenuGroup;
249
+ GroupLabel: typeof ContextMenuLabel;
250
+ Separator: typeof ContextMenuSeparator;
251
+ Item: typeof ContextMenuItem;
252
+ Shortcut: typeof ContextMenuShortcut;
253
+ RadioItem: typeof ContextMenuRadioItem;
254
+ RadioGroup: typeof ContextMenuRadioGroup;
255
+ CheckboxItem: typeof ContextMenuCheckboxItem;
256
+ };
239
257
  /** https://coss.com/ui/docs/components/alert-dialog */
240
258
  export declare const AlertDialog: typeof AlertDialogPrimitive.Root & {
241
259
  Trigger: typeof AlertDialogTrigger;
242
- Close: typeof AlertDialogClose;
243
260
  Popup: typeof AlertDialogPopup;
261
+ Close: typeof AlertDialogClose;
244
262
  Header: typeof AlertDialogHeader;
245
263
  Footer: typeof AlertDialogFooter;
246
264
  Title: typeof AlertDialogTitle;
@@ -259,4 +277,12 @@ export declare const InputGroup: typeof InputGroup$1 & {
259
277
  Textarea: typeof InputGroupTextarea;
260
278
  Button: typeof InputGroupButton;
261
279
  };
280
+ /** https://ui.shadcn.com/docs/components/base/avatar */
281
+ export declare const Avatar: typeof Avatar$1 & {
282
+ Image: typeof AvatarImage;
283
+ Badge: typeof AvatarBadge;
284
+ Fallback: typeof AvatarFallback;
285
+ Group: typeof AvatarGroup;
286
+ GroupCount: typeof AvatarGroupCount;
287
+ };
262
288
  export { Badge, Button, Calendar, Carousel, type CascaderChangeDetails, type CascaderLabels, type CascaderMode, type CascaderNode, type CascaderProps, type CascaderSingleProps, Checkbox, DatePicker, type DateRange, DateRangePicker, Dropzone, 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, formatBytes, toast, useDropzone, type useLightbox, useSidebar };
@@ -14,12 +14,14 @@ import { CascaderBack, CascaderBreadcrumb, CascaderInput, CascaderNav, CascaderV
14
14
  import { CascaderVirtualItems } from "../vendor/reui.io/cascader/cascader-virtual.mjs";
15
15
  import { Frame as Frame$1, FrameDescription, FrameFooter, FrameHeader, FramePanel, FrameTitle } from "../vendor/reui.io/frame.mjs";
16
16
  import { Timeline as Timeline$1, TimelineContent, TimelineDate, TimelineHeader, TimelineIndicator, TimelineItem, TimelineSeparator, TimelineTitle } from "../vendor/reui.io/timeline.mjs";
17
+ import { Avatar as Avatar$1, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage } from "../vendor/shadcn/avatar.mjs";
17
18
  import { Breadcrumb as Breadcrumb$1, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "../vendor/shadcn/breadcrumb.mjs";
18
19
  import { Separator } from "../vendor/shadcn/separator.mjs";
19
20
  import { ButtonGroup as ButtonGroup$1, ButtonGroupSeparator, ButtonGroupText } from "../vendor/shadcn/button-group.mjs";
20
21
  import { Input } from "../vendor/shadcn/input.mjs";
21
22
  import { Textarea } from "../vendor/shadcn/textarea.mjs";
22
23
  import { Combobox as Combobox$1, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxValue } from "../vendor/shadcn/combobox.mjs";
24
+ import { ContextMenu as ContextMenu$1, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger } from "../vendor/shadcn/context-menu.mjs";
23
25
  import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "../vendor/shadcn/dropdown-menu.mjs";
24
26
  import { Field as Field$1, FieldDescription, FieldError, FieldLabel } from "../vendor/shadcn/field.mjs";
25
27
  import { Label } from "../vendor/shadcn/label.mjs";
@@ -53,7 +55,7 @@ const Kbd = /* @__PURE__ */ Object.assign(Kbd$1, { Group: KbdGroup });
53
55
  const Tabs = /* @__PURE__ */ Object.assign(Tabs$1, {
54
56
  List: TabsList,
55
57
  Trigger: TabsTrigger,
56
- Content: TabsContent
58
+ Panel: TabsContent
57
59
  });
58
60
  /** https://coss.com/ui/docs/components/card */
59
61
  const Card = /* @__PURE__ */ Object.assign(Card$1, {
@@ -102,17 +104,17 @@ const Radio = /* @__PURE__ */ Object.assign(RadioGroupItem, { Group: RadioGroup
102
104
  const Select = /* @__PURE__ */ Object.assign(Select$1, {
103
105
  Trigger: SelectTrigger,
104
106
  Value: SelectValue,
105
- Content: SelectContent,
106
- Separator: SelectSeparator,
107
+ Popup: SelectContent,
107
108
  Group: SelectGroup,
109
+ Separator: SelectSeparator,
108
110
  Label: SelectLabel,
109
111
  Item: SelectItem
110
112
  });
111
113
  /** https://coss.com/ui/docs/components/drawer */
112
114
  const Drawer = /* @__PURE__ */ Object.assign(Drawer$1, {
113
115
  Trigger: DrawerTrigger,
114
- Close: DrawerClose,
115
116
  Popup: DrawerPopup,
117
+ Close: DrawerClose,
116
118
  Header: DrawerHeader,
117
119
  Panel: DrawerPanel,
118
120
  Footer: DrawerFooter,
@@ -122,8 +124,8 @@ const Drawer = /* @__PURE__ */ Object.assign(Drawer$1, {
122
124
  /** https://coss.com/ui/docs/components/dialog */
123
125
  const Dialog = /* @__PURE__ */ Object.assign(Dialog$1, {
124
126
  Trigger: DialogTrigger,
125
- Close: DialogClose,
126
127
  Popup: DialogPopup,
128
+ Close: DialogClose,
127
129
  Header: DialogHeader,
128
130
  Panel: DialogPanel,
129
131
  Footer: DialogFooter,
@@ -134,12 +136,12 @@ const Dialog = /* @__PURE__ */ Object.assign(Dialog$1, {
134
136
  const Tooltip = /* @__PURE__ */ Object.assign(Tooltip$1, {
135
137
  Provider: TooltipProvider,
136
138
  Trigger: TooltipTrigger,
137
- Content: TooltipContent
139
+ Popup: TooltipContent
138
140
  });
139
141
  /** https://ui.shadcn.com/docs/components/base/popover */
140
142
  const Popover = /* @__PURE__ */ Object.assign(Popover$1, {
141
143
  Trigger: PopoverTrigger,
142
- Content: PopoverContent,
144
+ Popup: PopoverContent,
143
145
  Title: PopoverTitle,
144
146
  Description: PopoverDescription
145
147
  });
@@ -174,7 +176,7 @@ const Cascader = /* @__PURE__ */ Object.assign(Cascader$1, {
174
176
  /** https://ui.shadcn.com/docs/components/base/dropdown-menu */
175
177
  const Dropdown = /* @__PURE__ */ Object.assign(DropdownMenu, {
176
178
  Trigger: DropdownMenuTrigger,
177
- Content: DropdownMenuContent,
179
+ Popup: DropdownMenuContent,
178
180
  Sub: DropdownMenuSub,
179
181
  SubTrigger: DropdownMenuSubTrigger,
180
182
  SubContent: DropdownMenuSubContent,
@@ -189,13 +191,13 @@ const Dropdown = /* @__PURE__ */ Object.assign(DropdownMenu, {
189
191
  });
190
192
  /** https://ui.shadcn.com/docs/components/base/combobox */
191
193
  const Combobox = /* @__PURE__ */ Object.assign(Combobox$1, {
192
- Content: ComboboxContent,
194
+ Popup: ComboboxContent,
193
195
  Empty: ComboboxEmpty,
194
196
  List: ComboboxList,
195
197
  Input: ComboboxInput,
198
+ Value: ComboboxValue,
196
199
  ChipsInput: ComboboxChipsInput,
197
200
  Chips: ComboboxChips,
198
- Value: ComboboxValue,
199
201
  Chip: ComboboxChip,
200
202
  Group: ComboboxGroup,
201
203
  GroupLabel: ComboboxLabel,
@@ -229,11 +231,27 @@ const Breadcrumb = /* @__PURE__ */ Object.assign(Breadcrumb$1, {
229
231
  Ellipsis: BreadcrumbEllipsis,
230
232
  Page: BreadcrumbPage
231
233
  });
234
+ /** https://ui.shadcn.com/docs/components/base/context-menu */
235
+ const ContextMenu = /* @__PURE__ */ Object.assign(ContextMenu$1, {
236
+ Trigger: ContextMenuTrigger,
237
+ Popup: ContextMenuContent,
238
+ Sub: ContextMenuSub,
239
+ SubTrigger: ContextMenuSubTrigger,
240
+ SubContent: ContextMenuSubContent,
241
+ Group: ContextMenuGroup,
242
+ GroupLabel: ContextMenuLabel,
243
+ Separator: ContextMenuSeparator,
244
+ Item: ContextMenuItem,
245
+ Shortcut: ContextMenuShortcut,
246
+ RadioItem: ContextMenuRadioItem,
247
+ RadioGroup: ContextMenuRadioGroup,
248
+ CheckboxItem: ContextMenuCheckboxItem
249
+ });
232
250
  /** https://coss.com/ui/docs/components/alert-dialog */
233
251
  const AlertDialog = /* @__PURE__ */ Object.assign(AlertDialog$1, {
234
252
  Trigger: AlertDialogTrigger,
235
- Close: AlertDialogClose,
236
253
  Popup: AlertDialogPopup,
254
+ Close: AlertDialogClose,
237
255
  Header: AlertDialogHeader,
238
256
  Footer: AlertDialogFooter,
239
257
  Title: AlertDialogTitle,
@@ -252,4 +270,12 @@ const InputGroup = /* @__PURE__ */ Object.assign(InputGroup$1, {
252
270
  Textarea: InputGroupTextarea,
253
271
  Button: InputGroupButton
254
272
  });
255
- export { AlertDialog, Badge, Breadcrumb, Button, ButtonGroup, Calendar, Card, Carousel, Cascader, Checkbox, Combobox, DatePicker, DateRangePicker, Dialog, Drawer, Dropdown, Dropzone, Empty, Field, Form, Frame, IconSwap, Image, Input, InputGroup, JsonViewer, Kbd, Label, Lightbox, Pagination, Popover, Progress, Radio, ScrollArea, Select, Separator, Sidebar, Skeleton, Spinner, Switch, Table, Tabs, Textarea, TimePicker, Timeline, Toaster as ToastProvider, Tooltip, formatBytes, toast, useDropzone, useSidebar };
273
+ /** https://ui.shadcn.com/docs/components/base/avatar */
274
+ const Avatar = /* @__PURE__ */ Object.assign(Avatar$1, {
275
+ Image: AvatarImage,
276
+ Badge: AvatarBadge,
277
+ Fallback: AvatarFallback,
278
+ Group: AvatarGroup,
279
+ GroupCount: AvatarGroupCount
280
+ });
281
+ export { AlertDialog, Avatar, Badge, Breadcrumb, Button, ButtonGroup, Calendar, Card, Carousel, Cascader, Checkbox, Combobox, ContextMenu, DatePicker, DateRangePicker, Dialog, Drawer, Dropdown, Dropzone, Empty, Field, Form, Frame, IconSwap, Image, Input, InputGroup, JsonViewer, Kbd, Label, Lightbox, Pagination, Popover, Progress, Radio, ScrollArea, Select, Separator, Sidebar, Skeleton, Spinner, Switch, Table, Tabs, Textarea, TimePicker, Timeline, Toaster as ToastProvider, Tooltip, formatBytes, toast, useDropzone, useSidebar };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deftui/react",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/KiriRainCat/deftui.git",
@@ -38,10 +38,10 @@
38
38
  "cn": "^0.5.2",
39
39
  "date-fns": "^4.4.0",
40
40
  "embla-carousel-react": "^8.6.0",
41
- "lucide-react": "^1.70.0",
42
- "motion": "^14.10.1",
43
- "radashi": "^13.0.2",
44
- "react-dropzone": "^20.1.4",
41
+ "lucide-react": "^1.72.0",
42
+ "motion": "^14.13.0",
43
+ "radashi": "^13.0.4",
44
+ "react-dropzone": "^20.2.0",
45
45
  "tw-animate-css": "^1.4.0"
46
46
  },
47
47
  "devDependencies": {