@ws-ui/ui-components 1.0.5 → 1.0.7

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
@@ -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,34 @@ 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;
2908
+
2909
+ export declare interface PanelProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
2910
+ /**
2911
+ * The depth/elevation level of the panel (0-4)
2912
+ * - 0: Root/Editor background (default)
2913
+ * - 1: Primary panel/sidebar
2914
+ * - 2: Secondary panel/card
2915
+ * - 3: Elevated card/modal
2916
+ * - 4: Highest elevation (tooltips, popovers)
2917
+ */
2918
+ depth?: PanelDepth;
2919
+ children: ReactNode;
2920
+ /**
2921
+ * the type of border to apply diferent border color bor tabs and normal panel
2922
+ */
2923
+ contentType?: 'tabs' | 'primary' | 'normal';
2924
+ /**
2925
+ * Whether the panel is disabled.
2926
+ * If true, changes text color to inactive-text.
2927
+ */
2928
+ disabled?: boolean;
2929
+ }
2930
+
2771
2931
  export declare const Pill: ForwardRefExoticComponent<PillProps & RefAttributes<HTMLDivElement>> & {
2772
2932
  Root: ForwardRefExoticComponent<PillRootProps & RefAttributes<HTMLDivElement>>;
2773
2933
  Text: ForwardRefExoticComponent<PillTextProps & RefAttributes<HTMLSpanElement>>;
@@ -2834,6 +2994,8 @@ export declare interface PillTextProps extends HTMLAttributes<HTMLSpanElement> {
2834
2994
  children: ReactNode;
2835
2995
  }
2836
2996
 
2997
+ export declare const POSITIONS: readonly ["top", "top-left", "top-right", "bottom", "bottom-left", "bottom-right"];
2998
+
2837
2999
  export { Qodly }
2838
3000
 
2839
3001
  export declare const Radio: {
@@ -3060,6 +3222,20 @@ export declare interface ResizableProps {
3060
3222
  * Ref to the resizable element
3061
3223
  */
3062
3224
  ref?: Ref<HTMLElement>;
3225
+ /**
3226
+ * The depth/elevation level of the panel (0-4)
3227
+ * - 0: Root/Editor background (default)
3228
+ * - 1: Primary panel/sidebar
3229
+ * - 2: Secondary panel/card
3230
+ * - 3: Elevated card/modal
3231
+ * - 4: Highest elevation (tooltips, popovers)
3232
+ */
3233
+ depth?: PanelDepth;
3234
+ /**
3235
+ * Whether the resizable component is disabled.
3236
+ * If true, changes text color to inactive-text.
3237
+ */
3238
+ disabled?: boolean;
3063
3239
  }
3064
3240
 
3065
3241
  export declare type ResizeCallback = (event: MouseEvent | TouchEvent, direction: ResizeDirection, elementRef: HTMLElement, delta: NumberSize) => void;
@@ -3079,6 +3255,287 @@ export declare type ResizeEnable = {
3079
3255
 
3080
3256
  export declare type ResizeStartCallback = (event: React.MouseEvent<HTMLElement> | React.TouchEvent<HTMLElement>, direction: ResizeDirection, elementRef: HTMLElement) => void | boolean;
3081
3257
 
3258
+ export declare const Select: {
3259
+ Root: {
3260
+ <T = unknown>({ size, color, isInvalid, isDisabled, className, children, downshiftParams, ...props }: SelectRootProps<T>): JSX_2.Element;
3261
+ displayName: string;
3262
+ };
3263
+ Control: ForwardRefExoticComponent<SelectControlProps & RefAttributes<HTMLDivElement>>;
3264
+ ValueContainer: {
3265
+ ({ className, children, isMulti, }: SelectValueContainerProps): JSX_2.Element;
3266
+ displayName: string;
3267
+ };
3268
+ Input: ForwardRefExoticComponent<SelectInputProps & RefAttributes<HTMLInputElement>>;
3269
+ Placeholder: {
3270
+ ({ className, children }: SelectPlaceholderProps): JSX_2.Element;
3271
+ displayName: string;
3272
+ };
3273
+ SingleValue: {
3274
+ <T>({ className, children, data, isDisabled, }: SelectSingleValueProps<T>): JSX_2.Element;
3275
+ displayName: string;
3276
+ };
3277
+ MultiValue: {
3278
+ <T>({ className, children, data, isDisabled, isFocused, onRemove, }: SelectMultiValueProps<T>): JSX_2.Element;
3279
+ displayName: string;
3280
+ };
3281
+ ClearIndicator: {
3282
+ ({ color: propColor, className, children, onClick, isDisabled: propIsDisabled, ...props }: SelectClearIndicatorProps): JSX_2.Element | null;
3283
+ displayName: string;
3284
+ };
3285
+ ClearSearchIndicator: ({ className, children, onClick, isDisabled: propIsDisabled, ...props }: SelectClearSearchIndicatorProps) => JSX_2.Element | null;
3286
+ DropdownIndicator: {
3287
+ ({ color: propColor, className, children, onClick, isDisabled: propIsDisabled, ...props }: SelectDropdownIndicatorProps): JSX_2.Element;
3288
+ displayName: string;
3289
+ };
3290
+ Menu: ForwardRefExoticComponent<SelectMenuProps & RefAttributes<HTMLDivElement>>;
3291
+ MenuList: ForwardRefExoticComponent<SelectMenuListProps & RefAttributes<HTMLDivElement>>;
3292
+ Option: {
3293
+ <T>({ className, children, data, isDisabled, isFocused, isSelected, innerProps, ...props }: ISelectOptionProps<T>): JSX_2.Element;
3294
+ displayName: string;
3295
+ };
3296
+ Group: {
3297
+ <T>({ className, children, data, label, }: SelectGroupProps<T>): JSX_2.Element;
3298
+ displayName: string;
3299
+ };
3300
+ GroupHeading: {
3301
+ ({ className, children, }: SelectGroupHeadingProps): JSX_2.Element;
3302
+ displayName: string;
3303
+ };
3304
+ NoOptionsMessage: {
3305
+ ({ className, children, inputValue, }: SelectNoOptionsMessageProps): JSX_2.Element;
3306
+ displayName: string;
3307
+ };
3308
+ Message: {
3309
+ ({ icon, className, children, ...props }: SelectMessageProps): JSX_2.Element;
3310
+ displayName: string;
3311
+ };
3312
+ Field: {
3313
+ <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;
3314
+ displayName: string;
3315
+ };
3316
+ };
3317
+
3318
+ export declare interface SelectClearIndicatorProps extends default_2.HTMLAttributes<HTMLDivElement> {
3319
+ color?: SelectColor;
3320
+ className?: string;
3321
+ children?: ReactNode;
3322
+ onClick?: (event: default_2.MouseEvent) => void;
3323
+ isDisabled?: boolean;
3324
+ }
3325
+
3326
+ export declare interface SelectClearSearchIndicatorProps extends default_2.HTMLAttributes<HTMLDivElement> {
3327
+ className?: string;
3328
+ children?: ReactNode;
3329
+ onClick?: (event: default_2.MouseEvent) => void;
3330
+ isDisabled?: boolean;
3331
+ }
3332
+
3333
+ export declare type SelectColor = 'primary' | 'positive' | 'warning' | 'negative';
3334
+
3335
+ export declare interface SelectColorConfig {
3336
+ control: string;
3337
+ controlFocused: string;
3338
+ controlDisabled: string;
3339
+ controlInvalid: string;
3340
+ placeholder: string;
3341
+ singleValue: string;
3342
+ singleValueDisabled: string;
3343
+ multiValue: string;
3344
+ multiValueLabel: string;
3345
+ multiValueRemove: string;
3346
+ multiValueRemoveHover: string;
3347
+ multiValueDisabled: string;
3348
+ clearIndicator: string;
3349
+ clearIndicatorHover: string;
3350
+ dropdownIndicator: string;
3351
+ dropdownIndicatorHover: string;
3352
+ indicatorSeparator: string;
3353
+ loadingIndicator: string;
3354
+ menu: string;
3355
+ menuList: string;
3356
+ option: string;
3357
+ optionFocused: string;
3358
+ optionSelected: string;
3359
+ optionDisabled: string;
3360
+ group: string;
3361
+ groupHeading: string;
3362
+ noOptionsMessage: string;
3363
+ loadingMessage: string;
3364
+ message: string;
3365
+ messageBackground: string;
3366
+ messageBorder: string;
3367
+ icon: string;
3368
+ iconAction: string;
3369
+ iconActionHover: string;
3370
+ }
3371
+
3372
+ export declare interface SelectControlProps extends default_2.HTMLAttributes<HTMLDivElement> {
3373
+ className?: string;
3374
+ children: ReactNode;
3375
+ isFocused?: boolean;
3376
+ isDisabled?: boolean;
3377
+ }
3378
+
3379
+ export declare interface SelectDropdownIndicatorProps extends default_2.HTMLAttributes<HTMLDivElement> {
3380
+ color?: SelectColor;
3381
+ className?: string;
3382
+ children?: ReactNode;
3383
+ onClick?: (event: default_2.MouseEvent) => void;
3384
+ isDisabled?: boolean;
3385
+ }
3386
+
3387
+ export declare interface SelectFieldProps<T = unknown> extends default_2.InputHTMLAttributes<HTMLInputElement> {
3388
+ placeholder?: string;
3389
+ noOptionsMessage?: string | ((inputValue: string) => string);
3390
+ hideNoOptions?: boolean;
3391
+ loadingMessage?: string;
3392
+ isClearable?: boolean;
3393
+ usePortal?: boolean;
3394
+ isLoading?: boolean;
3395
+ isRequired?: boolean;
3396
+ hideIndicators?: boolean;
3397
+ hideDropdownIndicator?: boolean;
3398
+ closeMenuOnSelect?: boolean;
3399
+ hideSelectedOptions?: boolean;
3400
+ isSearchClearable?: boolean;
3401
+ searchPlacement?: 'trigger' | 'menu';
3402
+ onFocus?: (event: default_2.FocusEvent<HTMLElement>) => void;
3403
+ onBlur?: (event: default_2.FocusEvent<HTMLElement>) => void;
3404
+ onMenuOpen?: () => void;
3405
+ onMenuClose?: () => void;
3406
+ renderMenuHeader?: (props: IDownshiftHookReturn<T>) => ReactNode;
3407
+ formatOptionLabel?: (option: ISelectOption<T> & {
3408
+ data?: Record<string, unknown>;
3409
+ }) => ReactNode;
3410
+ displayFormattedOption?: boolean;
3411
+ isOptionDisabled?: (option: ISelectOption<T>) => boolean;
3412
+ name?: string;
3413
+ id?: string;
3414
+ className?: string;
3415
+ 'aria-label'?: string;
3416
+ 'aria-labelledby'?: string;
3417
+ 'aria-describedby'?: string;
3418
+ inputRef?: default_2.Ref<HTMLInputElement>;
3419
+ controlShouldRenderValue?: boolean;
3420
+ blurInputOnSelect?: boolean;
3421
+ tabSelectsValue?: boolean;
3422
+ backspaceRemovesValue?: boolean;
3423
+ onSelectionComplete?: (value: string, option: ISelectOption<T> | null) => void;
3424
+ children?: ReactNode;
3425
+ }
3426
+
3427
+ export declare interface SelectGroupHeadingProps {
3428
+ className?: string;
3429
+ children: ReactNode;
3430
+ }
3431
+
3432
+ export declare interface SelectGroupProps<T = unknown> {
3433
+ className?: string;
3434
+ children: ReactNode;
3435
+ data: ISelectOptionGroup<T>;
3436
+ label: string;
3437
+ options: ISelectOption<T>[];
3438
+ }
3439
+
3440
+ export declare interface SelectInputProps extends Omit<default_2.InputHTMLAttributes<HTMLInputElement>, 'size'> {
3441
+ isHidden?: boolean;
3442
+ inputClassName?: string;
3443
+ inputStyle?: CSSProperties;
3444
+ }
3445
+
3446
+ export declare interface SelectMenuListProps extends default_2.HTMLAttributes<HTMLDivElement> {
3447
+ className?: string;
3448
+ children: ReactNode;
3449
+ isLoading?: boolean;
3450
+ maxHeight?: number;
3451
+ }
3452
+
3453
+ export declare interface SelectMenuProps extends default_2.HTMLAttributes<HTMLDivElement> {
3454
+ className?: string;
3455
+ children: ReactNode;
3456
+ placement?: 'auto' | 'bottom' | 'top';
3457
+ position?: 'absolute' | 'fixed';
3458
+ }
3459
+
3460
+ export declare interface SelectMessageProps extends default_2.HTMLAttributes<HTMLDivElement> {
3461
+ icon?: default_2.ReactElement;
3462
+ className?: string;
3463
+ children: ReactNode;
3464
+ }
3465
+
3466
+ export declare interface SelectMultiValueProps<T = unknown> {
3467
+ className?: string;
3468
+ children?: ReactNode;
3469
+ data: ISelectOption<T>;
3470
+ index: number;
3471
+ isDisabled?: boolean;
3472
+ isFocused?: boolean;
3473
+ onRemove?: (item: ISelectOption<T>) => void;
3474
+ }
3475
+
3476
+ export declare interface SelectNoOptionsMessageProps {
3477
+ className?: string;
3478
+ children?: ReactNode;
3479
+ inputValue?: string;
3480
+ }
3481
+
3482
+ export declare interface SelectPlaceholderProps {
3483
+ className?: string;
3484
+ children: ReactNode;
3485
+ }
3486
+
3487
+ export declare interface SelectRootProps<T = unknown> extends Omit<default_2.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange'> {
3488
+ size?: SelectSize;
3489
+ color?: 'primary' | 'positive' | 'warning' | 'negative';
3490
+ isInvalid?: boolean;
3491
+ isDisabled?: boolean;
3492
+ className?: string;
3493
+ children: ReactNode;
3494
+ downshiftParams?: IDownshiftHookParams<T>;
3495
+ }
3496
+
3497
+ export declare interface SelectSingleValueProps<T = unknown> {
3498
+ className?: string;
3499
+ children?: ReactNode;
3500
+ data: ISelectOption<T>;
3501
+ isDisabled?: boolean;
3502
+ }
3503
+
3504
+ export declare type SelectSize = 'sm' | 'md' | 'lg';
3505
+
3506
+ export declare interface SelectSizeConfig {
3507
+ trigger: string;
3508
+ control: string;
3509
+ input: string;
3510
+ placeholder: string;
3511
+ singleValue: string;
3512
+ multiValue: string;
3513
+ multiValueLabel: string;
3514
+ multiValueRemove: string;
3515
+ indicatorsContainer: string;
3516
+ clearIndicator: string;
3517
+ dropdownIndicator: string;
3518
+ indicatorSeparator: string;
3519
+ loadingIndicator: string;
3520
+ menu: string;
3521
+ menuList: string;
3522
+ option: string;
3523
+ group: string;
3524
+ groupHeading: string;
3525
+ noOptionsMessage: string;
3526
+ loadingMessage: string;
3527
+ message: string;
3528
+ icon: string;
3529
+ }
3530
+
3531
+ export declare type SelectValue<T = unknown> = ISelectOption<T> | ISelectOption<T>[] | null;
3532
+
3533
+ export declare interface SelectValueContainerProps {
3534
+ className?: string;
3535
+ children: ReactNode;
3536
+ isMulti?: boolean;
3537
+ }
3538
+
3082
3539
  export declare type Size = {
3083
3540
  width: number | string;
3084
3541
  height: number | string;
@@ -3106,6 +3563,15 @@ export declare interface SnackbarProps extends default_2.HTMLAttributes<HTMLDivE
3106
3563
 
3107
3564
  export declare type SnackbarSize = 'sm' | 'md' | 'lg';
3108
3565
 
3566
+ export declare interface SortableFileTabProps<T = unknown> {
3567
+ tab: T;
3568
+ value: string;
3569
+ isActive: boolean;
3570
+ onTabClick: (value: string) => void;
3571
+ dragOverlay?: boolean;
3572
+ className?: string;
3573
+ }
3574
+
3109
3575
  export declare interface SubMenuProps {
3110
3576
  label: string;
3111
3577
  icon?: React.ReactNode;
@@ -3114,45 +3580,28 @@ export declare interface SubMenuProps {
3114
3580
  className?: string;
3115
3581
  }
3116
3582
 
3117
- export declare const Surface: default_2.FC<SurfaceProps>;
3118
-
3119
- export declare type SurfaceBorder = 'none' | 'subtle' | 'strong';
3120
-
3121
- export declare type SurfaceDepth = 0 | 1 | 2 | 3 | 4;
3583
+ export declare type TabColor = 'primary' | 'positive' | 'negative' | 'warning';
3122
3584
 
3123
- export declare interface SurfaceProps {
3124
- /**
3125
- * The depth/elevation level of the surface (0-4)
3126
- * - 0: Root/Editor background (default)
3127
- * - 1: Primary panel/sidebar
3128
- * - 2: Secondary panel/card
3129
- * - 3: Elevated card/modal
3130
- * - 4: Highest elevation (tooltips, popovers)
3131
- */
3132
- depth?: SurfaceDepth;
3133
- /**
3134
- * Border style
3135
- * - 'none': No border
3136
- * - 'subtle': Subtle border using --ws-surface-border-subtle
3137
- * - 'strong': Strong border using --ws-surface-border-strong
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;
3585
+ export declare interface TabColorConfig {
3586
+ active: {
3587
+ bg: string;
3588
+ text: string;
3589
+ border: string;
3590
+ };
3591
+ inactive: {
3592
+ bg: string;
3593
+ text: string;
3594
+ border: string;
3595
+ };
3596
+ hover: {
3597
+ bg: string;
3598
+ text: string;
3599
+ };
3149
3600
  }
3150
3601
 
3151
- export declare type TabColor = 'primary' | 'positive' | 'negative' | 'warning';
3152
-
3153
- export declare interface TabItemProps<T = unknown> {
3154
- value: string;
3155
- label: string;
3602
+ export declare type TabItemProps<T = unknown> = {
3603
+ value?: string;
3604
+ label?: ReactNode;
3156
3605
  icon?: ReactNode;
3157
3606
  disabled?: boolean;
3158
3607
  content?: ReactNode;
@@ -3165,19 +3614,35 @@ export declare interface TabItemProps<T = unknown> {
3165
3614
  onClick: () => void;
3166
3615
  onClose?: () => void;
3167
3616
  }) => ReactNode;
3168
- data?: T;
3169
- [key: string]: unknown;
3617
+ } & (T extends object ? T : object);
3618
+
3619
+ export declare const TabNavContainer: default_2.ForwardRefExoticComponent<TabNavContainerProps & default_2.RefAttributes<HTMLDivElement>>;
3620
+
3621
+ export declare interface TabNavContainerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
3622
+ isActive?: boolean;
3623
+ isDesactive?: boolean;
3624
+ children: ReactNode;
3170
3625
  }
3171
3626
 
3172
3627
  export declare const Tabs: {
3173
- <T = unknown>({ tabs, activeTab, defaultActiveTab, variant, color, size, draggable, showIcons, className, tabListClassName, onTabChange, onReorder, renderTabList, children, }: TabsProps<T>): JSX_2.Element;
3628
+ <T = unknown>({ tabs, valueKey, labelKey, activeTab, defaultActiveTab, variant, color, size, draggable, showIcons, className, tabListClassName, onTabChange, onReorder, renderTabList, renderTab, children, }: TabsProps<T>): JSX_2.Element;
3174
3629
  displayName: string;
3175
3630
  };
3176
3631
 
3177
- declare type TabSize = 'sm' | 'md' | 'lg';
3632
+ export declare type TabSize = 'sm' | 'md' | 'lg';
3633
+
3634
+ export declare interface TabSizeConfig {
3635
+ padding: string;
3636
+ text: string;
3637
+ icon: string;
3638
+ gap: string;
3639
+ badge?: string;
3640
+ }
3178
3641
 
3179
3642
  export declare interface TabsProps<T = unknown> {
3180
- tabs: TabItemProps<T>[];
3643
+ tabs: T[];
3644
+ valueKey?: string;
3645
+ labelKey?: string;
3181
3646
  activeTab?: string;
3182
3647
  defaultActiveTab?: string;
3183
3648
  variant?: TabVariant;
@@ -3189,17 +3654,62 @@ export declare interface TabsProps<T = unknown> {
3189
3654
  tabListClassName?: string;
3190
3655
  contentClassName?: string;
3191
3656
  onTabChange?: (value: string) => void;
3192
- onReorder?: (tabs: TabItemProps<T>[]) => void;
3657
+ onReorder?: (tabs: T[], droppedTab?: T) => void;
3193
3658
  renderTabList?: (props: {
3194
- tabs: TabItemProps<T>[];
3659
+ tabs: T[];
3195
3660
  activeTab: string;
3196
3661
  onTabClick: (value: string) => void;
3197
3662
  }) => ReactNode;
3663
+ renderTab?: (props: {
3664
+ tab: TabItemProps<T>;
3665
+ isActive: boolean;
3666
+ onClick: () => void;
3667
+ onClose?: () => void;
3668
+ }) => ReactNode;
3198
3669
  children?: ReactNode;
3199
3670
  }
3200
3671
 
3201
3672
  export declare type TabVariant = 'default' | 'file';
3202
3673
 
3674
+ export declare interface ToastApi {
3675
+ /** Displays a new toast notification. Returns the unique ID of the new toast. */
3676
+ toast: (options: ToastOptions) => string;
3677
+ /** Closes a specific toast by its ID. */
3678
+ close: (id: string) => void;
3679
+ /** Closes all currently visible toasts, optionally filtered by position. */
3680
+ closeAll: (position?: ToastPosition) => void;
3681
+ }
3682
+
3683
+ export declare const ToastContext: Context<InternalToastContextValue | undefined>;
3684
+
3685
+ /** Options passed when calling useToast(options) */
3686
+ export declare interface ToastHookOptions {
3687
+ containerStyle?: React.CSSProperties;
3688
+ }
3689
+
3690
+ export declare interface ToastItem extends Omit<ToastOptions, 'render'> {
3691
+ id: string;
3692
+ render: ({ onClose }: {
3693
+ onClose: () => void;
3694
+ }) => React.ReactNode;
3695
+ containerStyle?: React.CSSProperties;
3696
+ }
3697
+
3698
+ export declare interface ToastOptions {
3699
+ position?: ToastPosition;
3700
+ duration?: number | 'infinite';
3701
+ keepVisibleOnHover?: boolean;
3702
+ render: ({ onClose }: {
3703
+ onClose: () => void;
3704
+ }) => React.ReactNode;
3705
+ }
3706
+
3707
+ export declare type ToastPosition = (typeof POSITIONS)[number];
3708
+
3709
+ export declare const ToastProvider: ({ children }: {
3710
+ children: React.ReactNode;
3711
+ }) => JSX_2.Element;
3712
+
3203
3713
  export declare const Toggle: {
3204
3714
  ({ label, checked, defaultChecked, disabled, size, color, icons, onChange, className, id, name, ...rest }: ToggleProps): JSX_2.Element;
3205
3715
  displayName: string;
@@ -3257,6 +3767,8 @@ export declare interface TooltipProps {
3257
3767
  trigger?: 'hover' | 'click';
3258
3768
  }
3259
3769
 
3770
+ export declare const useToast: (options?: ToastHookOptions) => ToastApi;
3771
+
3260
3772
  export declare type variantTextClasses = {
3261
3773
  outline: string;
3262
3774
  solid: string;