@ws-ui/ui-components 1.0.7 → 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/README.md +195 -195
- package/dist/index.cjs +15 -15
- package/dist/index.d.ts +42 -22
- package/dist/index.js +4434 -4364
- package/dist/qodly.svg +14 -14
- package/dist/ui-components.css +1 -1
- package/package.json +106 -106
package/dist/index.d.ts
CHANGED
|
@@ -2904,23 +2904,24 @@ export declare type OptionGenerator<T = unknown> = (inputValue: string, currentO
|
|
|
2904
2904
|
|
|
2905
2905
|
export declare const Panel: default_2.ForwardRefExoticComponent<PanelProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
2906
2906
|
|
|
2907
|
-
export declare type PanelDepth = 0 | 1 | 2 | 3 | 4;
|
|
2907
|
+
export declare type PanelDepth = 0 | 1 | 2 | 3 | 4 | 5;
|
|
2908
2908
|
|
|
2909
2909
|
export declare interface PanelProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
2910
2910
|
/**
|
|
2911
|
-
* The depth/elevation level of the panel (0-
|
|
2911
|
+
* The depth/elevation level of the panel (0-5)
|
|
2912
2912
|
* - 0: Root/Editor background (default)
|
|
2913
2913
|
* - 1: Primary panel/sidebar
|
|
2914
2914
|
* - 2: Secondary panel/card
|
|
2915
2915
|
* - 3: Elevated card/modal
|
|
2916
|
-
* - 4:
|
|
2916
|
+
* - 4: top elevation (tooltips, popovers)
|
|
2917
|
+
* - 5: outside/sticky elements
|
|
2917
2918
|
*/
|
|
2918
2919
|
depth?: PanelDepth;
|
|
2919
2920
|
children: ReactNode;
|
|
2920
2921
|
/**
|
|
2921
2922
|
* the type of border to apply diferent border color bor tabs and normal panel
|
|
2922
2923
|
*/
|
|
2923
|
-
contentType?: 'tabs' | 'primary' | '
|
|
2924
|
+
contentType?: 'tabs' | 'primary' | 'light' | 'default';
|
|
2924
2925
|
/**
|
|
2925
2926
|
* Whether the panel is disabled.
|
|
2926
2927
|
* If true, changes text color to inactive-text.
|
|
@@ -3599,22 +3600,27 @@ export declare interface TabColorConfig {
|
|
|
3599
3600
|
};
|
|
3600
3601
|
}
|
|
3601
3602
|
|
|
3602
|
-
export declare type
|
|
3603
|
-
|
|
3603
|
+
export declare type TabData<T = unknown> = TabItemProps & (T extends object ? T : object);
|
|
3604
|
+
|
|
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'> {
|
|
3608
|
+
value: string;
|
|
3604
3609
|
label?: ReactNode;
|
|
3605
3610
|
icon?: ReactNode;
|
|
3606
3611
|
disabled?: boolean;
|
|
3607
|
-
|
|
3608
|
-
touched?: boolean;
|
|
3609
|
-
closable?: boolean;
|
|
3612
|
+
active?: boolean;
|
|
3610
3613
|
onClose?: (value: string) => void;
|
|
3614
|
+
closable?: boolean;
|
|
3615
|
+
touched?: boolean;
|
|
3616
|
+
content?: ReactNode;
|
|
3611
3617
|
renderTab?: (props: {
|
|
3612
|
-
tab:
|
|
3618
|
+
tab: any;
|
|
3613
3619
|
isActive: boolean;
|
|
3614
3620
|
onClick: () => void;
|
|
3615
3621
|
onClose?: () => void;
|
|
3616
3622
|
}) => ReactNode;
|
|
3617
|
-
}
|
|
3623
|
+
}
|
|
3618
3624
|
|
|
3619
3625
|
export declare const TabNavContainer: default_2.ForwardRefExoticComponent<TabNavContainerProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
3620
3626
|
|
|
@@ -3624,11 +3630,22 @@ export declare interface TabNavContainerProps extends Omit<React.HTMLAttributes<
|
|
|
3624
3630
|
children: ReactNode;
|
|
3625
3631
|
}
|
|
3626
3632
|
|
|
3627
|
-
export declare const Tabs:
|
|
3628
|
-
|
|
3629
|
-
|
|
3633
|
+
export declare const Tabs: TabsComponent;
|
|
3634
|
+
|
|
3635
|
+
declare type TabsComponent = typeof TabsMain & {
|
|
3636
|
+
Item: typeof TabItem;
|
|
3630
3637
|
};
|
|
3631
3638
|
|
|
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
|
+
|
|
3632
3649
|
export declare type TabSize = 'sm' | 'md' | 'lg';
|
|
3633
3650
|
|
|
3634
3651
|
export declare interface TabSizeConfig {
|
|
@@ -3639,29 +3656,30 @@ export declare interface TabSizeConfig {
|
|
|
3639
3656
|
badge?: string;
|
|
3640
3657
|
}
|
|
3641
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
|
+
};
|
|
3663
|
+
|
|
3642
3664
|
export declare interface TabsProps<T = unknown> {
|
|
3643
|
-
tabs
|
|
3665
|
+
tabs?: T[];
|
|
3644
3666
|
valueKey?: string;
|
|
3645
3667
|
labelKey?: string;
|
|
3646
3668
|
activeTab?: string;
|
|
3647
|
-
|
|
3669
|
+
defaultValue?: string;
|
|
3648
3670
|
variant?: TabVariant;
|
|
3649
3671
|
color?: TabColor;
|
|
3650
3672
|
size?: TabSize;
|
|
3651
3673
|
draggable?: boolean;
|
|
3652
3674
|
showIcons?: boolean;
|
|
3675
|
+
disabled?: boolean;
|
|
3653
3676
|
className?: string;
|
|
3654
3677
|
tabListClassName?: string;
|
|
3655
3678
|
contentClassName?: string;
|
|
3656
3679
|
onTabChange?: (value: string) => void;
|
|
3657
3680
|
onReorder?: (tabs: T[], droppedTab?: T) => void;
|
|
3658
|
-
renderTabList?: (props: {
|
|
3659
|
-
tabs: T[];
|
|
3660
|
-
activeTab: string;
|
|
3661
|
-
onTabClick: (value: string) => void;
|
|
3662
|
-
}) => ReactNode;
|
|
3663
3681
|
renderTab?: (props: {
|
|
3664
|
-
tab:
|
|
3682
|
+
tab: TabData<T>;
|
|
3665
3683
|
isActive: boolean;
|
|
3666
3684
|
onClick: () => void;
|
|
3667
3685
|
onClose?: () => void;
|
|
@@ -3767,6 +3785,8 @@ export declare interface TooltipProps {
|
|
|
3767
3785
|
trigger?: 'hover' | 'click';
|
|
3768
3786
|
}
|
|
3769
3787
|
|
|
3788
|
+
export declare const useTabsContext: () => TabsContextType;
|
|
3789
|
+
|
|
3770
3790
|
export declare const useToast: (options?: ToastHookOptions) => ToastApi;
|
|
3771
3791
|
|
|
3772
3792
|
export declare type variantTextClasses = {
|