docthub-core-components 2.2.0 → 2.3.4
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/docthub-core-components.css +1 -1
- package/dist/index.esm.js +3493 -16644
- package/dist/registry/@docthub/alert.json +1 -1
- package/dist/registry/@docthub/auto-complete-component.test.json +2 -5
- package/dist/registry/@docthub/avatar.json +3 -3
- package/dist/registry/@docthub/badge.json +1 -1
- package/dist/registry/@docthub/button.json +3 -3
- package/dist/registry/@docthub/button.test.json +2 -5
- package/dist/registry/@docthub/calendar.json +2 -2
- package/dist/registry/@docthub/checkbox.json +3 -3
- package/dist/registry/@docthub/command.json +3 -3
- package/dist/registry/@docthub/dialog.json +1 -1
- package/dist/registry/@docthub/drawer.json +1 -1
- package/dist/registry/@docthub/dropdown-menu.json +3 -3
- package/dist/registry/@docthub/input.json +1 -1
- package/dist/registry/@docthub/label.json +3 -3
- package/dist/registry/@docthub/popover.json +3 -3
- package/dist/registry/@docthub/progress.json +3 -3
- package/dist/registry/@docthub/radio-group.json +3 -3
- package/dist/registry/@docthub/select.json +3 -3
- package/dist/registry/@docthub/skeleton.json +1 -1
- package/dist/registry/@docthub/tabs.json +3 -3
- package/dist/registry/@docthub/textarea.json +1 -1
- package/dist/registry/@docthub/toast.json +1 -1
- package/dist/registry/@docthub/toast.test.json +2 -4
- package/dist/registry/@docthub/tooltip.json +3 -3
- package/dist/registry/@docthub/typography.json +2 -2
- package/dist/registry/@docthub/typography.test.json +2 -5
- package/dist/src/components/overrides/ui/auto-complete.d.ts +5 -1
- package/dist/src/components/overrides/ui/autocomplete-checkbox.d.ts +44 -0
- package/dist/src/components/overrides/ui/chips/doct-chip.d.ts +10 -4
- package/dist/src/components/overrides/ui/expandable-card.d.ts +6 -1
- package/dist/src/components/overrides/ui/inputs/labeled-input.d.ts +8 -3
- package/dist/src/components/overrides/ui/inputs/otp-input.d.ts +4 -0
- package/dist/src/components/overrides/ui/inputs/password-input.d.ts +6 -2
- package/dist/src/components/overrides/ui/pickers/date-picker-field.d.ts +9 -9
- package/dist/src/components/overrides/ui/pickers/select-field.d.ts +13 -4
- package/dist/src/components/ui/alert.d.ts +14 -3
- package/dist/src/components/ui/avatar.d.ts +8 -2
- package/dist/src/components/ui/breadcrumb.d.ts +19 -0
- package/dist/src/components/ui/button.d.ts +1 -1
- package/dist/src/components/ui/checkbox.d.ts +1 -1
- package/dist/src/components/ui/dialog.d.ts +18 -0
- package/dist/src/components/ui/dropdown-menu.d.ts +1 -1
- package/dist/src/components/ui/input.d.ts +5 -1
- package/dist/src/components/ui/label.d.ts +1 -1
- package/dist/src/components/ui/popover.d.ts +1 -1
- package/dist/src/components/ui/progress.d.ts +20 -2
- package/dist/src/components/ui/radio-group.d.ts +1 -1
- package/dist/src/components/ui/select.d.ts +1 -1
- package/dist/src/components/ui/skeleton.d.ts +14 -1
- package/dist/src/components/ui/tabs.d.ts +8 -3
- package/dist/src/components/ui/textarea.d.ts +5 -0
- package/dist/src/components/ui/timeline.d.ts +41 -0
- package/dist/src/components/ui/tooltip.d.ts +6 -2
- package/dist/src/components/ui/typography.d.ts +3 -1
- package/dist/src/hooks/useAutocompleteCheckbox.d.ts +55 -0
- package/dist/src/index.d.ts +7 -1
- package/package.json +88 -25
- package/dist/index.cjs.js +0 -225
- package/dist/src/components/overrides/ui/pickers/manual-date-picker-field.d.ts +0 -20
|
@@ -42,6 +42,10 @@ interface AutocompleteProps<T> {
|
|
|
42
42
|
emptyMessage?: string;
|
|
43
43
|
className?: string;
|
|
44
44
|
inputClassName?: string;
|
|
45
|
+
debounceMs?: number;
|
|
46
|
+
minSearchLength?: number;
|
|
47
|
+
/** Control built-in bolding of matched query segments (default: false) */
|
|
48
|
+
ntt?: boolean;
|
|
45
49
|
}
|
|
46
|
-
export declare const DoctAutocomplete: <T extends OptionType>({ options, dataSource, value, onChange, change, onInputChange, placeholder, multiple, freeSolo, disabled, loading, size, variant, label, helperText, error, required, fullWidth, clearable, disableCloseOnSelect, filterOptions, getOptionLabel, getOptionValue, isOptionEqualToValue, renderOption, renderTags, fields, noOptionsText, emptyMessage, className, inputClassName, ...props }: AutocompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export declare const DoctAutocomplete: <T extends OptionType>({ options, dataSource, value, onChange, change, onInputChange, placeholder, multiple, freeSolo, disabled, loading, size, variant, label, helperText, error, required, fullWidth, clearable, disableCloseOnSelect, filterOptions, getOptionLabel, getOptionValue, isOptionEqualToValue, renderOption, renderTags, fields, noOptionsText, emptyMessage, className, inputClassName, debounceMs, minSearchLength, ntt, ...props }: AutocompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
47
51
|
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { OptionType } from '../../../hooks/useAutocompleteCheckbox';
|
|
3
|
+
export interface AutocompleteCheckboxProps<T = unknown> {
|
|
4
|
+
options: T[];
|
|
5
|
+
value?: T[];
|
|
6
|
+
onChange?: (event: React.SyntheticEvent | null, value: T[]) => void;
|
|
7
|
+
onInputChange?: (event: React.ChangeEvent<HTMLInputElement>, value: string) => void;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
helperText?: string;
|
|
11
|
+
error?: string;
|
|
12
|
+
noOptionsText?: string;
|
|
13
|
+
emptyMessage?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
required?: boolean;
|
|
17
|
+
clearable?: boolean;
|
|
18
|
+
disableCloseOnSelect?: boolean;
|
|
19
|
+
freeSolo?: T extends string ? boolean : never;
|
|
20
|
+
size?: "small" | "medium" | "large";
|
|
21
|
+
variant?: "outlined" | "filled" | "standard";
|
|
22
|
+
fullWidth?: boolean;
|
|
23
|
+
className?: string;
|
|
24
|
+
inputClassName?: string;
|
|
25
|
+
getOptionLabel?: (option: T) => string;
|
|
26
|
+
getOptionValue?: (option: T) => string | T;
|
|
27
|
+
isOptionEqualToValue?: (option: T, value: T) => boolean;
|
|
28
|
+
filterOptions?: (options: T[], state: {
|
|
29
|
+
inputValue: string;
|
|
30
|
+
}) => T[];
|
|
31
|
+
renderOption?: (option: T, index: number) => React.ReactNode;
|
|
32
|
+
renderTags?: (value: T[], handleTagRemove: (tag: T) => void) => React.ReactNode;
|
|
33
|
+
limitTags?: number;
|
|
34
|
+
fields?: {
|
|
35
|
+
value: string | number;
|
|
36
|
+
text: string;
|
|
37
|
+
};
|
|
38
|
+
dataSource?: T[];
|
|
39
|
+
change?: (event: {
|
|
40
|
+
itemData: T[];
|
|
41
|
+
}) => void;
|
|
42
|
+
}
|
|
43
|
+
export declare function AutocompleteCheckbox<T extends OptionType>({ options, dataSource, value, onChange, change, onInputChange, placeholder, label, helperText, error, noOptionsText, emptyMessage, disabled, loading, required, clearable, disableCloseOnSelect, freeSolo, size, variant, fullWidth, className, inputClassName, getOptionLabel, getOptionValue, isOptionEqualToValue, filterOptions, renderOption, renderTags, limitTags, fields, }: AutocompleteCheckboxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export default AutocompleteCheckbox;
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
import { ReactNode, MouseEvent, FC } from 'react';
|
|
1
|
+
import { ReactNode, MouseEvent, KeyboardEvent, FC } from 'react';
|
|
2
2
|
export interface ChipProps {
|
|
3
3
|
label: string;
|
|
4
|
-
variant?: "filled" | "outlined";
|
|
4
|
+
variant?: "filled" | "outlined" | "soft";
|
|
5
5
|
color?: "default" | "primary" | "secondary" | "success" | "warning" | "error";
|
|
6
6
|
size?: "small" | "medium" | "large";
|
|
7
|
+
/** Chip corner style */
|
|
8
|
+
shape?: "pill" | "square";
|
|
7
9
|
deletable?: boolean;
|
|
8
|
-
onDelete?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
9
|
-
onClick?: (e: MouseEvent<HTMLDivElement>) => void;
|
|
10
|
+
onDelete?: (e: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>) => void;
|
|
11
|
+
onClick?: (e: MouseEvent<HTMLDivElement> | KeyboardEvent<HTMLDivElement>) => void;
|
|
10
12
|
icon?: ReactNode;
|
|
11
13
|
avatar?: ReactNode | string;
|
|
12
14
|
disabled?: boolean;
|
|
13
15
|
className?: string;
|
|
16
|
+
/** ARIA label for the chip */
|
|
17
|
+
"aria-label"?: string;
|
|
18
|
+
/** ARIA label for the delete button */
|
|
19
|
+
deleteAriaLabel?: string;
|
|
14
20
|
}
|
|
15
21
|
export declare const Chip: FC<ChipProps>;
|
|
16
22
|
export interface ChipsContainerProps {
|
|
@@ -4,9 +4,14 @@ interface ExpandableCardProps {
|
|
|
4
4
|
title: React.ReactNode;
|
|
5
5
|
content: React.ReactNode;
|
|
6
6
|
defaultOpen?: boolean;
|
|
7
|
+
open?: boolean;
|
|
8
|
+
onOpenChange?: (open: boolean) => void;
|
|
7
9
|
className?: string;
|
|
8
10
|
titleTypographyProps?: Partial<DoctTypographyProps>;
|
|
9
11
|
contentTypographyProps?: Partial<DoctTypographyProps>;
|
|
12
|
+
animationDuration?: number;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
clickableArea?: "full" | "header" | "button";
|
|
10
15
|
}
|
|
11
|
-
export declare function ExpandableCard({ title, content, defaultOpen, className, titleTypographyProps, contentTypographyProps, }: ExpandableCardProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function ExpandableCard({ title, content, defaultOpen, open: controlledOpen, onOpenChange, className, titleTypographyProps, contentTypographyProps, animationDuration, disabled, clickableArea, }: ExpandableCardProps): import("react/jsx-runtime").JSX.Element;
|
|
12
17
|
export {};
|
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
-
interface LabeledInputProps extends React.
|
|
2
|
+
interface LabeledInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
3
3
|
label?: string;
|
|
4
4
|
placeholder?: string;
|
|
5
5
|
helperText?: string;
|
|
6
6
|
error?: string;
|
|
7
7
|
required?: boolean;
|
|
8
|
-
type?: "text" | "email" | "password" | "number" | "tel";
|
|
8
|
+
type?: "text" | "email" | "password" | "number" | "tel" | "url" | "search";
|
|
9
9
|
leftIcon?: ReactNode;
|
|
10
10
|
rightIcon?: ReactNode;
|
|
11
11
|
className?: string;
|
|
12
12
|
inputClassName?: string;
|
|
13
13
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
14
|
+
onValueChange?: (value: string) => void;
|
|
14
15
|
showCharCount?: boolean;
|
|
15
16
|
maxLength?: number;
|
|
16
|
-
|
|
17
|
+
characterLimit?: number;
|
|
17
18
|
disabled?: boolean;
|
|
19
|
+
readOnly?: boolean;
|
|
20
|
+
/** @deprecated Use `readOnly` instead. Will be removed in v3.0 */
|
|
18
21
|
fridged?: boolean;
|
|
22
|
+
"aria-label"?: string;
|
|
23
|
+
"aria-describedby"?: string;
|
|
19
24
|
}
|
|
20
25
|
export declare const LabeledInput: FC<LabeledInputProps>;
|
|
21
26
|
export {};
|
|
@@ -7,6 +7,10 @@ interface OtpInputProps {
|
|
|
7
7
|
className?: string;
|
|
8
8
|
error?: string;
|
|
9
9
|
inputClassName?: string;
|
|
10
|
+
autoFocus?: boolean;
|
|
11
|
+
autoSubmit?: boolean;
|
|
12
|
+
secure?: boolean;
|
|
13
|
+
"aria-label"?: string;
|
|
10
14
|
}
|
|
11
15
|
export declare const OtpInput: React.FC<OtpInputProps>;
|
|
12
16
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface PasswordInputProps extends Omit<React.HTMLAttributes<HTMLInputElement>,
|
|
1
|
+
interface PasswordInputProps extends Omit<React.HTMLAttributes<HTMLInputElement>, "onChange"> {
|
|
2
2
|
label?: string;
|
|
3
3
|
placeholder?: string;
|
|
4
4
|
helperText?: string;
|
|
@@ -9,6 +9,10 @@ interface PasswordInputProps extends Omit<React.HTMLAttributes<HTMLInputElement>
|
|
|
9
9
|
onShowPasswordChange?: (show: boolean) => void;
|
|
10
10
|
value?: string;
|
|
11
11
|
onChange?: (value: string) => void;
|
|
12
|
+
onChangeEvent?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
13
|
+
onValueChange?: (value: string) => void;
|
|
14
|
+
autoComplete?: string;
|
|
15
|
+
"aria-label"?: string;
|
|
12
16
|
}
|
|
13
|
-
export declare function PasswordInput({ label, placeholder, helperText, error, required, className, showPassword, onShowPasswordChange, value, onChange, ...restProps }: PasswordInputProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function PasswordInput({ label, placeholder, helperText, error, required, className, showPassword, onShowPasswordChange, value, onChange, onChangeEvent, onValueChange, autoComplete, ...restProps }: PasswordInputProps): import("react/jsx-runtime").JSX.Element;
|
|
14
18
|
export {};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { DayPickerSingleProps } from 'react-day-picker';
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* - All custom props are explicit.
|
|
6
|
-
* - Extra DayPicker props can be passed via ...dayPickerProps.
|
|
7
|
-
* - All extra HTML div props can be passed via ...rest.
|
|
8
|
-
*/
|
|
9
|
-
export interface DatePickerFieldProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSelect"> {
|
|
3
|
+
export type DateFormat = "MM/DD/YYYY" | "DD/MM/YYYY" | "YYYY-MM-DD" | "DD-MM-YYYY";
|
|
4
|
+
export interface DatePickerFieldProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSelect" | "onChange"> {
|
|
10
5
|
label?: string;
|
|
11
6
|
placeholder?: string;
|
|
12
7
|
helperText?: string;
|
|
13
|
-
error?: string;
|
|
14
8
|
required?: boolean;
|
|
15
9
|
value?: Date;
|
|
16
10
|
onSelect?: (date: Date | undefined) => void;
|
|
11
|
+
onChange?: (date: Date | undefined) => void;
|
|
17
12
|
className?: string;
|
|
18
13
|
minDate?: Date;
|
|
19
14
|
maxDate?: Date;
|
|
20
15
|
disabled?: boolean;
|
|
21
16
|
readOnly?: boolean;
|
|
22
17
|
locale?: string;
|
|
18
|
+
dateFormat?: DateFormat;
|
|
19
|
+
inputClassName?: string;
|
|
20
|
+
error?: string;
|
|
23
21
|
showOutsideDays?: boolean;
|
|
24
|
-
|
|
22
|
+
clearable?: boolean;
|
|
25
23
|
month?: Date;
|
|
26
24
|
onMonthChange?: (month: Date) => void;
|
|
27
25
|
open?: boolean;
|
|
28
26
|
onOpenChange?: (open: boolean) => void;
|
|
27
|
+
dayPickerProps?: Partial<DayPickerSingleProps>;
|
|
28
|
+
manual?: boolean;
|
|
29
29
|
}
|
|
30
30
|
export declare const DatePickerField: React.FC<DatePickerFieldProps>;
|
|
@@ -2,21 +2,30 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
interface SelectOption {
|
|
3
3
|
value: string;
|
|
4
4
|
label: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
group?: string;
|
|
5
7
|
}
|
|
6
8
|
interface SelectFieldProps {
|
|
7
9
|
label?: string;
|
|
8
10
|
placeholder?: string;
|
|
9
11
|
options: SelectOption[];
|
|
10
12
|
value?: string;
|
|
13
|
+
onValueChange?: (value: string) => void;
|
|
14
|
+
onChange?: (value: string) => void;
|
|
11
15
|
leadingIcon?: ReactNode;
|
|
16
|
+
trailingIcon?: ReactNode;
|
|
17
|
+
startIcon?: ReactNode;
|
|
18
|
+
endIcon?: ReactNode;
|
|
12
19
|
helperText?: string;
|
|
13
20
|
error?: string;
|
|
14
21
|
required?: boolean;
|
|
15
|
-
onValueChange?: (value: string) => void;
|
|
16
|
-
className?: string;
|
|
17
|
-
variant?: "default" | "gray";
|
|
18
22
|
disabled?: boolean;
|
|
23
|
+
loading?: boolean;
|
|
19
24
|
clearable?: boolean;
|
|
25
|
+
className?: string;
|
|
26
|
+
variant?: "default" | "gray";
|
|
27
|
+
"aria-label"?: string;
|
|
28
|
+
"aria-describedby"?: string;
|
|
20
29
|
}
|
|
21
|
-
export declare function SelectField({ label, placeholder, options, value, leadingIcon, helperText, error, required,
|
|
30
|
+
export declare function SelectField({ label, placeholder, options, value, onValueChange, onChange, leadingIcon, trailingIcon, startIcon, endIcon, helperText, error, required, disabled, loading, clearable, className, variant, }: SelectFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
22
31
|
export {};
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
declare const
|
|
4
|
-
variant?: "default" | "destructive" | null | undefined;
|
|
5
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string
|
|
3
|
+
declare const alertVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "error" | "success" | "warning" | "destructive" | "info" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
|
|
7
|
+
/** Custom icon to display. Set to false to hide icon. */
|
|
8
|
+
icon?: React.ReactNode | false;
|
|
9
|
+
/** Callback when alert is dismissed */
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
/** Custom action element (e.g., button) */
|
|
12
|
+
action?: React.ReactNode;
|
|
13
|
+
/** Alias for variant (MUI compatibility) */
|
|
14
|
+
severity?: VariantProps<typeof alertVariants>["variant"];
|
|
15
|
+
}
|
|
16
|
+
declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
17
|
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
|
|
7
18
|
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
8
19
|
export { Alert, AlertTitle, AlertDescription };
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
|
|
3
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
4
|
+
declare const avatarVariants: (props?: ({
|
|
5
|
+
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface AvatarProps extends React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>, VariantProps<typeof avatarVariants> {
|
|
8
|
+
}
|
|
9
|
+
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
|
4
10
|
declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
|
5
11
|
declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
6
12
|
export { Avatar, AvatarImage, AvatarFallback };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const Breadcrumb: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
3
|
+
separator?: React.ReactNode;
|
|
4
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
5
|
+
declare const BreadcrumbList: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
6
|
+
declare const BreadcrumbItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
7
|
+
declare const BreadcrumbLink: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
10
|
+
declare const BreadcrumbPage: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
11
|
+
declare const BreadcrumbSeparator: {
|
|
12
|
+
({ children, className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
declare const BreadcrumbEllipsis: {
|
|
16
|
+
({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
declare const DoctButtonVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "outline" | "ghost" | "error" | "success" | "warning" | "blue" | "disabled" | "brandBlue" | "primary" | null | undefined;
|
|
4
|
+
variant?: "default" | "outline" | "ghost" | "error" | "success" | "warning" | "blue" | "disabled" | "brandBlue" | "primary" | "namya" | null | undefined;
|
|
5
5
|
size?: "small" | "large" | "medium" | "icon.large" | "icon.medium" | "icon.small" | null | undefined;
|
|
6
6
|
iconSize?: "small" | "large" | "medium" | null | undefined;
|
|
7
7
|
iconPosition?: "left" | "right" | null | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Checkbox as CheckboxPrimitive } from 'radix-ui';
|
|
2
1
|
import * as React from "react";
|
|
2
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
3
3
|
export interface CheckboxProps extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> {
|
|
4
4
|
color?: string;
|
|
5
5
|
}
|
|
@@ -5,8 +5,26 @@ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.Dia
|
|
|
5
5
|
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
6
6
|
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
7
|
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const sizeClasses: {
|
|
9
|
+
xs: string;
|
|
10
|
+
sm: string;
|
|
11
|
+
md: string;
|
|
12
|
+
lg: string;
|
|
13
|
+
xl: string;
|
|
14
|
+
"2xl": string;
|
|
15
|
+
full: string;
|
|
16
|
+
};
|
|
8
17
|
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
18
|
+
/** Close dialog when clicking outside */
|
|
9
19
|
closeOnOutsideClick?: boolean;
|
|
20
|
+
/** Initial focus element ref */
|
|
21
|
+
initialFocusRef?: React.RefObject<HTMLElement>;
|
|
22
|
+
/** Size preset */
|
|
23
|
+
size?: keyof typeof sizeClasses;
|
|
24
|
+
/** Show close button */
|
|
25
|
+
showCloseButton?: boolean;
|
|
26
|
+
/** Close on Escape key */
|
|
27
|
+
closeOnEscape?: boolean;
|
|
10
28
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
11
29
|
declare const DialogHeader: {
|
|
12
30
|
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
4
4
|
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
export interface InputProps extends React.ComponentProps<"input"> {
|
|
3
|
+
error?: boolean;
|
|
4
|
+
hasError?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const Input: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
3
7
|
export { Input };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Label as LabelPrimitive } from 'radix-ui';
|
|
2
1
|
import { VariantProps } from 'class-variance-authority';
|
|
3
2
|
import * as React from "react";
|
|
3
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
4
4
|
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import('class-variance-authority/types').ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
5
|
export { Label };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Popover as PopoverPrimitive } from 'radix-ui';
|
|
2
1
|
import * as React from "react";
|
|
2
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
3
|
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
4
|
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
5
|
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +1,22 @@
|
|
|
1
|
-
import { Progress as ProgressPrimitive } from 'radix-ui';
|
|
2
1
|
import * as React from "react";
|
|
3
|
-
|
|
2
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
3
|
+
type ColorVariant = "primary" | "secondary" | "success" | "error" | "warning" | "info";
|
|
4
|
+
type ProgressVariant = "determinate" | "indeterminate" | "buffer" | "query";
|
|
5
|
+
export interface ProgressProps extends Omit<React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>, "color"> {
|
|
6
|
+
/** Progress value between 0-100 */
|
|
7
|
+
value?: number;
|
|
8
|
+
/** Buffer value for buffer variant (0-100) */
|
|
9
|
+
valueBuffer?: number;
|
|
10
|
+
/** Progress variant */
|
|
11
|
+
variant?: ProgressVariant;
|
|
12
|
+
/** Color variant or custom color */
|
|
13
|
+
color?: ColorVariant | string;
|
|
14
|
+
/** Custom color (overrides color variant) */
|
|
15
|
+
customColor?: string;
|
|
16
|
+
/** Show percentage label */
|
|
17
|
+
showLabel?: boolean;
|
|
18
|
+
/** Custom label text or formatter function */
|
|
19
|
+
label?: string | ((value: number) => string);
|
|
20
|
+
}
|
|
21
|
+
declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
22
|
export { Progress };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RadioGroup as RadioGroupPrimitive } from 'radix-ui';
|
|
2
1
|
import * as React from "react";
|
|
2
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
3
3
|
declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
5
|
export { RadioGroup, RadioGroupItem };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Select as SelectPrimitive } from 'radix-ui';
|
|
2
1
|
import * as React from "react";
|
|
2
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
3
|
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
4
4
|
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -1,2 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type SkeletonVariant = "text" | "circular" | "rectangular" | "rounded";
|
|
3
|
+
type SkeletonAnimation = "pulse" | "wave" | "none";
|
|
4
|
+
export interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/** Shape variant */
|
|
6
|
+
variant?: SkeletonVariant;
|
|
7
|
+
/** Animation type */
|
|
8
|
+
animation?: SkeletonAnimation | false;
|
|
9
|
+
/** Width (CSS value or number for pixels) */
|
|
10
|
+
width?: number | string;
|
|
11
|
+
/** Height (CSS value or number for pixels) */
|
|
12
|
+
height?: number | string;
|
|
13
|
+
}
|
|
14
|
+
declare function Skeleton({ className, variant, animation, width, height, style, ...props }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
2
15
|
export { Skeleton };
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { Tabs as TabsPrimitive } from 'radix-ui';
|
|
2
1
|
import * as React from "react";
|
|
2
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3
3
|
declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
-
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> &
|
|
5
|
-
|
|
4
|
+
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
5
|
+
variant?: "default" | "custom";
|
|
6
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
8
|
+
variant?: "default" | "custom";
|
|
9
|
+
showSeparator?: boolean;
|
|
10
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
6
11
|
declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
12
|
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
@@ -3,7 +3,12 @@ export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextArea
|
|
|
3
3
|
label?: string;
|
|
4
4
|
helperText?: string;
|
|
5
5
|
errorText?: string;
|
|
6
|
+
error?: string;
|
|
6
7
|
required?: boolean;
|
|
8
|
+
resize?: "none" | "vertical" | "horizontal" | "both";
|
|
9
|
+
showCharCount?: boolean;
|
|
10
|
+
characterLimit?: number;
|
|
11
|
+
onValueChange?: (value: string) => void;
|
|
7
12
|
}
|
|
8
13
|
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
9
14
|
export { Textarea };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface TimelineItem {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
date?: string;
|
|
8
|
+
status?: "completed" | "pending" | "current";
|
|
9
|
+
description?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const lineClasses: (props?: ({
|
|
12
|
+
thickness?: "normal" | "thick" | "thin" | null | undefined;
|
|
13
|
+
inset?: "none" | "sm" | "md" | "lg" | null | undefined;
|
|
14
|
+
offset?: "sm" | "md" | "lg" | null | undefined;
|
|
15
|
+
color?: "primary" | "gray" | "teal" | null | undefined;
|
|
16
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
17
|
+
declare const dotClasses: (props?: ({
|
|
18
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
19
|
+
offset?: "sm" | "md" | "lg" | null | undefined;
|
|
20
|
+
color?: "primary" | "gray" | "teal" | null | undefined;
|
|
21
|
+
y?: "base" | null | undefined;
|
|
22
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
23
|
+
declare const itemsGapClasses: (props?: ({
|
|
24
|
+
density?: "compact" | "comfortable" | "card" | null | undefined;
|
|
25
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
26
|
+
declare const indentClasses: (props?: ({
|
|
27
|
+
indent?: "sm" | "md" | "lg" | null | undefined;
|
|
28
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
29
|
+
export interface TimelineProps extends VariantProps<typeof lineClasses>, VariantProps<typeof dotClasses>, VariantProps<typeof itemsGapClasses>, VariantProps<typeof indentClasses> {
|
|
30
|
+
items: TimelineItem[];
|
|
31
|
+
title?: string;
|
|
32
|
+
className?: string;
|
|
33
|
+
showStatus?: boolean;
|
|
34
|
+
variant?: "default" | "minimal" | "card";
|
|
35
|
+
/** Convenience alias: sets both line and dot color. */
|
|
36
|
+
color?: "teal" | "gray" | "primary";
|
|
37
|
+
/** Content indent relative to the dot/line. */
|
|
38
|
+
indent?: "sm" | "md" | "lg";
|
|
39
|
+
}
|
|
40
|
+
declare const Timeline: React.ForwardRefExoticComponent<TimelineProps & React.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
export { Timeline };
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { Tooltip as TooltipPrimitive } from 'radix-ui';
|
|
2
1
|
import * as React from "react";
|
|
2
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
3
|
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
4
4
|
declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
5
5
|
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
-
|
|
6
|
+
export interface TooltipContentProps extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> {
|
|
7
|
+
/** Whether to show the arrow pointer */
|
|
8
|
+
showArrow?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
11
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
export interface DoctTypographyProps {
|
|
2
|
+
export interface DoctTypographyProps extends React.HTMLAttributes<HTMLElement> {
|
|
3
3
|
variant: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "h7" | "h8" | "title1" | "title2" | "title3" | "title4" | "body1" | "body2" | "body3" | "body4" | "textLabel1" | "textLabel2" | "textLabel3" | "textLabel4";
|
|
4
4
|
weight?: "regular" | "medium" | "semiBold" | "bold" | "extraBold" | "light";
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
color?: string;
|
|
7
7
|
align?: "inherit" | "left" | "center" | "right" | "justify";
|
|
8
8
|
className?: string;
|
|
9
|
+
/** HTML element to render as */
|
|
10
|
+
as?: React.ElementType;
|
|
9
11
|
}
|
|
10
12
|
declare const DoctTypography: React.FC<DoctTypographyProps>;
|
|
11
13
|
export { DoctTypography };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export interface UseAutocompleteCheckboxOptions<T> {
|
|
2
|
+
options: T[];
|
|
3
|
+
value?: T[];
|
|
4
|
+
onChange?: (event: React.SyntheticEvent | null, value: T[]) => void;
|
|
5
|
+
onInputChange?: (event: React.ChangeEvent<HTMLInputElement>, value: string) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
disableCloseOnSelect?: boolean;
|
|
8
|
+
freeSolo?: T extends string ? boolean : never;
|
|
9
|
+
getOptionLabel?: (option: T) => string;
|
|
10
|
+
getOptionValue?: (option: T) => string | T;
|
|
11
|
+
isOptionEqualToValue?: (option: T, value: T) => boolean;
|
|
12
|
+
filterOptions?: (options: T[], state: {
|
|
13
|
+
inputValue: string;
|
|
14
|
+
}) => T[];
|
|
15
|
+
fields?: {
|
|
16
|
+
value: string | number;
|
|
17
|
+
text: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface UseAutocompleteCheckboxReturn<T> {
|
|
21
|
+
open: boolean;
|
|
22
|
+
inputValue: string;
|
|
23
|
+
highlightedIndex: number;
|
|
24
|
+
filteredOptions: T[];
|
|
25
|
+
selectedOptions: T[];
|
|
26
|
+
dropdownPosition: {
|
|
27
|
+
top: number;
|
|
28
|
+
left: number;
|
|
29
|
+
width: number;
|
|
30
|
+
};
|
|
31
|
+
inputRef: React.RefObject<HTMLInputElement | null>;
|
|
32
|
+
listRef: React.RefObject<HTMLDivElement | null>;
|
|
33
|
+
containerRef: React.RefObject<HTMLDivElement | null>;
|
|
34
|
+
setOpen: (open: boolean) => void;
|
|
35
|
+
setInputValue: (value: string) => void;
|
|
36
|
+
setHighlightedIndex: (index: number) => void;
|
|
37
|
+
handleInputChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
38
|
+
handleOptionSelect: (option: T) => void;
|
|
39
|
+
handleTagRemove: (tag: T) => void;
|
|
40
|
+
handleClear: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
41
|
+
handleClearAll: () => void;
|
|
42
|
+
handleKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
43
|
+
handleToggle: () => void;
|
|
44
|
+
handleFocus: () => void;
|
|
45
|
+
updateDropdownPosition: () => void;
|
|
46
|
+
isOptionSelected: (option: T) => boolean;
|
|
47
|
+
getOptionLabelSafe: (option: T) => string;
|
|
48
|
+
memoizedIsOptionEqualToValue: (option: T, value: T) => boolean;
|
|
49
|
+
}
|
|
50
|
+
export type OptionType = string | {
|
|
51
|
+
label: string;
|
|
52
|
+
value: string;
|
|
53
|
+
} | Record<string, unknown>;
|
|
54
|
+
export declare function useAutocompleteCheckbox<T extends OptionType>({ options, value, onChange, onInputChange, disabled, disableCloseOnSelect, freeSolo, getOptionLabel, getOptionValue, isOptionEqualToValue, filterOptions, fields, }: UseAutocompleteCheckboxOptions<T>): UseAutocompleteCheckboxReturn<T>;
|
|
55
|
+
export default useAutocompleteCheckbox;
|