@tomny-dev/uzi 0.1.8 → 0.1.9-pr.2.1.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.
package/dist/index.d.cts CHANGED
@@ -168,29 +168,63 @@ declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttri
168
168
  type CheckboxProps = React.InputHTMLAttributes<HTMLInputElement>;
169
169
  declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
170
170
 
171
- interface DropdownOption {
171
+ type MultiSelectOption = {
172
172
  label: string;
173
173
  value: string;
174
+ disabled?: boolean;
175
+ };
176
+ type MultiSelectProps = {
177
+ options: MultiSelectOption[];
178
+ value: string[];
179
+ onChange: (value: string[]) => void;
180
+ placeholder?: string;
181
+ fullWidth?: boolean;
182
+ maxVisibleValues?: number;
183
+ className?: string;
184
+ disabled?: boolean;
185
+ name?: string;
186
+ "aria-label"?: string;
187
+ "aria-labelledby"?: string;
188
+ };
189
+ declare const MultiSelect: React.ForwardRefExoticComponent<MultiSelectProps & React.RefAttributes<HTMLButtonElement>>;
190
+
191
+ type SelectOption = {
192
+ label: string;
193
+ value: string;
194
+ disabled?: boolean;
195
+ };
196
+ type SelectProps = Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "onChange" | "multiple"> & {
197
+ options: SelectOption[];
198
+ value: string;
199
+ onChange: (value: string) => void;
200
+ placeholder?: string;
201
+ allowEmptyOption?: boolean;
202
+ fullWidth?: boolean;
203
+ };
204
+ declare const Select: React.ForwardRefExoticComponent<Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "onChange" | "multiple"> & {
205
+ options: SelectOption[];
206
+ value: string;
207
+ onChange: (value: string) => void;
208
+ placeholder?: string;
209
+ allowEmptyOption?: boolean;
210
+ fullWidth?: boolean;
211
+ } & React.RefAttributes<HTMLSelectElement>>;
212
+
213
+ interface DropdownOption extends SelectOption {
174
214
  }
175
- interface DropdownProps {
215
+ interface DropdownProps extends Omit<SelectProps, "allowEmptyOption" | "fullWidth" | "placeholder" | "options"> {
176
216
  /** List of options to display in the menu. */
177
217
  options: DropdownOption[];
178
- /** Currently selected value. Use empty string for "no selection". */
179
- value: string;
180
- /** Called when the user selects an option. */
181
- onChange: (value: string) => void;
182
218
  /** Label shown when no option is selected. Defaults to "All". */
183
219
  placeholder?: string;
184
- /** Additional class name for the wrapper element. */
185
- className?: string;
186
220
  /** Whether to show the placeholder as a clearable option. Defaults to true. */
187
221
  allowClear?: boolean;
188
- /** Associates the trigger button with an external label element via its id. */
189
- "aria-labelledby"?: string;
190
- /** Provides an accessible label directly on the trigger button. */
191
- "aria-label"?: string;
192
222
  }
193
- declare function Dropdown({ options, value, onChange, placeholder, className, allowClear, "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel, }: DropdownProps): react_jsx_runtime.JSX.Element;
223
+ /**
224
+ * @deprecated Use Select for value selection and DropdownMenu for action menus.
225
+ * Dropdown remains as a compatibility alias during migration.
226
+ */
227
+ declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLSelectElement>>;
194
228
 
195
229
  declare function DropdownMenu(props: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): react_jsx_runtime.JSX.Element;
196
230
  declare function DropdownMenuTrigger(props: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
@@ -349,4 +383,25 @@ declare function useTheme(): ThemeContextValue;
349
383
 
350
384
  declare function cx(...values: Array<string | false | null | undefined>): string;
351
385
 
352
- export { Alert, type AlertProps, type AlertTone, AppShell, type AppShellProps, Avatar, AvatarFallback, AvatarImage, type AvatarProps, type AvatarSize, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardPadding, type CardProps, type CardTone, Checkbox, type CheckboxProps, Dropdown, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type DropdownOption, type DropdownProps, Input, type InputProps, Label, type LabelProps, Modal, ModalOverlay, type ModalOverlayProps, type ModalProps, type ModalSize, Pill, type PillProps, type PillSize, type PillTone, SidebarNav, type SidebarNavItem, type SidebarNavProps, type SidebarNavSection, ThemeProvider, ThemeToggleButton, type ThemeToggleButtonProps, type Toast, type ToastConfig, type ToastContextValue, type ToastOptions, type ToastPosition, ToastProvider, type ToastType, TopBar, type TopBarProps, type UziAccent, type UziResolvedTheme, type UziTheme, cx, useTheme, useToast };
386
+ type SkeletonProps = HTMLAttributes<HTMLDivElement> & {
387
+ /** Width as a CSS value. */
388
+ width?: string;
389
+ /** Height as a CSS value. */
390
+ height?: string;
391
+ /** Border radius preset. Defaults to "md". */
392
+ radius?: "sm" | "md" | "lg" | "full";
393
+ };
394
+ declare function Skeleton({ width, height, radius, className, style, ...rest }: SkeletonProps): react_jsx_runtime.JSX.Element;
395
+
396
+ type ProgressTone = "default" | "success" | "warning" | "danger";
397
+ type ProgressProps = HTMLAttributes<HTMLDivElement> & {
398
+ /** Value 0–100. */
399
+ value: number;
400
+ /** Visual tone. Defaults to "default". */
401
+ tone?: ProgressTone;
402
+ /** Accessible label. */
403
+ "aria-label"?: string;
404
+ };
405
+ declare function Progress({ value, tone, className, "aria-label": ariaLabel, ...rest }: ProgressProps): react_jsx_runtime.JSX.Element;
406
+
407
+ export { Alert, type AlertProps, type AlertTone, AppShell, type AppShellProps, Avatar, AvatarFallback, AvatarImage, type AvatarProps, type AvatarSize, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardPadding, type CardProps, type CardTone, Checkbox, type CheckboxProps, Dropdown, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type DropdownOption, type DropdownProps, Input, type InputProps, Label, type LabelProps, Modal, ModalOverlay, type ModalOverlayProps, type ModalProps, type ModalSize, MultiSelect, type MultiSelectOption, type MultiSelectProps, Pill, type PillProps, type PillSize, type PillTone, Progress, type ProgressProps, type ProgressTone, Select, type SelectOption, type SelectProps, SidebarNav, type SidebarNavItem, type SidebarNavProps, type SidebarNavSection, Skeleton, type SkeletonProps, ThemeProvider, ThemeToggleButton, type ThemeToggleButtonProps, type Toast, type ToastConfig, type ToastContextValue, type ToastOptions, type ToastPosition, ToastProvider, type ToastType, TopBar, type TopBarProps, type UziAccent, type UziResolvedTheme, type UziTheme, cx, useTheme, useToast };
package/dist/index.d.ts CHANGED
@@ -168,29 +168,63 @@ declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttri
168
168
  type CheckboxProps = React.InputHTMLAttributes<HTMLInputElement>;
169
169
  declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
170
170
 
171
- interface DropdownOption {
171
+ type MultiSelectOption = {
172
172
  label: string;
173
173
  value: string;
174
+ disabled?: boolean;
175
+ };
176
+ type MultiSelectProps = {
177
+ options: MultiSelectOption[];
178
+ value: string[];
179
+ onChange: (value: string[]) => void;
180
+ placeholder?: string;
181
+ fullWidth?: boolean;
182
+ maxVisibleValues?: number;
183
+ className?: string;
184
+ disabled?: boolean;
185
+ name?: string;
186
+ "aria-label"?: string;
187
+ "aria-labelledby"?: string;
188
+ };
189
+ declare const MultiSelect: React.ForwardRefExoticComponent<MultiSelectProps & React.RefAttributes<HTMLButtonElement>>;
190
+
191
+ type SelectOption = {
192
+ label: string;
193
+ value: string;
194
+ disabled?: boolean;
195
+ };
196
+ type SelectProps = Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "onChange" | "multiple"> & {
197
+ options: SelectOption[];
198
+ value: string;
199
+ onChange: (value: string) => void;
200
+ placeholder?: string;
201
+ allowEmptyOption?: boolean;
202
+ fullWidth?: boolean;
203
+ };
204
+ declare const Select: React.ForwardRefExoticComponent<Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "onChange" | "multiple"> & {
205
+ options: SelectOption[];
206
+ value: string;
207
+ onChange: (value: string) => void;
208
+ placeholder?: string;
209
+ allowEmptyOption?: boolean;
210
+ fullWidth?: boolean;
211
+ } & React.RefAttributes<HTMLSelectElement>>;
212
+
213
+ interface DropdownOption extends SelectOption {
174
214
  }
175
- interface DropdownProps {
215
+ interface DropdownProps extends Omit<SelectProps, "allowEmptyOption" | "fullWidth" | "placeholder" | "options"> {
176
216
  /** List of options to display in the menu. */
177
217
  options: DropdownOption[];
178
- /** Currently selected value. Use empty string for "no selection". */
179
- value: string;
180
- /** Called when the user selects an option. */
181
- onChange: (value: string) => void;
182
218
  /** Label shown when no option is selected. Defaults to "All". */
183
219
  placeholder?: string;
184
- /** Additional class name for the wrapper element. */
185
- className?: string;
186
220
  /** Whether to show the placeholder as a clearable option. Defaults to true. */
187
221
  allowClear?: boolean;
188
- /** Associates the trigger button with an external label element via its id. */
189
- "aria-labelledby"?: string;
190
- /** Provides an accessible label directly on the trigger button. */
191
- "aria-label"?: string;
192
222
  }
193
- declare function Dropdown({ options, value, onChange, placeholder, className, allowClear, "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel, }: DropdownProps): react_jsx_runtime.JSX.Element;
223
+ /**
224
+ * @deprecated Use Select for value selection and DropdownMenu for action menus.
225
+ * Dropdown remains as a compatibility alias during migration.
226
+ */
227
+ declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLSelectElement>>;
194
228
 
195
229
  declare function DropdownMenu(props: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): react_jsx_runtime.JSX.Element;
196
230
  declare function DropdownMenuTrigger(props: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
@@ -349,4 +383,25 @@ declare function useTheme(): ThemeContextValue;
349
383
 
350
384
  declare function cx(...values: Array<string | false | null | undefined>): string;
351
385
 
352
- export { Alert, type AlertProps, type AlertTone, AppShell, type AppShellProps, Avatar, AvatarFallback, AvatarImage, type AvatarProps, type AvatarSize, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardPadding, type CardProps, type CardTone, Checkbox, type CheckboxProps, Dropdown, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type DropdownOption, type DropdownProps, Input, type InputProps, Label, type LabelProps, Modal, ModalOverlay, type ModalOverlayProps, type ModalProps, type ModalSize, Pill, type PillProps, type PillSize, type PillTone, SidebarNav, type SidebarNavItem, type SidebarNavProps, type SidebarNavSection, ThemeProvider, ThemeToggleButton, type ThemeToggleButtonProps, type Toast, type ToastConfig, type ToastContextValue, type ToastOptions, type ToastPosition, ToastProvider, type ToastType, TopBar, type TopBarProps, type UziAccent, type UziResolvedTheme, type UziTheme, cx, useTheme, useToast };
386
+ type SkeletonProps = HTMLAttributes<HTMLDivElement> & {
387
+ /** Width as a CSS value. */
388
+ width?: string;
389
+ /** Height as a CSS value. */
390
+ height?: string;
391
+ /** Border radius preset. Defaults to "md". */
392
+ radius?: "sm" | "md" | "lg" | "full";
393
+ };
394
+ declare function Skeleton({ width, height, radius, className, style, ...rest }: SkeletonProps): react_jsx_runtime.JSX.Element;
395
+
396
+ type ProgressTone = "default" | "success" | "warning" | "danger";
397
+ type ProgressProps = HTMLAttributes<HTMLDivElement> & {
398
+ /** Value 0–100. */
399
+ value: number;
400
+ /** Visual tone. Defaults to "default". */
401
+ tone?: ProgressTone;
402
+ /** Accessible label. */
403
+ "aria-label"?: string;
404
+ };
405
+ declare function Progress({ value, tone, className, "aria-label": ariaLabel, ...rest }: ProgressProps): react_jsx_runtime.JSX.Element;
406
+
407
+ export { Alert, type AlertProps, type AlertTone, AppShell, type AppShellProps, Avatar, AvatarFallback, AvatarImage, type AvatarProps, type AvatarSize, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardPadding, type CardProps, type CardTone, Checkbox, type CheckboxProps, Dropdown, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type DropdownOption, type DropdownProps, Input, type InputProps, Label, type LabelProps, Modal, ModalOverlay, type ModalOverlayProps, type ModalProps, type ModalSize, MultiSelect, type MultiSelectOption, type MultiSelectProps, Pill, type PillProps, type PillSize, type PillTone, Progress, type ProgressProps, type ProgressTone, Select, type SelectOption, type SelectProps, SidebarNav, type SidebarNavItem, type SidebarNavProps, type SidebarNavSection, Skeleton, type SkeletonProps, ThemeProvider, ThemeToggleButton, type ThemeToggleButtonProps, type Toast, type ToastConfig, type ToastContextValue, type ToastOptions, type ToastPosition, ToastProvider, type ToastType, TopBar, type TopBarProps, type UziAccent, type UziResolvedTheme, type UziTheme, cx, useTheme, useToast };