@ws-ui/ui-components 1.0.17 → 1.0.20

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
@@ -2643,6 +2643,7 @@ export declare interface IDownshiftHookParams<T> {
2643
2643
  customOptionGenerator?: OptionGenerator<T>;
2644
2644
  disableInternalFiltering?: boolean;
2645
2645
  isOptionDisabled?: (option: T) => boolean;
2646
+ isDisabled?: boolean;
2646
2647
  stateReducer?: (state: any, actionAndChanges: UseComboboxStateChange<T> | UseSelectStateChange<T>) => Partial<any>;
2647
2648
  }
2648
2649
 
@@ -2810,8 +2811,12 @@ export declare interface ISelectContextValue<T = unknown> {
2810
2811
  isDisabled: boolean;
2811
2812
  hasMessage: boolean;
2812
2813
  setHasMessage: Dispatch<SetStateAction<boolean>>;
2814
+ hasGroup: boolean;
2815
+ setHasGroup: Dispatch<SetStateAction<boolean>>;
2813
2816
  options?: T[] | ISelectOptionGroup<T>[];
2814
2817
  downshift: IDownshiftHookReturn<T>;
2818
+ menuPlacement: 'top' | 'bottom';
2819
+ setMenuPlacement: Dispatch<SetStateAction<'top' | 'bottom'>>;
2815
2820
  getOptionLabel: (option: T) => ReactNode;
2816
2821
  getOptionValue: (option: T) => string | number;
2817
2822
  isOptionDisabled: (option: T) => boolean;
@@ -2863,12 +2868,12 @@ export declare interface ListItemProps extends HTMLAttributes<HTMLElement> {
2863
2868
  }
2864
2869
 
2865
2870
  export declare const Menu: {
2866
- ({ children, open: controlledOpen, defaultOpen, onOpenChange, disabled, }: MenuProps): JSX_2.Element;
2871
+ ({ children, open: controlledOpen, defaultOpen, onOpenChange, disabled, usePortal, }: MenuProps): JSX_2.Element;
2867
2872
  displayName: string;
2868
2873
  Trigger: ({ children, className }: MenuTriggerProps) => JSX_2.Element;
2869
2874
  Content: ({ children, placement, className, }: MenuContentProps) => JSX_2.Element | null;
2870
- Item: ({ children, onClick, disabled, className, }: MenuItemProps) => JSX_2.Element;
2871
- SubMenu: ({ label, children, disabled, className, }: SubMenuProps) => JSX_2.Element;
2875
+ Item: ({ children, onClick, icon, disabled, className, }: MenuItemProps) => JSX_2.Element;
2876
+ SubMenu: ({ label, children, icon, disabled, className, }: SubMenuProps) => JSX_2.Element;
2872
2877
  };
2873
2878
 
2874
2879
  export declare interface MenuContentProps {
@@ -2880,6 +2885,7 @@ export declare interface MenuContentProps {
2880
2885
  export declare interface MenuItemProps {
2881
2886
  children: React.ReactNode;
2882
2887
  onClick?: () => void;
2888
+ icon?: React.ReactNode;
2883
2889
  disabled?: boolean;
2884
2890
  className?: string;
2885
2891
  }
@@ -2890,6 +2896,7 @@ export declare interface MenuProps {
2890
2896
  defaultOpen?: boolean;
2891
2897
  onOpenChange?: (open: boolean) => void;
2892
2898
  disabled?: boolean;
2899
+ usePortal?: boolean;
2893
2900
  }
2894
2901
 
2895
2902
  export declare interface MenuTriggerProps {
@@ -3270,20 +3277,9 @@ export declare const Select: {
3270
3277
  <T = unknown>({ size, color, isInvalid, isDisabled, className, children, options, value, defaultValue, onChange, isMulti, inputValue, onInputChange, isSearchable, isOpen, onOpenChange, customOptionGenerator, disableInternalFiltering, getOptionLabel, getOptionValue, isOptionDisabled, formatOptionLabel, stateReducer, ...props }: SelectRootProps<T>): JSX_2.Element;
3271
3278
  displayName: string;
3272
3279
  };
3273
- Control: ForwardRefExoticComponent<SelectControlProps & RefAttributes<HTMLDivElement>>;
3274
- ValueContainer: {
3275
- ({ className, children, isMulti, }: SelectValueContainerProps): JSX_2.Element;
3276
- displayName: string;
3277
- };
3280
+ Group: ForwardRefExoticComponent<SelectGroupProps & RefAttributes<HTMLDivElement>>;
3281
+ Icon: ForwardRefExoticComponent<SelectIconProps & RefAttributes<HTMLDivElement>>;
3278
3282
  Input: ForwardRefExoticComponent<SelectInputProps & RefAttributes<HTMLInputElement>>;
3279
- Placeholder: {
3280
- ({ className, children }: SelectPlaceholderProps): JSX_2.Element;
3281
- displayName: string;
3282
- };
3283
- SingleValue: {
3284
- <T>({ className, children, data, isDisabled, }: SelectSingleValueProps<T>): JSX_2.Element;
3285
- displayName: string;
3286
- };
3287
3283
  MultiValue: {
3288
3284
  <T>({ className, children, data, isDisabled, isFocused, onRemove, }: SelectMultiValueProps<T>): JSX_2.Element;
3289
3285
  displayName: string;
@@ -3297,22 +3293,8 @@ export declare const Select: {
3297
3293
  ({ color: propColor, className, children, onClick, isDisabled: propIsDisabled, ...props }: SelectDropdownIndicatorProps): JSX_2.Element;
3298
3294
  displayName: string;
3299
3295
  };
3300
- Menu: ForwardRefExoticComponent<SelectMenuProps & RefAttributes<HTMLDivElement>>;
3301
- MenuList: ForwardRefExoticComponent<SelectMenuListProps & RefAttributes<HTMLDivElement>>;
3302
- Option: {
3303
- <T>({ className, children, data, isDisabled, isFocused, isSelected, innerProps, ...props }: SelectOptionProps<T>): JSX_2.Element;
3304
- displayName: string;
3305
- };
3306
- Group: {
3307
- <T>({ className, children, data, label, }: SelectGroupProps<T>): JSX_2.Element;
3308
- displayName: string;
3309
- };
3310
- GroupHeading: {
3311
- ({ className, children, }: SelectGroupHeadingProps): JSX_2.Element;
3312
- displayName: string;
3313
- };
3314
- NoOptionsMessage: {
3315
- ({ className, children, inputValue, }: SelectNoOptionsMessageProps): JSX_2.Element;
3296
+ OptionGroup: {
3297
+ <T>({ className, children, data, label, }: SelectOptionGroupProps<T>): JSX_2.Element;
3316
3298
  displayName: string;
3317
3299
  };
3318
3300
  Message: {
@@ -3426,6 +3408,7 @@ export declare interface SelectFieldProps<T> extends InputHTMLAttributes<HTMLInp
3426
3408
  'aria-describedby'?: string;
3427
3409
  inputRef?: Ref<HTMLInputElement>;
3428
3410
  controlShouldRenderValue?: boolean;
3411
+ virtualizeThreshold?: number;
3429
3412
  blurInputOnSelect?: boolean;
3430
3413
  tabSelectsValue?: boolean;
3431
3414
  backspaceRemovesValue?: boolean;
@@ -3438,12 +3421,17 @@ export declare interface SelectGroupHeadingProps {
3438
3421
  children: ReactNode;
3439
3422
  }
3440
3423
 
3441
- export declare interface SelectGroupProps<T> {
3424
+ export declare interface SelectGroupProps extends HTMLAttributes<HTMLDivElement> {
3442
3425
  className?: string;
3443
3426
  children: ReactNode;
3444
- data: ISelectOptionGroup<T>;
3445
- label: string;
3446
- options: T[];
3427
+ }
3428
+
3429
+ export declare interface SelectIconProps extends HTMLAttributes<HTMLDivElement> {
3430
+ isAction?: boolean;
3431
+ className?: string;
3432
+ isDisabled?: boolean;
3433
+ style?: CSSProperties;
3434
+ children: ReactNode;
3447
3435
  }
3448
3436
 
3449
3437
  export declare interface SelectInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
@@ -3457,6 +3445,7 @@ export declare interface SelectMenuListProps extends HTMLAttributes<HTMLDivEleme
3457
3445
  children: ReactNode;
3458
3446
  isLoading?: boolean;
3459
3447
  maxHeight?: number;
3448
+ totalHeight?: number;
3460
3449
  }
3461
3450
 
3462
3451
  export declare interface SelectMenuProps extends HTMLAttributes<HTMLDivElement> {
@@ -3490,6 +3479,14 @@ export declare interface SelectNoOptionsMessageProps {
3490
3479
  inputValue?: string;
3491
3480
  }
3492
3481
 
3482
+ export declare interface SelectOptionGroupProps<T> {
3483
+ className?: string;
3484
+ children: ReactNode;
3485
+ data: ISelectOptionGroup<T>;
3486
+ label: string;
3487
+ options: T[];
3488
+ }
3489
+
3493
3490
  export declare interface SelectOptionProps<T> extends HTMLAttributes<HTMLDivElement> {
3494
3491
  className?: string;
3495
3492
  children?: ReactNode;
@@ -3609,6 +3606,7 @@ export declare interface SortableFileTabProps<T = unknown> {
3609
3606
  export declare interface SubMenuProps {
3610
3607
  label: string;
3611
3608
  children: React.ReactNode;
3609
+ icon?: React.ReactNode;
3612
3610
  disabled?: boolean;
3613
3611
  className?: string;
3614
3612
  }