@npm-questionpro/wick-ui-lib 1.35.5 → 1.37.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/components/calendar/components/datePicker/WuDatePicker.d.ts +5 -0
- package/dist/src/components/calendar/components/dateRangePicker/WuDateRangePicker.d.ts +5 -0
- package/dist/src/components/calendar/utils/index.d.ts +1 -1
- package/dist/src/components/modal/WuModal.d.ts +3 -0
- package/dist/src/components/table/components/dataTable/WuDataTable.d.ts +5 -3
- package/dist/src/components/table/components/table/WuTable.d.ts +3 -2
- package/dist/src/components/table/types/IColumnDefaultSorting.d.ts +4 -0
- package/dist/src/components/table/types/IWuRowSelection.d.ts +1 -1
- package/dist/src/components/table/ui/_header.d.ts +2 -2
- package/dist/src/components/table/ui/_virtualBody.d.ts +4 -3
- package/dist/src/components/table/utils/data.d.ts +6 -12
- package/dist/src/components/table/utils/tableStyles.d.ts +1 -1
- package/dist/src/components/tooltip/WuTooltip.d.ts +4 -2
- package/dist/style.css +1 -1
- package/dist/wick-ui-lib/es/index.js +4641 -4525
- package/dist/wick-ui-lib/umd/index.js +13 -13
- package/package.json +1 -1
- package/dist/src/components/table/types/IWuManualSorting.d.ts +0 -4
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { PopoverContentProps } from '@radix-ui/react-popover';
|
|
2
3
|
export type IWuDatePickerProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'value' | 'onChange'> & {
|
|
3
4
|
value?: Date | string;
|
|
4
5
|
onChange?: (date?: Date) => void;
|
|
@@ -15,5 +16,9 @@ export type IWuDatePickerProps = Omit<React.ButtonHTMLAttributes<HTMLButtonEleme
|
|
|
15
16
|
labelPosition?: 'top' | 'left';
|
|
16
17
|
showResetButton?: boolean;
|
|
17
18
|
CustomTrigger?: (value?: string) => React.ReactElement;
|
|
19
|
+
align?: PopoverContentProps['align'];
|
|
20
|
+
alignOffset?: PopoverContentProps['alignOffset'];
|
|
21
|
+
side?: PopoverContentProps['side'];
|
|
22
|
+
sideOffset?: PopoverContentProps['sideOffset'];
|
|
18
23
|
};
|
|
19
24
|
export declare const WuDatePicker: React.FC<IWuDatePickerProps>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { DateRange } from 'react-day-picker';
|
|
3
|
+
import { PopoverContentProps } from '@radix-ui/react-popover';
|
|
3
4
|
export type IWuDateRangePickerProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'value' | 'onChange'> & {
|
|
4
5
|
value?: DateRange;
|
|
5
6
|
onChange?: (date: DateRange | undefined) => void;
|
|
@@ -22,5 +23,9 @@ export type IWuDateRangePickerProps = Omit<React.ButtonHTMLAttributes<HTMLButton
|
|
|
22
23
|
value: number;
|
|
23
24
|
}[];
|
|
24
25
|
CustomTrigger?: (value?: string) => React.ReactElement;
|
|
26
|
+
align?: PopoverContentProps['align'];
|
|
27
|
+
alignOffset?: PopoverContentProps['alignOffset'];
|
|
28
|
+
side?: PopoverContentProps['side'];
|
|
29
|
+
sideOffset?: PopoverContentProps['sideOffset'];
|
|
25
30
|
};
|
|
26
31
|
export declare const WuDateRangePicker: React.FC<IWuDateRangePickerProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const disabledDate: (e: Date, disabled?: boolean, minDate?: Date, maxDate?: Date) => boolean;
|
|
2
2
|
export declare const parsedDate: (value?: Date | string) => Date;
|
|
3
|
-
export declare const INPUT_PATTERN = "
|
|
3
|
+
export declare const INPUT_PATTERN = "(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])-\\d{4}";
|
|
4
4
|
export declare const DEFAULT_RANGES: {
|
|
5
5
|
label: string;
|
|
6
6
|
value: number;
|
|
@@ -20,6 +20,9 @@ export interface IWuModalProps extends React.ComponentProps<typeof DialogContent
|
|
|
20
20
|
children?: React.ReactNode;
|
|
21
21
|
variant?: 'action' | 'critical' | 'upgrade';
|
|
22
22
|
onOpenAutoFocus?: (event: Event) => void;
|
|
23
|
+
onCloseAutoFocus?: (event: Event) => void;
|
|
24
|
+
/** Allow external portals (e.g. CKEditor dropdowns/inputs) to receive focus and pointer events */
|
|
25
|
+
allowExternalPortals?: boolean;
|
|
23
26
|
}
|
|
24
27
|
export declare const WuModal: FC<IWuModalProps>;
|
|
25
28
|
export declare const WuModalContent: FC<React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IColumnDefaultSorting } from '../../types/IColumnDefaultSorting';
|
|
3
3
|
import { IWuTableRowSelection } from '../../types/IWuRowSelection';
|
|
4
4
|
import { IWuTableColumnDef } from '../../types/IWuTableColumnDef';
|
|
5
5
|
export interface IWuDataTableProps<T> extends React.TableHTMLAttributes<HTMLTableElement> {
|
|
@@ -10,7 +10,8 @@ export interface IWuDataTableProps<T> extends React.TableHTMLAttributes<HTMLTabl
|
|
|
10
10
|
size?: 'compact' | 'default';
|
|
11
11
|
sort?: {
|
|
12
12
|
enabled: boolean;
|
|
13
|
-
onSort: (sort:
|
|
13
|
+
onSort: (sort: IColumnDefaultSorting) => void;
|
|
14
|
+
defaultSort?: IColumnDefaultSorting;
|
|
14
15
|
};
|
|
15
16
|
isLoading?: boolean;
|
|
16
17
|
rowSelection?: IWuTableRowSelection<T>;
|
|
@@ -24,5 +25,6 @@ export interface IWuDataTableProps<T> extends React.TableHTMLAttributes<HTMLTabl
|
|
|
24
25
|
maxHeight?: number;
|
|
25
26
|
threshold?: number;
|
|
26
27
|
};
|
|
28
|
+
tableLayout?: 'fixed' | 'auto';
|
|
27
29
|
}
|
|
28
|
-
export declare const WuDataTable: <T>({ data, columns, isLoading, variant, sort, size, rowSelection, HeaderAction, NoDataContent, stickyHeader, CustomLoader, caption, virtualization, isRowExpandable, ...props }: IWuDataTableProps<T>) => React.JSX.Element;
|
|
30
|
+
export declare const WuDataTable: <T>({ data, columns, isLoading, variant, sort, size, rowSelection, HeaderAction, NoDataContent, stickyHeader, CustomLoader, caption, virtualization, isRowExpandable, tableLayout, style, className, ...props }: IWuDataTableProps<T>) => React.JSX.Element;
|
|
@@ -10,7 +10,7 @@ export interface IWuTableProps<T> extends React.TableHTMLAttributes<HTMLTableEle
|
|
|
10
10
|
caption?: string;
|
|
11
11
|
sort?: {
|
|
12
12
|
enabled?: boolean;
|
|
13
|
-
|
|
13
|
+
defaultSort?: ColumnSort;
|
|
14
14
|
};
|
|
15
15
|
isLoading?: boolean;
|
|
16
16
|
filterText?: string;
|
|
@@ -29,5 +29,6 @@ export interface IWuTableProps<T> extends React.TableHTMLAttributes<HTMLTableEle
|
|
|
29
29
|
maxHeight?: number;
|
|
30
30
|
threshold?: number;
|
|
31
31
|
};
|
|
32
|
+
tableLayout?: 'fixed' | 'auto';
|
|
32
33
|
}
|
|
33
|
-
export declare const WuTable: <T>({ data, columns, variant, size, sort, filterText, pagination, stickyHeader, HeaderAction, CustomLoader, NoDataContent, isLoading, caption, rowSelection, isRowExpandable, virtualization, ...rest }: IWuTableProps<T>) => React.JSX.Element;
|
|
34
|
+
export declare const WuTable: <T>({ data, columns, variant, size, sort, filterText, pagination, stickyHeader, HeaderAction, CustomLoader, NoDataContent, isLoading, caption, rowSelection, isRowExpandable, virtualization, tableLayout, style, className, ...rest }: IWuTableProps<T>) => React.JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Table } from '@tanstack/react-table';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { IColumnDefaultSorting } from '../types/IColumnDefaultSorting';
|
|
4
4
|
export declare const WuTableHeader: <T>({ table, sortableColumns, manual, onSort, size, isRowSelected, HeaderAction, isStickyHeader, asVirtualContent, isRowExpandable, }: {
|
|
5
5
|
table: Table<T>;
|
|
6
6
|
sortableColumns: string[];
|
|
7
7
|
manual?: boolean;
|
|
8
|
-
onSort?: (meta:
|
|
8
|
+
onSort?: (meta: IColumnDefaultSorting) => void;
|
|
9
9
|
size?: "compact" | "default";
|
|
10
10
|
isRowSelected?: boolean;
|
|
11
11
|
HeaderAction?: React.ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Table } from '@tanstack/react-table';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { IColumnDefaultSorting } from '../types/IColumnDefaultSorting';
|
|
4
4
|
export interface IWuVirtualTableBodyProps<T> {
|
|
5
5
|
table: Table<T>;
|
|
6
6
|
size?: 'compact' | 'default';
|
|
@@ -10,6 +10,7 @@ export interface IWuVirtualTableBodyProps<T> {
|
|
|
10
10
|
HeaderAction?: React.ReactNode;
|
|
11
11
|
isRowSelected?: boolean;
|
|
12
12
|
manual?: boolean;
|
|
13
|
-
onSort?: (meta:
|
|
13
|
+
onSort?: (meta: IColumnDefaultSorting) => void;
|
|
14
|
+
tableLayout?: 'fixed' | 'auto';
|
|
14
15
|
}
|
|
15
|
-
export declare const WuVirtualTableBody: <T>({ table, size, isRowDisabled, containerHeight, sortableColumns, HeaderAction, isRowSelected, manual, onSort, }: IWuVirtualTableBodyProps<T>) => React.JSX.Element;
|
|
16
|
+
export declare const WuVirtualTableBody: <T>({ table, size, isRowDisabled, containerHeight, sortableColumns, HeaderAction, isRowSelected, manual, onSort, tableLayout, }: IWuVirtualTableBodyProps<T>) => React.JSX.Element;
|
|
@@ -39,8 +39,13 @@ export declare const MOCK_COLUMNS: ({
|
|
|
39
39
|
} | {
|
|
40
40
|
accessorKey: string;
|
|
41
41
|
header: string;
|
|
42
|
-
size: number;
|
|
43
42
|
enableSorting: boolean;
|
|
43
|
+
size?: undefined;
|
|
44
|
+
} | {
|
|
45
|
+
accessorKey: string;
|
|
46
|
+
header: string;
|
|
47
|
+
size?: undefined;
|
|
48
|
+
enableSorting?: undefined;
|
|
44
49
|
})[];
|
|
45
50
|
export declare const EXTENDED_MOCK_COLUMNS: ({
|
|
46
51
|
accessorKey: string;
|
|
@@ -58,14 +63,3 @@ export declare const EXTENDED_MOCK_COLUMNS: ({
|
|
|
58
63
|
size: number;
|
|
59
64
|
enableSorting?: undefined;
|
|
60
65
|
})[];
|
|
61
|
-
export declare const EXTENDED_MOCK_COLUMNS_SIZES: ({
|
|
62
|
-
accessorKey: string;
|
|
63
|
-
header: string;
|
|
64
|
-
size: number;
|
|
65
|
-
enableSorting: boolean;
|
|
66
|
-
} | {
|
|
67
|
-
accessorKey: string;
|
|
68
|
-
header: string;
|
|
69
|
-
size: number;
|
|
70
|
-
enableSorting?: undefined;
|
|
71
|
-
})[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const getTableRowClasses: (isSelected: boolean, isDisabled: boolean) => string;
|
|
2
|
-
export declare const getTableCellClasses: (columnId: string, size?: "compact" | "default", cellAlign?: "left" | "center" | "right"
|
|
2
|
+
export declare const getTableCellClasses: (columnId: string, size?: "compact" | "default", cellAlign?: "left" | "center" | "right") => string;
|
|
3
3
|
export declare const getHeaderHeightClass: (size?: "compact" | "default") => string;
|
|
4
4
|
export declare const getHeaderAlignClasses: (headerAlign?: "left" | "center" | "right") => string;
|
|
5
5
|
export declare const getSortIconAlignClasses: (headerAlign?: "left" | "center" | "right") => string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { TooltipTrigger } from '../../base/ui/tooltip';
|
|
1
2
|
import { default as React } from 'react';
|
|
2
|
-
export interface IWuTooltipProps extends Omit<React.
|
|
3
|
+
export interface IWuTooltipProps extends Omit<React.ComponentProps<typeof TooltipTrigger>, 'content'> {
|
|
3
4
|
content?: string | React.ReactNode;
|
|
4
5
|
duration?: number;
|
|
5
6
|
position?: 'top' | 'right' | 'bottom' | 'left';
|
|
@@ -9,5 +10,6 @@ export interface IWuTooltipProps extends Omit<React.HTMLAttributes<HTMLDivElemen
|
|
|
9
10
|
showArrow?: boolean;
|
|
10
11
|
open?: boolean;
|
|
11
12
|
onOpenChange?: (open: boolean) => void;
|
|
13
|
+
style?: React.CSSProperties;
|
|
12
14
|
}
|
|
13
|
-
export declare const WuTooltip: React.ForwardRefExoticComponent<IWuTooltipProps & React.RefAttributes<HTMLSpanElement>>;
|
|
15
|
+
export declare const WuTooltip: React.ForwardRefExoticComponent<Omit<IWuTooltipProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|