@ws-ui/ui-components 1.0.6 → 1.0.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.
- package/dist/index.cjs +64 -31
- package/dist/index.d.ts +583 -51
- package/dist/index.js +12653 -4787
- package/dist/ui-components.css +1 -0
- package/package.json +7 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { Context } from 'react';
|
|
1
2
|
import { CSSProperties } from 'react';
|
|
2
3
|
import { default as default_2 } from 'react';
|
|
4
|
+
import { ElementType } from 'react';
|
|
3
5
|
import { ForwardRefExoticComponent } from 'react';
|
|
4
6
|
import { HTMLAttributes } from 'react';
|
|
5
7
|
import { JSX } from 'react';
|
|
@@ -8,6 +10,9 @@ import { default as Qodly } from './Qodly.svg?react';
|
|
|
8
10
|
import { ReactNode } from 'react';
|
|
9
11
|
import { Ref } from 'react';
|
|
10
12
|
import { RefAttributes } from 'react';
|
|
13
|
+
import { UseComboboxReturnValue } from 'downshift';
|
|
14
|
+
import { UseMultipleSelectionReturnValue } from 'downshift';
|
|
15
|
+
import { UseSelectReturnValue } from 'downshift';
|
|
11
16
|
|
|
12
17
|
export declare type BreadcrumbColorConfig = {
|
|
13
18
|
active: string;
|
|
@@ -158,6 +163,18 @@ export declare interface CheckboxState {
|
|
|
158
163
|
isRequired: boolean;
|
|
159
164
|
}
|
|
160
165
|
|
|
166
|
+
export declare const CloseButton: <T>({ tab, onClose, }: {
|
|
167
|
+
tab: T;
|
|
168
|
+
onClose: (e?: default_2.MouseEvent) => void;
|
|
169
|
+
}) => JSX_2.Element;
|
|
170
|
+
|
|
171
|
+
export declare function cn(...inputs: any[]): string;
|
|
172
|
+
|
|
173
|
+
export declare interface DragState {
|
|
174
|
+
draggedIndex: number | null;
|
|
175
|
+
dragOverIndex: number | null;
|
|
176
|
+
}
|
|
177
|
+
|
|
161
178
|
/**
|
|
162
179
|
* The Fd4dLogo icon
|
|
163
180
|
* See in figma https://www.figma.com/file/YlxCihvTu1q27RwIJD9DSH?node-id=64%3A3714
|
|
@@ -2580,6 +2597,8 @@ export declare const FdWifi: (props: JSX.IntrinsicElements["svg"]) => JSX_2.Elem
|
|
|
2580
2597
|
**/
|
|
2581
2598
|
export declare const FdWindow: (props: JSX.IntrinsicElements["svg"]) => JSX_2.Element;
|
|
2582
2599
|
|
|
2600
|
+
export declare const generateId: () => string;
|
|
2601
|
+
|
|
2583
2602
|
/**
|
|
2584
2603
|
* Default resize handle component
|
|
2585
2604
|
* Displays a visual indicator when dragging
|
|
@@ -2596,6 +2615,48 @@ declare interface HandleProps {
|
|
|
2596
2615
|
|
|
2597
2616
|
export declare type IconType = (props: JSX.IntrinsicElements['svg']) => JSX.Element;
|
|
2598
2617
|
|
|
2618
|
+
export declare interface IDownshiftHookParams<T = unknown> {
|
|
2619
|
+
options?: ISelectOption<T>[] | ISelectOptionGroup<T>[];
|
|
2620
|
+
value?: SelectValue<T>;
|
|
2621
|
+
defaultValue?: SelectValue<T>;
|
|
2622
|
+
onChange?: ((value: SelectValue<T>) => void) | ((value: SelectValue<T> | ((prev: SelectValue<T>) => SelectValue<T>)) => void);
|
|
2623
|
+
isMulti?: boolean;
|
|
2624
|
+
isSearchable?: boolean;
|
|
2625
|
+
isOpen?: boolean;
|
|
2626
|
+
isFocused?: boolean;
|
|
2627
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
2628
|
+
inputValue?: string;
|
|
2629
|
+
onInputChange?: (value: string) => void;
|
|
2630
|
+
getOptionLabel?: (option: ISelectOption<T>) => string;
|
|
2631
|
+
getOptionValue?: (option: ISelectOption<T>) => string | number;
|
|
2632
|
+
items?: ISelectOption<T>[];
|
|
2633
|
+
customOptionGenerator?: OptionGenerator<T>;
|
|
2634
|
+
disableInternalFiltering?: boolean;
|
|
2635
|
+
}
|
|
2636
|
+
|
|
2637
|
+
export declare interface IDownshiftHookReturn<T = unknown> {
|
|
2638
|
+
isOpen: boolean;
|
|
2639
|
+
selectedItem: ISelectOption<T> | null;
|
|
2640
|
+
highlightedIndex: number;
|
|
2641
|
+
inputValue: string;
|
|
2642
|
+
getToggleButtonProps: UseSelectReturnValue<ISelectOption<T>>['getToggleButtonProps'] | UseComboboxReturnValue<ISelectOption<T>>['getToggleButtonProps'];
|
|
2643
|
+
getMenuProps: UseSelectReturnValue<ISelectOption<T>>['getMenuProps'] | UseComboboxReturnValue<ISelectOption<T>>['getMenuProps'];
|
|
2644
|
+
getItemProps: UseSelectReturnValue<ISelectOption<T>>['getItemProps'] | UseComboboxReturnValue<ISelectOption<T>>['getItemProps'];
|
|
2645
|
+
getInputProps?: UseComboboxReturnValue<ISelectOption<T>>['getInputProps'];
|
|
2646
|
+
selectedItems: ISelectOption<T>[];
|
|
2647
|
+
filteredItems: ISelectOption<T>[];
|
|
2648
|
+
setInputValue: (value: string) => void;
|
|
2649
|
+
setIsOpen: (isOpen: boolean) => void;
|
|
2650
|
+
toggleMenu: () => void;
|
|
2651
|
+
openMenu: () => void;
|
|
2652
|
+
closeMenu: () => void;
|
|
2653
|
+
clearSelection: () => void;
|
|
2654
|
+
removeItem: (item: ISelectOption<T>) => void;
|
|
2655
|
+
multipleSelection: UseMultipleSelectionReturnValue<ISelectOption<T>>;
|
|
2656
|
+
isMulti: boolean;
|
|
2657
|
+
isSearchable: boolean;
|
|
2658
|
+
}
|
|
2659
|
+
|
|
2599
2660
|
export declare interface IMultilineMessage {
|
|
2600
2661
|
title?: string;
|
|
2601
2662
|
messages: string[];
|
|
@@ -2727,6 +2788,77 @@ export declare interface InputSizeConfig {
|
|
|
2727
2788
|
icon: string;
|
|
2728
2789
|
}
|
|
2729
2790
|
|
|
2791
|
+
export declare interface InternalToastContextValue {
|
|
2792
|
+
addToast: (item: Omit<ToastItem, 'id'>) => string;
|
|
2793
|
+
close: (id: string) => void;
|
|
2794
|
+
closeAll: (position?: ToastPosition) => void;
|
|
2795
|
+
}
|
|
2796
|
+
|
|
2797
|
+
export declare interface ISelectContextValue<T = unknown> {
|
|
2798
|
+
size: SelectSize;
|
|
2799
|
+
color: SelectColor;
|
|
2800
|
+
isInvalid: boolean;
|
|
2801
|
+
isDisabled: boolean;
|
|
2802
|
+
hasMessage: boolean;
|
|
2803
|
+
setHasMessage: default_2.Dispatch<default_2.SetStateAction<boolean>>;
|
|
2804
|
+
options?: ISelectOption<T>[] | ISelectOptionGroup<T>[];
|
|
2805
|
+
downshift: IDownshiftHookReturn<T>;
|
|
2806
|
+
}
|
|
2807
|
+
|
|
2808
|
+
export declare interface ISelectOption<T = unknown> {
|
|
2809
|
+
value: string | number;
|
|
2810
|
+
label: string;
|
|
2811
|
+
data?: T;
|
|
2812
|
+
isDisabled?: boolean;
|
|
2813
|
+
icon?: ReactNode;
|
|
2814
|
+
[index: string]: string | number | boolean | ReactNode | T;
|
|
2815
|
+
}
|
|
2816
|
+
|
|
2817
|
+
export declare interface ISelectOptionGroup<T = unknown> {
|
|
2818
|
+
label: string;
|
|
2819
|
+
options: ISelectOption<T>[];
|
|
2820
|
+
}
|
|
2821
|
+
|
|
2822
|
+
export declare interface ISelectOptionProps<T = unknown> extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
2823
|
+
className?: string;
|
|
2824
|
+
children?: ReactNode;
|
|
2825
|
+
data: ISelectOption<T>;
|
|
2826
|
+
isDisabled?: boolean;
|
|
2827
|
+
isFocused?: boolean;
|
|
2828
|
+
isSelected?: boolean;
|
|
2829
|
+
innerProps?: default_2.HTMLAttributes<HTMLDivElement>;
|
|
2830
|
+
}
|
|
2831
|
+
|
|
2832
|
+
export declare const ListItem: ForwardRefExoticComponent<ListItemProps & RefAttributes<HTMLElement>>;
|
|
2833
|
+
|
|
2834
|
+
export declare interface ListItemProps extends HTMLAttributes<HTMLElement> {
|
|
2835
|
+
/**
|
|
2836
|
+
* Whether the item is currently active/selected.
|
|
2837
|
+
*/
|
|
2838
|
+
active?: boolean;
|
|
2839
|
+
/**
|
|
2840
|
+
* Whether the item is disabled.
|
|
2841
|
+
*/
|
|
2842
|
+
disabled?: boolean;
|
|
2843
|
+
/**
|
|
2844
|
+
* Whether the item has an error state.
|
|
2845
|
+
*/
|
|
2846
|
+
error?: boolean;
|
|
2847
|
+
/**
|
|
2848
|
+
* Whether the item is in an "open" state (e.g., expanded folder).
|
|
2849
|
+
*/
|
|
2850
|
+
isOpen?: boolean;
|
|
2851
|
+
/**
|
|
2852
|
+
* The content of the item.
|
|
2853
|
+
*/
|
|
2854
|
+
children?: ReactNode;
|
|
2855
|
+
/**
|
|
2856
|
+
* The element type to render as (e.g., 'div', 'button', 'a').
|
|
2857
|
+
* @default 'div'
|
|
2858
|
+
*/
|
|
2859
|
+
as?: ElementType;
|
|
2860
|
+
}
|
|
2861
|
+
|
|
2730
2862
|
export declare const Menu: {
|
|
2731
2863
|
({ children, open: controlledOpen, defaultOpen, onOpenChange, }: MenuProps): JSX_2.Element;
|
|
2732
2864
|
displayName: string;
|
|
@@ -2768,6 +2900,35 @@ export declare type NumberSize = {
|
|
|
2768
2900
|
height: number;
|
|
2769
2901
|
};
|
|
2770
2902
|
|
|
2903
|
+
export declare type OptionGenerator<T = unknown> = (inputValue: string, currentOptions: ISelectOption<T>[]) => ISelectOption<T>[];
|
|
2904
|
+
|
|
2905
|
+
export declare const Panel: default_2.ForwardRefExoticComponent<PanelProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
2906
|
+
|
|
2907
|
+
export declare type PanelDepth = 0 | 1 | 2 | 3 | 4 | 5;
|
|
2908
|
+
|
|
2909
|
+
export declare interface PanelProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
2910
|
+
/**
|
|
2911
|
+
* The depth/elevation level of the panel (0-5)
|
|
2912
|
+
* - 0: Root/Editor background (default)
|
|
2913
|
+
* - 1: Primary panel/sidebar
|
|
2914
|
+
* - 2: Secondary panel/card
|
|
2915
|
+
* - 3: Elevated card/modal
|
|
2916
|
+
* - 4: top elevation (tooltips, popovers)
|
|
2917
|
+
* - 5: outside/sticky elements
|
|
2918
|
+
*/
|
|
2919
|
+
depth?: PanelDepth;
|
|
2920
|
+
children: ReactNode;
|
|
2921
|
+
/**
|
|
2922
|
+
* the type of border to apply diferent border color bor tabs and normal panel
|
|
2923
|
+
*/
|
|
2924
|
+
contentType?: 'tabs' | 'primary' | 'light' | 'default';
|
|
2925
|
+
/**
|
|
2926
|
+
* Whether the panel is disabled.
|
|
2927
|
+
* If true, changes text color to inactive-text.
|
|
2928
|
+
*/
|
|
2929
|
+
disabled?: boolean;
|
|
2930
|
+
}
|
|
2931
|
+
|
|
2771
2932
|
export declare const Pill: ForwardRefExoticComponent<PillProps & RefAttributes<HTMLDivElement>> & {
|
|
2772
2933
|
Root: ForwardRefExoticComponent<PillRootProps & RefAttributes<HTMLDivElement>>;
|
|
2773
2934
|
Text: ForwardRefExoticComponent<PillTextProps & RefAttributes<HTMLSpanElement>>;
|
|
@@ -2834,6 +2995,8 @@ export declare interface PillTextProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
2834
2995
|
children: ReactNode;
|
|
2835
2996
|
}
|
|
2836
2997
|
|
|
2998
|
+
export declare const POSITIONS: readonly ["top", "top-left", "top-right", "bottom", "bottom-left", "bottom-right"];
|
|
2999
|
+
|
|
2837
3000
|
export { Qodly }
|
|
2838
3001
|
|
|
2839
3002
|
export declare const Radio: {
|
|
@@ -3060,6 +3223,20 @@ export declare interface ResizableProps {
|
|
|
3060
3223
|
* Ref to the resizable element
|
|
3061
3224
|
*/
|
|
3062
3225
|
ref?: Ref<HTMLElement>;
|
|
3226
|
+
/**
|
|
3227
|
+
* The depth/elevation level of the panel (0-4)
|
|
3228
|
+
* - 0: Root/Editor background (default)
|
|
3229
|
+
* - 1: Primary panel/sidebar
|
|
3230
|
+
* - 2: Secondary panel/card
|
|
3231
|
+
* - 3: Elevated card/modal
|
|
3232
|
+
* - 4: Highest elevation (tooltips, popovers)
|
|
3233
|
+
*/
|
|
3234
|
+
depth?: PanelDepth;
|
|
3235
|
+
/**
|
|
3236
|
+
* Whether the resizable component is disabled.
|
|
3237
|
+
* If true, changes text color to inactive-text.
|
|
3238
|
+
*/
|
|
3239
|
+
disabled?: boolean;
|
|
3063
3240
|
}
|
|
3064
3241
|
|
|
3065
3242
|
export declare type ResizeCallback = (event: MouseEvent | TouchEvent, direction: ResizeDirection, elementRef: HTMLElement, delta: NumberSize) => void;
|
|
@@ -3079,6 +3256,287 @@ export declare type ResizeEnable = {
|
|
|
3079
3256
|
|
|
3080
3257
|
export declare type ResizeStartCallback = (event: React.MouseEvent<HTMLElement> | React.TouchEvent<HTMLElement>, direction: ResizeDirection, elementRef: HTMLElement) => void | boolean;
|
|
3081
3258
|
|
|
3259
|
+
export declare const Select: {
|
|
3260
|
+
Root: {
|
|
3261
|
+
<T = unknown>({ size, color, isInvalid, isDisabled, className, children, downshiftParams, ...props }: SelectRootProps<T>): JSX_2.Element;
|
|
3262
|
+
displayName: string;
|
|
3263
|
+
};
|
|
3264
|
+
Control: ForwardRefExoticComponent<SelectControlProps & RefAttributes<HTMLDivElement>>;
|
|
3265
|
+
ValueContainer: {
|
|
3266
|
+
({ className, children, isMulti, }: SelectValueContainerProps): JSX_2.Element;
|
|
3267
|
+
displayName: string;
|
|
3268
|
+
};
|
|
3269
|
+
Input: ForwardRefExoticComponent<SelectInputProps & RefAttributes<HTMLInputElement>>;
|
|
3270
|
+
Placeholder: {
|
|
3271
|
+
({ className, children }: SelectPlaceholderProps): JSX_2.Element;
|
|
3272
|
+
displayName: string;
|
|
3273
|
+
};
|
|
3274
|
+
SingleValue: {
|
|
3275
|
+
<T>({ className, children, data, isDisabled, }: SelectSingleValueProps<T>): JSX_2.Element;
|
|
3276
|
+
displayName: string;
|
|
3277
|
+
};
|
|
3278
|
+
MultiValue: {
|
|
3279
|
+
<T>({ className, children, data, isDisabled, isFocused, onRemove, }: SelectMultiValueProps<T>): JSX_2.Element;
|
|
3280
|
+
displayName: string;
|
|
3281
|
+
};
|
|
3282
|
+
ClearIndicator: {
|
|
3283
|
+
({ color: propColor, className, children, onClick, isDisabled: propIsDisabled, ...props }: SelectClearIndicatorProps): JSX_2.Element | null;
|
|
3284
|
+
displayName: string;
|
|
3285
|
+
};
|
|
3286
|
+
ClearSearchIndicator: ({ className, children, onClick, isDisabled: propIsDisabled, ...props }: SelectClearSearchIndicatorProps) => JSX_2.Element | null;
|
|
3287
|
+
DropdownIndicator: {
|
|
3288
|
+
({ color: propColor, className, children, onClick, isDisabled: propIsDisabled, ...props }: SelectDropdownIndicatorProps): JSX_2.Element;
|
|
3289
|
+
displayName: string;
|
|
3290
|
+
};
|
|
3291
|
+
Menu: ForwardRefExoticComponent<SelectMenuProps & RefAttributes<HTMLDivElement>>;
|
|
3292
|
+
MenuList: ForwardRefExoticComponent<SelectMenuListProps & RefAttributes<HTMLDivElement>>;
|
|
3293
|
+
Option: {
|
|
3294
|
+
<T>({ className, children, data, isDisabled, isFocused, isSelected, innerProps, ...props }: ISelectOptionProps<T>): JSX_2.Element;
|
|
3295
|
+
displayName: string;
|
|
3296
|
+
};
|
|
3297
|
+
Group: {
|
|
3298
|
+
<T>({ className, children, data, label, }: SelectGroupProps<T>): JSX_2.Element;
|
|
3299
|
+
displayName: string;
|
|
3300
|
+
};
|
|
3301
|
+
GroupHeading: {
|
|
3302
|
+
({ className, children, }: SelectGroupHeadingProps): JSX_2.Element;
|
|
3303
|
+
displayName: string;
|
|
3304
|
+
};
|
|
3305
|
+
NoOptionsMessage: {
|
|
3306
|
+
({ className, children, inputValue, }: SelectNoOptionsMessageProps): JSX_2.Element;
|
|
3307
|
+
displayName: string;
|
|
3308
|
+
};
|
|
3309
|
+
Message: {
|
|
3310
|
+
({ icon, className, children, ...props }: SelectMessageProps): JSX_2.Element;
|
|
3311
|
+
displayName: string;
|
|
3312
|
+
};
|
|
3313
|
+
Field: {
|
|
3314
|
+
<T = unknown>({ placeholder, noOptionsMessage, hideNoOptions, loadingMessage, isClearable, isSearchClearable, isLoading, isRequired, hideIndicators, hideDropdownIndicator, searchPlacement, hideSelectedOptions, onFocus, onBlur, renderMenuHeader, formatOptionLabel, displayFormattedOption, isOptionDisabled, inputRef: propInputRef, controlShouldRenderValue, name, id, onSelectionComplete, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, children, usePortal, ...props }: SelectFieldProps<T>): JSX_2.Element;
|
|
3315
|
+
displayName: string;
|
|
3316
|
+
};
|
|
3317
|
+
};
|
|
3318
|
+
|
|
3319
|
+
export declare interface SelectClearIndicatorProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
3320
|
+
color?: SelectColor;
|
|
3321
|
+
className?: string;
|
|
3322
|
+
children?: ReactNode;
|
|
3323
|
+
onClick?: (event: default_2.MouseEvent) => void;
|
|
3324
|
+
isDisabled?: boolean;
|
|
3325
|
+
}
|
|
3326
|
+
|
|
3327
|
+
export declare interface SelectClearSearchIndicatorProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
3328
|
+
className?: string;
|
|
3329
|
+
children?: ReactNode;
|
|
3330
|
+
onClick?: (event: default_2.MouseEvent) => void;
|
|
3331
|
+
isDisabled?: boolean;
|
|
3332
|
+
}
|
|
3333
|
+
|
|
3334
|
+
export declare type SelectColor = 'primary' | 'positive' | 'warning' | 'negative';
|
|
3335
|
+
|
|
3336
|
+
export declare interface SelectColorConfig {
|
|
3337
|
+
control: string;
|
|
3338
|
+
controlFocused: string;
|
|
3339
|
+
controlDisabled: string;
|
|
3340
|
+
controlInvalid: string;
|
|
3341
|
+
placeholder: string;
|
|
3342
|
+
singleValue: string;
|
|
3343
|
+
singleValueDisabled: string;
|
|
3344
|
+
multiValue: string;
|
|
3345
|
+
multiValueLabel: string;
|
|
3346
|
+
multiValueRemove: string;
|
|
3347
|
+
multiValueRemoveHover: string;
|
|
3348
|
+
multiValueDisabled: string;
|
|
3349
|
+
clearIndicator: string;
|
|
3350
|
+
clearIndicatorHover: string;
|
|
3351
|
+
dropdownIndicator: string;
|
|
3352
|
+
dropdownIndicatorHover: string;
|
|
3353
|
+
indicatorSeparator: string;
|
|
3354
|
+
loadingIndicator: string;
|
|
3355
|
+
menu: string;
|
|
3356
|
+
menuList: string;
|
|
3357
|
+
option: string;
|
|
3358
|
+
optionFocused: string;
|
|
3359
|
+
optionSelected: string;
|
|
3360
|
+
optionDisabled: string;
|
|
3361
|
+
group: string;
|
|
3362
|
+
groupHeading: string;
|
|
3363
|
+
noOptionsMessage: string;
|
|
3364
|
+
loadingMessage: string;
|
|
3365
|
+
message: string;
|
|
3366
|
+
messageBackground: string;
|
|
3367
|
+
messageBorder: string;
|
|
3368
|
+
icon: string;
|
|
3369
|
+
iconAction: string;
|
|
3370
|
+
iconActionHover: string;
|
|
3371
|
+
}
|
|
3372
|
+
|
|
3373
|
+
export declare interface SelectControlProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
3374
|
+
className?: string;
|
|
3375
|
+
children: ReactNode;
|
|
3376
|
+
isFocused?: boolean;
|
|
3377
|
+
isDisabled?: boolean;
|
|
3378
|
+
}
|
|
3379
|
+
|
|
3380
|
+
export declare interface SelectDropdownIndicatorProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
3381
|
+
color?: SelectColor;
|
|
3382
|
+
className?: string;
|
|
3383
|
+
children?: ReactNode;
|
|
3384
|
+
onClick?: (event: default_2.MouseEvent) => void;
|
|
3385
|
+
isDisabled?: boolean;
|
|
3386
|
+
}
|
|
3387
|
+
|
|
3388
|
+
export declare interface SelectFieldProps<T = unknown> extends default_2.InputHTMLAttributes<HTMLInputElement> {
|
|
3389
|
+
placeholder?: string;
|
|
3390
|
+
noOptionsMessage?: string | ((inputValue: string) => string);
|
|
3391
|
+
hideNoOptions?: boolean;
|
|
3392
|
+
loadingMessage?: string;
|
|
3393
|
+
isClearable?: boolean;
|
|
3394
|
+
usePortal?: boolean;
|
|
3395
|
+
isLoading?: boolean;
|
|
3396
|
+
isRequired?: boolean;
|
|
3397
|
+
hideIndicators?: boolean;
|
|
3398
|
+
hideDropdownIndicator?: boolean;
|
|
3399
|
+
closeMenuOnSelect?: boolean;
|
|
3400
|
+
hideSelectedOptions?: boolean;
|
|
3401
|
+
isSearchClearable?: boolean;
|
|
3402
|
+
searchPlacement?: 'trigger' | 'menu';
|
|
3403
|
+
onFocus?: (event: default_2.FocusEvent<HTMLElement>) => void;
|
|
3404
|
+
onBlur?: (event: default_2.FocusEvent<HTMLElement>) => void;
|
|
3405
|
+
onMenuOpen?: () => void;
|
|
3406
|
+
onMenuClose?: () => void;
|
|
3407
|
+
renderMenuHeader?: (props: IDownshiftHookReturn<T>) => ReactNode;
|
|
3408
|
+
formatOptionLabel?: (option: ISelectOption<T> & {
|
|
3409
|
+
data?: Record<string, unknown>;
|
|
3410
|
+
}) => ReactNode;
|
|
3411
|
+
displayFormattedOption?: boolean;
|
|
3412
|
+
isOptionDisabled?: (option: ISelectOption<T>) => boolean;
|
|
3413
|
+
name?: string;
|
|
3414
|
+
id?: string;
|
|
3415
|
+
className?: string;
|
|
3416
|
+
'aria-label'?: string;
|
|
3417
|
+
'aria-labelledby'?: string;
|
|
3418
|
+
'aria-describedby'?: string;
|
|
3419
|
+
inputRef?: default_2.Ref<HTMLInputElement>;
|
|
3420
|
+
controlShouldRenderValue?: boolean;
|
|
3421
|
+
blurInputOnSelect?: boolean;
|
|
3422
|
+
tabSelectsValue?: boolean;
|
|
3423
|
+
backspaceRemovesValue?: boolean;
|
|
3424
|
+
onSelectionComplete?: (value: string, option: ISelectOption<T> | null) => void;
|
|
3425
|
+
children?: ReactNode;
|
|
3426
|
+
}
|
|
3427
|
+
|
|
3428
|
+
export declare interface SelectGroupHeadingProps {
|
|
3429
|
+
className?: string;
|
|
3430
|
+
children: ReactNode;
|
|
3431
|
+
}
|
|
3432
|
+
|
|
3433
|
+
export declare interface SelectGroupProps<T = unknown> {
|
|
3434
|
+
className?: string;
|
|
3435
|
+
children: ReactNode;
|
|
3436
|
+
data: ISelectOptionGroup<T>;
|
|
3437
|
+
label: string;
|
|
3438
|
+
options: ISelectOption<T>[];
|
|
3439
|
+
}
|
|
3440
|
+
|
|
3441
|
+
export declare interface SelectInputProps extends Omit<default_2.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
3442
|
+
isHidden?: boolean;
|
|
3443
|
+
inputClassName?: string;
|
|
3444
|
+
inputStyle?: CSSProperties;
|
|
3445
|
+
}
|
|
3446
|
+
|
|
3447
|
+
export declare interface SelectMenuListProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
3448
|
+
className?: string;
|
|
3449
|
+
children: ReactNode;
|
|
3450
|
+
isLoading?: boolean;
|
|
3451
|
+
maxHeight?: number;
|
|
3452
|
+
}
|
|
3453
|
+
|
|
3454
|
+
export declare interface SelectMenuProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
3455
|
+
className?: string;
|
|
3456
|
+
children: ReactNode;
|
|
3457
|
+
placement?: 'auto' | 'bottom' | 'top';
|
|
3458
|
+
position?: 'absolute' | 'fixed';
|
|
3459
|
+
}
|
|
3460
|
+
|
|
3461
|
+
export declare interface SelectMessageProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
3462
|
+
icon?: default_2.ReactElement;
|
|
3463
|
+
className?: string;
|
|
3464
|
+
children: ReactNode;
|
|
3465
|
+
}
|
|
3466
|
+
|
|
3467
|
+
export declare interface SelectMultiValueProps<T = unknown> {
|
|
3468
|
+
className?: string;
|
|
3469
|
+
children?: ReactNode;
|
|
3470
|
+
data: ISelectOption<T>;
|
|
3471
|
+
index: number;
|
|
3472
|
+
isDisabled?: boolean;
|
|
3473
|
+
isFocused?: boolean;
|
|
3474
|
+
onRemove?: (item: ISelectOption<T>) => void;
|
|
3475
|
+
}
|
|
3476
|
+
|
|
3477
|
+
export declare interface SelectNoOptionsMessageProps {
|
|
3478
|
+
className?: string;
|
|
3479
|
+
children?: ReactNode;
|
|
3480
|
+
inputValue?: string;
|
|
3481
|
+
}
|
|
3482
|
+
|
|
3483
|
+
export declare interface SelectPlaceholderProps {
|
|
3484
|
+
className?: string;
|
|
3485
|
+
children: ReactNode;
|
|
3486
|
+
}
|
|
3487
|
+
|
|
3488
|
+
export declare interface SelectRootProps<T = unknown> extends Omit<default_2.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange'> {
|
|
3489
|
+
size?: SelectSize;
|
|
3490
|
+
color?: 'primary' | 'positive' | 'warning' | 'negative';
|
|
3491
|
+
isInvalid?: boolean;
|
|
3492
|
+
isDisabled?: boolean;
|
|
3493
|
+
className?: string;
|
|
3494
|
+
children: ReactNode;
|
|
3495
|
+
downshiftParams?: IDownshiftHookParams<T>;
|
|
3496
|
+
}
|
|
3497
|
+
|
|
3498
|
+
export declare interface SelectSingleValueProps<T = unknown> {
|
|
3499
|
+
className?: string;
|
|
3500
|
+
children?: ReactNode;
|
|
3501
|
+
data: ISelectOption<T>;
|
|
3502
|
+
isDisabled?: boolean;
|
|
3503
|
+
}
|
|
3504
|
+
|
|
3505
|
+
export declare type SelectSize = 'sm' | 'md' | 'lg';
|
|
3506
|
+
|
|
3507
|
+
export declare interface SelectSizeConfig {
|
|
3508
|
+
trigger: string;
|
|
3509
|
+
control: string;
|
|
3510
|
+
input: string;
|
|
3511
|
+
placeholder: string;
|
|
3512
|
+
singleValue: string;
|
|
3513
|
+
multiValue: string;
|
|
3514
|
+
multiValueLabel: string;
|
|
3515
|
+
multiValueRemove: string;
|
|
3516
|
+
indicatorsContainer: string;
|
|
3517
|
+
clearIndicator: string;
|
|
3518
|
+
dropdownIndicator: string;
|
|
3519
|
+
indicatorSeparator: string;
|
|
3520
|
+
loadingIndicator: string;
|
|
3521
|
+
menu: string;
|
|
3522
|
+
menuList: string;
|
|
3523
|
+
option: string;
|
|
3524
|
+
group: string;
|
|
3525
|
+
groupHeading: string;
|
|
3526
|
+
noOptionsMessage: string;
|
|
3527
|
+
loadingMessage: string;
|
|
3528
|
+
message: string;
|
|
3529
|
+
icon: string;
|
|
3530
|
+
}
|
|
3531
|
+
|
|
3532
|
+
export declare type SelectValue<T = unknown> = ISelectOption<T> | ISelectOption<T>[] | null;
|
|
3533
|
+
|
|
3534
|
+
export declare interface SelectValueContainerProps {
|
|
3535
|
+
className?: string;
|
|
3536
|
+
children: ReactNode;
|
|
3537
|
+
isMulti?: boolean;
|
|
3538
|
+
}
|
|
3539
|
+
|
|
3082
3540
|
export declare type Size = {
|
|
3083
3541
|
width: number | string;
|
|
3084
3542
|
height: number | string;
|
|
@@ -3106,6 +3564,15 @@ export declare interface SnackbarProps extends default_2.HTMLAttributes<HTMLDivE
|
|
|
3106
3564
|
|
|
3107
3565
|
export declare type SnackbarSize = 'sm' | 'md' | 'lg';
|
|
3108
3566
|
|
|
3567
|
+
export declare interface SortableFileTabProps<T = unknown> {
|
|
3568
|
+
tab: T;
|
|
3569
|
+
value: string;
|
|
3570
|
+
isActive: boolean;
|
|
3571
|
+
onTabClick: (value: string) => void;
|
|
3572
|
+
dragOverlay?: boolean;
|
|
3573
|
+
className?: string;
|
|
3574
|
+
}
|
|
3575
|
+
|
|
3109
3576
|
export declare interface SubMenuProps {
|
|
3110
3577
|
label: string;
|
|
3111
3578
|
icon?: React.ReactNode;
|
|
@@ -3114,92 +3581,153 @@ export declare interface SubMenuProps {
|
|
|
3114
3581
|
className?: string;
|
|
3115
3582
|
}
|
|
3116
3583
|
|
|
3117
|
-
export declare
|
|
3118
|
-
|
|
3119
|
-
export declare type SurfaceBorder = 'none' | 'subtle' | 'strong';
|
|
3120
|
-
|
|
3121
|
-
export declare type SurfaceDepth = 0 | 1 | 2 | 3 | 4;
|
|
3584
|
+
export declare type TabColor = 'primary' | 'positive' | 'negative' | 'warning';
|
|
3122
3585
|
|
|
3123
|
-
export declare interface
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
*/
|
|
3139
|
-
border?: SurfaceBorder;
|
|
3140
|
-
/**
|
|
3141
|
-
* Surface variant
|
|
3142
|
-
* - 'default': Standard depth-based surface
|
|
3143
|
-
* - 'panel': VSCode panel style (uses panel background/border variables)
|
|
3144
|
-
*/
|
|
3145
|
-
variant?: 'default' | 'panel';
|
|
3146
|
-
className?: string;
|
|
3147
|
-
children: ReactNode;
|
|
3148
|
-
style?: React.CSSProperties;
|
|
3586
|
+
export declare interface TabColorConfig {
|
|
3587
|
+
active: {
|
|
3588
|
+
bg: string;
|
|
3589
|
+
text: string;
|
|
3590
|
+
border: string;
|
|
3591
|
+
};
|
|
3592
|
+
inactive: {
|
|
3593
|
+
bg: string;
|
|
3594
|
+
text: string;
|
|
3595
|
+
border: string;
|
|
3596
|
+
};
|
|
3597
|
+
hover: {
|
|
3598
|
+
bg: string;
|
|
3599
|
+
text: string;
|
|
3600
|
+
};
|
|
3149
3601
|
}
|
|
3150
3602
|
|
|
3151
|
-
export declare type
|
|
3603
|
+
export declare type TabData<T = unknown> = TabItemProps & (T extends object ? T : object);
|
|
3152
3604
|
|
|
3153
|
-
export declare
|
|
3605
|
+
export declare const TabItem: default_2.ForwardRefExoticComponent<TabItemProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
3606
|
+
|
|
3607
|
+
export declare interface TabItemProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'content'> {
|
|
3154
3608
|
value: string;
|
|
3155
|
-
label
|
|
3609
|
+
label?: ReactNode;
|
|
3156
3610
|
icon?: ReactNode;
|
|
3157
3611
|
disabled?: boolean;
|
|
3158
|
-
|
|
3159
|
-
touched?: boolean;
|
|
3160
|
-
closable?: boolean;
|
|
3612
|
+
active?: boolean;
|
|
3161
3613
|
onClose?: (value: string) => void;
|
|
3614
|
+
closable?: boolean;
|
|
3615
|
+
touched?: boolean;
|
|
3616
|
+
content?: ReactNode;
|
|
3162
3617
|
renderTab?: (props: {
|
|
3163
|
-
tab:
|
|
3618
|
+
tab: any;
|
|
3164
3619
|
isActive: boolean;
|
|
3165
3620
|
onClick: () => void;
|
|
3166
3621
|
onClose?: () => void;
|
|
3167
3622
|
}) => ReactNode;
|
|
3168
|
-
data?: T;
|
|
3169
|
-
[key: string]: unknown;
|
|
3170
3623
|
}
|
|
3171
3624
|
|
|
3172
|
-
export declare const
|
|
3173
|
-
|
|
3174
|
-
|
|
3625
|
+
export declare const TabNavContainer: default_2.ForwardRefExoticComponent<TabNavContainerProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
3626
|
+
|
|
3627
|
+
export declare interface TabNavContainerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
3628
|
+
isActive?: boolean;
|
|
3629
|
+
isDesactive?: boolean;
|
|
3630
|
+
children: ReactNode;
|
|
3631
|
+
}
|
|
3632
|
+
|
|
3633
|
+
export declare const Tabs: TabsComponent;
|
|
3634
|
+
|
|
3635
|
+
declare type TabsComponent = typeof TabsMain & {
|
|
3636
|
+
Item: typeof TabItem;
|
|
3175
3637
|
};
|
|
3176
3638
|
|
|
3177
|
-
declare
|
|
3639
|
+
export declare interface TabsContextType {
|
|
3640
|
+
activeTab: string;
|
|
3641
|
+
onTabChange: (value: string) => void;
|
|
3642
|
+
variant: TabVariant;
|
|
3643
|
+
color: TabColor;
|
|
3644
|
+
size: TabSize;
|
|
3645
|
+
showIcons: boolean;
|
|
3646
|
+
disabled: boolean;
|
|
3647
|
+
}
|
|
3648
|
+
|
|
3649
|
+
export declare type TabSize = 'sm' | 'md' | 'lg';
|
|
3650
|
+
|
|
3651
|
+
export declare interface TabSizeConfig {
|
|
3652
|
+
padding: string;
|
|
3653
|
+
text: string;
|
|
3654
|
+
icon: string;
|
|
3655
|
+
gap: string;
|
|
3656
|
+
badge?: string;
|
|
3657
|
+
}
|
|
3658
|
+
|
|
3659
|
+
declare const TabsMain: {
|
|
3660
|
+
<T = unknown>({ tabs, valueKey, labelKey, activeTab, defaultValue, variant, color, size, draggable, showIcons, disabled, className, tabListClassName, onTabChange, onReorder, renderTab, children, }: TabsProps<T>): JSX_2.Element;
|
|
3661
|
+
displayName: string;
|
|
3662
|
+
};
|
|
3178
3663
|
|
|
3179
3664
|
export declare interface TabsProps<T = unknown> {
|
|
3180
|
-
tabs
|
|
3665
|
+
tabs?: T[];
|
|
3666
|
+
valueKey?: string;
|
|
3667
|
+
labelKey?: string;
|
|
3181
3668
|
activeTab?: string;
|
|
3182
|
-
|
|
3669
|
+
defaultValue?: string;
|
|
3183
3670
|
variant?: TabVariant;
|
|
3184
3671
|
color?: TabColor;
|
|
3185
3672
|
size?: TabSize;
|
|
3186
3673
|
draggable?: boolean;
|
|
3187
3674
|
showIcons?: boolean;
|
|
3675
|
+
disabled?: boolean;
|
|
3188
3676
|
className?: string;
|
|
3189
3677
|
tabListClassName?: string;
|
|
3190
3678
|
contentClassName?: string;
|
|
3191
3679
|
onTabChange?: (value: string) => void;
|
|
3192
|
-
onReorder?: (tabs:
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3680
|
+
onReorder?: (tabs: T[], droppedTab?: T) => void;
|
|
3681
|
+
renderTab?: (props: {
|
|
3682
|
+
tab: TabData<T>;
|
|
3683
|
+
isActive: boolean;
|
|
3684
|
+
onClick: () => void;
|
|
3685
|
+
onClose?: () => void;
|
|
3197
3686
|
}) => ReactNode;
|
|
3198
3687
|
children?: ReactNode;
|
|
3199
3688
|
}
|
|
3200
3689
|
|
|
3201
3690
|
export declare type TabVariant = 'default' | 'file';
|
|
3202
3691
|
|
|
3692
|
+
export declare interface ToastApi {
|
|
3693
|
+
/** Displays a new toast notification. Returns the unique ID of the new toast. */
|
|
3694
|
+
toast: (options: ToastOptions) => string;
|
|
3695
|
+
/** Closes a specific toast by its ID. */
|
|
3696
|
+
close: (id: string) => void;
|
|
3697
|
+
/** Closes all currently visible toasts, optionally filtered by position. */
|
|
3698
|
+
closeAll: (position?: ToastPosition) => void;
|
|
3699
|
+
}
|
|
3700
|
+
|
|
3701
|
+
export declare const ToastContext: Context<InternalToastContextValue | undefined>;
|
|
3702
|
+
|
|
3703
|
+
/** Options passed when calling useToast(options) */
|
|
3704
|
+
export declare interface ToastHookOptions {
|
|
3705
|
+
containerStyle?: React.CSSProperties;
|
|
3706
|
+
}
|
|
3707
|
+
|
|
3708
|
+
export declare interface ToastItem extends Omit<ToastOptions, 'render'> {
|
|
3709
|
+
id: string;
|
|
3710
|
+
render: ({ onClose }: {
|
|
3711
|
+
onClose: () => void;
|
|
3712
|
+
}) => React.ReactNode;
|
|
3713
|
+
containerStyle?: React.CSSProperties;
|
|
3714
|
+
}
|
|
3715
|
+
|
|
3716
|
+
export declare interface ToastOptions {
|
|
3717
|
+
position?: ToastPosition;
|
|
3718
|
+
duration?: number | 'infinite';
|
|
3719
|
+
keepVisibleOnHover?: boolean;
|
|
3720
|
+
render: ({ onClose }: {
|
|
3721
|
+
onClose: () => void;
|
|
3722
|
+
}) => React.ReactNode;
|
|
3723
|
+
}
|
|
3724
|
+
|
|
3725
|
+
export declare type ToastPosition = (typeof POSITIONS)[number];
|
|
3726
|
+
|
|
3727
|
+
export declare const ToastProvider: ({ children }: {
|
|
3728
|
+
children: React.ReactNode;
|
|
3729
|
+
}) => JSX_2.Element;
|
|
3730
|
+
|
|
3203
3731
|
export declare const Toggle: {
|
|
3204
3732
|
({ label, checked, defaultChecked, disabled, size, color, icons, onChange, className, id, name, ...rest }: ToggleProps): JSX_2.Element;
|
|
3205
3733
|
displayName: string;
|
|
@@ -3257,6 +3785,10 @@ export declare interface TooltipProps {
|
|
|
3257
3785
|
trigger?: 'hover' | 'click';
|
|
3258
3786
|
}
|
|
3259
3787
|
|
|
3788
|
+
export declare const useTabsContext: () => TabsContextType;
|
|
3789
|
+
|
|
3790
|
+
export declare const useToast: (options?: ToastHookOptions) => ToastApi;
|
|
3791
|
+
|
|
3260
3792
|
export declare type variantTextClasses = {
|
|
3261
3793
|
outline: string;
|
|
3262
3794
|
solid: string;
|