@flood-md/react 0.2.6 → 0.2.8
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/README.md +42 -1
- package/dist/alert-dialog.js +1 -1
- package/dist/calendar-period-grid.d.ts +17 -0
- package/dist/calendar-period-grid.js +13 -0
- package/dist/calendar-value.d.ts +10 -0
- package/dist/calendar-value.js +48 -0
- package/dist/calendar.d.ts +21 -0
- package/dist/calendar.js +259 -0
- package/dist/checkbox.js +1 -1
- package/dist/choice-group.js +1 -1
- package/dist/collection-cards.d.ts +4 -0
- package/dist/collection-cards.js +21 -0
- package/dist/color-controls.d.ts +5 -0
- package/dist/color-controls.js +110 -0
- package/dist/combobox.js +22 -13
- package/dist/command-list.d.ts +3 -0
- package/dist/command-list.js +93 -0
- package/dist/content-elements.js +7 -7
- package/dist/context-menu.d.ts +2 -0
- package/dist/context-menu.js +76 -0
- package/dist/data-display.js +2 -2
- package/dist/data-table.d.ts +2 -0
- package/dist/data-table.js +58 -0
- package/dist/date-field.d.ts +2 -0
- package/dist/date-field.js +172 -0
- package/dist/date-picker.d.ts +3 -0
- package/dist/date-picker.js +108 -0
- package/dist/date-range-field.d.ts +3 -0
- package/dist/date-range-field.js +84 -0
- package/dist/date-range-picker.d.ts +2 -0
- package/dist/date-range-picker.js +81 -0
- package/dist/date-range-value.d.ts +8 -0
- package/dist/date-range-value.js +13 -0
- package/dist/date-time-picker.d.ts +3 -0
- package/dist/date-time-picker.js +31 -0
- package/dist/date-time-range-picker.d.ts +2 -0
- package/dist/date-time-range-picker.js +51 -0
- package/dist/date-value.d.ts +10 -0
- package/dist/date-value.js +31 -0
- package/dist/disclosure.js +1 -1
- package/dist/editable.d.ts +3 -0
- package/dist/editable.js +135 -0
- package/dist/error-summary.d.ts +3 -0
- package/dist/error-summary.js +39 -0
- package/dist/feedback-actions.js +2 -2
- package/dist/feedback.js +2 -2
- package/dist/file-input.js +1 -1
- package/dist/file-records.d.ts +5 -0
- package/dist/file-records.js +55 -0
- package/dist/form-controls.js +25 -13
- package/dist/foundations.css +387 -1
- package/dist/hover-card.d.ts +3 -0
- package/dist/hover-card.js +144 -0
- package/dist/index.d.ts +661 -2
- package/dist/index.js +190 -86
- package/dist/menu.d.ts +27 -1
- package/dist/menu.js +327 -89
- package/dist/navigation-layout.js +6 -6
- package/dist/navigation-tree.d.ts +3 -0
- package/dist/navigation-tree.js +98 -0
- package/dist/navigation.js +3 -3
- package/dist/numeric-input.js +1 -1
- package/dist/overlays.js +11 -10
- package/dist/range-calendar.d.ts +2 -0
- package/dist/range-calendar.js +35 -0
- package/dist/resizable-panels.d.ts +3 -0
- package/dist/resizable-panels.js +205 -0
- package/dist/scroll-area.js +1 -1
- package/dist/select.js +1 -1
- package/dist/slider.js +1 -1
- package/dist/tag-input.d.ts +3 -0
- package/dist/tag-input.js +181 -0
- package/dist/text-inputs.js +2 -2
- package/dist/time-field.d.ts +2 -0
- package/dist/time-field.js +176 -0
- package/dist/time-picker.d.ts +2 -0
- package/dist/time-picker.js +83 -0
- package/dist/time-value.d.ts +12 -0
- package/dist/time-value.js +36 -0
- package/dist/toolbar.js +1 -1
- package/dist/tree-select.d.ts +3 -0
- package/dist/tree-select.js +113 -0
- package/dist/tree.d.ts +3 -0
- package/dist/tree.js +206 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,622 @@
|
|
|
1
|
-
import { type ButtonHTMLAttributes, type InputHTMLAttributes, type TextareaHTMLAttributes, type SelectHTMLAttributes, type AnchorHTMLAttributes, type ReactNode, type HTMLAttributes, type CSSProperties, type LabelHTMLAttributes, type FieldsetHTMLAttributes, type RefCallback, type RefObject, type TableHTMLAttributes, type ImgHTMLAttributes, type BlockquoteHTMLAttributes } from "react";
|
|
1
|
+
import { type ButtonHTMLAttributes, type InputHTMLAttributes, type TextareaHTMLAttributes, type SelectHTMLAttributes, type AnchorHTMLAttributes, type ReactNode, type HTMLAttributes, type CSSProperties, type LabelHTMLAttributes, type FieldsetHTMLAttributes, type RefCallback, type RefObject, type Ref, type MouseEvent as ReactMouseEvent, type TableHTMLAttributes, type ImgHTMLAttributes, type BlockquoteHTMLAttributes } from "react";
|
|
2
|
+
export interface TimePickerProps extends Omit<TimeFieldProps, "end"> {
|
|
3
|
+
interval?: number;
|
|
4
|
+
open?: boolean;
|
|
5
|
+
defaultOpen?: boolean;
|
|
6
|
+
onOpenChange?: (open: boolean) => void;
|
|
7
|
+
panelLabel?: string;
|
|
8
|
+
openTimeLabel?: string;
|
|
9
|
+
}
|
|
10
|
+
/** @since 0.2.8 */
|
|
11
|
+
export declare const TimePicker: import("react").ForwardRefExoticComponent<TimePickerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export interface DateTimeRangeValue {
|
|
13
|
+
start: DateTimeValue;
|
|
14
|
+
end: DateTimeValue;
|
|
15
|
+
}
|
|
16
|
+
export interface DateTimeRangePickerProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "defaultValue" | "onChange"> {
|
|
17
|
+
label: string;
|
|
18
|
+
hideLabel?: boolean;
|
|
19
|
+
value?: DateTimeRangeValue;
|
|
20
|
+
defaultValue?: DateTimeRangeValue;
|
|
21
|
+
onValueChange?: (range: DateTimeRangeValue) => void;
|
|
22
|
+
startDateName?: string;
|
|
23
|
+
startTimeName?: string;
|
|
24
|
+
endDateName?: string;
|
|
25
|
+
endTimeName?: string;
|
|
26
|
+
startLabel?: string;
|
|
27
|
+
endLabel?: string;
|
|
28
|
+
startDateLabel?: string;
|
|
29
|
+
startTimeLabel?: string;
|
|
30
|
+
endDateLabel?: string;
|
|
31
|
+
endTimeLabel?: string;
|
|
32
|
+
form?: string;
|
|
33
|
+
required?: boolean;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
readOnly?: boolean;
|
|
36
|
+
controlSize?: "sm" | "md" | "lg" | "xl";
|
|
37
|
+
precision?: "minute" | "second";
|
|
38
|
+
order?: DateFieldProps["order"];
|
|
39
|
+
locale?: string;
|
|
40
|
+
minDate?: string;
|
|
41
|
+
maxDate?: string;
|
|
42
|
+
step?: number;
|
|
43
|
+
interval?: number;
|
|
44
|
+
status?: FieldStatus;
|
|
45
|
+
description?: string;
|
|
46
|
+
incompleteMessage?: string;
|
|
47
|
+
reversedMessage?: string;
|
|
48
|
+
}
|
|
49
|
+
/** Four atomic civil date/time form values, without timezone conversion. @since 0.2.8 */
|
|
50
|
+
export declare const DateTimeRangePicker: import("react").ForwardRefExoticComponent<DateTimeRangePickerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
51
|
+
export interface FileMetaProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children"> {
|
|
52
|
+
format?: string;
|
|
53
|
+
size?: number;
|
|
54
|
+
formatSize?: (bytes: number) => string;
|
|
55
|
+
}
|
|
56
|
+
/** A quiet combined format/size chip; display metadata only. @since 0.2.8 */
|
|
57
|
+
export declare const FileMeta: import("react").ForwardRefExoticComponent<FileMetaProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
58
|
+
export interface FileActionLabels {
|
|
59
|
+
preview?: string;
|
|
60
|
+
remove?: string;
|
|
61
|
+
cancel?: string;
|
|
62
|
+
retry?: string;
|
|
63
|
+
queued?: string;
|
|
64
|
+
uploading?: string;
|
|
65
|
+
success?: string;
|
|
66
|
+
error?: string;
|
|
67
|
+
cancelled?: string;
|
|
68
|
+
}
|
|
69
|
+
export interface FileItemProps extends Omit<HTMLAttributes<HTMLLIElement>, "children" | "title"> {
|
|
70
|
+
name: string;
|
|
71
|
+
size?: number;
|
|
72
|
+
mimeType?: string;
|
|
73
|
+
format?: string | null;
|
|
74
|
+
thumbnail?: ReactNode;
|
|
75
|
+
description?: ReactNode;
|
|
76
|
+
href?: string;
|
|
77
|
+
download?: boolean;
|
|
78
|
+
onPreview?: () => void;
|
|
79
|
+
onRemove?: () => void;
|
|
80
|
+
disabled?: boolean;
|
|
81
|
+
labels?: FileActionLabels;
|
|
82
|
+
formatSize?: (bytes: number) => string;
|
|
83
|
+
}
|
|
84
|
+
/** A display row; it neither reads files nor creates object URLs. @since 0.2.8 */
|
|
85
|
+
export declare const FileItem: import("react").ForwardRefExoticComponent<FileItemProps & import("react").RefAttributes<HTMLLIElement>>;
|
|
86
|
+
export interface FileListProps extends DataListProps {
|
|
87
|
+
label: string;
|
|
88
|
+
}
|
|
89
|
+
/** A named native list of FileItem rows. @since 0.2.8 */
|
|
90
|
+
export declare const FileList: import("react").ForwardRefExoticComponent<FileListProps & import("react").RefAttributes<HTMLUListElement>>;
|
|
91
|
+
export interface UploadItemProps extends Omit<FileItemProps, "description"> {
|
|
92
|
+
state: "queued" | "uploading" | "success" | "error" | "cancelled";
|
|
93
|
+
progress?: number;
|
|
94
|
+
error?: string;
|
|
95
|
+
onCancel?: () => void;
|
|
96
|
+
onRetry?: () => void;
|
|
97
|
+
}
|
|
98
|
+
/** Host-owned upload state with applicable actions only. @since 0.2.8 */
|
|
99
|
+
export declare const UploadItem: import("react").ForwardRefExoticComponent<UploadItemProps & import("react").RefAttributes<HTMLLIElement>>;
|
|
100
|
+
export interface UploadListProps extends FileListProps {
|
|
101
|
+
}
|
|
102
|
+
/** A named native list of UploadItem rows. @since 0.2.8 */
|
|
103
|
+
export declare const UploadList: import("react").ForwardRefExoticComponent<UploadListProps & import("react").RefAttributes<HTMLUListElement>>;
|
|
104
|
+
export interface ImagePreviewProps extends Omit<DialogProps, "children" | "description"> {
|
|
105
|
+
src: string;
|
|
106
|
+
alt: string;
|
|
107
|
+
caption?: ReactNode;
|
|
108
|
+
downloadHref?: string;
|
|
109
|
+
downloadLabel?: string;
|
|
110
|
+
loadingLabel?: string;
|
|
111
|
+
errorLabel?: string;
|
|
112
|
+
}
|
|
113
|
+
/** A single-image viewer using Flood Dialog focus and dismissal. @since 0.2.8 */
|
|
114
|
+
export declare const ImagePreview: import("react").ForwardRefExoticComponent<ImagePreviewProps & import("react").RefAttributes<HTMLDialogElement>>;
|
|
115
|
+
export interface DataTableColumn {
|
|
116
|
+
id: string;
|
|
117
|
+
label: string;
|
|
118
|
+
sortable?: boolean;
|
|
119
|
+
align?: "start" | "end";
|
|
120
|
+
width?: CSSProperties["width"];
|
|
121
|
+
}
|
|
122
|
+
export interface DataTableRow {
|
|
123
|
+
id: string;
|
|
124
|
+
label?: string;
|
|
125
|
+
cells: Readonly<Record<string, ReactNode>>;
|
|
126
|
+
sortValues?: Readonly<Record<string, string | number | null>>;
|
|
127
|
+
selectionDisabled?: boolean;
|
|
128
|
+
}
|
|
129
|
+
export interface DataTableSort {
|
|
130
|
+
column: string;
|
|
131
|
+
direction: "ascending" | "descending";
|
|
132
|
+
}
|
|
133
|
+
export interface DataTableLabels {
|
|
134
|
+
loading?: string;
|
|
135
|
+
empty?: string;
|
|
136
|
+
error?: string;
|
|
137
|
+
retry?: string;
|
|
138
|
+
selectPage?: string;
|
|
139
|
+
selectRow?: (label: string) => string;
|
|
140
|
+
results?: (from: number, to: number, total: number) => string;
|
|
141
|
+
selection?: (selected: number, total: number) => string;
|
|
142
|
+
sort?: (label: string) => string;
|
|
143
|
+
pagination?: string;
|
|
144
|
+
previousPage?: string;
|
|
145
|
+
nextPage?: string;
|
|
146
|
+
page?: (page: number) => string;
|
|
147
|
+
}
|
|
148
|
+
export interface DataTableProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
149
|
+
caption: string;
|
|
150
|
+
hideCaption?: boolean;
|
|
151
|
+
columns: readonly DataTableColumn[];
|
|
152
|
+
rows: readonly DataTableRow[];
|
|
153
|
+
density?: "compact" | "comfortable";
|
|
154
|
+
striped?: boolean;
|
|
155
|
+
minWidth?: CSSProperties["minWidth"];
|
|
156
|
+
sort?: DataTableSort | null;
|
|
157
|
+
defaultSort?: DataTableSort | null;
|
|
158
|
+
onSortChange?: (sort: DataTableSort | null) => void;
|
|
159
|
+
locale?: string;
|
|
160
|
+
selectable?: boolean;
|
|
161
|
+
selectedIds?: readonly string[];
|
|
162
|
+
defaultSelectedIds?: readonly string[];
|
|
163
|
+
onSelectionChange?: (ids: string[]) => void;
|
|
164
|
+
page?: number;
|
|
165
|
+
defaultPage?: number;
|
|
166
|
+
pageSize?: number;
|
|
167
|
+
onPageChange?: (page: number) => void;
|
|
168
|
+
state?: "ready" | "loading" | "error";
|
|
169
|
+
onRetry?: () => void;
|
|
170
|
+
labels?: DataTableLabels;
|
|
171
|
+
}
|
|
172
|
+
/** A client-side table composed from native table, checkbox and pagination. @since 0.2.8 */
|
|
173
|
+
export declare const DataTable: import("react").ForwardRefExoticComponent<DataTableProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
174
|
+
export interface DataListProps extends Omit<HTMLAttributes<HTMLUListElement>, "role"> {
|
|
175
|
+
density?: "compact" | "comfortable";
|
|
176
|
+
dividers?: boolean;
|
|
177
|
+
}
|
|
178
|
+
/** A native list; links and actions stay independent. @since 0.2.8 */
|
|
179
|
+
export declare const DataList: import("react").ForwardRefExoticComponent<DataListProps & import("react").RefAttributes<HTMLUListElement>>;
|
|
180
|
+
export interface DataListItemProps extends Omit<HTMLAttributes<HTMLLIElement>, "title" | "children"> {
|
|
181
|
+
title: ReactNode;
|
|
182
|
+
description?: ReactNode;
|
|
183
|
+
media?: ReactNode;
|
|
184
|
+
metadata?: ReactNode;
|
|
185
|
+
actions?: ReactNode;
|
|
186
|
+
}
|
|
187
|
+
/** A structured list row, never an interactive wrapper. @since 0.2.8 */
|
|
188
|
+
export declare const DataListItem: import("react").ForwardRefExoticComponent<DataListItemProps & import("react").RefAttributes<HTMLLIElement>>;
|
|
189
|
+
export interface CheckCardProps extends Omit<CheckboxProps, "label" | "children"> {
|
|
190
|
+
label: string;
|
|
191
|
+
description?: ReactNode;
|
|
192
|
+
icon?: ReactNode;
|
|
193
|
+
metadata?: ReactNode;
|
|
194
|
+
density?: "compact" | "comfortable";
|
|
195
|
+
}
|
|
196
|
+
/** A native checkbox inside a clickable noninteractive content card. @since 0.2.8 */
|
|
197
|
+
export declare const CheckCard: import("react").ForwardRefExoticComponent<CheckCardProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
198
|
+
export interface RadioCardProps extends Omit<ChoiceProps, "label" | "children"> {
|
|
199
|
+
label: string;
|
|
200
|
+
description?: ReactNode;
|
|
201
|
+
icon?: ReactNode;
|
|
202
|
+
metadata?: ReactNode;
|
|
203
|
+
density?: "compact" | "comfortable";
|
|
204
|
+
}
|
|
205
|
+
/** Give exclusive choices the same native name and an enclosing Fieldset. @since 0.2.8 */
|
|
206
|
+
export declare const RadioCard: import("react").ForwardRefExoticComponent<RadioCardProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
207
|
+
export interface ColorSwatchProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children" | "color"> {
|
|
208
|
+
value: string;
|
|
209
|
+
label: string;
|
|
210
|
+
size?: "sm" | "md" | "lg";
|
|
211
|
+
}
|
|
212
|
+
/** @since 0.2.8 */
|
|
213
|
+
export declare const ColorSwatch: import("react").ForwardRefExoticComponent<ColorSwatchProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
214
|
+
export interface ColorPickerProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange" | "children"> {
|
|
215
|
+
label: string;
|
|
216
|
+
hideLabel?: boolean;
|
|
217
|
+
value?: string;
|
|
218
|
+
defaultValue?: string;
|
|
219
|
+
onValueChange?: (value: string) => void;
|
|
220
|
+
name?: string;
|
|
221
|
+
form?: string;
|
|
222
|
+
required?: boolean;
|
|
223
|
+
disabled?: boolean;
|
|
224
|
+
readOnly?: boolean;
|
|
225
|
+
controlSize?: "sm" | "md" | "lg";
|
|
226
|
+
presets?: readonly string[];
|
|
227
|
+
invalidMessage?: string;
|
|
228
|
+
hexLabel?: string;
|
|
229
|
+
channelLabels?: readonly [string, string, string];
|
|
230
|
+
presetsLabel?: string;
|
|
231
|
+
}
|
|
232
|
+
/** @since 0.2.8 */
|
|
233
|
+
export declare const ColorPicker: import("react").ForwardRefExoticComponent<ColorPickerProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
234
|
+
export interface HoverCardProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "title" | "role"> {
|
|
235
|
+
title: ReactNode;
|
|
236
|
+
trigger: (props: OverlayTriggerProps) => ReactNode;
|
|
237
|
+
children: ReactNode;
|
|
238
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
239
|
+
align?: "start" | "center" | "end";
|
|
240
|
+
open?: boolean;
|
|
241
|
+
defaultOpen?: boolean;
|
|
242
|
+
onOpenChange?: (open: boolean) => void;
|
|
243
|
+
openDelay?: number;
|
|
244
|
+
closeDelay?: number;
|
|
245
|
+
disabled?: boolean;
|
|
246
|
+
closeLabel?: string;
|
|
247
|
+
}
|
|
248
|
+
/** @since 0.2.8 */
|
|
249
|
+
export declare const HoverCard: import("react").ForwardRefExoticComponent<HoverCardProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
250
|
+
export interface TreeSelectProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "onChange" | "defaultValue"> {
|
|
251
|
+
label: string;
|
|
252
|
+
hideLabel?: boolean;
|
|
253
|
+
items: readonly TreeItem[];
|
|
254
|
+
value?: string;
|
|
255
|
+
defaultValue?: string;
|
|
256
|
+
onValueChange?: (value: string) => void;
|
|
257
|
+
placeholder?: string;
|
|
258
|
+
name?: string;
|
|
259
|
+
form?: string;
|
|
260
|
+
required?: boolean;
|
|
261
|
+
disabled?: boolean;
|
|
262
|
+
readOnly?: boolean;
|
|
263
|
+
invalid?: boolean;
|
|
264
|
+
status?: FieldStatus;
|
|
265
|
+
controlSize?: "sm" | "md" | "lg" | "xl";
|
|
266
|
+
open?: boolean;
|
|
267
|
+
defaultOpen?: boolean;
|
|
268
|
+
onOpenChange?: (open: boolean) => void;
|
|
269
|
+
expandedValues?: readonly string[];
|
|
270
|
+
defaultExpandedValues?: readonly string[];
|
|
271
|
+
onExpandedValuesChange?: (values: string[]) => void;
|
|
272
|
+
emptyMessage?: string;
|
|
273
|
+
invalidSelectionMessage?: string;
|
|
274
|
+
}
|
|
275
|
+
/** @since 0.2.8 */
|
|
276
|
+
export declare const TreeSelect: import("react").ForwardRefExoticComponent<TreeSelectProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
277
|
+
export interface DateTimeValue {
|
|
278
|
+
date: string;
|
|
279
|
+
time: string;
|
|
280
|
+
}
|
|
281
|
+
export interface DateTimePickerProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "defaultValue" | "onChange"> {
|
|
282
|
+
label: string;
|
|
283
|
+
validationMessage?: string;
|
|
284
|
+
timeInterval?: number;
|
|
285
|
+
hideLabel?: boolean;
|
|
286
|
+
hideFieldLabels?: boolean;
|
|
287
|
+
value?: DateTimeValue;
|
|
288
|
+
defaultValue?: DateTimeValue;
|
|
289
|
+
onValueChange?: (value: DateTimeValue) => void;
|
|
290
|
+
dateLabel?: string;
|
|
291
|
+
timeLabel?: string;
|
|
292
|
+
dateName?: string;
|
|
293
|
+
timeName?: string;
|
|
294
|
+
form?: string;
|
|
295
|
+
required?: boolean;
|
|
296
|
+
disabled?: boolean;
|
|
297
|
+
readOnly?: boolean;
|
|
298
|
+
controlSize?: "sm" | "md" | "lg" | "xl";
|
|
299
|
+
precision?: "minute" | "second";
|
|
300
|
+
order?: DateFieldProps["order"];
|
|
301
|
+
locale?: string;
|
|
302
|
+
minDate?: string;
|
|
303
|
+
maxDate?: string;
|
|
304
|
+
minTime?: string;
|
|
305
|
+
maxTime?: string;
|
|
306
|
+
step?: number;
|
|
307
|
+
status?: FieldStatus;
|
|
308
|
+
description?: string;
|
|
309
|
+
}
|
|
310
|
+
/** @since 0.2.8 */
|
|
311
|
+
export declare const DateTimePicker: import("react").ForwardRefExoticComponent<DateTimePickerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
312
|
+
export interface TreeItem {
|
|
313
|
+
value: string;
|
|
314
|
+
label: string;
|
|
315
|
+
description?: string;
|
|
316
|
+
icon?: ReactNode;
|
|
317
|
+
children?: readonly TreeItem[];
|
|
318
|
+
hasChildren?: boolean;
|
|
319
|
+
loading?: boolean;
|
|
320
|
+
disabled?: boolean;
|
|
321
|
+
readOnly?: boolean;
|
|
322
|
+
selectable?: boolean;
|
|
323
|
+
}
|
|
324
|
+
export interface TreeProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "onSelect" | "defaultValue" | "onChange"> {
|
|
325
|
+
label: string;
|
|
326
|
+
hideLabel?: boolean;
|
|
327
|
+
items: readonly TreeItem[];
|
|
328
|
+
value?: string | readonly string[];
|
|
329
|
+
defaultValue?: string | readonly string[];
|
|
330
|
+
onValueChange?: (value: string | string[]) => void;
|
|
331
|
+
multiple?: boolean;
|
|
332
|
+
expandedValues?: readonly string[];
|
|
333
|
+
defaultExpandedValues?: readonly string[];
|
|
334
|
+
onExpandedValuesChange?: (values: string[]) => void;
|
|
335
|
+
disabled?: boolean;
|
|
336
|
+
readOnly?: boolean;
|
|
337
|
+
controlSize?: "sm" | "md" | "lg" | "xl";
|
|
338
|
+
emptyMessage?: string;
|
|
339
|
+
loadingMessage?: string;
|
|
340
|
+
unloadedMessage?: string;
|
|
341
|
+
readOnlyMessage?: string;
|
|
342
|
+
}
|
|
343
|
+
/** @since 0.2.7 */
|
|
344
|
+
export declare const Tree: import("react").ForwardRefExoticComponent<TreeProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
345
|
+
export interface NavigationTreeItem {
|
|
346
|
+
value: string;
|
|
347
|
+
label: string;
|
|
348
|
+
href?: string;
|
|
349
|
+
icon?: ReactNode;
|
|
350
|
+
disabled?: boolean;
|
|
351
|
+
children?: readonly NavigationTreeItem[];
|
|
352
|
+
content?: ReactNode;
|
|
353
|
+
linkProps?: Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "href" | "children" | "aria-current">;
|
|
354
|
+
}
|
|
355
|
+
export interface NavigationTreeProps extends Omit<HTMLAttributes<HTMLElement>, "children" | "onChange"> {
|
|
356
|
+
label: string;
|
|
357
|
+
items: readonly NavigationTreeItem[];
|
|
358
|
+
currentValue?: string;
|
|
359
|
+
expandedValues?: readonly string[];
|
|
360
|
+
defaultExpandedValues?: readonly string[];
|
|
361
|
+
onExpandedValuesChange?: (values: string[]) => void;
|
|
362
|
+
expandLabel?: (item: NavigationTreeItem, expanded: boolean) => string;
|
|
363
|
+
size?: ContentSize;
|
|
364
|
+
}
|
|
365
|
+
/** @since 0.2.7 */
|
|
366
|
+
export declare const NavigationTree: import("react").ForwardRefExoticComponent<NavigationTreeProps & import("react").RefAttributes<HTMLElement>>;
|
|
367
|
+
export interface ErrorSummaryItem {
|
|
368
|
+
id: string;
|
|
369
|
+
fieldId: string;
|
|
370
|
+
message: string;
|
|
371
|
+
}
|
|
372
|
+
export interface ErrorSummaryProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "title" | "onSelect" | "role" | "aria-live"> {
|
|
373
|
+
title: string;
|
|
374
|
+
errors: readonly ErrorSummaryItem[];
|
|
375
|
+
description?: ReactNode;
|
|
376
|
+
announcement?: "off" | "polite" | "assertive";
|
|
377
|
+
autoFocus?: boolean;
|
|
378
|
+
onSelect?: (error: ErrorSummaryItem, event: ReactMouseEvent<HTMLAnchorElement>) => void;
|
|
379
|
+
}
|
|
380
|
+
/** @since 0.2.7 */
|
|
381
|
+
export declare const ErrorSummary: import("react").ForwardRefExoticComponent<ErrorSummaryProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
382
|
+
export interface ResizablePanelsProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "defaultValue" | "onChange"> {
|
|
383
|
+
label: string;
|
|
384
|
+
main: ReactNode;
|
|
385
|
+
secondary: ReactNode;
|
|
386
|
+
orientation?: "horizontal" | "vertical";
|
|
387
|
+
value?: number;
|
|
388
|
+
defaultValue?: number;
|
|
389
|
+
onValueChange?: (percent: number) => void;
|
|
390
|
+
onValueCommit?: (percent: number) => void;
|
|
391
|
+
min?: number;
|
|
392
|
+
max?: number;
|
|
393
|
+
step?: number;
|
|
394
|
+
largeStep?: number;
|
|
395
|
+
disabled?: boolean;
|
|
396
|
+
}
|
|
397
|
+
/** @since 0.2.7 */
|
|
398
|
+
export declare const ResizablePanels: import("react").ForwardRefExoticComponent<ResizablePanelsProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
399
|
+
export interface DateRangeValue {
|
|
400
|
+
start: string;
|
|
401
|
+
end: string;
|
|
402
|
+
}
|
|
403
|
+
export interface RangeCalendarProps extends Omit<CalendarProps, "value" | "defaultValue" | "onValueChange" | "onDateSelect" | "granularity"> {
|
|
404
|
+
value?: DateRangeValue;
|
|
405
|
+
defaultValue?: DateRangeValue;
|
|
406
|
+
onValueChange?: (range: DateRangeValue) => void;
|
|
407
|
+
onRangeSelect?: (range: DateRangeValue) => void;
|
|
408
|
+
isRangeDisabled?: (range: DateRangeValue) => boolean;
|
|
409
|
+
rangeLabels?: {
|
|
410
|
+
chooseStart?: string;
|
|
411
|
+
chooseEnd?: string;
|
|
412
|
+
unavailable?: string;
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
/** @since 0.2.7 */
|
|
416
|
+
export declare const RangeCalendar: import("react").ForwardRefExoticComponent<RangeCalendarProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
417
|
+
export interface DateRangeFieldProps extends Omit<DateFieldProps, "value" | "defaultValue" | "onValueChange" | "name" | "label" | "end"> {
|
|
418
|
+
label: string;
|
|
419
|
+
value?: DateRangeValue;
|
|
420
|
+
defaultValue?: DateRangeValue;
|
|
421
|
+
onValueChange?: (range: DateRangeValue) => void;
|
|
422
|
+
startName?: string;
|
|
423
|
+
endName?: string;
|
|
424
|
+
startLabel?: string;
|
|
425
|
+
endLabel?: string;
|
|
426
|
+
end?: ReactNode;
|
|
427
|
+
isDateDisabled?: (date: string) => boolean;
|
|
428
|
+
isRangeDisabled?: (range: DateRangeValue) => boolean;
|
|
429
|
+
rangeMessages?: {
|
|
430
|
+
incomplete?: string;
|
|
431
|
+
reversed?: string;
|
|
432
|
+
unavailable?: string;
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
/** @since 0.2.7 */
|
|
436
|
+
export declare const DateRangeField: import("react").ForwardRefExoticComponent<DateRangeFieldProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
437
|
+
export interface DateRangePickerProps extends Omit<DateRangeFieldProps, "end"> {
|
|
438
|
+
open?: boolean;
|
|
439
|
+
defaultOpen?: boolean;
|
|
440
|
+
onOpenChange?: (open: boolean) => void;
|
|
441
|
+
calendarLabel?: string;
|
|
442
|
+
openCalendarLabel?: string;
|
|
443
|
+
locale?: string;
|
|
444
|
+
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
445
|
+
today?: string;
|
|
446
|
+
previousMonthLabel?: string;
|
|
447
|
+
nextMonthLabel?: string;
|
|
448
|
+
rangeLabels?: RangeCalendarProps["rangeLabels"];
|
|
449
|
+
}
|
|
450
|
+
/** @since 0.2.7 */
|
|
451
|
+
export declare const DateRangePicker: import("react").ForwardRefExoticComponent<DateRangePickerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
452
|
+
export interface DatePickerProps extends Omit<DateFieldProps, "end"> {
|
|
453
|
+
open?: boolean;
|
|
454
|
+
defaultOpen?: boolean;
|
|
455
|
+
onOpenChange?: (open: boolean) => void;
|
|
456
|
+
calendarLabel?: string;
|
|
457
|
+
openCalendarLabel?: string;
|
|
458
|
+
locale?: string;
|
|
459
|
+
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
460
|
+
today?: string;
|
|
461
|
+
previousMonthLabel?: string;
|
|
462
|
+
nextMonthLabel?: string;
|
|
463
|
+
}
|
|
464
|
+
/** @since 0.2.7 */
|
|
465
|
+
export declare const DatePicker: import("react").ForwardRefExoticComponent<DatePickerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
466
|
+
export interface CalendarProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange" | "children"> {
|
|
467
|
+
label: string;
|
|
468
|
+
/** Values and bounds use YYYY-MM-DD, YYYY-MM or YYYY respectively. */
|
|
469
|
+
granularity?: "day" | "month" | "year";
|
|
470
|
+
showViewControls?: boolean;
|
|
471
|
+
viewLabels?: {
|
|
472
|
+
month?: string;
|
|
473
|
+
year?: string;
|
|
474
|
+
previous?: string;
|
|
475
|
+
next?: string;
|
|
476
|
+
};
|
|
477
|
+
value?: string;
|
|
478
|
+
defaultValue?: string;
|
|
479
|
+
onValueChange?: (date: string) => void;
|
|
480
|
+
onDateSelect?: (date: string) => void;
|
|
481
|
+
visibleMonth?: string;
|
|
482
|
+
defaultVisibleMonth?: string;
|
|
483
|
+
onVisibleMonthChange?: (month: string) => void;
|
|
484
|
+
min?: string;
|
|
485
|
+
max?: string;
|
|
486
|
+
disabled?: boolean;
|
|
487
|
+
readOnly?: boolean;
|
|
488
|
+
isDateDisabled?: (date: string) => boolean;
|
|
489
|
+
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
490
|
+
locale?: string;
|
|
491
|
+
autoFocus?: boolean;
|
|
492
|
+
today?: string;
|
|
493
|
+
previousMonthLabel?: string;
|
|
494
|
+
nextMonthLabel?: string;
|
|
495
|
+
}
|
|
496
|
+
/** @since 0.2.7 */
|
|
497
|
+
export declare const Calendar: import("react").ForwardRefExoticComponent<CalendarProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
498
|
+
export interface TimeFieldProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange" | "children"> {
|
|
499
|
+
label: string;
|
|
500
|
+
end?: ReactNode;
|
|
501
|
+
hideLabel?: boolean;
|
|
502
|
+
value?: string;
|
|
503
|
+
defaultValue?: string;
|
|
504
|
+
onValueChange?: (value: string) => void;
|
|
505
|
+
precision?: "minute" | "second";
|
|
506
|
+
min?: string;
|
|
507
|
+
max?: string;
|
|
508
|
+
step?: number;
|
|
509
|
+
required?: boolean;
|
|
510
|
+
readOnly?: boolean;
|
|
511
|
+
disabled?: boolean;
|
|
512
|
+
name?: string;
|
|
513
|
+
form?: string;
|
|
514
|
+
controlSize?: "sm" | "md" | "lg" | "xl";
|
|
515
|
+
invalid?: boolean;
|
|
516
|
+
status?: FieldStatus;
|
|
517
|
+
description?: string;
|
|
518
|
+
segmentLabels?: Partial<Record<"hour" | "minute" | "second", string>>;
|
|
519
|
+
messages?: {
|
|
520
|
+
required?: string;
|
|
521
|
+
invalid?: string;
|
|
522
|
+
outOfRange?: string;
|
|
523
|
+
stepMismatch?: string;
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
/** @since 0.2.7 */
|
|
527
|
+
export declare const TimeField: import("react").ForwardRefExoticComponent<TimeFieldProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
528
|
+
export interface DateFieldProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange" | "children"> {
|
|
529
|
+
label: string;
|
|
530
|
+
hideLabel?: boolean;
|
|
531
|
+
value?: string;
|
|
532
|
+
defaultValue?: string;
|
|
533
|
+
onValueChange?: (value: string) => void;
|
|
534
|
+
min?: string;
|
|
535
|
+
max?: string;
|
|
536
|
+
required?: boolean;
|
|
537
|
+
readOnly?: boolean;
|
|
538
|
+
disabled?: boolean;
|
|
539
|
+
name?: string;
|
|
540
|
+
form?: string;
|
|
541
|
+
controlSize?: "sm" | "md" | "lg" | "xl";
|
|
542
|
+
invalid?: boolean;
|
|
543
|
+
status?: FieldStatus;
|
|
544
|
+
description?: string;
|
|
545
|
+
order?: "month-day-year" | "day-month-year" | "year-month-day";
|
|
546
|
+
segmentLabels?: Partial<Record<"day" | "month" | "year", string>>;
|
|
547
|
+
messages?: {
|
|
548
|
+
required?: string;
|
|
549
|
+
invalid?: string;
|
|
550
|
+
outOfRange?: string;
|
|
551
|
+
};
|
|
552
|
+
validationMessage?: string;
|
|
553
|
+
end?: ReactNode;
|
|
554
|
+
}
|
|
555
|
+
/** @since 0.2.7 */
|
|
556
|
+
export declare const DateField: import("react").ForwardRefExoticComponent<DateFieldProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
557
|
+
export interface CommandListItem {
|
|
558
|
+
id: string;
|
|
559
|
+
label: string;
|
|
560
|
+
description?: string;
|
|
561
|
+
keywords?: readonly string[];
|
|
562
|
+
disabled?: boolean;
|
|
563
|
+
group?: string;
|
|
564
|
+
}
|
|
565
|
+
export interface CommandListProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "defaultValue" | "onChange"> {
|
|
566
|
+
label: string;
|
|
567
|
+
hideLabel?: boolean;
|
|
568
|
+
items: readonly CommandListItem[];
|
|
569
|
+
query?: string;
|
|
570
|
+
defaultQuery?: string;
|
|
571
|
+
onQueryChange?: (query: string) => void;
|
|
572
|
+
onAction?: (id: string) => void;
|
|
573
|
+
disabled?: boolean;
|
|
574
|
+
loading?: boolean;
|
|
575
|
+
placeholder?: string;
|
|
576
|
+
emptyMessage?: string;
|
|
577
|
+
loadingMessage?: string;
|
|
578
|
+
controlSize?: "sm" | "md" | "lg" | "xl";
|
|
579
|
+
}
|
|
580
|
+
/** @since 0.2.7 */
|
|
581
|
+
export declare const CommandList: import("react").ForwardRefExoticComponent<CommandListProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
582
|
+
export interface TagInputProps extends Omit<InputProps, "type" | "value" | "defaultValue" | "onChange" | "children" | "size"> {
|
|
583
|
+
label: string;
|
|
584
|
+
hideLabel?: boolean;
|
|
585
|
+
value?: readonly string[];
|
|
586
|
+
defaultValue?: readonly string[];
|
|
587
|
+
onValueChange?: (value: string[]) => void;
|
|
588
|
+
delimiters?: readonly string[];
|
|
589
|
+
removeLabel?: string;
|
|
590
|
+
requiredMessage?: string;
|
|
591
|
+
}
|
|
592
|
+
/** @since 0.2.7 */
|
|
593
|
+
export declare const TagInput: import("react").ForwardRefExoticComponent<TagInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
594
|
+
export interface EditableProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange" | "children"> {
|
|
595
|
+
label: string;
|
|
596
|
+
hideLabel?: boolean;
|
|
597
|
+
value?: string;
|
|
598
|
+
defaultValue?: string;
|
|
599
|
+
onValueChange?: (value: string) => void;
|
|
600
|
+
editing?: boolean;
|
|
601
|
+
defaultEditing?: boolean;
|
|
602
|
+
onEditingChange?: (editing: boolean) => void;
|
|
603
|
+
onCommit?: (value: string) => void;
|
|
604
|
+
onCancel?: () => void;
|
|
605
|
+
blurAction?: "commit" | "cancel" | "none";
|
|
606
|
+
readOnly?: boolean;
|
|
607
|
+
disabled?: boolean;
|
|
608
|
+
placeholder?: string;
|
|
609
|
+
controlSize?: "sm" | "md" | "lg" | "xl";
|
|
610
|
+
showActions?: boolean;
|
|
611
|
+
editLabel?: string;
|
|
612
|
+
saveLabel?: string;
|
|
613
|
+
cancelLabel?: string;
|
|
614
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
615
|
+
name?: string;
|
|
616
|
+
form?: string;
|
|
617
|
+
}
|
|
618
|
+
/** @since 0.2.7 */
|
|
619
|
+
export declare const Editable: import("react").ForwardRefExoticComponent<EditableProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
2
620
|
export type ControlSize = "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
3
621
|
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
622
|
variant?: "solid" | "subtle" | "outline" | "ghost";
|
|
@@ -173,7 +791,37 @@ export interface MenuSeparator {
|
|
|
173
791
|
id: string;
|
|
174
792
|
type: "separator";
|
|
175
793
|
}
|
|
176
|
-
export
|
|
794
|
+
export interface MenuSubmenuItem extends Omit<MenuActionItem, "type" | "tone" | "shortcut"> {
|
|
795
|
+
type: "submenu";
|
|
796
|
+
items: readonly MenuItem[];
|
|
797
|
+
}
|
|
798
|
+
export interface ContextMenuProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "role"> {
|
|
799
|
+
label: string;
|
|
800
|
+
items: readonly MenuItem[];
|
|
801
|
+
onAction?: (id: string) => void;
|
|
802
|
+
children: ReactNode;
|
|
803
|
+
open?: boolean;
|
|
804
|
+
defaultOpen?: boolean;
|
|
805
|
+
onOpenChange?: (open: boolean) => void;
|
|
806
|
+
disabled?: boolean;
|
|
807
|
+
controlSize?: "sm" | "md" | "lg" | "xl";
|
|
808
|
+
}
|
|
809
|
+
/** @since 0.2.7 */
|
|
810
|
+
export declare const ContextMenu: import("react").ForwardRefExoticComponent<ContextMenuProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
811
|
+
export interface MenuCheckboxItem extends Omit<MenuActionItem, "type" | "tone"> {
|
|
812
|
+
type: "checkbox";
|
|
813
|
+
checked: boolean | "mixed";
|
|
814
|
+
onCheckedChange: (checked: boolean) => void;
|
|
815
|
+
closeOnSelect?: boolean;
|
|
816
|
+
}
|
|
817
|
+
export interface MenuRadioItem extends Omit<MenuActionItem, "type" | "tone"> {
|
|
818
|
+
type: "radio";
|
|
819
|
+
group: string;
|
|
820
|
+
checked: boolean;
|
|
821
|
+
onCheckedChange: (checked: true) => void;
|
|
822
|
+
closeOnSelect?: boolean;
|
|
823
|
+
}
|
|
824
|
+
export type MenuItem = MenuActionItem | MenuSeparator | MenuCheckboxItem | MenuRadioItem | MenuSubmenuItem;
|
|
177
825
|
export interface MenuProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "role"> {
|
|
178
826
|
label: string;
|
|
179
827
|
trigger: (props: OverlayTriggerProps) => ReactNode;
|
|
@@ -200,6 +848,7 @@ export interface TooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, "chil
|
|
|
200
848
|
export declare const Tooltip: import("react").ForwardRefExoticComponent<TooltipProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
201
849
|
export interface PopoverProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "title" | "role"> {
|
|
202
850
|
title: string;
|
|
851
|
+
chrome?: "default" | "minimal";
|
|
203
852
|
trigger: (props: OverlayTriggerProps) => ReactNode;
|
|
204
853
|
children?: ReactNode;
|
|
205
854
|
open?: boolean;
|
|
@@ -210,6 +859,7 @@ export interface PopoverProps extends Omit<HTMLAttributes<HTMLDivElement>, "chil
|
|
|
210
859
|
align?: "start" | "center" | "end";
|
|
211
860
|
closeLabel?: string;
|
|
212
861
|
initialFocusRef?: RefObject<HTMLElement | null>;
|
|
862
|
+
positionReference?: RefObject<HTMLElement | null>;
|
|
213
863
|
}
|
|
214
864
|
export declare const Popover: import("react").ForwardRefExoticComponent<PopoverProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
215
865
|
export interface DialogProps extends Omit<HTMLAttributes<HTMLDialogElement>, "children" | "title" | "role"> {
|
|
@@ -768,11 +1418,20 @@ export declare const SkipLink: import("react").ForwardRefExoticComponent<SkipLin
|
|
|
768
1418
|
export interface ListBoxProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "role" | "defaultValue" | "onChange"> {
|
|
769
1419
|
label: string;
|
|
770
1420
|
hideLabel?: boolean;
|
|
1421
|
+
required?: boolean;
|
|
1422
|
+
requiredMessage?: string;
|
|
1423
|
+
validationMessage?: string;
|
|
1424
|
+
description?: string;
|
|
1425
|
+
message?: string;
|
|
1426
|
+
status?: FieldStatus;
|
|
1427
|
+
invalid?: boolean;
|
|
771
1428
|
options: readonly ComboboxOption[];
|
|
772
1429
|
value?: string | readonly string[];
|
|
773
1430
|
defaultValue?: string | readonly string[];
|
|
774
1431
|
onValueChange?: (value: string | string[]) => void;
|
|
775
1432
|
multiple?: boolean;
|
|
1433
|
+
selectionBehavior?: "automatic" | "manual";
|
|
1434
|
+
appearance?: "surface" | "plain";
|
|
776
1435
|
disabled?: boolean;
|
|
777
1436
|
readOnly?: boolean;
|
|
778
1437
|
name?: string;
|