@npm-questionpro/wick-ui-lib 1.0.0 → 1.0.2
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/command.d.ts +1 -7
- package/dist/src/base/ui/sheet.d.ts +2 -1
- package/dist/src/components/appHeader/WuAppHeader.d.ts +0 -5
- package/dist/src/components/appHeader/components/{breadcrumb/WuAppHeaderBar.d.ts → WuAppHeaderBar.d.ts} +1 -2
- package/dist/src/components/appHeader/components/WuAppHeaderDropdownWrapper.d.ts +10 -0
- package/dist/src/components/appHeader/components/productSwitcher/WuAppHeaderMenu.d.ts +1 -1
- package/dist/src/components/appHeader/components/productSwitcher/ui/_productDropdown.d.ts +1 -1
- package/dist/src/components/appHeader/components/productSwitcher/ui/_smallScreenMenuTrigger.d.ts +1 -1
- package/dist/src/components/appHeader/components/productSwitcher/ui/_smallScreenToggleMenu.d.ts +1 -1
- package/dist/src/components/appHeader/index.d.ts +1 -2
- package/dist/src/components/calendar/components/datePicker/WuDatePicker.d.ts +3 -2
- package/dist/src/components/calendar/components/dateRangePicker/WuDateRangePicker.d.ts +1 -1
- package/dist/src/components/calendar/ui/_trigger.d.ts +7 -7
- package/dist/src/components/card/WuCard.d.ts +7 -0
- package/dist/src/components/card/WuCard.test.d.ts +1 -0
- package/dist/src/components/card/index.d.ts +2 -0
- package/dist/src/components/checkbox/WuCheckbox.d.ts +1 -1
- package/dist/src/components/chip/WuChip.d.ts +2 -0
- package/dist/src/components/chip/WuChip.test.d.ts +1 -0
- package/dist/src/components/chip/index.d.ts +2 -0
- package/dist/src/components/combobox/WuCombobox.d.ts +5 -4
- package/dist/src/components/combobox/ui/_trigger.d.ts +4 -3
- package/dist/src/components/drawer/WuDrawer.d.ts +9 -0
- package/dist/src/components/drawer/WuDrawer.test.d.ts +1 -0
- package/dist/src/components/drawer/index.d.ts +2 -0
- package/dist/src/components/input/WuInput.d.ts +1 -1
- package/dist/src/components/listbox/WuListbox.d.ts +38 -0
- package/dist/src/components/listbox/WuListbox.test.d.ts +1 -0
- package/dist/src/components/listbox/index.d.ts +2 -0
- package/dist/src/components/listbox/subComponents/WuListboxTrigger.d.ts +4 -0
- package/dist/src/components/listbox/ui/_item.d.ts +15 -0
- package/dist/src/components/listbox/ui/_search.d.ts +3 -0
- package/dist/src/components/listbox/ui/_selectAll.d.ts +7 -0
- package/dist/src/components/listbox/ui/_trigger.d.ts +22 -0
- package/dist/src/components/listbox/utils/useGenClass.d.ts +1 -0
- package/dist/src/components/monthPicker/WuMonthPicker.d.ts +3 -3
- package/dist/src/components/navbar/primaryNavbar/WuPrimaryNavbar.d.ts +0 -1
- package/dist/src/components/pagination/WuPagination.d.ts +1 -0
- package/dist/src/components/scrollArea/WuScrollArea.d.ts +4 -0
- package/dist/src/components/scrollArea/WuScrollArea.test.d.ts +1 -0
- package/dist/src/components/scrollArea/index.d.ts +1 -0
- package/dist/src/components/select/WuSelect.d.ts +5 -4
- package/dist/src/components/select/ui/_trigger.d.ts +4 -4
- package/dist/src/components/select/utils/renderItems.d.ts +0 -2
- package/dist/src/components/sidebar/WuSidebar.d.ts +1 -1
- package/dist/src/components/sidebar/index.d.ts +1 -1
- package/dist/src/{base/ui → components/sidebar/shadcn}/sidebar.d.ts +3 -24
- package/dist/src/components/table/components/dataTable/WuDataTable.d.ts +6 -7
- package/dist/src/components/table/components/table/WuTable.d.ts +5 -2
- package/dist/src/components/table/types/IWuTableColumnDef.d.ts +1 -0
- package/dist/src/components/table/ui/_body.d.ts +3 -1
- package/dist/src/components/table/ui/_header.d.ts +3 -2
- package/dist/src/components/table/utils/data.d.ts +5 -25
- package/dist/src/components/textarea/WuTextarea.d.ts +1 -1
- package/dist/src/components/toggle/WuToggle.d.ts +1 -1
- package/dist/src/index.d.ts +3 -0
- package/dist/style.css +1 -1
- package/dist/wick-ui-lib/es/index.js +2612 -2333
- package/dist/wick-ui-lib/umd/index.js +2 -1
- package/package.json +71 -44
- package/dist/src/base/ui/breadcrumb.d.ts +0 -19
- package/dist/src/base/ui/menubar.d.ts +0 -32
- package/dist/src/components/appHeader/components/breadcrumb/WuAppHeaderBreadcrumb.d.ts +0 -6
- package/dist/src/components/appHeader/types/WuAppHeaderBreadcrumbItem.d.ts +0 -7
- /package/dist/src/{base/ui → components/calendar/shadcn}/calendar.d.ts +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { DialogProps } from '@radix-ui/react-dialog';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
4
3
|
children?: React.ReactNode;
|
|
@@ -17,7 +16,6 @@ declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
|
17
16
|
disablePointerSelection?: boolean;
|
|
18
17
|
vimBindings?: boolean;
|
|
19
18
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
-
declare const CommandDialog: ({ children, ...props }: DialogProps) => React.JSX.Element;
|
|
21
19
|
declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
|
|
22
20
|
ref?: React.Ref<HTMLInputElement>;
|
|
23
21
|
} & {
|
|
@@ -73,8 +71,4 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
|
73
71
|
keywords?: string[];
|
|
74
72
|
forceMount?: boolean;
|
|
75
73
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
76
|
-
|
|
77
|
-
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
|
|
78
|
-
displayName: string;
|
|
79
|
-
};
|
|
80
|
-
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, };
|
|
74
|
+
export { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, };
|
|
@@ -9,7 +9,8 @@ declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.
|
|
|
9
9
|
declare const sheetVariants: (props?: ({
|
|
10
10
|
side?: "bottom" | "left" | "right" | "top" | null | undefined;
|
|
11
11
|
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
12
|
-
interface ISheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
12
|
+
export interface ISheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
13
|
+
hideCloseButton?: boolean;
|
|
13
14
|
}
|
|
14
15
|
declare const SheetContent: React.ForwardRefExoticComponent<ISheetContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
16
|
declare const SheetHeader: {
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { IWuAppHeaderAccount } from './types/WuAppHeaderAccount';
|
|
3
|
-
import { IWuAppHeaderBreadcrumbItem } from './types/WuAppHeaderBreadcrumbItem';
|
|
4
3
|
import { IWuAppHeaderMenuItem } from './types/WuAppHeaderMenuItem';
|
|
5
4
|
export interface IWuAppHeaderProps extends React.HTMLAttributes<HTMLBaseElement> {
|
|
6
5
|
productName: string;
|
|
7
6
|
categories: IWuAppHeaderMenuItem[];
|
|
8
7
|
user?: IWuAppHeaderAccount;
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated this will not be used in future please use children instead
|
|
11
|
-
*/
|
|
12
|
-
breadcrumbs?: IWuAppHeaderBreadcrumbItem[];
|
|
13
8
|
children?: React.ReactNode;
|
|
14
9
|
onLogout?: () => void;
|
|
15
10
|
homeLink?: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { IWuAppHeaderBreadcrumbItem } from '../../types/WuAppHeaderBreadcrumbItem';
|
|
2
1
|
export interface IWuAppHeaderBarProps {
|
|
3
|
-
breadcrumbs?: IWuAppHeaderBreadcrumbItem[];
|
|
4
2
|
children?: React.ReactNode;
|
|
5
3
|
dir?: 'ltr' | 'rtl';
|
|
4
|
+
className?: string;
|
|
6
5
|
}
|
|
7
6
|
export declare const WuAppHeaderBar: React.FC<IWuAppHeaderBarProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface IWuAppHeaderAccountProps {
|
|
3
|
+
dir?: 'ltr' | 'rtl';
|
|
4
|
+
DataCenter?: React.ReactElement;
|
|
5
|
+
Trigger?: React.ReactElement;
|
|
6
|
+
triggerClassName?: string;
|
|
7
|
+
DropdownContent?: React.ReactElement;
|
|
8
|
+
}
|
|
9
|
+
export declare const WuAppHeaderDropdownWrapper: React.FC<IWuAppHeaderAccountProps>;
|
|
10
|
+
export {};
|
|
@@ -2,7 +2,7 @@ import { IWuAppHeaderMenuItem } from '../../../types/WuAppHeaderMenuItem';
|
|
|
2
2
|
import { default as React, RefObject } from 'react';
|
|
3
3
|
interface IDropdownMenuProps {
|
|
4
4
|
dropdownRef: RefObject<HTMLUListElement | null>;
|
|
5
|
-
dir
|
|
5
|
+
dir?: 'ltr' | 'rtl';
|
|
6
6
|
isDropdownOpen: boolean;
|
|
7
7
|
productCategories: IWuAppHeaderMenuItem[];
|
|
8
8
|
openCategory: IWuAppHeaderMenuItem | null;
|
package/dist/src/components/appHeader/components/productSwitcher/ui/_smallScreenMenuTrigger.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ interface ISmallScreenMenuTriggerProps {
|
|
|
7
7
|
};
|
|
8
8
|
activeProductBgColor: string;
|
|
9
9
|
activeProductName?: string;
|
|
10
|
-
dir
|
|
10
|
+
dir?: 'ltr' | 'rtl';
|
|
11
11
|
smallScreenButtonRef: React.RefObject<HTMLButtonElement | null>;
|
|
12
12
|
handleDropdownToggle: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
13
13
|
handleKeyDown: (e: React.KeyboardEvent<HTMLButtonElement>, step: number) => void;
|
package/dist/src/components/appHeader/components/productSwitcher/ui/_smallScreenToggleMenu.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
interface IMenuToggleProps {
|
|
3
|
-
dir
|
|
3
|
+
dir?: 'ltr' | 'rtl';
|
|
4
4
|
isProductButtonShow: boolean;
|
|
5
5
|
smallScreenToggleButtonRef: React.RefObject<HTMLButtonElement | null>;
|
|
6
6
|
setIsProductButtonShow: React.Dispatch<React.SetStateAction<boolean>>;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
export { WuAppHeaderAccount } from './components/account/WuAppHeaderAccount';
|
|
2
|
-
export { WuAppHeaderBar } from './components/breadcrumb/WuAppHeaderBar';
|
|
3
2
|
export { WuAppHeaderHelp } from './components/help/WuAppHeaderHelp';
|
|
4
3
|
export { WuAppHeaderMenu } from './components/productSwitcher/WuAppHeaderMenu';
|
|
4
|
+
export { WuAppHeaderBar } from './components/WuAppHeaderBar';
|
|
5
5
|
export { WuAppHeaderSearch } from './components/WuAppHeaderSearch';
|
|
6
6
|
export { WuTruncatedLabel } from './components/WuTruncatedLabel';
|
|
7
7
|
export type { IWuAppHeaderAccount } from './types/WuAppHeaderAccount';
|
|
8
|
-
export type { IWuAppHeaderBreadcrumbItem } from './types/WuAppHeaderBreadcrumbItem';
|
|
9
8
|
export type { IWuAppHeaderHelpMenu } from './types/WuAppHeaderHelpMenu';
|
|
10
9
|
export type { IWuAppHeaderMenuItem } from './types/WuAppHeaderMenuItem';
|
|
11
10
|
export { WuAppHeader } from './WuAppHeader';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
2
|
+
import { WuDatePickerTrigger } from '../../ui/_trigger';
|
|
3
|
+
export type IWuDatePickerProps = Omit<React.ComponentProps<typeof WuDatePickerTrigger>, 'value'> & {
|
|
3
4
|
formatString?: string;
|
|
4
5
|
value?: Date | string;
|
|
5
6
|
disabled?: boolean;
|
|
@@ -8,7 +9,7 @@ export type IWuDatePickerProps = {
|
|
|
8
9
|
className?: string;
|
|
9
10
|
dir?: 'ltr' | 'rtl';
|
|
10
11
|
onChange?: (date?: Date) => void;
|
|
11
|
-
|
|
12
|
+
Label?: React.ReactNode;
|
|
12
13
|
labelPosition?: 'top' | 'left';
|
|
13
14
|
onReset?: () => void;
|
|
14
15
|
showResetButton?: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { WuButton } from '../../button';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export type IWuDatePickerTriggerProps = React.ComponentProps<typeof WuButton> & {
|
|
4
|
+
formattedString?: string;
|
|
5
|
+
dir?: 'ltr' | 'rtl';
|
|
4
6
|
placeholder?: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
className?: string;
|
|
8
|
-
}>;
|
|
7
|
+
};
|
|
8
|
+
export declare const WuDatePickerTrigger: React.FC<IWuDatePickerTriggerProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface IWuCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
rounded?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare const WuCard: React.ForwardRefExoticComponent<IWuCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export declare const WuCardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export declare const WuCardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,7 +3,7 @@ import { default as React } from 'react';
|
|
|
3
3
|
export type IWuCheckboxProps = Omit<React.ComponentPropsWithRef<typeof Checkbox>, 'onChange'> & {
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
checked?: boolean;
|
|
6
|
-
|
|
6
|
+
Label?: React.ReactNode;
|
|
7
7
|
labelPosition?: 'left' | 'right';
|
|
8
8
|
partial?: boolean;
|
|
9
9
|
readonly?: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type IWuComboboxProps<T> = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'value' | 'defaultValue' | 'onSelect'> & {
|
|
3
3
|
data: T[];
|
|
4
4
|
accessorKey: {
|
|
5
5
|
value: string;
|
|
@@ -13,7 +13,7 @@ export interface IWuComboboxProps<T> {
|
|
|
13
13
|
placeholder?: string;
|
|
14
14
|
variant?: 'flat' | 'outlined';
|
|
15
15
|
dir?: 'ltr' | 'rtl';
|
|
16
|
-
|
|
16
|
+
Label?: React.ReactNode;
|
|
17
17
|
maxHeight?: number;
|
|
18
18
|
onSelect?: (value: T | T[]) => void;
|
|
19
19
|
hasGroup?: boolean;
|
|
@@ -28,5 +28,6 @@ export interface IWuComboboxProps<T> {
|
|
|
28
28
|
disabled?: boolean;
|
|
29
29
|
labelPosition?: 'left' | 'top' | 'right';
|
|
30
30
|
className?: string;
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
onScroll?: React.UIEventHandler<HTMLDivElement>;
|
|
32
|
+
};
|
|
33
|
+
export declare const WuCombobox: <T>({ data, accessorKey, value, defaultValue, Header, virtualizedThreshold, isEllipse, placeholder, variant, dir, onSelect, Label, maxHeight, multiple, hasGroup, selectAll, id, disabled, labelPosition, className, onScroll, ...rest }: IWuComboboxProps<T>) => React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { IWuComboboxItem } from '../types/IWuComboboxOptions';
|
|
3
3
|
import { IWuComboboxProps } from '../WuCombobox';
|
|
4
|
-
export
|
|
4
|
+
export type IWuComboboxTriggerProps<T> = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'value' | 'defaultValue' | 'onSelect'> & {
|
|
5
5
|
accessorKey: {
|
|
6
6
|
label: string;
|
|
7
7
|
value: string;
|
|
@@ -17,5 +17,6 @@ export interface IWuComboboxTriggerProps<T> {
|
|
|
17
17
|
selectAll?: IWuComboboxProps<T>['selectAll'];
|
|
18
18
|
isCheckedAll?: boolean;
|
|
19
19
|
className?: string;
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
21
|
+
};
|
|
22
|
+
export declare const WuComboboxTrigger: <T>({ placeholder, isEllipse, selectedOptions, variant, dir, accessorKey, multiple, id, disabled, selectAll, isCheckedAll, className, ...rest }: IWuComboboxTriggerProps<T>) => React.JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SheetClose, SheetContent } from '../../base/ui/sheet';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export type IWuDrawerProps = React.ComponentPropsWithoutRef<typeof SheetContent> & {
|
|
4
|
+
Trigger?: React.ReactNode;
|
|
5
|
+
hideCloseButton?: boolean;
|
|
6
|
+
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
7
|
+
};
|
|
8
|
+
export declare const WuDrawer: React.FC<IWuDrawerProps>;
|
|
9
|
+
export declare const WuDrawerClose: React.FC<React.ComponentPropsWithoutRef<typeof SheetClose>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface IWuInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
-
|
|
3
|
+
Label?: React.ReactNode;
|
|
4
4
|
labelPosition?: 'left' | 'top' | 'right';
|
|
5
5
|
Icon?: React.ReactNode;
|
|
6
6
|
iconPosition?: 'left' | 'right';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IWuChipProp } from './ui/_trigger';
|
|
3
|
+
export type IWuListboxProps<T extends object> = {
|
|
4
|
+
data: T[];
|
|
5
|
+
accessorKey: {
|
|
6
|
+
value: keyof T;
|
|
7
|
+
label: keyof T;
|
|
8
|
+
};
|
|
9
|
+
value?: T | T[];
|
|
10
|
+
Item?: (props: {
|
|
11
|
+
value: T;
|
|
12
|
+
isSelected?: boolean;
|
|
13
|
+
}) => React.ReactNode;
|
|
14
|
+
Label?: React.ReactNode;
|
|
15
|
+
CustomHeader?: React.ReactNode;
|
|
16
|
+
CustomTrigger?: (value?: T | T[]) => React.ReactElement<HTMLButtonElement>;
|
|
17
|
+
NoDataContent?: React.ReactNode;
|
|
18
|
+
Chip?: (props: IWuChipProp<T>) => React.ReactNode;
|
|
19
|
+
onSelect?: (value: T | T[]) => void;
|
|
20
|
+
onScroll?: React.UIEventHandler<HTMLDivElement>;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
multiple?: boolean;
|
|
23
|
+
searchable?: boolean;
|
|
24
|
+
virtualizedThreshold?: number;
|
|
25
|
+
selectAll?: {
|
|
26
|
+
enabled?: boolean;
|
|
27
|
+
onSelectAll?: (value: boolean) => void;
|
|
28
|
+
label?: string;
|
|
29
|
+
};
|
|
30
|
+
id?: string;
|
|
31
|
+
dir?: 'rtl' | 'ltr';
|
|
32
|
+
className?: string;
|
|
33
|
+
listClass?: string;
|
|
34
|
+
placeholder?: string;
|
|
35
|
+
variant?: 'flat' | 'outlined';
|
|
36
|
+
labelPosition?: 'left' | 'top' | 'right';
|
|
37
|
+
};
|
|
38
|
+
export declare const WuListbox: <T extends object>(props: IWuListboxProps<T>) => React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CommandItem } from '../../../base/ui/command';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
type IWuListItemProps<T> = Omit<React.ComponentProps<typeof CommandItem>, 'value'> & {
|
|
4
|
+
option: T;
|
|
5
|
+
accessorKey: {
|
|
6
|
+
value: keyof T;
|
|
7
|
+
label: keyof T;
|
|
8
|
+
};
|
|
9
|
+
multiple?: boolean;
|
|
10
|
+
boolean?: boolean;
|
|
11
|
+
onSelect?: (value: T) => void;
|
|
12
|
+
value?: T[];
|
|
13
|
+
};
|
|
14
|
+
export declare const WuListboxItem: <T>(props: IWuListItemProps<T>) => React.ReactElement;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type IWuChipProp<T> = {
|
|
3
|
+
value: T;
|
|
4
|
+
unselect: (value: T) => void;
|
|
5
|
+
key?: string | number;
|
|
6
|
+
};
|
|
7
|
+
type IWuListboxTriggerProps<T> = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'value'> & {
|
|
8
|
+
CustomTrigger?: (value?: T | T[]) => React.ReactElement<HTMLButtonElement>;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
value?: T | T[];
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
accessorKey: {
|
|
13
|
+
value: keyof T;
|
|
14
|
+
label: keyof T;
|
|
15
|
+
};
|
|
16
|
+
Chip?: (props: IWuChipProp<T>) => React.ReactNode;
|
|
17
|
+
handleUnselect: (value: T) => void;
|
|
18
|
+
variant?: 'flat' | 'outlined';
|
|
19
|
+
dir?: 'rtl' | 'ltr';
|
|
20
|
+
};
|
|
21
|
+
export declare const ListboxTrigger: <T>(props: IWuListboxTriggerProps<T>) => React.JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useGenClassName: (name: string, isCombobox?: boolean) => string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
2
|
+
import { WuDatePickerTrigger } from '../calendar/ui/_trigger';
|
|
3
|
+
export type IWuMonthPickerProps = React.ComponentProps<typeof WuDatePickerTrigger> & {
|
|
3
4
|
value?: Date | string;
|
|
4
5
|
onChange?: (value: Date) => void;
|
|
5
6
|
min?: Date | string;
|
|
6
7
|
max?: Date | string;
|
|
7
8
|
placeholder?: string;
|
|
8
|
-
|
|
9
|
-
label?: string;
|
|
9
|
+
Label?: React.ReactNode;
|
|
10
10
|
labelPosition?: 'top' | 'left' | 'right';
|
|
11
11
|
id?: string;
|
|
12
12
|
disabled?: boolean;
|
|
@@ -4,7 +4,6 @@ interface INavLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
|
4
4
|
className?: string;
|
|
5
5
|
}
|
|
6
6
|
export interface IWuPrimaryNavbarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
|
-
linkNodes?: React.ReactElement<INavLinkProps>[];
|
|
8
7
|
Links: React.ReactElement<INavLinkProps>[];
|
|
9
8
|
children?: React.ReactNode;
|
|
10
9
|
className?: string;
|
|
@@ -5,5 +5,6 @@ export interface IWuPaginationProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
5
5
|
initialPageSize: number;
|
|
6
6
|
onPageChange?: (page: number) => void;
|
|
7
7
|
disabled?: boolean;
|
|
8
|
+
dir?: 'ltr' | 'rtl';
|
|
8
9
|
}
|
|
9
10
|
export declare const WuPagination: React.ForwardRefExoticComponent<IWuPaginationProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WuScrollArea } from './WuScrollArea';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type IWuSelectProps<T> = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'value' | 'defaultValue'> & {
|
|
3
3
|
defaultValue?: T | T[] | null;
|
|
4
|
-
|
|
4
|
+
Label?: React.ReactNode;
|
|
5
5
|
value?: T | T[] | null;
|
|
6
6
|
data: T[];
|
|
7
7
|
accessorKey: {
|
|
@@ -25,5 +25,6 @@ export interface IWuSelectProps<T> extends Omit<React.SelectHTMLAttributes<HTMLS
|
|
|
25
25
|
triggerText?: string;
|
|
26
26
|
};
|
|
27
27
|
labelPosition?: 'left' | 'top' | 'right';
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
onScroll?: React.UIEventHandler<HTMLDivElement>;
|
|
29
|
+
};
|
|
30
|
+
export declare const WuSelect: <T>({ data, onSelect, multiple, defaultValue, value: controlledValue, accessorKey, variant, dir, placeholder, Label, virtualizedThreshold, maxHeight, hasGroup, Header, CustomTrigger, selectAll, disabled, labelPosition, onScroll, ...rest }: IWuSelectProps<T>) => React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { IWuSelectProps } from '../WuSelect';
|
|
3
|
-
export
|
|
4
|
-
placeholder
|
|
3
|
+
export type IWuSelectTriggerProps<T> = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'value' | 'defaultValue'> & {
|
|
4
|
+
placeholder?: string;
|
|
5
5
|
value: T | T[];
|
|
6
6
|
multiple?: boolean;
|
|
7
7
|
variant?: 'flat' | 'outlined';
|
|
@@ -16,5 +16,5 @@ export interface IWuSelectTriggerProps<T> {
|
|
|
16
16
|
selectAll?: IWuSelectProps<T>['selectAll'];
|
|
17
17
|
isCheckedAll?: boolean;
|
|
18
18
|
width?: number;
|
|
19
|
-
}
|
|
20
|
-
export declare const WuSelectTrigger: <T>({ placeholder, value, multiple, accessorKey, variant, dir, customTriggerChildren, id, disabled, selectAll, isCheckedAll, width, }: IWuSelectTriggerProps<T>) => React.JSX.Element;
|
|
19
|
+
};
|
|
20
|
+
export declare const WuSelectTrigger: <T>({ placeholder, value, multiple, accessorKey, variant, dir, customTriggerChildren, id, disabled, selectAll, isCheckedAll, width, ...rest }: IWuSelectTriggerProps<T>) => React.JSX.Element;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { IWuSelectOption } from '../types/IWuSelectOptions';
|
|
2
2
|
import { IWuSelectItemProps } from '../ui/_item';
|
|
3
|
-
import { IWuSelectProps } from '../WuSelect';
|
|
4
3
|
type IRenderSelectItemsProps<T> = Omit<IWuSelectItemProps<T>, 'option'> & {
|
|
5
4
|
option: IWuSelectOption<T>;
|
|
6
|
-
selectAll?: IWuSelectProps<T>['selectAll'];
|
|
7
5
|
handleSelectAll?: () => void;
|
|
8
6
|
isCheckedAll?: boolean;
|
|
9
7
|
isPartialSelected?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SidebarContent, SidebarFooter, SidebarGroup, SidebarMenu, SidebarMenuItem, SidebarTrigger } from '
|
|
1
|
+
import { SidebarContent, SidebarFooter, SidebarGroup, SidebarMenu, SidebarMenuItem, SidebarTrigger } from './shadcn/sidebar';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
export type IWuSidebarProps = {
|
|
4
4
|
children: React.ReactNode;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { useSidebar as useWuSidebar } from '
|
|
1
|
+
export { useSidebar as useWuSidebar } from './shadcn/sidebar';
|
|
2
2
|
export { WuSidebar, WuSidebarContent, WuSidebarFooter, WuSidebarGroup, WuSidebarItem, WuSidebarMenu, WuSidebarTrigger, type IWuSidebarGroupProps, type IWuSidebarItemProps, type IWuSidebarProps, } from './WuSidebar';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { TooltipContent } from '
|
|
2
|
+
import { TooltipContent } from '../../../base/ui/tooltip';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
type ISidebarContext = {
|
|
5
5
|
state: 'expanded' | 'collapsed';
|
|
@@ -21,21 +21,15 @@ declare const Sidebar: React.ForwardRefExoticComponent<Omit<React.ClassAttribute
|
|
|
21
21
|
variant?: "sidebar" | "floating" | "inset";
|
|
22
22
|
collapsible?: "offcanvas" | "icon" | "none";
|
|
23
23
|
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
-
declare const SidebarTrigger: React.ForwardRefExoticComponent<Omit<import('
|
|
25
|
-
declare const SidebarRail: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
24
|
+
declare const SidebarTrigger: React.ForwardRefExoticComponent<Omit<import('../../../base/ui/button').IButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
26
25
|
declare const SidebarInset: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
-
declare const SidebarInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
28
26
|
declare const SidebarHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
29
27
|
declare const SidebarFooter: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
-
declare const SidebarSeparator: React.ForwardRefExoticComponent<Omit<Omit<import('@radix-ui/react-separator').SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
31
28
|
declare const SidebarContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
32
29
|
declare const SidebarGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
33
30
|
declare const SidebarGroupLabel: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
34
31
|
asChild?: boolean;
|
|
35
32
|
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
-
declare const SidebarGroupAction: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
37
|
-
asChild?: boolean;
|
|
38
|
-
}, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
39
33
|
declare const SidebarGroupContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
40
34
|
declare const SidebarMenu: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
41
35
|
declare const SidebarMenuItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
@@ -47,19 +41,4 @@ declare const SidebarMenuButton: React.ForwardRefExoticComponent<Omit<React.Clas
|
|
|
47
41
|
variant?: "outline" | "default" | null | undefined;
|
|
48
42
|
size?: "sm" | "lg" | "default" | null | undefined;
|
|
49
43
|
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
50
|
-
|
|
51
|
-
asChild?: boolean;
|
|
52
|
-
showOnHover?: boolean;
|
|
53
|
-
}, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
54
|
-
declare const SidebarMenuBadge: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
55
|
-
declare const SidebarMenuSkeleton: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
56
|
-
showIcon?: boolean;
|
|
57
|
-
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
58
|
-
declare const SidebarMenuSub: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
59
|
-
declare const SidebarMenuSubItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
60
|
-
declare const SidebarMenuSubButton: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLAnchorElement> & React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
61
|
-
asChild?: boolean;
|
|
62
|
-
size?: "sm" | "md";
|
|
63
|
-
isActive?: boolean;
|
|
64
|
-
}, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
65
|
-
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
|
|
44
|
+
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarProvider, SidebarTrigger, useSidebar, };
|
|
@@ -4,13 +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
|
-
|
|
8
|
-
pageIndex: number;
|
|
9
|
-
pageSize: number;
|
|
10
|
-
};
|
|
7
|
+
caption?: string;
|
|
11
8
|
variant?: 'unstyled' | 'striped' | 'bordered';
|
|
12
9
|
size?: 'compact' | 'default';
|
|
13
|
-
|
|
10
|
+
sort?: {
|
|
14
11
|
enabled: boolean;
|
|
15
12
|
onSort: (sort: IWuManualSorting) => void;
|
|
16
13
|
};
|
|
@@ -21,7 +18,9 @@ export interface IWuDataTableProps<T> extends React.TableHTMLAttributes<HTMLTabl
|
|
|
21
18
|
onRowSelect: React.Dispatch<React.SetStateAction<T[]>>;
|
|
22
19
|
rowUniqueKey: string;
|
|
23
20
|
};
|
|
24
|
-
|
|
21
|
+
CustomLoader?: React.ReactNode;
|
|
22
|
+
HeaderAction?: React.ReactNode;
|
|
25
23
|
NoDataContent?: React.ReactNode;
|
|
24
|
+
stickyHeader?: boolean;
|
|
26
25
|
}
|
|
27
|
-
export declare const WuDataTable: <T>({ data, columns,
|
|
26
|
+
export declare const WuDataTable: <T>({ data, columns, isLoading, variant, sort, size, rowSelection, HeaderAction, NoDataContent, stickyHeader, CustomLoader, caption, ...props }: IWuDataTableProps<T>) => React.JSX.Element;
|
|
@@ -22,10 +22,13 @@ export interface IWuTableProps<T> extends React.TableHTMLAttributes<HTMLTableEle
|
|
|
22
22
|
onRowSelect: React.Dispatch<React.SetStateAction<T[]>>;
|
|
23
23
|
rowUniqueKey: string;
|
|
24
24
|
};
|
|
25
|
-
HeaderAction?: React.
|
|
25
|
+
HeaderAction?: React.ReactNode;
|
|
26
26
|
NoDataContent?: React.ReactNode;
|
|
27
|
+
CustomLoader?: React.ReactNode;
|
|
28
|
+
isLoading?: boolean;
|
|
29
|
+
stickyHeader?: boolean;
|
|
27
30
|
}
|
|
28
31
|
export declare const WuTable: {
|
|
29
|
-
<T>({ data, columns, caption, variant, sort, filterText, size, pagination, rowSelection, HeaderAction, NoDataContent, ...rest }: IWuTableProps<T>): React.JSX.Element;
|
|
32
|
+
<T>({ data, columns, caption, variant, sort, filterText, size, pagination, rowSelection, HeaderAction, NoDataContent, CustomLoader, isLoading, stickyHeader, ...rest }: IWuTableProps<T>): React.JSX.Element;
|
|
30
33
|
displayName: string;
|
|
31
34
|
};
|