@npm-questionpro/wick-ui-lib 0.5.1 → 0.8.3
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/fonts/icon.css +8 -5
- package/dist/fonts/selection.json +266 -243
- package/dist/fonts/wick-icon.eot +0 -0
- package/dist/fonts/wick-icon.svg +1 -0
- package/dist/fonts/wick-icon.ttf +0 -0
- package/dist/fonts/wick-icon.woff +0 -0
- package/dist/src/base/ui/command.d.ts +80 -0
- package/dist/src/base/ui/dialog.d.ts +16 -15
- package/dist/src/components/calendar/components/datePicker/WuDatePicker.d.ts +6 -1
- package/dist/src/components/calendar/components/dateRangePicker/WuDateRangePicker.d.ts +6 -1
- package/dist/src/components/calendar/ui/_footer.d.ts +2 -0
- package/dist/src/components/calendar/ui/_sidebar.d.ts +3 -2
- package/dist/src/components/calendar/ui/_trigger.d.ts +1 -0
- package/dist/src/components/combobox/WuCombobox.d.ts +21 -0
- package/dist/src/components/combobox/WuCombobox.test.d.ts +1 -0
- package/dist/src/components/combobox/index.d.ts +3 -0
- package/dist/src/components/combobox/types/IWuComboboxOptions.d.ts +17 -0
- package/dist/src/components/combobox/ui/_item.d.ts +15 -0
- package/dist/src/components/combobox/ui/_tags.d.ts +7 -0
- package/dist/src/components/combobox/ui/_trigger.d.ts +15 -0
- package/dist/src/components/combobox/utils/index.d.ts +2 -0
- package/dist/src/components/combobox/utils/renderItems.d.ts +9 -0
- package/dist/src/components/combobox/utils/separateOptions.d.ts +7 -0
- package/dist/src/components/combobox/utils/useResizeContent.d.ts +3 -0
- package/dist/src/components/modal/WuModal.d.ts +28 -18
- package/dist/src/components/navbar/primaryNavbar/WuPrimaryNavbar.d.ts +1 -0
- package/dist/src/components/navbar/secondaryNavbar/WuSecondaryNavbar.d.ts +1 -0
- package/dist/src/components/select/WuSelect.d.ts +19 -12
- package/dist/src/components/select/types/IWuSelectOptions.d.ts +6 -8
- package/dist/src/components/select/ui/_item.d.ts +15 -0
- package/dist/src/components/select/ui/_trigger.d.ts +15 -0
- package/dist/src/components/select/utils/renderItems.d.ts +8 -0
- package/dist/src/components/select/utils/useOptionDestructure.d.ts +3 -0
- package/dist/src/components/select/utils/useResizeContent.d.ts +3 -0
- package/dist/src/components/stepper/WuStepper.d.ts +1 -0
- package/dist/src/components/tooltip/WuTooltip.d.ts +2 -2
- package/dist/src/components/virtualScroll/WuVirtualScroll.d.ts +1 -0
- package/dist/src/docs/Icons.d.ts +3 -1
- package/dist/src/docs/iconClasses.d.ts +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/wick-ui-lib/es/index.js +7552 -5729
- package/dist/wick-ui-lib/es/index.js.map +1 -1
- package/dist/wick-ui-lib/umd/index.js +16 -13
- package/dist/wick-ui-lib/umd/index.js.map +1 -1
- package/package.json +10 -4
- package/dist/src/components/select/hooks/useOptionDestructure.d.ts +0 -3
- package/dist/src/components/select/ui/WuSelectItem.d.ts +0 -12
- package/dist/src/components/select/ui/WuSelectTrigger.d.ts +0 -13
package/dist/fonts/wick-icon.eot
CHANGED
|
Binary file
|
package/dist/fonts/wick-icon.svg
CHANGED
|
@@ -48,4 +48,5 @@
|
|
|
48
48
|
<glyph unicode="" glyph-name="settings" d="M614.4 844.66c36.669-9.429 72.284-24.011 105.697-43.746l81.536 81.532 144.814-144.816-81.531-81.532c19.732-33.415 34.314-69.031 43.745-105.698h115.338v-204.8h-115.338c-9.431-36.669-24.013-72.284-43.745-105.697l81.531-81.536-144.814-144.814-81.536 81.531c-33.413-19.732-69.028-34.314-105.697-43.745v-115.338h-204.8v115.338c-36.667 9.431-72.284 24.013-105.698 43.745l-81.532-81.531-144.816 144.814 81.532 81.536c-19.735 33.413-34.317 69.028-43.746 105.697h-115.34v204.8h115.34c9.429 36.667 24.011 72.284 43.746 105.698l-81.532 81.532 144.816 144.816 81.532-81.532c33.415 19.735 69.031 34.317 105.698 43.746v115.34h204.8v-115.34zM330.981 266.982c99.974-99.978 262.064-99.978 362.037 0 99.978 99.973 99.978 262.063 0 362.037-99.973 99.975-262.063 99.975-362.037 0s-99.975-262.064 0-362.037z" />
|
|
49
49
|
<glyph unicode="" glyph-name="view" d="M1024 448c0 128-229.233 384-512 384-282.77 0-512-256-512-384s229.23-384 512-384c282.767 0 512 256 512 384zM766.756 601.393l-1.275 10.264c76.913-54.751 130.519-121.473 130.519-163.655 0-81.829-201.718-256.001-384-256.001-182.28 0-384 174.172-384 256.001 0 42.183 53.604 108.904 130.457 163.611-1.62-11.638-2.457-23.527-2.457-35.611 0-141.385 114.615-256.001 256-256.001s256 114.616 256 256.001c0 8.569-0.42 17.039-1.244 25.392z" />
|
|
50
50
|
<glyph unicode="" glyph-name="no-view" d="M68.377 908.816l893.328-893.328-68.378-68.378-139.156 139.156c-72.105-37.724-154.568-62.295-242.171-62.295-282.77 0-512 256-512 384 0 69.211 67.015 175.84 173.274 259.191l-173.274 173.275 68.377 68.377zM656.778 183.66l-100.188 100.188c-14.479-2.545-29.379-3.871-44.59-3.871-141.385 0-256 114.611-256 255.998 0 12.084 0.837 23.973 2.457 35.611-76.853-54.707-130.457-121.428-130.457-163.609 0-81.833 201.72-256 384-256 48.266 0 97.889 12.211 144.778 31.683zM896 407.977c0-32.036-30.92-78.228-79.483-122.578l88.658-88.663c74.184 73.339 118.825 154.752 118.825 211.236 0 128.003-229.233 384.003-512 384.003-60.017 0-117.621-11.532-171.134-30.925l377.117-377.116c31.432 42.516 50.017 95.109 50.017 152.041 0 8.569-0.42 17.039-1.244 25.392l-1.275 10.264c76.913-54.751 130.519-121.473 130.519-163.654z" />
|
|
51
|
+
<glyph unicode="" glyph-name="refresh" d="M510.933 70.4q-155.733 0-265.6 109.867t-109.867 265.6 109.867 267.733 265.6 112q74.667 0 142.933-30.933t121.6-82.133v56.533q0 23.467 16.533 40t40 16.533 40-16.533 16.533-40v-243.2q0-23.467-16.533-40t-40-16.533h-243.2q-23.467 0-40 16.533t-16.533 40 16.533 40 40 16.533h144q-36.267 57.6-94.933 90.667t-126.933 33.067q-109.867 0-186.133-75.733t-76.267-184.533q0-109.867 76.267-186.133t186.133-76.267q70.4 0 130.667 34.667t94.4 95.467q11.733 19.2 32 26.667t41.6 0 31.467-27.2 0.533-38.933q-48-92.8-136-148.267t-194.667-55.467z" />
|
|
51
52
|
</font></defs></svg>
|
package/dist/fonts/wick-icon.ttf
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { DialogProps } from '@radix-ui/react-dialog';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
6
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
7
|
+
} & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
10
|
+
label?: string;
|
|
11
|
+
shouldFilter?: boolean;
|
|
12
|
+
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
value?: string;
|
|
15
|
+
onValueChange?: (value: string) => void;
|
|
16
|
+
loop?: boolean;
|
|
17
|
+
disablePointerSelection?: boolean;
|
|
18
|
+
vimBindings?: boolean;
|
|
19
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
declare const CommandDialog: ({ children, ...props }: DialogProps) => JSX.Element;
|
|
21
|
+
declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
|
|
22
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
23
|
+
} & {
|
|
24
|
+
asChild?: boolean;
|
|
25
|
+
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "onChange" | "value"> & {
|
|
26
|
+
value?: string;
|
|
27
|
+
onValueChange?: (search: string) => void;
|
|
28
|
+
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
29
|
+
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
32
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
33
|
+
} & {
|
|
34
|
+
asChild?: boolean;
|
|
35
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
36
|
+
label?: string;
|
|
37
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
38
|
+
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
39
|
+
children?: React.ReactNode;
|
|
40
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
41
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
42
|
+
} & {
|
|
43
|
+
asChild?: boolean;
|
|
44
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
45
|
+
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
46
|
+
children?: React.ReactNode;
|
|
47
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
48
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
49
|
+
} & {
|
|
50
|
+
asChild?: boolean;
|
|
51
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
|
|
52
|
+
heading?: React.ReactNode;
|
|
53
|
+
value?: string;
|
|
54
|
+
forceMount?: boolean;
|
|
55
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
56
|
+
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
57
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
58
|
+
} & {
|
|
59
|
+
asChild?: boolean;
|
|
60
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
61
|
+
alwaysRender?: boolean;
|
|
62
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
63
|
+
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
64
|
+
children?: React.ReactNode;
|
|
65
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
66
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
67
|
+
} & {
|
|
68
|
+
asChild?: boolean;
|
|
69
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "onSelect" | "disabled" | "value"> & {
|
|
70
|
+
disabled?: boolean;
|
|
71
|
+
onSelect?: (value: string) => void;
|
|
72
|
+
value?: string;
|
|
73
|
+
keywords?: string[];
|
|
74
|
+
forceMount?: boolean;
|
|
75
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
76
|
+
declare const CommandShortcut: {
|
|
77
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): JSX.Element;
|
|
78
|
+
displayName: string;
|
|
79
|
+
};
|
|
80
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
+
import { default as React, ComponentPropsWithoutRef, HTMLAttributes } from 'react';
|
|
1
2
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
2
|
-
|
|
3
|
-
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
4
|
-
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
-
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
6
|
-
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
-
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
3
|
+
interface IDialogContentProps extends ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
|
9
4
|
hideCloseButton?: boolean;
|
|
10
|
-
}
|
|
11
|
-
declare const
|
|
12
|
-
|
|
5
|
+
}
|
|
6
|
+
export declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
7
|
+
export declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
export declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
9
|
+
export declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
export declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export declare const DialogContent: React.ForwardRefExoticComponent<IDialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export declare const DialogHeader: {
|
|
13
|
+
({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
13
14
|
displayName: string;
|
|
14
15
|
};
|
|
15
|
-
declare const DialogFooter: {
|
|
16
|
-
({ className, ...props }:
|
|
16
|
+
export declare const DialogFooter: {
|
|
17
|
+
({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
17
18
|
displayName: string;
|
|
18
19
|
};
|
|
19
|
-
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
20
|
-
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
21
|
-
export {
|
|
20
|
+
export declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
21
|
+
export declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
22
|
+
export {};
|
|
@@ -8,6 +8,11 @@ export type IWuDatePickerProps = {
|
|
|
8
8
|
maxDate?: Date;
|
|
9
9
|
className?: string;
|
|
10
10
|
dir?: 'ltr' | 'rtl';
|
|
11
|
-
onChange?: (date
|
|
11
|
+
onChange?: (date?: Date) => void;
|
|
12
|
+
label?: string;
|
|
13
|
+
labelPosition?: 'top' | 'left';
|
|
14
|
+
onReset?: () => void;
|
|
15
|
+
showResetButton?: boolean;
|
|
16
|
+
placeholder?: string;
|
|
12
17
|
};
|
|
13
18
|
export declare const WuDatePicker: React.FC<IWuDatePickerProps>;
|
|
@@ -9,12 +9,17 @@ export interface IWuDateRangePickerProps {
|
|
|
9
9
|
maxDate?: Date;
|
|
10
10
|
className?: string;
|
|
11
11
|
dir?: 'ltr' | 'rtl';
|
|
12
|
-
onChange?: (date: DateRange) => void;
|
|
12
|
+
onChange?: (date: DateRange | undefined) => void;
|
|
13
13
|
minDateToSelect?: number;
|
|
14
14
|
maxDateToSelect?: number;
|
|
15
15
|
presetRanges?: {
|
|
16
16
|
label: string;
|
|
17
17
|
value: number;
|
|
18
18
|
}[];
|
|
19
|
+
label?: string;
|
|
20
|
+
labelPosition?: 'top' | 'left';
|
|
21
|
+
onReset?: () => void;
|
|
22
|
+
showResetButton?: boolean;
|
|
23
|
+
placeholder?: string;
|
|
19
24
|
}
|
|
20
25
|
export declare const WuDateRangePicker: React.FC<IWuDateRangePickerProps>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { DateRange } from 'react-day-picker';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
current
|
|
4
|
+
interface IWuDateRangePickerSidebarProps {
|
|
5
|
+
current?: DateRange;
|
|
6
6
|
onSelect: (date: DateRange) => void;
|
|
7
7
|
presetRanges?: {
|
|
8
8
|
label: string;
|
|
@@ -10,3 +10,4 @@ export interface IWuDateRangePickerSidebarProps {
|
|
|
10
10
|
}[];
|
|
11
11
|
}
|
|
12
12
|
export declare const WuDateRangeSidebar: React.FC<IWuDateRangePickerSidebarProps>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface IWuComboboxProps<T> {
|
|
2
|
+
data: T[];
|
|
3
|
+
accessorKey: {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
};
|
|
7
|
+
defaultValue?: T | T[];
|
|
8
|
+
value?: T | T[];
|
|
9
|
+
header?: React.ReactNode;
|
|
10
|
+
virtualizedThreshold?: number;
|
|
11
|
+
isEllipse?: boolean;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
variant?: 'flat' | 'outlined';
|
|
14
|
+
dir?: 'ltr' | 'rtl';
|
|
15
|
+
label?: string;
|
|
16
|
+
maxHeight?: number;
|
|
17
|
+
onSelect?: (value: T | T[]) => void;
|
|
18
|
+
multiple?: boolean;
|
|
19
|
+
hasGroup?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare const WuCombobox: <T>({ data, accessorKey, value, defaultValue, header, virtualizedThreshold, isEllipse, placeholder, variant, dir, onSelect, label, maxHeight, multiple, hasGroup, }: IWuComboboxProps<T>) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type IWuComboboxItem<T> = T & {
|
|
4
|
+
type?: 'option';
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
isAdmin?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export interface IWuComboboxGroup<T> {
|
|
10
|
+
type: 'group';
|
|
11
|
+
label: string;
|
|
12
|
+
options: IWuComboboxItem<T>[];
|
|
13
|
+
}
|
|
14
|
+
export interface IWuComboboxDivider {
|
|
15
|
+
type: 'divider';
|
|
16
|
+
}
|
|
17
|
+
export type IWuComboboxOption<T> = IWuComboboxItem<T> | IWuComboboxGroup<T> | IWuComboboxDivider;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IWuComboboxItem } from '../types/IWuComboboxOptions';
|
|
3
|
+
|
|
4
|
+
export interface IWuComboboxItemProps<T> {
|
|
5
|
+
option: IWuComboboxItem<T>;
|
|
6
|
+
accessorKey: {
|
|
7
|
+
value: string;
|
|
8
|
+
label: string;
|
|
9
|
+
};
|
|
10
|
+
value?: IWuComboboxItem<T> | IWuComboboxItem<T>[];
|
|
11
|
+
multiple?: boolean;
|
|
12
|
+
onSelect: (value: IWuComboboxItem<T>) => void;
|
|
13
|
+
dir?: 'ltr' | 'rtl';
|
|
14
|
+
}
|
|
15
|
+
export declare const WuComboboxItem: <T>({ option, value, multiple, onSelect, accessorKey, dir, }: IWuComboboxItemProps<T>) => React.JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IWuComboboxItem } from '../types/IWuComboboxOptions';
|
|
2
|
+
|
|
3
|
+
export interface IWuComboboxTriggerProps<T> {
|
|
4
|
+
accessorKey: {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
};
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
isEllipse?: boolean;
|
|
10
|
+
selectedOptions?: IWuComboboxItem<T> | IWuComboboxItem<T>[];
|
|
11
|
+
variant?: 'flat' | 'outlined';
|
|
12
|
+
dir?: 'ltr' | 'rtl';
|
|
13
|
+
multiple?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const WuComboboxTrigger: <T>({ placeholder, isEllipse, selectedOptions, variant, dir, accessorKey, multiple, }: IWuComboboxTriggerProps<T>) => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IWuComboboxOption } from '../types/IWuComboboxOptions';
|
|
3
|
+
import { IWuComboboxItemProps } from '../ui/_item';
|
|
4
|
+
|
|
5
|
+
type IRenderComboboxItemsProps<T> = Omit<IWuComboboxItemProps<T>, 'option'> & {
|
|
6
|
+
option: IWuComboboxOption<T>;
|
|
7
|
+
};
|
|
8
|
+
export declare const RenderItems: <T>(props: IRenderComboboxItemsProps<T>) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IWuComboboxDivider, IWuComboboxGroup, IWuComboboxItem, IWuComboboxOption } from '../types/IWuComboboxOptions';
|
|
2
|
+
|
|
3
|
+
export declare const separateOptions: <T>(options: IWuComboboxOption<T>[]) => {
|
|
4
|
+
groups: IWuComboboxGroup<T>[];
|
|
5
|
+
dividers: IWuComboboxDivider[];
|
|
6
|
+
allOptions: IWuComboboxItem<T>[];
|
|
7
|
+
};
|
|
@@ -1,27 +1,37 @@
|
|
|
1
|
-
import { Dialog, DialogClose
|
|
2
|
-
import { default as React } from 'react';
|
|
1
|
+
import { Dialog, DialogClose } from '../../base/ui/dialog';
|
|
2
|
+
import { default as React, FC, ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
+
declare const MAX_WIDTH: {
|
|
5
|
+
readonly sm: "400px";
|
|
6
|
+
readonly md: "600px";
|
|
7
|
+
readonly lg: "1200px";
|
|
8
|
+
};
|
|
9
|
+
declare const BUTTON_VARIANTS: {
|
|
10
|
+
readonly primary: "bg-primary-500 text-white hover:bg-opacity-70";
|
|
11
|
+
readonly secondary: "hover:bg-primary-500 hover:bg-gray-100 text-primary-500";
|
|
12
|
+
readonly iconOnly: "p-2 hover:bg-text-200 min-w-[auto] disabled:grayscale disabled:opacity-80 focus-visible:ring-offset-0 focus:bg-primary-100";
|
|
13
|
+
};
|
|
14
|
+
type IModalSize = keyof typeof MAX_WIDTH;
|
|
15
|
+
type IButtonVariant = keyof typeof BUTTON_VARIANTS;
|
|
4
16
|
export interface IWuModalProps extends React.ComponentProps<typeof Dialog> {
|
|
5
|
-
trigger?:
|
|
6
|
-
children?:
|
|
7
|
-
size?:
|
|
17
|
+
trigger?: ReactNode;
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
size?: IModalSize;
|
|
8
20
|
hideCloseButton?: boolean;
|
|
9
21
|
preventClickOutside?: boolean;
|
|
10
22
|
onOpenChange?: (open: boolean) => void;
|
|
11
23
|
open?: boolean;
|
|
12
24
|
dir?: 'ltr' | 'rtl';
|
|
25
|
+
maxWidth?: string;
|
|
26
|
+
maxHeight?: string;
|
|
13
27
|
}
|
|
14
|
-
|
|
15
|
-
export declare const
|
|
16
|
-
|
|
17
|
-
export declare const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export declare const WuModalFooter: React.FC<React.ComponentProps<typeof DialogFooter>>;
|
|
22
|
-
/** Modal Close button component */
|
|
23
|
-
export interface IWuModalCloseProps extends React.ComponentProps<typeof DialogClose> {
|
|
24
|
-
children?: React.ReactNode;
|
|
25
|
-
variant?: 'primary' | 'secondary' | 'iconOnly';
|
|
28
|
+
export declare const WuModal: FC<IWuModalProps>;
|
|
29
|
+
export declare const WuModalContent: FC<React.HTMLAttributes<HTMLDivElement>>;
|
|
30
|
+
export declare const WuModalHeader: FC<React.HTMLAttributes<HTMLDivElement>>;
|
|
31
|
+
export declare const WuModalFooter: FC<React.HTMLAttributes<HTMLDivElement>>;
|
|
32
|
+
interface IModalCloseProps extends React.ComponentProps<typeof DialogClose> {
|
|
33
|
+
children?: ReactNode;
|
|
34
|
+
variant?: IButtonVariant;
|
|
26
35
|
}
|
|
27
|
-
export declare const WuModalClose:
|
|
36
|
+
export declare const WuModalClose: FC<IModalCloseProps>;
|
|
37
|
+
export {};
|
|
@@ -3,6 +3,7 @@ import { default as React } from 'react';
|
|
|
3
3
|
export interface IWuPrimaryNavbarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
linkNodes: React.ReactElement[];
|
|
5
5
|
children?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
6
7
|
}
|
|
7
8
|
/**
|
|
8
9
|
* This is the primary navbar component. Every link supports custom style and className.
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { IWuSelectOption } from './types/IWuSelectOptions';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
multiple?: boolean;
|
|
8
|
-
defaultValue?: T | T[];
|
|
9
|
-
onSelect?: (value: T | T[]) => void;
|
|
10
|
-
width?: number;
|
|
11
|
-
maxHeight?: number;
|
|
12
|
-
virtualizedThreshold?: number;
|
|
3
|
+
type IValue<T> = T | T[];
|
|
4
|
+
export interface IWuSelectProps<T> extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'value' | 'defaultValue' | 'onSelect'> {
|
|
5
|
+
defaultValue?: IValue<T>;
|
|
13
6
|
label?: string;
|
|
7
|
+
value?: IValue<T>;
|
|
8
|
+
data: T[];
|
|
9
|
+
accessorKey: {
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
};
|
|
13
|
+
onSelect?: (value: IValue<T>) => void;
|
|
14
|
+
multiple?: boolean;
|
|
14
15
|
variant?: 'flat' | 'outlined';
|
|
15
16
|
dir?: 'ltr' | 'rtl';
|
|
16
|
-
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
virtualizedThreshold?: number;
|
|
19
|
+
maxHeight?: number;
|
|
20
|
+
hasGroup?: boolean;
|
|
21
|
+
header?: React.ReactNode;
|
|
22
|
+
customTriggerChildren?: React.ReactNode;
|
|
17
23
|
}
|
|
18
|
-
export declare const WuSelect: <T>({
|
|
24
|
+
export declare const WuSelect: <T>({ data, onSelect, multiple, defaultValue, value: controlledValue, accessorKey, variant, dir, placeholder, label, virtualizedThreshold, maxHeight, hasGroup, header, customTriggerChildren, ...rest }: IWuSelectProps<T>) => React.JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export type IWuSelectItem<T> = T & {
|
|
4
4
|
type?: 'option';
|
|
5
|
-
value: T;
|
|
6
|
-
label: string;
|
|
7
5
|
disabled?: boolean;
|
|
8
6
|
icon?: React.ReactNode;
|
|
9
7
|
isAdmin?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export interface
|
|
8
|
+
};
|
|
9
|
+
export interface IWuSelectGroupItem<T> {
|
|
12
10
|
type: 'group';
|
|
13
11
|
label: string;
|
|
14
|
-
options:
|
|
12
|
+
options: IWuSelectItem<T>[];
|
|
15
13
|
}
|
|
16
|
-
export interface
|
|
14
|
+
export interface IWuSelectDivider {
|
|
17
15
|
type: 'divider';
|
|
18
16
|
}
|
|
19
|
-
export type IWuSelectOption<T> =
|
|
17
|
+
export type IWuSelectOption<T> = IWuSelectItem<T> | IWuSelectGroupItem<T> | IWuSelectDivider;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IWuSelectItem } from '../types/IWuSelectOptions';
|
|
3
|
+
|
|
4
|
+
export interface IWuSelectItemProps<T> {
|
|
5
|
+
option: IWuSelectItem<T>;
|
|
6
|
+
accessorKey: {
|
|
7
|
+
value: string;
|
|
8
|
+
label: string;
|
|
9
|
+
};
|
|
10
|
+
value: unknown | unknown[];
|
|
11
|
+
multiple?: boolean;
|
|
12
|
+
onSelect: (value: IWuSelectItem<T>) => void;
|
|
13
|
+
dir: 'ltr' | 'rtl';
|
|
14
|
+
}
|
|
15
|
+
export declare const WuSelectItem: <T>({ option, value, multiple, onSelect, accessorKey, dir, }: IWuSelectItemProps<T>) => React.JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface IWuSelectTriggerProps<T> {
|
|
4
|
+
placeholder: string;
|
|
5
|
+
value: T | T[];
|
|
6
|
+
multiple?: boolean;
|
|
7
|
+
variant?: 'flat' | 'outlined';
|
|
8
|
+
dir?: 'ltr' | 'rtl';
|
|
9
|
+
accessorKey: {
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
};
|
|
13
|
+
customTriggerChildren?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export declare const WuSelectTrigger: <T>({ placeholder, value, multiple, accessorKey, variant, dir, customTriggerChildren, }: IWuSelectTriggerProps<T>) => React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IWuSelectOption } from '../types/IWuSelectOptions';
|
|
2
|
+
import { IWuSelectItemProps } from '../ui/_item';
|
|
3
|
+
|
|
4
|
+
type IRenderSelectItemsProps<T> = Omit<IWuSelectItemProps<T>, 'option'> & {
|
|
5
|
+
option: IWuSelectOption<T>;
|
|
6
|
+
};
|
|
7
|
+
export declare const RenderItems: <T>(props: IRenderSelectItemsProps<T>) => React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -8,6 +8,7 @@ export interface IWuStepperProps extends Omit<React.InputHTMLAttributes<HTMLInpu
|
|
|
8
8
|
label?: string;
|
|
9
9
|
defaultValue: number;
|
|
10
10
|
dir?: 'ltr' | 'rtl';
|
|
11
|
+
labelPosition?: 'left' | 'top';
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
13
14
|
* This extends the native input element. So it supports all attributes of input.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
-
export interface IWuTooltipProps extends React.HTMLAttributes<HTMLBaseElement> {
|
|
4
|
-
content: string;
|
|
3
|
+
export interface IWuTooltipProps extends Omit<React.HTMLAttributes<HTMLBaseElement>, 'content'> {
|
|
4
|
+
content: string | React.ReactNode;
|
|
5
5
|
duration?: number;
|
|
6
6
|
position?: 'top' | 'right' | 'bottom' | 'left';
|
|
7
7
|
children: React.ReactNode;
|
|
@@ -6,5 +6,6 @@ export interface IWuVirtualScrollProps {
|
|
|
6
6
|
list: unknown[];
|
|
7
7
|
callback: (index: number, item: unknown) => JSX.Element;
|
|
8
8
|
dir?: 'rtl' | 'ltr';
|
|
9
|
+
className?: string;
|
|
9
10
|
}
|
|
10
11
|
export declare const WuVirtualScroll: React.ForwardRefExoticComponent<IWuVirtualScrollProps & React.RefAttributes<VirtuosoHandle>>;
|
package/dist/src/docs/Icons.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ICON_CLASSES: string[];
|
package/dist/src/index.d.ts
CHANGED