@ikatec/nebula-react 1.3.0 → 1.3.1-beta.1
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/ikatec-nebula-react-1.3.1-beta.1.tgz +0 -0
- package/dist/index.d.mts +888 -0
- package/dist/index.d.ts +888 -0
- package/dist/index.js +6 -2
- package/dist/index.mjs +6 -2
- package/package.json +2 -2
- package/dist/ikatec-nebula-react-1.3.0.tgz +0 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,888 @@
|
|
|
1
|
+
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
2
|
+
import * as React$1 from 'react';
|
|
3
|
+
import React__default, { ComponentProps, PropsWithChildren, HTMLAttributes, ReactNode, DragEvent, ChangeEvent, InputHTMLAttributes, MutableRefObject } from 'react';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
6
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
7
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
9
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
10
|
+
import { Props } from 'react-select';
|
|
11
|
+
import * as DrawerPrimitive from '@radix-ui/react-dialog';
|
|
12
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
13
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
14
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
15
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
16
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
17
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
18
|
+
import * as RPNInput from 'react-phone-number-input';
|
|
19
|
+
import { DayPicker, Locale } from 'react-day-picker';
|
|
20
|
+
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
21
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
22
|
+
|
|
23
|
+
declare enum buttonVariantEnum {
|
|
24
|
+
primary = "\n bg-button-primary-background-default\n hover:bg-button-primary-background-hover\n active:bg-button-primary-background-active\n focus:bg-button-primary-background-focus\n focus:ring-button-primary-border-focus\n text-button-primary-text\n ",
|
|
25
|
+
secondary = "\n border\n border-button-secondary-border-default\n bg-button-secondary-background-default\n hover:bg-button-secondary-background-hover\n active:bg-button-secondary-background-active\n focus:bg-button-secondary-background-focus\n focus:ring-button-secondary-border-focus\n text-button-secondary-text\n ",
|
|
26
|
+
ghost = "\n bg-button-ghost-background-default\n hover:bg-button-ghost-background-hover\n active:bg-button-ghost-background-active\n focus:bg-button-ghost-background-focus\n focus:ring-button-ghost-border-focus\n text-button-ghost-text\n ",
|
|
27
|
+
danger = "\n bg-button-danger-background-default\n hover:bg-button-danger-background-hover\n active:bg-button-danger-background-active\n focus:bg-button-danger-background-focus\n focus:ring-button-danger-border-focus\n text-button-danger-text\n "
|
|
28
|
+
}
|
|
29
|
+
declare enum buttonSizeEnum {
|
|
30
|
+
xs = "h-6 px-2 [&>svg]:size-3 text-sm",
|
|
31
|
+
sm = "h-8 px-2 [&>svg]:size-4 text-sm",
|
|
32
|
+
md = "h-10 px-4 [&>svg]:size-4 text-base",
|
|
33
|
+
lg = "h-12 px-6 [&>svg]:size-5 text-xl"
|
|
34
|
+
}
|
|
35
|
+
type ButtonVariantType = keyof typeof buttonVariantEnum;
|
|
36
|
+
type ButtonSizeType = keyof typeof buttonSizeEnum;
|
|
37
|
+
declare const buttonVariantsConfig: (props?: ({
|
|
38
|
+
variant?: "primary" | "secondary" | "ghost" | "danger" | null | undefined;
|
|
39
|
+
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
40
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
41
|
+
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
42
|
+
asChild?: boolean;
|
|
43
|
+
variant?: ButtonVariantType;
|
|
44
|
+
size?: ButtonSizeType;
|
|
45
|
+
icon?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Button component for rendering buttons with different styles and sizes.
|
|
49
|
+
* @example
|
|
50
|
+
* <Button variant="primary" size="md" onClick={handleClick}>
|
|
51
|
+
* Click Me
|
|
52
|
+
* </Button>
|
|
53
|
+
*
|
|
54
|
+
* @param {string} className - Additional class names for the button.
|
|
55
|
+
* @param {string} variant - The variant of the button (primary, secondary, ghost, danger).
|
|
56
|
+
* @param {string} size - The size of the button (sm, md, lg).
|
|
57
|
+
* @param {boolean} asChild - If true, the button will be rendered as a child of another component.
|
|
58
|
+
* @param {boolean} icon - If true, the button will be rendered as an icon button.
|
|
59
|
+
* @param {React.ReactNode} children - The children of the button.
|
|
60
|
+
* @returns {JSX.Element} The rendered button component.
|
|
61
|
+
* @see {@link https://www.radix-ui.com/docs/primitives/components/slot} for more information on the Radix UI slot component.
|
|
62
|
+
*/
|
|
63
|
+
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
64
|
+
|
|
65
|
+
declare enum badgeVariantEnum {
|
|
66
|
+
primary = "bg-badge-primary-background text-badge-primary-text",
|
|
67
|
+
secondary = "bg-badge-secondary-background text-badge-secondary-text",
|
|
68
|
+
alert = "bg-badge-alert-background text-badge-alert-text"
|
|
69
|
+
}
|
|
70
|
+
declare enum badgeSizeEnum {
|
|
71
|
+
sm = "h-4 min-w-4 text-[10px]",
|
|
72
|
+
md = "h-6 min-w-6 text-xs"
|
|
73
|
+
}
|
|
74
|
+
type BadgeVariantType = keyof typeof badgeVariantEnum;
|
|
75
|
+
type BadgeSizeType = keyof typeof badgeSizeEnum;
|
|
76
|
+
interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
77
|
+
variant?: BadgeVariantType;
|
|
78
|
+
size?: BadgeSizeType;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Button component for rendering buttons with different styles and sizes.
|
|
82
|
+
* @example
|
|
83
|
+
* <Badge variant="primary" size="md">
|
|
84
|
+
* 1
|
|
85
|
+
* </Badge>
|
|
86
|
+
*
|
|
87
|
+
* @param {string} variant - The variant of the badge (primary, secondary, alert).
|
|
88
|
+
* @param {string} size - The size of the badge (sm, md).
|
|
89
|
+
* @returns {JSX.Element} The rendered badge component.
|
|
90
|
+
* @see {@link https://www.radix-ui.com/docs/primitives/components/slot} for more information on the Radix UI slot component.
|
|
91
|
+
*/
|
|
92
|
+
declare const Badge: React$1.ForwardRefExoticComponent<BadgeProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
93
|
+
|
|
94
|
+
declare const alertVariantsConfig: (props?: ({
|
|
95
|
+
variant?: "default" | "danger" | "info" | "success" | "warning" | null | undefined;
|
|
96
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
97
|
+
declare const alertVariants: {
|
|
98
|
+
variant: ("default" | "danger" | "info" | "success" | "warning")[];
|
|
99
|
+
};
|
|
100
|
+
interface AlertProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariantsConfig> {
|
|
101
|
+
}
|
|
102
|
+
declare const Alert: React$1.ForwardRefExoticComponent<AlertProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
103
|
+
declare const AlertTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
104
|
+
declare const AlertDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
105
|
+
declare const AlertButton: React$1.ForwardRefExoticComponent<React$1.ButtonHTMLAttributes<HTMLButtonElement> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
106
|
+
|
|
107
|
+
declare const Popover: React$1.FC<PopoverPrimitive.PopoverProps>;
|
|
108
|
+
declare const PopoverTrigger: React$1.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
109
|
+
interface PopoverContentProps extends React$1.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> {
|
|
110
|
+
portal?: boolean;
|
|
111
|
+
}
|
|
112
|
+
declare const PopoverContent: React$1.ForwardRefExoticComponent<PopoverContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
113
|
+
|
|
114
|
+
declare const Label: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & React$1.RefAttributes<HTMLLabelElement>>;
|
|
115
|
+
|
|
116
|
+
interface TableProps extends React$1.HTMLAttributes<HTMLTableElement> {
|
|
117
|
+
noCardWrapper?: boolean;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Table component that can be used with or without a card wrapper.
|
|
121
|
+
* If `noCardWrapper` is true, it renders a simple table without the card styling.
|
|
122
|
+
*/
|
|
123
|
+
declare const Table: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableElement> & TableProps & React$1.RefAttributes<HTMLTableElement>>;
|
|
124
|
+
declare const TableHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
125
|
+
declare const TableBody: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
126
|
+
declare const TableFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
127
|
+
declare const variants: {
|
|
128
|
+
variant: {
|
|
129
|
+
first: string;
|
|
130
|
+
second: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
interface TableRowProps extends React$1.HTMLAttributes<HTMLTableRowElement> {
|
|
134
|
+
variant?: keyof typeof variants.variant;
|
|
135
|
+
}
|
|
136
|
+
declare const TableRow: React$1.ForwardRefExoticComponent<TableRowProps & React$1.RefAttributes<HTMLTableRowElement>>;
|
|
137
|
+
declare const TableHead: React$1.ForwardRefExoticComponent<React$1.ThHTMLAttributes<HTMLTableCellElement> & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
138
|
+
declare const TableCell: React$1.ForwardRefExoticComponent<React$1.TdHTMLAttributes<HTMLTableCellElement> & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
139
|
+
declare const TableCaption: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableCaptionElement> & React$1.RefAttributes<HTMLTableCaptionElement>>;
|
|
140
|
+
|
|
141
|
+
declare const DropdownMenu: React$1.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
142
|
+
declare const DropdownMenuTrigger: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
143
|
+
declare const DropdownMenuGroup: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
144
|
+
declare const DropdownMenuSub: React$1.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
145
|
+
declare const DropdownMenuRadioGroup: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
146
|
+
declare const DropdownMenuSubTrigger: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
147
|
+
inset?: boolean;
|
|
148
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
149
|
+
interface DropdownMenuSubContentProps {
|
|
150
|
+
portal?: boolean;
|
|
151
|
+
}
|
|
152
|
+
declare const DropdownMenuSubContent: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & DropdownMenuSubContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
153
|
+
interface DropdownMenuContentProps {
|
|
154
|
+
portal?: boolean;
|
|
155
|
+
}
|
|
156
|
+
declare const DropdownMenuContent: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & DropdownMenuContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
157
|
+
declare const DropdownMenuItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
158
|
+
inset?: boolean;
|
|
159
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
160
|
+
declare const DropdownMenuCheckboxItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
161
|
+
declare const DropdownMenuRadioItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
162
|
+
declare const DropdownMenuLabel: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
163
|
+
inset?: boolean;
|
|
164
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
165
|
+
declare const DropdownMenuSeparator: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
166
|
+
declare const DropdownMenuShortcut: {
|
|
167
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
168
|
+
displayName: string;
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
declare const separatorVariantsConfig: (props?: ({
|
|
172
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
173
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
174
|
+
declare const separatorVariants: {
|
|
175
|
+
orientation: ("horizontal" | "vertical")[];
|
|
176
|
+
};
|
|
177
|
+
interface SeparatorProps extends Omit<React$1.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>, 'orientation'>, VariantProps<typeof separatorVariantsConfig> {
|
|
178
|
+
orientation?: 'horizontal' | 'vertical';
|
|
179
|
+
decorative?: boolean;
|
|
180
|
+
}
|
|
181
|
+
declare const Separator: React$1.ForwardRefExoticComponent<SeparatorProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
182
|
+
|
|
183
|
+
declare enum SpaceSizeEnum {
|
|
184
|
+
xs = "gap-1",
|
|
185
|
+
sm = "gap-2",
|
|
186
|
+
md = "gap-3",
|
|
187
|
+
lg = "gap-4",
|
|
188
|
+
xl = "gap-5"
|
|
189
|
+
}
|
|
190
|
+
declare enum SpaceDirectionEnum {
|
|
191
|
+
row = "flex-row",
|
|
192
|
+
column = "flex-col"
|
|
193
|
+
}
|
|
194
|
+
type SpaceDirectionType = keyof typeof SpaceDirectionEnum;
|
|
195
|
+
type SpaceSizeType = keyof typeof SpaceSizeEnum;
|
|
196
|
+
declare const spaceVariantsConfig: (props?: ({
|
|
197
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
198
|
+
direction?: "row" | "column" | null | undefined;
|
|
199
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
200
|
+
interface SpaceProps extends React__default.HTMLAttributes<HTMLDivElement>, VariantProps<typeof spaceVariantsConfig> {
|
|
201
|
+
size?: SpaceSizeType;
|
|
202
|
+
direction?: SpaceDirectionType;
|
|
203
|
+
}
|
|
204
|
+
declare const Space: React__default.ForwardRefExoticComponent<SpaceProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
205
|
+
|
|
206
|
+
type PaginationProps = {
|
|
207
|
+
page: number;
|
|
208
|
+
pageSize: number;
|
|
209
|
+
onChangePage: (page: number) => void;
|
|
210
|
+
total: number;
|
|
211
|
+
} & Omit<ComponentProps<'nav'>, 'children'>;
|
|
212
|
+
/**
|
|
213
|
+
* Pagination component to navigate through pages of data.
|
|
214
|
+
* @example
|
|
215
|
+
* <Pagination
|
|
216
|
+
* onChangePage={console.log}
|
|
217
|
+
* page={1}
|
|
218
|
+
* total={165}
|
|
219
|
+
* pageSize={10}
|
|
220
|
+
* />
|
|
221
|
+
*
|
|
222
|
+
* @param {number} page - The current page number.
|
|
223
|
+
* @param {number} total - The total number of items.
|
|
224
|
+
* @param {number} pageSize - The number of items per page.
|
|
225
|
+
* @param {function} onChangePage - Callback function to handle page changes.
|
|
226
|
+
*/
|
|
227
|
+
declare const Pagination: {
|
|
228
|
+
({ className, total, pageSize, page, onChangePage, ...props }: PaginationProps): react_jsx_runtime.JSX.Element;
|
|
229
|
+
displayName: string;
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
declare enum tagVariantsEnum {
|
|
233
|
+
blue = "bg-tag-colorIndicator-blue",
|
|
234
|
+
green = "bg-tag-colorIndicator-green",
|
|
235
|
+
yellow = "bg-tag-colorIndicator-yellow",
|
|
236
|
+
red = "bg-tag-colorIndicator-red",
|
|
237
|
+
orange = "bg-tag-colorIndicator-orange",
|
|
238
|
+
gray = "bg-tag-colorIndicator-gray"
|
|
239
|
+
}
|
|
240
|
+
type TagVariantsType = keyof typeof tagVariantsEnum;
|
|
241
|
+
interface TagProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
242
|
+
onDelete?: () => void;
|
|
243
|
+
children?: string;
|
|
244
|
+
color?: TagVariantsType;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Tag component.
|
|
248
|
+
* @example
|
|
249
|
+
* <Tag
|
|
250
|
+
* onDelete={console.log}
|
|
251
|
+
* color="green">
|
|
252
|
+
* Green
|
|
253
|
+
* </Tag>
|
|
254
|
+
*
|
|
255
|
+
* @param {string} children - The text of Tag.
|
|
256
|
+
* @param {string} color - The color of Tag indicator.
|
|
257
|
+
* @param {function} onDelete - Callback component.
|
|
258
|
+
*/
|
|
259
|
+
declare const Tag: React$1.ForwardRefExoticComponent<TagProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
260
|
+
|
|
261
|
+
interface CreateStyledSelectProps extends Omit<Props, 'isDisabled'> {
|
|
262
|
+
icon?: React.ReactNode;
|
|
263
|
+
disabled?: boolean;
|
|
264
|
+
isError?: boolean;
|
|
265
|
+
}
|
|
266
|
+
declare const StyledSelect: {
|
|
267
|
+
({ icon, disabled, isError, ...props }: CreateStyledSelectProps): react_jsx_runtime.JSX.Element;
|
|
268
|
+
displayName: string;
|
|
269
|
+
};
|
|
270
|
+
declare const StyledCreatable: {
|
|
271
|
+
({ icon, disabled, isError, ...props }: CreateStyledSelectProps): react_jsx_runtime.JSX.Element;
|
|
272
|
+
displayName: string;
|
|
273
|
+
};
|
|
274
|
+
declare const StyledAsync: {
|
|
275
|
+
({ icon, disabled, isError, ...props }: CreateStyledSelectProps): react_jsx_runtime.JSX.Element;
|
|
276
|
+
displayName: string;
|
|
277
|
+
};
|
|
278
|
+
declare const StyledAsyncCreatable: {
|
|
279
|
+
({ icon, disabled, isError, ...props }: CreateStyledSelectProps): react_jsx_runtime.JSX.Element;
|
|
280
|
+
displayName: string;
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
type InputPasswordProps = {
|
|
284
|
+
type: 'password';
|
|
285
|
+
};
|
|
286
|
+
type InputBaseProps = React$1.InputHTMLAttributes<HTMLInputElement> & {
|
|
287
|
+
isError?: boolean;
|
|
288
|
+
onClean?: () => void;
|
|
289
|
+
suffix?: string;
|
|
290
|
+
};
|
|
291
|
+
type InputTextProps = {
|
|
292
|
+
type?: 'text' | 'number' | 'email' | 'tel' | 'url' | 'hidden' | 'search';
|
|
293
|
+
icon?: React$1.ReactElement;
|
|
294
|
+
iconPlacement?: 'start' | 'end';
|
|
295
|
+
};
|
|
296
|
+
type InputProps = InputBaseProps & (InputPasswordProps | InputTextProps);
|
|
297
|
+
/**
|
|
298
|
+
* InputText component.
|
|
299
|
+
* @example
|
|
300
|
+
* <InputText
|
|
301
|
+
* leftIcon={<Box className="w-4 h-4 block rounded-sm text-tag-icon" />}
|
|
302
|
+
* placeholder="Insert a text"
|
|
303
|
+
* />
|
|
304
|
+
*
|
|
305
|
+
* @param className - Tailwind classes.
|
|
306
|
+
* @param icon - Input reference icon.
|
|
307
|
+
* @param isError - error identifier in value.
|
|
308
|
+
* @param onClean - text field clear function.
|
|
309
|
+
*/
|
|
310
|
+
declare const InputText: React$1.ForwardRefExoticComponent<InputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
311
|
+
|
|
312
|
+
declare const Dialog: React$1.FC<DrawerPrimitive.DialogProps>;
|
|
313
|
+
declare const DialogTrigger: React$1.ForwardRefExoticComponent<DrawerPrimitive.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
314
|
+
declare const DialogClose: React$1.ForwardRefExoticComponent<DrawerPrimitive.DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
315
|
+
interface DialogContentProps {
|
|
316
|
+
portal?: boolean;
|
|
317
|
+
showClose?: boolean;
|
|
318
|
+
}
|
|
319
|
+
declare const DialogContent: React$1.ForwardRefExoticComponent<Omit<DrawerPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & DialogContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
320
|
+
declare const DialogHeader: {
|
|
321
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
322
|
+
displayName: string;
|
|
323
|
+
};
|
|
324
|
+
declare const DialogBody: {
|
|
325
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
326
|
+
displayName: string;
|
|
327
|
+
};
|
|
328
|
+
declare const DialogFooter: {
|
|
329
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
330
|
+
displayName: string;
|
|
331
|
+
};
|
|
332
|
+
declare const DialogTitle: React$1.ForwardRefExoticComponent<Omit<DrawerPrimitive.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
333
|
+
declare const DialogDescription: React$1.ForwardRefExoticComponent<Omit<DrawerPrimitive.DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
334
|
+
|
|
335
|
+
declare const AlertDialog: React$1.FC<AlertDialogPrimitive.AlertDialogProps>;
|
|
336
|
+
declare const AlertDialogTrigger: React$1.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
337
|
+
interface AlertDialogContentProps {
|
|
338
|
+
portal?: boolean;
|
|
339
|
+
}
|
|
340
|
+
declare const AlertDialogContent: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & AlertDialogContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
341
|
+
declare const AlertDialogHeader: {
|
|
342
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
343
|
+
displayName: string;
|
|
344
|
+
};
|
|
345
|
+
declare const AlertDialogFooter: {
|
|
346
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
347
|
+
displayName: string;
|
|
348
|
+
};
|
|
349
|
+
declare const AlertDialogTitle: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
350
|
+
declare const AlertDialogDescription: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
351
|
+
declare const AlertDialogAction: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
352
|
+
declare const AlertDialogCancel: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
353
|
+
|
|
354
|
+
interface CheckboxProps extends React$1.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> {
|
|
355
|
+
variant?: 'multiselect' | 'default';
|
|
356
|
+
}
|
|
357
|
+
declare const Checkbox: React$1.ForwardRefExoticComponent<CheckboxProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
358
|
+
|
|
359
|
+
declare const Drawer: React$1.FC<DrawerPrimitive.DialogProps>;
|
|
360
|
+
declare const DrawerTrigger: React$1.ForwardRefExoticComponent<DrawerPrimitive.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
361
|
+
declare const DrawerClose: React$1.ForwardRefExoticComponent<DrawerPrimitive.DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
362
|
+
declare const DrawerPortal: React$1.FC<DrawerPrimitive.DialogPortalProps>;
|
|
363
|
+
declare const DrawerOverlay: React$1.ForwardRefExoticComponent<Omit<DrawerPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
364
|
+
declare const DrawerVariants: (props?: ({
|
|
365
|
+
side?: "bottom" | "left" | "right" | "top" | null | undefined;
|
|
366
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
367
|
+
interface DrawerContentProps extends React$1.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>, VariantProps<typeof DrawerVariants> {
|
|
368
|
+
portal?: boolean;
|
|
369
|
+
}
|
|
370
|
+
declare const DrawerContent: React$1.ForwardRefExoticComponent<DrawerContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
371
|
+
declare const DrawerHeader: {
|
|
372
|
+
({ className, extraActions, ...props }: React$1.HTMLAttributes<HTMLDivElement> & {
|
|
373
|
+
extraActions?: React$1.ReactNode;
|
|
374
|
+
}): react_jsx_runtime.JSX.Element;
|
|
375
|
+
displayName: string;
|
|
376
|
+
};
|
|
377
|
+
declare const DrawerBody: {
|
|
378
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
379
|
+
displayName: string;
|
|
380
|
+
};
|
|
381
|
+
declare const DrawerFooter: {
|
|
382
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
383
|
+
displayName: string;
|
|
384
|
+
};
|
|
385
|
+
declare const DrawerTitle: React$1.ForwardRefExoticComponent<Omit<DrawerPrimitive.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
386
|
+
declare const DrawerDescription: React$1.ForwardRefExoticComponent<Omit<DrawerPrimitive.DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
387
|
+
|
|
388
|
+
declare const Breadcrumb: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
389
|
+
separator?: React$1.ReactNode;
|
|
390
|
+
} & React$1.RefAttributes<HTMLElement>>;
|
|
391
|
+
declare const BreadcrumbList: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React$1.RefAttributes<HTMLOListElement>>;
|
|
392
|
+
declare const BreadcrumbItem: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React$1.RefAttributes<HTMLLIElement>>;
|
|
393
|
+
declare const BreadcrumbLink: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
394
|
+
asChild?: boolean;
|
|
395
|
+
} & React$1.RefAttributes<HTMLAnchorElement>>;
|
|
396
|
+
declare const BreadcrumbPage: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
397
|
+
declare const BreadcrumbSeparator: {
|
|
398
|
+
({ children, className, ...props }: React$1.ComponentProps<"li">): react_jsx_runtime.JSX.Element;
|
|
399
|
+
displayName: string;
|
|
400
|
+
};
|
|
401
|
+
declare const BreadcrumbEllipsis: {
|
|
402
|
+
({ className, ...props }: React$1.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
403
|
+
displayName: string;
|
|
404
|
+
};
|
|
405
|
+
|
|
406
|
+
declare const Switch: React$1.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
407
|
+
|
|
408
|
+
interface TooltipProps {
|
|
409
|
+
content: string;
|
|
410
|
+
portal?: boolean;
|
|
411
|
+
}
|
|
412
|
+
declare const Tooltip: React$1.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & TooltipProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
413
|
+
|
|
414
|
+
interface AccordionProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
415
|
+
}
|
|
416
|
+
declare function Accordion({ className, children, ...props }: React$1.ComponentProps<typeof AccordionPrimitive.Root> & {
|
|
417
|
+
collapsible?: boolean;
|
|
418
|
+
}): react_jsx_runtime.JSX.Element;
|
|
419
|
+
declare namespace Accordion {
|
|
420
|
+
var displayName: string;
|
|
421
|
+
}
|
|
422
|
+
declare function AccordionItem({ className, children, ...props }: React$1.ComponentProps<typeof AccordionPrimitive.Item>): react_jsx_runtime.JSX.Element;
|
|
423
|
+
declare namespace AccordionItem {
|
|
424
|
+
var displayName: string;
|
|
425
|
+
}
|
|
426
|
+
declare function AccordionTrigger({ className, children, ...props }: React$1.ComponentProps<typeof AccordionPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
427
|
+
declare namespace AccordionTrigger {
|
|
428
|
+
var displayName: string;
|
|
429
|
+
}
|
|
430
|
+
declare function AccordionContent({ className, children, separator, ...props }: React$1.ComponentProps<typeof AccordionPrimitive.Content> & {
|
|
431
|
+
separator?: boolean;
|
|
432
|
+
}): react_jsx_runtime.JSX.Element;
|
|
433
|
+
declare namespace AccordionContent {
|
|
434
|
+
var displayName: string;
|
|
435
|
+
}
|
|
436
|
+
declare function AccordionTitle({ className, ...props }: React$1.HTMLAttributes<HTMLHeadingElement>): react_jsx_runtime.JSX.Element;
|
|
437
|
+
declare namespace AccordionTitle {
|
|
438
|
+
var displayName: string;
|
|
439
|
+
}
|
|
440
|
+
declare function AccordionDescription({ className, ...props }: React$1.HTMLAttributes<HTMLParagraphElement>): react_jsx_runtime.JSX.Element;
|
|
441
|
+
declare namespace AccordionDescription {
|
|
442
|
+
var displayName: string;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
declare const Tabs: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
446
|
+
isFitted?: boolean;
|
|
447
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
448
|
+
declare const TabsList: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
449
|
+
declare const TabsTrigger: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
450
|
+
declare const TabsContent: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
451
|
+
|
|
452
|
+
interface BoxProps extends PropsWithChildren<HTMLAttributes<HTMLDivElement>> {
|
|
453
|
+
border?: boolean;
|
|
454
|
+
paddingSize?: 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
455
|
+
shadow?: 'sm' | 'md' | 'lg';
|
|
456
|
+
variant?: 'primary' | 'secondary';
|
|
457
|
+
}
|
|
458
|
+
declare const Box: ({ className, paddingSize, border, shadow, variant, children, ...rest }: BoxProps) => react_jsx_runtime.JSX.Element;
|
|
459
|
+
|
|
460
|
+
type ToastOptions = {
|
|
461
|
+
description?: string;
|
|
462
|
+
action?: {
|
|
463
|
+
label: React__default.ReactNode;
|
|
464
|
+
variant?: 'secondary' | 'ghost';
|
|
465
|
+
onClick: () => void;
|
|
466
|
+
};
|
|
467
|
+
icon?: React__default.ReactNode;
|
|
468
|
+
};
|
|
469
|
+
declare function Toaster(): react_jsx_runtime.JSX.Element;
|
|
470
|
+
declare function success(message: string, options?: Omit<ToastOptions, 'icon'>): void;
|
|
471
|
+
declare function error(message: string, options?: Omit<ToastOptions, 'icon'>): void;
|
|
472
|
+
declare function info(message: string, options?: Omit<ToastOptions, 'icon'>): void;
|
|
473
|
+
declare function custom(message: string, options?: ToastOptions): void;
|
|
474
|
+
declare function promise<T>(promise: Promise<T>, messages: {
|
|
475
|
+
loading: string;
|
|
476
|
+
success: string;
|
|
477
|
+
error: string;
|
|
478
|
+
}, options?: ToastOptions): Promise<T>;
|
|
479
|
+
declare const toast: {
|
|
480
|
+
success: typeof success;
|
|
481
|
+
error: typeof error;
|
|
482
|
+
info: typeof info;
|
|
483
|
+
custom: typeof custom;
|
|
484
|
+
promise: typeof promise;
|
|
485
|
+
};
|
|
486
|
+
|
|
487
|
+
declare const ActionBar: React$1.ForwardRefExoticComponent<DrawerPrimitive.DialogProps & React$1.RefAttributes<void>>;
|
|
488
|
+
declare const ActionBarTrigger: React$1.ForwardRefExoticComponent<Omit<DrawerPrimitive.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
489
|
+
declare const ActionBarPortal: {
|
|
490
|
+
(props: React$1.ComponentProps<typeof DrawerPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
491
|
+
displayName: string;
|
|
492
|
+
};
|
|
493
|
+
declare const ActionBarClose: React$1.ForwardRefExoticComponent<Omit<DrawerPrimitive.DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
494
|
+
declare const ActionBarButton: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
495
|
+
declare const ActionBarDivider: React$1.ForwardRefExoticComponent<Omit<SeparatorProps, "orientation"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
496
|
+
interface ActionBarContentProps {
|
|
497
|
+
portal?: boolean;
|
|
498
|
+
}
|
|
499
|
+
declare const ActionBarContent: React$1.ForwardRefExoticComponent<Omit<DrawerPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement> & ActionBarContentProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
500
|
+
|
|
501
|
+
interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
502
|
+
level: '1' | '2' | '3' | '4' | '5' | '6';
|
|
503
|
+
}
|
|
504
|
+
declare const Heading: React__default.ForwardRefExoticComponent<HeadingProps & React__default.RefAttributes<HTMLHeadingElement>>;
|
|
505
|
+
interface ParagraphProps extends HTMLAttributes<HTMLParagraphElement> {
|
|
506
|
+
size?: 'md' | 'sm';
|
|
507
|
+
}
|
|
508
|
+
declare const Paragraph: React__default.ForwardRefExoticComponent<ParagraphProps & React__default.RefAttributes<HTMLParagraphElement>>;
|
|
509
|
+
interface CaptionProps extends HTMLAttributes<HTMLTableCaptionElement> {
|
|
510
|
+
}
|
|
511
|
+
declare const Caption: React__default.ForwardRefExoticComponent<CaptionProps & React__default.RefAttributes<HTMLTableCaptionElement>>;
|
|
512
|
+
interface LinkProps extends React__default.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
513
|
+
size?: 'md' | 'sm';
|
|
514
|
+
asChild?: boolean;
|
|
515
|
+
children: ReactNode;
|
|
516
|
+
}
|
|
517
|
+
declare const Link: React__default.ForwardRefExoticComponent<LinkProps & React__default.RefAttributes<HTMLAnchorElement>>;
|
|
518
|
+
|
|
519
|
+
type InputPhoneProps = {
|
|
520
|
+
isError?: boolean;
|
|
521
|
+
defaultCountry?: RPNInput.Country;
|
|
522
|
+
onChange: (value: string) => void;
|
|
523
|
+
value?: string | null;
|
|
524
|
+
} & Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'onChange'>;
|
|
525
|
+
declare function InputPhone({ className, disabled, isError, defaultCountry, value, onChange, ...props }: InputPhoneProps): react_jsx_runtime.JSX.Element;
|
|
526
|
+
|
|
527
|
+
interface SkeletonProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
528
|
+
}
|
|
529
|
+
declare const Skeleton: React__default.ForwardRefExoticComponent<SkeletonProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* Type to store the message key.
|
|
533
|
+
*/
|
|
534
|
+
type MessageKey = string;
|
|
535
|
+
/**
|
|
536
|
+
* Type to store the message.
|
|
537
|
+
*/
|
|
538
|
+
type Message = string;
|
|
539
|
+
/**
|
|
540
|
+
* Type to store the message function.
|
|
541
|
+
*/
|
|
542
|
+
type MessageFunction = (...args: never[]) => string;
|
|
543
|
+
/**
|
|
544
|
+
* Type to store the messages.
|
|
545
|
+
*/
|
|
546
|
+
interface MessagesRecord extends Record<MessageKey, Message | MessageFunction> {
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Type to store the pagination messages.
|
|
550
|
+
*/
|
|
551
|
+
interface PaginationMessages extends MessagesRecord {
|
|
552
|
+
totalResultsLabel: (pagesSize: number, totalResults: number) => string;
|
|
553
|
+
currentPageLabel: (currentPage: number, totalPages: number) => string;
|
|
554
|
+
}
|
|
555
|
+
interface InputSelectMessages {
|
|
556
|
+
noOptions: string;
|
|
557
|
+
}
|
|
558
|
+
interface InputPhoneMessages {
|
|
559
|
+
countries: Record<string, string>;
|
|
560
|
+
}
|
|
561
|
+
interface TimePickerMessages {
|
|
562
|
+
label: string;
|
|
563
|
+
}
|
|
564
|
+
interface FileUploadMessages {
|
|
565
|
+
deleteAll: string;
|
|
566
|
+
}
|
|
567
|
+
interface CropperMessages {
|
|
568
|
+
dialogTitle: string;
|
|
569
|
+
applyButtonLabel: string;
|
|
570
|
+
}
|
|
571
|
+
/**
|
|
572
|
+
* Type to store the messages.
|
|
573
|
+
*/
|
|
574
|
+
interface Messages {
|
|
575
|
+
pagination: PaginationMessages;
|
|
576
|
+
inputSelect: InputSelectMessages;
|
|
577
|
+
inputPhone: InputPhoneMessages;
|
|
578
|
+
timePicker: TimePickerMessages;
|
|
579
|
+
fileUpload: FileUploadMessages;
|
|
580
|
+
cropper: CropperMessages;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Type to store the language in the localStorage.
|
|
585
|
+
*/
|
|
586
|
+
type Language = 'en-US' | 'es' | 'pt-BR';
|
|
587
|
+
/**
|
|
588
|
+
* Get the language from the localStorage.
|
|
589
|
+
*/
|
|
590
|
+
declare const getNebulaLanguage: () => Language | null | undefined;
|
|
591
|
+
/**
|
|
592
|
+
* Set the language in the localStorage.
|
|
593
|
+
*/
|
|
594
|
+
declare const setNebulaLanguage: (language: Language) => void;
|
|
595
|
+
/**
|
|
596
|
+
* Messages to use in the NebulaI18nProvider.
|
|
597
|
+
*/
|
|
598
|
+
declare const messages: Map<Language | null | undefined, Messages>;
|
|
599
|
+
|
|
600
|
+
type CalendarProps = ComponentProps<typeof DayPicker>;
|
|
601
|
+
declare const localeByi18nKey: Record<Language, Locale>;
|
|
602
|
+
declare const Calendar: ({ numberOfMonths, hideNavigation, month, onNextClick, onPrevClick, components: calendarComponents, ...props }: CalendarProps) => react_jsx_runtime.JSX.Element;
|
|
603
|
+
|
|
604
|
+
interface InputDatePickerSingleProps extends Omit<InputTextProps, 'onChange' | 'value'> {
|
|
605
|
+
value?: string;
|
|
606
|
+
onChange?: (value?: string, calendarDate?: Date) => void;
|
|
607
|
+
numberOfMonths?: CalendarProps['numberOfMonths'];
|
|
608
|
+
placeholder?: string;
|
|
609
|
+
className?: string;
|
|
610
|
+
disabledDates?: CalendarProps['disabled'];
|
|
611
|
+
onClean?: VoidFunction;
|
|
612
|
+
popoverContainer?: HTMLElement | null;
|
|
613
|
+
}
|
|
614
|
+
declare const dateIsAvailable: (inputDate?: Date | null, disabledDates?: InputDatePickerSingleProps["disabledDates"]) => boolean;
|
|
615
|
+
declare const InputDatePickerSingle: ({ placeholder, className, value, onChange, numberOfMonths, onClean, disabledDates, ...rest }: InputDatePickerSingleProps) => react_jsx_runtime.JSX.Element;
|
|
616
|
+
|
|
617
|
+
interface InputDateTimePickerSingleProps extends Omit<InputTextProps, 'onChange' | 'value'> {
|
|
618
|
+
value?: string;
|
|
619
|
+
onChange?: (value?: string, calendarDate?: Date, inputTimeValue?: string) => void;
|
|
620
|
+
numberOfMonths?: CalendarProps['numberOfMonths'];
|
|
621
|
+
placeholder?: string;
|
|
622
|
+
className?: string;
|
|
623
|
+
disabledDates?: CalendarProps['disabled'];
|
|
624
|
+
onClean?: VoidFunction;
|
|
625
|
+
}
|
|
626
|
+
declare const InputDateTimePickerSingle: ({ placeholder, className, value, onChange, numberOfMonths, onClean, disabledDates, ...rest }: InputDateTimePickerSingleProps) => react_jsx_runtime.JSX.Element;
|
|
627
|
+
|
|
628
|
+
type InputTimeProps = Omit<React.ComponentProps<typeof InputText>, 'onChange'> & {
|
|
629
|
+
onChange?: (value: string) => void;
|
|
630
|
+
};
|
|
631
|
+
declare const InputTime: React$1.ForwardRefExoticComponent<Omit<InputTimeProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
632
|
+
|
|
633
|
+
type FileMetadata = {
|
|
634
|
+
name: string;
|
|
635
|
+
size: number;
|
|
636
|
+
type: string;
|
|
637
|
+
url: string;
|
|
638
|
+
id: string;
|
|
639
|
+
};
|
|
640
|
+
type FileWithPreview = {
|
|
641
|
+
file: File | FileMetadata;
|
|
642
|
+
id: string;
|
|
643
|
+
preview?: string;
|
|
644
|
+
};
|
|
645
|
+
type FileUploadOptions = {
|
|
646
|
+
maxFiles?: number;
|
|
647
|
+
maxSize?: number;
|
|
648
|
+
accept?: string;
|
|
649
|
+
multiple?: boolean;
|
|
650
|
+
initialFiles?: FileMetadata[];
|
|
651
|
+
onFilesChange?: (files: FileWithPreview[]) => void;
|
|
652
|
+
onFilesAdded?: (addedFiles: FileWithPreview[]) => void;
|
|
653
|
+
};
|
|
654
|
+
declare enum FileUploadError {
|
|
655
|
+
MAX_FILES_EXCEEDED = "MAX_FILES_EXCEEDED",
|
|
656
|
+
MAXIMUM_FILE_SIZE_EXCEEDED = "MAXIMUM_FILE_SIZE_EXCEEDED",
|
|
657
|
+
INVALID_FORMAT = "INVALID_FORMAT"
|
|
658
|
+
}
|
|
659
|
+
type FileUploadState = {
|
|
660
|
+
files: FileWithPreview[];
|
|
661
|
+
isDragging: boolean;
|
|
662
|
+
errors: {
|
|
663
|
+
file?: File | FileMetadata;
|
|
664
|
+
error: FileUploadError;
|
|
665
|
+
}[];
|
|
666
|
+
};
|
|
667
|
+
type FileUploadActions = {
|
|
668
|
+
addFiles: (files: FileList | File[]) => void;
|
|
669
|
+
removeFile: (id: string) => void;
|
|
670
|
+
clearFiles: () => void;
|
|
671
|
+
clearErrors: () => void;
|
|
672
|
+
handleDragEnter: (e: DragEvent<HTMLElement>) => void;
|
|
673
|
+
handleDragLeave: (e: DragEvent<HTMLElement>) => void;
|
|
674
|
+
handleDragOver: (e: DragEvent<HTMLElement>) => void;
|
|
675
|
+
handleDrop: (e: DragEvent<HTMLElement>) => void;
|
|
676
|
+
handleFileChange: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
677
|
+
openFileDialog: () => void;
|
|
678
|
+
getInputProps: (props?: InputHTMLAttributes<HTMLInputElement>) => InputHTMLAttributes<HTMLInputElement> & {
|
|
679
|
+
ref: React__default.Ref<HTMLInputElement>;
|
|
680
|
+
};
|
|
681
|
+
};
|
|
682
|
+
declare const useFileUpload: (options?: FileUploadOptions) => [FileUploadState, FileUploadActions];
|
|
683
|
+
declare const formatBytes: (bytes: number, decimals?: number) => string;
|
|
684
|
+
|
|
685
|
+
interface FileUploadProps extends Omit<FileUploadOptions, 'maxSize'> {
|
|
686
|
+
maxSizeMB?: number;
|
|
687
|
+
title: string;
|
|
688
|
+
subtitle: string;
|
|
689
|
+
showPreview?: boolean;
|
|
690
|
+
imagePreview?: (file?: FileWithPreview) => ReactNode;
|
|
691
|
+
onError?: (errors: {
|
|
692
|
+
file?: File | FileMetadata;
|
|
693
|
+
error: FileUploadError;
|
|
694
|
+
}[]) => void;
|
|
695
|
+
disabled?: boolean;
|
|
696
|
+
}
|
|
697
|
+
declare function FileUpload({ maxSizeMB, subtitle, title, imagePreview, showPreview, onError, maxFiles, ...rest }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
698
|
+
declare namespace FileUpload {
|
|
699
|
+
var displayName: string;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
interface TextAreaProps extends React$1.InputHTMLAttributes<HTMLTextAreaElement> {
|
|
703
|
+
isError?: boolean;
|
|
704
|
+
resize?: boolean;
|
|
705
|
+
showCount?: boolean;
|
|
706
|
+
autoResize?: boolean;
|
|
707
|
+
asInput?: boolean;
|
|
708
|
+
}
|
|
709
|
+
/**
|
|
710
|
+
* TextArea component.
|
|
711
|
+
* @example
|
|
712
|
+
* <TextArea
|
|
713
|
+
* leftIcon={<Box className="w-4 h-4 block rounded-sm text-tag-icon" />}
|
|
714
|
+
* placeholder="Insert a text"
|
|
715
|
+
* />
|
|
716
|
+
*
|
|
717
|
+
* @param className - Tailwind classes.
|
|
718
|
+
* @param icon - Input reference icon.
|
|
719
|
+
* @param isError - error identifier in value.
|
|
720
|
+
* @param onClean - text field clear function.
|
|
721
|
+
*/
|
|
722
|
+
declare const TextArea: React$1.ForwardRefExoticComponent<TextAreaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
723
|
+
|
|
724
|
+
type Area = {
|
|
725
|
+
x: number;
|
|
726
|
+
y: number;
|
|
727
|
+
width: number;
|
|
728
|
+
height: number;
|
|
729
|
+
};
|
|
730
|
+
interface CropperRootProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
731
|
+
image: string;
|
|
732
|
+
cropPadding?: number;
|
|
733
|
+
aspectRatio?: number;
|
|
734
|
+
minZoom?: number;
|
|
735
|
+
maxZoom?: number;
|
|
736
|
+
zoomSensitivity?: number;
|
|
737
|
+
keyboardStep?: number;
|
|
738
|
+
zoom?: number;
|
|
739
|
+
onCropChange?: (pixels: Area | null) => void;
|
|
740
|
+
onZoomChange?: (zoom: number) => void;
|
|
741
|
+
children: React$1.ReactNode;
|
|
742
|
+
}
|
|
743
|
+
declare const Cropper$1: {
|
|
744
|
+
Root: React$1.FC<CropperRootProps>;
|
|
745
|
+
Image: React$1.FC<Omit<React$1.ImgHTMLAttributes<HTMLImageElement>, "draggable" | "style" | "alt" | "src">>;
|
|
746
|
+
CropArea: React$1.FC<React$1.HTMLAttributes<HTMLDivElement>>;
|
|
747
|
+
Description: React$1.FC<React$1.HTMLAttributes<HTMLDivElement>>;
|
|
748
|
+
};
|
|
749
|
+
|
|
750
|
+
declare function CropperDescription({ className, ...props }: React.ComponentProps<typeof Cropper$1.Description>): react_jsx_runtime.JSX.Element;
|
|
751
|
+
declare function CropperImage({ className, ...props }: React.ComponentProps<typeof Cropper$1.Image>): react_jsx_runtime.JSX.Element;
|
|
752
|
+
declare function CropperCropArea({ className, rounded, ...props }: React.ComponentProps<typeof Cropper$1.CropArea> & {
|
|
753
|
+
rounded?: boolean;
|
|
754
|
+
}): react_jsx_runtime.JSX.Element;
|
|
755
|
+
interface CropperProps {
|
|
756
|
+
open?: boolean;
|
|
757
|
+
onOpenChange: (open: boolean) => void;
|
|
758
|
+
previewUrl?: string;
|
|
759
|
+
onApply: (finalImageUrl: string, file: Blob) => void;
|
|
760
|
+
rounded?: boolean;
|
|
761
|
+
portal?: boolean;
|
|
762
|
+
onCancelCrop?: VoidFunction;
|
|
763
|
+
}
|
|
764
|
+
declare function Cropper({ onOpenChange, open, previewUrl, onApply, onCancelCrop, rounded, portal, }: CropperProps): react_jsx_runtime.JSX.Element;
|
|
765
|
+
|
|
766
|
+
interface ProfileImageProps extends Pick<FileUploadOptions, 'maxFiles'> {
|
|
767
|
+
maxSizeMB?: number;
|
|
768
|
+
onError?: (errors: {
|
|
769
|
+
file?: File | FileMetadata;
|
|
770
|
+
error: FileUploadError;
|
|
771
|
+
}[]) => void;
|
|
772
|
+
disabled?: boolean;
|
|
773
|
+
subtitle?: string;
|
|
774
|
+
onRemove?: VoidFunction;
|
|
775
|
+
image?: string;
|
|
776
|
+
cropperProps?: Omit<CropperProps, 'open' | 'previewUrl' | 'onOpenChange' | 'onApply'>;
|
|
777
|
+
onChange?: (file?: File) => void;
|
|
778
|
+
size?: 'sm' | 'md';
|
|
779
|
+
icon?: React__default.JSX.Element;
|
|
780
|
+
}
|
|
781
|
+
declare const ProfileImage: {
|
|
782
|
+
({ maxSizeMB, subtitle, onError, maxFiles, onRemove, image, cropperProps, onChange, size, icon, }: ProfileImageProps): react_jsx_runtime.JSX.Element;
|
|
783
|
+
displayName: string;
|
|
784
|
+
};
|
|
785
|
+
|
|
786
|
+
declare function Slider({ className, defaultValue, value, min, max, ...props }: React$1.ComponentProps<typeof SliderPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
787
|
+
|
|
788
|
+
declare function RadioGroup({ className, ...props }: React$1.ComponentProps<typeof RadioGroupPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
789
|
+
declare function RadioGroupItem({ className, ...props }: React$1.ComponentProps<typeof RadioGroupPrimitive.Item>): react_jsx_runtime.JSX.Element;
|
|
790
|
+
|
|
791
|
+
interface StepperProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
792
|
+
defaultValue?: number;
|
|
793
|
+
value?: number;
|
|
794
|
+
onValueChange?: (value: number) => void;
|
|
795
|
+
orientation?: 'horizontal' | 'vertical';
|
|
796
|
+
}
|
|
797
|
+
declare function Stepper({ defaultValue, value, onValueChange, orientation, className, ...props }: StepperProps): react_jsx_runtime.JSX.Element;
|
|
798
|
+
interface StepperItemProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
799
|
+
step: number;
|
|
800
|
+
completed?: boolean;
|
|
801
|
+
disabled?: boolean;
|
|
802
|
+
loading?: boolean;
|
|
803
|
+
}
|
|
804
|
+
declare function StepperItem({ step, completed, disabled, loading, className, children, ...props }: StepperItemProps): react_jsx_runtime.JSX.Element;
|
|
805
|
+
interface StepperTriggerProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
806
|
+
asChild?: boolean;
|
|
807
|
+
isClickable?: boolean;
|
|
808
|
+
}
|
|
809
|
+
declare function StepperTrigger({ asChild, className, children, isClickable, ...props }: StepperTriggerProps): react_jsx_runtime.JSX.Element;
|
|
810
|
+
interface StepperIndicatorProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
811
|
+
asChild?: boolean;
|
|
812
|
+
}
|
|
813
|
+
declare function StepperIndicator({ asChild, className, children, ...props }: StepperIndicatorProps): react_jsx_runtime.JSX.Element;
|
|
814
|
+
declare function StepperTitle({ className, ...props }: React$1.HTMLAttributes<HTMLHeadingElement>): react_jsx_runtime.JSX.Element;
|
|
815
|
+
declare function StepperDescription({ className, ...props }: React$1.HTMLAttributes<HTMLParagraphElement>): react_jsx_runtime.JSX.Element;
|
|
816
|
+
declare function StepperSeparator({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
817
|
+
|
|
818
|
+
interface Content {
|
|
819
|
+
/**
|
|
820
|
+
* Path to `node_modules` where `flowbite-react` is installed
|
|
821
|
+
*
|
|
822
|
+
* ===============================================
|
|
823
|
+
*
|
|
824
|
+
* For monorepo setup where `flowbite-react` is installed in the root `node_modules` but used in `apps/web` directory
|
|
825
|
+
* @example
|
|
826
|
+
* ```
|
|
827
|
+
* // tailwind.config.(js|cjs|mjs) file
|
|
828
|
+
*
|
|
829
|
+
* // cjs
|
|
830
|
+
* const flowbite = require("flowbite-react/tailwind");
|
|
831
|
+
* // esm
|
|
832
|
+
* import flowbite from "flowbite-react/tailwind";
|
|
833
|
+
*
|
|
834
|
+
* {
|
|
835
|
+
* content: [
|
|
836
|
+
* // ...
|
|
837
|
+
* flowbite.content({ base: "../../" })
|
|
838
|
+
* ],
|
|
839
|
+
* plugins: [
|
|
840
|
+
* // ...
|
|
841
|
+
* flowbite.plugin()
|
|
842
|
+
* ]
|
|
843
|
+
* }
|
|
844
|
+
* ```
|
|
845
|
+
*
|
|
846
|
+
* @default "./"
|
|
847
|
+
*/
|
|
848
|
+
base?: string;
|
|
849
|
+
}
|
|
850
|
+
declare function content({ base }?: Content): string;
|
|
851
|
+
declare const tailwind: {
|
|
852
|
+
content: typeof content;
|
|
853
|
+
};
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* Context type to use the NebulaI18nProvider.
|
|
857
|
+
*/
|
|
858
|
+
interface NebulaI18nContextType {
|
|
859
|
+
messages: Messages;
|
|
860
|
+
locale: Language | null | undefined;
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* Props to use the NebulaI18nProvider.
|
|
864
|
+
*/
|
|
865
|
+
interface NebulaI18nProviderProps {
|
|
866
|
+
customI18nStorageKey?: string;
|
|
867
|
+
children: React.ReactNode;
|
|
868
|
+
}
|
|
869
|
+
/**
|
|
870
|
+
* Provider to use the NebulaI18nContext.
|
|
871
|
+
*
|
|
872
|
+
* @param {React.ReactNode} props.children - The children to render.
|
|
873
|
+
* @param {string} [props.customI18nStorageKey] - The custom storage key to use the NebulaI18nProvider. Default is `nebula-i18n-key`.
|
|
874
|
+
* @returns {React.ReactNode} The rendered children.
|
|
875
|
+
*/
|
|
876
|
+
declare const NebulaI18nProvider: ({ children, customI18nStorageKey, }: NebulaI18nProviderProps) => react_jsx_runtime.JSX.Element;
|
|
877
|
+
/**
|
|
878
|
+
* Hook to use the NebulaI18nContext.
|
|
879
|
+
* @throws {Error} If the hook is used outside of a NebulaI18nProvider.
|
|
880
|
+
*/
|
|
881
|
+
declare const useNebulaI18n: () => NebulaI18nContextType;
|
|
882
|
+
|
|
883
|
+
type PossibleRefs<T extends HTMLElement> = MutableRefObject<T | undefined | null> | MutableRefObject<T | undefined | null>[];
|
|
884
|
+
declare function useClickOutside<T extends HTMLElement>(refs: PossibleRefs<T>, onClickOutside: VoidFunction): void;
|
|
885
|
+
|
|
886
|
+
declare function useKeyPress(key: string, callback: VoidFunction): void;
|
|
887
|
+
|
|
888
|
+
export { Accordion, AccordionContent, AccordionDescription, AccordionItem, type AccordionProps, AccordionTitle, AccordionTrigger, ActionBar, ActionBarButton, ActionBarClose, ActionBarContent, ActionBarDivider, ActionBarPortal, ActionBarTrigger, Alert, AlertButton, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, StyledAsync as Async, StyledAsyncCreatable as AsyncCreatable, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Calendar, type CalendarProps, Caption, type CaptionProps, Checkbox, type CheckboxProps, StyledCreatable as Creatable, Cropper, CropperCropArea, CropperDescription, CropperImage, type CropperProps, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type FileMetadata, FileUpload, type FileUploadActions, FileUploadError, type FileUploadOptions, type FileUploadProps, type FileUploadState, type FileWithPreview, Heading, type HeadingProps, InputDatePickerSingle, type InputDatePickerSingleProps, InputDateTimePickerSingle, type InputDateTimePickerSingleProps, InputPhone, InputText, type InputTextProps, InputTime, type InputTimeProps, Label, Link, type LinkProps, NebulaI18nProvider, type NebulaI18nProviderProps, Pagination, type PaginationProps, Paragraph, type ParagraphProps, Popover, PopoverContent, type PopoverContentProps, PopoverTrigger, ProfileImage, type ProfileImageProps, RadioGroup, RadioGroupItem, StyledSelect as Select, type CreateStyledSelectProps as SelectProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, Slider, Space, SpaceDirectionEnum, type SpaceProps, SpaceSizeEnum, Stepper, StepperDescription, StepperIndicator, StepperItem, StepperSeparator, StepperTitle, StepperTrigger, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, TextArea, type TextAreaProps, Toaster, Tooltip, type TooltipProps, alertVariants, badgeSizeEnum, badgeVariantEnum, buttonSizeEnum, buttonVariantEnum, buttonVariantsConfig, dateIsAvailable, formatBytes, getNebulaLanguage, localeByi18nKey, messages, separatorVariants, setNebulaLanguage, tagVariantsEnum, tailwind, toast, useClickOutside, useFileUpload, useKeyPress, useNebulaI18n };
|