@npm-questionpro/wick-ui-lib 0.18.2 → 0.19.1
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/sheet.d.ts +1 -1
- package/dist/src/components/appHeader/types/WuAppHeaderAccount.d.ts +35 -35
- package/dist/src/components/combobox/WuCombobox.d.ts +4 -3
- package/dist/src/components/combobox/utils/useResizeContent.d.ts +1 -1
- package/dist/src/components/formFields/WuInput/WuInput.d.ts +1 -1
- package/dist/src/components/formFields/WuTextarea/WuTextarea.d.ts +1 -0
- package/dist/src/components/menu/WuMenu.d.ts +1 -0
- package/dist/src/components/pagination/WuPagination.d.ts +1 -0
- package/dist/src/components/select/WuSelect.d.ts +5 -6
- package/dist/src/components/select/utils/useResizeContent.d.ts +1 -1
- package/dist/src/components/table/components/dataTable/WuDataTable.d.ts +13 -1
- package/dist/src/components/table/components/table/WuTable.d.ts +12 -4
- package/dist/src/components/table/hooks/useRowSelection.d.ts +15 -0
- package/dist/src/components/table/ui/_body.d.ts +2 -1
- package/dist/src/components/table/ui/_header.d.ts +3 -1
- package/dist/src/components/typography/iconClasses.d.ts +1 -1
- package/dist/src/lib/utils.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/wick-ui-lib/es/index.js +5535 -5324
- package/dist/wick-ui-lib/es/index.js.map +1 -1
- package/dist/wick-ui-lib/umd/index.js +17 -17
- package/dist/wick-ui-lib/umd/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -7,7 +7,7 @@ declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogC
|
|
|
7
7
|
declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
|
|
8
8
|
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
declare const sheetVariants: (props?: ({
|
|
10
|
-
side?: "
|
|
10
|
+
side?: "top" | "left" | "right" | "bottom" | null | undefined;
|
|
11
11
|
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
12
12
|
interface ISheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
13
13
|
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
export interface IWuAppHeaderAccount {
|
|
2
|
-
profile
|
|
3
|
-
title
|
|
4
|
-
subtitle
|
|
5
|
-
companyName
|
|
6
|
-
profilePicture
|
|
7
|
-
initials
|
|
8
|
-
sentimentIndustry
|
|
9
|
-
url
|
|
2
|
+
profile?: {
|
|
3
|
+
title?: string;
|
|
4
|
+
subtitle?: string;
|
|
5
|
+
companyName?: string;
|
|
6
|
+
profilePicture?: string;
|
|
7
|
+
initials?: string;
|
|
8
|
+
sentimentIndustry?: string;
|
|
9
|
+
url?: string;
|
|
10
10
|
};
|
|
11
|
-
license
|
|
12
|
-
expiryDate
|
|
13
|
-
expiryAfterQuarter
|
|
14
|
-
expiryDatePostFixString
|
|
15
|
-
subtitle
|
|
16
|
-
showExpiryDate
|
|
17
|
-
title
|
|
18
|
-
upgradeLink
|
|
19
|
-
currentLicenseExpiryDays
|
|
20
|
-
url
|
|
21
|
-
expiryBeforeTwoMonth
|
|
11
|
+
license?: {
|
|
12
|
+
expiryDate?: string;
|
|
13
|
+
expiryAfterQuarter?: boolean;
|
|
14
|
+
expiryDatePostFixString?: string;
|
|
15
|
+
subtitle?: string;
|
|
16
|
+
showExpiryDate?: boolean;
|
|
17
|
+
title?: string;
|
|
18
|
+
upgradeLink?: boolean;
|
|
19
|
+
currentLicenseExpiryDays?: number;
|
|
20
|
+
url?: string;
|
|
21
|
+
expiryBeforeTwoMonth?: boolean;
|
|
22
22
|
};
|
|
23
|
-
settings
|
|
24
|
-
canDisplay
|
|
25
|
-
displayIcon
|
|
23
|
+
settings?: {
|
|
24
|
+
canDisplay?: boolean;
|
|
25
|
+
displayIcon?: boolean;
|
|
26
26
|
icon?: string;
|
|
27
27
|
title: string;
|
|
28
|
-
betaIconHTML
|
|
29
|
-
url
|
|
28
|
+
betaIconHTML?: string;
|
|
29
|
+
url?: string;
|
|
30
30
|
}[];
|
|
31
|
-
usage
|
|
32
|
-
collectedResponseCount
|
|
33
|
-
displayResponseProgressBar
|
|
34
|
-
title
|
|
35
|
-
url
|
|
36
|
-
responseCountPercentage
|
|
31
|
+
usage?: {
|
|
32
|
+
collectedResponseCount?: string;
|
|
33
|
+
displayResponseProgressBar?: boolean;
|
|
34
|
+
title?: string;
|
|
35
|
+
url?: string;
|
|
36
|
+
responseCountPercentage?: number;
|
|
37
37
|
};
|
|
38
|
-
invoice
|
|
39
|
-
size
|
|
40
|
-
title
|
|
41
|
-
url
|
|
38
|
+
invoice?: {
|
|
39
|
+
size?: number;
|
|
40
|
+
title?: string;
|
|
41
|
+
url?: string;
|
|
42
42
|
};
|
|
43
|
-
issueTrackerCount
|
|
43
|
+
issueTrackerCount?: number;
|
|
44
44
|
}
|
|
@@ -5,8 +5,8 @@ export interface IWuComboboxProps<T> {
|
|
|
5
5
|
value: string;
|
|
6
6
|
label: string;
|
|
7
7
|
};
|
|
8
|
-
defaultValue?: T | T[];
|
|
9
|
-
value?: T | T[];
|
|
8
|
+
defaultValue?: T | T[] | null;
|
|
9
|
+
value?: T | T[] | null;
|
|
10
10
|
Header?: React.ReactNode;
|
|
11
11
|
virtualizedThreshold?: number;
|
|
12
12
|
isEllipse?: boolean;
|
|
@@ -26,5 +26,6 @@ export interface IWuComboboxProps<T> {
|
|
|
26
26
|
};
|
|
27
27
|
id?: string;
|
|
28
28
|
disabled?: boolean;
|
|
29
|
+
labelPosition?: 'left' | 'top' | 'right';
|
|
29
30
|
}
|
|
30
|
-
export declare const WuCombobox: <T>({ data, accessorKey, value, defaultValue, Header, virtualizedThreshold, isEllipse, placeholder, variant, dir, onSelect, label, maxHeight, multiple, hasGroup, selectAll, id, disabled, }: IWuComboboxProps<T>) => React.JSX.Element;
|
|
31
|
+
export declare const WuCombobox: <T>({ data, accessorKey, value, defaultValue, Header, virtualizedThreshold, isEllipse, placeholder, variant, dir, onSelect, label, maxHeight, multiple, hasGroup, selectAll, id, disabled, labelPosition, }: IWuComboboxProps<T>) => React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
export declare const useResizeContent: (parentRef: React.RefObject<HTMLDivElement
|
|
2
|
+
export declare const useResizeContent: (parentRef: React.RefObject<HTMLDivElement | null>, labelWidth?: number) => number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface IWuInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
3
3
|
label?: string;
|
|
4
|
-
labelPosition?: 'left' | 'top';
|
|
4
|
+
labelPosition?: 'left' | 'top' | 'right';
|
|
5
5
|
Icon?: React.ReactNode;
|
|
6
6
|
iconPosition?: 'left' | 'right';
|
|
7
7
|
variant?: 'flat' | 'outlined';
|
|
@@ -3,5 +3,6 @@ export interface IWuTextareaProps extends React.TextareaHTMLAttributes<HTMLTextA
|
|
|
3
3
|
label?: string;
|
|
4
4
|
variant?: 'flat' | 'outlined';
|
|
5
5
|
readonly?: boolean;
|
|
6
|
+
labelPosition?: 'left' | 'top' | 'right';
|
|
6
7
|
}
|
|
7
8
|
export declare const WuTextarea: React.ForwardRefExoticComponent<IWuTextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -4,5 +4,6 @@ export interface IWuPaginationProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
4
4
|
initialPage: number;
|
|
5
5
|
initialPageSize: number;
|
|
6
6
|
onPageChange?: (page: number) => void;
|
|
7
|
+
disabled?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare const WuPagination: React.ForwardRefExoticComponent<IWuPaginationProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
type IValue<T> = T | T[];
|
|
3
2
|
export interface IWuSelectProps<T> extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'value' | 'defaultValue' | 'onSelect'> {
|
|
4
|
-
defaultValue?:
|
|
3
|
+
defaultValue?: T | T[] | null;
|
|
5
4
|
label?: string;
|
|
6
|
-
value?:
|
|
5
|
+
value?: T | T[] | null;
|
|
7
6
|
data: T[];
|
|
8
7
|
accessorKey: {
|
|
9
8
|
value: string;
|
|
10
9
|
label: string;
|
|
11
10
|
};
|
|
12
|
-
onSelect?: (value:
|
|
11
|
+
onSelect?: (value: T | T[]) => void;
|
|
13
12
|
multiple?: boolean;
|
|
14
13
|
variant?: 'flat' | 'outlined';
|
|
15
14
|
dir?: 'ltr' | 'rtl';
|
|
@@ -25,6 +24,6 @@ export interface IWuSelectProps<T> extends Omit<React.SelectHTMLAttributes<HTMLS
|
|
|
25
24
|
includeDisabled?: boolean;
|
|
26
25
|
triggerText?: string;
|
|
27
26
|
};
|
|
27
|
+
labelPosition?: 'left' | 'top' | 'right';
|
|
28
28
|
}
|
|
29
|
-
export declare const WuSelect: <T>({ data, onSelect, multiple, defaultValue, value: controlledValue, accessorKey, variant, dir, placeholder, label, virtualizedThreshold, maxHeight, hasGroup, Header, CustomTrigger, selectAll, disabled, ...rest }: IWuSelectProps<T>) => React.JSX.Element;
|
|
30
|
-
export {};
|
|
29
|
+
export declare const WuSelect: <T>({ data, onSelect, multiple, defaultValue, value: controlledValue, accessorKey, variant, dir, placeholder, label, virtualizedThreshold, maxHeight, hasGroup, Header, CustomTrigger, selectAll, disabled, labelPosition, ...rest }: IWuSelectProps<T>) => React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
export declare const useResizeContent: (parentRef: React.RefObject<HTMLDivElement | null
|
|
2
|
+
export declare const useResizeContent: (parentRef: React.RefObject<HTMLDivElement | null>, labelWidth?: number) => number;
|
|
@@ -4,6 +4,10 @@ import { IWuTableColumnDef } from '../../types/IWuTableColumnDef';
|
|
|
4
4
|
export interface IWuDataTableProps<T> extends React.TableHTMLAttributes<HTMLTableElement> {
|
|
5
5
|
data: T[];
|
|
6
6
|
columns: IWuTableColumnDef<T>[];
|
|
7
|
+
pagination?: {
|
|
8
|
+
pageIndex: number;
|
|
9
|
+
pageSize: number;
|
|
10
|
+
};
|
|
7
11
|
variant?: 'unstyled' | 'striped' | 'bordered';
|
|
8
12
|
size?: 'compact' | 'default';
|
|
9
13
|
sorting?: {
|
|
@@ -11,5 +15,13 @@ export interface IWuDataTableProps<T> extends React.TableHTMLAttributes<HTMLTabl
|
|
|
11
15
|
onSort: (sort: IWuManualSorting) => void;
|
|
12
16
|
};
|
|
13
17
|
isLoading?: boolean;
|
|
18
|
+
rowSelection?: {
|
|
19
|
+
isEnabled: boolean;
|
|
20
|
+
selectedRows: T[];
|
|
21
|
+
onRowSelect: React.Dispatch<React.SetStateAction<T[]>>;
|
|
22
|
+
rowUniqueKey: string;
|
|
23
|
+
};
|
|
24
|
+
HeaderAction?: React.ReactElement;
|
|
25
|
+
NoDataContent?: React.ReactNode;
|
|
14
26
|
}
|
|
15
|
-
export declare const WuDataTable: <T>({ data, columns, isLoading, variant, sorting, size, ...props }: IWuDataTableProps<T>) => React.JSX.Element;
|
|
27
|
+
export declare const WuDataTable: <T>({ data, columns, pagination, isLoading, variant, sorting, size, rowSelection, HeaderAction, NoDataContent, ...props }: IWuDataTableProps<T>) => React.JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ColumnSort } from '@tanstack/react-table';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
import { IWuTableColumnDef } from '../../types/IWuTableColumnDef';
|
|
4
|
-
export interface IWuTableProps<
|
|
5
|
-
data:
|
|
6
|
-
columns: IWuTableColumnDef<
|
|
4
|
+
export interface IWuTableProps<T> extends React.TableHTMLAttributes<HTMLTableElement> {
|
|
5
|
+
data: T[];
|
|
6
|
+
columns: IWuTableColumnDef<T>[];
|
|
7
7
|
variant?: 'striped' | 'unstyled' | 'bordered';
|
|
8
8
|
size?: 'compact' | 'default';
|
|
9
9
|
caption?: string;
|
|
@@ -16,8 +16,16 @@ export interface IWuTableProps<Data> extends React.TableHTMLAttributes<HTMLTable
|
|
|
16
16
|
pageIndex: number;
|
|
17
17
|
pageSize: number;
|
|
18
18
|
};
|
|
19
|
+
rowSelection?: {
|
|
20
|
+
isEnabled: boolean;
|
|
21
|
+
selectedRows: T[];
|
|
22
|
+
onRowSelect: React.Dispatch<React.SetStateAction<T[]>>;
|
|
23
|
+
rowUniqueKey: string;
|
|
24
|
+
};
|
|
25
|
+
HeaderAction?: React.ReactElement;
|
|
26
|
+
NoDataContent?: React.ReactNode;
|
|
19
27
|
}
|
|
20
28
|
export declare const WuTable: {
|
|
21
|
-
<T>({ data, columns, caption, variant, sort, filterText, size, pagination, ...rest }: IWuTableProps<T>): React.JSX.Element;
|
|
29
|
+
<T>({ data, columns, caption, variant, sort, filterText, size, pagination, rowSelection, HeaderAction, NoDataContent, ...rest }: IWuTableProps<T>): React.JSX.Element;
|
|
22
30
|
displayName: string;
|
|
23
31
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IWuTableColumnDef } from '../types/IWuTableColumnDef';
|
|
3
|
+
interface IUseRowSelectionProps<T> {
|
|
4
|
+
columns: IWuTableColumnDef<T>[];
|
|
5
|
+
rowSelection?: {
|
|
6
|
+
isEnabled: boolean;
|
|
7
|
+
onRowSelect: React.Dispatch<React.SetStateAction<T[]>>;
|
|
8
|
+
rowUniqueKey: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
interface IUseRowSelectionResult<T> {
|
|
12
|
+
finalColumns: IWuTableColumnDef<T>[];
|
|
13
|
+
}
|
|
14
|
+
export declare const useRowSelection: <T>({ columns, rowSelection, }: IUseRowSelectionProps<T>) => IUseRowSelectionResult<T>;
|
|
15
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Table } from '@tanstack/react-table';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
-
export declare const WuTableBody: <T>({ table, size, }: {
|
|
3
|
+
export declare const WuTableBody: <T>({ table, size, NoDataContent, }: {
|
|
4
4
|
table: Table<T>;
|
|
5
5
|
size?: "compact" | "default";
|
|
6
|
+
NoDataContent?: React.ReactNode;
|
|
6
7
|
}) => React.JSX.Element;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Table } from '@tanstack/react-table';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
import { IWuManualSorting } from '../types/IWuManualSorting';
|
|
4
|
-
export declare const WuTableHeader: <T>({ table, sortableColumns, manual, onSort, size, }: {
|
|
4
|
+
export declare const WuTableHeader: <T>({ table, sortableColumns, manual, onSort, size, isRowSelected, HeaderAction, }: {
|
|
5
5
|
table: Table<T>;
|
|
6
6
|
sortableColumns: string[];
|
|
7
7
|
manual?: boolean;
|
|
8
8
|
onSort?: (meta: IWuManualSorting) => void;
|
|
9
9
|
size?: "compact" | "default";
|
|
10
|
+
isRowSelected?: boolean;
|
|
11
|
+
HeaderAction?: React.ReactElement;
|
|
10
12
|
}) => React.JSX.Element;
|