@parrot-co/parrot-ui 0.1.31 → 1.0.0-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.
@@ -0,0 +1,932 @@
1
+ import * as React$1 from 'react';
2
+ import React__default from 'react';
3
+ import * as react_aria_components from 'react-aria-components';
4
+ import { TextFieldProps, NumberFieldProps, ButtonProps as ButtonProps$1, ToggleButtonProps as ToggleButtonProps$1, CheckboxFieldProps, CheckboxGroupProps as CheckboxGroupProps$1, MenuTriggerProps as MenuTriggerProps$1, MenuProps as MenuProps$1, Placement, MenuItemProps as MenuItemProps$1, MenuSectionProps as MenuSectionProps$1, ListBoxProps as ListBoxProps$1, ListBoxItemProps as ListBoxItemProps$1, ListBoxSectionProps as ListBoxSectionProps$1, RadioFieldProps, RadioGroupProps as RadioGroupProps$1, SelectProps as SelectProps$1, CalendarProps as CalendarProps$1, DateValue, RangeCalendarProps as RangeCalendarProps$1, DateFieldProps as DateFieldProps$1, TimeFieldProps as TimeFieldProps$1, TimeValue, DatePickerProps as DatePickerProps$1, DateRangePickerProps as DateRangePickerProps$1, ProgressBarProps, SwitchFieldProps, SliderProps as SliderProps$1, Key, TabsProps as TabsProps$1, Selection, SortDescriptor, ModalOverlayProps, PopoverProps as PopoverProps$1, TagGroupProps as TagGroupProps$1, TagListProps, TagProps as TagProps$1, Color as Color$1, ColorAreaProps as ColorAreaProps$1, ColorFieldProps as ColorFieldProps$1, ColorSwatchPickerProps as ColorSwatchPickerProps$1, ColorSliderProps as ColorSliderProps$1, TooltipProps as TooltipProps$1 } from 'react-aria-components';
5
+ import { OverlayTriggerProps } from 'react-stately';
6
+
7
+ /**
8
+ * Open registry of valid `color` values. Consumers extend it via module
9
+ * augmentation to get intellisense for custom colors:
10
+ * declare module "@parrot-co/parrot-ui" { interface ParrotColorRegistry { fire: true } }
11
+ */
12
+ interface ParrotColorRegistry {
13
+ red: true;
14
+ orange: true;
15
+ amber: true;
16
+ yellow: true;
17
+ lime: true;
18
+ green: true;
19
+ emerald: true;
20
+ teal: true;
21
+ cyan: true;
22
+ sky: true;
23
+ blue: true;
24
+ indigo: true;
25
+ violet: true;
26
+ purple: true;
27
+ fuchsia: true;
28
+ pink: true;
29
+ rose: true;
30
+ slate: true;
31
+ gray: true;
32
+ zinc: true;
33
+ neutral: true;
34
+ stone: true;
35
+ primary: true;
36
+ accent: true;
37
+ success: true;
38
+ warning: true;
39
+ critical: true;
40
+ info: true;
41
+ /** @deprecated Radix-era names — migrate to the Tailwind equivalents. */
42
+ tomato: true;
43
+ crimson: true;
44
+ plum: true;
45
+ grass: true;
46
+ brown: true;
47
+ mint: true;
48
+ gold: true;
49
+ bronze: true;
50
+ mauve: true;
51
+ sage: true;
52
+ olive: true;
53
+ sand: true;
54
+ }
55
+ type Color = keyof ParrotColorRegistry;
56
+ /**
57
+ * Open registry of valid `variant` values. Extend via module augmentation.
58
+ */
59
+ interface ParrotVariantRegistry {
60
+ solid: true;
61
+ light: true;
62
+ outline: true;
63
+ lightOutline: true;
64
+ ghost: true;
65
+ pastel: true;
66
+ solidMono: true;
67
+ }
68
+ type Variant = keyof ParrotVariantRegistry;
69
+ type ColorVariant = Variant;
70
+ type InputAppearance = "outline" | "filled" | "filled-outline";
71
+ /** The shared control-size scale (`.prt-size` recipe). */
72
+ type Size = "2xs" | "xs" | "sm" | "md" | "lg" | "xl";
73
+ /**
74
+ * The size range every control supports — the valid range for a theme-level
75
+ * `size` default. `2xs` (and larger opt-ins like `2xl`/`3xl`) stay per-component.
76
+ */
77
+ type ControlSize = "xs" | "sm" | "md" | "lg" | "xl";
78
+ /** The radius scale (`data-radius` recipe). */
79
+ type Radius = "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "full";
80
+ /** @deprecated use `Radius` */
81
+ type BorderRadius = "none" | "sm" | "md" | "lg" | "full";
82
+ type Appearance = "light" | "dark";
83
+ /** @deprecated use `Size` */
84
+ type ButtonSize = "xs" | "sm" | "md" | "lg" | "xl";
85
+ type SizeOption = "none" | "4xs" | "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl";
86
+
87
+ type ActionStatus = "idle" | "loading" | "success" | "error";
88
+ type Dict<T = unknown> = Record<string, T>;
89
+ type ID = string | number;
90
+ type Breakpoints = "base" | "sm" | "md" | "lg" | "xl" | "2xl";
91
+ interface StyleProps<S extends string = string> {
92
+ /** Use this to add classes to the component. you can also use the `className` prop. But i won't recommend to use both at the same time. */
93
+ classNames?: Partial<Record<S, string>>;
94
+ /** Use this to add styles to the component. you can also use the `style` prop. But i won't recommend to use both at the same time. */
95
+ styles?: Partial<Record<S, React.CSSProperties>>;
96
+ className?: string;
97
+ style?: React.CSSProperties;
98
+ }
99
+ type ResponsiveProp<T> = T | {
100
+ [K in Breakpoints]?: T;
101
+ };
102
+
103
+ type FieldProps<S extends string> = InputProps & StyleProps<S | "wrapper" | "label" | "input" | "description"> & {
104
+ children?: React__default.ReactNode;
105
+ replaceDefaultControlWrapper?: boolean;
106
+ };
107
+ type FieldComponentProps<S extends string> = FieldProps<S>;
108
+ type InputProps = {
109
+ description?: React__default.ReactNode;
110
+ label?: React__default.ReactNode;
111
+ error?: React__default.ReactNode;
112
+ append?: React__default.ReactNode;
113
+ prepend?: React__default.ReactNode;
114
+ validationStatus?: "error" | "success" | "warning";
115
+ shape?: "rounded" | "sharp";
116
+ inputRef?: React__default.RefObject<HTMLInputElement>;
117
+ wrapperRef?: React__default.RefObject<HTMLDivElement>;
118
+ appearance?: InputAppearance;
119
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
120
+ color?: Color;
121
+ radius?: Radius;
122
+ isDisabled?: boolean;
123
+ };
124
+
125
+ type TextInputProps = Omit<TextFieldProps, "className" | "style" | "children"> & FieldComponentProps<"input"> & {
126
+ placeholder?: string;
127
+ };
128
+ declare function Input({ className, classNames, style, styles, onChange, inputRef, wrapperRef, prepend, append, label, description, error, color, size, radius, appearance, validationStatus, shape, placeholder, ...textFieldProps }: TextInputProps): React$1.JSX.Element;
129
+
130
+ type NumberInputProps = Omit<NumberFieldProps, "className" | "style" | "children"> & FieldComponentProps<"input" | "decrement" | "increment"> & {
131
+ showSteppers?: boolean;
132
+ decrementIcon?: React$1.ReactNode;
133
+ incrementIcon?: React$1.ReactNode;
134
+ placeholder?: string;
135
+ };
136
+ declare function NumberInput({ appearance, size, color, classNames, styles, append, prepend, placeholder, showSteppers, error, label, description, incrementIcon, decrementIcon, inputRef, wrapperRef, validationStatus, shape, radius, ...props }: NumberInputProps): React$1.JSX.Element;
137
+
138
+ type TextWeight = "light" | "regular" | "medium" | "semi-bold" | "bold" | "heavy" | "inherit";
139
+ type TextColorVariant = "light" | "lighter" | "dark" | "default";
140
+ interface TextProps extends Omit<React$1.ComponentPropsWithRef<"span">, "color"> {
141
+ size?: ResponsiveProp<SizeOption>;
142
+ weight?: TextWeight;
143
+ highlight?: boolean;
144
+ color?: Color | "inherit" | "white" | "black";
145
+ variant?: TextColorVariant;
146
+ align?: "left" | "center" | "right";
147
+ numeric?: boolean;
148
+ underline?: boolean;
149
+ italic?: boolean;
150
+ lineHeight?: "normal" | "shorter" | "short" | "base" | "tall";
151
+ textCase?: "uppercase" | "lowercase" | "capitalize";
152
+ as?: React$1.ElementType;
153
+ }
154
+ /**
155
+ * @deprecated Use plain HTML elements (`<span>`, `<p>`, `<div>`) with Tailwind
156
+ * text utilities (`text-sm`, `font-medium`, `text-gray-500`, …) instead.
157
+ */
158
+ declare function Text({ textCase, size, weight, color, variant, highlight, align, lineHeight, underline, italic, as: Comp, className, ...rest }: TextProps): React$1.JSX.Element;
159
+
160
+ interface TextareaProps extends Omit<TextFieldProps, "className" | "style" | "children">, FieldComponentProps<"input"> {
161
+ resize?: "none" | "both" | "horizontal" | "vertical";
162
+ placeholder?: string;
163
+ rows?: number;
164
+ }
165
+ declare function Textarea({ appearance, resize, label, description, error, color, radius, size, className, classNames, styles, style, prepend, append, validationStatus, shape, inputRef, wrapperRef, placeholder, rows, isDisabled, ...textFieldProps }: TextareaProps): React$1.JSX.Element;
166
+
167
+ interface ButtonProps extends Omit<ButtonProps$1, "className" | "style" | "children">, StyleProps<"wrapper" | "loader"> {
168
+ append?: React$1.ReactNode;
169
+ color?: Color;
170
+ isIconButton?: boolean;
171
+ isLoading?: boolean;
172
+ prepend?: React$1.ReactNode;
173
+ radius?: Radius;
174
+ size?: Size;
175
+ variant?: Variant;
176
+ children?: React$1.ReactNode;
177
+ ref?: React$1.Ref<HTMLButtonElement>;
178
+ }
179
+ declare function Button(props: ButtonProps): React$1.JSX.Element;
180
+
181
+ interface SpaceProps extends StyleProps<"wrapper"> {
182
+ compact?: boolean;
183
+ gap?: SizeOption;
184
+ stack?: boolean;
185
+ children?: React$1.ReactNode;
186
+ }
187
+ declare function Space({ children, compact, gap, stack, className, classNames, style, styles, }: SpaceProps): React$1.JSX.Element;
188
+
189
+ type ButtonGroupProps = Pick<ButtonProps, "color" | "variant" | "size" | "radius"> & StyleProps<"wrapper"> & {
190
+ label?: string;
191
+ };
192
+ declare function ButtonGroup({ color, variant, size, compact, radius, gap, children, className, classNames, style, styles, }: ButtonGroupProps & React$1.ComponentProps<typeof Space>): React$1.JSX.Element;
193
+
194
+ declare function IconButton({ children, ...props }: ButtonProps): React__default.JSX.Element;
195
+
196
+ interface ButtonToggleProps {
197
+ idleColor?: Color;
198
+ idleVariant?: Variant;
199
+ activeColor?: Color;
200
+ activeVariant?: Variant;
201
+ }
202
+ interface ToggleButtonProps extends Omit<ToggleButtonProps$1, "className" | "style" | "children">, ButtonToggleProps, StyleProps<"wrapper"> {
203
+ append?: React$1.ReactNode;
204
+ prepend?: React$1.ReactNode;
205
+ radius?: Radius;
206
+ size?: Size;
207
+ isIconButton?: boolean;
208
+ children?: React$1.ReactNode;
209
+ ref?: React$1.Ref<HTMLButtonElement>;
210
+ }
211
+ declare function ToggleButton({ idleColor, idleVariant, activeColor, activeVariant, append, prepend, size, radius, isIconButton, className, classNames, style, styles, children, ...props }: ToggleButtonProps): React$1.JSX.Element;
212
+
213
+ interface CheckboxVariantProps extends StyleProps<"wrapper" | "icon" | "checkbox"> {
214
+ appearance?: "outline" | "filled";
215
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
216
+ radius?: Radius;
217
+ /** @deprecated use `radius` instead */
218
+ shape?: "sharp" | "round";
219
+ color?: Color;
220
+ }
221
+ interface CheckboxProps extends Omit<CheckboxFieldProps, "className" | "children" | "style">, CheckboxVariantProps {
222
+ className?: string;
223
+ children?: React$1.ReactNode;
224
+ }
225
+ declare function Checkbox({ appearance, size, shape, radius, color, className, classNames, styles, style, children, ...props }: CheckboxProps): React$1.JSX.Element;
226
+
227
+ interface CheckboxGroupProps extends Omit<CheckboxGroupProps$1, "className" | "style" | "children">, CheckboxVariantProps {
228
+ children?: React$1.ReactNode;
229
+ label?: React$1.ReactNode;
230
+ description?: React$1.ReactNode;
231
+ errorMessage?: React$1.ReactNode;
232
+ ref?: React$1.Ref<HTMLDivElement>;
233
+ }
234
+ declare function CheckboxGroup({ children, label, description, errorMessage, size, appearance, color, radius, shape, ...props }: CheckboxGroupProps): React$1.JSX.Element;
235
+
236
+ interface CheckBoxItemProps extends Omit<CheckboxFieldProps, "className" | "children" | "style">, StyleProps<"wrapper"> {
237
+ className?: string;
238
+ children?: React$1.ReactNode;
239
+ }
240
+ declare function CheckboxItem({ className, classNames, styles, style, children, ...props }: CheckBoxItemProps): React$1.JSX.Element;
241
+
242
+ type MenuProps = MenuTriggerProps$1;
243
+ declare function Menu({ children, ...props }: MenuProps): React$1.JSX.Element;
244
+ interface MenuTriggerProps {
245
+ children?: React$1.ReactNode;
246
+ asChild?: boolean;
247
+ }
248
+ declare function MenuTrigger({ asChild, children }: MenuTriggerProps): React$1.JSX.Element;
249
+ interface MenuContentProps<T extends object = object> extends Omit<MenuProps$1<T>, "className" | "style">, StyleProps<"popover" | "wrapper" | "list"> {
250
+ menuHeader?: React$1.ReactNode | (() => React$1.ReactNode);
251
+ menuFooter?: React$1.ReactNode | (() => React$1.ReactNode);
252
+ minWidth?: number | string;
253
+ maxHeight?: number | string;
254
+ maxWidth?: number | string;
255
+ placement?: Placement;
256
+ offset?: number;
257
+ color?: Color;
258
+ }
259
+ declare function MenuContent<T extends object>({ children, menuHeader, menuFooter, minWidth, maxHeight, maxWidth, placement, offset, color, classNames, styles, className, style, ...props }: MenuContentProps<T>): React$1.JSX.Element;
260
+ interface MenuItemProps extends Omit<MenuItemProps$1, "className" | "style" | "children"> {
261
+ children?: React$1.ReactNode;
262
+ icon?: React$1.ReactNode;
263
+ label?: React$1.ReactNode;
264
+ description?: React$1.ReactNode;
265
+ color?: Color;
266
+ isReadOnly?: boolean;
267
+ className?: string;
268
+ style?: React$1.CSSProperties;
269
+ }
270
+ declare function MenuItem({ children, icon, label, description, color, isReadOnly, className, style, textValue, ...props }: MenuItemProps): React$1.JSX.Element;
271
+ interface MenuSectionProps<T extends object = object> extends Omit<MenuSectionProps$1<T>, "className" | "children"> {
272
+ title?: React$1.ReactNode;
273
+ children?: React$1.ReactNode;
274
+ className?: string;
275
+ }
276
+ declare function MenuSection<T extends object>({ title, children, className, ...props }: MenuSectionProps<T>): React$1.JSX.Element;
277
+
278
+ interface ListBoxRenderProps<T> {
279
+ labelKey?: string;
280
+ valueKey?: string;
281
+ sectionKey?: string;
282
+ color?: Color;
283
+ width?: number | string;
284
+ showSectionSeparator?: boolean;
285
+ showSelectionIndicator?: boolean;
286
+ renderOption?: (item: T) => React$1.ReactNode;
287
+ renderSelectionIndicator?: (item: T) => React$1.ReactNode;
288
+ renderSectionLabel?: (item: T) => React$1.ReactNode;
289
+ renderEmpty?: () => React$1.ReactNode;
290
+ }
291
+ interface ListBoxProps<T extends object> extends Omit<ListBoxProps$1<T>, "className" | "style" | "children" | "items">, ListBoxRenderProps<T>, StyleProps<"wrapper" | "label" | "section" | "option"> {
292
+ items?: Iterable<T>;
293
+ children?: React$1.ReactNode | ((item: T) => React$1.ReactElement);
294
+ listBoxRef?: React$1.Ref<HTMLDivElement>;
295
+ }
296
+ declare function ListBox<T extends object>({ items, children, labelKey, valueKey, sectionKey, color, width, showSectionSeparator, showSelectionIndicator, renderOption, renderSelectionIndicator, renderSectionLabel, renderEmpty, className, classNames, style, styles, listBoxRef, ...props }: ListBoxProps<T>): React$1.JSX.Element;
297
+ interface ListBoxItemProps extends Omit<ListBoxItemProps$1, "className"> {
298
+ color?: Color;
299
+ variant?: ColorVariant;
300
+ className?: string;
301
+ showSelectionIndicator?: boolean;
302
+ }
303
+ declare function ListBoxItem({ color, variant, className, showSelectionIndicator, children, textValue, ...props }: ListBoxItemProps): React$1.JSX.Element;
304
+ interface ListBoxSectionProps<T extends object> extends Omit<ListBoxSectionProps$1<T>, "className"> {
305
+ title?: React$1.ReactNode;
306
+ className?: string;
307
+ }
308
+ declare function ListBoxSection<T extends object>({ title, className, children, ...props }: ListBoxSectionProps<T>): React$1.JSX.Element;
309
+
310
+ interface ComboBoxProps<T extends object> extends Pick<ListBoxProps<T>, "labelKey" | "valueKey" | "sectionKey" | "renderOption" | "renderSectionLabel" | "disabledKeys" | "children">, StyleProps<"wrapper" | "input" | "button" | "popover"> {
311
+ label?: React$1.ReactNode;
312
+ description?: React$1.ReactNode;
313
+ error?: React$1.ReactNode;
314
+ placeholder?: string;
315
+ prepend?: React$1.ReactNode;
316
+ append?: React$1.ReactNode;
317
+ selectorIcon?: React$1.ReactNode;
318
+ selectorSize?: Size;
319
+ isLoading?: boolean;
320
+ loadingIndicator?: React$1.ReactNode;
321
+ loadData?: (filter?: string, signal?: AbortSignal) => Promise<T[]>;
322
+ items?: Iterable<T>;
323
+ defaultItems?: Iterable<T>;
324
+ inputValue?: string;
325
+ defaultInputValue?: string;
326
+ onInputChange?: (value: string) => void;
327
+ selectedKey?: ID | null;
328
+ defaultSelectedKey?: ID | null;
329
+ onSelectionChange?: (key: ID | null) => void;
330
+ allowsCustomValue?: boolean;
331
+ menuTrigger?: "focus" | "input" | "manual";
332
+ isDisabled?: boolean;
333
+ isRequired?: boolean;
334
+ color?: Color;
335
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
336
+ appearance?: InputAppearance;
337
+ radius?: Radius;
338
+ }
339
+ declare function ComboBox<T extends object>({ description, error, label, selectorIcon, selectorSize, style, styles, className, classNames, isLoading, loadData, loadingIndicator, items, defaultItems, inputValue, onInputChange, placeholder, prepend, append, color, size, radius, appearance, labelKey, valueKey, sectionKey, renderOption, renderSectionLabel, children, ...props }: ComboBoxProps<T>): React$1.JSX.Element;
340
+
341
+ interface RadioProps extends Omit<RadioFieldProps, "className" | "style" | "children"> {
342
+ className?: string;
343
+ style?: React$1.CSSProperties;
344
+ size?: "xs" | "sm" | "md" | "lg";
345
+ appearance?: InputAppearance;
346
+ color?: Color;
347
+ children?: React$1.ReactNode;
348
+ }
349
+ declare function Radio({ size, className, style, appearance, color, children, ...props }: RadioProps): React$1.JSX.Element;
350
+ interface RadioGroupProps extends Omit<RadioGroupProps$1, "className" | "style" | "children">, StyleProps<"wrapper"> {
351
+ children?: React$1.ReactNode;
352
+ label?: React$1.ReactNode;
353
+ description?: React$1.ReactNode;
354
+ errorMessage?: React$1.ReactNode;
355
+ ref?: React$1.Ref<HTMLDivElement>;
356
+ }
357
+ declare function RadioGroup({ className, classNames, style, styles, label, description, errorMessage, children, ...props }: RadioGroupProps): React$1.JSX.Element;
358
+
359
+ interface RadioCardProps extends Omit<RadioFieldProps, "className" | "style" | "children">, StyleProps<"wrapper" | "content" | "title" | "description"> {
360
+ title?: React$1.ReactNode;
361
+ description?: React$1.ReactNode;
362
+ children?: React$1.ReactNode;
363
+ showIndicator?: boolean;
364
+ appearance?: InputAppearance;
365
+ color?: Color;
366
+ }
367
+ declare function RadioCard({ title, description, children, appearance, showIndicator, color, className, style, classNames, styles, ...props }: RadioCardProps): React$1.JSX.Element;
368
+
369
+ interface RadioItemProps extends Omit<RadioFieldProps, "className" | "style" | "children">, StyleProps<"wrapper"> {
370
+ children?: React$1.ReactNode;
371
+ className?: string;
372
+ style?: React$1.CSSProperties;
373
+ }
374
+ declare function RadioItem({ className, style, classNames, styles, children, ...props }: RadioItemProps): React$1.JSX.Element;
375
+
376
+ type SelectionMode = "single" | "multiple";
377
+ interface SelectProps<T extends object, M extends SelectionMode = "single"> extends Omit<SelectProps$1<T, M>, "className" | "style" | "children" | "isInvalid" | "selectedKey" | "defaultSelectedKey" | "selectedKeys" | "defaultSelectedKeys" | "onSelectionChange">, Pick<ListBoxProps<T>, "items" | "labelKey" | "valueKey" | "sectionKey" | "renderOption" | "renderSectionLabel" | "disabledKeys" | "children">, StyleProps<"wrapper" | "trigger" | "value" | "placeholder" | "label" | "popover"> {
378
+ label?: React$1.ReactNode;
379
+ description?: React$1.ReactNode;
380
+ error?: React$1.ReactNode;
381
+ color?: Color;
382
+ listBoxColor?: Color;
383
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
384
+ radius?: Radius;
385
+ appearance?: InputAppearance;
386
+ showSectionSeparator?: boolean;
387
+ showSelectionIndicator?: boolean;
388
+ renderValue?: (value: T) => React$1.ReactNode;
389
+ }
390
+ declare function Select<T extends object, M extends SelectionMode = "single">({ label, description, error, placeholder, appearance, renderValue, color, size, radius, listBoxColor, showSectionSeparator, showSelectionIndicator, items, children, labelKey, valueKey, sectionKey, renderOption, renderSectionLabel, disabledKeys, className, classNames, style, styles, "aria-label": ariaLabel, ...racProps }: SelectProps<T, M>): React$1.JSX.Element;
391
+
392
+ interface CalendarProps extends Omit<CalendarProps$1<DateValue>, "className" | "style" | "children" | "visibleDuration"> {
393
+ numberOfMonths?: number;
394
+ showMonthAndYearPickers?: boolean;
395
+ color?: Color;
396
+ radius?: Radius;
397
+ ref?: React$1.Ref<HTMLDivElement>;
398
+ }
399
+ declare function Calendar({ numberOfMonths, showMonthAndYearPickers, color, radius, ref, ...props }: CalendarProps): React$1.JSX.Element;
400
+
401
+ interface RangeCalendarProps extends Omit<RangeCalendarProps$1<DateValue>, "className" | "style" | "children" | "visibleDuration"> {
402
+ numberOfMonths?: number;
403
+ showMonthAndYearPickers?: boolean;
404
+ color?: Color;
405
+ radius?: Radius;
406
+ ref?: React$1.Ref<HTMLDivElement>;
407
+ }
408
+ declare function RangeCalendar({ numberOfMonths, showMonthAndYearPickers, color, radius, ref, ...props }: RangeCalendarProps): React$1.JSX.Element;
409
+
410
+ interface DateFieldProps extends Omit<DateFieldProps$1<DateValue>, "value" | "onChange" | "defaultValue" | "className" | "style" | "children">, FieldComponentProps<"input"> {
411
+ value?: string;
412
+ defaultValue?: string;
413
+ onChange?(value: string | null, dateObject?: DateValue | null): void;
414
+ ref?: React$1.Ref<HTMLDivElement>;
415
+ }
416
+ declare function DateField({ appearance, size, color, radius, value, defaultValue, onChange, label, description, error, validationStatus, prepend, append, className, classNames, style, styles, ref, ...props }: DateFieldProps): React$1.JSX.Element;
417
+
418
+ interface TimeFieldProps extends Omit<TimeFieldProps$1<TimeValue>, "value" | "onChange" | "defaultValue" | "className" | "style" | "children">, FieldComponentProps<"input"> {
419
+ value?: string;
420
+ defaultValue?: string;
421
+ onChange?(value: string | null, timeObject?: TimeValue | null): void;
422
+ ref?: React$1.Ref<HTMLDivElement>;
423
+ }
424
+ declare function TimeField({ appearance, size, color, radius, value, defaultValue, onChange, label, description, error, validationStatus, prepend, append, className, classNames, style, styles, ref, ...props }: TimeFieldProps): React$1.JSX.Element;
425
+
426
+ interface DatePickerProps extends Omit<DatePickerProps$1<DateValue>, "value" | "onChange" | "defaultValue" | "className" | "style" | "children">, FieldComponentProps<"input"> {
427
+ numberOfMonths?: number;
428
+ showMonthAndYearPickers?: boolean;
429
+ value?: string;
430
+ defaultValue?: string;
431
+ onChange?(value: string | null, dateObject?: DateValue | null): void;
432
+ selectorIcon?: React$1.ReactNode;
433
+ ref?: React$1.Ref<HTMLDivElement>;
434
+ }
435
+ declare function DatePicker({ appearance, size, color, numberOfMonths, showMonthAndYearPickers, radius, selectorIcon, value, defaultValue, onChange, label, description, error, validationStatus, className, classNames, style, styles, ref, ...props }: DatePickerProps): React$1.JSX.Element;
436
+
437
+ interface DateRangeStrings {
438
+ start: string;
439
+ end: string;
440
+ }
441
+ interface DateRangeValue {
442
+ start: DateValue;
443
+ end: DateValue;
444
+ }
445
+ interface DateRangePickerProps extends Omit<DateRangePickerProps$1<DateValue>, "value" | "onChange" | "defaultValue" | "className" | "style" | "children">, FieldComponentProps<"input"> {
446
+ numberOfMonths?: number;
447
+ showMonthAndYearPickers?: boolean;
448
+ value?: DateRangeStrings;
449
+ defaultValue?: DateRangeStrings;
450
+ onChange?(value: DateRangeStrings | null, range?: DateRangeValue | null): void;
451
+ dropdownIcon?: React$1.ReactNode;
452
+ ref?: React$1.Ref<HTMLDivElement>;
453
+ }
454
+ declare function DateRangePicker({ appearance, size, color, numberOfMonths, showMonthAndYearPickers, radius, dropdownIcon, value, defaultValue, onChange, label, description, error, validationStatus, className, classNames, style, styles, ref, ...props }: DateRangePickerProps): React$1.JSX.Element;
455
+
456
+ type AvatarSize = Size | "2xl" | "3xl";
457
+ interface AvatarProps extends React$1.ComponentPropsWithRef<"div">, StyleProps<"base" | "fallback" | "img"> {
458
+ src?: string;
459
+ alt?: string;
460
+ name?: string;
461
+ fallback?: React$1.ReactNode;
462
+ radius?: Radius;
463
+ color?: Color;
464
+ variant?: Variant;
465
+ size?: AvatarSize;
466
+ getInitials?: (name: string) => string;
467
+ }
468
+ declare function Avatar({ src, alt, name, color, variant, fallback, children, size, className, radius, classNames, styles, style, getInitials, ref, ...props }: AvatarProps): React$1.JSX.Element;
469
+ interface AvatarGroupProps extends StyleProps<"wrapper" | "overflow"> {
470
+ max?: number;
471
+ size?: AvatarSize;
472
+ color?: Color;
473
+ variant?: Variant;
474
+ children?: React$1.ReactNode;
475
+ }
476
+ declare function AvatarGroup({ max, size, color, variant, children, className, style, classNames, styles, }: AvatarGroupProps): React$1.JSX.Element;
477
+
478
+ type Upload = {
479
+ name: string;
480
+ url: string;
481
+ id: string;
482
+ file?: File;
483
+ status?: ActionStatus;
484
+ progress?: number;
485
+ };
486
+ interface FileUploaderProps extends StyleProps<"wrapper" | "dropzone" | "list"> {
487
+ onFileUpload?: (files: Array<Upload>) => void;
488
+ onRemoveFile?: () => void;
489
+ onStatusChange?: (status: ActionStatus) => void;
490
+ error?: React$1.ReactNode;
491
+ label?: React$1.ReactNode;
492
+ allowMultiple?: boolean;
493
+ uploads?: Array<Upload>;
494
+ hideFileList?: boolean;
495
+ color?: Color;
496
+ ref?: React$1.Ref<HTMLDivElement>;
497
+ }
498
+ declare function FileUploader({ onFileUpload, onRemoveFile, error, label, allowMultiple, uploads: controlledUploads, hideFileList, color, ref, classNames, styles, className, style, }: FileUploaderProps): React$1.JSX.Element;
499
+
500
+ interface SeparatorProps extends React$1.ComponentPropsWithRef<"div"> {
501
+ orientation?: "horizontal" | "vertical";
502
+ color?: Color;
503
+ opacity?: "faint" | "medium" | "strong";
504
+ }
505
+ declare function Separator({ orientation, className, color, opacity, ref, ...props }: SeparatorProps): React$1.JSX.Element;
506
+
507
+ interface ProgressProps extends Omit<ProgressBarProps, "className" | "style" | "children">, StyleProps<"wrapper" | "track" | "bar" | "label"> {
508
+ height?: number;
509
+ color?: Color;
510
+ label?: React$1.ReactNode;
511
+ ref?: React$1.Ref<HTMLDivElement>;
512
+ }
513
+ declare function Progress({ height, className, style, classNames, styles, color, label, ref, ...props }: ProgressProps): React$1.JSX.Element;
514
+
515
+ interface LoaderProps extends Omit<React$1.ComponentPropsWithRef<"div">, "color">, StyleProps<"wrapper" | "icon"> {
516
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
517
+ color?: Color;
518
+ label?: string;
519
+ }
520
+ declare function Loader({ color, className, classNames, style, styles, size, label, ref, ...props }: LoaderProps): React$1.JSX.Element;
521
+
522
+ type TagProps = Omit<React__default.ComponentPropsWithRef<"span">, "className" | "style"> & StyleProps<"wrapper"> & {
523
+ prepend?: React__default.ReactNode;
524
+ append?: React__default.ReactNode;
525
+ hashValue?: string;
526
+ color?: Color;
527
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
528
+ /**@deprecated use radius instead */
529
+ shape?: "pill" | "rounded" | "sharp";
530
+ radius?: BorderRadius;
531
+ variant?: ColorVariant;
532
+ };
533
+ declare function Tag({ prepend, append, children, hashValue, color, size, shape, variant, className, style, classNames, styles, radius, ref, ...props }: TagProps): React__default.JSX.Element;
534
+
535
+ interface SwitchProps extends Omit<SwitchFieldProps, "className" | "style" | "children">, StyleProps<"wrapper" | "thumb"> {
536
+ color?: Color;
537
+ size?: "sm" | "md" | "lg";
538
+ children?: React$1.ReactNode;
539
+ }
540
+ declare function Switch({ color, size, children, className, style, classNames, styles, ...props }: SwitchProps): React$1.JSX.Element;
541
+
542
+ type SliderProps = {
543
+ name?: string;
544
+ size?: SizeOption;
545
+ color?: Color;
546
+ label?: React$1.ReactNode;
547
+ } & StyleProps<"wrapper" | "track" | "fill" | "thumb" | "innerThumb" | "label"> & Omit<SliderProps$1, "className" | "style" | "children">;
548
+ declare function Slider({ className, classNames, style, styles, name, size, color, label, orientation, ...props }: SliderProps): React$1.JSX.Element;
549
+
550
+ interface StickerProps extends React__default.ComponentPropsWithRef<"div"> {
551
+ padded?: boolean;
552
+ color?: Color;
553
+ variant?: Variant;
554
+ radius?: Radius;
555
+ }
556
+ declare function Sticker({ variant, color, padded, radius, children, ref, className, style, ...props }: StickerProps): React__default.JSX.Element;
557
+
558
+ interface TabsProps extends Omit<TabsProps$1, "className" | "style" | "children">, StyleProps<"wrapper" | "list" | "tab" | "indicator" | "panel"> {
559
+ children?: React$1.ReactNode;
560
+ }
561
+ interface TabProps {
562
+ id?: Key;
563
+ title: React$1.ReactNode;
564
+ children?: React$1.ReactNode;
565
+ isDisabled?: boolean;
566
+ }
567
+ declare function Tab(_props: TabProps): null;
568
+ declare function Tabs({ className, style, classNames, styles, children, onSelectionChange, ...props }: TabsProps): React$1.JSX.Element;
569
+
570
+ interface TableColumn<T extends Dict<any> = object> {
571
+ title?: string;
572
+ dataIndex: keyof T;
573
+ key: ID;
574
+ render?(value: T[keyof T], item: T): React.ReactNode;
575
+ allowSorting?: boolean;
576
+ }
577
+
578
+ interface TableProps<T extends object> extends StyleProps<"wrapper" | "header" | "column" | "row" | "cell"> {
579
+ columns: Array<TableColumn<T>>;
580
+ data: Array<T>;
581
+ radius?: Radius;
582
+ getRowId?: (item: T) => string | number;
583
+ selectionMode?: "none" | "single" | "multiple";
584
+ selectedKeys?: Selection;
585
+ onSelectionChange?: (keys: Selection) => void;
586
+ onRowAction?: (key: string | number) => void;
587
+ sortDescriptor?: SortDescriptor;
588
+ onSortChange?: (descriptor: SortDescriptor) => void;
589
+ renderEmptyState?: () => React$1.ReactNode;
590
+ "aria-label"?: string;
591
+ }
592
+ declare function Table<T extends object>({ columns, data, getRowId, selectionMode, selectedKeys, onSelectionChange, onRowAction, sortDescriptor, onSortChange, renderEmptyState, radius, className, classNames, style, styles, ...props }: TableProps<T>): React$1.JSX.Element;
593
+
594
+ interface TimelineProps<T> extends StyleProps<"wrapper" | "item" | "content"> {
595
+ items: Array<T>;
596
+ render?(item: T): React__default.ReactNode;
597
+ labelKey?: keyof T;
598
+ getIndicator?(item: T): React__default.ReactNode;
599
+ hideLastItemTail?: boolean;
600
+ }
601
+ declare function Timeline<T>({ items, render, labelKey, getIndicator, hideLastItemTail, classNames, styles, className, style, }: TimelineProps<T>): React__default.JSX.Element;
602
+
603
+ interface ModalProps extends Omit<ModalOverlayProps, "children" | "className" | "style">, StyleProps<"wrapper" | "underlay" | "content" | "header" | "body" | "footer" | "title"> {
604
+ hideTitle?: boolean;
605
+ children?: React$1.ReactNode;
606
+ title?: React$1.ReactNode;
607
+ description?: React$1.ReactNode;
608
+ onConfirm?(): void;
609
+ onCancel?(): void;
610
+ confirmLabel?: string;
611
+ cancelLabel?: string;
612
+ confirmButtonProps?: React$1.ComponentProps<typeof Button>;
613
+ cancelButtonProps?: React$1.ComponentProps<typeof Button>;
614
+ width?: number | string;
615
+ variant?: "modal" | "drawer";
616
+ radius?: Radius;
617
+ showCloseButton?: boolean;
618
+ onClose?(): void;
619
+ }
620
+ declare function Modal({ variant, radius, isDismissable, width, title, description, onConfirm, onCancel, confirmLabel, cancelLabel, confirmButtonProps, cancelButtonProps, showCloseButton, hideTitle, onClose, children, className, style, classNames, styles, ...props }: ModalProps): React$1.JSX.Element;
621
+ declare function useModal(props?: OverlayTriggerProps): react_aria_components.OverlayTriggerState;
622
+
623
+ /**
624
+ * A modal component registered in the registry receives these three props from
625
+ * the provider. Extend it in your own modal components:
626
+ *
627
+ * interface EditUserModalProps extends BaseModalProps<User> { userId: string }
628
+ *
629
+ * Call `onResolve(result)` to close with a value; `onOpenChange(false)` dismisses
630
+ * (resolves with `undefined`). Resolve wins once — call `onResolve`, not
631
+ * `onOpenChange`, when you have a result.
632
+ */
633
+ interface BaseModalProps<TResult = void> extends Pick<ModalOverlayProps, "isOpen" | "onOpenChange"> {
634
+ onResolve: (result: TResult) => void;
635
+ }
636
+ type ModalComponent = React$1.ComponentType<any>;
637
+ type ModalDef<C extends ModalComponent = ModalComponent> = {
638
+ component: C;
639
+ };
640
+ interface ModalRegistry {
641
+ [key: string]: ModalDef;
642
+ }
643
+ /**
644
+ * Ambient registry — augment it (like ParrotColorRegistry) so `useModals().open`
645
+ * is fully typed with no generics at the call site:
646
+ *
647
+ * declare module "@parrot-co/parrot-ui" {
648
+ * interface ParrotModalRegistry {
649
+ * editUser: { component: typeof EditUserModal };
650
+ * }
651
+ * }
652
+ */
653
+ interface ParrotModalRegistry {
654
+ }
655
+ type ModalKey = keyof ParrotModalRegistry & string;
656
+ type ComponentOf<K extends ModalKey> = ParrotModalRegistry[K] extends ModalDef<infer C> ? C : ModalComponent;
657
+ type ModalInputProps<K extends ModalKey> = Omit<React$1.ComponentProps<ComponentOf<K>>, "isOpen" | "onOpenChange" | "onResolve">;
658
+ type ModalResult<K extends ModalKey> = React$1.ComponentProps<ComponentOf<K>> extends {
659
+ onResolve?: (result: infer TResult) => void;
660
+ } ? TResult : void;
661
+ interface ModalControls {
662
+ open: <K extends ModalKey>(key: K, props?: ModalInputProps<K>) => Promise<ModalResult<K>>;
663
+ close: (key: ModalKey) => void;
664
+ update: <K extends ModalKey>(key: K, props: ModalInputProps<K>) => void;
665
+ isOpen: (key: ModalKey) => boolean;
666
+ }
667
+
668
+ interface ModalProviderProps {
669
+ registry: ModalRegistry;
670
+ children: React$1.ReactNode;
671
+ }
672
+ declare function ModalProvider({ registry, children }: ModalProviderProps): React$1.JSX.Element;
673
+ declare function useModals(): ModalControls;
674
+
675
+ type TagFormat = "text" | "email" | "url" | "number";
676
+ interface TagInputProps extends FieldComponentProps<"input"> {
677
+ tags?: Array<string>;
678
+ defaultTags?: Array<string>;
679
+ placeholder?: string;
680
+ /** Built-in validation preset for committed values. Defaults to "text". */
681
+ format?: TagFormat;
682
+ /** Custom validator; overrides `format` when provided. */
683
+ validate?: (value: string) => boolean;
684
+ /** Characters that commit the current input into a tag. Defaults to [","]. */
685
+ delimiters?: Array<string>;
686
+ isRequired?: boolean;
687
+ onInputValueChange?(value: string): void;
688
+ onChange?(tags: Array<string>): void;
689
+ tagVariant?: React$1.ComponentProps<typeof Tag>["variant"];
690
+ tagColor?: React$1.ComponentProps<typeof Tag>["color"];
691
+ tagShape?: React$1.ComponentProps<typeof Tag>["shape"];
692
+ tagSize?: React$1.ComponentProps<typeof Tag>["size"];
693
+ renderTag?(value: string, onRemove: (value: string) => void): React$1.ReactNode;
694
+ ref?: React$1.Ref<HTMLDivElement>;
695
+ }
696
+ declare function TagInput({ appearance, size, label, error, description, placeholder, tags, defaultTags, format, validate, delimiters, isRequired, tagColor, tagVariant, tagShape, tagSize, color, radius, validationStatus, className, classNames, style, styles, onChange, onInputValueChange, renderTag, ref, }: TagInputProps): React$1.JSX.Element;
697
+
698
+ interface PopoverProps extends OverlayTriggerProps {
699
+ children?: React$1.ReactNode;
700
+ }
701
+ declare function Popover({ children, ...props }: PopoverProps): React$1.JSX.Element;
702
+ interface PopoverTriggerProps {
703
+ children: React$1.ReactElement;
704
+ }
705
+ declare function PopoverTrigger({ children }: PopoverTriggerProps): React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>>;
706
+ interface PopoverContentProps extends StyleProps<"popover" | "content">, Omit<PopoverProps$1, "triggerRef" | "children" | "className" | "style" | "isOpen" | "defaultOpen" | "onOpenChange"> {
707
+ children?: React$1.ReactNode;
708
+ width?: number;
709
+ }
710
+ declare function PopoverContent({ children, offset, placement, style, className, classNames, styles, width, ...props }: PopoverContentProps): React$1.JSX.Element;
711
+
712
+ interface TagVariantProps {
713
+ activeColor?: Color;
714
+ activeVariant?: Variant;
715
+ idleColor?: Color;
716
+ idleVariant?: Variant;
717
+ autoColor?: boolean;
718
+ }
719
+ interface TagGroupProps<T extends object> extends Omit<TagGroupProps$1, "className" | "style" | "children">, Pick<TagListProps<T>, "items" | "children" | "renderEmptyState">, TagVariantProps, StyleProps<"wrapper" | "list"> {
720
+ label?: React$1.ReactNode;
721
+ description?: React$1.ReactNode;
722
+ errorMessage?: React$1.ReactNode;
723
+ }
724
+ declare function TagGroup<T extends object>({ label, description, errorMessage, items, children, renderEmptyState, activeColor, activeVariant, idleColor, idleVariant, autoColor, classNames, styles, className, style, ...props }: TagGroupProps<T>): React$1.JSX.Element;
725
+ interface TagGroupItemProps extends Omit<TagProps$1, "className" | "children" | "render"> {
726
+ children?: React$1.ReactNode;
727
+ }
728
+ declare function TagGroupItem({ children, textValue, ...props }: TagGroupItemProps): React$1.JSX.Element;
729
+
730
+ interface ThemeProviderValue {
731
+ color?: Color;
732
+ radius?: Radius;
733
+ size?: ControlSize;
734
+ colorScheme?: Appearance;
735
+ inputAppearance?: InputAppearance;
736
+ }
737
+ interface ThemeProviderProps extends ThemeProviderValue {
738
+ children?: React$1.ReactNode;
739
+ className?: string;
740
+ }
741
+ declare function ThemeProvider(props: ThemeProviderProps): React$1.JSX.Element;
742
+ declare function useTheme(options?: {
743
+ requireThemeProvider: boolean;
744
+ }): ThemeProviderValue | null;
745
+
746
+ type ColorPickerProps = StyleProps<"wrapper" | "area" | "swatch" | "hue" | "alpha"> & {
747
+ onChange?: (color: Color$1) => void;
748
+ color?: Color$1;
749
+ };
750
+ declare function ColorPicker({ onChange, color: colorProp, styles, classNames, className, style, }: ColorPickerProps): React$1.JSX.Element;
751
+
752
+ type ColorAreaProps = Omit<ColorAreaProps$1, "className" | "style"> & StyleProps<"wrapper" | "thumb"> & {
753
+ size?: SizeOption;
754
+ radius?: BorderRadius;
755
+ };
756
+ declare function ColorArea({ className, classNames, style, styles, radius, ...props }: ColorAreaProps): React$1.JSX.Element;
757
+
758
+ type ColorFieldProps = Omit<ColorFieldProps$1, "className" | "style" | "children"> & FieldComponentProps<"input"> & {
759
+ placeholder?: string;
760
+ };
761
+ declare function ColorField({ className, classNames, style, styles, inputRef, wrapperRef, prepend, append, label, description, error, color, size, radius, appearance, validationStatus, shape, placeholder, ...colorFieldProps }: ColorFieldProps): React$1.JSX.Element;
762
+
763
+ interface ColorOption {
764
+ key?: string;
765
+ color: string;
766
+ label?: string;
767
+ }
768
+ type ColorSwatchPickerProps = Omit<ColorSwatchPickerProps$1, "className" | "style" | "children" | "onChange"> & StyleProps<"wrapper" | "swatch"> & {
769
+ colors: Array<ColorOption>;
770
+ onChange?: (color: Color$1) => void;
771
+ size?: SizeOption;
772
+ radius?: BorderRadius;
773
+ };
774
+ declare function ColorSwatchPicker({ colors, size, radius, onChange, className, classNames, style, styles, ...props }: ColorSwatchPickerProps): React$1.JSX.Element;
775
+
776
+ type ColorSliderProps = Omit<ColorSliderProps$1, "className" | "style" | "children"> & {
777
+ label?: React$1.ReactNode;
778
+ };
779
+ declare function ColorSlider({ label, ...props }: ColorSliderProps): React$1.JSX.Element;
780
+
781
+ declare function parseColor(color: string): react_aria_components.Color;
782
+
783
+ type Mode = "single" | "multiple";
784
+ type ValueType<M> = M extends "multiple" ? string[] : string;
785
+ interface ToggleGroupProps<M extends Mode> extends StyleProps<"wrapper">, ButtonToggleProps {
786
+ selectionMode?: M;
787
+ value?: ValueType<M>;
788
+ defaultValue?: ValueType<M>;
789
+ onChange?: (value: ValueType<M>) => void;
790
+ label?: string;
791
+ size?: ButtonSize;
792
+ radius?: BorderRadius;
793
+ disallowEmptySelection?: boolean;
794
+ orientation?: "horizontal" | "vertical";
795
+ children?: React$1.ReactNode;
796
+ compact?: boolean;
797
+ gap?: React$1.ComponentProps<typeof Space>["gap"];
798
+ }
799
+ declare function ToggleGroup<M extends Mode = "single">({ selectionMode, value, defaultValue, onChange, label, size, radius, idleColor, idleVariant, activeColor, activeVariant, disallowEmptySelection, orientation, compact, gap, className, classNames, style, styles, children, }: ToggleGroupProps<M>): React$1.JSX.Element;
800
+ interface ToggleProps extends ButtonToggleProps, StyleProps<"wrapper"> {
801
+ value: string;
802
+ children: React$1.ReactNode;
803
+ size?: ButtonSize;
804
+ radius?: BorderRadius;
805
+ isIconButton?: boolean;
806
+ }
807
+ declare function Toggle({ value, ...props }: ToggleProps): React$1.JSX.Element;
808
+
809
+ type ToastVariant = "default" | "success" | "error" | "warning" | "info";
810
+ type ToastPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
811
+ interface ToastAction {
812
+ label: string;
813
+ onClick: () => void;
814
+ }
815
+ interface ToastOptions {
816
+ description?: string;
817
+ action?: ToastAction;
818
+ cancel?: ToastAction;
819
+ duration?: number;
820
+ position?: ToastPosition;
821
+ }
822
+ type CustomToastRender = (props: {
823
+ close: () => void;
824
+ }) => React$1.ReactNode;
825
+ interface ToastRegionProps {
826
+ position?: ToastPosition;
827
+ }
828
+ declare function ToastRegion({ position }: ToastRegionProps): React$1.JSX.Element;
829
+ declare function toast(title: string, options?: ToastOptions): string;
830
+ declare namespace toast {
831
+ var success: (title: string, options?: ToastOptions) => string;
832
+ var error: (title: string, options?: ToastOptions) => string;
833
+ var warning: (title: string, options?: ToastOptions) => string;
834
+ var info: (title: string, options?: ToastOptions) => string;
835
+ var custom: (render: CustomToastRender, options?: Pick<ToastOptions, "duration" | "position">) => string;
836
+ var dismiss: (key: string) => void;
837
+ }
838
+
839
+ interface TooltipProps extends Omit<TooltipProps$1, "className" | "style" | "children">, StyleProps<"tooltip"> {
840
+ content: React$1.ReactNode;
841
+ children: React$1.ReactElement;
842
+ delay?: number;
843
+ closeDelay?: number;
844
+ isDisabled?: boolean;
845
+ showArrow?: boolean;
846
+ }
847
+ declare function Tooltip({ content, children, delay, closeDelay, isDisabled, showArrow, placement, offset, className, classNames, style, styles, ...props }: TooltipProps): React$1.JSX.Element;
848
+
849
+ interface HoverCardProps extends Omit<PopoverProps$1, "triggerRef" | "children" | "className" | "style" | "isOpen" | "defaultOpen" | "onOpenChange" | "isNonModal">, StyleProps<"popover" | "content"> {
850
+ children: React$1.ReactElement;
851
+ content: React$1.ReactNode;
852
+ openDelay?: number;
853
+ closeDelay?: number;
854
+ isDisabled?: boolean;
855
+ isOpen?: boolean;
856
+ defaultOpen?: boolean;
857
+ onOpenChange?: (isOpen: boolean) => void;
858
+ }
859
+ declare function HoverCard({ children, content, openDelay, closeDelay, isDisabled, isOpen, defaultOpen, onOpenChange, offset, placement, className, classNames, style, styles, ...props }: HoverCardProps): React$1.JSX.Element;
860
+
861
+ type FieldValidator<T> = (value: unknown, values: T) => string | null;
862
+ interface UseFormOptions<T extends Record<string, unknown>> {
863
+ fields: T;
864
+ validators?: Partial<Record<keyof T, FieldValidator<T>>>;
865
+ optional?: Array<keyof T>;
866
+ resetKey?: string | number | null;
867
+ }
868
+ type Errors<T> = Record<keyof T, string | null>;
869
+ type Touched<T> = Record<keyof T, boolean>;
870
+ interface UseFormReturn<T extends Record<string, unknown>> {
871
+ values: T;
872
+ errors: Errors<T>;
873
+ touched: Touched<T>;
874
+ isDirty: boolean;
875
+ isSubmitting: boolean;
876
+ setIsSubmitting: React$1.Dispatch<React$1.SetStateAction<boolean>>;
877
+ onChange: (fieldName: keyof T, value: unknown) => void;
878
+ getFieldProps: (fieldName: keyof T) => {
879
+ name: string;
880
+ value: string;
881
+ onChange: (value: string) => void;
882
+ error: string | null;
883
+ };
884
+ getNumberFieldProps: (fieldName: keyof T) => {
885
+ name: string;
886
+ value: number;
887
+ onChange: (value: number) => void;
888
+ error: string | null;
889
+ };
890
+ getSelectProps: (fieldName: keyof T) => {
891
+ name: string;
892
+ value: Key | null;
893
+ onChange: (value: Key | null) => void;
894
+ error: string | null;
895
+ };
896
+ getCheckboxGroupProps: (fieldName: keyof T) => {
897
+ name: string;
898
+ value: string[];
899
+ onChange: (value: string[]) => void;
900
+ errorMessage: string | null;
901
+ };
902
+ getRadioGroupProps: (fieldName: keyof T) => {
903
+ name: string;
904
+ value: string;
905
+ onChange: (value: string) => void;
906
+ errorMessage: string | null;
907
+ };
908
+ getSwitchProps: (fieldName: keyof T) => {
909
+ name: string;
910
+ isSelected: boolean;
911
+ onChange: (value: boolean) => void;
912
+ };
913
+ handleSubmit: (callback: (values: T) => void | Promise<void>) => (e: React$1.FormEvent) => void;
914
+ isValid: () => boolean;
915
+ reset: () => void;
916
+ validateAll: () => Errors<T>;
917
+ setFieldValues: (newValues: Partial<T>) => void;
918
+ setFieldError: (fieldName: keyof T, error: string | null) => void;
919
+ }
920
+ declare function useForm<T extends Record<string, unknown>>({ fields: defaultFields, validators, optional, resetKey, }: UseFormOptions<T>): UseFormReturn<T>;
921
+
922
+ declare function required<T>(message?: string): FieldValidator<T>;
923
+ declare function email<T>(message?: string): FieldValidator<T>;
924
+ declare function minLength<T>(length: number, message?: string): FieldValidator<T>;
925
+ declare function maxLength<T>(length: number, message?: string): FieldValidator<T>;
926
+ declare function min<T>(n: number, message?: string): FieldValidator<T>;
927
+ declare function max<T>(n: number, message?: string): FieldValidator<T>;
928
+ declare function pattern<T>(regex: RegExp, message?: string): FieldValidator<T>;
929
+ declare function matches<T>(fieldName: keyof T & string, message?: string): FieldValidator<T>;
930
+ declare function compose<T>(...fns: Array<FieldValidator<T>>): FieldValidator<T>;
931
+
932
+ export { Avatar, AvatarGroup, type BaseModalProps, Button, ButtonGroup, Calendar, Checkbox, CheckboxGroup, CheckboxItem, ColorArea, ColorField, ColorPicker, ColorSlider, ColorSwatchPicker, ComboBox, type CustomToastRender, DateField, DatePicker, DateRangePicker, type FieldValidator, FileUploader, HoverCard, type HoverCardProps, IconButton, Input, ListBox, ListBoxItem, ListBoxSection, Loader, Menu, MenuContent, MenuItem, MenuSection, MenuTrigger, Modal, type ModalControls, type ModalDef, type ModalInputProps, type ModalKey, type ModalProps, ModalProvider, type ModalProviderProps, type ModalRegistry, type ModalResult, NumberInput, ListBoxItem as Option, type ParrotModalRegistry, Popover, PopoverContent, PopoverTrigger, Progress, Radio, RadioCard, RadioGroup, RadioItem, RangeCalendar, ListBoxSection as Section, Select, Separator, Slider, Space, Sticker, Switch, Tab, Table, Tabs, Tag, TagGroup, TagGroupItem, TagInput, Text, Textarea, ThemeProvider, TimeField, Timeline, type ToastAction, type ToastOptions, type ToastPosition, ToastRegion, type ToastRegionProps, type ToastVariant, Toggle, ToggleButton, ToggleGroup, Tooltip, type TooltipProps, type UseFormOptions, type UseFormReturn, compose, email, matches, max, maxLength, min, minLength, parseColor, pattern, required, toast, useForm, useModal, useModals, useTheme };