@deftui/react 0.1.7 → 0.2.1

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.
@@ -25,7 +25,7 @@ shadcn 组件使用 `components.json` 中的 `base-vega` 风格和 Lucide 图标
25
25
  | `card` | [shadcn/card.tsx](shadcn/card.tsx) | [Card](https://ui.shadcn.com/docs/components/base/card) | — |
26
26
  | `carousel` | [shadcn/carousel.tsx](shadcn/carousel.tsx) | [Carousel](https://ui.shadcn.com/docs/components/base/carousel) | — |
27
27
  | `checkbox` | [shadcn/checkbox.tsx](shadcn/checkbox.tsx) | [Checkbox](https://ui.shadcn.com/docs/components/base/checkbox) | — |
28
- | `combobox` | [shadcn/combobox.tsx](shadcn/combobox.tsx) | [Combobox](https://ui.shadcn.com/docs/components/base/combobox) | 额外导出 `createComboboxItems` 及其类型 |
28
+ | `combobox` | [shadcn/combobox.tsx](shadcn/combobox.tsx) | [Combobox](https://ui.shadcn.com/docs/components/base/combobox) | 额外导出 `createComboboxItems` 及其类型;将选中标记移至左侧 |
29
29
  | `dialog` | [shadcn/dialog.tsx](shadcn/dialog.tsx) | [Dialog](https://ui.shadcn.com/docs/components/base/dialog) | 额外导出 `createDialogHandle` 及其类型 |
30
30
  | `direction` | [shadcn/direction.tsx](shadcn/direction.tsx) | [Direction](https://ui.shadcn.com/docs/components/base/direction) | — |
31
31
  | `drawer` | [shadcn/drawer.tsx](shadcn/drawer.tsx) | [Drawer](https://ui.shadcn.com/docs/components/base/drawer) | 额外导出 `createDrawerHandle` 及其类型 |
@@ -13,10 +13,11 @@ declare function ComboboxGroup({ className, ...props }: Combobox.Group.Props): R
13
13
  declare function ComboboxLabel({ className, ...props }: Combobox.GroupLabel.Props): React$1.JSX.Element;
14
14
  declare function ComboboxCollection({ ...props }: Combobox.Collection.Props): React$1.JSX.Element;
15
15
  declare function ComboboxEmpty({ className, ...props }: Combobox.Empty.Props): React$1.JSX.Element;
16
+ declare function ComboboxSeparator({ className, ...props }: Combobox.Separator.Props): React$1.JSX.Element;
16
17
  declare function ComboboxChips({ className, ...props }: React$1.ComponentPropsWithRef<typeof Combobox.Chips> & Combobox.Chips.Props): React$1.JSX.Element;
17
18
  declare function ComboboxChip({ className, children, showRemove, ...props }: Combobox.Chip.Props & {
18
19
  showRemove?: boolean;
19
20
  }): React$1.JSX.Element;
20
21
  declare function ComboboxChipsInput({ className, ...props }: Combobox.Input.Props): React$1.JSX.Element;
21
22
  export declare function createComboboxItems<Item, Value extends ComboboxPrimitiveValue>(...args: Parameters<typeof Combobox.createItems<Item, Value>>): ReturnType<typeof Combobox.createItems<Item, Value>>;
22
- export { ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, type ComboboxItemCollection, ComboboxLabel, ComboboxList, type ComboboxPrimitiveValue$1 as ComboboxPrimitiveValue, ComboboxValue, type CreateComboboxItemsOptions };
23
+ export { ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, type ComboboxItemCollection, ComboboxLabel, ComboboxList, type ComboboxPrimitiveValue$1 as ComboboxPrimitiveValue, ComboboxSeparator, ComboboxValue, type CreateComboboxItemsOptions };
@@ -83,10 +83,10 @@ function ComboboxList({ className, ...props }) {
83
83
  function ComboboxItem({ className, children, ...props }) {
84
84
  return /* @__PURE__ */ jsxs(Combobox.Item, {
85
85
  "data-slot": "combobox-item",
86
- className: cn("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
86
+ className: cn("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
87
87
  ...props,
88
88
  children: [children, /* @__PURE__ */ jsx(Combobox.ItemIndicator, {
89
- render: /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
89
+ render: /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute top-1/2 left-2 flex size-4 -translate-y-1/2 items-center justify-center" }),
90
90
  children: /* @__PURE__ */ jsx(CheckIcon, { className: "pointer-events-none" })
91
91
  })]
92
92
  });
@@ -118,6 +118,13 @@ function ComboboxEmpty({ className, ...props }) {
118
118
  ...props
119
119
  });
120
120
  }
121
+ function ComboboxSeparator({ className, ...props }) {
122
+ return /* @__PURE__ */ jsx(Combobox.Separator, {
123
+ "data-slot": "combobox-separator",
124
+ className: cn("-mx-1 my-1 h-px bg-border", className),
125
+ ...props
126
+ });
127
+ }
121
128
  function ComboboxChips({ className, ...props }) {
122
129
  return /* @__PURE__ */ jsx(Combobox.Chips, {
123
130
  "data-slot": "combobox-chips",
@@ -151,4 +158,4 @@ function ComboboxChipsInput({ className, ...props }) {
151
158
  function createComboboxItems(...args) {
152
159
  return Combobox.createItems(...args);
153
160
  }
154
- export { Combobox$1 as Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxTrigger, ComboboxValue, createComboboxItems };
161
+ export { Combobox$1 as Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, createComboboxItems };
@@ -6,7 +6,7 @@ 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, ComboboxItemCollection, ComboboxLabel, ComboboxList, ComboboxPrimitiveValue, ComboboxValue, CreateComboboxItemsOptions, createComboboxItems } from "../vendor/shadcn/combobox.mjs";
9
+ import { ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxItemCollection, ComboboxLabel, ComboboxList, ComboboxPrimitiveValue, ComboboxSeparator, ComboboxValue, CreateComboboxItemsOptions, createComboboxItems } from "../vendor/shadcn/combobox.mjs";
10
10
  import { Dialog as Dialog$1, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHandle, DialogHeader, DialogTitle, DialogTrigger, createDialogHandle } from "../vendor/shadcn/dialog.mjs";
11
11
  import { Drawer as Drawer$1, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHandle, DrawerHeader, DrawerTitle, DrawerTrigger, createDrawerHandle } from "../vendor/shadcn/drawer.mjs";
12
12
  import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "../vendor/shadcn/dropdown-menu.mjs";
@@ -148,6 +148,7 @@ export declare const Combobox: typeof import("@base-ui/react").ComboboxRoot & {
148
148
  GroupLabel: typeof ComboboxLabel;
149
149
  GroupCollection: typeof ComboboxCollection;
150
150
  Item: typeof ComboboxItem;
151
+ Separator: typeof ComboboxSeparator;
151
152
  };
152
153
  export declare const Progress: typeof Progress$1 & {
153
154
  Label: typeof ProgressLabel;
@@ -10,7 +10,7 @@ import { Card as Card$1, CardAction, CardContent, CardDescription, CardFooter, C
10
10
  import { Input } from "../vendor/shadcn/input.mjs";
11
11
  import { Textarea } from "../vendor/shadcn/textarea.mjs";
12
12
  import { InputGroup as InputGroup$1, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea } from "../vendor/shadcn/input-group.mjs";
13
- import { Combobox as Combobox$1, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxValue, createComboboxItems } from "../vendor/shadcn/combobox.mjs";
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
14
  import { Dialog as Dialog$1, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, createDialogHandle } from "../vendor/shadcn/dialog.mjs";
15
15
  import { Drawer as Drawer$1, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, createDrawerHandle } from "../vendor/shadcn/drawer.mjs";
16
16
  import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "../vendor/shadcn/dropdown-menu.mjs";
@@ -141,7 +141,8 @@ const Combobox = /* @__PURE__ */ Object.assign(Combobox$1, {
141
141
  Group: ComboboxGroup,
142
142
  GroupLabel: ComboboxLabel,
143
143
  GroupCollection: ComboboxCollection,
144
- Item: ComboboxItem
144
+ Item: ComboboxItem,
145
+ Separator: ComboboxSeparator
145
146
  });
146
147
  const Progress = /* @__PURE__ */ Object.assign(Progress$1, {
147
148
  Label: ProgressLabel,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deftui/react",
3
- "version": "0.1.7",
3
+ "version": "0.2.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/KiriRainCat/deftui.git",