vxui-react 1.2.6 → 1.2.8

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.
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
2
2
  import * as DialogPrimitive from '@radix-ui/react-dialog';
3
3
  export type DialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
4
4
  export type DialogPadding = 'none' | 'sm' | 'md' | 'lg';
5
+ export type DialogPlacement = 'center' | 'top' | 'right' | 'bottom' | 'left' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-half' | 'right-half' | 'bottom-half' | 'left-half';
5
6
  export interface DialogProps extends Pick<DialogPrimitive.DialogProps, 'defaultOpen' | 'onOpenChange' | 'open'> {
6
7
  trigger: ReactNode;
7
8
  title: string;
@@ -13,9 +14,16 @@ export interface DialogProps extends Pick<DialogPrimitive.DialogProps, 'defaultO
13
14
  size?: DialogSize;
14
15
  /** Inner padding preset. Default: 'md' */
15
16
  padding?: DialogPadding;
16
- /** Allow the body to scroll when content overflows. Default: false */
17
+ /** Dialog placement preset. Default: 'center' */
18
+ placement?: DialogPlacement;
19
+ /** Allow the body to scroll when content overflows. Default: true */
17
20
  scrollable?: boolean;
18
21
  /** Show the close (×) button. Default: true */
19
22
  closable?: boolean;
20
23
  }
21
- export declare function Dialog({ trigger, title, description, children, footer, className, size, padding, scrollable, closable, ...props }: DialogProps): import("react/jsx-runtime").JSX.Element;
24
+ export declare function Dialog({ trigger, title, description, children, footer, className, size, padding, placement, scrollable, closable, ...props }: DialogProps): import("react/jsx-runtime").JSX.Element;
25
+ /**
26
+ * Wraps any child element so that clicking it closes the parent Dialog.
27
+ * Usage: <DialogClose asChild><Button>Cancel</Button></DialogClose>
28
+ */
29
+ export declare const DialogClose: import('react').ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import('react').RefAttributes<HTMLButtonElement>>;
@@ -1,7 +1,22 @@
1
- import { SelectHTMLAttributes } from 'react';
2
- export interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
1
+ export interface SelectOption {
2
+ value: string;
3
+ label: string;
4
+ disabled?: boolean;
5
+ }
6
+ export interface SelectProps {
7
+ options: SelectOption[];
8
+ value?: string;
9
+ defaultValue?: string;
10
+ onChange?: (value: string | undefined) => void;
11
+ placeholder?: string;
12
+ searchPlaceholder?: string;
3
13
  label?: string;
4
14
  hint?: string;
5
- placeholder?: string;
15
+ error?: string;
16
+ disabled?: boolean;
17
+ clearable?: boolean;
18
+ emptyText?: string;
19
+ searchable?: boolean | number;
20
+ className?: string;
6
21
  }
7
- export declare function Select({ className, label, hint, placeholder, children, ...props }: SelectProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare function Select({ options, value: controlledValue, defaultValue, onChange, placeholder, searchPlaceholder, label, hint, error, disabled, clearable, emptyText, searchable, className, }: SelectProps): import("react/jsx-runtime").JSX.Element;
@@ -9,7 +9,8 @@ export type { ShellProps, ShellSidebarProps, ShellNavProps, ShellNavSectionProps
9
9
  export { Badge } from '../components/Badge';
10
10
  export { Button } from '../components/Button';
11
11
  export { Card, CardContent, CardDescription, CardHeader, CardTitle } from '../components/Card';
12
- export { Dialog } from '../components/Dialog';
12
+ export { Dialog, DialogClose } from '../components/Dialog';
13
+ export type { DialogProps, DialogSize, DialogPadding, DialogPlacement } from '../components/Dialog';
13
14
  export { Input } from '../components/Input';
14
15
  export { Switch } from '../components/Switch';
15
16
  export { Tabs, TabsContent, TabsList, TabsTrigger } from '../components/Tabs';
@@ -21,7 +22,7 @@ export type { TextProps } from '../components/Text';
21
22
  export { Heading } from '../components/Heading';
22
23
  export type { HeadingProps } from '../components/Heading';
23
24
  export { Select } from '../components/Select';
24
- export type { SelectProps } from '../components/Select';
25
+ export type { SelectProps, SelectOption } from '../components/Select';
25
26
  export { Checkbox } from '../components/Checkbox';
26
27
  export type { CheckboxProps } from '../components/Checkbox';
27
28
  export { SegmentedControl } from '../components/SegmentedControl';
@@ -80,8 +81,6 @@ export { Calendar } from '../components/Calendar';
80
81
  export type { CalendarProps } from '../components/Calendar';
81
82
  export { DatePicker } from '../components/DatePicker';
82
83
  export type { DatePickerProps } from '../components/DatePicker';
83
- export { Combobox } from '../components/Combobox';
84
- export type { ComboboxProps, ComboboxOption } from '../components/Combobox';
85
84
  export { MultiSelect } from '../components/MultiSelect';
86
85
  export type { MultiSelectProps, MultiSelectOption } from '../components/MultiSelect';
87
86
  export { TimePicker } from '../components/TimePicker';