@onesaz/ui 0.3.3 → 0.3.5

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.ts CHANGED
@@ -189,6 +189,8 @@ declare const Caption: React.ForwardRefExoticComponent<Omit<TypographyProps, "va
189
189
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
190
190
  variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
191
191
  size?: 'default' | 'sm' | 'lg' | 'icon';
192
+ /** Whether the button should take the full width of its container */
193
+ fullWidth?: boolean;
192
194
  }
193
195
  declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
194
196
  interface IconButtonProps extends Omit<ButtonProps, 'size'> {
@@ -210,6 +212,8 @@ interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
210
212
  startAdornment?: React.ReactNode;
211
213
  /** End adornment */
212
214
  endAdornment?: React.ReactNode;
215
+ /** Wrapper class (when using adornments) */
216
+ containerClassName?: string;
213
217
  }
214
218
  declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
215
219
 
@@ -258,13 +262,26 @@ interface TextFieldProps extends Omit<InputProps, 'inputSize' | 'size'> {
258
262
  /** Required indicator */
259
263
  required?: boolean;
260
264
  /** Size of the text field */
261
- size?: 'sm' | 'md' | 'lg';
265
+ size?: 'sm' | 'md' | 'lg' | 'small' | 'medium';
262
266
  /** Full width mode */
263
267
  fullWidth?: boolean;
264
268
  /** Start adornment (icon, text, etc.) */
265
269
  startAdornment?: React.ReactNode;
266
270
  /** End adornment (icon, text, etc.) */
267
271
  endAdornment?: React.ReactNode;
272
+ /** Input element props (MUI-compatible) */
273
+ inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
274
+ /** Input container/slot props (MUI-compatible) */
275
+ InputProps?: {
276
+ startAdornment?: React.ReactNode;
277
+ endAdornment?: React.ReactNode;
278
+ className?: string;
279
+ containerClassName?: string;
280
+ };
281
+ /** Input label props (MUI-compatible) */
282
+ InputLabelProps?: React.LabelHTMLAttributes<HTMLLabelElement>;
283
+ /** Input ref (MUI-compatible) */
284
+ inputRef?: React.Ref<HTMLInputElement>;
268
285
  }
269
286
  declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement>>;
270
287
 
@@ -661,29 +678,49 @@ interface ComboboxOption {
661
678
  label: string;
662
679
  disabled?: boolean;
663
680
  }
681
+ type ComboboxPrimitiveOption = string;
682
+ type ComboboxObjectOption = Record<string, unknown>;
664
683
  interface ComboboxSingleProps {
665
- options: ComboboxOption[];
666
- value?: string;
667
- defaultValue?: string;
668
- onValueChange?: (value: string) => void;
684
+ options: ComboboxOption[] | ComboboxPrimitiveOption[] | ComboboxObjectOption[];
685
+ value?: ComboboxOption | null;
686
+ defaultValue?: ComboboxOption | null;
687
+ onChange?: (value: ComboboxOption | null) => void;
669
688
  placeholder?: string;
670
689
  searchPlaceholder?: string;
671
690
  emptyMessage?: string;
672
691
  disabled?: boolean;
673
692
  className?: string;
674
693
  multiple?: false;
694
+ clearable?: boolean;
695
+ openOnFocus?: boolean;
696
+ inputValue?: string;
697
+ onInputChange?: (value: string) => void;
698
+ simpleOptions?: boolean;
699
+ labelKey?: string;
700
+ valueKey?: string;
675
701
  }
676
702
  interface ComboboxMultipleProps {
677
- options: ComboboxOption[];
678
- value?: string[];
679
- defaultValue?: string[];
680
- onValueChange?: (value: string[]) => void;
703
+ options: ComboboxOption[] | ComboboxPrimitiveOption[] | ComboboxObjectOption[];
704
+ value?: ComboboxOption[];
705
+ defaultValue?: ComboboxOption[];
706
+ onChange?: (value: ComboboxOption[]) => void;
681
707
  placeholder?: string;
682
708
  searchPlaceholder?: string;
683
709
  emptyMessage?: string;
684
710
  disabled?: boolean;
685
711
  className?: string;
686
712
  multiple: true;
713
+ clearable?: boolean;
714
+ openOnFocus?: boolean;
715
+ inputValue?: string;
716
+ onInputChange?: (value: string) => void;
717
+ /** Show select-all option */
718
+ selectAll?: boolean;
719
+ /** Label for select-all option */
720
+ selectAllLabel?: string;
721
+ simpleOptions?: boolean;
722
+ labelKey?: string;
723
+ valueKey?: string;
687
724
  /** Maximum number of items to display as chips before showing "+N more" */
688
725
  maxDisplayItems?: number;
689
726
  }