tw-react-components 0.0.159 → 0.0.163
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/index.esm.js +236 -249
- package/package.json +1 -1
- package/src/components/Badge/index.d.ts +2 -3
- package/src/components/Block/index.d.ts +4 -10
- package/src/components/Button/index.d.ts +3 -11
- package/src/components/Card/index.d.ts +3 -7
- package/src/components/Dialog/Dialog.d.ts +5 -5
- package/src/components/DropdownMenu/index.d.ts +18 -17
- package/src/components/Flex/index.d.ts +2 -13
- package/src/components/Form/controls/custom/date-time/index.d.ts +3 -12
- package/src/components/Form/controls/custom/file.d.ts +2 -5
- package/src/components/Form/controls/custom/select/index.d.ts +4 -8
- package/src/components/Form/controls/primitive/BasicInput.d.ts +2 -14
- package/src/components/Form/controls/primitive/CheckBoxInput.d.ts +2 -1
- package/src/components/Form/controls/primitive/EmailInput.d.ts +2 -1
- package/src/components/Form/controls/primitive/NumberInput.d.ts +2 -4
- package/src/components/Form/controls/primitive/PasswordInput.d.ts +2 -1
- package/src/components/Form/controls/primitive/TextInput.d.ts +2 -1
- package/src/components/Form/controls/primitive/TextareaInput.d.ts +2 -1
- package/src/components/Form/controls/with-form.d.ts +10 -46
- package/src/components/Hint/index.d.ts +7 -9
- package/src/components/List/index.d.ts +12 -10
- package/src/components/Popover/index.d.ts +4 -3
- package/src/components/Separator/index.d.ts +2 -1
- package/src/components/Sheet/index.d.ts +6 -6
- package/src/components/Sidebar/index.d.ts +35 -35
- package/src/components/Switch/index.d.ts +3 -5
- package/src/components/Tabs/index.d.ts +4 -3
- package/src/helpers/index.d.ts +0 -1
- package/src/hooks/useOnSwipe.d.ts +1 -1
- package/src/hooks/useOutsideClick.d.ts +1 -1
- package/src/helpers/mergeRefs.d.ts +0 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tw-react-components",
|
|
3
3
|
"description": "A set of React components build with TailwindCSS to make a nice dashboard.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.163",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://bacali95.github.io/tw-react-components",
|
|
7
7
|
"type": "module",
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
1
2
|
import type { ButtonProps, ButtonVariant } from '../Button';
|
|
2
3
|
export type BadgeVariant = Exclude<ButtonVariant, 'text'>;
|
|
3
4
|
export type BadgeProps = Omit<ButtonProps, 'variant'> & {
|
|
4
5
|
variant?: BadgeVariant;
|
|
5
6
|
};
|
|
6
|
-
export declare const Badge:
|
|
7
|
-
variant?: BadgeVariant;
|
|
8
|
-
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
export declare const Badge: FC<BadgeProps>;
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import type { ComponentProps,
|
|
2
|
-
export type BlockProps =
|
|
1
|
+
import type { ComponentProps, FC } from 'react';
|
|
2
|
+
export type BlockProps = ComponentProps<'div'> & {
|
|
3
3
|
className?: string;
|
|
4
4
|
centered?: boolean;
|
|
5
5
|
container?: boolean;
|
|
6
6
|
fullWidth?: boolean;
|
|
7
7
|
fullHeight?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare const Block:
|
|
10
|
-
className?: string;
|
|
11
|
-
centered?: boolean;
|
|
12
|
-
container?: boolean;
|
|
13
|
-
fullWidth?: boolean;
|
|
14
|
-
fullHeight?: boolean;
|
|
15
|
-
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
};
|
|
9
|
+
export declare const Block: FC<BlockProps>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { LucideIcon } from 'lucide-react';
|
|
2
|
-
import type { ComponentProps,
|
|
2
|
+
import type { ComponentProps, FC } from 'react';
|
|
3
3
|
import type { Color, Size } from '../types';
|
|
4
4
|
export type ButtonVariant = 'filled' | 'outlined' | 'text';
|
|
5
|
-
export type ButtonProps =
|
|
5
|
+
export type ButtonProps = ComponentProps<'button'> & {
|
|
6
6
|
size?: Size;
|
|
7
7
|
color?: Color;
|
|
8
8
|
variant?: ButtonVariant;
|
|
@@ -11,12 +11,4 @@ export type ButtonProps = PropsWithoutRef<ComponentProps<'button'>> & {
|
|
|
11
11
|
suffixIcon?: LucideIcon;
|
|
12
12
|
unstyled?: boolean;
|
|
13
13
|
};
|
|
14
|
-
export declare const Button:
|
|
15
|
-
size?: Size;
|
|
16
|
-
color?: Color;
|
|
17
|
-
variant?: ButtonVariant;
|
|
18
|
-
rounded?: boolean;
|
|
19
|
-
prefixIcon?: LucideIcon;
|
|
20
|
-
suffixIcon?: LucideIcon;
|
|
21
|
-
unstyled?: boolean;
|
|
22
|
-
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
export declare const Button: FC<ButtonProps>;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
container?: boolean;
|
|
5
|
-
fullWidth?: boolean;
|
|
6
|
-
fullHeight?: boolean;
|
|
7
|
-
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import type { BlockProps } from '../Block';
|
|
3
|
+
export declare const Card: FC<BlockProps>;
|
|
@@ -2,12 +2,12 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
|
2
2
|
import type { FC, HTMLAttributes } from 'react';
|
|
3
3
|
export declare const Dialog: FC<DialogPrimitive.DialogProps> & {
|
|
4
4
|
Portal: FC<DialogPrimitive.DialogPortalProps>;
|
|
5
|
-
Overlay:
|
|
5
|
+
Overlay: FC<DialogPrimitive.DialogOverlayProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
6
|
Close: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
7
7
|
Trigger: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
8
|
-
Content:
|
|
8
|
+
Content: FC<DialogPrimitive.DialogContentProps & import("react").RefAttributes<HTMLDivElement> & {
|
|
9
9
|
fullScreen?: boolean;
|
|
10
|
-
}
|
|
10
|
+
}>;
|
|
11
11
|
Header: {
|
|
12
12
|
({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
displayName: string;
|
|
@@ -16,6 +16,6 @@ export declare const Dialog: FC<DialogPrimitive.DialogProps> & {
|
|
|
16
16
|
({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
displayName: string;
|
|
18
18
|
};
|
|
19
|
-
Title:
|
|
20
|
-
Description:
|
|
19
|
+
Title: FC<DialogPrimitive.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
20
|
+
Description: FC<DialogPrimitive.DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
21
21
|
};
|
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
2
|
-
import type { HTMLAttributes } from 'react';
|
|
3
|
-
export declare const DropdownMenu:
|
|
2
|
+
import type { FC, HTMLAttributes } from 'react';
|
|
3
|
+
export declare const DropdownMenu: FC<DropdownMenuPrimitive.DropdownMenuProps> & {
|
|
4
4
|
Trigger: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
|
-
Content:
|
|
6
|
-
Item:
|
|
5
|
+
Content: FC<DropdownMenuPrimitive.DropdownMenuContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
Item: FC<DropdownMenuPrimitive.DropdownMenuItemProps & import("react").RefAttributes<HTMLDivElement> & {
|
|
7
7
|
inset?: boolean;
|
|
8
|
-
}
|
|
9
|
-
CheckboxItem:
|
|
10
|
-
RadioItem:
|
|
11
|
-
Label:
|
|
8
|
+
}>;
|
|
9
|
+
CheckboxItem: FC<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
RadioItem: FC<DropdownMenuPrimitive.DropdownMenuRadioItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
+
Label: FC<DropdownMenuPrimitive.DropdownMenuLabelProps & import("react").RefAttributes<HTMLDivElement> & {
|
|
12
12
|
inset?: boolean;
|
|
13
|
-
}
|
|
14
|
-
Separator:
|
|
15
|
-
Icon:
|
|
13
|
+
}>;
|
|
14
|
+
Separator: FC<DropdownMenuPrimitive.DropdownMenuSeparatorProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
Icon: FC<{
|
|
16
16
|
className?: string;
|
|
17
17
|
icon: import("lucide-react").LucideIcon;
|
|
18
|
-
|
|
18
|
+
ref?: import("react").Ref<SVGSVGElement>;
|
|
19
|
+
}>;
|
|
19
20
|
Shortcut: {
|
|
20
21
|
({ className, ...props }: HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
21
22
|
displayName: string;
|
|
22
23
|
};
|
|
23
24
|
Group: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
24
|
-
Portal:
|
|
25
|
-
Sub:
|
|
26
|
-
SubContent:
|
|
27
|
-
SubTrigger:
|
|
25
|
+
Portal: FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
26
|
+
Sub: FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
27
|
+
SubContent: FC<DropdownMenuPrimitive.DropdownMenuSubContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
28
|
+
SubTrigger: FC<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & import("react").RefAttributes<HTMLDivElement> & {
|
|
28
29
|
inset?: boolean;
|
|
29
|
-
}
|
|
30
|
+
}>;
|
|
30
31
|
RadioGroup: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
31
32
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
1
2
|
import type { BlockProps } from '../Block';
|
|
2
3
|
type Direction = 'row' | 'column';
|
|
3
4
|
type Position = 'start' | 'center' | 'end';
|
|
@@ -8,17 +9,5 @@ export type FlexProps = BlockProps & {
|
|
|
8
9
|
align?: Position;
|
|
9
10
|
justify?: Position | 'between';
|
|
10
11
|
};
|
|
11
|
-
export declare const Flex:
|
|
12
|
-
className?: string;
|
|
13
|
-
centered?: boolean;
|
|
14
|
-
container?: boolean;
|
|
15
|
-
fullWidth?: boolean;
|
|
16
|
-
fullHeight?: boolean;
|
|
17
|
-
}, "ref"> & {
|
|
18
|
-
reverse?: boolean;
|
|
19
|
-
wrap?: boolean;
|
|
20
|
-
direction?: Direction;
|
|
21
|
-
align?: Position;
|
|
22
|
-
justify?: Position | "between";
|
|
23
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export declare const Flex: FC<FlexProps>;
|
|
24
13
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { FC, Ref } from 'react';
|
|
1
2
|
import type { BasicInputProps } from '../../primitive';
|
|
2
3
|
export type DateTimeInputType = 'date' | 'time' | 'datetime-local';
|
|
3
4
|
export type DateTimeInputProps = {
|
|
@@ -10,17 +11,7 @@ export type DateTimeInputProps = {
|
|
|
10
11
|
maxDate?: Date | null;
|
|
11
12
|
displayFormat?: string;
|
|
12
13
|
displayLocale?: string;
|
|
14
|
+
ref?: Ref<HTMLDivElement>;
|
|
13
15
|
onChange?: (date?: Date | null) => void;
|
|
14
16
|
} & Pick<BasicInputProps<'text'>, 'className' | 'inputClassName' | 'extensionClassName' | 'label' | 'name' | 'description' | 'placeholder' | 'required' | 'disabled' | 'onBlur' | 'size' | 'readOnly'>;
|
|
15
|
-
export declare const DateTimeInput:
|
|
16
|
-
value?: string | Date | null;
|
|
17
|
-
type?: DateTimeInputType;
|
|
18
|
-
hasErrors?: boolean;
|
|
19
|
-
clearable?: boolean;
|
|
20
|
-
step?: number;
|
|
21
|
-
minDate?: Date | null;
|
|
22
|
-
maxDate?: Date | null;
|
|
23
|
-
displayFormat?: string;
|
|
24
|
-
displayLocale?: string;
|
|
25
|
-
onChange?: (date?: Date | null) => void;
|
|
26
|
-
} & Pick<BasicInputProps<"text">, "size" | "label" | "disabled" | "name" | "placeholder" | "readOnly" | "required" | "className" | "onBlur" | "inputClassName" | "extensionClassName" | "description"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export declare const DateTimeInput: FC<DateTimeInputProps>;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
1
2
|
import type { BasicInputProps } from '../primitive';
|
|
2
3
|
export type FileInputProps = {
|
|
3
4
|
value?: string | null;
|
|
4
5
|
onChange?: (item?: string) => void;
|
|
5
6
|
onFileChange?: (file?: File) => void;
|
|
6
7
|
} & Pick<BasicInputProps<'text'>, 'className' | 'inputClassName' | 'extensionClassName' | 'name' | 'label' | 'placeholder' | 'description' | 'size' | 'accept' | 'required' | 'hasErrors' | 'disabled'>;
|
|
7
|
-
export declare const FileInput:
|
|
8
|
-
value?: string | null;
|
|
9
|
-
onChange?: (item?: string) => void;
|
|
10
|
-
onFileChange?: (file?: File) => void;
|
|
11
|
-
} & Pick<BasicInputProps<"text">, "size" | "label" | "accept" | "disabled" | "name" | "placeholder" | "required" | "className" | "inputClassName" | "extensionClassName" | "description" | "hasErrors"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
8
|
+
export declare const FileInput: FC<FileInputProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { JSX, ReactNode, Ref } from 'react';
|
|
2
2
|
import type { BasicInputProps } from '../../primitive';
|
|
3
3
|
export type SelectInputType = 'select';
|
|
4
4
|
export type SelectItem<T, Group extends boolean = false> = {
|
|
@@ -21,7 +21,7 @@ export type SelectInputProps<T = any> = {
|
|
|
21
21
|
search?: boolean;
|
|
22
22
|
searchPredicate?: (item: SelectItem<T>, searchValue: string) => boolean;
|
|
23
23
|
selectPredicate?: (a: T, b: T) => boolean;
|
|
24
|
-
parentRef?:
|
|
24
|
+
parentRef?: Ref<HTMLDivElement | null>;
|
|
25
25
|
} & ({
|
|
26
26
|
multiple?: false;
|
|
27
27
|
value?: T | null;
|
|
@@ -30,9 +30,5 @@ export type SelectInputProps<T = any> = {
|
|
|
30
30
|
multiple: true;
|
|
31
31
|
value: T[];
|
|
32
32
|
onChange?: (item?: T[]) => void;
|
|
33
|
-
}) & Pick<BasicInputProps<'text'>, 'className' | 'inputClassName' | 'extensionClassName' | 'name' | 'label' | 'description' | 'size' | 'placeholder' | 'required' | 'hasErrors' | 'disabled' | 'readOnly'>;
|
|
34
|
-
export declare const SelectInput:
|
|
35
|
-
ref?: ForwardedRef<HTMLDivElement>;
|
|
36
|
-
}) => JSX.Element) & {
|
|
37
|
-
readonly $$typeof: symbol;
|
|
38
|
-
};
|
|
33
|
+
}) & Pick<BasicInputProps<'text'>, 'className' | 'inputClassName' | 'extensionClassName' | 'name' | 'label' | 'description' | 'size' | 'placeholder' | 'required' | 'hasErrors' | 'disabled' | 'readOnly' | 'ref'>;
|
|
34
|
+
export declare const SelectInput: <T>({ className, items, renderItem, value, multiple, clearable, allowAddition, onNewItemAdded, search, searchPredicate, selectPredicate, onChange, readOnly, parentRef, ...props }: SelectInputProps<T>) => JSX.Element;
|
|
@@ -13,20 +13,8 @@ export type BasicInputProps<Type extends InputType> = {
|
|
|
13
13
|
suffixIcon?: FC<ComponentProps<'svg'>>;
|
|
14
14
|
onClear?: () => void;
|
|
15
15
|
onSuffixIconClick?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
16
|
-
} & Omit<Type extends 'textarea' ? ComponentProps<'textarea'> : ComponentProps<'input'>, 'id' | '
|
|
17
|
-
export declare const BasicInput: import("react").
|
|
18
|
-
inputClassName?: string;
|
|
19
|
-
extensionClassName?: string;
|
|
20
|
-
type?: InputType;
|
|
21
|
-
label?: string;
|
|
22
|
-
description?: ReactNode;
|
|
23
|
-
size?: Size;
|
|
24
|
-
hasErrors?: boolean;
|
|
25
|
-
clearable?: boolean;
|
|
26
|
-
suffixIcon?: FC<ComponentProps<"svg">>;
|
|
27
|
-
onClear?: () => void;
|
|
28
|
-
onSuffixIconClick?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
29
|
-
} & Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> | import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "id" | "ref" | "size"> & import("react").RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
|
|
16
|
+
} & Omit<Type extends 'textarea' ? ComponentProps<'textarea'> : ComponentProps<'input'>, 'id' | 'size'>;
|
|
17
|
+
export declare const BasicInput: <Type extends InputType>({ className, inputClassName, extensionClassName, type, label, description, size, hasErrors, clearable, suffixIcon: SuffixIcon, onClear, onSuffixIconClick, ...props }: BasicInputProps<Type>) => import("react/jsx-runtime").JSX.Element;
|
|
30
18
|
export declare const BasicInputExtension: FC<PropsWithChildren<{
|
|
31
19
|
className?: string;
|
|
32
20
|
size: Size;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
1
2
|
import type { BasicInputProps } from './BasicInput';
|
|
2
3
|
export type CheckboxInputProps = Omit<BasicInputProps<'checkbox'>, 'type'>;
|
|
3
|
-
export declare const CheckboxInput:
|
|
4
|
+
export declare const CheckboxInput: FC<CheckboxInputProps>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
1
2
|
import type { BasicInputProps } from './BasicInput';
|
|
2
3
|
export type EmailInputProps = Omit<BasicInputProps<'email'>, 'type'>;
|
|
3
|
-
export declare const EmailInput:
|
|
4
|
+
export declare const EmailInput: FC<EmailInputProps>;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { FC, ReactNode } from 'react';
|
|
2
2
|
import type { BasicInputProps } from './BasicInput';
|
|
3
3
|
export type NumberInputProps = Omit<BasicInputProps<'number'>, 'type'> & {
|
|
4
4
|
unit?: ReactNode;
|
|
5
5
|
};
|
|
6
|
-
export declare const NumberInput:
|
|
7
|
-
unit?: ReactNode;
|
|
8
|
-
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
6
|
+
export declare const NumberInput: FC<NumberInputProps>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
1
2
|
import type { BasicInputProps } from './BasicInput';
|
|
2
3
|
export type PasswordInputProps = Omit<BasicInputProps<'number'>, 'type'>;
|
|
3
|
-
export declare const PasswordInput:
|
|
4
|
+
export declare const PasswordInput: FC<PasswordInputProps>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
1
2
|
import type { BasicInputProps } from './BasicInput';
|
|
2
3
|
export type TextInputProps = Omit<BasicInputProps<'text'>, 'type'>;
|
|
3
|
-
export declare const TextInput:
|
|
4
|
+
export declare const TextInput: FC<TextInputProps>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
1
2
|
import type { BasicInputProps } from './BasicInput';
|
|
2
3
|
export type TextareaInputProps = Omit<BasicInputProps<'textarea'>, 'type'>;
|
|
3
|
-
export declare const TextareaInput:
|
|
4
|
+
export declare const TextareaInput: FC<TextareaInputProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FC } from 'react';
|
|
2
2
|
import type { ControllerRenderProps, Validate } from 'react-hook-form';
|
|
3
3
|
import type { DateTimeInputProps, DateTimeInputType, FileInputProps, SelectInputProps, SelectInputType } from './custom';
|
|
4
4
|
import type { BasicInputProps, CheckboxInputProps, EmailInputProps, InputType, NumberInputProps, PasswordInputProps, TextInputProps, TextareaInputProps } from './primitive';
|
|
@@ -8,49 +8,13 @@ export type WithFormProps<Type extends InputType | SelectInputType, Props = Type
|
|
|
8
8
|
validate?: Type extends 'number' ? Validate<number, any> : Type extends DateTimeInputType ? Validate<Date, any> : Type extends SelectInputType ? Validate<any, any> : Validate<string, any>;
|
|
9
9
|
} & Omit<Props, 'pattern' | keyof Omit<ControllerRenderProps, 'disabled'>>;
|
|
10
10
|
export declare const FormInputs: {
|
|
11
|
-
Text:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} & Omit<EmailInputProps, "pattern" | "ref" | "name" | "value" | "onChange" | "onBlur"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
21
|
-
Password: ForwardRefExoticComponent<{
|
|
22
|
-
name: string;
|
|
23
|
-
pattern?: RegExp;
|
|
24
|
-
validate?: Validate<string, any> | undefined;
|
|
25
|
-
} & Omit<PasswordInputProps, "pattern" | "ref" | "name" | "value" | "onChange" | "onBlur"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
26
|
-
Textarea: ForwardRefExoticComponent<{
|
|
27
|
-
name: string;
|
|
28
|
-
pattern?: RegExp;
|
|
29
|
-
validate?: Validate<string, any> | undefined;
|
|
30
|
-
} & Omit<TextareaInputProps, "pattern" | "ref" | "name" | "value" | "onChange" | "onBlur"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
31
|
-
Number: ForwardRefExoticComponent<{
|
|
32
|
-
name: string;
|
|
33
|
-
pattern?: RegExp;
|
|
34
|
-
validate?: Validate<number, any> | undefined;
|
|
35
|
-
} & Omit<NumberInputProps, "pattern" | "ref" | "name" | "value" | "onChange" | "onBlur"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
36
|
-
Checkbox: ForwardRefExoticComponent<{
|
|
37
|
-
name: string;
|
|
38
|
-
pattern?: RegExp;
|
|
39
|
-
validate?: Validate<string, any> | undefined;
|
|
40
|
-
} & Omit<CheckboxInputProps, "pattern" | "ref" | "name" | "value" | "onChange" | "onBlur"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
41
|
-
DateTime: ForwardRefExoticComponent<{
|
|
42
|
-
name: string;
|
|
43
|
-
pattern?: RegExp;
|
|
44
|
-
validate?: Validate<Date, any> | undefined;
|
|
45
|
-
} & Omit<DateTimeInputProps, "pattern" | "ref" | "name" | "value" | "onChange" | "onBlur"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
46
|
-
Select: ForwardRefExoticComponent<{
|
|
47
|
-
name: string;
|
|
48
|
-
pattern?: RegExp;
|
|
49
|
-
validate?: Validate<any, any> | undefined;
|
|
50
|
-
} & Omit<SelectInputProps, "pattern" | "ref" | "name" | "value" | "onChange" | "onBlur"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
51
|
-
File: ForwardRefExoticComponent<{
|
|
52
|
-
name: string;
|
|
53
|
-
pattern?: RegExp;
|
|
54
|
-
validate?: Validate<string, any> | undefined;
|
|
55
|
-
} & Omit<FileInputProps, "pattern" | "ref" | "name" | "value" | "onChange" | "onBlur"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
11
|
+
Text: FC<WithFormProps<"text", TextInputProps>>;
|
|
12
|
+
Email: FC<WithFormProps<"email", EmailInputProps>>;
|
|
13
|
+
Password: FC<WithFormProps<"password", PasswordInputProps>>;
|
|
14
|
+
Textarea: FC<WithFormProps<"textarea", TextareaInputProps>>;
|
|
15
|
+
Number: FC<WithFormProps<"number", NumberInputProps>>;
|
|
16
|
+
Checkbox: FC<WithFormProps<"checkbox", CheckboxInputProps>>;
|
|
17
|
+
DateTime: FC<WithFormProps<"datetime-local", DateTimeInputProps>>;
|
|
18
|
+
Select: FC<WithFormProps<"select", SelectInputProps>>;
|
|
19
|
+
File: FC<WithFormProps<"file", FileInputProps>>;
|
|
56
20
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { FC, PropsWithChildren, Ref } from 'react';
|
|
1
2
|
import type { BadgeProps, BadgeVariant } from '../Badge';
|
|
2
3
|
import type { Color, Size } from '../types';
|
|
3
4
|
export type HintPlacement = 'top-left' | 'top-right' | 'bottom-right' | 'bottom-left';
|
|
@@ -7,17 +8,14 @@ export type HintDotProps = {
|
|
|
7
8
|
placement?: HintPlacement;
|
|
8
9
|
color?: Color;
|
|
9
10
|
ping?: boolean;
|
|
11
|
+
ref?: Ref<HTMLDivElement>;
|
|
10
12
|
};
|
|
11
13
|
export type HintBadgeProps = BadgeProps & {
|
|
12
14
|
placement?: HintPlacement;
|
|
13
15
|
};
|
|
14
|
-
export declare const Hint:
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
Dot:
|
|
18
|
-
Badge:
|
|
19
|
-
variant?: BadgeVariant;
|
|
20
|
-
} & {
|
|
21
|
-
placement?: HintPlacement;
|
|
22
|
-
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
16
|
+
export declare const Hint: FC<PropsWithChildren<{
|
|
17
|
+
ref?: Ref<HTMLDivElement>;
|
|
18
|
+
}>> & {
|
|
19
|
+
Dot: FC<HintDotProps>;
|
|
20
|
+
Badge: FC<HintBadgeProps>;
|
|
23
21
|
};
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import type { LucideIcon } from 'lucide-react';
|
|
2
|
+
import type { FC, Ref } from 'react';
|
|
2
3
|
import type { Size } from '../types';
|
|
3
|
-
export declare const List:
|
|
4
|
-
Item:
|
|
4
|
+
export declare const List: FC<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>> & {
|
|
5
|
+
Item: FC<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
5
6
|
size?: Size;
|
|
6
7
|
inset?: boolean;
|
|
7
|
-
}
|
|
8
|
-
Label:
|
|
8
|
+
}>;
|
|
9
|
+
Label: FC<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
9
10
|
size?: Size;
|
|
10
11
|
inset?: boolean;
|
|
11
|
-
}
|
|
12
|
-
Indicator:
|
|
12
|
+
}>;
|
|
13
|
+
Indicator: FC<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
13
14
|
icon: LucideIcon;
|
|
14
15
|
iconClassName: string;
|
|
15
|
-
}
|
|
16
|
-
Icon:
|
|
16
|
+
}>;
|
|
17
|
+
Icon: FC<{
|
|
17
18
|
className?: string;
|
|
18
19
|
icon: LucideIcon;
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
ref?: Ref<SVGSVGElement>;
|
|
21
|
+
}>;
|
|
22
|
+
Separator: FC<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
21
23
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
2
|
-
|
|
2
|
+
import type { FC } from 'react';
|
|
3
|
+
export declare const Popover: FC<PopoverPrimitive.PopoverProps> & {
|
|
3
4
|
Trigger: import("react").ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
4
|
-
Content:
|
|
5
|
+
Content: FC<PopoverPrimitive.PopoverContentProps & import("react").RefAttributes<HTMLDivElement> & {
|
|
5
6
|
container?: HTMLElement | null;
|
|
6
|
-
}
|
|
7
|
+
}>;
|
|
7
8
|
};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
2
|
-
|
|
2
|
+
import type { ComponentProps, FC } from 'react';
|
|
3
|
+
export declare const Separator: FC<ComponentProps<typeof SeparatorPrimitive.Root>>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ComponentProps, FC, HTMLAttributes } from 'react';
|
|
4
4
|
declare const sheetVariants: (props?: ({
|
|
5
5
|
side?: "top" | "bottom" | "left" | "right" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
-
interface SheetContentProps extends
|
|
7
|
+
interface SheetContentProps extends ComponentProps<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
8
8
|
}
|
|
9
9
|
export declare const Sheet: FC<SheetPrimitive.DialogProps> & {
|
|
10
10
|
Portal: FC<SheetPrimitive.DialogPortalProps>;
|
|
11
|
-
Overlay:
|
|
11
|
+
Overlay: FC<SheetPrimitive.DialogOverlayProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
12
|
Trigger: import("react").ForwardRefExoticComponent<SheetPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
13
|
Close: import("react").ForwardRefExoticComponent<SheetPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
14
|
-
Content:
|
|
14
|
+
Content: FC<SheetContentProps>;
|
|
15
15
|
Header: {
|
|
16
16
|
({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
displayName: string;
|
|
@@ -20,7 +20,7 @@ export declare const Sheet: FC<SheetPrimitive.DialogProps> & {
|
|
|
20
20
|
({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
21
21
|
displayName: string;
|
|
22
22
|
};
|
|
23
|
-
Title:
|
|
24
|
-
Description:
|
|
23
|
+
Title: FC<SheetPrimitive.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
24
|
+
Description: FC<SheetPrimitive.DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
25
25
|
};
|
|
26
26
|
export {};
|