@parrot-co/parrot-ui 0.1.31 → 1.0.0-beta.0
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/colors.css +571 -0
- package/dist/dark.css +606 -0
- package/dist/index.d.mts +773 -0
- package/dist/index.d.ts +773 -0
- package/dist/index.js +3936 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +3850 -0
- package/dist/index.mjs.map +1 -0
- package/dist/styles.css +2865 -0
- package/dist/theme.css +67 -0
- package/package.json +69 -59
- package/src/theme.css +67 -0
- package/dist/main.js +0 -4586
- package/dist/main.js.map +0 -1
- package/dist/module.js +0 -4517
- package/dist/module.js.map +0 -1
- package/dist/types.d.ts +0 -596
- package/dist/types.d.ts.map +0 -1
- package/styles.css +0 -1
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,773 @@
|
|
|
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, 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 } 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
|
+
/** The radius scale (`data-radius` recipe). */
|
|
74
|
+
type Radius = "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "full";
|
|
75
|
+
/** @deprecated use `Radius` */
|
|
76
|
+
type BorderRadius = "none" | "sm" | "md" | "lg" | "full";
|
|
77
|
+
type Appearance = "light" | "dark";
|
|
78
|
+
/** @deprecated use `Size` */
|
|
79
|
+
type ButtonSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
80
|
+
type ButtonAppearance = "primary" | "secondary" | "minimal";
|
|
81
|
+
type ButtonAppearanceSchemaType = Partial<Record<ButtonAppearance, {
|
|
82
|
+
variant: Variant;
|
|
83
|
+
color: Color;
|
|
84
|
+
}>>;
|
|
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 SingleOrMultipleValue = ID | Array<ID>;
|
|
377
|
+
type SelectionMode = "single" | "multiple";
|
|
378
|
+
interface MockNativeOnChangeEvent {
|
|
379
|
+
target: {
|
|
380
|
+
value: SingleOrMultipleValue;
|
|
381
|
+
name?: string;
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
interface SelectProps<T extends object> extends Pick<ListBoxProps<T>, "items" | "labelKey" | "valueKey" | "sectionKey" | "renderOption" | "renderSectionLabel" | "disabledKeys" | "children">, StyleProps<"wrapper" | "trigger" | "value" | "placeholder" | "label" | "popover"> {
|
|
385
|
+
label?: React$1.ReactNode;
|
|
386
|
+
description?: React$1.ReactNode;
|
|
387
|
+
error?: React$1.ReactNode;
|
|
388
|
+
placeholder?: string;
|
|
389
|
+
selectionMode?: SelectionMode;
|
|
390
|
+
value?: SingleOrMultipleValue;
|
|
391
|
+
defaultValue?: SingleOrMultipleValue;
|
|
392
|
+
name?: string;
|
|
393
|
+
isDisabled?: boolean;
|
|
394
|
+
isRequired?: boolean;
|
|
395
|
+
color?: Color;
|
|
396
|
+
listBoxColor?: Color;
|
|
397
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
398
|
+
radius?: BorderRadius;
|
|
399
|
+
appearance?: InputAppearance;
|
|
400
|
+
showSectionSeparator?: boolean;
|
|
401
|
+
showSelectionIndicator?: boolean;
|
|
402
|
+
renderValue?: (value: T) => React$1.ReactNode;
|
|
403
|
+
onChange?: (event: MockNativeOnChangeEvent) => void;
|
|
404
|
+
onSelectionChange?: (keys: Array<ID>) => void;
|
|
405
|
+
}
|
|
406
|
+
declare function Select<T extends object>({ label, description, error, placeholder, selectionMode, appearance, renderValue, color, size, radius, listBoxColor, name, value, defaultValue, isDisabled, isRequired, disabledKeys, onChange, onSelectionChange, showSectionSeparator, showSelectionIndicator, items, children, labelKey, valueKey, sectionKey, renderOption, renderSectionLabel, className, classNames, style, styles, }: SelectProps<T>): React$1.JSX.Element;
|
|
407
|
+
|
|
408
|
+
interface CalendarProps extends Omit<CalendarProps$1<DateValue>, "className" | "style" | "children" | "visibleDuration"> {
|
|
409
|
+
numberOfMonths?: number;
|
|
410
|
+
showMonthAndYearPickers?: boolean;
|
|
411
|
+
color?: Color;
|
|
412
|
+
radius?: Radius;
|
|
413
|
+
ref?: React$1.Ref<HTMLDivElement>;
|
|
414
|
+
}
|
|
415
|
+
declare function Calendar({ numberOfMonths, showMonthAndYearPickers, color, radius, ref, ...props }: CalendarProps): React$1.JSX.Element;
|
|
416
|
+
|
|
417
|
+
interface RangeCalendarProps extends Omit<RangeCalendarProps$1<DateValue>, "className" | "style" | "children" | "visibleDuration"> {
|
|
418
|
+
numberOfMonths?: number;
|
|
419
|
+
showMonthAndYearPickers?: boolean;
|
|
420
|
+
color?: Color;
|
|
421
|
+
radius?: Radius;
|
|
422
|
+
ref?: React$1.Ref<HTMLDivElement>;
|
|
423
|
+
}
|
|
424
|
+
declare function RangeCalendar({ numberOfMonths, showMonthAndYearPickers, color, radius, ref, ...props }: RangeCalendarProps): React$1.JSX.Element;
|
|
425
|
+
|
|
426
|
+
interface DateFieldProps extends Omit<DateFieldProps$1<DateValue>, "value" | "onChange" | "defaultValue" | "className" | "style" | "children">, FieldComponentProps<"input"> {
|
|
427
|
+
value?: string;
|
|
428
|
+
defaultValue?: string;
|
|
429
|
+
onChange?(value: string | null, dateObject?: DateValue | null): void;
|
|
430
|
+
ref?: React$1.Ref<HTMLDivElement>;
|
|
431
|
+
}
|
|
432
|
+
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;
|
|
433
|
+
|
|
434
|
+
interface TimeFieldProps extends Omit<TimeFieldProps$1<TimeValue>, "value" | "onChange" | "defaultValue" | "className" | "style" | "children">, FieldComponentProps<"input"> {
|
|
435
|
+
value?: string;
|
|
436
|
+
defaultValue?: string;
|
|
437
|
+
onChange?(value: string | null, timeObject?: TimeValue | null): void;
|
|
438
|
+
ref?: React$1.Ref<HTMLDivElement>;
|
|
439
|
+
}
|
|
440
|
+
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;
|
|
441
|
+
|
|
442
|
+
interface DatePickerProps extends Omit<DatePickerProps$1<DateValue>, "value" | "onChange" | "defaultValue" | "className" | "style" | "children">, FieldComponentProps<"input"> {
|
|
443
|
+
numberOfMonths?: number;
|
|
444
|
+
showMonthAndYearPickers?: boolean;
|
|
445
|
+
value?: string;
|
|
446
|
+
defaultValue?: string;
|
|
447
|
+
onChange?(value: string | null, dateObject?: DateValue | null): void;
|
|
448
|
+
selectorIcon?: React$1.ReactNode;
|
|
449
|
+
ref?: React$1.Ref<HTMLDivElement>;
|
|
450
|
+
}
|
|
451
|
+
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;
|
|
452
|
+
|
|
453
|
+
interface DateRangeStrings {
|
|
454
|
+
start: string;
|
|
455
|
+
end: string;
|
|
456
|
+
}
|
|
457
|
+
interface DateRangeValue {
|
|
458
|
+
start: DateValue;
|
|
459
|
+
end: DateValue;
|
|
460
|
+
}
|
|
461
|
+
interface DateRangePickerProps extends Omit<DateRangePickerProps$1<DateValue>, "value" | "onChange" | "defaultValue" | "className" | "style" | "children">, FieldComponentProps<"input"> {
|
|
462
|
+
numberOfMonths?: number;
|
|
463
|
+
showMonthAndYearPickers?: boolean;
|
|
464
|
+
value?: DateRangeStrings;
|
|
465
|
+
defaultValue?: DateRangeStrings;
|
|
466
|
+
onChange?(value: DateRangeStrings | null, range?: DateRangeValue | null): void;
|
|
467
|
+
dropdownIcon?: React$1.ReactNode;
|
|
468
|
+
ref?: React$1.Ref<HTMLDivElement>;
|
|
469
|
+
}
|
|
470
|
+
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;
|
|
471
|
+
|
|
472
|
+
type AvatarSize = Size | "2xl" | "3xl";
|
|
473
|
+
interface AvatarProps extends React$1.ComponentPropsWithRef<"div">, StyleProps<"base" | "fallback" | "img"> {
|
|
474
|
+
src?: string;
|
|
475
|
+
alt?: string;
|
|
476
|
+
name?: string;
|
|
477
|
+
fallback?: React$1.ReactNode;
|
|
478
|
+
radius?: Radius;
|
|
479
|
+
color?: Color;
|
|
480
|
+
variant?: Variant;
|
|
481
|
+
size?: AvatarSize;
|
|
482
|
+
getInitials?: (name: string) => string;
|
|
483
|
+
}
|
|
484
|
+
declare function Avatar({ src, alt, name, color, variant, fallback, children, size, className, radius, classNames, styles, style, getInitials, ref, ...props }: AvatarProps): React$1.JSX.Element;
|
|
485
|
+
interface AvatarGroupProps extends StyleProps<"wrapper" | "overflow"> {
|
|
486
|
+
max?: number;
|
|
487
|
+
size?: AvatarSize;
|
|
488
|
+
color?: Color;
|
|
489
|
+
variant?: Variant;
|
|
490
|
+
children?: React$1.ReactNode;
|
|
491
|
+
}
|
|
492
|
+
declare function AvatarGroup({ max, size, color, variant, children, className, style, classNames, styles, }: AvatarGroupProps): React$1.JSX.Element;
|
|
493
|
+
|
|
494
|
+
type Upload = {
|
|
495
|
+
name: string;
|
|
496
|
+
url: string;
|
|
497
|
+
id: string;
|
|
498
|
+
file?: File;
|
|
499
|
+
status?: ActionStatus;
|
|
500
|
+
progress?: number;
|
|
501
|
+
};
|
|
502
|
+
interface FileUploaderProps extends StyleProps<"wrapper" | "dropzone" | "list"> {
|
|
503
|
+
onFileUpload?: (files: Array<Upload>) => void;
|
|
504
|
+
onRemoveFile?: () => void;
|
|
505
|
+
onStatusChange?: (status: ActionStatus) => void;
|
|
506
|
+
error?: React$1.ReactNode;
|
|
507
|
+
label?: React$1.ReactNode;
|
|
508
|
+
allowMultiple?: boolean;
|
|
509
|
+
uploads?: Array<Upload>;
|
|
510
|
+
hideFileList?: boolean;
|
|
511
|
+
color?: Color;
|
|
512
|
+
ref?: React$1.Ref<HTMLDivElement>;
|
|
513
|
+
}
|
|
514
|
+
declare function FileUploader({ onFileUpload, onRemoveFile, error, label, allowMultiple, uploads: controlledUploads, hideFileList, color, ref, classNames, styles, className, style, }: FileUploaderProps): React$1.JSX.Element;
|
|
515
|
+
|
|
516
|
+
interface SeparatorProps extends React$1.ComponentPropsWithRef<"div"> {
|
|
517
|
+
orientation?: "horizontal" | "vertical";
|
|
518
|
+
color?: Color;
|
|
519
|
+
opacity?: "faint" | "medium" | "strong";
|
|
520
|
+
}
|
|
521
|
+
declare function Separator({ orientation, className, color, opacity, ref, ...props }: SeparatorProps): React$1.JSX.Element;
|
|
522
|
+
|
|
523
|
+
interface ProgressProps extends Omit<ProgressBarProps, "className" | "style" | "children">, StyleProps<"wrapper" | "track" | "bar" | "label"> {
|
|
524
|
+
height?: number;
|
|
525
|
+
color?: Color;
|
|
526
|
+
label?: React$1.ReactNode;
|
|
527
|
+
ref?: React$1.Ref<HTMLDivElement>;
|
|
528
|
+
}
|
|
529
|
+
declare function Progress({ height, className, style, classNames, styles, color, label, ref, ...props }: ProgressProps): React$1.JSX.Element;
|
|
530
|
+
|
|
531
|
+
interface LoaderProps extends Omit<React$1.ComponentPropsWithRef<"div">, "color">, StyleProps<"wrapper" | "icon"> {
|
|
532
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
|
|
533
|
+
color?: Color;
|
|
534
|
+
label?: string;
|
|
535
|
+
}
|
|
536
|
+
declare function Loader({ color, className, classNames, style, styles, size, label, ref, ...props }: LoaderProps): React$1.JSX.Element;
|
|
537
|
+
|
|
538
|
+
type TagProps = Omit<React__default.ComponentPropsWithRef<"span">, "className" | "style"> & StyleProps<"wrapper"> & {
|
|
539
|
+
prepend?: React__default.ReactNode;
|
|
540
|
+
append?: React__default.ReactNode;
|
|
541
|
+
hashValue?: string;
|
|
542
|
+
color?: Color;
|
|
543
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
544
|
+
/**@deprecated use radius instead */
|
|
545
|
+
shape?: "pill" | "rounded" | "sharp";
|
|
546
|
+
radius?: BorderRadius;
|
|
547
|
+
variant?: ColorVariant;
|
|
548
|
+
};
|
|
549
|
+
declare function Tag({ prepend, append, children, hashValue, color, size, shape, variant, className, style, classNames, styles, radius, ref, ...props }: TagProps): React__default.JSX.Element;
|
|
550
|
+
|
|
551
|
+
interface SwitchProps extends Omit<SwitchFieldProps, "className" | "style" | "children">, StyleProps<"wrapper" | "thumb"> {
|
|
552
|
+
color?: Color;
|
|
553
|
+
size?: "sm" | "md" | "lg";
|
|
554
|
+
children?: React$1.ReactNode;
|
|
555
|
+
}
|
|
556
|
+
declare function Switch({ color, size, children, className, style, classNames, styles, ...props }: SwitchProps): React$1.JSX.Element;
|
|
557
|
+
|
|
558
|
+
type SliderProps = {
|
|
559
|
+
name?: string;
|
|
560
|
+
size?: SizeOption;
|
|
561
|
+
color?: Color;
|
|
562
|
+
label?: React$1.ReactNode;
|
|
563
|
+
} & StyleProps<"wrapper" | "track" | "fill" | "thumb" | "innerThumb" | "label"> & Omit<SliderProps$1, "className" | "style" | "children">;
|
|
564
|
+
declare function Slider({ className, classNames, style, styles, name, size, color, label, orientation, ...props }: SliderProps): React$1.JSX.Element;
|
|
565
|
+
|
|
566
|
+
interface StickerProps extends React__default.ComponentPropsWithRef<"div"> {
|
|
567
|
+
padded?: boolean;
|
|
568
|
+
color?: Color;
|
|
569
|
+
variant?: Variant;
|
|
570
|
+
radius?: Radius;
|
|
571
|
+
}
|
|
572
|
+
declare function Sticker({ variant, color, padded, radius, children, ref, className, style, ...props }: StickerProps): React__default.JSX.Element;
|
|
573
|
+
|
|
574
|
+
interface TabsProps extends Omit<TabsProps$1, "className" | "style" | "children">, StyleProps<"wrapper" | "list" | "tab" | "indicator" | "panel"> {
|
|
575
|
+
children?: React$1.ReactNode;
|
|
576
|
+
}
|
|
577
|
+
interface TabProps {
|
|
578
|
+
id?: Key;
|
|
579
|
+
title: React$1.ReactNode;
|
|
580
|
+
children?: React$1.ReactNode;
|
|
581
|
+
isDisabled?: boolean;
|
|
582
|
+
}
|
|
583
|
+
declare function Tab(_props: TabProps): null;
|
|
584
|
+
declare function Tabs({ className, style, classNames, styles, children, onSelectionChange, ...props }: TabsProps): React$1.JSX.Element;
|
|
585
|
+
|
|
586
|
+
interface TableColumn<T extends Dict<any> = object> {
|
|
587
|
+
title?: string;
|
|
588
|
+
dataIndex: keyof T;
|
|
589
|
+
key: ID;
|
|
590
|
+
render?(value: T[keyof T], item: T): React.ReactNode;
|
|
591
|
+
allowSorting?: boolean;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
interface TableProps<T extends object> extends StyleProps<"wrapper" | "header" | "column" | "row" | "cell"> {
|
|
595
|
+
columns: Array<TableColumn<T>>;
|
|
596
|
+
data: Array<T>;
|
|
597
|
+
radius?: Radius;
|
|
598
|
+
getRowId?: (item: T) => string | number;
|
|
599
|
+
selectionMode?: "none" | "single" | "multiple";
|
|
600
|
+
selectedKeys?: Selection;
|
|
601
|
+
onSelectionChange?: (keys: Selection) => void;
|
|
602
|
+
sortDescriptor?: SortDescriptor;
|
|
603
|
+
onSortChange?: (descriptor: SortDescriptor) => void;
|
|
604
|
+
renderEmptyState?: () => React$1.ReactNode;
|
|
605
|
+
"aria-label"?: string;
|
|
606
|
+
}
|
|
607
|
+
declare function Table<T extends object>({ columns, data, getRowId, selectionMode, selectedKeys, onSelectionChange, sortDescriptor, onSortChange, renderEmptyState, radius, className, classNames, style, styles, ...props }: TableProps<T>): React$1.JSX.Element;
|
|
608
|
+
|
|
609
|
+
interface TimelineProps<T> extends StyleProps<"wrapper" | "item" | "content"> {
|
|
610
|
+
items: Array<T>;
|
|
611
|
+
render?(item: T): React__default.ReactNode;
|
|
612
|
+
labelKey?: keyof T;
|
|
613
|
+
getIndicator?(item: T): React__default.ReactNode;
|
|
614
|
+
hideLastItemTail?: boolean;
|
|
615
|
+
}
|
|
616
|
+
declare function Timeline<T>({ items, render, labelKey, getIndicator, hideLastItemTail, classNames, styles, className, style, }: TimelineProps<T>): React__default.JSX.Element;
|
|
617
|
+
|
|
618
|
+
interface ModalProps extends Omit<ModalOverlayProps, "children" | "className" | "style">, StyleProps<"wrapper" | "underlay" | "content" | "header" | "body" | "footer" | "title"> {
|
|
619
|
+
hideTitle?: boolean;
|
|
620
|
+
children?: React$1.ReactNode;
|
|
621
|
+
title?: React$1.ReactNode;
|
|
622
|
+
description?: React$1.ReactNode;
|
|
623
|
+
onConfirm?(): void;
|
|
624
|
+
onCancel?(): void;
|
|
625
|
+
confirmLabel?: string;
|
|
626
|
+
cancelLabel?: string;
|
|
627
|
+
confirmButtonProps?: React$1.ComponentProps<typeof Button>;
|
|
628
|
+
cancelButtonProps?: React$1.ComponentProps<typeof Button>;
|
|
629
|
+
width?: number | string;
|
|
630
|
+
variant?: "modal" | "drawer";
|
|
631
|
+
radius?: Radius;
|
|
632
|
+
showCloseButton?: boolean;
|
|
633
|
+
onClose?(): void;
|
|
634
|
+
}
|
|
635
|
+
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;
|
|
636
|
+
declare function useModal(props?: OverlayTriggerProps): react_aria_components.OverlayTriggerState;
|
|
637
|
+
|
|
638
|
+
type TagFormat = "text" | "email" | "url" | "number";
|
|
639
|
+
interface TagInputProps extends FieldComponentProps<"input"> {
|
|
640
|
+
tags?: Array<string>;
|
|
641
|
+
defaultTags?: Array<string>;
|
|
642
|
+
placeholder?: string;
|
|
643
|
+
/** Built-in validation preset for committed values. Defaults to "text". */
|
|
644
|
+
format?: TagFormat;
|
|
645
|
+
/** Custom validator; overrides `format` when provided. */
|
|
646
|
+
validate?: (value: string) => boolean;
|
|
647
|
+
/** Characters that commit the current input into a tag. Defaults to [","]. */
|
|
648
|
+
delimiters?: Array<string>;
|
|
649
|
+
isRequired?: boolean;
|
|
650
|
+
onInputValueChange?(value: string): void;
|
|
651
|
+
onChange?(tags: Array<string>): void;
|
|
652
|
+
tagVariant?: React$1.ComponentProps<typeof Tag>["variant"];
|
|
653
|
+
tagColor?: React$1.ComponentProps<typeof Tag>["color"];
|
|
654
|
+
tagShape?: React$1.ComponentProps<typeof Tag>["shape"];
|
|
655
|
+
tagSize?: React$1.ComponentProps<typeof Tag>["size"];
|
|
656
|
+
renderTag?(value: string, onRemove: (value: string) => void): React$1.ReactNode;
|
|
657
|
+
ref?: React$1.Ref<HTMLDivElement>;
|
|
658
|
+
}
|
|
659
|
+
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;
|
|
660
|
+
|
|
661
|
+
interface PopoverProps extends OverlayTriggerProps {
|
|
662
|
+
children?: React$1.ReactNode;
|
|
663
|
+
}
|
|
664
|
+
declare function Popover({ children, ...props }: PopoverProps): React$1.JSX.Element;
|
|
665
|
+
interface PopoverTriggerProps {
|
|
666
|
+
children: React$1.ReactElement;
|
|
667
|
+
}
|
|
668
|
+
declare function PopoverTrigger({ children }: PopoverTriggerProps): React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>>;
|
|
669
|
+
interface PopoverContentProps extends StyleProps<"popover" | "content">, Omit<PopoverProps$1, "triggerRef" | "children" | "className" | "style" | "isOpen" | "defaultOpen" | "onOpenChange"> {
|
|
670
|
+
children?: React$1.ReactNode;
|
|
671
|
+
width?: number;
|
|
672
|
+
}
|
|
673
|
+
declare function PopoverContent({ children, offset, placement, style, className, classNames, styles, width, ...props }: PopoverContentProps): React$1.JSX.Element;
|
|
674
|
+
|
|
675
|
+
interface TagVariantProps {
|
|
676
|
+
activeColor?: Color;
|
|
677
|
+
activeVariant?: Variant;
|
|
678
|
+
idleColor?: Color;
|
|
679
|
+
idleVariant?: Variant;
|
|
680
|
+
autoColor?: boolean;
|
|
681
|
+
}
|
|
682
|
+
interface TagGroupProps<T extends object> extends Omit<TagGroupProps$1, "className" | "style" | "children">, Pick<TagListProps<T>, "items" | "children" | "renderEmptyState">, TagVariantProps, StyleProps<"wrapper" | "list"> {
|
|
683
|
+
label?: React$1.ReactNode;
|
|
684
|
+
description?: React$1.ReactNode;
|
|
685
|
+
errorMessage?: React$1.ReactNode;
|
|
686
|
+
}
|
|
687
|
+
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;
|
|
688
|
+
interface TagGroupItemProps extends Omit<TagProps$1, "className" | "children" | "render"> {
|
|
689
|
+
children?: React$1.ReactNode;
|
|
690
|
+
}
|
|
691
|
+
declare function TagGroupItem({ children, textValue, ...props }: TagGroupItemProps): React$1.JSX.Element;
|
|
692
|
+
|
|
693
|
+
interface ThemeProviderValue {
|
|
694
|
+
color?: Color;
|
|
695
|
+
radius?: BorderRadius;
|
|
696
|
+
appearance?: Appearance;
|
|
697
|
+
buttonAppearance?: ButtonAppearanceSchemaType;
|
|
698
|
+
avatarRadiusSize?: BorderRadius;
|
|
699
|
+
inputAppearance?: InputAppearance;
|
|
700
|
+
}
|
|
701
|
+
interface ThemeProviderProps extends ThemeProviderValue {
|
|
702
|
+
children?: React$1.ReactNode;
|
|
703
|
+
className?: string;
|
|
704
|
+
}
|
|
705
|
+
declare function ThemeProvider(props: ThemeProviderProps): React$1.JSX.Element;
|
|
706
|
+
declare function useTheme(options?: {
|
|
707
|
+
requireThemeProvider: boolean;
|
|
708
|
+
}): ThemeProviderValue | null;
|
|
709
|
+
|
|
710
|
+
type ColorPickerProps = StyleProps<"wrapper" | "area" | "swatch" | "hue" | "alpha"> & {
|
|
711
|
+
onChange?: (color: Color$1) => void;
|
|
712
|
+
color?: Color$1;
|
|
713
|
+
};
|
|
714
|
+
declare function ColorPicker({ onChange, color: colorProp, styles, classNames, className, style, }: ColorPickerProps): React$1.JSX.Element;
|
|
715
|
+
|
|
716
|
+
type ColorAreaProps = Omit<ColorAreaProps$1, "className" | "style"> & StyleProps<"wrapper" | "thumb"> & {
|
|
717
|
+
size?: SizeOption;
|
|
718
|
+
radius?: BorderRadius;
|
|
719
|
+
};
|
|
720
|
+
declare function ColorArea({ className, classNames, style, styles, radius, ...props }: ColorAreaProps): React$1.JSX.Element;
|
|
721
|
+
|
|
722
|
+
type ColorFieldProps = Omit<ColorFieldProps$1, "className" | "style" | "children"> & FieldComponentProps<"input"> & {
|
|
723
|
+
placeholder?: string;
|
|
724
|
+
};
|
|
725
|
+
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;
|
|
726
|
+
|
|
727
|
+
interface ColorOption {
|
|
728
|
+
key?: string;
|
|
729
|
+
color: string;
|
|
730
|
+
label?: string;
|
|
731
|
+
}
|
|
732
|
+
type ColorSwatchPickerProps = Omit<ColorSwatchPickerProps$1, "className" | "style" | "children" | "onChange"> & StyleProps<"wrapper" | "swatch"> & {
|
|
733
|
+
colors: Array<ColorOption>;
|
|
734
|
+
onChange?: (color: Color$1) => void;
|
|
735
|
+
size?: SizeOption;
|
|
736
|
+
radius?: BorderRadius;
|
|
737
|
+
};
|
|
738
|
+
declare function ColorSwatchPicker({ colors, size, radius, onChange, className, classNames, style, styles, ...props }: ColorSwatchPickerProps): React$1.JSX.Element;
|
|
739
|
+
|
|
740
|
+
type ColorSliderProps = Omit<ColorSliderProps$1, "className" | "style" | "children"> & {
|
|
741
|
+
label?: React$1.ReactNode;
|
|
742
|
+
};
|
|
743
|
+
declare function ColorSlider({ label, ...props }: ColorSliderProps): React$1.JSX.Element;
|
|
744
|
+
|
|
745
|
+
declare function parseColor(color: string): react_aria_components.Color;
|
|
746
|
+
|
|
747
|
+
type Mode = "single" | "multiple";
|
|
748
|
+
type ValueType<M> = M extends "multiple" ? string[] : string;
|
|
749
|
+
interface ToggleGroupProps<M extends Mode> extends StyleProps<"wrapper">, ButtonToggleProps {
|
|
750
|
+
selectionMode?: M;
|
|
751
|
+
value?: ValueType<M>;
|
|
752
|
+
defaultValue?: ValueType<M>;
|
|
753
|
+
onChange?: (value: ValueType<M>) => void;
|
|
754
|
+
label?: string;
|
|
755
|
+
size?: ButtonSize;
|
|
756
|
+
radius?: BorderRadius;
|
|
757
|
+
disallowEmptySelection?: boolean;
|
|
758
|
+
orientation?: "horizontal" | "vertical";
|
|
759
|
+
children?: React$1.ReactNode;
|
|
760
|
+
compact?: boolean;
|
|
761
|
+
gap?: React$1.ComponentProps<typeof Space>["gap"];
|
|
762
|
+
}
|
|
763
|
+
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;
|
|
764
|
+
interface ToggleProps extends ButtonToggleProps, StyleProps<"wrapper"> {
|
|
765
|
+
value: string;
|
|
766
|
+
children: React$1.ReactNode;
|
|
767
|
+
size?: ButtonSize;
|
|
768
|
+
radius?: BorderRadius;
|
|
769
|
+
isIconButton?: boolean;
|
|
770
|
+
}
|
|
771
|
+
declare function Toggle({ value, ...props }: ToggleProps): React$1.JSX.Element;
|
|
772
|
+
|
|
773
|
+
export { Avatar, AvatarGroup, Button, ButtonGroup, Calendar, Checkbox, CheckboxGroup, CheckboxItem, ColorArea, ColorField, ColorPicker, ColorSlider, ColorSwatchPicker, ComboBox, DateField, DatePicker, DateRangePicker, FileUploader, IconButton, Input, ListBox, ListBoxItem, ListBoxSection, Loader, Menu, MenuContent, MenuItem, MenuSection, MenuTrigger, Modal, type ModalProps, NumberInput, ListBoxItem as Option, 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, Toggle, ToggleButton, ToggleGroup, parseColor, useModal, useTheme };
|