opus-react 0.2.3
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 +81 -0
- package/dist/index.cjs +10802 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +6625 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.cts +1129 -0
- package/dist/index.d.ts +1129 -0
- package/dist/index.js +10690 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +96 -0
- package/dist/styles.css.map +1 -0
- package/dist/styles.d.cts +2 -0
- package/dist/styles.d.ts +2 -0
- package/package.json +52 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,1129 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ButtonHTMLAttributes, ReactNode, ChangeEventHandler, CSSProperties } from 'react';
|
|
3
|
+
|
|
4
|
+
type Theme = "light" | "dark";
|
|
5
|
+
type FieldMode = "stacked" | "flagged";
|
|
6
|
+
type LabelPosition = "left" | "right";
|
|
7
|
+
type ChoiceShape = "round" | "square";
|
|
8
|
+
type ChipInputVariant = "filled" | "outlined" | "soft" | "glass" | "gradient";
|
|
9
|
+
type ChipInputPreset = "chip-input" | "tag-input" | "token-input";
|
|
10
|
+
type ChoiceOption = {
|
|
11
|
+
error?: string;
|
|
12
|
+
label: string;
|
|
13
|
+
value: string;
|
|
14
|
+
};
|
|
15
|
+
type GalleryImage = {
|
|
16
|
+
alt: string;
|
|
17
|
+
caption?: string;
|
|
18
|
+
id?: string;
|
|
19
|
+
src: string;
|
|
20
|
+
};
|
|
21
|
+
type ModelFireOverlay = {
|
|
22
|
+
alphaSrc: string;
|
|
23
|
+
colorSrc: string;
|
|
24
|
+
};
|
|
25
|
+
type ModelAsset = {
|
|
26
|
+
alt: string;
|
|
27
|
+
animationName?: string;
|
|
28
|
+
autoplay?: boolean;
|
|
29
|
+
cameraOrbit?: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
fireOverlay?: ModelFireOverlay;
|
|
32
|
+
id?: string;
|
|
33
|
+
name: string;
|
|
34
|
+
src: string;
|
|
35
|
+
};
|
|
36
|
+
type AlertStatus = "error" | "success" | "warning" | "info";
|
|
37
|
+
type DialogActionSet = "ok" | "ok-cancel" | "yes-no" | "delete";
|
|
38
|
+
type ModalSize = "small" | "medium" | "large" | "fullscreen";
|
|
39
|
+
type DrawerSide = "left" | "right" | "top" | "bottom";
|
|
40
|
+
type PopoverPlacement = "top" | "right" | "bottom" | "left";
|
|
41
|
+
type DropdownMenuPlacement = "bottom-start" | "bottom-end" | "top-start" | "top-end";
|
|
42
|
+
type TabsOrientation = "horizontal" | "vertical";
|
|
43
|
+
type TabsVariant = "line" | "contained";
|
|
44
|
+
type SurfaceTone = "default" | "accent" | "success" | "warning" | "danger" | "info";
|
|
45
|
+
type SurfaceDensity = "comfortable" | "compact";
|
|
46
|
+
type TableDensity = "comfortable" | "compact";
|
|
47
|
+
type EmptyStateIcon = "folder" | "inbox" | "search";
|
|
48
|
+
type SidebarSide = "left" | "right";
|
|
49
|
+
type SkeletonVariant = "text" | "card" | "avatar" | "table";
|
|
50
|
+
type SkeletonAnimation = "shimmer" | "pulse" | "none";
|
|
51
|
+
type ImageThumbnailSize = "small" | "medium" | "large";
|
|
52
|
+
type ModelThumbnailSize = "small" | "medium" | "large";
|
|
53
|
+
type ChartPalette = "opus" | "cool" | "warm" | "mono";
|
|
54
|
+
type ChartVariant = "area" | "bar-horizontal" | "bar-vertical" | "box-plot" | "bubble" | "bubble-map" | "calendar-heatmap" | "candlestick" | "chord" | "choropleth" | "circle-packing" | "density" | "donut" | "force-directed" | "funnel" | "gantt" | "geo-map" | "grouped-bar" | "heatmap" | "hexbin" | "histogram" | "line" | "milestone-timeline" | "multi-line" | "network" | "pie" | "polar-area" | "pyramid" | "radar" | "ridgeline" | "sankey" | "scatter" | "spline" | "stacked-area" | "stacked-bar" | "stacked-bar-100" | "stream" | "sunburst" | "timeline" | "treemap" | "violin" | "waterfall";
|
|
55
|
+
type ToastVerticalPosition = "top" | "bottom";
|
|
56
|
+
type ToastHorizontalPosition = "left" | "right";
|
|
57
|
+
type ToastViewportPosition = {
|
|
58
|
+
horizontal: ToastHorizontalPosition;
|
|
59
|
+
vertical: ToastVerticalPosition;
|
|
60
|
+
};
|
|
61
|
+
type AccordionGroupType = "single" | "multiple";
|
|
62
|
+
|
|
63
|
+
type ButtonVariant = "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "light" | "dark" | "link";
|
|
64
|
+
type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
65
|
+
children: ReactNode;
|
|
66
|
+
variant?: ButtonVariant;
|
|
67
|
+
};
|
|
68
|
+
declare function Button({ children, className, variant, type, ...props }: ButtonProps): react.JSX.Element;
|
|
69
|
+
|
|
70
|
+
type FieldShellAriaContextValue = {
|
|
71
|
+
describedBy?: string;
|
|
72
|
+
errorId?: string;
|
|
73
|
+
labelId?: string;
|
|
74
|
+
required?: boolean;
|
|
75
|
+
};
|
|
76
|
+
declare function useFieldShellAria(): FieldShellAriaContextValue | null;
|
|
77
|
+
declare function fieldInputAriaProps(aria: FieldShellAriaContextValue | null | undefined, options?: {
|
|
78
|
+
invalid?: boolean;
|
|
79
|
+
}): {
|
|
80
|
+
"aria-labelledby"?: string | undefined;
|
|
81
|
+
"aria-required"?: true | undefined;
|
|
82
|
+
required?: true | undefined;
|
|
83
|
+
"aria-errormessage"?: string | undefined;
|
|
84
|
+
"aria-describedby"?: string | undefined;
|
|
85
|
+
};
|
|
86
|
+
type FieldShellProps = {
|
|
87
|
+
children: ReactNode;
|
|
88
|
+
className?: string;
|
|
89
|
+
compactControl?: boolean;
|
|
90
|
+
error?: string;
|
|
91
|
+
fitContent?: boolean;
|
|
92
|
+
flaggedAlign?: "center" | "start";
|
|
93
|
+
help?: string;
|
|
94
|
+
id?: string;
|
|
95
|
+
label: string;
|
|
96
|
+
labelVisuallyHidden?: boolean;
|
|
97
|
+
labelPosition?: LabelPosition;
|
|
98
|
+
labelTag?: "div" | "label";
|
|
99
|
+
mode?: FieldMode;
|
|
100
|
+
required?: boolean;
|
|
101
|
+
suppressErrorDisplay?: boolean;
|
|
102
|
+
};
|
|
103
|
+
declare function FieldShell({ children, className, compactControl, error, fitContent, flaggedAlign, help, id, label, labelVisuallyHidden, labelPosition, labelTag, mode, required, suppressErrorDisplay, }: FieldShellProps): react.JSX.Element;
|
|
104
|
+
|
|
105
|
+
type CheckboxFieldProps = {
|
|
106
|
+
checked: boolean;
|
|
107
|
+
error?: string;
|
|
108
|
+
help?: string;
|
|
109
|
+
id: string;
|
|
110
|
+
label: string;
|
|
111
|
+
labelPosition?: LabelPosition;
|
|
112
|
+
mode?: FieldMode;
|
|
113
|
+
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
114
|
+
shape?: ChoiceShape;
|
|
115
|
+
};
|
|
116
|
+
declare function CheckboxField({ checked, error, help, id, label, labelPosition, mode, onChange, shape, }: CheckboxFieldProps): react.JSX.Element;
|
|
117
|
+
|
|
118
|
+
type ColorFieldProps = {
|
|
119
|
+
error?: string;
|
|
120
|
+
help?: string;
|
|
121
|
+
id: string;
|
|
122
|
+
label: string;
|
|
123
|
+
labelPosition?: LabelPosition;
|
|
124
|
+
mode?: FieldMode;
|
|
125
|
+
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
126
|
+
value: string;
|
|
127
|
+
};
|
|
128
|
+
declare function ColorField({ error, help, id, label, labelPosition, mode, onChange, value, }: ColorFieldProps): react.JSX.Element;
|
|
129
|
+
|
|
130
|
+
type DateInputType = "date" | "datetime-local" | "month" | "time" | "week";
|
|
131
|
+
type DateFieldProps = {
|
|
132
|
+
error?: string;
|
|
133
|
+
help?: string;
|
|
134
|
+
id: string;
|
|
135
|
+
label: string;
|
|
136
|
+
labelPosition?: LabelPosition;
|
|
137
|
+
mode?: FieldMode;
|
|
138
|
+
required?: boolean;
|
|
139
|
+
type?: DateInputType;
|
|
140
|
+
value: string;
|
|
141
|
+
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
142
|
+
};
|
|
143
|
+
declare function DateField({ error, help, id, label, labelPosition, mode, required, type, value, onChange, }: DateFieldProps): react.JSX.Element;
|
|
144
|
+
|
|
145
|
+
type HiddenFieldProps = {
|
|
146
|
+
help?: string;
|
|
147
|
+
id: string;
|
|
148
|
+
label: string;
|
|
149
|
+
labelPosition?: LabelPosition;
|
|
150
|
+
mode?: FieldMode;
|
|
151
|
+
name?: string;
|
|
152
|
+
required?: boolean;
|
|
153
|
+
value: string;
|
|
154
|
+
};
|
|
155
|
+
declare function HiddenField({ help, id, label, labelPosition, mode, name, required, value, }: HiddenFieldProps): react.JSX.Element;
|
|
156
|
+
|
|
157
|
+
type FileFieldProps = {
|
|
158
|
+
error?: string;
|
|
159
|
+
footnote?: string;
|
|
160
|
+
help?: string;
|
|
161
|
+
id: string;
|
|
162
|
+
label: string;
|
|
163
|
+
labelPosition?: LabelPosition;
|
|
164
|
+
mode?: FieldMode;
|
|
165
|
+
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
166
|
+
fileName?: string;
|
|
167
|
+
};
|
|
168
|
+
declare function FileField({ error, fileName, footnote, help, id, label, labelPosition, mode, onChange, }: FileFieldProps): react.JSX.Element;
|
|
169
|
+
|
|
170
|
+
type NumberFieldProps = {
|
|
171
|
+
error?: string;
|
|
172
|
+
help?: string;
|
|
173
|
+
id: string;
|
|
174
|
+
label: string;
|
|
175
|
+
labelPosition?: LabelPosition;
|
|
176
|
+
max?: number;
|
|
177
|
+
min?: number;
|
|
178
|
+
mode?: FieldMode;
|
|
179
|
+
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
180
|
+
step?: number;
|
|
181
|
+
value: number;
|
|
182
|
+
};
|
|
183
|
+
declare function NumberField({ error, help, id, label, labelPosition, max, min, mode, onChange, step, value, }: NumberFieldProps): react.JSX.Element;
|
|
184
|
+
|
|
185
|
+
type RadioGroupProps = {
|
|
186
|
+
children: ReactNode;
|
|
187
|
+
error?: string;
|
|
188
|
+
help?: string;
|
|
189
|
+
id?: string;
|
|
190
|
+
label: string;
|
|
191
|
+
labelPosition?: LabelPosition;
|
|
192
|
+
mode?: FieldMode;
|
|
193
|
+
name: string;
|
|
194
|
+
onChange: (value: string) => void;
|
|
195
|
+
shape?: ChoiceShape;
|
|
196
|
+
value: string | null;
|
|
197
|
+
};
|
|
198
|
+
declare function RadioGroup({ children, error, help, id, label, labelPosition, mode, name, onChange, shape, value, }: RadioGroupProps): react.JSX.Element;
|
|
199
|
+
type RadioProps = {
|
|
200
|
+
children?: ReactNode;
|
|
201
|
+
error?: string;
|
|
202
|
+
name?: string;
|
|
203
|
+
shape?: ChoiceShape;
|
|
204
|
+
value: string;
|
|
205
|
+
defaultChecked?: boolean;
|
|
206
|
+
};
|
|
207
|
+
declare function Radio({ children, error, name, shape, value, defaultChecked }: RadioProps): react.JSX.Element;
|
|
208
|
+
|
|
209
|
+
type ChipInputProps = {
|
|
210
|
+
disabled?: boolean;
|
|
211
|
+
error?: string;
|
|
212
|
+
help?: string;
|
|
213
|
+
id: string;
|
|
214
|
+
label: string;
|
|
215
|
+
labelPosition?: LabelPosition;
|
|
216
|
+
mode?: FieldMode;
|
|
217
|
+
onChange: (value: string[]) => void;
|
|
218
|
+
placeholder?: string;
|
|
219
|
+
readOnly?: boolean;
|
|
220
|
+
required?: boolean;
|
|
221
|
+
value: string[];
|
|
222
|
+
variant?: ChipInputVariant;
|
|
223
|
+
};
|
|
224
|
+
declare function ChipInput({ disabled, error, help, id, label, labelPosition, mode, onChange, placeholder, readOnly, required, value, variant, }: ChipInputProps): react.JSX.Element;
|
|
225
|
+
declare const ChipInputField: typeof ChipInput;
|
|
226
|
+
|
|
227
|
+
type RangeFieldProps = {
|
|
228
|
+
error?: string;
|
|
229
|
+
help?: string;
|
|
230
|
+
id: string;
|
|
231
|
+
label: string;
|
|
232
|
+
labelPosition?: LabelPosition;
|
|
233
|
+
max?: number;
|
|
234
|
+
min?: number;
|
|
235
|
+
mode?: FieldMode;
|
|
236
|
+
step?: number;
|
|
237
|
+
value: number;
|
|
238
|
+
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
239
|
+
};
|
|
240
|
+
declare function RangeField({ error, help, id, label, labelPosition, max, min, mode, step, value, onChange, }: RangeFieldProps): react.JSX.Element;
|
|
241
|
+
|
|
242
|
+
type SelectFieldProps = {
|
|
243
|
+
error?: string;
|
|
244
|
+
help?: string;
|
|
245
|
+
id: string;
|
|
246
|
+
label: string;
|
|
247
|
+
labelPosition?: LabelPosition;
|
|
248
|
+
mode?: FieldMode;
|
|
249
|
+
options: string[];
|
|
250
|
+
required?: boolean;
|
|
251
|
+
value: string;
|
|
252
|
+
onChange: ChangeEventHandler<HTMLSelectElement>;
|
|
253
|
+
};
|
|
254
|
+
declare function SelectField({ error, help, id, label, labelPosition, mode, options, required, value, onChange, }: SelectFieldProps): react.JSX.Element;
|
|
255
|
+
|
|
256
|
+
type SwitchFieldProps = {
|
|
257
|
+
checked: boolean;
|
|
258
|
+
error?: string;
|
|
259
|
+
help?: string;
|
|
260
|
+
id: string;
|
|
261
|
+
label: string;
|
|
262
|
+
labelPosition?: LabelPosition;
|
|
263
|
+
mode?: FieldMode;
|
|
264
|
+
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
265
|
+
};
|
|
266
|
+
declare function SwitchField({ checked, error, help, id, label, labelPosition, mode, onChange, }: SwitchFieldProps): react.JSX.Element;
|
|
267
|
+
|
|
268
|
+
type TextAreaFieldProps = {
|
|
269
|
+
error?: string;
|
|
270
|
+
help?: string;
|
|
271
|
+
id: string;
|
|
272
|
+
label: string;
|
|
273
|
+
labelPosition?: LabelPosition;
|
|
274
|
+
maxChars?: number;
|
|
275
|
+
mode?: FieldMode;
|
|
276
|
+
placeholder?: string;
|
|
277
|
+
required?: boolean;
|
|
278
|
+
value: string;
|
|
279
|
+
onChange: ChangeEventHandler<HTMLTextAreaElement>;
|
|
280
|
+
};
|
|
281
|
+
declare function TextAreaField({ error, help, id, label, labelPosition, maxChars, mode, placeholder, required, value, onChange, }: TextAreaFieldProps): react.JSX.Element;
|
|
282
|
+
|
|
283
|
+
type TextFieldProps = {
|
|
284
|
+
error?: string;
|
|
285
|
+
help?: string;
|
|
286
|
+
id: string;
|
|
287
|
+
label: string;
|
|
288
|
+
labelPosition?: LabelPosition;
|
|
289
|
+
mode?: FieldMode;
|
|
290
|
+
placeholder?: string;
|
|
291
|
+
required?: boolean;
|
|
292
|
+
type: "email" | "password" | "search" | "tel" | "text" | "url";
|
|
293
|
+
value: string;
|
|
294
|
+
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
295
|
+
};
|
|
296
|
+
declare function TextField({ error, help, id, label, labelPosition, mode, placeholder, required, type, value, onChange, }: TextFieldProps): react.JSX.Element;
|
|
297
|
+
|
|
298
|
+
type ThemeToggleFieldProps = {
|
|
299
|
+
className?: string;
|
|
300
|
+
id: string;
|
|
301
|
+
label?: string;
|
|
302
|
+
labelPosition?: LabelPosition;
|
|
303
|
+
labelVisuallyHidden?: boolean;
|
|
304
|
+
mode?: FieldMode;
|
|
305
|
+
value: Theme;
|
|
306
|
+
onChange: (value: Theme) => void;
|
|
307
|
+
};
|
|
308
|
+
declare function ThemeToggleField({ className, id, label, labelPosition, labelVisuallyHidden, mode, value, onChange, }: ThemeToggleFieldProps): react.JSX.Element;
|
|
309
|
+
|
|
310
|
+
type TooltipProps = {
|
|
311
|
+
content: string;
|
|
312
|
+
label?: string;
|
|
313
|
+
};
|
|
314
|
+
declare function Tooltip({ content, label }: TooltipProps): react.JSX.Element;
|
|
315
|
+
|
|
316
|
+
type AlertProps = {
|
|
317
|
+
description: string;
|
|
318
|
+
dismissible?: boolean;
|
|
319
|
+
iconFlagged?: boolean;
|
|
320
|
+
onDismiss?: () => void;
|
|
321
|
+
status?: AlertStatus;
|
|
322
|
+
title: string;
|
|
323
|
+
};
|
|
324
|
+
declare function Alert({ description, dismissible, iconFlagged, onDismiss, status, title, }: AlertProps): react.JSX.Element;
|
|
325
|
+
|
|
326
|
+
type DialogResult = "confirm" | "cancel" | "dismiss";
|
|
327
|
+
type DialogProps = {
|
|
328
|
+
actionSet?: DialogActionSet;
|
|
329
|
+
children?: ReactNode;
|
|
330
|
+
description: string;
|
|
331
|
+
dismissOnBackdrop?: boolean;
|
|
332
|
+
dismissOnEscape?: boolean;
|
|
333
|
+
onClose: (result: DialogResult) => void;
|
|
334
|
+
open: boolean;
|
|
335
|
+
status?: AlertStatus;
|
|
336
|
+
title: string;
|
|
337
|
+
};
|
|
338
|
+
declare function Dialog({ actionSet, children, description, dismissOnBackdrop, dismissOnEscape, onClose, open, status, title, }: DialogProps): react.JSX.Element | null;
|
|
339
|
+
|
|
340
|
+
type ModalProps = {
|
|
341
|
+
actions?: ReactNode;
|
|
342
|
+
children: ReactNode;
|
|
343
|
+
closeButton?: boolean;
|
|
344
|
+
description?: string;
|
|
345
|
+
dismissOnBackdrop?: boolean;
|
|
346
|
+
dismissOnEscape?: boolean;
|
|
347
|
+
footer?: ReactNode;
|
|
348
|
+
onClose: () => void;
|
|
349
|
+
open: boolean;
|
|
350
|
+
size?: ModalSize;
|
|
351
|
+
title: string;
|
|
352
|
+
};
|
|
353
|
+
declare function Modal({ actions, children, closeButton, description, dismissOnBackdrop, dismissOnEscape, footer, onClose, open, size, title, }: ModalProps): react.JSX.Element | null;
|
|
354
|
+
declare function ModalDefaultActions({ onClose }: {
|
|
355
|
+
onClose: () => void;
|
|
356
|
+
}): react.JSX.Element;
|
|
357
|
+
|
|
358
|
+
type DrawerProps = {
|
|
359
|
+
actions?: ReactNode;
|
|
360
|
+
children: ReactNode;
|
|
361
|
+
closeButton?: boolean;
|
|
362
|
+
description?: string;
|
|
363
|
+
dismissOnBackdrop?: boolean;
|
|
364
|
+
dismissOnEscape?: boolean;
|
|
365
|
+
footer?: ReactNode;
|
|
366
|
+
onClose: () => void;
|
|
367
|
+
open: boolean;
|
|
368
|
+
side?: DrawerSide;
|
|
369
|
+
title: string;
|
|
370
|
+
};
|
|
371
|
+
declare function Drawer({ actions, children, closeButton, description, dismissOnBackdrop, dismissOnEscape, footer, onClose, open, side, title, }: DrawerProps): react.JSX.Element | null;
|
|
372
|
+
declare function DrawerDefaultActions({ onClose }: {
|
|
373
|
+
onClose: () => void;
|
|
374
|
+
}): react.JSX.Element;
|
|
375
|
+
|
|
376
|
+
type PopoverProps = {
|
|
377
|
+
children: ReactNode;
|
|
378
|
+
closeOnEscape?: boolean;
|
|
379
|
+
closeOnOutside?: boolean;
|
|
380
|
+
defaultOpen?: boolean;
|
|
381
|
+
label?: string;
|
|
382
|
+
onOpenChange?: (open: boolean) => void;
|
|
383
|
+
open?: boolean;
|
|
384
|
+
placement?: PopoverPlacement;
|
|
385
|
+
showArrow?: boolean;
|
|
386
|
+
title?: string;
|
|
387
|
+
trigger: ReactNode;
|
|
388
|
+
};
|
|
389
|
+
declare function Popover({ children, closeOnEscape, closeOnOutside, defaultOpen, label, onOpenChange, open, placement, showArrow, title, trigger, }: PopoverProps): react.JSX.Element;
|
|
390
|
+
|
|
391
|
+
type DropdownMenuItemData = {
|
|
392
|
+
checked?: boolean;
|
|
393
|
+
disabled?: boolean;
|
|
394
|
+
destructive?: boolean;
|
|
395
|
+
icon?: ReactNode;
|
|
396
|
+
id: string;
|
|
397
|
+
label: string;
|
|
398
|
+
onSelect?: () => void;
|
|
399
|
+
shortcut?: string;
|
|
400
|
+
};
|
|
401
|
+
type DropdownMenuProps = {
|
|
402
|
+
closeOnEscape?: boolean;
|
|
403
|
+
closeOnOutside?: boolean;
|
|
404
|
+
closeOnSelect?: boolean;
|
|
405
|
+
defaultOpen?: boolean;
|
|
406
|
+
elevated?: boolean;
|
|
407
|
+
items: DropdownMenuItemData[];
|
|
408
|
+
label?: string;
|
|
409
|
+
navigationId?: string;
|
|
410
|
+
onOpenChange?: (open: boolean) => void;
|
|
411
|
+
onSelect?: (item: DropdownMenuItemData) => void;
|
|
412
|
+
open?: boolean;
|
|
413
|
+
openOnHover?: boolean;
|
|
414
|
+
placement?: DropdownMenuPlacement;
|
|
415
|
+
trigger: ReactNode;
|
|
416
|
+
};
|
|
417
|
+
declare function DropdownMenuItem({ item, onSelect, showIconColumn, }: {
|
|
418
|
+
item: DropdownMenuItemData;
|
|
419
|
+
onSelect: (item: DropdownMenuItemData) => void;
|
|
420
|
+
showIconColumn?: boolean;
|
|
421
|
+
}): react.JSX.Element;
|
|
422
|
+
declare function DropdownMenu({ closeOnEscape, closeOnOutside, closeOnSelect, defaultOpen, elevated, items, label, navigationId, onOpenChange, onSelect, open, openOnHover, placement, trigger, }: DropdownMenuProps): react.JSX.Element;
|
|
423
|
+
|
|
424
|
+
type ContextMenuTargetRegistration = {
|
|
425
|
+
getElement: () => HTMLDivElement | null;
|
|
426
|
+
items: DropdownMenuItemData[];
|
|
427
|
+
label: string;
|
|
428
|
+
onSelect?: (item: DropdownMenuItemData) => void;
|
|
429
|
+
};
|
|
430
|
+
type ContextMenuContextValue = {
|
|
431
|
+
activeTargetId: string | null;
|
|
432
|
+
close: () => void;
|
|
433
|
+
isOpen: boolean;
|
|
434
|
+
menuId: string;
|
|
435
|
+
openFromTarget: (targetId: string, x: number, y: number) => void;
|
|
436
|
+
registerTarget: (targetId: string, registration: ContextMenuTargetRegistration) => () => void;
|
|
437
|
+
};
|
|
438
|
+
declare function useContextMenu(): ContextMenuContextValue;
|
|
439
|
+
type ContextMenuProviderProps = {
|
|
440
|
+
children: ReactNode;
|
|
441
|
+
closeOnEscape?: boolean;
|
|
442
|
+
closeOnOutside?: boolean;
|
|
443
|
+
closeOnSelect?: boolean;
|
|
444
|
+
onOpenChange?: (open: boolean) => void;
|
|
445
|
+
open?: boolean;
|
|
446
|
+
};
|
|
447
|
+
declare function ContextMenuProvider({ children, closeOnEscape, closeOnOutside, closeOnSelect, onOpenChange, open, }: ContextMenuProviderProps): react.JSX.Element;
|
|
448
|
+
type ContextMenuTargetProps = {
|
|
449
|
+
children: ReactNode;
|
|
450
|
+
className?: string;
|
|
451
|
+
items: DropdownMenuItemData[];
|
|
452
|
+
label?: string;
|
|
453
|
+
onSelect?: (item: DropdownMenuItemData) => void;
|
|
454
|
+
};
|
|
455
|
+
declare function ContextMenuTarget({ children, className, items, label, onSelect, }: ContextMenuTargetProps): react.JSX.Element;
|
|
456
|
+
declare namespace ContextMenuTarget {
|
|
457
|
+
var displayName: string;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
declare function useOpusTheme(): Theme;
|
|
461
|
+
type OpusThemeProviderProps = {
|
|
462
|
+
children: ReactNode;
|
|
463
|
+
theme: Theme;
|
|
464
|
+
};
|
|
465
|
+
declare function OpusThemeProvider({ children, theme }: OpusThemeProviderProps): react.JSX.Element;
|
|
466
|
+
|
|
467
|
+
type CommandPaletteItem = {
|
|
468
|
+
description?: string;
|
|
469
|
+
disabled?: boolean;
|
|
470
|
+
group?: string;
|
|
471
|
+
id: string;
|
|
472
|
+
label: string;
|
|
473
|
+
shortcut?: string;
|
|
474
|
+
};
|
|
475
|
+
type CommandPaletteProps = {
|
|
476
|
+
closeOnSelect?: boolean;
|
|
477
|
+
dismissOnBackdrop?: boolean;
|
|
478
|
+
dismissOnEscape?: boolean;
|
|
479
|
+
emptyMessage?: string;
|
|
480
|
+
items: CommandPaletteItem[];
|
|
481
|
+
onClose: () => void;
|
|
482
|
+
onSelect: (item: CommandPaletteItem) => void;
|
|
483
|
+
open: boolean;
|
|
484
|
+
placeholder?: string;
|
|
485
|
+
query?: string;
|
|
486
|
+
onQueryChange?: (query: string) => void;
|
|
487
|
+
showDescriptions?: boolean;
|
|
488
|
+
showGroups?: boolean;
|
|
489
|
+
showShortcuts?: boolean;
|
|
490
|
+
};
|
|
491
|
+
declare function CommandPalette({ closeOnSelect, dismissOnBackdrop, dismissOnEscape, emptyMessage, items, onClose, onSelect, open, placeholder, query, onQueryChange, showDescriptions, showGroups, showShortcuts, }: CommandPaletteProps): react.JSX.Element | null;
|
|
492
|
+
|
|
493
|
+
type AccordionProps = {
|
|
494
|
+
children: ReactNode;
|
|
495
|
+
className?: string;
|
|
496
|
+
defaultOpen?: boolean;
|
|
497
|
+
disabled?: boolean;
|
|
498
|
+
onOpenChange?: (open: boolean) => void;
|
|
499
|
+
open?: boolean;
|
|
500
|
+
title: string;
|
|
501
|
+
value?: string;
|
|
502
|
+
};
|
|
503
|
+
declare function Accordion({ children, className, defaultOpen, disabled, onOpenChange, open, title, value, }: AccordionProps): react.JSX.Element;
|
|
504
|
+
|
|
505
|
+
type AccordionGroupProps = {
|
|
506
|
+
children: ReactNode;
|
|
507
|
+
className?: string;
|
|
508
|
+
collapsible?: boolean;
|
|
509
|
+
defaultValue?: string | string[];
|
|
510
|
+
onValueChange?: (value: string | string[]) => void;
|
|
511
|
+
type?: AccordionGroupType;
|
|
512
|
+
value?: string | string[];
|
|
513
|
+
};
|
|
514
|
+
declare function AccordionGroup({ children, className, collapsible, defaultValue, onValueChange, type, value, }: AccordionGroupProps): react.JSX.Element;
|
|
515
|
+
|
|
516
|
+
type ShowMoreProps = {
|
|
517
|
+
children: ReactNode;
|
|
518
|
+
defaultExpanded?: boolean;
|
|
519
|
+
expanded?: boolean;
|
|
520
|
+
maxLines?: number;
|
|
521
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
522
|
+
showLessLabel?: string;
|
|
523
|
+
showMoreLabel?: string;
|
|
524
|
+
};
|
|
525
|
+
declare function ShowMore({ children, defaultExpanded, expanded, maxLines, onExpandedChange, showLessLabel, showMoreLabel, }: ShowMoreProps): react.JSX.Element;
|
|
526
|
+
|
|
527
|
+
type ToastProps = {
|
|
528
|
+
description?: string;
|
|
529
|
+
dismissible?: boolean;
|
|
530
|
+
duration?: number;
|
|
531
|
+
onDismiss?: () => void;
|
|
532
|
+
onMouseEnter?: () => void;
|
|
533
|
+
onMouseLeave?: () => void;
|
|
534
|
+
paused?: boolean;
|
|
535
|
+
phase?: "entering" | "visible" | "exiting";
|
|
536
|
+
status?: AlertStatus;
|
|
537
|
+
title: string;
|
|
538
|
+
};
|
|
539
|
+
declare function Toast({ description, dismissible, duration, onDismiss, onMouseEnter, onMouseLeave, paused, phase, status, title, }: ToastProps): react.JSX.Element;
|
|
540
|
+
|
|
541
|
+
declare const DEFAULT_TOAST_DURATION_MS = 3000;
|
|
542
|
+
type ShowToastOptions = {
|
|
543
|
+
description?: string;
|
|
544
|
+
dismissible?: boolean;
|
|
545
|
+
duration?: number;
|
|
546
|
+
status?: AlertStatus;
|
|
547
|
+
title: string;
|
|
548
|
+
};
|
|
549
|
+
type ToastContextValue = {
|
|
550
|
+
dismiss: (id: string) => void;
|
|
551
|
+
dismissAll: () => void;
|
|
552
|
+
setViewport: (position: ToastViewportPosition) => void;
|
|
553
|
+
show: (options: ShowToastOptions) => string;
|
|
554
|
+
viewport: ToastViewportPosition;
|
|
555
|
+
};
|
|
556
|
+
declare function useToast(): ToastContextValue;
|
|
557
|
+
type ToastProviderProps = {
|
|
558
|
+
children: ReactNode;
|
|
559
|
+
horizontal?: ToastViewportPosition["horizontal"];
|
|
560
|
+
theme?: Theme;
|
|
561
|
+
vertical?: ToastViewportPosition["vertical"];
|
|
562
|
+
};
|
|
563
|
+
declare function ToastProvider({ children, horizontal, theme: themeProp, vertical, }: ToastProviderProps): react.JSX.Element;
|
|
564
|
+
|
|
565
|
+
type TabItem = {
|
|
566
|
+
content: ReactNode;
|
|
567
|
+
disabled?: boolean;
|
|
568
|
+
label: string;
|
|
569
|
+
value: string;
|
|
570
|
+
};
|
|
571
|
+
type TabsProps = {
|
|
572
|
+
"aria-label"?: string;
|
|
573
|
+
defaultValue?: string;
|
|
574
|
+
fitted?: boolean;
|
|
575
|
+
items: TabItem[];
|
|
576
|
+
onValueChange?: (value: string) => void;
|
|
577
|
+
orientation?: TabsOrientation;
|
|
578
|
+
value?: string;
|
|
579
|
+
variant?: TabsVariant;
|
|
580
|
+
};
|
|
581
|
+
declare function Tabs({ "aria-label": ariaLabel, defaultValue, fitted, items, onValueChange, orientation, value, variant, }: TabsProps): react.JSX.Element;
|
|
582
|
+
|
|
583
|
+
type CardProps = {
|
|
584
|
+
actions?: ReactNode;
|
|
585
|
+
children: ReactNode;
|
|
586
|
+
density?: SurfaceDensity;
|
|
587
|
+
eyebrow?: string;
|
|
588
|
+
footer?: ReactNode;
|
|
589
|
+
media?: ReactNode;
|
|
590
|
+
title: string;
|
|
591
|
+
tone?: SurfaceTone;
|
|
592
|
+
};
|
|
593
|
+
declare function Card({ actions, children, density, eyebrow, footer, media, title, tone, }: CardProps): react.JSX.Element;
|
|
594
|
+
|
|
595
|
+
type StatCardTrend = "up" | "down";
|
|
596
|
+
type StatCardProps = {
|
|
597
|
+
change?: string;
|
|
598
|
+
density?: SurfaceDensity;
|
|
599
|
+
icon?: ReactNode;
|
|
600
|
+
label: string;
|
|
601
|
+
trend?: StatCardTrend;
|
|
602
|
+
value: string;
|
|
603
|
+
};
|
|
604
|
+
declare function StatCard({ change, density, icon, label, trend, value, }: StatCardProps): react.JSX.Element;
|
|
605
|
+
|
|
606
|
+
type GaugeTrend = "up" | "down";
|
|
607
|
+
type GaugeVariant = "half" | "full";
|
|
608
|
+
type GaugeFooterItem = {
|
|
609
|
+
color?: string;
|
|
610
|
+
label: string;
|
|
611
|
+
trend?: GaugeTrend;
|
|
612
|
+
value: string;
|
|
613
|
+
};
|
|
614
|
+
type GaugeProps = {
|
|
615
|
+
change?: string;
|
|
616
|
+
changeTrend?: GaugeTrend;
|
|
617
|
+
density?: SurfaceDensity;
|
|
618
|
+
footer?: GaugeFooterItem[];
|
|
619
|
+
subtitle?: string;
|
|
620
|
+
summary?: string;
|
|
621
|
+
title: string;
|
|
622
|
+
trackColor?: string;
|
|
623
|
+
value: number;
|
|
624
|
+
valueColor?: string;
|
|
625
|
+
variant?: GaugeVariant;
|
|
626
|
+
};
|
|
627
|
+
declare function Gauge({ change, changeTrend, density, footer, subtitle, summary, title, trackColor, value, valueColor, variant, }: GaugeProps): react.JSX.Element;
|
|
628
|
+
|
|
629
|
+
type SparklineProps = {
|
|
630
|
+
height?: number;
|
|
631
|
+
label?: string;
|
|
632
|
+
palette?: "cool" | "mono" | "opus" | "warm";
|
|
633
|
+
values: number[];
|
|
634
|
+
variant?: "inline" | "labeled";
|
|
635
|
+
width?: number;
|
|
636
|
+
};
|
|
637
|
+
declare function Sparkline({ height, label, palette, values, variant, width, }: SparklineProps): react.JSX.Element;
|
|
638
|
+
|
|
639
|
+
type ProgressRingProps = {
|
|
640
|
+
label: string;
|
|
641
|
+
max?: number;
|
|
642
|
+
value: number;
|
|
643
|
+
};
|
|
644
|
+
declare function ProgressRing({ label, max, value }: ProgressRingProps): react.JSX.Element;
|
|
645
|
+
|
|
646
|
+
type ProgressBarProps = {
|
|
647
|
+
label: string;
|
|
648
|
+
max?: number;
|
|
649
|
+
value: number;
|
|
650
|
+
};
|
|
651
|
+
declare function ProgressBar({ label, max, value }: ProgressBarProps): react.JSX.Element;
|
|
652
|
+
|
|
653
|
+
type SpeedometerProps = {
|
|
654
|
+
label: string;
|
|
655
|
+
max?: number;
|
|
656
|
+
value: number;
|
|
657
|
+
};
|
|
658
|
+
declare function Speedometer({ label, max, value }: SpeedometerProps): react.JSX.Element;
|
|
659
|
+
|
|
660
|
+
type MetricTileProps = {
|
|
661
|
+
density?: SurfaceDensity;
|
|
662
|
+
icon?: ReactNode;
|
|
663
|
+
label: string;
|
|
664
|
+
sparkline?: number[];
|
|
665
|
+
value: string;
|
|
666
|
+
};
|
|
667
|
+
declare function MetricTile({ density, icon, label, sparkline, value }: MetricTileProps): react.JSX.Element;
|
|
668
|
+
|
|
669
|
+
type StatusIndicatorState = "error" | "neutral" | "success" | "warning";
|
|
670
|
+
type StatusIndicatorProps = {
|
|
671
|
+
label: string;
|
|
672
|
+
status: StatusIndicatorState;
|
|
673
|
+
};
|
|
674
|
+
declare function StatusIndicator({ label, status }: StatusIndicatorProps): react.JSX.Element;
|
|
675
|
+
|
|
676
|
+
type TrendBadgeDirection = "down" | "up";
|
|
677
|
+
type TrendBadgeProps = {
|
|
678
|
+
direction: TrendBadgeDirection;
|
|
679
|
+
value: string;
|
|
680
|
+
};
|
|
681
|
+
declare function TrendBadge({ direction, value }: TrendBadgeProps): react.JSX.Element;
|
|
682
|
+
|
|
683
|
+
type PanelProps = {
|
|
684
|
+
actions?: ReactNode;
|
|
685
|
+
children: ReactNode;
|
|
686
|
+
density?: SurfaceDensity;
|
|
687
|
+
description?: string;
|
|
688
|
+
divided?: boolean;
|
|
689
|
+
footer?: ReactNode;
|
|
690
|
+
title: string;
|
|
691
|
+
tone?: SurfaceTone;
|
|
692
|
+
};
|
|
693
|
+
declare function Panel({ actions, children, density, description, divided, footer, title, tone, }: PanelProps): react.JSX.Element;
|
|
694
|
+
|
|
695
|
+
type SectionBreakpoint = "mobile" | "tablet" | "desktop";
|
|
696
|
+
/** @deprecated Use sidebar + columns instead. Kept for Section.Row shorthand. */
|
|
697
|
+
type SectionLayoutPreset = "stack" | "2-equal" | "3-equal" | "4-equal" | "5-equal" | "sidebar-left" | "sidebar-right" | "auto-fit";
|
|
698
|
+
type SectionSidebar = "none" | "left" | "right";
|
|
699
|
+
type SectionColumns = 1 | 2 | 3 | 4 | 5;
|
|
700
|
+
type SectionGap = "sm" | "md" | "lg";
|
|
701
|
+
type SectionStackBelow = "mobile" | "tablet" | "never";
|
|
702
|
+
type SectionSidebarRatio = "1:2" | "1:3" | "2:3";
|
|
703
|
+
type SectionAlign = "start" | "center" | "end" | "stretch";
|
|
704
|
+
type SectionJustify = "start" | "center" | "end" | "stretch";
|
|
705
|
+
type SectionTemplate = Partial<Record<SectionBreakpoint, string>>;
|
|
706
|
+
type SectionSpan = Partial<Record<SectionBreakpoint, number>>;
|
|
707
|
+
type SectionWidth = Partial<Record<SectionBreakpoint, string>>;
|
|
708
|
+
|
|
709
|
+
type SectionMaxWidth = "full" | "narrow" | "wide";
|
|
710
|
+
type SectionProps = {
|
|
711
|
+
children: ReactNode;
|
|
712
|
+
className?: string;
|
|
713
|
+
description?: string;
|
|
714
|
+
gap?: SectionGap;
|
|
715
|
+
maxWidth?: SectionMaxWidth;
|
|
716
|
+
style?: CSSProperties;
|
|
717
|
+
title?: string;
|
|
718
|
+
};
|
|
719
|
+
type SectionRowProps = {
|
|
720
|
+
align?: SectionAlign;
|
|
721
|
+
children: ReactNode;
|
|
722
|
+
className?: string;
|
|
723
|
+
columns?: SectionColumns;
|
|
724
|
+
gap?: SectionGap;
|
|
725
|
+
justify?: SectionJustify;
|
|
726
|
+
layout?: SectionLayoutPreset;
|
|
727
|
+
sidebar?: SectionSidebar;
|
|
728
|
+
sidebarRatio?: SectionSidebarRatio;
|
|
729
|
+
stackBelow?: SectionStackBelow;
|
|
730
|
+
style?: CSSProperties;
|
|
731
|
+
template?: SectionTemplate;
|
|
732
|
+
};
|
|
733
|
+
type SectionColumnProps = {
|
|
734
|
+
children: ReactNode;
|
|
735
|
+
className?: string;
|
|
736
|
+
span?: SectionSpan;
|
|
737
|
+
style?: CSSProperties;
|
|
738
|
+
width?: SectionWidth;
|
|
739
|
+
};
|
|
740
|
+
declare function SectionRoot({ children, className, description, gap, maxWidth, style, title, }: SectionProps): react.JSX.Element;
|
|
741
|
+
declare function SectionRow({ align, children, className, columns, gap, justify, layout, sidebar, sidebarRatio, stackBelow, style, template, }: SectionRowProps): react.JSX.Element;
|
|
742
|
+
declare function SectionColumn({ children, className, span, style, width }: SectionColumnProps): react.JSX.Element;
|
|
743
|
+
declare const Section: typeof SectionRoot & {
|
|
744
|
+
Row: typeof SectionRow;
|
|
745
|
+
Column: typeof SectionColumn;
|
|
746
|
+
};
|
|
747
|
+
|
|
748
|
+
type TableColumn = {
|
|
749
|
+
align?: "left" | "right" | "center";
|
|
750
|
+
key: string;
|
|
751
|
+
label: string;
|
|
752
|
+
};
|
|
753
|
+
type TableRow = {
|
|
754
|
+
id: string;
|
|
755
|
+
values: Record<string, ReactNode>;
|
|
756
|
+
};
|
|
757
|
+
type TableProps = {
|
|
758
|
+
bordered?: boolean;
|
|
759
|
+
caption?: string;
|
|
760
|
+
columns: TableColumn[];
|
|
761
|
+
density?: TableDensity;
|
|
762
|
+
emptyMessage?: string;
|
|
763
|
+
rows: TableRow[];
|
|
764
|
+
showCaption?: boolean;
|
|
765
|
+
striped?: boolean;
|
|
766
|
+
};
|
|
767
|
+
declare function Table({ bordered, caption, columns, density, emptyMessage, rows, showCaption, striped, }: TableProps): react.JSX.Element;
|
|
768
|
+
|
|
769
|
+
type DataGridColumn = {
|
|
770
|
+
align?: "left" | "right" | "center";
|
|
771
|
+
filterable?: boolean;
|
|
772
|
+
key: string;
|
|
773
|
+
label: string;
|
|
774
|
+
resizable?: boolean;
|
|
775
|
+
sortable?: boolean;
|
|
776
|
+
};
|
|
777
|
+
type DataGridRowHeaderColumn = {
|
|
778
|
+
filterable?: boolean;
|
|
779
|
+
resizable?: boolean;
|
|
780
|
+
sortable?: boolean;
|
|
781
|
+
};
|
|
782
|
+
type DataGridRow = {
|
|
783
|
+
id: string;
|
|
784
|
+
label?: string;
|
|
785
|
+
values: Record<string, ReactNode>;
|
|
786
|
+
};
|
|
787
|
+
type DataGridProps = {
|
|
788
|
+
bordered?: boolean;
|
|
789
|
+
caption?: string;
|
|
790
|
+
columns: DataGridColumn[];
|
|
791
|
+
density?: TableDensity;
|
|
792
|
+
rowHeader?: DataGridRowHeaderColumn;
|
|
793
|
+
rows: DataGridRow[];
|
|
794
|
+
stickyFirstColumn?: boolean;
|
|
795
|
+
stickyHeader?: boolean;
|
|
796
|
+
striped?: boolean;
|
|
797
|
+
};
|
|
798
|
+
declare function DataGrid({ bordered, caption, columns, density, rowHeader, rows, stickyFirstColumn, stickyHeader, striped, }: DataGridProps): react.JSX.Element;
|
|
799
|
+
|
|
800
|
+
type ChartDatum = {
|
|
801
|
+
region?: string;
|
|
802
|
+
lat?: number;
|
|
803
|
+
lng?: number;
|
|
804
|
+
close?: number;
|
|
805
|
+
end?: number;
|
|
806
|
+
group?: string;
|
|
807
|
+
high?: number;
|
|
808
|
+
label: string;
|
|
809
|
+
low?: number;
|
|
810
|
+
max?: number;
|
|
811
|
+
median?: number;
|
|
812
|
+
min?: number;
|
|
813
|
+
open?: number;
|
|
814
|
+
parent?: string;
|
|
815
|
+
q1?: number;
|
|
816
|
+
q3?: number;
|
|
817
|
+
start?: number;
|
|
818
|
+
value: number;
|
|
819
|
+
values?: number[];
|
|
820
|
+
x?: number;
|
|
821
|
+
y?: number;
|
|
822
|
+
};
|
|
823
|
+
type ChartSeries = {
|
|
824
|
+
id: string;
|
|
825
|
+
label: string;
|
|
826
|
+
values: number[];
|
|
827
|
+
};
|
|
828
|
+
type ChartProps = {
|
|
829
|
+
data?: ChartDatum[];
|
|
830
|
+
height?: number;
|
|
831
|
+
highlightLabel?: string;
|
|
832
|
+
maximise?: boolean;
|
|
833
|
+
palette?: ChartPalette;
|
|
834
|
+
series?: ChartSeries[];
|
|
835
|
+
showAxis?: boolean;
|
|
836
|
+
showGrid?: boolean;
|
|
837
|
+
showLegend?: boolean;
|
|
838
|
+
showValues?: boolean;
|
|
839
|
+
title?: string;
|
|
840
|
+
variant: ChartVariant;
|
|
841
|
+
xAxisLabel?: string;
|
|
842
|
+
yAxisLabel?: string;
|
|
843
|
+
};
|
|
844
|
+
declare function Chart({ data, height, highlightLabel, maximise, palette, series, showAxis, showGrid, showLegend, showValues, title, variant, xAxisLabel, yAxisLabel, }: ChartProps): react.JSX.Element;
|
|
845
|
+
|
|
846
|
+
type SkeletonProps = {
|
|
847
|
+
animation?: SkeletonAnimation;
|
|
848
|
+
lines?: number;
|
|
849
|
+
variant?: SkeletonVariant;
|
|
850
|
+
};
|
|
851
|
+
declare function Skeleton({ animation, lines, variant, }: SkeletonProps): react.JSX.Element;
|
|
852
|
+
|
|
853
|
+
type CarouselProps = {
|
|
854
|
+
ariaLabel?: string;
|
|
855
|
+
images: GalleryImage[];
|
|
856
|
+
initialIndex?: number;
|
|
857
|
+
loop?: boolean;
|
|
858
|
+
showCaptions?: boolean;
|
|
859
|
+
showPips?: boolean;
|
|
860
|
+
};
|
|
861
|
+
declare function Carousel({ ariaLabel, images, initialIndex, loop, showCaptions, showPips, }: CarouselProps): react.JSX.Element;
|
|
862
|
+
|
|
863
|
+
type LightboxProps = {
|
|
864
|
+
dismissOnBackdrop?: boolean;
|
|
865
|
+
dismissOnEscape?: boolean;
|
|
866
|
+
image: GalleryImage;
|
|
867
|
+
open?: boolean;
|
|
868
|
+
showCaption?: boolean;
|
|
869
|
+
trigger?: ReactNode;
|
|
870
|
+
triggerLabel?: string;
|
|
871
|
+
triggerVariant?: "button" | "image";
|
|
872
|
+
onOpenChange?: (open: boolean) => void;
|
|
873
|
+
};
|
|
874
|
+
declare function Lightbox({ dismissOnBackdrop, dismissOnEscape, image, open, showCaption, trigger, triggerLabel, triggerVariant, onOpenChange, }: LightboxProps): react.JSX.Element;
|
|
875
|
+
|
|
876
|
+
type ImageThumbnailProps = {
|
|
877
|
+
ellipsisCaption?: boolean;
|
|
878
|
+
image: GalleryImage;
|
|
879
|
+
openInLightbox?: boolean;
|
|
880
|
+
showCaption?: boolean;
|
|
881
|
+
size?: "small" | "medium" | "large";
|
|
882
|
+
};
|
|
883
|
+
declare function ImageThumbnail({ ellipsisCaption, image, openInLightbox, showCaption, size, }: ImageThumbnailProps): react.JSX.Element;
|
|
884
|
+
|
|
885
|
+
type ImageGalleryProps = {
|
|
886
|
+
columns?: 2 | 3 | 4;
|
|
887
|
+
images: GalleryImage[];
|
|
888
|
+
showCaptions?: boolean;
|
|
889
|
+
thumbnailSize?: ImageThumbnailSize;
|
|
890
|
+
};
|
|
891
|
+
declare function ImageGallery({ columns, images, showCaptions, thumbnailSize, }: ImageGalleryProps): react.JSX.Element;
|
|
892
|
+
|
|
893
|
+
type ModelViewerProps = {
|
|
894
|
+
asset: ModelAsset;
|
|
895
|
+
autoRotate?: boolean;
|
|
896
|
+
cameraControls?: boolean;
|
|
897
|
+
height?: "compact" | "default" | "large" | "lightbox";
|
|
898
|
+
showCaption?: boolean;
|
|
899
|
+
};
|
|
900
|
+
declare function ModelViewer({ asset, autoRotate, cameraControls, height, showCaption, }: ModelViewerProps): react.JSX.Element;
|
|
901
|
+
|
|
902
|
+
type ModelLightboxProps = {
|
|
903
|
+
asset: ModelAsset;
|
|
904
|
+
dismissOnBackdrop?: boolean;
|
|
905
|
+
dismissOnEscape?: boolean;
|
|
906
|
+
open?: boolean;
|
|
907
|
+
showCaption?: boolean;
|
|
908
|
+
trigger?: ReactNode;
|
|
909
|
+
triggerLabel?: string;
|
|
910
|
+
onOpenChange?: (open: boolean) => void;
|
|
911
|
+
};
|
|
912
|
+
declare function ModelLightbox({ asset, dismissOnBackdrop, dismissOnEscape, open, showCaption, trigger, triggerLabel, onOpenChange, }: ModelLightboxProps): react.JSX.Element;
|
|
913
|
+
|
|
914
|
+
type ModelThumbnailProps = {
|
|
915
|
+
asset: ModelAsset;
|
|
916
|
+
openInLightbox?: boolean;
|
|
917
|
+
showCaption?: boolean;
|
|
918
|
+
size?: ModelThumbnailSize;
|
|
919
|
+
};
|
|
920
|
+
declare function ModelThumbnail({ asset, openInLightbox, showCaption, size, }: ModelThumbnailProps): react.JSX.Element;
|
|
921
|
+
|
|
922
|
+
type ModelGalleryProps = {
|
|
923
|
+
assets: ModelAsset[];
|
|
924
|
+
columns?: 2 | 3 | 4;
|
|
925
|
+
showCaptions?: boolean;
|
|
926
|
+
thumbnailSize?: ModelThumbnailSize;
|
|
927
|
+
};
|
|
928
|
+
declare function ModelGallery({ assets, columns, showCaptions, thumbnailSize, }: ModelGalleryProps): react.JSX.Element;
|
|
929
|
+
|
|
930
|
+
type EmptyStateProps = {
|
|
931
|
+
actions?: ReactNode;
|
|
932
|
+
description?: string;
|
|
933
|
+
density?: SurfaceDensity;
|
|
934
|
+
icon?: string | false;
|
|
935
|
+
title: string;
|
|
936
|
+
};
|
|
937
|
+
declare function EmptyState({ actions, description, density, icon, title, }: EmptyStateProps): react.JSX.Element;
|
|
938
|
+
|
|
939
|
+
type SidebarProps = {
|
|
940
|
+
children: ReactNode;
|
|
941
|
+
collapsed?: boolean;
|
|
942
|
+
density?: SurfaceDensity;
|
|
943
|
+
footer?: ReactNode;
|
|
944
|
+
header?: ReactNode;
|
|
945
|
+
side?: SidebarSide;
|
|
946
|
+
};
|
|
947
|
+
declare function Sidebar({ children, collapsed, density, footer, header, side, }: SidebarProps): react.JSX.Element;
|
|
948
|
+
type SidebarHeaderProps = {
|
|
949
|
+
children?: ReactNode;
|
|
950
|
+
title: string;
|
|
951
|
+
};
|
|
952
|
+
declare function SidebarHeader({ children, title }: SidebarHeaderProps): react.JSX.Element;
|
|
953
|
+
type SidebarNavProps = {
|
|
954
|
+
"aria-label": string;
|
|
955
|
+
children: ReactNode;
|
|
956
|
+
};
|
|
957
|
+
declare function SidebarNav({ "aria-label": ariaLabel, children }: SidebarNavProps): react.JSX.Element;
|
|
958
|
+
type SidebarLinkProps = {
|
|
959
|
+
active?: boolean;
|
|
960
|
+
children: ReactNode;
|
|
961
|
+
href?: string;
|
|
962
|
+
onClick?: () => void;
|
|
963
|
+
};
|
|
964
|
+
declare function SidebarLink({ active, children, href, onClick }: SidebarLinkProps): react.JSX.Element;
|
|
965
|
+
type SidebarGroupProps = {
|
|
966
|
+
children: ReactNode;
|
|
967
|
+
defaultOpen?: boolean;
|
|
968
|
+
id?: string;
|
|
969
|
+
label: string;
|
|
970
|
+
};
|
|
971
|
+
declare function SidebarGroup({ children, defaultOpen, id, label }: SidebarGroupProps): react.JSX.Element;
|
|
972
|
+
type SidebarLayoutProps = {
|
|
973
|
+
children: ReactNode;
|
|
974
|
+
collapsed?: boolean;
|
|
975
|
+
main: ReactNode;
|
|
976
|
+
side?: SidebarSide;
|
|
977
|
+
};
|
|
978
|
+
declare function SidebarLayout({ children, collapsed, main, side }: SidebarLayoutProps): react.JSX.Element;
|
|
979
|
+
|
|
980
|
+
type MegaMenuItem = {
|
|
981
|
+
description?: string;
|
|
982
|
+
href?: string;
|
|
983
|
+
icon?: ReactNode;
|
|
984
|
+
id: string;
|
|
985
|
+
label: string;
|
|
986
|
+
onSelect?: () => void;
|
|
987
|
+
};
|
|
988
|
+
type MegaMenuSection = {
|
|
989
|
+
id: string;
|
|
990
|
+
items: MegaMenuItem[];
|
|
991
|
+
title: string;
|
|
992
|
+
};
|
|
993
|
+
type MegaMenuFeatured = {
|
|
994
|
+
actionLabel?: string;
|
|
995
|
+
description: string;
|
|
996
|
+
eyebrow?: string;
|
|
997
|
+
title: string;
|
|
998
|
+
};
|
|
999
|
+
type MegaMenuConfig = {
|
|
1000
|
+
featured?: MegaMenuFeatured;
|
|
1001
|
+
id: string;
|
|
1002
|
+
label: string;
|
|
1003
|
+
sections: MegaMenuSection[];
|
|
1004
|
+
};
|
|
1005
|
+
type MegaMenuProps = {
|
|
1006
|
+
activeMenu?: string;
|
|
1007
|
+
closeOnEscape?: boolean;
|
|
1008
|
+
closeOnOutside?: boolean;
|
|
1009
|
+
density?: SurfaceDensity;
|
|
1010
|
+
featured?: MegaMenuFeatured;
|
|
1011
|
+
label?: string;
|
|
1012
|
+
menus?: MegaMenuConfig[];
|
|
1013
|
+
navigationId?: string;
|
|
1014
|
+
onActiveMenuChange?: (menuId: string) => void;
|
|
1015
|
+
onOpenChange?: (open: boolean) => void;
|
|
1016
|
+
onSelect?: (item: MegaMenuItem) => void;
|
|
1017
|
+
open?: boolean;
|
|
1018
|
+
sections?: MegaMenuSection[];
|
|
1019
|
+
staticPanel?: boolean;
|
|
1020
|
+
triggerLabel?: string;
|
|
1021
|
+
};
|
|
1022
|
+
declare const defaultMegaMenuFeatured: MegaMenuFeatured;
|
|
1023
|
+
declare const defaultMegaMenuMenus: MegaMenuConfig[];
|
|
1024
|
+
declare const defaultMegaMenuSections: MegaMenuSection[];
|
|
1025
|
+
declare const defaultTopNavigationMegaMenus: MegaMenuConfig[];
|
|
1026
|
+
declare function MegaMenu({ activeMenu, closeOnEscape, closeOnOutside, density, featured, label, menus, navigationId, onActiveMenuChange, onOpenChange, onSelect, open, sections, staticPanel, triggerLabel, }: MegaMenuProps): react.JSX.Element;
|
|
1027
|
+
|
|
1028
|
+
type TopNavigationSelectItem = {
|
|
1029
|
+
description?: string;
|
|
1030
|
+
id: string;
|
|
1031
|
+
label: string;
|
|
1032
|
+
};
|
|
1033
|
+
type TopNavigationContextValue = {
|
|
1034
|
+
activeMenu: string | null;
|
|
1035
|
+
closeMenu: () => void;
|
|
1036
|
+
closeOnEscape: boolean;
|
|
1037
|
+
closeOnOutside: boolean;
|
|
1038
|
+
closeOnSelect: boolean;
|
|
1039
|
+
onMenuSelect?: (menuId: string, item: TopNavigationSelectItem) => void;
|
|
1040
|
+
openMenu: (menuId: string) => void;
|
|
1041
|
+
presentMenus: ReadonlySet<string>;
|
|
1042
|
+
setMenuPresent: (menuId: string, present: boolean) => void;
|
|
1043
|
+
showShortcuts: boolean;
|
|
1044
|
+
};
|
|
1045
|
+
declare function useTopNavigation(): TopNavigationContextValue | null;
|
|
1046
|
+
|
|
1047
|
+
type TopNavigationMenuConfig = {
|
|
1048
|
+
id: string;
|
|
1049
|
+
items: DropdownMenuItemData[];
|
|
1050
|
+
label: string;
|
|
1051
|
+
};
|
|
1052
|
+
type TopNavigationDropdownMenu = {
|
|
1053
|
+
type: "dropdown";
|
|
1054
|
+
id: string;
|
|
1055
|
+
items: DropdownMenuItemData[];
|
|
1056
|
+
label: string;
|
|
1057
|
+
};
|
|
1058
|
+
type TopNavigationMegaMenu = {
|
|
1059
|
+
type: "mega";
|
|
1060
|
+
featured?: MegaMenuFeatured;
|
|
1061
|
+
id: string;
|
|
1062
|
+
label: string;
|
|
1063
|
+
sections: MegaMenuSection[];
|
|
1064
|
+
};
|
|
1065
|
+
type TopNavigationBarMenu = TopNavigationDropdownMenu | TopNavigationMegaMenu;
|
|
1066
|
+
declare const defaultTopNavigationMenus: TopNavigationMenuConfig[];
|
|
1067
|
+
declare const defaultTopNavigationBarMenus: TopNavigationBarMenu[];
|
|
1068
|
+
type TopNavigationMenuProps = {
|
|
1069
|
+
children?: ReactNode;
|
|
1070
|
+
id?: string;
|
|
1071
|
+
items?: DropdownMenuItemData[];
|
|
1072
|
+
label: string;
|
|
1073
|
+
};
|
|
1074
|
+
declare function TopNavigationMenu({ children, id, items, label }: TopNavigationMenuProps): react.JSX.Element;
|
|
1075
|
+
declare namespace TopNavigationMenu {
|
|
1076
|
+
var displayName: string;
|
|
1077
|
+
}
|
|
1078
|
+
type TopNavigationProps = {
|
|
1079
|
+
activeMenu?: string | null;
|
|
1080
|
+
children?: ReactNode;
|
|
1081
|
+
closeOnEscape?: boolean;
|
|
1082
|
+
closeOnOutside?: boolean;
|
|
1083
|
+
closeOnSelect?: boolean;
|
|
1084
|
+
density?: SurfaceDensity;
|
|
1085
|
+
menus?: TopNavigationBarMenu[];
|
|
1086
|
+
onActiveMenuChange?: (menuId: string | null) => void;
|
|
1087
|
+
onSelect?: (menuId: string, item: TopNavigationSelectItem) => void;
|
|
1088
|
+
showShortcuts?: boolean;
|
|
1089
|
+
};
|
|
1090
|
+
declare function TopNavigation({ activeMenu, children, closeOnEscape, closeOnOutside, closeOnSelect, density, menus, onActiveMenuChange, onSelect, showShortcuts, }: TopNavigationProps): react.JSX.Element;
|
|
1091
|
+
|
|
1092
|
+
type AccentColor = {
|
|
1093
|
+
label: string;
|
|
1094
|
+
value: string;
|
|
1095
|
+
};
|
|
1096
|
+
declare const accentColors: AccentColor[];
|
|
1097
|
+
declare function createAccentStyle(accent: string): CSSProperties;
|
|
1098
|
+
declare function useAccentPreference(): {
|
|
1099
|
+
accent: string;
|
|
1100
|
+
accentStyle: CSSProperties;
|
|
1101
|
+
setAccent: (next: string) => void;
|
|
1102
|
+
};
|
|
1103
|
+
type AccentColorPickerProps = {
|
|
1104
|
+
id: string;
|
|
1105
|
+
label?: string;
|
|
1106
|
+
labelPosition?: LabelPosition;
|
|
1107
|
+
mode?: FieldMode;
|
|
1108
|
+
value: string;
|
|
1109
|
+
onChange: (value: string) => void;
|
|
1110
|
+
};
|
|
1111
|
+
declare function AccentColorPicker({ id, label, labelPosition, mode, onChange, value, }: AccentColorPickerProps): react.JSX.Element;
|
|
1112
|
+
|
|
1113
|
+
type CatalogIconProps = {
|
|
1114
|
+
iconName: string;
|
|
1115
|
+
};
|
|
1116
|
+
declare function CatalogIcon({ iconName }: CatalogIconProps): react.JSX.Element;
|
|
1117
|
+
|
|
1118
|
+
type IconPickerProps = {
|
|
1119
|
+
id: string;
|
|
1120
|
+
label?: string;
|
|
1121
|
+
labelPosition?: LabelPosition;
|
|
1122
|
+
mode?: FieldMode;
|
|
1123
|
+
searchPlaceholder?: string;
|
|
1124
|
+
value: string;
|
|
1125
|
+
onChange: (value: string) => void;
|
|
1126
|
+
};
|
|
1127
|
+
declare function IconPicker({ id, label, labelPosition, mode, onChange, searchPlaceholder, value, }: IconPickerProps): react.JSX.Element;
|
|
1128
|
+
|
|
1129
|
+
export { type AccentColor, AccentColorPicker, Accordion, AccordionGroup, type AccordionGroupType, Alert, type AlertStatus, Button, type ButtonVariant, Card, Carousel, CatalogIcon, Chart, type ChartDatum, type ChartPalette, type ChartSeries, type ChartVariant, CheckboxField, ChipInput, ChipInputField, type ChipInputPreset, type ChipInputVariant, type ChoiceOption, type ChoiceShape, ColorField, CommandPalette, type CommandPaletteItem, ContextMenuProvider, ContextMenuTarget, DEFAULT_TOAST_DURATION_MS, DataGrid, type DataGridColumn, type DataGridRow, type DataGridRowHeaderColumn, DateField, type DateInputType, Dialog, type DialogActionSet, type DialogResult, Drawer, DrawerDefaultActions, type DrawerSide, DropdownMenu, DropdownMenuItem, type DropdownMenuItemData, type DropdownMenuPlacement, EmptyState, type EmptyStateIcon, type FieldMode, FieldShell, FileField, type GalleryImage, Gauge, type GaugeFooterItem, type GaugeTrend, type GaugeVariant, HiddenField, IconPicker, ImageGallery, ImageThumbnail, type ImageThumbnailSize, type LabelPosition, Lightbox, MegaMenu, type MegaMenuConfig, type MegaMenuFeatured, type MegaMenuItem, type MegaMenuSection, MetricTile, Modal, ModalDefaultActions, type ModalSize, type ModelAsset, ModelGallery, ModelLightbox, ModelThumbnail, type ModelThumbnailSize, ModelViewer, NumberField, OpusThemeProvider, Panel, Popover, type PopoverPlacement, ProgressBar, ProgressRing, Radio, RadioGroup, RangeField, Section, type SectionAlign, type SectionColumns, type SectionGap, type SectionJustify, type SectionLayoutPreset, type SectionSidebar, type SectionSidebarRatio, type SectionSpan, type SectionStackBelow, type SectionTemplate, type SectionWidth, SelectField, ShowMore, type ShowToastOptions, Sidebar, SidebarGroup, SidebarHeader, SidebarLayout, SidebarLink, SidebarNav, type SidebarSide, Skeleton, type SkeletonAnimation, type SkeletonVariant, Sparkline, Speedometer, StatCard, type StatCardTrend, StatusIndicator, type StatusIndicatorState, type SurfaceDensity, type SurfaceTone, SwitchField, type TabItem, Table, type TableColumn, type TableDensity, type TableRow, Tabs, type TabsOrientation, type TabsVariant, TextAreaField, TextField, type Theme, ThemeToggleField, Toast, type ToastHorizontalPosition, ToastProvider, type ToastVerticalPosition, type ToastViewportPosition, Tooltip, TopNavigation, type TopNavigationBarMenu, type TopNavigationDropdownMenu, type TopNavigationMegaMenu, TopNavigationMenu, type TopNavigationMenuConfig, type TopNavigationSelectItem, TrendBadge, type TrendBadgeDirection, accentColors, createAccentStyle, defaultMegaMenuFeatured, defaultMegaMenuMenus, defaultMegaMenuSections, defaultTopNavigationBarMenus, defaultTopNavigationMegaMenus, defaultTopNavigationMenus, fieldInputAriaProps, useAccentPreference, useContextMenu, useFieldShellAria, useOpusTheme, useToast, useTopNavigation };
|