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