@npm-questionpro/wick-ui-lib 1.9.0 → 1.11.0
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/src/base/ui/button.d.ts +1 -2
- package/dist/src/components/pagination/WuPagination.d.ts +1 -1
- package/dist/src/components/stepper/WuStepper.d.ts +8 -5
- package/dist/src/components/table/components/table/WuTable.d.ts +6 -9
- package/dist/src/components/table/hooks/useTableCore.d.ts +14 -0
- package/dist/src/components/table/utils/data.d.ts +1 -0
- package/dist/src/components/table/utils/variantClass.d.ts +3 -0
- package/dist/src/components/tooltip/WuTooltip.d.ts +2 -0
- package/dist/style.css +1 -1
- package/dist/wick-ui-lib/es/index.js +5222 -3517
- package/dist/wick-ui-lib/umd/index.js +7 -4
- package/package.json +6 -5
|
@@ -5,9 +5,8 @@ export declare const buttonVariants: (props?: ({
|
|
|
5
5
|
color?: "error" | "primary" | "upgrade" | null | undefined;
|
|
6
6
|
variant?: "rounded" | "link" | "primary" | "secondary" | "outline" | "iconOnly" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
8
|
-
export interface IButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
+
export interface IButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color'>, VariantProps<typeof buttonVariants> {
|
|
9
9
|
asChild?: boolean;
|
|
10
|
-
color?: 'primary' | 'upgrade' | 'error';
|
|
11
10
|
}
|
|
12
11
|
declare const Button: React.ForwardRefExoticComponent<IButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
13
12
|
export { Button };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface IWuPaginationProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
totalRows: number;
|
|
4
|
-
initialPage
|
|
4
|
+
initialPage?: number;
|
|
5
5
|
initialPageSize: number;
|
|
6
6
|
onPageChange?: (page: number) => void;
|
|
7
7
|
disabled?: boolean;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
export interface IWuStepperProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
3
|
-
onChange?: (
|
|
3
|
+
onChange?: (value: number) => void;
|
|
4
4
|
readonly?: boolean;
|
|
5
|
-
resetInvalidValueOnBlur?: boolean;
|
|
6
5
|
invalid?: boolean;
|
|
7
|
-
|
|
6
|
+
Label?: React.ReactNode;
|
|
8
7
|
defaultValue?: number;
|
|
9
8
|
dir?: 'ltr' | 'rtl';
|
|
9
|
+
step?: number;
|
|
10
|
+
min?: number;
|
|
11
|
+
max?: number;
|
|
10
12
|
labelPosition?: 'left' | 'top';
|
|
13
|
+
resetInvalidValueOnBlur?: boolean;
|
|
11
14
|
}
|
|
12
|
-
export declare const WuStepper: React.
|
|
15
|
+
export declare const WuStepper: React.FC<IWuStepperProps>;
|
|
@@ -11,24 +11,21 @@ export interface IWuTableProps<T> extends React.TableHTMLAttributes<HTMLTableEle
|
|
|
11
11
|
enabled?: boolean;
|
|
12
12
|
initial?: ColumnSort[];
|
|
13
13
|
};
|
|
14
|
+
isLoading?: boolean;
|
|
14
15
|
filterText?: string;
|
|
15
16
|
pagination?: {
|
|
16
17
|
pageIndex: number;
|
|
17
18
|
pageSize: number;
|
|
18
19
|
};
|
|
20
|
+
stickyHeader?: boolean;
|
|
21
|
+
HeaderAction?: React.ReactNode;
|
|
22
|
+
CustomLoader?: React.ReactNode;
|
|
23
|
+
NoDataContent?: React.ReactNode;
|
|
19
24
|
rowSelection?: {
|
|
20
25
|
isEnabled: boolean;
|
|
21
26
|
selectedRows: T[];
|
|
22
27
|
onRowSelect: React.Dispatch<React.SetStateAction<T[]>>;
|
|
23
28
|
rowUniqueKey: string;
|
|
24
29
|
};
|
|
25
|
-
HeaderAction?: React.ReactNode;
|
|
26
|
-
NoDataContent?: React.ReactNode;
|
|
27
|
-
CustomLoader?: React.ReactNode;
|
|
28
|
-
isLoading?: boolean;
|
|
29
|
-
stickyHeader?: boolean;
|
|
30
30
|
}
|
|
31
|
-
export declare const WuTable: {
|
|
32
|
-
<T>({ data, columns, caption, variant, sort, filterText, size, pagination, rowSelection, HeaderAction, NoDataContent, CustomLoader, isLoading, stickyHeader, ...rest }: IWuTableProps<T>): React.JSX.Element;
|
|
33
|
-
displayName: string;
|
|
34
|
-
};
|
|
31
|
+
export declare const WuTable: <T>({ data, columns, variant, size, sort, filterText, pagination, stickyHeader, HeaderAction, CustomLoader, NoDataContent, isLoading, caption, rowSelection, ...rest }: IWuTableProps<T>) => React.JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IWuTableColumnDef } from '../types/IWuTableColumnDef';
|
|
2
|
+
export declare function useWuTableCore<T>({ data, columns, rowSelection, }: {
|
|
3
|
+
data: T[];
|
|
4
|
+
columns: IWuTableColumnDef<T>[];
|
|
5
|
+
rowSelection?: {
|
|
6
|
+
isEnabled: boolean;
|
|
7
|
+
selectedRows: T[];
|
|
8
|
+
onRowSelect: React.Dispatch<React.SetStateAction<T[]>>;
|
|
9
|
+
rowUniqueKey: string;
|
|
10
|
+
};
|
|
11
|
+
}): {
|
|
12
|
+
finalColumns: IWuTableColumnDef<T>[];
|
|
13
|
+
rowSelectionState: Record<number, boolean>;
|
|
14
|
+
};
|
|
@@ -7,5 +7,7 @@ export interface IWuTooltipProps extends Omit<React.HTMLAttributes<HTMLDivElemen
|
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
dir?: 'rtl' | 'ltr';
|
|
9
9
|
showArrow?: boolean;
|
|
10
|
+
open?: boolean;
|
|
11
|
+
onOpenChange?: (open: boolean) => void;
|
|
10
12
|
}
|
|
11
13
|
export declare const WuTooltip: React.ForwardRefExoticComponent<IWuTooltipProps & React.RefAttributes<HTMLSpanElement>>;
|