@bricks-toolkit/toolkit 0.1.12 → 0.1.14
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/Button.types-BsQYqZml.d.ts +27 -0
- package/dist/Button.types-D-srlWFf.d.mts +27 -0
- package/dist/TextInput.types-DRI8HQza.d.mts +32 -0
- package/dist/TextInput.types-DRI8HQza.d.ts +32 -0
- package/dist/Tooltip.types-PbUasE3C.d.mts +36 -0
- package/dist/Tooltip.types-PbUasE3C.d.ts +36 -0
- package/dist/avatar/index.d.mts +29 -0
- package/dist/avatar/index.d.ts +29 -0
- package/dist/badge/index.d.mts +57 -0
- package/dist/badge/index.d.ts +57 -0
- package/dist/breadcrumbs/index.d.mts +32 -0
- package/dist/breadcrumbs/index.d.ts +32 -0
- package/dist/button/index.d.mts +8 -0
- package/dist/button/index.d.ts +8 -0
- package/dist/card/index.d.mts +42 -0
- package/dist/card/index.d.ts +42 -0
- package/dist/checkbox/index.d.mts +36 -0
- package/dist/checkbox/index.d.ts +36 -0
- package/dist/{chunk-B2FU2E2X.cjs → chunk-AJM3NV5N.cjs} +8 -0
- package/dist/{chunk-TBMIMUU4.mjs → chunk-G6CGG4QD.mjs} +8 -0
- package/dist/combo-box/index.d.mts +62 -0
- package/dist/combo-box/index.d.ts +62 -0
- package/dist/date-picker/index.d.mts +32 -0
- package/dist/date-picker/index.d.ts +32 -0
- package/dist/dialog/index.d.mts +61 -0
- package/dist/dialog/index.d.ts +61 -0
- package/dist/dropdown-menu/index.d.mts +34 -0
- package/dist/dropdown-menu/index.d.ts +34 -0
- package/dist/email/index.d.mts +38 -0
- package/dist/email/index.d.ts +38 -0
- package/dist/file-upload/index.d.mts +27 -0
- package/dist/file-upload/index.d.ts +27 -0
- package/dist/header/index.d.mts +28 -0
- package/dist/header/index.d.ts +28 -0
- package/dist/icon-button/index.d.mts +16 -0
- package/dist/icon-button/index.d.ts +16 -0
- package/dist/image/index.d.mts +48 -0
- package/dist/image/index.d.ts +48 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.mts +141 -0
- package/dist/index.d.ts +141 -0
- package/dist/index.mjs +1 -1
- package/dist/link/index.d.mts +25 -0
- package/dist/link/index.d.ts +25 -0
- package/dist/loader/index.d.mts +21 -0
- package/dist/loader/index.d.ts +21 -0
- package/dist/modal/index.d.mts +116 -0
- package/dist/modal/index.d.ts +116 -0
- package/dist/multi-select/index.d.mts +59 -0
- package/dist/multi-select/index.d.ts +59 -0
- package/dist/otp-input/index.d.mts +57 -0
- package/dist/otp-input/index.d.ts +57 -0
- package/dist/password-input/index.d.mts +32 -0
- package/dist/password-input/index.d.ts +32 -0
- package/dist/phone/index.cjs +2 -2
- package/dist/phone/index.d.mts +42 -0
- package/dist/phone/index.d.ts +42 -0
- package/dist/phone/index.mjs +1 -1
- package/dist/radio-button/index.d.mts +56 -0
- package/dist/radio-button/index.d.ts +56 -0
- package/dist/search-input/index.d.mts +22 -0
- package/dist/search-input/index.d.ts +22 -0
- package/dist/select/index.d.mts +36 -0
- package/dist/select/index.d.ts +36 -0
- package/dist/sidebar/index.d.mts +96 -0
- package/dist/sidebar/index.d.ts +96 -0
- package/dist/skeleton/index.d.mts +76 -0
- package/dist/skeleton/index.d.ts +76 -0
- package/dist/styles.d.mts +2 -0
- package/dist/styles.d.ts +2 -0
- package/dist/table/index.d.mts +92 -0
- package/dist/table/index.d.ts +92 -0
- package/dist/tabs/index.d.mts +26 -0
- package/dist/tabs/index.d.ts +26 -0
- package/dist/text-input/index.d.mts +7 -0
- package/dist/text-input/index.d.ts +7 -0
- package/dist/theme-provider/index.d.mts +122 -0
- package/dist/theme-provider/index.d.ts +122 -0
- package/dist/theme.css +62 -0
- package/dist/time-picker/index.d.mts +32 -0
- package/dist/time-picker/index.d.ts +32 -0
- package/dist/toaster/index.d.mts +28 -0
- package/dist/toaster/index.d.ts +28 -0
- package/dist/tooltip/index.d.mts +7 -0
- package/dist/tooltip/index.d.ts +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type ComboBoxSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
+
type ComboBoxState = 'default' | 'error' | 'success' | 'warning';
|
|
5
|
+
interface ComboBoxOption {
|
|
6
|
+
/** The underlying value submitted/returned. */
|
|
7
|
+
value: string;
|
|
8
|
+
/** The human-readable label shown in the dropdown and input. */
|
|
9
|
+
label: string;
|
|
10
|
+
/** When true the option is shown but cannot be selected. */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface ComboBoxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'value' | 'onChange' | 'multiple'> {
|
|
14
|
+
/** List of selectable options. */
|
|
15
|
+
options: ComboBoxOption[];
|
|
16
|
+
/** Currently selected value(s). Pass string for single, string[] for multi. */
|
|
17
|
+
value?: string | string[];
|
|
18
|
+
/** Fired when selection changes. */
|
|
19
|
+
onChange?: (value: string | string[]) => void;
|
|
20
|
+
/** Allow selecting multiple options. Defaults to false. */
|
|
21
|
+
multiple?: boolean;
|
|
22
|
+
/** Allow the user to type and filter options. Defaults to true. */
|
|
23
|
+
searchable?: boolean;
|
|
24
|
+
/** Show a clear (×) button when a value is selected. Defaults to false. */
|
|
25
|
+
clearable?: boolean;
|
|
26
|
+
/** Field label rendered above the input. */
|
|
27
|
+
label?: string;
|
|
28
|
+
/** Makes the label show a required asterisk. */
|
|
29
|
+
required?: boolean;
|
|
30
|
+
/** Helper text shown below the field. */
|
|
31
|
+
helperText?: string;
|
|
32
|
+
/** Message shown when state = 'error'. */
|
|
33
|
+
errorMessage?: string;
|
|
34
|
+
/** Message shown when state = 'success'. */
|
|
35
|
+
successMessage?: string;
|
|
36
|
+
/** Message shown when state = 'warning'. */
|
|
37
|
+
warningMessage?: string;
|
|
38
|
+
/** Visual / validation state. Defaults to 'default'. */
|
|
39
|
+
state?: ComboBoxState;
|
|
40
|
+
/** Input size. Defaults to 'md'. */
|
|
41
|
+
size?: ComboBoxSize;
|
|
42
|
+
/** Stretch to fill its container. Defaults to true. */
|
|
43
|
+
fullWidth?: boolean;
|
|
44
|
+
/** Placeholder shown in the input when nothing is selected. */
|
|
45
|
+
placeholder?: string;
|
|
46
|
+
/** Rendered when no options match the current search query. */
|
|
47
|
+
noOptionsMessage?: ReactNode;
|
|
48
|
+
/** Additional class for the outer wrapper div. */
|
|
49
|
+
wrapperClassName?: string;
|
|
50
|
+
/** Additional class for the trigger / input element. */
|
|
51
|
+
inputClassName?: string;
|
|
52
|
+
/** Additional class for the dropdown list. */
|
|
53
|
+
listClassName?: string;
|
|
54
|
+
/** Additional class for the label element. */
|
|
55
|
+
labelClassName?: string;
|
|
56
|
+
/** Additional class for helper / state message text. */
|
|
57
|
+
helperClassName?: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
declare const ComboBox: React.ForwardRefExoticComponent<ComboBoxProps & React.RefAttributes<HTMLInputElement>>;
|
|
61
|
+
|
|
62
|
+
export { ComboBox, type ComboBoxOption, type ComboBoxProps, type ComboBoxSize, type ComboBoxState };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type ComboBoxSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
+
type ComboBoxState = 'default' | 'error' | 'success' | 'warning';
|
|
5
|
+
interface ComboBoxOption {
|
|
6
|
+
/** The underlying value submitted/returned. */
|
|
7
|
+
value: string;
|
|
8
|
+
/** The human-readable label shown in the dropdown and input. */
|
|
9
|
+
label: string;
|
|
10
|
+
/** When true the option is shown but cannot be selected. */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface ComboBoxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'value' | 'onChange' | 'multiple'> {
|
|
14
|
+
/** List of selectable options. */
|
|
15
|
+
options: ComboBoxOption[];
|
|
16
|
+
/** Currently selected value(s). Pass string for single, string[] for multi. */
|
|
17
|
+
value?: string | string[];
|
|
18
|
+
/** Fired when selection changes. */
|
|
19
|
+
onChange?: (value: string | string[]) => void;
|
|
20
|
+
/** Allow selecting multiple options. Defaults to false. */
|
|
21
|
+
multiple?: boolean;
|
|
22
|
+
/** Allow the user to type and filter options. Defaults to true. */
|
|
23
|
+
searchable?: boolean;
|
|
24
|
+
/** Show a clear (×) button when a value is selected. Defaults to false. */
|
|
25
|
+
clearable?: boolean;
|
|
26
|
+
/** Field label rendered above the input. */
|
|
27
|
+
label?: string;
|
|
28
|
+
/** Makes the label show a required asterisk. */
|
|
29
|
+
required?: boolean;
|
|
30
|
+
/** Helper text shown below the field. */
|
|
31
|
+
helperText?: string;
|
|
32
|
+
/** Message shown when state = 'error'. */
|
|
33
|
+
errorMessage?: string;
|
|
34
|
+
/** Message shown when state = 'success'. */
|
|
35
|
+
successMessage?: string;
|
|
36
|
+
/** Message shown when state = 'warning'. */
|
|
37
|
+
warningMessage?: string;
|
|
38
|
+
/** Visual / validation state. Defaults to 'default'. */
|
|
39
|
+
state?: ComboBoxState;
|
|
40
|
+
/** Input size. Defaults to 'md'. */
|
|
41
|
+
size?: ComboBoxSize;
|
|
42
|
+
/** Stretch to fill its container. Defaults to true. */
|
|
43
|
+
fullWidth?: boolean;
|
|
44
|
+
/** Placeholder shown in the input when nothing is selected. */
|
|
45
|
+
placeholder?: string;
|
|
46
|
+
/** Rendered when no options match the current search query. */
|
|
47
|
+
noOptionsMessage?: ReactNode;
|
|
48
|
+
/** Additional class for the outer wrapper div. */
|
|
49
|
+
wrapperClassName?: string;
|
|
50
|
+
/** Additional class for the trigger / input element. */
|
|
51
|
+
inputClassName?: string;
|
|
52
|
+
/** Additional class for the dropdown list. */
|
|
53
|
+
listClassName?: string;
|
|
54
|
+
/** Additional class for the label element. */
|
|
55
|
+
labelClassName?: string;
|
|
56
|
+
/** Additional class for helper / state message text. */
|
|
57
|
+
helperClassName?: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
declare const ComboBox: React.ForwardRefExoticComponent<ComboBoxProps & React.RefAttributes<HTMLInputElement>>;
|
|
61
|
+
|
|
62
|
+
export { ComboBox, type ComboBoxOption, type ComboBoxProps, type ComboBoxSize, type ComboBoxState };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type DatePickerVariant = 'default' | 'filled' | 'flushed' | 'unstyled';
|
|
4
|
+
type DatePickerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
type DatePickerState = 'default' | 'error' | 'success' | 'warning';
|
|
6
|
+
interface DatePickerProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix' | 'type'> {
|
|
7
|
+
label?: string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
helperText?: string;
|
|
10
|
+
errorMessage?: string;
|
|
11
|
+
successMessage?: string;
|
|
12
|
+
warningMessage?: string;
|
|
13
|
+
variant?: DatePickerVariant;
|
|
14
|
+
size?: DatePickerSize;
|
|
15
|
+
state?: DatePickerState;
|
|
16
|
+
fullWidth?: boolean;
|
|
17
|
+
leftElement?: ReactNode;
|
|
18
|
+
rightElement?: ReactNode;
|
|
19
|
+
prefix?: ReactNode;
|
|
20
|
+
suffix?: ReactNode;
|
|
21
|
+
wrapperClassName?: string;
|
|
22
|
+
inputGroupClassName?: string;
|
|
23
|
+
inputClassName?: string;
|
|
24
|
+
labelClassName?: string;
|
|
25
|
+
helperClassName?: string;
|
|
26
|
+
clearable?: boolean;
|
|
27
|
+
isLoading?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLInputElement>>;
|
|
31
|
+
|
|
32
|
+
export { DatePicker, type DatePickerProps, type DatePickerSize, type DatePickerState, type DatePickerVariant };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type DatePickerVariant = 'default' | 'filled' | 'flushed' | 'unstyled';
|
|
4
|
+
type DatePickerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
type DatePickerState = 'default' | 'error' | 'success' | 'warning';
|
|
6
|
+
interface DatePickerProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix' | 'type'> {
|
|
7
|
+
label?: string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
helperText?: string;
|
|
10
|
+
errorMessage?: string;
|
|
11
|
+
successMessage?: string;
|
|
12
|
+
warningMessage?: string;
|
|
13
|
+
variant?: DatePickerVariant;
|
|
14
|
+
size?: DatePickerSize;
|
|
15
|
+
state?: DatePickerState;
|
|
16
|
+
fullWidth?: boolean;
|
|
17
|
+
leftElement?: ReactNode;
|
|
18
|
+
rightElement?: ReactNode;
|
|
19
|
+
prefix?: ReactNode;
|
|
20
|
+
suffix?: ReactNode;
|
|
21
|
+
wrapperClassName?: string;
|
|
22
|
+
inputGroupClassName?: string;
|
|
23
|
+
inputClassName?: string;
|
|
24
|
+
labelClassName?: string;
|
|
25
|
+
helperClassName?: string;
|
|
26
|
+
clearable?: boolean;
|
|
27
|
+
isLoading?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLInputElement>>;
|
|
31
|
+
|
|
32
|
+
export { DatePicker, type DatePickerProps, type DatePickerSize, type DatePickerState, type DatePickerVariant };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type DialogSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | 'full';
|
|
4
|
+
interface DialogProps {
|
|
5
|
+
/** If true, the dialog will be open. */
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
/** Callback invoked when the dialog should close. */
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
/** The content of the dialog. Usually includes DialogHeader, DialogBody, and DialogFooter. */
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
/** The size of the dialog. Defaults to 'md'. */
|
|
12
|
+
size?: DialogSize;
|
|
13
|
+
/** If true, the dialog will be centered on the screen. Defaults to false. */
|
|
14
|
+
isCentered?: boolean;
|
|
15
|
+
/** If true, the dialog will close when the overlay is clicked. Defaults to true. */
|
|
16
|
+
closeOnOverlayClick?: boolean;
|
|
17
|
+
/** If true, the dialog will close when the ESC key is pressed. Defaults to true. */
|
|
18
|
+
closeOnEsc?: boolean;
|
|
19
|
+
/** If true, focus will be trapped inside the dialog. Defaults to true. */
|
|
20
|
+
trapFocus?: boolean;
|
|
21
|
+
/** If true, the body scroll will be locked when the dialog is open. Defaults to true. */
|
|
22
|
+
lockScroll?: boolean;
|
|
23
|
+
/** Additional class names for the dialog content. */
|
|
24
|
+
contentClassName?: string;
|
|
25
|
+
/** Additional class names for the overlay. */
|
|
26
|
+
overlayClassName?: string;
|
|
27
|
+
/** If true, the backdrop will be visible. Defaults to true. */
|
|
28
|
+
showBackdrop?: boolean;
|
|
29
|
+
/** If true, the dialog will be treated as a modal (traps focus, locked scroll). Defaults to true. */
|
|
30
|
+
isModal?: boolean;
|
|
31
|
+
/** ARIA label for the dialog. */
|
|
32
|
+
ariaLabel?: string;
|
|
33
|
+
/** ID of the element that labels the dialog. */
|
|
34
|
+
ariaLabelledby?: string;
|
|
35
|
+
/** ID of the element that describes the dialog. */
|
|
36
|
+
ariaDescribedby?: string;
|
|
37
|
+
}
|
|
38
|
+
interface DialogHeaderProps {
|
|
39
|
+
children: ReactNode;
|
|
40
|
+
className?: string;
|
|
41
|
+
}
|
|
42
|
+
interface DialogBodyProps {
|
|
43
|
+
children: ReactNode;
|
|
44
|
+
className?: string;
|
|
45
|
+
}
|
|
46
|
+
interface DialogFooterProps {
|
|
47
|
+
children: ReactNode;
|
|
48
|
+
className?: string;
|
|
49
|
+
}
|
|
50
|
+
interface DialogCloseButtonProps {
|
|
51
|
+
onClick?: () => void;
|
|
52
|
+
className?: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare function Dialog({ isOpen, onClose, children, size, isCentered, closeOnOverlayClick, closeOnEsc, trapFocus, lockScroll, contentClassName, overlayClassName, showBackdrop, isModal, ariaLabel, ariaLabelledby, ariaDescribedby, }: DialogProps): React.ReactPortal | null;
|
|
56
|
+
declare function DialogHeader({ children, className }: DialogHeaderProps): React.JSX.Element;
|
|
57
|
+
declare function DialogBody({ children, className }: DialogBodyProps): React.JSX.Element;
|
|
58
|
+
declare function DialogFooter({ children, className }: DialogFooterProps): React.JSX.Element;
|
|
59
|
+
declare function DialogCloseButton({ onClick, className, }: DialogCloseButtonProps): React.JSX.Element;
|
|
60
|
+
|
|
61
|
+
export { Dialog, DialogBody, type DialogBodyProps, DialogCloseButton, type DialogCloseButtonProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, type DialogProps, type DialogSize };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type DialogSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | 'full';
|
|
4
|
+
interface DialogProps {
|
|
5
|
+
/** If true, the dialog will be open. */
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
/** Callback invoked when the dialog should close. */
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
/** The content of the dialog. Usually includes DialogHeader, DialogBody, and DialogFooter. */
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
/** The size of the dialog. Defaults to 'md'. */
|
|
12
|
+
size?: DialogSize;
|
|
13
|
+
/** If true, the dialog will be centered on the screen. Defaults to false. */
|
|
14
|
+
isCentered?: boolean;
|
|
15
|
+
/** If true, the dialog will close when the overlay is clicked. Defaults to true. */
|
|
16
|
+
closeOnOverlayClick?: boolean;
|
|
17
|
+
/** If true, the dialog will close when the ESC key is pressed. Defaults to true. */
|
|
18
|
+
closeOnEsc?: boolean;
|
|
19
|
+
/** If true, focus will be trapped inside the dialog. Defaults to true. */
|
|
20
|
+
trapFocus?: boolean;
|
|
21
|
+
/** If true, the body scroll will be locked when the dialog is open. Defaults to true. */
|
|
22
|
+
lockScroll?: boolean;
|
|
23
|
+
/** Additional class names for the dialog content. */
|
|
24
|
+
contentClassName?: string;
|
|
25
|
+
/** Additional class names for the overlay. */
|
|
26
|
+
overlayClassName?: string;
|
|
27
|
+
/** If true, the backdrop will be visible. Defaults to true. */
|
|
28
|
+
showBackdrop?: boolean;
|
|
29
|
+
/** If true, the dialog will be treated as a modal (traps focus, locked scroll). Defaults to true. */
|
|
30
|
+
isModal?: boolean;
|
|
31
|
+
/** ARIA label for the dialog. */
|
|
32
|
+
ariaLabel?: string;
|
|
33
|
+
/** ID of the element that labels the dialog. */
|
|
34
|
+
ariaLabelledby?: string;
|
|
35
|
+
/** ID of the element that describes the dialog. */
|
|
36
|
+
ariaDescribedby?: string;
|
|
37
|
+
}
|
|
38
|
+
interface DialogHeaderProps {
|
|
39
|
+
children: ReactNode;
|
|
40
|
+
className?: string;
|
|
41
|
+
}
|
|
42
|
+
interface DialogBodyProps {
|
|
43
|
+
children: ReactNode;
|
|
44
|
+
className?: string;
|
|
45
|
+
}
|
|
46
|
+
interface DialogFooterProps {
|
|
47
|
+
children: ReactNode;
|
|
48
|
+
className?: string;
|
|
49
|
+
}
|
|
50
|
+
interface DialogCloseButtonProps {
|
|
51
|
+
onClick?: () => void;
|
|
52
|
+
className?: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare function Dialog({ isOpen, onClose, children, size, isCentered, closeOnOverlayClick, closeOnEsc, trapFocus, lockScroll, contentClassName, overlayClassName, showBackdrop, isModal, ariaLabel, ariaLabelledby, ariaDescribedby, }: DialogProps): React.ReactPortal | null;
|
|
56
|
+
declare function DialogHeader({ children, className }: DialogHeaderProps): React.JSX.Element;
|
|
57
|
+
declare function DialogBody({ children, className }: DialogBodyProps): React.JSX.Element;
|
|
58
|
+
declare function DialogFooter({ children, className }: DialogFooterProps): React.JSX.Element;
|
|
59
|
+
declare function DialogCloseButton({ onClick, className, }: DialogCloseButtonProps): React.JSX.Element;
|
|
60
|
+
|
|
61
|
+
export { Dialog, DialogBody, type DialogBodyProps, DialogCloseButton, type DialogCloseButtonProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, type DialogProps, type DialogSize };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode, HTMLAttributes, ButtonHTMLAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
type DropdownMenuSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
type DropdownMenuVariant = 'default' | 'subtle' | 'ghost';
|
|
6
|
+
interface DropdownMenuProps {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
open?: boolean;
|
|
9
|
+
onOpenChange?: (open: boolean) => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
interface DropdownMenuTriggerProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
13
|
+
size?: DropdownMenuSize;
|
|
14
|
+
variant?: DropdownMenuVariant;
|
|
15
|
+
}
|
|
16
|
+
interface DropdownMenuContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
17
|
+
align?: 'left' | 'right' | 'center';
|
|
18
|
+
width?: string | number;
|
|
19
|
+
}
|
|
20
|
+
interface DropdownMenuItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
destructive?: boolean;
|
|
23
|
+
icon?: ReactNode;
|
|
24
|
+
shortcut?: string;
|
|
25
|
+
}
|
|
26
|
+
type DropdownMenuSeparatorProps = HTMLAttributes<HTMLDivElement>;
|
|
27
|
+
|
|
28
|
+
declare const DropdownMenu: React.FC<DropdownMenuProps>;
|
|
29
|
+
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
30
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
declare const DropdownMenuItem: React.ForwardRefExoticComponent<DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
32
|
+
declare const DropdownMenuSeparator: React.FC<DropdownMenuSeparatorProps>;
|
|
33
|
+
|
|
34
|
+
export { DropdownMenu, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, type DropdownMenuSize, DropdownMenuTrigger, type DropdownMenuTriggerProps, type DropdownMenuVariant };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode, HTMLAttributes, ButtonHTMLAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
type DropdownMenuSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
type DropdownMenuVariant = 'default' | 'subtle' | 'ghost';
|
|
6
|
+
interface DropdownMenuProps {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
open?: boolean;
|
|
9
|
+
onOpenChange?: (open: boolean) => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
interface DropdownMenuTriggerProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
13
|
+
size?: DropdownMenuSize;
|
|
14
|
+
variant?: DropdownMenuVariant;
|
|
15
|
+
}
|
|
16
|
+
interface DropdownMenuContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
17
|
+
align?: 'left' | 'right' | 'center';
|
|
18
|
+
width?: string | number;
|
|
19
|
+
}
|
|
20
|
+
interface DropdownMenuItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
destructive?: boolean;
|
|
23
|
+
icon?: ReactNode;
|
|
24
|
+
shortcut?: string;
|
|
25
|
+
}
|
|
26
|
+
type DropdownMenuSeparatorProps = HTMLAttributes<HTMLDivElement>;
|
|
27
|
+
|
|
28
|
+
declare const DropdownMenu: React.FC<DropdownMenuProps>;
|
|
29
|
+
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
30
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
declare const DropdownMenuItem: React.ForwardRefExoticComponent<DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
32
|
+
declare const DropdownMenuSeparator: React.FC<DropdownMenuSeparatorProps>;
|
|
33
|
+
|
|
34
|
+
export { DropdownMenu, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, type DropdownMenuSize, DropdownMenuTrigger, type DropdownMenuTriggerProps, type DropdownMenuVariant };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type EmailVariant = 'default' | 'filled' | 'flushed' | 'unstyled';
|
|
4
|
+
type EmailSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
type EmailState = 'default' | 'error' | 'success' | 'warning';
|
|
6
|
+
interface EmailProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix' | 'type'> {
|
|
7
|
+
label?: string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
helperText?: string;
|
|
10
|
+
errorMessage?: string;
|
|
11
|
+
successMessage?: string;
|
|
12
|
+
warningMessage?: string;
|
|
13
|
+
variant?: EmailVariant;
|
|
14
|
+
size?: EmailSize;
|
|
15
|
+
state?: EmailState;
|
|
16
|
+
fullWidth?: boolean;
|
|
17
|
+
leftElement?: ReactNode;
|
|
18
|
+
rightElement?: ReactNode;
|
|
19
|
+
prefix?: ReactNode;
|
|
20
|
+
suffix?: ReactNode;
|
|
21
|
+
wrapperClassName?: string;
|
|
22
|
+
inputGroupClassName?: string;
|
|
23
|
+
inputClassName?: string;
|
|
24
|
+
labelClassName?: string;
|
|
25
|
+
helperClassName?: string;
|
|
26
|
+
clearable?: boolean;
|
|
27
|
+
isLoading?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* If true, allows the user to enter multiple email addresses separated by commas.
|
|
30
|
+
* Useful for "To" fields in email composers.
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
multiple?: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
declare const Email: React.ForwardRefExoticComponent<EmailProps & React.RefAttributes<HTMLInputElement>>;
|
|
37
|
+
|
|
38
|
+
export { Email, type EmailProps, type EmailSize, type EmailState, type EmailVariant };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type EmailVariant = 'default' | 'filled' | 'flushed' | 'unstyled';
|
|
4
|
+
type EmailSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
type EmailState = 'default' | 'error' | 'success' | 'warning';
|
|
6
|
+
interface EmailProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix' | 'type'> {
|
|
7
|
+
label?: string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
helperText?: string;
|
|
10
|
+
errorMessage?: string;
|
|
11
|
+
successMessage?: string;
|
|
12
|
+
warningMessage?: string;
|
|
13
|
+
variant?: EmailVariant;
|
|
14
|
+
size?: EmailSize;
|
|
15
|
+
state?: EmailState;
|
|
16
|
+
fullWidth?: boolean;
|
|
17
|
+
leftElement?: ReactNode;
|
|
18
|
+
rightElement?: ReactNode;
|
|
19
|
+
prefix?: ReactNode;
|
|
20
|
+
suffix?: ReactNode;
|
|
21
|
+
wrapperClassName?: string;
|
|
22
|
+
inputGroupClassName?: string;
|
|
23
|
+
inputClassName?: string;
|
|
24
|
+
labelClassName?: string;
|
|
25
|
+
helperClassName?: string;
|
|
26
|
+
clearable?: boolean;
|
|
27
|
+
isLoading?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* If true, allows the user to enter multiple email addresses separated by commas.
|
|
30
|
+
* Useful for "To" fields in email composers.
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
multiple?: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
declare const Email: React.ForwardRefExoticComponent<EmailProps & React.RefAttributes<HTMLInputElement>>;
|
|
37
|
+
|
|
38
|
+
export { Email, type EmailProps, type EmailSize, type EmailState, type EmailVariant };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type FileUploadSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
type FileUploadState = 'default' | 'error' | 'success' | 'warning';
|
|
5
|
+
interface FileUploadProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'value' | 'onChange'> {
|
|
6
|
+
label?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
helperText?: string;
|
|
9
|
+
errorMessage?: string;
|
|
10
|
+
successMessage?: string;
|
|
11
|
+
warningMessage?: string;
|
|
12
|
+
size?: FileUploadSize;
|
|
13
|
+
state?: FileUploadState;
|
|
14
|
+
fullWidth?: boolean;
|
|
15
|
+
wrapperClassName?: string;
|
|
16
|
+
labelClassName?: string;
|
|
17
|
+
helperClassName?: string;
|
|
18
|
+
dropzoneClassName?: string;
|
|
19
|
+
icon?: ReactNode;
|
|
20
|
+
maxSize?: number;
|
|
21
|
+
maxFiles?: number;
|
|
22
|
+
onFilesSelected?: (files: File[]) => void;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare const FileUpload: React.ForwardRefExoticComponent<FileUploadProps & React.RefAttributes<HTMLInputElement>>;
|
|
26
|
+
|
|
27
|
+
export { FileUpload, type FileUploadProps, type FileUploadSize, type FileUploadState };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type FileUploadSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
type FileUploadState = 'default' | 'error' | 'success' | 'warning';
|
|
5
|
+
interface FileUploadProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'value' | 'onChange'> {
|
|
6
|
+
label?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
helperText?: string;
|
|
9
|
+
errorMessage?: string;
|
|
10
|
+
successMessage?: string;
|
|
11
|
+
warningMessage?: string;
|
|
12
|
+
size?: FileUploadSize;
|
|
13
|
+
state?: FileUploadState;
|
|
14
|
+
fullWidth?: boolean;
|
|
15
|
+
wrapperClassName?: string;
|
|
16
|
+
labelClassName?: string;
|
|
17
|
+
helperClassName?: string;
|
|
18
|
+
dropzoneClassName?: string;
|
|
19
|
+
icon?: ReactNode;
|
|
20
|
+
maxSize?: number;
|
|
21
|
+
maxFiles?: number;
|
|
22
|
+
onFilesSelected?: (files: File[]) => void;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare const FileUpload: React.ForwardRefExoticComponent<FileUploadProps & React.RefAttributes<HTMLInputElement>>;
|
|
26
|
+
|
|
27
|
+
export { FileUpload, type FileUploadProps, type FileUploadSize, type FileUploadState };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
interface HeaderProps {
|
|
4
|
+
/** Logo or brand element to display on the left. */
|
|
5
|
+
logo?: ReactNode;
|
|
6
|
+
/** Middle section content, often used for search. */
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
/** Array of menu items or icons for the right side actions. */
|
|
9
|
+
actions?: ReactNode;
|
|
10
|
+
/** Optional user profile section content. */
|
|
11
|
+
userSection?: ReactNode;
|
|
12
|
+
/** Whether the header is sticky at the top. */
|
|
13
|
+
isSticky?: boolean;
|
|
14
|
+
/** Additional CSS classes for the container. */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** Whether to show the glass effect. */
|
|
17
|
+
glass?: boolean;
|
|
18
|
+
/** Sidebar toggle click handler (for mobile). */
|
|
19
|
+
onMenuToggle?: () => void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface HeaderComponent {
|
|
23
|
+
(props: HeaderProps): React.JSX.Element;
|
|
24
|
+
displayName?: string;
|
|
25
|
+
}
|
|
26
|
+
declare const Header: HeaderComponent;
|
|
27
|
+
|
|
28
|
+
export { Header, type HeaderProps };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
interface HeaderProps {
|
|
4
|
+
/** Logo or brand element to display on the left. */
|
|
5
|
+
logo?: ReactNode;
|
|
6
|
+
/** Middle section content, often used for search. */
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
/** Array of menu items or icons for the right side actions. */
|
|
9
|
+
actions?: ReactNode;
|
|
10
|
+
/** Optional user profile section content. */
|
|
11
|
+
userSection?: ReactNode;
|
|
12
|
+
/** Whether the header is sticky at the top. */
|
|
13
|
+
isSticky?: boolean;
|
|
14
|
+
/** Additional CSS classes for the container. */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** Whether to show the glass effect. */
|
|
17
|
+
glass?: boolean;
|
|
18
|
+
/** Sidebar toggle click handler (for mobile). */
|
|
19
|
+
onMenuToggle?: () => void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface HeaderComponent {
|
|
23
|
+
(props: HeaderProps): React.JSX.Element;
|
|
24
|
+
displayName?: string;
|
|
25
|
+
}
|
|
26
|
+
declare const Header: HeaderComponent;
|
|
27
|
+
|
|
28
|
+
export { Header, type HeaderProps };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { B as ButtonProps } from '../Button.types-D-srlWFf.mjs';
|
|
3
|
+
import '../Tooltip.types-PbUasE3C.mjs';
|
|
4
|
+
|
|
5
|
+
interface IconButtonProps extends Omit<ButtonProps, 'children' | 'leftIcon' | 'rightIcon' | 'loadingText' | 'fullWidth'> {
|
|
6
|
+
/** The icon to display inside the button */
|
|
7
|
+
icon: ReactNode;
|
|
8
|
+
/** Accessible label for the icon button */
|
|
9
|
+
'aria-label': string;
|
|
10
|
+
/** Whether the button should be rounded/circular */
|
|
11
|
+
isRound?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
15
|
+
|
|
16
|
+
export { IconButton, type IconButtonProps };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { B as ButtonProps } from '../Button.types-BsQYqZml.js';
|
|
3
|
+
import '../Tooltip.types-PbUasE3C.js';
|
|
4
|
+
|
|
5
|
+
interface IconButtonProps extends Omit<ButtonProps, 'children' | 'leftIcon' | 'rightIcon' | 'loadingText' | 'fullWidth'> {
|
|
6
|
+
/** The icon to display inside the button */
|
|
7
|
+
icon: ReactNode;
|
|
8
|
+
/** Accessible label for the icon button */
|
|
9
|
+
'aria-label': string;
|
|
10
|
+
/** Whether the button should be rounded/circular */
|
|
11
|
+
isRound?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
15
|
+
|
|
16
|
+
export { IconButton, type IconButtonProps };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React__default, { ImgHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
interface ImageProps extends ImgHTMLAttributes<HTMLImageElement> {
|
|
4
|
+
/**
|
|
5
|
+
* The source URL of the image.
|
|
6
|
+
*/
|
|
7
|
+
src: string;
|
|
8
|
+
/**
|
|
9
|
+
* The alt text for the image.
|
|
10
|
+
*/
|
|
11
|
+
alt: string;
|
|
12
|
+
/**
|
|
13
|
+
* Optional fallback component or image URL to show if the image fails to load.
|
|
14
|
+
*/
|
|
15
|
+
fallback?: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Optional component to show while the image is loading.
|
|
18
|
+
* If not provided, a default Skeleton will be used.
|
|
19
|
+
*/
|
|
20
|
+
loadingComponent?: ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Whether to show a skeleton loader while loading.
|
|
23
|
+
* @default true
|
|
24
|
+
*/
|
|
25
|
+
showSkeleton?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The aspect ratio of the image container.
|
|
28
|
+
* Useful to prevent layout shift.
|
|
29
|
+
* Example: '16/9', '1/1', '4/3'
|
|
30
|
+
*/
|
|
31
|
+
aspectRatio?: string;
|
|
32
|
+
/**
|
|
33
|
+
* How the image should be fitted in its container.
|
|
34
|
+
* @default 'cover'
|
|
35
|
+
*/
|
|
36
|
+
objectFit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
|
|
37
|
+
/**
|
|
38
|
+
* Container className.
|
|
39
|
+
*/
|
|
40
|
+
containerClassName?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* A robust Image component with built-in loading states and error handling.
|
|
45
|
+
*/
|
|
46
|
+
declare const Image: React__default.ForwardRefExoticComponent<ImageProps & React__default.RefAttributes<HTMLImageElement>>;
|
|
47
|
+
|
|
48
|
+
export { Image, type ImageProps };
|