@nurix/ui-component-library 1.1.3 → 1.1.4-stage.114
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 +95 -0
- package/dist/agent-avatar-ZI4HOQHG.png +0 -0
- package/dist/index.d.mts +2706 -12
- package/dist/index.d.ts +2706 -12
- package/dist/index.js +16032 -88
- package/dist/index.mjs +15964 -70
- package/dist/styles.css +3620 -0
- package/package.json +33 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,30 @@
|
|
|
1
|
-
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
1
|
import * as React$1 from 'react';
|
|
2
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
6
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
7
|
+
import { Toaster as Toaster$1 } from 'sonner';
|
|
8
|
+
import { LucideIcon } from 'lucide-react';
|
|
9
|
+
import { Schema } from 'ajv';
|
|
10
|
+
import { OnMount } from '@monaco-editor/react';
|
|
3
11
|
|
|
4
|
-
type ButtonBorderRadius = "none" | "soft" | "rounded" | "
|
|
5
|
-
type ButtonVariant = "
|
|
6
|
-
type ButtonSize = "default" | "sm" | "
|
|
7
|
-
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
12
|
+
type ButtonBorderRadius = "none" | "soft" | "rounded" | "nestedLeft" | "nestedMiddle" | "nestedRight";
|
|
13
|
+
type ButtonVariant = "primary" | "secondary" | "destructive" | "outline" | "link" | "iconPrimary" | "iconSecondary" | "iconOutline" | "iconLink";
|
|
14
|
+
type ButtonSize = "lg" | "default" | "sm" | "xs" | "link" | "icon" | "iconMd" | "iconSm" | "iconXs";
|
|
15
|
+
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
8
16
|
variant?: ButtonVariant;
|
|
9
17
|
size?: ButtonSize;
|
|
10
18
|
onClick?: () => void;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Optional leading/trailing icons (e.g. lucide-react). If `asChild` is true,
|
|
22
|
+
* children layout is controlled by the consumer, so these are not injected.
|
|
23
|
+
*/
|
|
24
|
+
leadingIcon?: React$1.ReactNode;
|
|
25
|
+
trailingIcon?: React$1.ReactNode;
|
|
26
|
+
showLeadingIcon?: boolean;
|
|
27
|
+
showTrailingIcon?: boolean;
|
|
11
28
|
/**
|
|
12
29
|
* Design-system controlled border radius
|
|
13
30
|
*/
|
|
@@ -15,13 +32,2690 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
15
32
|
asChild?: boolean;
|
|
16
33
|
}
|
|
17
34
|
|
|
35
|
+
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
36
|
+
interface NestedButtonGroupProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
37
|
+
children: React$1.ReactNode;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* NestedButtonGroup — renders any number of `<Button>` children as one pill.
|
|
41
|
+
* Assigns the correct `button_border_radius` (nestedLeft / nestedMiddle /
|
|
42
|
+
* nestedRight) per position and overlaps borders by -1px so the shared edge
|
|
43
|
+
* draws once. Figma: 5490:33596.
|
|
44
|
+
*/
|
|
45
|
+
declare const NestedButtonGroup: React$1.ForwardRefExoticComponent<NestedButtonGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
46
|
+
|
|
47
|
+
type InputBorderRadius = "none" | "soft" | "rounded" | "pill";
|
|
48
|
+
type InputVariant = "grey" | "white" | "borderless";
|
|
49
|
+
type SupportingTextType = "help" | "error" | "success";
|
|
50
|
+
type InputForceState = "active" | "focussed" | "disabled";
|
|
18
51
|
/**
|
|
19
|
-
*
|
|
52
|
+
* Input size variant.
|
|
53
|
+
* - `md` (default): 40px height — standard forms.
|
|
54
|
+
* - `sm`: 32px height — compact use (filter dropdowns, toolbars).
|
|
20
55
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
56
|
+
type InputSize = "md" | "sm";
|
|
57
|
+
interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
58
|
+
/**
|
|
59
|
+
* Optional label shown above the field.
|
|
60
|
+
*/
|
|
61
|
+
label?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Whether to show a red "*" required indicator next to the label.
|
|
64
|
+
*/
|
|
65
|
+
mandatory?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Icon or element rendered in the leading slot (left side, 16px).
|
|
68
|
+
*/
|
|
69
|
+
leadingIcon?: React$1.ReactNode;
|
|
70
|
+
/**
|
|
71
|
+
* Icon or element rendered in the trailing slot (right side, 16px).
|
|
72
|
+
*/
|
|
73
|
+
trailingIcon?: React$1.ReactNode;
|
|
74
|
+
/**
|
|
75
|
+
* Suffix text rendered at the trailing end (e.g. ".com", "kg").
|
|
76
|
+
* Ignored when `trailingIcon` is provided.
|
|
77
|
+
*/
|
|
78
|
+
suffix?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Supporting/help/error text shown below the field.
|
|
81
|
+
*/
|
|
82
|
+
supportingText?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Visual style for supporting text.
|
|
85
|
+
*/
|
|
86
|
+
supportingTextType?: SupportingTextType;
|
|
87
|
+
/**
|
|
88
|
+
* Hide the supporting text row (even if `supportingText` is provided).
|
|
89
|
+
*/
|
|
90
|
+
hideSupportingText?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Input field background variant in light mode.
|
|
93
|
+
* grey: light grey background (--input). white: white background (--card).
|
|
94
|
+
* @default "grey"
|
|
95
|
+
*/
|
|
96
|
+
inputVariant?: InputVariant;
|
|
97
|
+
/**
|
|
98
|
+
* Size variant of the input field.
|
|
99
|
+
* - `md` (default): 40px height. Standard forms.
|
|
100
|
+
* - `sm`: 32px height, compact vertical padding. Used in filter dropdowns / toolbars.
|
|
101
|
+
* @default "md"
|
|
102
|
+
*/
|
|
103
|
+
inputSize?: InputSize;
|
|
104
|
+
/**
|
|
105
|
+
* Design-system controlled border radius.
|
|
106
|
+
*/
|
|
107
|
+
input_border_radius?: InputBorderRadius;
|
|
108
|
+
/**
|
|
109
|
+
* Force a visual state (useful for sticker-sheet stories).
|
|
110
|
+
* When unset, focus/disabled styles are derived from real DOM state.
|
|
111
|
+
*/
|
|
112
|
+
forceState?: InputForceState;
|
|
113
|
+
/**
|
|
114
|
+
* Marks the field as invalid (shadcn-style).
|
|
115
|
+
* Sets `aria-invalid` and applies destructive border/ring styling.
|
|
116
|
+
*
|
|
117
|
+
* Note: `supportingTextType="error"` will also style the field as invalid.
|
|
118
|
+
*/
|
|
119
|
+
invalid?: boolean;
|
|
120
|
+
}
|
|
121
|
+
interface FileInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "onChange"> {
|
|
122
|
+
label?: string;
|
|
123
|
+
mandatory?: boolean;
|
|
124
|
+
buttonLabel?: string;
|
|
125
|
+
placeholder?: string;
|
|
126
|
+
fileName?: string;
|
|
127
|
+
input_border_radius?: InputBorderRadius;
|
|
128
|
+
inputVariant?: InputVariant;
|
|
129
|
+
onFileChange?: (file: File | null) => void;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
declare const Input: React$1.ForwardRefExoticComponent<InputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
133
|
+
|
|
134
|
+
declare const FileInput: React$1.ForwardRefExoticComponent<FileInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
135
|
+
|
|
136
|
+
type InputGroupBorderRadius = "none" | "soft" | "rounded" | "pill";
|
|
137
|
+
type InputGroupForceState = "active" | "focussed" | "disabled";
|
|
138
|
+
interface InputGroupProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
139
|
+
/**
|
|
140
|
+
* Optional label shown above the field.
|
|
141
|
+
*/
|
|
142
|
+
label?: string;
|
|
143
|
+
/**
|
|
144
|
+
* Whether to show a red "*" required indicator next to the label.
|
|
145
|
+
*/
|
|
146
|
+
mandatory?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Supporting/help/error text shown below the field.
|
|
149
|
+
*/
|
|
150
|
+
supportingText?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Force a visual state (useful for sticker-sheet stories).
|
|
153
|
+
*/
|
|
154
|
+
forceState?: InputGroupForceState;
|
|
155
|
+
/**
|
|
156
|
+
* Marks the field as invalid.
|
|
157
|
+
*/
|
|
158
|
+
invalid?: boolean;
|
|
159
|
+
/**
|
|
160
|
+
* Optional content shown on the left of the input (icon/text/button).
|
|
161
|
+
*/
|
|
162
|
+
startAdornment?: React$1.ReactNode;
|
|
163
|
+
/**
|
|
164
|
+
* Optional content shown on the right of the input (icon/text/button).
|
|
165
|
+
*/
|
|
166
|
+
endAdornment?: React$1.ReactNode;
|
|
167
|
+
/**
|
|
168
|
+
* Optional content separated by a divider on the far left (e.g. "https://").
|
|
169
|
+
*/
|
|
170
|
+
startSegment?: React$1.ReactNode;
|
|
171
|
+
/**
|
|
172
|
+
* Optional content separated by a divider on the far right (e.g. ".com").
|
|
173
|
+
*/
|
|
174
|
+
endSegment?: React$1.ReactNode;
|
|
175
|
+
input_border_radius?: InputGroupBorderRadius;
|
|
176
|
+
/**
|
|
177
|
+
* Input field background variant in light mode.
|
|
178
|
+
* grey: light grey (--input). white: white (--card).
|
|
179
|
+
* @default "grey"
|
|
180
|
+
*/
|
|
181
|
+
inputVariant?: InputVariant;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
declare const InputGroup: React$1.ForwardRefExoticComponent<InputGroupProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
185
|
+
|
|
186
|
+
type TextareaBorderRadius = "none" | "soft" | "rounded" | "pill";
|
|
187
|
+
type TextareaForceState = "active" | "focussed" | "disabled";
|
|
188
|
+
interface TextareaProps extends Omit<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, "style"> {
|
|
189
|
+
/**
|
|
190
|
+
* Optional label shown above the field.
|
|
191
|
+
*/
|
|
192
|
+
label?: string;
|
|
193
|
+
/**
|
|
194
|
+
* Whether to show a red "*" required indicator next to the label.
|
|
195
|
+
*/
|
|
196
|
+
mandatory?: boolean;
|
|
197
|
+
/**
|
|
198
|
+
* Supporting/help/error text shown below the field.
|
|
199
|
+
*/
|
|
200
|
+
supportingText?: string;
|
|
201
|
+
/**
|
|
202
|
+
* Visual style for supporting text.
|
|
203
|
+
*/
|
|
204
|
+
supportingTextType?: SupportingTextType;
|
|
205
|
+
/**
|
|
206
|
+
* Hide the supporting text row (even if `supportingText` is provided).
|
|
207
|
+
*/
|
|
208
|
+
hideSupportingText?: boolean;
|
|
209
|
+
/**
|
|
210
|
+
* Input field background variant in light mode.
|
|
211
|
+
* grey: light grey (--input). white: white (--card).
|
|
212
|
+
* @default "grey"
|
|
213
|
+
*/
|
|
214
|
+
inputVariant?: InputVariant;
|
|
215
|
+
/**
|
|
216
|
+
* Design-system controlled border radius.
|
|
217
|
+
*/
|
|
218
|
+
input_border_radius?: TextareaBorderRadius;
|
|
219
|
+
/**
|
|
220
|
+
* Force a visual state (useful for sticker-sheet stories).
|
|
221
|
+
* When unset, focus/disabled styles are derived from real DOM state.
|
|
222
|
+
*/
|
|
223
|
+
forceState?: TextareaForceState;
|
|
224
|
+
/**
|
|
225
|
+
* Marks the field as invalid.
|
|
226
|
+
* Sets `aria-invalid` and applies destructive border/ring styling.
|
|
227
|
+
*/
|
|
228
|
+
invalid?: boolean;
|
|
229
|
+
/**
|
|
230
|
+
* Resize behavior of the textarea.
|
|
231
|
+
*/
|
|
232
|
+
resize?: "none" | "vertical" | "horizontal" | "both";
|
|
233
|
+
style?: React$1.CSSProperties;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Textarea - Standalone textarea component.
|
|
238
|
+
* Matches Input component structure and states (label, supportingText, forceState, invalid, etc).
|
|
239
|
+
*/
|
|
240
|
+
declare const Textarea: React$1.ForwardRefExoticComponent<TextareaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
241
|
+
|
|
242
|
+
type SwitchSize = "default" | "small";
|
|
243
|
+
interface SwitchProps {
|
|
244
|
+
/**
|
|
245
|
+
* Controlled checked state.
|
|
246
|
+
*/
|
|
247
|
+
checked?: boolean;
|
|
248
|
+
/**
|
|
249
|
+
* Uncontrolled initial state.
|
|
250
|
+
*/
|
|
251
|
+
defaultChecked?: boolean;
|
|
252
|
+
/**
|
|
253
|
+
* Called whenever the checked state changes.
|
|
254
|
+
*/
|
|
255
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
256
|
+
disabled?: boolean;
|
|
257
|
+
size?: SwitchSize;
|
|
258
|
+
/**
|
|
259
|
+
* Whether to show the label. When true, label will be displayed for both on and off states.
|
|
260
|
+
*/
|
|
261
|
+
showLabel?: boolean;
|
|
262
|
+
/**
|
|
263
|
+
* The label text to display. Will show "Toggle On" or "Toggle Off" based on state if not provided.
|
|
264
|
+
*/
|
|
265
|
+
labelText?: string;
|
|
266
|
+
/**
|
|
267
|
+
* Placement of the label relative to the switch.
|
|
268
|
+
* @default "right"
|
|
269
|
+
*/
|
|
270
|
+
labelPlacement?: "left" | "right";
|
|
271
|
+
/**
|
|
272
|
+
* Optional id for associating external labels.
|
|
273
|
+
*/
|
|
274
|
+
id?: string;
|
|
275
|
+
className?: string;
|
|
276
|
+
style?: React$1.CSSProperties;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
declare const Switch: React$1.ForwardRefExoticComponent<SwitchProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
280
|
+
|
|
281
|
+
declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* shadcn-style Checkbox props (Radix primitive props).
|
|
285
|
+
* Note: Radix supports `checked: boolean | "indeterminate"`. Figma uses boolean.
|
|
286
|
+
*/
|
|
287
|
+
type CheckboxProps = React$1.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>;
|
|
288
|
+
|
|
289
|
+
declare const RadioGroup: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
290
|
+
declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
291
|
+
|
|
292
|
+
type RadioGroupProps = React$1.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>;
|
|
293
|
+
type RadioGroupItemProps = React$1.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>;
|
|
294
|
+
|
|
295
|
+
type DialogHeaderNavigationVariant = "primary" | "inner";
|
|
296
|
+
type BackButtonPosition = "left" | "right";
|
|
297
|
+
interface DialogHeaderNavigationProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
298
|
+
title: string;
|
|
299
|
+
subtitle?: string;
|
|
300
|
+
/**
|
|
301
|
+
* `primary`: title/subtitle only
|
|
302
|
+
* `inner`: shows a back affordance (arrow)
|
|
303
|
+
*/
|
|
304
|
+
variant?: DialogHeaderNavigationVariant;
|
|
305
|
+
onBack?: () => void;
|
|
306
|
+
backButtonAriaLabel?: string;
|
|
307
|
+
backButtonPosition?: BackButtonPosition;
|
|
308
|
+
disabled?: boolean;
|
|
309
|
+
}
|
|
310
|
+
type TabVariant = "top" | "side" | "section";
|
|
311
|
+
interface ListNavItemProps {
|
|
312
|
+
/** Unique identifier */
|
|
313
|
+
id: string;
|
|
314
|
+
/** Primary text */
|
|
315
|
+
title: string;
|
|
316
|
+
/** Secondary text */
|
|
317
|
+
subtitle?: string;
|
|
318
|
+
/** Trailing content (badges, icons, etc.) */
|
|
319
|
+
trailing?: React$1.ReactNode;
|
|
320
|
+
}
|
|
321
|
+
interface ListNavigationProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, 'onSelect'> {
|
|
322
|
+
/** List of items */
|
|
323
|
+
items: ListNavItemProps[];
|
|
324
|
+
/** Currently selected item id */
|
|
325
|
+
selectedId?: string | null;
|
|
326
|
+
/** Callback when an item is clicked */
|
|
327
|
+
onSelect?: (id: string) => void;
|
|
328
|
+
}
|
|
329
|
+
interface TabsProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
330
|
+
value?: string;
|
|
331
|
+
defaultValue?: string;
|
|
332
|
+
onValueChange?: (value: string) => void;
|
|
333
|
+
variant?: TabVariant;
|
|
334
|
+
}
|
|
335
|
+
interface TabsListProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
336
|
+
variant?: TabVariant;
|
|
337
|
+
}
|
|
338
|
+
interface TabsTriggerProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
339
|
+
value: string;
|
|
340
|
+
variant?: TabVariant;
|
|
341
|
+
iconLeft?: React$1.ReactNode;
|
|
342
|
+
}
|
|
343
|
+
interface TabsContentProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
344
|
+
value: string;
|
|
345
|
+
forceMount?: boolean;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
declare const DialogHeaderNavigation: React$1.ForwardRefExoticComponent<DialogHeaderNavigationProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
349
|
+
|
|
350
|
+
declare function Tabs({ className, value, defaultValue, onValueChange, variant, ...props }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
351
|
+
declare const TabsList: React$1.ForwardRefExoticComponent<TabsListProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
352
|
+
declare const TabsTrigger: React$1.ForwardRefExoticComponent<TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
353
|
+
declare function TabsContent({ value, forceMount, className, children, ...props }: TabsContentProps): react_jsx_runtime.JSX.Element | null;
|
|
354
|
+
/**
|
|
355
|
+
* ListNavigation — A vertical list of selectable items (e.g. call history).
|
|
356
|
+
* Based on Figma design node: 5503:34142
|
|
357
|
+
*/
|
|
358
|
+
declare const ListNavigation: React$1.ForwardRefExoticComponent<ListNavigationProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
359
|
+
|
|
360
|
+
type AccordionType = "single" | "multiple";
|
|
361
|
+
type AccordionValue<TType extends AccordionType> = TType extends "multiple" ? string[] : string | null;
|
|
362
|
+
type AccordionOnValueChange<TType extends AccordionType> = (value: AccordionValue<TType>) => void;
|
|
363
|
+
interface AccordionProps<TType extends AccordionType = "single"> extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> {
|
|
364
|
+
type?: TType;
|
|
365
|
+
/**
|
|
366
|
+
* When `type="single"`, allows collapsing the open item.
|
|
367
|
+
*/
|
|
368
|
+
collapsible?: boolean;
|
|
369
|
+
value?: AccordionValue<TType>;
|
|
370
|
+
defaultValue?: AccordionValue<TType>;
|
|
371
|
+
onValueChange?: AccordionOnValueChange<TType>;
|
|
372
|
+
disabled?: boolean;
|
|
373
|
+
}
|
|
374
|
+
interface AccordionItemProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
375
|
+
value: string;
|
|
376
|
+
disabled?: boolean;
|
|
377
|
+
}
|
|
378
|
+
interface AccordionTriggerProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
379
|
+
/**
|
|
380
|
+
* Optional description under the label (matches Figma).
|
|
381
|
+
*/
|
|
382
|
+
description?: React$1.ReactNode;
|
|
383
|
+
/**
|
|
384
|
+
* Optional right-side action (e.g. "Add" button).
|
|
385
|
+
* Note: click events are stopped from toggling the accordion.
|
|
386
|
+
*/
|
|
387
|
+
action?: React$1.ReactNode;
|
|
388
|
+
}
|
|
389
|
+
interface AccordionContentProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
390
|
+
}
|
|
391
|
+
interface AccordionSectionTriggerProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
392
|
+
/**
|
|
393
|
+
* Label shown inside the pill (Figma: "Summary"). Children override.
|
|
394
|
+
*/
|
|
395
|
+
label?: React$1.ReactNode;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
declare function Accordion<TType extends AccordionType = "single">({ className, type, collapsible, value, defaultValue, onValueChange, disabled, ...props }: AccordionProps<TType>): react_jsx_runtime.JSX.Element;
|
|
399
|
+
declare const AccordionItem: React$1.ForwardRefExoticComponent<AccordionItemProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
400
|
+
declare const AccordionTrigger: React$1.ForwardRefExoticComponent<AccordionTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
401
|
+
/**
|
|
402
|
+
* Section-separator trigger (Figma 6128:5627). A compact pill that separates
|
|
403
|
+
* sections within a card or page. Use in place of `AccordionTrigger` inside
|
|
404
|
+
* an `AccordionItem` — it wires into the same Radix state and flips the
|
|
405
|
+
* chevron when `data-state=open`.
|
|
406
|
+
*/
|
|
407
|
+
declare const AccordionSectionTrigger: React$1.ForwardRefExoticComponent<AccordionSectionTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
408
|
+
declare const AccordionContent: React$1.ForwardRefExoticComponent<AccordionContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
409
|
+
declare function AccordionContentPlaceholder({ className, children, }: {
|
|
410
|
+
className?: string;
|
|
411
|
+
children?: React$1.ReactNode;
|
|
412
|
+
}): react_jsx_runtime.JSX.Element;
|
|
413
|
+
|
|
414
|
+
type AvatarSize = "xxs" | "xs" | "sm" | "default" | "lg";
|
|
415
|
+
type AvatarShape = "circle" | "square";
|
|
416
|
+
interface AvatarProps {
|
|
417
|
+
/**
|
|
418
|
+
* The image source URL for the avatar.
|
|
419
|
+
*/
|
|
420
|
+
src?: string;
|
|
421
|
+
/**
|
|
422
|
+
* Alt text for the avatar image.
|
|
423
|
+
*/
|
|
424
|
+
alt?: string;
|
|
425
|
+
/**
|
|
426
|
+
* Fallback text to display when image fails to load (typically initials).
|
|
427
|
+
*/
|
|
428
|
+
fallback?: string;
|
|
429
|
+
/**
|
|
430
|
+
* Size of the avatar.
|
|
431
|
+
* @default "default"
|
|
432
|
+
*/
|
|
433
|
+
size?: AvatarSize;
|
|
434
|
+
/**
|
|
435
|
+
* Shape of the avatar.
|
|
436
|
+
* @default "circle"
|
|
437
|
+
*/
|
|
438
|
+
shape?: AvatarShape;
|
|
439
|
+
className?: string;
|
|
440
|
+
style?: React$1.CSSProperties;
|
|
441
|
+
}
|
|
442
|
+
interface AvatarGroupProps {
|
|
443
|
+
/**
|
|
444
|
+
* Maximum number of avatars to display before showing overflow indicator.
|
|
445
|
+
* @default 3
|
|
446
|
+
*/
|
|
447
|
+
max?: number;
|
|
448
|
+
/**
|
|
449
|
+
* Size of the avatars in the group.
|
|
450
|
+
* @default "default"
|
|
451
|
+
*/
|
|
452
|
+
size?: AvatarSize;
|
|
453
|
+
/**
|
|
454
|
+
* Shape of the avatars in the group.
|
|
455
|
+
* @default "circle"
|
|
456
|
+
*/
|
|
457
|
+
shape?: AvatarShape;
|
|
458
|
+
/**
|
|
459
|
+
* The avatar items to display.
|
|
460
|
+
*/
|
|
461
|
+
children: React$1.ReactNode;
|
|
462
|
+
className?: string;
|
|
463
|
+
style?: React$1.CSSProperties;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Avatar component - An image element with a fallback for representing the user.
|
|
468
|
+
* Based on Figma design node: 3316:3490
|
|
469
|
+
*/
|
|
470
|
+
declare const Avatar: React$1.ForwardRefExoticComponent<AvatarProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
471
|
+
/**
|
|
472
|
+
* AvatarGroup component - Displays multiple avatars in a stacked layout
|
|
473
|
+
*/
|
|
474
|
+
declare const AvatarGroup: React$1.ForwardRefExoticComponent<AvatarGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
475
|
+
|
|
476
|
+
type BadgeVariant = "default" | "secondary" | "destructive" | "outline" | "success" | "warning";
|
|
477
|
+
/**
|
|
478
|
+
* A tag option for the TagBadge dropdown menu.
|
|
479
|
+
*/
|
|
480
|
+
interface TagOption {
|
|
481
|
+
value: string;
|
|
482
|
+
label: string;
|
|
483
|
+
/** Badge variant to use when this tag is selected */
|
|
484
|
+
variant?: BadgeVariant;
|
|
485
|
+
/** Custom background color (overrides variant) */
|
|
486
|
+
background?: string;
|
|
487
|
+
/** Custom text color (overrides variant) */
|
|
488
|
+
color?: string;
|
|
489
|
+
}
|
|
490
|
+
interface BadgeProps {
|
|
491
|
+
/**
|
|
492
|
+
* The badge variant style.
|
|
493
|
+
* @default "default"
|
|
494
|
+
*/
|
|
495
|
+
variant?: BadgeVariant;
|
|
496
|
+
/**
|
|
497
|
+
* The badge label text.
|
|
498
|
+
*/
|
|
499
|
+
label?: string;
|
|
500
|
+
/**
|
|
501
|
+
* Optional leading icon (renders before the label).
|
|
502
|
+
*/
|
|
503
|
+
leadingIcon?: React$1.ReactNode;
|
|
504
|
+
/**
|
|
505
|
+
* Optional trailing icon (renders after the label).
|
|
506
|
+
*/
|
|
507
|
+
trailingIcon?: React$1.ReactNode;
|
|
508
|
+
/**
|
|
509
|
+
* Whether to show the leading icon.
|
|
510
|
+
* @default true
|
|
511
|
+
*/
|
|
512
|
+
showLeadingIcon?: boolean;
|
|
513
|
+
/**
|
|
514
|
+
* Whether to show the trailing icon.
|
|
515
|
+
* @default true
|
|
516
|
+
*/
|
|
517
|
+
showTrailingIcon?: boolean;
|
|
518
|
+
/**
|
|
519
|
+
* Badge content (alternative to label prop).
|
|
520
|
+
*/
|
|
521
|
+
children?: React$1.ReactNode;
|
|
522
|
+
/**
|
|
523
|
+
* Click handler. When provided, badge renders as a button.
|
|
524
|
+
*/
|
|
525
|
+
onClick?: (e: React$1.MouseEvent) => void;
|
|
526
|
+
/**
|
|
527
|
+
* When false, disables hover/pressed/focus affordances and cursor-pointer.
|
|
528
|
+
* Useful for read-only / view-only badges that should not appear clickable.
|
|
529
|
+
* @default true
|
|
530
|
+
*/
|
|
531
|
+
interactive?: boolean;
|
|
532
|
+
className?: string;
|
|
533
|
+
style?: React$1.CSSProperties;
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Props for TagBadge - an interactive badge that opens a dropdown to select a tag.
|
|
537
|
+
* Mirrors the TagsDropdown pattern from the zero repo.
|
|
538
|
+
*/
|
|
539
|
+
interface TagBadgeProps {
|
|
540
|
+
/** Currently selected tag value */
|
|
541
|
+
value: string | null;
|
|
542
|
+
/** Callback when a tag is selected */
|
|
543
|
+
onValueChange?: (value: string) => void;
|
|
544
|
+
/** Available tag options */
|
|
545
|
+
options: TagOption[];
|
|
546
|
+
/** When true, renders as a non-interactive badge (no dropdown) */
|
|
547
|
+
viewOnly?: boolean;
|
|
548
|
+
/** Placeholder text when no tag is selected */
|
|
549
|
+
placeholder?: string;
|
|
550
|
+
/** Default variant when no tag is selected */
|
|
551
|
+
defaultVariant?: BadgeVariant;
|
|
552
|
+
className?: string;
|
|
553
|
+
style?: React$1.CSSProperties;
|
|
554
|
+
}
|
|
555
|
+
type NumberBadgeVariant = "default" | "destructive" | "secondary";
|
|
556
|
+
interface NumberBadgeProps {
|
|
557
|
+
/**
|
|
558
|
+
* The number to display in the badge.
|
|
559
|
+
*/
|
|
560
|
+
count: number;
|
|
561
|
+
/**
|
|
562
|
+
* Maximum count to display. Shows "max+" if exceeded.
|
|
563
|
+
* @default 99
|
|
564
|
+
*/
|
|
565
|
+
max?: number;
|
|
566
|
+
/**
|
|
567
|
+
* The badge variant style.
|
|
568
|
+
* @default "default"
|
|
569
|
+
*/
|
|
570
|
+
variant?: NumberBadgeVariant;
|
|
571
|
+
/**
|
|
572
|
+
* Whether to show zero count.
|
|
573
|
+
* @default false
|
|
574
|
+
*/
|
|
575
|
+
showZero?: boolean;
|
|
576
|
+
className?: string;
|
|
577
|
+
style?: React$1.CSSProperties;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* Badge component - Displays a badge with options for leading and trailing icons
|
|
582
|
+
* Based on Figma design node: 3333:1629
|
|
583
|
+
*/
|
|
584
|
+
declare const Badge: React$1.ForwardRefExoticComponent<BadgeProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
585
|
+
/**
|
|
586
|
+
* NumberBadge component - Displays a circular badge with a count
|
|
587
|
+
* Based on Figma design node: 3333:1629
|
|
588
|
+
*/
|
|
589
|
+
declare const NumberBadge: React$1.ForwardRefExoticComponent<NumberBadgeProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
590
|
+
/**
|
|
591
|
+
* TagBadge - An interactive badge that opens a dropdown to pick a tag.
|
|
592
|
+
* Mirrors the TagsDropdown behavior from the zero repo:
|
|
593
|
+
* - viewOnly=true: renders as a static badge
|
|
594
|
+
* - viewOnly=false (default): renders as a clickable badge with chevron that opens a tag menu
|
|
595
|
+
*/
|
|
596
|
+
declare const TagBadge: React$1.ForwardRefExoticComponent<TagBadgeProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
597
|
+
|
|
598
|
+
type SelectType = "Single Line Regular" | "Single Line Large" | "Double Line";
|
|
599
|
+
type SelectState = "Default" | "Open";
|
|
600
|
+
interface SelectProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
601
|
+
type?: SelectType;
|
|
602
|
+
state?: SelectState;
|
|
603
|
+
showLead?: boolean;
|
|
604
|
+
showSearch?: boolean;
|
|
605
|
+
value?: string;
|
|
606
|
+
onValueChange?: (value: string) => void;
|
|
607
|
+
placeholder?: string;
|
|
608
|
+
placeholderSubtext?: string;
|
|
609
|
+
}
|
|
610
|
+
interface SelectLabelProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
611
|
+
label?: string;
|
|
612
|
+
mandatory?: boolean;
|
|
613
|
+
}
|
|
614
|
+
interface SelectMenuItemProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
615
|
+
value: string;
|
|
616
|
+
hover?: boolean;
|
|
617
|
+
menuItem?: string;
|
|
618
|
+
menuItemSubtext?: string;
|
|
619
|
+
showPlaybackControl?: boolean;
|
|
620
|
+
selected?: boolean;
|
|
621
|
+
}
|
|
622
|
+
interface SelectGroupProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
623
|
+
showLabel?: boolean;
|
|
624
|
+
}
|
|
625
|
+
/** Item shape when using SelectContent `items` prop. Search filters by label and subtext. */
|
|
626
|
+
interface SelectContentItem {
|
|
627
|
+
value: string;
|
|
628
|
+
label: string;
|
|
629
|
+
subtext?: string;
|
|
630
|
+
leadIcon?: React$1.ReactNode;
|
|
631
|
+
leadIconSize?: "xs" | "sm" | "md";
|
|
632
|
+
}
|
|
633
|
+
/** Section with items when using SelectContent `items` prop. */
|
|
634
|
+
interface SelectContentItemWithSection {
|
|
635
|
+
sectionLabel: string;
|
|
636
|
+
items: SelectContentItem[];
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
declare const Select: React$1.FC<SelectPrimitive.SelectProps>;
|
|
640
|
+
declare const SelectGroup: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectGroupProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
641
|
+
/**
|
|
642
|
+
* Select value text (placeholder/value) using Typography tokens.
|
|
643
|
+
* We style placeholder color via `group-data-[placeholder]` on the trigger.
|
|
644
|
+
*/
|
|
645
|
+
declare const SelectValue: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectValueProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
646
|
+
declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
647
|
+
showLead?: boolean;
|
|
648
|
+
leadIcon?: React$1.ReactNode;
|
|
649
|
+
/** Size of lead icon. "xs" = 16px, "sm" = 24px (default) */
|
|
650
|
+
leadIconSize?: "xs" | "sm";
|
|
651
|
+
/** Size variant. "small" = 32px height, "regular" = 48px, "large" = 64px */
|
|
652
|
+
size?: "small" | "regular" | "large";
|
|
653
|
+
/** Background variant. "default" = input grey, "white" = card white */
|
|
654
|
+
bg?: "default" | "white";
|
|
655
|
+
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
656
|
+
declare const SelectScrollUpButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
657
|
+
declare const SelectScrollDownButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
658
|
+
declare const SelectContent: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
659
|
+
/** Dropdown list items. When provided, search filters them by default. Can be flat items or sections. */
|
|
660
|
+
items?: SelectContentItem[] | SelectContentItemWithSection[];
|
|
661
|
+
showSearch?: boolean;
|
|
662
|
+
searchPlaceholder?: string;
|
|
663
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
664
|
+
declare const SelectLabel: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
665
|
+
declare const SelectItem: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
666
|
+
subtext?: string;
|
|
667
|
+
type?: "single" | "double";
|
|
668
|
+
leadIcon?: React$1.ReactNode;
|
|
669
|
+
/** Size of leadIcon area. "xs" = 16px, "sm" = 24px, "md" = 36px (for playback controls) */
|
|
670
|
+
leadIconSize?: "xs" | "sm" | "md";
|
|
671
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
672
|
+
declare const SelectSeparator: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
673
|
+
declare function SelectFormLabel({ className, label, mandatory, }: SelectLabelProps): react_jsx_runtime.JSX.Element;
|
|
674
|
+
|
|
675
|
+
interface PlaySelectAudioItem {
|
|
676
|
+
value: string;
|
|
677
|
+
label: string;
|
|
678
|
+
subtext?: string;
|
|
679
|
+
url: string;
|
|
680
|
+
}
|
|
681
|
+
interface PlaySelectProps {
|
|
682
|
+
/** List of audio items to display. Each has value, label, subtext, and playable url. */
|
|
683
|
+
dropdownListItems: PlaySelectAudioItem[];
|
|
684
|
+
/** Trigger label (e.g. "Title") */
|
|
685
|
+
label?: string;
|
|
686
|
+
/** Placeholder when nothing selected */
|
|
687
|
+
placeholder?: string;
|
|
688
|
+
/** Show search input in dropdown */
|
|
689
|
+
showSearch?: boolean;
|
|
690
|
+
/** Search placeholder text */
|
|
691
|
+
searchPlaceholder?: string;
|
|
692
|
+
/** Controlled value */
|
|
693
|
+
value?: string;
|
|
694
|
+
/** Default value when uncontrolled */
|
|
695
|
+
defaultValue?: string;
|
|
696
|
+
/** Called when value changes (alias for onValueChange) */
|
|
697
|
+
onValueChange?: (value: string) => void;
|
|
698
|
+
/** Called when user clicks play/pause button. Receives url and item. */
|
|
699
|
+
onPlayClick?: (url: string, item: PlaySelectAudioItem) => void;
|
|
700
|
+
/** Called when user selects a value (clicks item text to select) */
|
|
701
|
+
onSelectValue?: (value: string) => void;
|
|
702
|
+
/** Called when dropdown closes (select, click outside, escape, etc.) */
|
|
703
|
+
onCloseDropdown?: () => void;
|
|
704
|
+
/** Disabled state */
|
|
705
|
+
disabled?: boolean;
|
|
706
|
+
/** Trigger size */
|
|
707
|
+
size?: "regular" | "large";
|
|
708
|
+
/** Optional lead icon for the trigger */
|
|
709
|
+
triggerLeadIcon?: React$1.ReactNode;
|
|
710
|
+
/** Optional wrapper className (e.g. to control width) */
|
|
711
|
+
className?: string;
|
|
712
|
+
/** Minimum width (e.g. "196px"). Override via className if needed. */
|
|
713
|
+
minWidth?: string;
|
|
714
|
+
}
|
|
715
|
+
declare const PlaySelect: React$1.ForwardRefExoticComponent<PlaySelectProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
716
|
+
|
|
717
|
+
type PlaybackState = "play" | "pause";
|
|
718
|
+
interface PlaybackControlProps extends Omit<React$1.ComponentProps<typeof Button>, "children"> {
|
|
719
|
+
/**
|
|
720
|
+
* Which icon to show. `play` = play icon (triangle), `pause` = pause icon (two bars).
|
|
721
|
+
*/
|
|
722
|
+
state?: PlaybackState;
|
|
723
|
+
/**
|
|
724
|
+
* Alias for `state`. When true, show pause icon; when false, show play icon.
|
|
725
|
+
*/
|
|
726
|
+
playing?: boolean;
|
|
727
|
+
}
|
|
728
|
+
declare const PlaybackControl: React$1.ForwardRefExoticComponent<Omit<PlaybackControlProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
729
|
+
|
|
730
|
+
interface UseSelectProps {
|
|
731
|
+
value?: string;
|
|
732
|
+
defaultValue?: string;
|
|
733
|
+
onValueChange?: (value: string) => void;
|
|
734
|
+
}
|
|
735
|
+
declare function useSelect({ value, defaultValue, onValueChange }: UseSelectProps): {
|
|
736
|
+
value: string | undefined;
|
|
737
|
+
setValue: React$1.Dispatch<React$1.SetStateAction<string | undefined>>;
|
|
738
|
+
handleValueChange: (newValue: string) => void;
|
|
739
|
+
};
|
|
740
|
+
|
|
741
|
+
interface UsePlaySelectProps {
|
|
742
|
+
value?: string;
|
|
743
|
+
defaultValue?: string;
|
|
744
|
+
onValueChange?: (value: string) => void;
|
|
745
|
+
/** Called when user clicks play/pause button */
|
|
746
|
+
onPlayClick?: (url: string, item: PlaySelectAudioItem) => void;
|
|
747
|
+
/** Called when user selects a value (clicks item text) */
|
|
748
|
+
onSelectValue?: (value: string) => void;
|
|
749
|
+
/** Called when dropdown closes (select, click outside, escape, etc.) */
|
|
750
|
+
onCloseDropdown?: () => void;
|
|
751
|
+
}
|
|
752
|
+
declare function usePlaySelect({ value, defaultValue, onValueChange, onPlayClick, onSelectValue, onCloseDropdown, }: UsePlaySelectProps): {
|
|
753
|
+
value: string | undefined;
|
|
754
|
+
playingUrl: string | null;
|
|
755
|
+
audioRef: React$1.MutableRefObject<HTMLAudioElement | null>;
|
|
756
|
+
handleValueChange: (newValue: string) => void;
|
|
757
|
+
handleOpenChange: (open: boolean) => void;
|
|
758
|
+
handlePlay: (url: string, item: PlaySelectAudioItem) => void;
|
|
759
|
+
stopEvent: (e: React$1.PointerEvent | React$1.MouseEvent) => void;
|
|
760
|
+
createPlayHandler: (item: PlaySelectAudioItem) => (e: React$1.PointerEvent | React$1.MouseEvent) => void;
|
|
761
|
+
pauseAudio: () => void;
|
|
762
|
+
};
|
|
763
|
+
|
|
764
|
+
/** Illustration position relative to text and CTAs. */
|
|
765
|
+
type EmptyStateIllustrationPosition = "top" | "bottom";
|
|
766
|
+
/** Illustration size variant. */
|
|
767
|
+
type EmptyStateIllustrationSize = "small" | "banner";
|
|
768
|
+
interface EmptyStateProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "title" | "description"> {
|
|
769
|
+
/** Illustration element (e.g. image, icon, or SVG). */
|
|
770
|
+
illustration?: React$1.ReactNode;
|
|
771
|
+
/** Where to place the illustration: above or below the text/CTAs. */
|
|
772
|
+
illustrationPosition?: EmptyStateIllustrationPosition;
|
|
773
|
+
/** Size of the illustration area. Small: 120×120px, Banner: 220×500px (overridden by width/height). */
|
|
774
|
+
illustrationSize?: EmptyStateIllustrationSize;
|
|
775
|
+
/** Custom illustration width (e.g. "500px", 300). Overrides illustrationSize for width. */
|
|
776
|
+
illustrationWidth?: string | number;
|
|
777
|
+
/** Custom illustration height (e.g. "220px", 200). Overrides illustrationSize for height. */
|
|
778
|
+
illustrationHeight?: string | number;
|
|
779
|
+
/** Primary title. String uses default title styles; Typography or other ReactNode is rendered as-is. */
|
|
780
|
+
title: string | React$1.ReactNode;
|
|
781
|
+
/** Secondary description. String uses default description styles; Typography or other ReactNode is rendered as-is. */
|
|
782
|
+
description?: string | React$1.ReactNode;
|
|
783
|
+
/** Action element(s) displayed below the text. Single button or array of buttons. */
|
|
784
|
+
action?: React$1.ReactNode | React$1.ReactNode[];
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Empty state placeholder.
|
|
789
|
+
* Figma reference: 3619:3067 (Nurix Design System 2026)
|
|
790
|
+
*/
|
|
791
|
+
declare const EmptyState: React$1.ForwardRefExoticComponent<EmptyStateProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
792
|
+
|
|
793
|
+
type ListVariant = "default" | "outline" | "muted";
|
|
794
|
+
type ListType = "card" | "list";
|
|
795
|
+
type ListBorderRadius = "none" | "soft" | "rounded";
|
|
796
|
+
interface ListProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
797
|
+
/**
|
|
798
|
+
* Layout type.
|
|
799
|
+
* - card: vertical card layout
|
|
800
|
+
* - list: horizontal row layout
|
|
801
|
+
* @default "card"
|
|
802
|
+
*/
|
|
803
|
+
type?: ListType;
|
|
804
|
+
/**
|
|
805
|
+
* Visual style variant.
|
|
806
|
+
* - default: card bg only (card) / no border, no bg (list)
|
|
807
|
+
* - outline: border with horizontal padding
|
|
808
|
+
* - muted: subtle background fill
|
|
809
|
+
* @default "default"
|
|
810
|
+
*/
|
|
811
|
+
variant?: ListVariant;
|
|
812
|
+
/**
|
|
813
|
+
* Design-system controlled border radius.
|
|
814
|
+
* @default "rounded"
|
|
815
|
+
*/
|
|
816
|
+
list_border_radius?: ListBorderRadius;
|
|
817
|
+
children?: React$1.ReactNode;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* List component - A composable card/list container with layout type,
|
|
822
|
+
* variant styles, hover overlay, and design-system border radius.
|
|
823
|
+
* Based on Figma design node: 3316:3511
|
|
824
|
+
*/
|
|
825
|
+
declare const List: React$1.ForwardRefExoticComponent<ListProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
826
|
+
|
|
827
|
+
type SurfaceBackground = "white" | "grey";
|
|
828
|
+
interface SurfaceProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
829
|
+
/**
|
|
830
|
+
* Surface fill style.
|
|
831
|
+
* - white: `bg-token-white`
|
|
832
|
+
* - grey: `bg-token-light-grey`
|
|
833
|
+
* @default "white"
|
|
834
|
+
*/
|
|
835
|
+
background?: SurfaceBackground;
|
|
836
|
+
/**
|
|
837
|
+
* When true the surface reserves padding so that content can sit
|
|
838
|
+
* directly inside without a secondary wrapper. Disable when the
|
|
839
|
+
* children handle their own padding (for example when composing
|
|
840
|
+
* full-bleed headers or images).
|
|
841
|
+
* @default true
|
|
842
|
+
*/
|
|
843
|
+
padded?: boolean;
|
|
844
|
+
children?: React$1.ReactNode;
|
|
845
|
+
}
|
|
846
|
+
interface SurfaceHeaderProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
847
|
+
children?: React$1.ReactNode;
|
|
848
|
+
}
|
|
849
|
+
interface SurfaceBodyProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
850
|
+
children?: React$1.ReactNode;
|
|
851
|
+
}
|
|
852
|
+
interface SurfaceFooterProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
853
|
+
children?: React$1.ReactNode;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
/**
|
|
857
|
+
* Surface - neutral elevated surface used to group related content.
|
|
858
|
+
*
|
|
859
|
+
* Matches the Figma "Card - Surface" primitive:
|
|
860
|
+
* - 16px radius, 1.5px xlight border, xs drop shadow
|
|
861
|
+
* - white / light-grey background variants
|
|
862
|
+
* - overflow hidden so nested media clip to the radius
|
|
863
|
+
*
|
|
864
|
+
* Figma: 6100:42420 (surface), 6100:42423 (white bg), 6100:42428 (grey bg)
|
|
865
|
+
*/
|
|
866
|
+
declare const Surface: React$1.ForwardRefExoticComponent<SurfaceProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
867
|
+
/**
|
|
868
|
+
* Optional header slot — intended for a short title row.
|
|
869
|
+
*/
|
|
870
|
+
declare const SurfaceHeader: React$1.ForwardRefExoticComponent<SurfaceHeaderProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
871
|
+
/**
|
|
872
|
+
* Optional body slot — vertical content area with a default 8px gap.
|
|
873
|
+
*/
|
|
874
|
+
declare const SurfaceBody: React$1.ForwardRefExoticComponent<SurfaceBodyProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
875
|
+
/**
|
|
876
|
+
* Optional footer slot — right-aligned action row.
|
|
877
|
+
*/
|
|
878
|
+
declare const SurfaceFooter: React$1.ForwardRefExoticComponent<SurfaceFooterProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* Tooltip provider. Wrap your app (or a subtree) with this to enable tooltips.
|
|
882
|
+
* Based on shadcn/ui + Radix Tooltip.
|
|
883
|
+
*/
|
|
884
|
+
declare const TooltipProvider: React$1.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
885
|
+
/**
|
|
886
|
+
* Tooltip root. Groups trigger and content.
|
|
887
|
+
*/
|
|
888
|
+
declare const Tooltip: React$1.FC<TooltipPrimitive.TooltipProps>;
|
|
889
|
+
/**
|
|
890
|
+
* Tooltip trigger. The element that shows the tooltip on hover.
|
|
891
|
+
*/
|
|
892
|
+
declare const TooltipTrigger: React$1.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
893
|
+
/**
|
|
894
|
+
* Tooltip content. Renders the tooltip popover with optional arrow and shortcut badge.
|
|
895
|
+
* Figma design: primary background, rounded, optional keyboard shortcut on the right.
|
|
896
|
+
* Portals into .lego-land when present for correct theming.
|
|
897
|
+
*/
|
|
898
|
+
declare const TooltipContent: React$1.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
899
|
+
shortcut?: string;
|
|
900
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
901
|
+
|
|
902
|
+
type TooltipContentProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> & {
|
|
903
|
+
/** Optional keyboard shortcut to display (e.g. "U", "⌘S") */
|
|
904
|
+
shortcut?: string;
|
|
905
|
+
};
|
|
906
|
+
|
|
907
|
+
/**
|
|
908
|
+
* Semantic text-style variants (mapped 1:1 from Figma text styles).
|
|
909
|
+
* Each has a predefined font-size, line-height, and font-weight.
|
|
910
|
+
*/
|
|
911
|
+
type TypographyVariant = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p1" | "p2" | "p3" | "b1" | "b2" | "subtext-xs" | "subtext-sm" | "input-xs" | "input-sm" | "label-sm" | "label-sm-mono" | "label-md" | "label-lg";
|
|
912
|
+
/** Utility text sizes (text-xs through text-6xl). Use with `weight` prop. */
|
|
913
|
+
type TypographySize = "xs" | "sm" | "base" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl";
|
|
914
|
+
/** Font weight options (maps to Figma weight tokens). */
|
|
915
|
+
type TypographyWeight = "thin" | "extra-light" | "light" | "regular" | "medium" | "semi-bold" | "bold" | "extra-bold" | "black";
|
|
916
|
+
type TypographyTone = "default" | "muted" | "inherit";
|
|
917
|
+
interface TypographyProps extends React$1.HTMLAttributes<HTMLElement> {
|
|
918
|
+
/**
|
|
919
|
+
* Semantic typography variant (maps to Figma text styles).
|
|
920
|
+
* Provides predefined size + weight combos.
|
|
921
|
+
* Cannot be used together with `size`.
|
|
922
|
+
* @default "p2"
|
|
923
|
+
*/
|
|
924
|
+
variant?: TypographyVariant;
|
|
925
|
+
/**
|
|
926
|
+
* Utility text size. Use together with `weight` for fine-grained control.
|
|
927
|
+
* Cannot be used together with `variant`.
|
|
928
|
+
*/
|
|
929
|
+
size?: TypographySize;
|
|
930
|
+
/**
|
|
931
|
+
* Font weight. Used with `size` for utility text styles.
|
|
932
|
+
* When used with `variant`, overrides the variant's default weight.
|
|
933
|
+
* @default "regular" (when using `size`)
|
|
934
|
+
*/
|
|
935
|
+
weight?: TypographyWeight;
|
|
936
|
+
/**
|
|
937
|
+
* Text color tone.
|
|
938
|
+
* @default "default"
|
|
939
|
+
*/
|
|
940
|
+
tone?: TypographyTone;
|
|
941
|
+
/**
|
|
942
|
+
* Render as the child element (Radix Slot).
|
|
943
|
+
* @default false
|
|
944
|
+
*/
|
|
945
|
+
asChild?: boolean;
|
|
946
|
+
/**
|
|
947
|
+
* Override the default HTML tag for the selected variant.
|
|
948
|
+
* Ignored when `asChild` is true.
|
|
949
|
+
*/
|
|
950
|
+
as?: React$1.ElementType;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
/**
|
|
954
|
+
* Typography component
|
|
955
|
+
* Figma reference: 3732-2079 (Text aliases / use cases)
|
|
956
|
+
*
|
|
957
|
+
* Two usage modes:
|
|
958
|
+
* 1. Semantic: `<Typography variant="h1">` — uses predefined size+weight from Figma
|
|
959
|
+
* 2. Utility: `<Typography size="lg" weight="bold">` — fine-grained size × weight control
|
|
960
|
+
*/
|
|
961
|
+
declare const Typography: React$1.ForwardRefExoticComponent<TypographyProps & React$1.RefAttributes<HTMLElement>>;
|
|
962
|
+
|
|
963
|
+
type Theme = "light" | "dark";
|
|
964
|
+
interface ThemeContextType {
|
|
965
|
+
theme: Theme;
|
|
966
|
+
setTheme: (theme: Theme) => void;
|
|
967
|
+
}
|
|
968
|
+
declare const ThemeProvider: React$1.FC<{
|
|
969
|
+
children: React$1.ReactNode;
|
|
970
|
+
defaultTheme?: Theme;
|
|
971
|
+
}>;
|
|
972
|
+
declare const NurixThemeProvider: React$1.FC<{
|
|
973
|
+
children: React$1.ReactNode;
|
|
974
|
+
defaultTheme?: Theme;
|
|
975
|
+
}>;
|
|
976
|
+
declare const useTheme: () => ThemeContextType;
|
|
977
|
+
|
|
978
|
+
interface LegoLandWrapperProps {
|
|
979
|
+
children: React$1.ReactNode;
|
|
980
|
+
theme: "light" | "dark";
|
|
981
|
+
className?: string;
|
|
982
|
+
style?: React$1.CSSProperties;
|
|
983
|
+
}
|
|
984
|
+
declare const LegoLandWrapper: React$1.FC<LegoLandWrapperProps>;
|
|
985
|
+
|
|
986
|
+
/**
|
|
987
|
+
* Hardcoded theme JSON (as requested).
|
|
988
|
+
* NOTE: `uIColors` values are hex, but at runtime we convert them to HSL channels
|
|
989
|
+
* so they work with `tailwind.config.ts` which uses `hsl(var(--...))`.
|
|
990
|
+
*/
|
|
991
|
+
declare const DEFAULT_THEME: {
|
|
992
|
+
/**
|
|
993
|
+
* Design tokens (numbers) used by components.
|
|
994
|
+
* This file is the single source of truth (do not duplicate these elsewhere).
|
|
995
|
+
*/
|
|
996
|
+
readonly twPadding: {
|
|
997
|
+
readonly mode1: {
|
|
998
|
+
readonly px0: 0;
|
|
999
|
+
readonly px05: 2;
|
|
1000
|
+
readonly px1: 4;
|
|
1001
|
+
readonly px15: 6;
|
|
1002
|
+
readonly px2: 8;
|
|
1003
|
+
readonly px25: 10;
|
|
1004
|
+
readonly px3: 12;
|
|
1005
|
+
readonly px35: 14;
|
|
1006
|
+
readonly px4: 16;
|
|
1007
|
+
readonly px5: 20;
|
|
1008
|
+
readonly px6: 24;
|
|
1009
|
+
readonly px7: 28;
|
|
1010
|
+
readonly px8: 32;
|
|
1011
|
+
readonly px9: 36;
|
|
1012
|
+
readonly px10: 40;
|
|
1013
|
+
readonly px11: 44;
|
|
1014
|
+
readonly px12: 48;
|
|
1015
|
+
readonly px14: 56;
|
|
1016
|
+
readonly px16: 64;
|
|
1017
|
+
readonly px20: 80;
|
|
1018
|
+
readonly px24: 96;
|
|
1019
|
+
readonly px28: 112;
|
|
1020
|
+
readonly px32: 128;
|
|
1021
|
+
readonly px36: 144;
|
|
1022
|
+
readonly px40: 160;
|
|
1023
|
+
readonly px44: 176;
|
|
1024
|
+
readonly px48: 192;
|
|
1025
|
+
readonly px52: 208;
|
|
1026
|
+
readonly px56: 224;
|
|
1027
|
+
readonly px60: 240;
|
|
1028
|
+
readonly px64: 256;
|
|
1029
|
+
readonly px72: 288;
|
|
1030
|
+
readonly px80: 320;
|
|
1031
|
+
readonly px96: 384;
|
|
1032
|
+
readonly pxPx: 1;
|
|
1033
|
+
};
|
|
1034
|
+
};
|
|
1035
|
+
readonly radius: {
|
|
1036
|
+
readonly mode1: {
|
|
1037
|
+
readonly roundedNone: 0;
|
|
1038
|
+
readonly roundedXs: 2;
|
|
1039
|
+
readonly roundedSm: 4;
|
|
1040
|
+
readonly roundedMd: 6;
|
|
1041
|
+
readonly roundedLg: 8;
|
|
1042
|
+
readonly roundedXl: 12;
|
|
1043
|
+
readonly rounded2xl: 16;
|
|
1044
|
+
readonly rounded3xl: 24;
|
|
1045
|
+
readonly rounded4xl: 32;
|
|
1046
|
+
readonly roundedFull: 9999;
|
|
1047
|
+
};
|
|
1048
|
+
};
|
|
1049
|
+
readonly tokens: {
|
|
1050
|
+
readonly mode1: {
|
|
1051
|
+
readonly 0: 0;
|
|
1052
|
+
readonly 1: 1;
|
|
1053
|
+
readonly 2: 2;
|
|
1054
|
+
readonly 3: 3;
|
|
1055
|
+
readonly 4: 4;
|
|
1056
|
+
readonly 5: 5;
|
|
1057
|
+
readonly 6: 6;
|
|
1058
|
+
readonly 8: 8;
|
|
1059
|
+
readonly 10: 10;
|
|
1060
|
+
readonly 12: 12;
|
|
1061
|
+
readonly 14: 14;
|
|
1062
|
+
readonly 15: 15;
|
|
1063
|
+
readonly 16: 16;
|
|
1064
|
+
readonly 18: 18;
|
|
1065
|
+
readonly 20: 20;
|
|
1066
|
+
readonly 24: 24;
|
|
1067
|
+
readonly 25: 25;
|
|
1068
|
+
readonly 28: 28;
|
|
1069
|
+
readonly 32: 32;
|
|
1070
|
+
readonly 40: 40;
|
|
1071
|
+
readonly 48: 48;
|
|
1072
|
+
readonly 64: 64;
|
|
1073
|
+
readonly 96: 96;
|
|
1074
|
+
readonly 128: 128;
|
|
1075
|
+
readonly 256: 256;
|
|
1076
|
+
readonly 512: 512;
|
|
1077
|
+
readonly 1024: 1024;
|
|
1078
|
+
readonly 9999: 9999;
|
|
1079
|
+
readonly "05": 0.5;
|
|
1080
|
+
readonly "075": 0.75;
|
|
1081
|
+
readonly "125": 1.25;
|
|
1082
|
+
readonly "175": 1.75;
|
|
1083
|
+
readonly "225": 2.25;
|
|
1084
|
+
readonly "275": 2.75;
|
|
1085
|
+
};
|
|
1086
|
+
};
|
|
1087
|
+
readonly twColors: {
|
|
1088
|
+
readonly mode1: {
|
|
1089
|
+
readonly slate50: "#f8fafc";
|
|
1090
|
+
readonly slate100: "#f1f5f9";
|
|
1091
|
+
readonly slate200: "#e2e8f0";
|
|
1092
|
+
readonly slate300: "#cbd5e1";
|
|
1093
|
+
readonly slate400: "#94a3b8";
|
|
1094
|
+
readonly slate500: "#64748b";
|
|
1095
|
+
readonly slate600: "#475569";
|
|
1096
|
+
readonly slate700: "#334155";
|
|
1097
|
+
readonly slate800: "#1e293b";
|
|
1098
|
+
readonly slate900: "#0f172a";
|
|
1099
|
+
readonly slate950: "#020617";
|
|
1100
|
+
readonly gray50: "#f9fafb";
|
|
1101
|
+
readonly gray100: "#f3f4f6";
|
|
1102
|
+
readonly gray200: "#e5e7eb";
|
|
1103
|
+
readonly gray300: "#d1d5db";
|
|
1104
|
+
readonly gray400: "#9ca3af";
|
|
1105
|
+
readonly gray500: "#6b7280";
|
|
1106
|
+
readonly gray600: "#4b5563";
|
|
1107
|
+
readonly gray700: "#374151";
|
|
1108
|
+
readonly gray800: "#1f2937";
|
|
1109
|
+
readonly gray900: "#111827";
|
|
1110
|
+
readonly gray950: "#030712";
|
|
1111
|
+
readonly zinc50: "#fafafa";
|
|
1112
|
+
readonly zinc100: "#f4f4f5";
|
|
1113
|
+
readonly zinc200: "#e4e4e7";
|
|
1114
|
+
readonly zinc300: "#d4d4d8";
|
|
1115
|
+
readonly zinc400: "#a1a1aa";
|
|
1116
|
+
readonly zinc500: "#71717a";
|
|
1117
|
+
readonly zinc600: "#52525b";
|
|
1118
|
+
readonly zinc700: "#3f3f46";
|
|
1119
|
+
readonly zinc800: "#27272a";
|
|
1120
|
+
readonly zinc900: "#18181b";
|
|
1121
|
+
readonly zinc950: "#09090b";
|
|
1122
|
+
readonly neutral50: "#fafafa";
|
|
1123
|
+
readonly neutral100: "#f5f5f5";
|
|
1124
|
+
readonly neutral200: "#e5e5e5";
|
|
1125
|
+
readonly neutral300: "#d4d4d4";
|
|
1126
|
+
readonly neutral400: "#a3a3a3";
|
|
1127
|
+
readonly neutral500: "#737373";
|
|
1128
|
+
readonly neutral600: "#525252";
|
|
1129
|
+
readonly neutral700: "#404040";
|
|
1130
|
+
readonly neutral800: "#262626";
|
|
1131
|
+
readonly neutral900: "#171717";
|
|
1132
|
+
readonly neutral950: "#0a0a0a";
|
|
1133
|
+
readonly stone50: "#fafaf9";
|
|
1134
|
+
readonly stone100: "#f5f5f4";
|
|
1135
|
+
readonly stone200: "#e7e5e4";
|
|
1136
|
+
readonly stone300: "#d6d3d1";
|
|
1137
|
+
readonly stone400: "#a8a29e";
|
|
1138
|
+
readonly stone500: "#78716c";
|
|
1139
|
+
readonly stone600: "#57534e";
|
|
1140
|
+
readonly stone700: "#44403c";
|
|
1141
|
+
readonly stone800: "#292524";
|
|
1142
|
+
readonly stone900: "#1c1917";
|
|
1143
|
+
readonly stone950: "#0c0a09";
|
|
1144
|
+
readonly red50: "#fef2f2";
|
|
1145
|
+
readonly red100: "#fee2e2";
|
|
1146
|
+
readonly red200: "#fecaca";
|
|
1147
|
+
readonly red300: "#fca5a5";
|
|
1148
|
+
readonly red400: "#f87171";
|
|
1149
|
+
readonly red500: "#ef4444";
|
|
1150
|
+
readonly red600: "#dc2626";
|
|
1151
|
+
readonly red700: "#b91c1c";
|
|
1152
|
+
readonly red800: "#991b1b";
|
|
1153
|
+
readonly red900: "#7f1d1d";
|
|
1154
|
+
readonly red950: "#450a0a";
|
|
1155
|
+
readonly orange50: "#fff7ed";
|
|
1156
|
+
readonly orange100: "#ffedd5";
|
|
1157
|
+
readonly orange200: "#fed7aa";
|
|
1158
|
+
readonly orange300: "#fdba74";
|
|
1159
|
+
readonly orange400: "#fb923c";
|
|
1160
|
+
readonly orange500: "#f97316";
|
|
1161
|
+
readonly orange600: "#ea580c";
|
|
1162
|
+
readonly orange700: "#c2410c";
|
|
1163
|
+
readonly orange800: "#9a3412";
|
|
1164
|
+
readonly orange900: "#7c2d12";
|
|
1165
|
+
readonly orange950: "#431407";
|
|
1166
|
+
readonly amber50: "#fffbeb";
|
|
1167
|
+
readonly amber100: "#fef3c7";
|
|
1168
|
+
readonly amber200: "#fde68a";
|
|
1169
|
+
readonly amber300: "#fcd34d";
|
|
1170
|
+
readonly amber400: "#fbbf24";
|
|
1171
|
+
readonly amber500: "#f59e0b";
|
|
1172
|
+
readonly amber600: "#d97706";
|
|
1173
|
+
readonly amber700: "#b45309";
|
|
1174
|
+
readonly amber800: "#92400e";
|
|
1175
|
+
readonly amber900: "#78350f";
|
|
1176
|
+
readonly amber950: "#451a03";
|
|
1177
|
+
readonly green50: "#f0fdf4";
|
|
1178
|
+
readonly green100: "#dcfce7";
|
|
1179
|
+
readonly green200: "#bbf7d0";
|
|
1180
|
+
readonly green300: "#86efac";
|
|
1181
|
+
readonly green400: "#4ade80";
|
|
1182
|
+
readonly green500: "#22c55e";
|
|
1183
|
+
readonly green600: "#16a34a";
|
|
1184
|
+
readonly green700: "#15803d";
|
|
1185
|
+
readonly green800: "#166534";
|
|
1186
|
+
readonly green900: "#14532d";
|
|
1187
|
+
readonly green950: "#052e16";
|
|
1188
|
+
readonly emerald50: "#ecfdf5";
|
|
1189
|
+
readonly emerald100: "#d1fae5";
|
|
1190
|
+
readonly emerald200: "#a7f3d0";
|
|
1191
|
+
readonly emerald300: "#6ee7b7";
|
|
1192
|
+
readonly emerald400: "#34d399";
|
|
1193
|
+
readonly emerald500: "#10b981";
|
|
1194
|
+
readonly emerald600: "#059669";
|
|
1195
|
+
readonly emerald700: "#047857";
|
|
1196
|
+
readonly emerald800: "#065f46";
|
|
1197
|
+
readonly emerald900: "#064e3b";
|
|
1198
|
+
readonly emerald950: "#022c22";
|
|
1199
|
+
readonly teal50: "#f0fdfa";
|
|
1200
|
+
readonly teal100: "#ccfbf1";
|
|
1201
|
+
readonly teal200: "#99f6e4";
|
|
1202
|
+
readonly teal300: "#5eead4";
|
|
1203
|
+
readonly teal400: "#2dd4bf";
|
|
1204
|
+
readonly teal500: "#14b8a6";
|
|
1205
|
+
readonly teal600: "#0d9488";
|
|
1206
|
+
readonly teal700: "#0f766e";
|
|
1207
|
+
readonly teal800: "#115e59";
|
|
1208
|
+
readonly teal900: "#134e4a";
|
|
1209
|
+
readonly teal950: "#042f2e";
|
|
1210
|
+
readonly cyan50: "#ecfeff";
|
|
1211
|
+
readonly cyan100: "#cffafe";
|
|
1212
|
+
readonly cyan200: "#a5f3fc";
|
|
1213
|
+
readonly cyan300: "#67e8f9";
|
|
1214
|
+
readonly cyan400: "#22d3ee";
|
|
1215
|
+
readonly cyan500: "#06b6d4";
|
|
1216
|
+
readonly cyan600: "#0891b2";
|
|
1217
|
+
readonly cyan700: "#0e7490";
|
|
1218
|
+
readonly cyan800: "#155e75";
|
|
1219
|
+
readonly cyan900: "#164e63";
|
|
1220
|
+
readonly cyan950: "#083344";
|
|
1221
|
+
readonly sky50: "#f0f9ff";
|
|
1222
|
+
readonly sky100: "#e0f2fe";
|
|
1223
|
+
readonly sky200: "#bae6fd";
|
|
1224
|
+
readonly sky300: "#7dd3fc";
|
|
1225
|
+
readonly sky400: "#38bdf8";
|
|
1226
|
+
readonly sky500: "#0ea5e9";
|
|
1227
|
+
readonly sky600: "#0284c7";
|
|
1228
|
+
readonly sky700: "#0369a1";
|
|
1229
|
+
readonly sky800: "#075985";
|
|
1230
|
+
readonly sky900: "#0c4a6e";
|
|
1231
|
+
readonly sky950: "#082f49";
|
|
1232
|
+
readonly indigo50: "#eef2ff";
|
|
1233
|
+
readonly indigo100: "#e0e7ff";
|
|
1234
|
+
readonly indigo200: "#c7d2fe";
|
|
1235
|
+
readonly indigo300: "#a5b4fc";
|
|
1236
|
+
readonly indigo400: "#818cf8";
|
|
1237
|
+
readonly indigo500: "#6366f1";
|
|
1238
|
+
readonly indigo600: "#4f46e5";
|
|
1239
|
+
readonly indigo700: "#4338ca";
|
|
1240
|
+
readonly indigo800: "#3730a3";
|
|
1241
|
+
readonly indigo900: "#312e81";
|
|
1242
|
+
readonly indigo950: "#1e1b4b";
|
|
1243
|
+
readonly violet50: "#f5f3ff";
|
|
1244
|
+
readonly violet100: "#ede9fe";
|
|
1245
|
+
readonly violet200: "#ddd6fe";
|
|
1246
|
+
readonly violet300: "#c4b5fd";
|
|
1247
|
+
readonly violet400: "#a78bfa";
|
|
1248
|
+
readonly violet500: "#8b5cf6";
|
|
1249
|
+
readonly violet600: "#7c3aed";
|
|
1250
|
+
readonly violet700: "#6d28d9";
|
|
1251
|
+
readonly violet800: "#5b21b6";
|
|
1252
|
+
readonly violet900: "#4c1d95";
|
|
1253
|
+
readonly violet950: "#2e1065";
|
|
1254
|
+
readonly purple50: "#faf5ff";
|
|
1255
|
+
readonly purple100: "#f3e8ff";
|
|
1256
|
+
readonly purple200: "#e9d5ff";
|
|
1257
|
+
readonly purple300: "#d8b4fe";
|
|
1258
|
+
readonly purple400: "#c084fc";
|
|
1259
|
+
readonly purple500: "#a855f7";
|
|
1260
|
+
readonly purple600: "#9333ea";
|
|
1261
|
+
readonly purple700: "#7e22ce";
|
|
1262
|
+
readonly purple800: "#6b21a8";
|
|
1263
|
+
readonly purple900: "#581c87";
|
|
1264
|
+
readonly purple950: "#3b0764";
|
|
1265
|
+
readonly fuchsia50: "#fdf4ff";
|
|
1266
|
+
readonly fuchsia100: "#fae8ff";
|
|
1267
|
+
readonly fuchsia200: "#f5d0fe";
|
|
1268
|
+
readonly fuchsia300: "#f0abfc";
|
|
1269
|
+
readonly fuchsia400: "#e879f9";
|
|
1270
|
+
readonly fuchsia500: "#d946ef";
|
|
1271
|
+
readonly fuchsia600: "#c026d3";
|
|
1272
|
+
readonly fuchsia700: "#a21caf";
|
|
1273
|
+
readonly fuchsia800: "#86198f";
|
|
1274
|
+
readonly fuchsia900: "#701a75";
|
|
1275
|
+
readonly fuchsia950: "#4a044e";
|
|
1276
|
+
readonly pink50: "#fdf2f8";
|
|
1277
|
+
readonly pink100: "#fce7f3";
|
|
1278
|
+
readonly pink200: "#fbcfe8";
|
|
1279
|
+
readonly pink300: "#f9a8d4";
|
|
1280
|
+
readonly pink400: "#f472b6";
|
|
1281
|
+
readonly pink500: "#ec4899";
|
|
1282
|
+
readonly pink600: "#db2777";
|
|
1283
|
+
readonly pink700: "#be185d";
|
|
1284
|
+
readonly pink800: "#9d174d";
|
|
1285
|
+
readonly pink900: "#831843";
|
|
1286
|
+
readonly pink950: "#500724";
|
|
1287
|
+
readonly rose50: "#fff1f2";
|
|
1288
|
+
readonly rose100: "#ffe4e6";
|
|
1289
|
+
readonly rose200: "#fecdd3";
|
|
1290
|
+
readonly rose300: "#fda4af";
|
|
1291
|
+
readonly rose400: "#fb7185";
|
|
1292
|
+
readonly rose500: "#f43f5e";
|
|
1293
|
+
readonly rose600: "#e11d48";
|
|
1294
|
+
readonly rose700: "#be123c";
|
|
1295
|
+
readonly rose800: "#9f1239";
|
|
1296
|
+
readonly rose900: "#881337";
|
|
1297
|
+
readonly rose950: "#4c0519";
|
|
1298
|
+
readonly lime50: "#f7fee7";
|
|
1299
|
+
readonly lime100: "#ecfccb";
|
|
1300
|
+
readonly lime200: "#d9f99d";
|
|
1301
|
+
readonly lime300: "#bef264";
|
|
1302
|
+
readonly lime400: "#a3e635";
|
|
1303
|
+
readonly lime500: "#84cc16";
|
|
1304
|
+
readonly lime600: "#65a30d";
|
|
1305
|
+
readonly lime700: "#4d7c0f";
|
|
1306
|
+
readonly lime800: "#3f6212";
|
|
1307
|
+
readonly lime900: "#365314";
|
|
1308
|
+
readonly lime950: "#1a2e05";
|
|
1309
|
+
readonly yellow50: "#fefce8";
|
|
1310
|
+
readonly yellow100: "#fef9c3";
|
|
1311
|
+
readonly yellow200: "#fef08a";
|
|
1312
|
+
readonly yellow300: "#fde047";
|
|
1313
|
+
readonly yellow400: "#facc15";
|
|
1314
|
+
readonly yellow500: "#eab308";
|
|
1315
|
+
readonly yellow600: "#ca8a04";
|
|
1316
|
+
readonly yellow700: "#a16207";
|
|
1317
|
+
readonly yellow800: "#854d0e";
|
|
1318
|
+
readonly yellow900: "#713f12";
|
|
1319
|
+
readonly yellow950: "#422006";
|
|
1320
|
+
readonly blue50: "#eff6ff";
|
|
1321
|
+
readonly blue100: "#dbeafe";
|
|
1322
|
+
readonly blue200: "#bfdbfe";
|
|
1323
|
+
readonly blue300: "#93c5fd";
|
|
1324
|
+
readonly blue400: "#60a5fa";
|
|
1325
|
+
readonly blue500: "#3b82f6";
|
|
1326
|
+
readonly blue600: "#2563eb";
|
|
1327
|
+
readonly blue700: "#1d4ed8";
|
|
1328
|
+
readonly blue800: "#1e40af";
|
|
1329
|
+
readonly blue900: "#1e3a8a";
|
|
1330
|
+
readonly blue950: "#172554";
|
|
1331
|
+
readonly white: "#ffffff";
|
|
1332
|
+
readonly black: "#000000";
|
|
1333
|
+
};
|
|
1334
|
+
};
|
|
1335
|
+
readonly uIColors: {
|
|
1336
|
+
readonly lightMode: {
|
|
1337
|
+
readonly backgroundColor: "#0000004d";
|
|
1338
|
+
readonly chart3: "#0588f0";
|
|
1339
|
+
readonly chart2: "#0090ff";
|
|
1340
|
+
readonly chart4: "#0d74ce";
|
|
1341
|
+
readonly chart1: "#5eb1ef";
|
|
1342
|
+
readonly chart5: "#113264";
|
|
1343
|
+
readonly sidebar: "#fafafa";
|
|
1344
|
+
readonly sidebarForeground: "#0a0a0a";
|
|
1345
|
+
readonly sidebarPrimary: "#171717";
|
|
1346
|
+
readonly sidebarPrimaryForeground: "#fafafa";
|
|
1347
|
+
readonly sidebarAccent: "#f5f5f5";
|
|
1348
|
+
readonly sidebarAccentForeground: "#171717";
|
|
1349
|
+
readonly sidebarBorder: "#d4d4d4";
|
|
1350
|
+
readonly sidebarRing: "#737373";
|
|
1351
|
+
readonly semanticBackground: "#696867";
|
|
1352
|
+
readonly semanticBorder: "#898887";
|
|
1353
|
+
readonly semanticForeground: "#ffffff";
|
|
1354
|
+
readonly primary10: "#1d488519";
|
|
1355
|
+
readonly datePickerCircle: "#3d6aa8";
|
|
1356
|
+
readonly filterInput: "#fff";
|
|
1357
|
+
readonly primarySelected: "#fff";
|
|
1358
|
+
readonly bgWhite: "#ffffff";
|
|
1359
|
+
readonly bgLightGrey: "#fafafa";
|
|
1360
|
+
readonly bgGrey: "#f5f5f5";
|
|
1361
|
+
readonly bgDarkGrey: "#e5e5e5";
|
|
1362
|
+
readonly bgDark: "#0a0a0a";
|
|
1363
|
+
readonly bgBrandPrimary: "#1d4885";
|
|
1364
|
+
readonly bgBrandSecondary: "#eff8ff";
|
|
1365
|
+
readonly bgDestructivePrimary: "#b91c1c";
|
|
1366
|
+
readonly bgDestructiveSecondary: "#fef2f2";
|
|
1367
|
+
readonly bgWarningPrimary: "#92400e";
|
|
1368
|
+
readonly bgWarningSecondary: "#fef3c7";
|
|
1369
|
+
readonly bgSuccessPrimary: "#047857";
|
|
1370
|
+
readonly bgSuccessSecondary: "#ecfdf5";
|
|
1371
|
+
readonly bgBluePrimary: "#0369a1";
|
|
1372
|
+
readonly bgBlueSecondary: "#f0f9ff";
|
|
1373
|
+
readonly borderXlight: "#f5f5f5";
|
|
1374
|
+
readonly borderLight: "#e5e5e5";
|
|
1375
|
+
readonly borderBrand: "#1d4885";
|
|
1376
|
+
readonly borderDestructive: "#b91c1c";
|
|
1377
|
+
readonly borderInput: "#e5e5e5";
|
|
1378
|
+
readonly hovOpacityPrimary: "#0a0a0a0d";
|
|
1379
|
+
readonly hovOpacitySecondary: "#0a0a0a0d";
|
|
1380
|
+
readonly hovSolidPrimary: "#fafafa";
|
|
1381
|
+
readonly hovSolidSecondary: "#f5f5f5";
|
|
1382
|
+
readonly pressedOpacityPrimary: "#0a0a0a1a";
|
|
1383
|
+
readonly pressedOpacitySecondary: "#0a0a0a1a";
|
|
1384
|
+
readonly pressedSolid: "#e5e5e5";
|
|
1385
|
+
readonly inFocusOpacity: "#0a0a0a26";
|
|
1386
|
+
readonly inFocusSolid: "#f5f5f5";
|
|
1387
|
+
readonly interactionSelected: "#eff8ff";
|
|
1388
|
+
readonly iconWhite: "#fafafa";
|
|
1389
|
+
readonly iconBlack: "#0a0a0a";
|
|
1390
|
+
readonly iconDisable: "#a3a3a3";
|
|
1391
|
+
readonly iconPlaceholder: "#a3a3a3";
|
|
1392
|
+
readonly iconGreyPrimary: "#a3a3a3";
|
|
1393
|
+
readonly iconGreySecondary: "#737373";
|
|
1394
|
+
readonly iconGreyTertiary: "#525252";
|
|
1395
|
+
readonly iconDestructive: "#b91c1c";
|
|
1396
|
+
readonly iconLink: "#1d4885";
|
|
1397
|
+
readonly iconSuccess: "#047857";
|
|
1398
|
+
readonly iconWarning: "#92400e";
|
|
1399
|
+
readonly iconBlue: "#0369a1";
|
|
1400
|
+
readonly textWhite: "#fafafa";
|
|
1401
|
+
readonly textBlack: "#0a0a0a";
|
|
1402
|
+
readonly textDisable: "#a3a3a3";
|
|
1403
|
+
readonly textPlaceholder: "#a3a3a3";
|
|
1404
|
+
readonly textGreyPrimary: "#a3a3a3";
|
|
1405
|
+
readonly textGreySecondary: "#737373";
|
|
1406
|
+
readonly textGreyTertiary: "#525252";
|
|
1407
|
+
readonly textDestructive: "#b91c1c";
|
|
1408
|
+
readonly textBrand: "#1d4885";
|
|
1409
|
+
readonly textSuccess: "#047857";
|
|
1410
|
+
readonly textWarning: "#92400e";
|
|
1411
|
+
readonly textBlue: "#0369a1";
|
|
1412
|
+
readonly badgeDefaultBg: "#f0f9ff";
|
|
1413
|
+
readonly badgeDefaultFg: "#0369a1";
|
|
1414
|
+
readonly badgeSuccessBg: "#ecfdf5";
|
|
1415
|
+
readonly badgeSuccessFg: "#047857";
|
|
1416
|
+
readonly badgeWarningBg: "#fef3c7";
|
|
1417
|
+
readonly badgeWarningFg: "#92400e";
|
|
1418
|
+
readonly badgeNeutralBg: "#e5e5e5";
|
|
1419
|
+
readonly badgeNeutralFg: "#525252";
|
|
1420
|
+
readonly badgeDestructiveBg: "#fef2f2";
|
|
1421
|
+
readonly badgeDestructiveFg: "#b91c1c";
|
|
1422
|
+
};
|
|
1423
|
+
readonly darkMode: {
|
|
1424
|
+
readonly backgroundColor: "#0000004d";
|
|
1425
|
+
readonly chart3: "#0588f0";
|
|
1426
|
+
readonly chart2: "#0090ff";
|
|
1427
|
+
readonly chart4: "#0d74ce";
|
|
1428
|
+
readonly chart1: "#5eb1ef";
|
|
1429
|
+
readonly chart5: "#113264";
|
|
1430
|
+
readonly sidebar: "#171717";
|
|
1431
|
+
readonly sidebarForeground: "#fafafa";
|
|
1432
|
+
readonly sidebarPrimary: "#0588f0";
|
|
1433
|
+
readonly sidebarPrimaryForeground: "#fafafa";
|
|
1434
|
+
readonly sidebarAccent: "#262626";
|
|
1435
|
+
readonly sidebarAccentForeground: "#fafafa";
|
|
1436
|
+
readonly sidebarBorder: "#ffffffcc";
|
|
1437
|
+
readonly sidebarRing: "#737373";
|
|
1438
|
+
readonly semanticBackground: "#272625";
|
|
1439
|
+
readonly semanticBorder: "#535151";
|
|
1440
|
+
readonly semanticForeground: "#ffffff";
|
|
1441
|
+
readonly primary10: "#e6f1ff1a";
|
|
1442
|
+
readonly datePickerCircle: "#7aa5e8";
|
|
1443
|
+
readonly filterInput: "#171717";
|
|
1444
|
+
readonly bgWhite: "#0a0a0a";
|
|
1445
|
+
readonly bgLightGrey: "#171717";
|
|
1446
|
+
readonly bgGrey: "#262626";
|
|
1447
|
+
readonly bgDarkGrey: "#262626";
|
|
1448
|
+
readonly bgDark: "#ffffff";
|
|
1449
|
+
readonly bgBrandPrimary: "#bfdbfe";
|
|
1450
|
+
readonly bgBrandSecondary: "#262626";
|
|
1451
|
+
readonly bgDestructivePrimary: "#f87171";
|
|
1452
|
+
readonly bgDestructiveSecondary: "#0a0a0a";
|
|
1453
|
+
readonly bgWarningPrimary: "#fbbf24";
|
|
1454
|
+
readonly bgWarningSecondary: "#0a0a0a";
|
|
1455
|
+
readonly bgSuccessPrimary: "#a7f3d0";
|
|
1456
|
+
readonly bgSuccessSecondary: "#0a0a0a";
|
|
1457
|
+
readonly bgBluePrimary: "#7dd3fc";
|
|
1458
|
+
readonly bgBlueSecondary: "#0a0a0a";
|
|
1459
|
+
readonly borderXlight: "#262626";
|
|
1460
|
+
readonly borderLight: "#404040";
|
|
1461
|
+
readonly borderBrand: "#bfdbfe";
|
|
1462
|
+
readonly borderDestructive: "#f87171";
|
|
1463
|
+
readonly borderInput: "#262626";
|
|
1464
|
+
readonly hovOpacityPrimary: "#ffffff0d";
|
|
1465
|
+
readonly hovOpacitySecondary: "#ffffff1a";
|
|
1466
|
+
readonly hovSolidPrimary: "#262626";
|
|
1467
|
+
readonly hovSolidSecondary: "#262626";
|
|
1468
|
+
readonly pressedOpacityPrimary: "#ffffff26";
|
|
1469
|
+
readonly pressedOpacitySecondary: "#ffffff26";
|
|
1470
|
+
readonly pressedSolid: "#171717";
|
|
1471
|
+
readonly inFocusOpacity: "#ffffff40";
|
|
1472
|
+
readonly inFocusSolid: "#262626";
|
|
1473
|
+
readonly interactionSelected: "#262626";
|
|
1474
|
+
readonly iconWhite: "#171717";
|
|
1475
|
+
readonly iconBlack: "#d4d4d4";
|
|
1476
|
+
readonly iconDisable: "#525252";
|
|
1477
|
+
readonly iconPlaceholder: "#a3a3a3";
|
|
1478
|
+
readonly iconGreyPrimary: "#737373";
|
|
1479
|
+
readonly iconGreySecondary: "#a3a3a3";
|
|
1480
|
+
readonly iconGreyTertiary: "#d4d4d4";
|
|
1481
|
+
readonly iconDestructive: "#f87171";
|
|
1482
|
+
readonly iconLink: "#bfdbfe";
|
|
1483
|
+
readonly iconSuccess: "#a7f3d0";
|
|
1484
|
+
readonly iconWarning: "#fbbf24";
|
|
1485
|
+
readonly iconBlue: "#7dd3fc";
|
|
1486
|
+
readonly textWhite: "#0a0a0a";
|
|
1487
|
+
readonly textBlack: "#d4d4d4";
|
|
1488
|
+
readonly textDisable: "#525252";
|
|
1489
|
+
readonly textPlaceholder: "#a3a3a3";
|
|
1490
|
+
readonly textGreyPrimary: "#737373";
|
|
1491
|
+
readonly textGreySecondary: "#a3a3a3";
|
|
1492
|
+
readonly textGreyTertiary: "#d4d4d4";
|
|
1493
|
+
readonly textDestructive: "#f87171";
|
|
1494
|
+
readonly textBrand: "#bfdbfe";
|
|
1495
|
+
readonly textSuccess: "#a7f3d0";
|
|
1496
|
+
readonly textWarning: "#fbbf24";
|
|
1497
|
+
readonly textBlue: "#7dd3fc";
|
|
1498
|
+
readonly badgeDefaultBg: "#0c4a6e";
|
|
1499
|
+
readonly badgeDefaultFg: "#7dd3fc";
|
|
1500
|
+
readonly badgeSuccessBg: "#064e3b";
|
|
1501
|
+
readonly badgeSuccessFg: "#6ee7b7";
|
|
1502
|
+
readonly badgeWarningBg: "#78350f";
|
|
1503
|
+
readonly badgeWarningFg: "#fcd34d";
|
|
1504
|
+
readonly badgeNeutralBg: "#404040";
|
|
1505
|
+
readonly badgeNeutralFg: "#d4d4d4";
|
|
1506
|
+
readonly badgeDestructiveBg: "#7f1d1d";
|
|
1507
|
+
readonly badgeDestructiveFg: "#fecaca";
|
|
1508
|
+
readonly primarySelected: "#1A273A";
|
|
1509
|
+
};
|
|
1510
|
+
};
|
|
1511
|
+
readonly components: {
|
|
1512
|
+
readonly mode1: {
|
|
1513
|
+
readonly inputRadius: 12;
|
|
1514
|
+
readonly inputHeight: 40;
|
|
1515
|
+
readonly inputHeightLarge: 56;
|
|
1516
|
+
readonly inputPaddingHorizontal: 12;
|
|
1517
|
+
readonly inputPaddingVertical: 10;
|
|
1518
|
+
readonly buttonHeight: 40;
|
|
1519
|
+
readonly buttonRadius: 24;
|
|
1520
|
+
readonly inputActiveBg: "#2e3034";
|
|
1521
|
+
readonly inputFocussedBg: "#2e3034";
|
|
1522
|
+
readonly inputFocussedRing: "#acd8fc";
|
|
1523
|
+
};
|
|
1524
|
+
};
|
|
1525
|
+
};
|
|
1526
|
+
|
|
1527
|
+
type DialogSize = "sm" | "default" | "wide";
|
|
1528
|
+
/**
|
|
1529
|
+
* Controls the dialog layout preset:
|
|
1530
|
+
* - `"default"` — header with × close, plain body, footer
|
|
1531
|
+
* - `"icon"` — large icon circle at top, no × close, body, footer
|
|
1532
|
+
* - `"scrollable"` — header with × close, scrollable body, footer
|
|
1533
|
+
* - `"scrollable-fixed"` — same as scrollable but header and footer have dividers (sticky feel)
|
|
1534
|
+
*/
|
|
1535
|
+
type DialogType = "default" | "icon" | "scrollable" | "scrollable-fixed";
|
|
1536
|
+
interface DialogProps {
|
|
1537
|
+
open: boolean;
|
|
1538
|
+
onOpenChange: (open: boolean) => void;
|
|
1539
|
+
/** @default "default" */
|
|
1540
|
+
type?: DialogType;
|
|
1541
|
+
/** @default "default" */
|
|
1542
|
+
size?: DialogSize;
|
|
1543
|
+
title?: string;
|
|
1544
|
+
/** Icon element for the blue circle (only used when `type="icon"`). */
|
|
1545
|
+
icon?: React$1.ReactNode;
|
|
1546
|
+
children?: React$1.ReactNode;
|
|
1547
|
+
/** @default "Cancel" */
|
|
1548
|
+
cancelLabel?: string;
|
|
1549
|
+
/** @default "Continue" */
|
|
1550
|
+
confirmLabel?: string;
|
|
1551
|
+
/**
|
|
1552
|
+
* Show the Cancel button in the footer.
|
|
1553
|
+
* @default true
|
|
1554
|
+
*/
|
|
1555
|
+
showCancel?: boolean;
|
|
1556
|
+
onCancel?: () => void;
|
|
1557
|
+
onConfirm?: () => void;
|
|
1558
|
+
className?: string;
|
|
1559
|
+
}
|
|
1560
|
+
interface DialogIconProps {
|
|
1561
|
+
children: React$1.ReactNode;
|
|
1562
|
+
className?: string;
|
|
1563
|
+
}
|
|
1564
|
+
interface DialogHeaderProps {
|
|
1565
|
+
title: string;
|
|
1566
|
+
showClose?: boolean;
|
|
1567
|
+
showDivider?: boolean;
|
|
1568
|
+
className?: string;
|
|
1569
|
+
}
|
|
1570
|
+
interface DialogBodyProps {
|
|
1571
|
+
children?: React$1.ReactNode;
|
|
1572
|
+
scrollable?: boolean;
|
|
1573
|
+
className?: string;
|
|
1574
|
+
}
|
|
1575
|
+
interface DialogFooterProps {
|
|
1576
|
+
cancelLabel?: string;
|
|
1577
|
+
confirmLabel?: string;
|
|
1578
|
+
/**
|
|
1579
|
+
* Show the Cancel button.
|
|
1580
|
+
* @default true
|
|
1581
|
+
*/
|
|
1582
|
+
showCancel?: boolean;
|
|
1583
|
+
onCancel?: () => void;
|
|
1584
|
+
onConfirm?: () => void;
|
|
1585
|
+
showDivider?: boolean;
|
|
1586
|
+
className?: string;
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
/**
|
|
1590
|
+
* Modal dialog. Rendered inline (no portal) so CSS variables from the
|
|
1591
|
+
* `.lego-land` ancestor always apply. Uses `fixed inset-0` so it still covers
|
|
1592
|
+
* the full viewport regardless of its position in the tree.
|
|
1593
|
+
*
|
|
1594
|
+
* Use the `type` prop to select a layout preset:
|
|
1595
|
+
* - `"default"` — header + × close + plain body + footer
|
|
1596
|
+
* - `"icon"` — icon circle at top + header (no ×) + body + footer
|
|
1597
|
+
* - `"scrollable"` — header + × close + scrollable body + footer
|
|
1598
|
+
* - `"scrollable-fixed"` — scrollable + dividers between header/body/footer
|
|
1599
|
+
*
|
|
1600
|
+
* Figma reference: 3316:3400 (Dialogs & Toasts)
|
|
1601
|
+
*/
|
|
1602
|
+
declare const Dialog: React$1.ForwardRefExoticComponent<DialogProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1603
|
+
/**
|
|
1604
|
+
* Blue tinted icon circle for the top of a dialog.
|
|
1605
|
+
* Figma reference: 3364:1516
|
|
1606
|
+
*/
|
|
1607
|
+
declare const DialogIcon: React$1.ForwardRefExoticComponent<DialogIconProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1608
|
+
/**
|
|
1609
|
+
* Header row with title and optional × close button / bottom divider.
|
|
1610
|
+
* Figma reference: 3364:1437
|
|
1611
|
+
*/
|
|
1612
|
+
declare const DialogHeader: React$1.ForwardRefExoticComponent<DialogHeaderProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1613
|
+
/**
|
|
1614
|
+
* Content area. Pass `scrollable` to constrain height and enable vertical scroll.
|
|
1615
|
+
* Figma reference: 3364:1541
|
|
1616
|
+
*/
|
|
1617
|
+
declare const DialogBody: React$1.ForwardRefExoticComponent<DialogBodyProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1618
|
+
/**
|
|
1619
|
+
* Footer with Cancel + Confirm buttons and an optional top divider.
|
|
1620
|
+
* Figma reference: 3364:1397
|
|
1621
|
+
*/
|
|
1622
|
+
declare const DialogFooter: React$1.ForwardRefExoticComponent<DialogFooterProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1623
|
+
|
|
1624
|
+
type ToastVariant = "success" | "error" | "default";
|
|
1625
|
+
interface ToastProps {
|
|
1626
|
+
/**
|
|
1627
|
+
* Determines the leading icon and title colour.
|
|
1628
|
+
* @default "default"
|
|
1629
|
+
*/
|
|
1630
|
+
variant?: ToastVariant;
|
|
1631
|
+
/** Primary message text. */
|
|
1632
|
+
title: string;
|
|
1633
|
+
/** Optional secondary line shown below the title. */
|
|
1634
|
+
subtext?: string;
|
|
1635
|
+
/**
|
|
1636
|
+
* Show the icon-only Cancel action button on the right.
|
|
1637
|
+
* When used with `showToast()`, automatically dismisses the toast.
|
|
1638
|
+
* @default false
|
|
1639
|
+
*/
|
|
1640
|
+
showCancel?: boolean;
|
|
1641
|
+
/** Called when the Cancel button is clicked. */
|
|
1642
|
+
onCancel?: () => void;
|
|
1643
|
+
/**
|
|
1644
|
+
* Show the thin progress bar pinned to the bottom of the toast.
|
|
1645
|
+
* @default false
|
|
1646
|
+
*/
|
|
1647
|
+
showProgress?: boolean;
|
|
1648
|
+
/**
|
|
1649
|
+
* Progress percentage 0–100. Only used when `showProgress` is true.
|
|
1650
|
+
* @default 0
|
|
1651
|
+
*/
|
|
1652
|
+
progress?: number;
|
|
1653
|
+
className?: string;
|
|
1654
|
+
style?: React$1.CSSProperties;
|
|
1655
|
+
}
|
|
1656
|
+
/** Options passed to `showToast()`. */
|
|
1657
|
+
interface ShowToastOptions extends Omit<ToastProps, "onCancel"> {
|
|
1658
|
+
/** Duration in ms before auto-dismiss. Defaults to Sonner's default (4000ms). */
|
|
1659
|
+
duration?: number;
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
/**
|
|
1663
|
+
* Place `<Toaster />` once near the root of your app (inside `LegoLandWrapper`).
|
|
1664
|
+
*
|
|
1665
|
+
* @example
|
|
1666
|
+
* <LegoLandWrapper>
|
|
1667
|
+
* <Toaster />
|
|
1668
|
+
* <App />
|
|
1669
|
+
* </LegoLandWrapper>
|
|
1670
|
+
*/
|
|
1671
|
+
declare const Toaster: {
|
|
1672
|
+
({ position, ...props }: React$1.ComponentProps<typeof Toaster$1>): react_jsx_runtime.JSX.Element;
|
|
1673
|
+
displayName: string;
|
|
1674
|
+
};
|
|
1675
|
+
/**
|
|
1676
|
+
* Visual Toast component. Can be used standalone or via `showToast()` for
|
|
1677
|
+
* Sonner-powered positioning and auto-dismiss.
|
|
1678
|
+
*
|
|
1679
|
+
* Figma reference: 3364:1614 (success), 3728:2422 (default), 3728:2438 (error)
|
|
1680
|
+
*/
|
|
1681
|
+
declare const Toast: React$1.ForwardRefExoticComponent<ToastProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1682
|
+
/**
|
|
1683
|
+
* Trigger a toast notification. Requires `<Toaster />` to be mounted in the app.
|
|
1684
|
+
*
|
|
1685
|
+
* @example
|
|
1686
|
+
* showToast({ variant: "success", title: "Saved!", subtext: "All changes saved." });
|
|
1687
|
+
* showToast({ variant: "error", title: "Something went wrong", showCancel: true });
|
|
1688
|
+
* showToast({ variant: "default", title: "Thanks for the feedback!", showProgress: true, progress: 40 });
|
|
1689
|
+
*/
|
|
1690
|
+
declare const showToast: ({ duration, ...props }: ShowToastOptions) => string | number;
|
|
1691
|
+
|
|
1692
|
+
type StepState = "incomplete" | "active" | "complete";
|
|
1693
|
+
interface StepItem {
|
|
1694
|
+
/**
|
|
1695
|
+
* The label text shown next to the step indicator.
|
|
1696
|
+
*/
|
|
1697
|
+
label: string;
|
|
1698
|
+
/**
|
|
1699
|
+
* The state of this step.
|
|
1700
|
+
* @default "incomplete"
|
|
1701
|
+
*/
|
|
1702
|
+
state?: StepState;
|
|
1703
|
+
}
|
|
1704
|
+
interface StepperProps {
|
|
1705
|
+
/**
|
|
1706
|
+
* Array of step items to display.
|
|
1707
|
+
*/
|
|
1708
|
+
steps: StepItem[];
|
|
1709
|
+
className?: string;
|
|
1710
|
+
style?: React$1.CSSProperties;
|
|
1711
|
+
}
|
|
1712
|
+
interface StepperBarProps {
|
|
1713
|
+
/**
|
|
1714
|
+
* Total number of steps (segments).
|
|
1715
|
+
* @default 4
|
|
1716
|
+
*/
|
|
1717
|
+
totalSteps?: number;
|
|
1718
|
+
/**
|
|
1719
|
+
* Current active step (1-indexed). Segments up to this index are filled.
|
|
1720
|
+
*/
|
|
1721
|
+
currentStep: number;
|
|
1722
|
+
className?: string;
|
|
1723
|
+
style?: React$1.CSSProperties;
|
|
1724
|
+
}
|
|
1725
|
+
interface ProgressBarProps {
|
|
1726
|
+
/**
|
|
1727
|
+
* Progress value from 0 to 100.
|
|
1728
|
+
*/
|
|
1729
|
+
value: number;
|
|
1730
|
+
/**
|
|
1731
|
+
* Maximum value.
|
|
1732
|
+
* @default 100
|
|
1733
|
+
*/
|
|
1734
|
+
max?: number;
|
|
1735
|
+
className?: string;
|
|
1736
|
+
style?: React$1.CSSProperties;
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
/**
|
|
1740
|
+
* StepperBar — Segmented progress bar indicating how many steps are complete.
|
|
1741
|
+
* Based on Figma design node: 3706:2092
|
|
1742
|
+
*/
|
|
1743
|
+
declare const StepperBar: React$1.ForwardRefExoticComponent<StepperBarProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1744
|
+
/**
|
|
1745
|
+
* Stepper — Horizontal stepper with labeled steps and state indicators.
|
|
1746
|
+
* Each step can be "incomplete", "active", or "complete".
|
|
1747
|
+
* Based on Figma design node: 3729:2600
|
|
1748
|
+
*/
|
|
1749
|
+
declare const Stepper: React$1.ForwardRefExoticComponent<StepperProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1750
|
+
/**
|
|
1751
|
+
* ProgressBar — Continuous progress bar with fill percentage.
|
|
1752
|
+
* Based on Figma design node: 3357:4677
|
|
1753
|
+
*/
|
|
1754
|
+
declare const ProgressBar: React$1.ForwardRefExoticComponent<ProgressBarProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1755
|
+
|
|
1756
|
+
/**
|
|
1757
|
+
* Icon component tokens.
|
|
1758
|
+
* Maps semantic color names to the icon CSS variable tokens.
|
|
1759
|
+
* These automatically adapt to light/dark mode.
|
|
1760
|
+
*/
|
|
1761
|
+
declare const ICON_TOKENS: {
|
|
1762
|
+
readonly color: {
|
|
1763
|
+
readonly default: "text-icon-black";
|
|
1764
|
+
readonly white: "text-icon-white";
|
|
1765
|
+
readonly black: "text-icon-black";
|
|
1766
|
+
readonly disable: "text-icon-disable";
|
|
1767
|
+
readonly placeholder: "text-icon-placeholder";
|
|
1768
|
+
readonly "grey-primary": "text-icon-grey-primary";
|
|
1769
|
+
readonly "grey-secondary": "text-icon-grey-secondary";
|
|
1770
|
+
readonly "grey-tertiary": "text-icon-grey-tertiary";
|
|
1771
|
+
readonly destructive: "text-icon-destructive";
|
|
1772
|
+
readonly link: "text-icon-link";
|
|
1773
|
+
readonly success: "text-icon-success";
|
|
1774
|
+
readonly warning: "text-icon-warning";
|
|
1775
|
+
readonly blue: "text-icon-blue";
|
|
1776
|
+
};
|
|
1777
|
+
readonly size: {
|
|
1778
|
+
readonly xs: "size-3";
|
|
1779
|
+
readonly sm: "size-4";
|
|
1780
|
+
readonly md: "size-5";
|
|
1781
|
+
readonly lg: "size-6";
|
|
1782
|
+
readonly xl: "size-8";
|
|
1783
|
+
};
|
|
1784
|
+
readonly picker: {
|
|
1785
|
+
readonly trigger: "inline-flex items-center justify-center border border-token-light rounded-xl p-2 cursor-pointer hover:bg-token-dark/5 transition-colors";
|
|
1786
|
+
readonly dropdown: "bg-token-white rounded-xl p-3 shadow-sm border border-token-xlight w-[320px] max-h-[400px] flex flex-col gap-2";
|
|
1787
|
+
readonly search: "bg-token-light-grey rounded-xl px-3 py-2 text-xs text-fg-black placeholder:text-fg-placeholder outline-none border border-token-xlight focus:border-token-brand w-full";
|
|
1788
|
+
readonly grid: "grid grid-cols-8 gap-1 overflow-y-auto max-h-[280px] p-1";
|
|
1789
|
+
readonly gridItem: "flex items-center justify-center p-2 rounded-xl cursor-pointer hover:bg-interaction-hov-solid-primary transition-colors";
|
|
1790
|
+
readonly gridItemSelected: "bg-token-brand-secondary";
|
|
1791
|
+
readonly emptyText: "text-xs text-fg-grey-secondary text-center py-4";
|
|
1792
|
+
};
|
|
1793
|
+
};
|
|
1794
|
+
type IconColor = keyof typeof ICON_TOKENS.color;
|
|
1795
|
+
type IconSize = keyof typeof ICON_TOKENS.size;
|
|
1796
|
+
|
|
1797
|
+
interface IconWrapperProps {
|
|
1798
|
+
/**
|
|
1799
|
+
* Semantic icon color. Automatically adapts to light/dark mode.
|
|
1800
|
+
* @default "default" (icon-black in light, icon-d4d4d4 in dark)
|
|
1801
|
+
*/
|
|
1802
|
+
color?: IconColor;
|
|
1803
|
+
/**
|
|
1804
|
+
* Icon size preset.
|
|
1805
|
+
* @default "sm" (16px)
|
|
1806
|
+
*/
|
|
1807
|
+
size?: IconSize;
|
|
1808
|
+
/**
|
|
1809
|
+
* The icon to render. Can be a Lucide icon element or any ReactNode.
|
|
1810
|
+
*/
|
|
1811
|
+
children: React$1.ReactNode;
|
|
1812
|
+
className?: string;
|
|
1813
|
+
style?: React$1.CSSProperties;
|
|
1814
|
+
}
|
|
1815
|
+
interface IconPickerProps {
|
|
1816
|
+
/**
|
|
1817
|
+
* Currently selected icon name (e.g. "Home", "Search").
|
|
1818
|
+
*/
|
|
1819
|
+
value?: string | null;
|
|
1820
|
+
/**
|
|
1821
|
+
* Callback when an icon is selected.
|
|
1822
|
+
*/
|
|
1823
|
+
onValueChange?: (iconName: string) => void;
|
|
1824
|
+
/**
|
|
1825
|
+
* Subset of Lucide icon names to show. If not provided, shows all common icons.
|
|
1826
|
+
*/
|
|
1827
|
+
icons?: string[];
|
|
1828
|
+
/**
|
|
1829
|
+
* Icon color for the trigger and grid.
|
|
1830
|
+
* @default "default"
|
|
1831
|
+
*/
|
|
1832
|
+
color?: IconColor;
|
|
1833
|
+
/**
|
|
1834
|
+
* Icon size in the trigger.
|
|
1835
|
+
* @default "md"
|
|
1836
|
+
*/
|
|
1837
|
+
size?: IconSize;
|
|
1838
|
+
/**
|
|
1839
|
+
* Placeholder text when no icon is selected.
|
|
1840
|
+
* @default "Pick icon"
|
|
1841
|
+
*/
|
|
1842
|
+
placeholder?: string;
|
|
1843
|
+
className?: string;
|
|
1844
|
+
style?: React$1.CSSProperties;
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1847
|
+
/**
|
|
1848
|
+
* IconWrapper — Wraps any icon (Lucide or custom SVG) with theme-aware colors.
|
|
1849
|
+
*
|
|
1850
|
+
* Automatically adapts icon color to light/dark mode using the icon/* CSS variable tokens.
|
|
1851
|
+
* Solves the problem of icons breaking when switching themes.
|
|
1852
|
+
*
|
|
1853
|
+
* Usage:
|
|
1854
|
+
* ```tsx
|
|
1855
|
+
* <IconWrapper color="destructive" size="lg">
|
|
1856
|
+
* <Trash2 />
|
|
1857
|
+
* </IconWrapper>
|
|
1858
|
+
* ```
|
|
1859
|
+
*/
|
|
1860
|
+
declare const IconWrapper: React$1.ForwardRefExoticComponent<IconWrapperProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
1861
|
+
/**
|
|
1862
|
+
* IconPicker — A dropdown grid of Lucide icons for the user to pick from.
|
|
1863
|
+
*
|
|
1864
|
+
* Usage:
|
|
1865
|
+
* ```tsx
|
|
1866
|
+
* <IconPicker value={icon} onValueChange={setIcon} />
|
|
1867
|
+
* ```
|
|
1868
|
+
*/
|
|
1869
|
+
declare const IconPicker: React$1.ForwardRefExoticComponent<IconPickerProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1870
|
+
|
|
1871
|
+
interface ShadowDOMWrapperProps {
|
|
1872
|
+
children: React$1.ReactNode;
|
|
1873
|
+
/**
|
|
1874
|
+
* CSS styles to inject into the shadow root.
|
|
1875
|
+
* If not provided, styles will be extracted from the document's stylesheets.
|
|
1876
|
+
* For best results, provide the compiled CSS string from your build process.
|
|
1877
|
+
*/
|
|
1878
|
+
styles?: string;
|
|
1879
|
+
/**
|
|
1880
|
+
* Mode for the shadow root. Defaults to "open".
|
|
1881
|
+
* - "open": Shadow root is accessible via JavaScript
|
|
1882
|
+
* - "closed": Shadow root is not accessible via JavaScript
|
|
1883
|
+
*/
|
|
1884
|
+
mode?: ShadowRootMode;
|
|
1885
|
+
/**
|
|
1886
|
+
* Additional CSS to inject into the shadow root.
|
|
1887
|
+
*/
|
|
1888
|
+
additionalStyles?: string;
|
|
1889
|
+
/**
|
|
1890
|
+
* Whether to copy CSS variables from the document root.
|
|
1891
|
+
* Defaults to true.
|
|
1892
|
+
*/
|
|
1893
|
+
copyCSSVariables?: boolean;
|
|
1894
|
+
}
|
|
1895
|
+
/**
|
|
1896
|
+
* ShadowDOMWrapper component that wraps children in a Shadow DOM.
|
|
1897
|
+
* This isolates component styles and DOM structure from the parent document.
|
|
1898
|
+
*/
|
|
1899
|
+
declare const ShadowDOMWrapper: React$1.FC<ShadowDOMWrapperProps>;
|
|
1900
|
+
|
|
1901
|
+
/**
|
|
1902
|
+
* Cell content can be:
|
|
1903
|
+
* - string: plain text
|
|
1904
|
+
* - CellTextContent: text with optional className/style
|
|
1905
|
+
* - React.ReactNode: any renderable node (icon, badge, custom element)
|
|
1906
|
+
*
|
|
1907
|
+
* Figma reference node: 3338:6396
|
|
1908
|
+
*/
|
|
1909
|
+
type CellTextContent = {
|
|
1910
|
+
text: string;
|
|
1911
|
+
className?: string;
|
|
1912
|
+
style?: React$1.CSSProperties;
|
|
1913
|
+
};
|
|
1914
|
+
type CellContent = string | CellTextContent | React$1.ReactNode;
|
|
1915
|
+
type SortDirection = "asc" | "desc";
|
|
1916
|
+
interface SortState {
|
|
1917
|
+
key: string;
|
|
1918
|
+
direction: SortDirection | null;
|
|
1919
|
+
}
|
|
1920
|
+
/**
|
|
1921
|
+
* Column width size options.
|
|
1922
|
+
* Defaults to "md" (160px).
|
|
1923
|
+
*/
|
|
1924
|
+
declare enum ColumnWidth {
|
|
1925
|
+
xs = "xs",
|
|
1926
|
+
sm = "sm",
|
|
1927
|
+
md = "md",
|
|
1928
|
+
lg = "lg",
|
|
1929
|
+
xl = "xl"
|
|
1930
|
+
}
|
|
1931
|
+
interface ColumnDef<TRow> {
|
|
1932
|
+
/**
|
|
1933
|
+
* Unique identifier for the column. Used for pinning and sort state.
|
|
1934
|
+
*/
|
|
1935
|
+
key: string;
|
|
1936
|
+
/**
|
|
1937
|
+
* Display label shown in the column header.
|
|
1938
|
+
*/
|
|
1939
|
+
header: string;
|
|
1940
|
+
/**
|
|
1941
|
+
* Returns the cell content for a given row.
|
|
1942
|
+
*/
|
|
1943
|
+
accessor: (row: TRow) => CellContent;
|
|
1944
|
+
/**
|
|
1945
|
+
* Whether this column supports sorting. Clicking the header cycles
|
|
1946
|
+
* null → asc → desc → null and fires onSortChange.
|
|
1947
|
+
*/
|
|
1948
|
+
isSortable?: boolean;
|
|
1949
|
+
/**
|
|
1950
|
+
* Current sort direction for this column. When set, this column is sorted.
|
|
1951
|
+
* Updated by the consumer in onSortChange.
|
|
1952
|
+
*/
|
|
1953
|
+
sort_direction?: SortDirection | null;
|
|
1954
|
+
/**
|
|
1955
|
+
* Column width size. Defaults to "md" (160px).
|
|
1956
|
+
* Required for accurate sticky offsets on pinned columns.
|
|
1957
|
+
*/
|
|
1958
|
+
width?: ColumnWidth;
|
|
1959
|
+
}
|
|
1960
|
+
interface TableAction<TRow> {
|
|
1961
|
+
/**
|
|
1962
|
+
* Tooltip label shown on hover.
|
|
1963
|
+
*/
|
|
1964
|
+
label: string;
|
|
1965
|
+
/**
|
|
1966
|
+
* Icon rendered inside the action button.
|
|
1967
|
+
*/
|
|
1968
|
+
icon?: React$1.ReactNode;
|
|
1969
|
+
/**
|
|
1970
|
+
* Called when the action button is clicked.
|
|
1971
|
+
*/
|
|
1972
|
+
onClick: (row: TRow) => void;
|
|
1973
|
+
}
|
|
1974
|
+
interface PaginationProps {
|
|
1975
|
+
handlePageChange: (page: number) => void;
|
|
1976
|
+
rowsPerPage: number;
|
|
1977
|
+
setRowsPerPage: (rowsPerPage: number) => void;
|
|
1978
|
+
currentPage: number;
|
|
1979
|
+
total: number;
|
|
1980
|
+
entityName?: string;
|
|
1981
|
+
}
|
|
1982
|
+
interface DataTableProps<TRow> {
|
|
1983
|
+
/**
|
|
1984
|
+
* Column definitions in display order. Pinned columns will be
|
|
1985
|
+
* reordered to the front automatically.
|
|
1986
|
+
*/
|
|
1987
|
+
columns: ColumnDef<TRow>[];
|
|
1988
|
+
/**
|
|
1989
|
+
* Rows to render on the current page.
|
|
1990
|
+
*/
|
|
1991
|
+
data: TRow[];
|
|
1992
|
+
/**
|
|
1993
|
+
* Array of column keys to pin. Listed in the desired left-to-right order.
|
|
1994
|
+
* Pinned columns are sticky and separated by a vertical line.
|
|
1995
|
+
*/
|
|
1996
|
+
pinnedColumns?: string[];
|
|
1997
|
+
/**
|
|
1998
|
+
* When true, renders a checkbox column as the first column.
|
|
1999
|
+
*/
|
|
2000
|
+
showCheckbox?: boolean;
|
|
2001
|
+
/**
|
|
2002
|
+
* Action buttons rendered in the last (Actions) column.
|
|
2003
|
+
*/
|
|
2004
|
+
actions?: TableAction<TRow>[];
|
|
2005
|
+
/**
|
|
2006
|
+
* Returns a stable unique ID for a row (used for selection).
|
|
2007
|
+
* Defaults to JSON.stringify if not provided.
|
|
2008
|
+
*/
|
|
2009
|
+
getRowId?: (row: TRow) => string;
|
|
2010
|
+
/**
|
|
2011
|
+
* Controlled selected row IDs.
|
|
2012
|
+
*/
|
|
2013
|
+
selectedRows?: string[];
|
|
2014
|
+
/**
|
|
2015
|
+
* Called when selection changes.
|
|
2016
|
+
*/
|
|
2017
|
+
onSelectionChange?: (ids: string[]) => void;
|
|
2018
|
+
/**
|
|
2019
|
+
* Called when sort state changes. The consumer should update columns to set
|
|
2020
|
+
* sort_direction on the sorted column (or clear it when sort is null).
|
|
2021
|
+
*/
|
|
2022
|
+
onSortChange?: (sort: SortState | null) => void;
|
|
2023
|
+
/**
|
|
2024
|
+
* When false, hides the pagination footer. Defaults to true.
|
|
2025
|
+
*/
|
|
2026
|
+
showPagination?: boolean;
|
|
2027
|
+
currentPage?: number;
|
|
2028
|
+
rowsPerPage?: number;
|
|
2029
|
+
total?: number;
|
|
2030
|
+
onPageChange?: (page: number) => void;
|
|
2031
|
+
onRowsPerPageChange?: (rowsPerPage: number) => void;
|
|
2032
|
+
entityName?: string;
|
|
2033
|
+
/**
|
|
2034
|
+
* When false, hides the outer border. Defaults to true.
|
|
2035
|
+
*/
|
|
2036
|
+
showBorder?: boolean;
|
|
2037
|
+
/**
|
|
2038
|
+
* When true, the header row stays fixed at the top while the table body scrolls.
|
|
2039
|
+
*/
|
|
2040
|
+
stickyHeader?: boolean;
|
|
2041
|
+
/**
|
|
2042
|
+
* Optional React node to render in the header's top-right corner.
|
|
2043
|
+
* Useful for header-level actions like column filters or settings.
|
|
2044
|
+
*/
|
|
2045
|
+
headerAction?: React$1.ReactNode;
|
|
2046
|
+
className?: string;
|
|
2047
|
+
/**
|
|
2048
|
+
* When true, shows skeleton loading state with 10 rows.
|
|
2049
|
+
*/
|
|
2050
|
+
loading?: boolean;
|
|
2051
|
+
/**
|
|
2052
|
+
* Called when a data row is clicked. Receives the row data.
|
|
2053
|
+
*/
|
|
2054
|
+
onRowClick?: (row: TRow) => void;
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
/**
|
|
2058
|
+
* Pagination controls: rows-per-page selector + page navigation.
|
|
2059
|
+
* Can also be used standalone outside of DataTable.
|
|
2060
|
+
*
|
|
2061
|
+
* Figma reference node: 3338:6396
|
|
2062
|
+
*/
|
|
2063
|
+
declare function Pagination({ handlePageChange, rowsPerPage, setRowsPerPage, currentPage, total, entityName, }: PaginationProps): react_jsx_runtime.JSX.Element;
|
|
2064
|
+
declare namespace Pagination {
|
|
2065
|
+
var displayName: string;
|
|
2066
|
+
}
|
|
2067
|
+
/**
|
|
2068
|
+
* A fully-featured data table with:
|
|
2069
|
+
* - Column pinning (sticky with vertical divider)
|
|
2070
|
+
* - Horizontal scrolling
|
|
2071
|
+
* - Optional checkbox selection column
|
|
2072
|
+
* - Flexible cell content (text, styled text, icon, badge, or any React node)
|
|
2073
|
+
* - Sortable columns (consumer-driven — fires onSortChange)
|
|
2074
|
+
* - Row action buttons
|
|
2075
|
+
* - Pagination via Pagination
|
|
2076
|
+
*
|
|
2077
|
+
* Figma reference node: 3338:6396
|
|
2078
|
+
*/
|
|
2079
|
+
declare function DataTable<TRow>({ columns, data, pinnedColumns, showCheckbox, actions, getRowId, selectedRows, onSelectionChange, onSortChange, showPagination, currentPage, rowsPerPage, total, onPageChange, onRowsPerPageChange, entityName, showBorder, stickyHeader, headerAction, className, loading, onRowClick, }: DataTableProps<TRow>): react_jsx_runtime.JSX.Element;
|
|
2080
|
+
declare namespace DataTable {
|
|
2081
|
+
var displayName: string;
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2084
|
+
/**
|
|
2085
|
+
* Filter item structure
|
|
2086
|
+
*/
|
|
2087
|
+
interface FilterItem<T = string> {
|
|
2088
|
+
value: T;
|
|
2089
|
+
label: string;
|
|
2090
|
+
/** Optional secondary line shown under the label (two-line option support) */
|
|
2091
|
+
subtext?: string;
|
|
2092
|
+
/** Optional icon for this item (per-item icon support) */
|
|
2093
|
+
icon?: LucideIcon | React$1.ReactNode;
|
|
2094
|
+
/** Show loading state for this item (per-item loading) */
|
|
2095
|
+
loading?: boolean;
|
|
2096
|
+
/** Optional custom display node to render instead of plain label */
|
|
2097
|
+
labelNode?: React$1.ReactNode;
|
|
2098
|
+
}
|
|
2099
|
+
/**
|
|
2100
|
+
* Filter item with section grouping
|
|
2101
|
+
*/
|
|
2102
|
+
interface FilterItemWithSection<T = string> {
|
|
2103
|
+
sectionLabel: string;
|
|
2104
|
+
items: FilterItem<T>[];
|
|
2105
|
+
}
|
|
2106
|
+
/**
|
|
2107
|
+
* Filter types.
|
|
2108
|
+
* - "list" : multi-select list (with optional search, sections, drag)
|
|
2109
|
+
* - "text" : textarea
|
|
2110
|
+
* - "text_with_operands" : operand dropdown + textarea
|
|
2111
|
+
* - "numeric" : single numeric input
|
|
2112
|
+
* - "numeric_with_operands" : operand dropdown + numeric input (+ optional range mode for "is between")
|
|
2113
|
+
* - "in_between" : two numeric inputs (min / max) — no operand dropdown
|
|
2114
|
+
* - "duration" : numeric input + unit dropdown (sec / min / hours)
|
|
2115
|
+
* - "date" : date range picker with optional presets
|
|
2116
|
+
*/
|
|
2117
|
+
type FilterSelectType = "list" | "text" | "text_with_operands" | "numeric" | "numeric_with_operands" | "in_between" | "duration" | "date";
|
|
2118
|
+
/**
|
|
2119
|
+
* Props for FilterSelect component
|
|
2120
|
+
*/
|
|
2121
|
+
interface FilterSelectProps<T = string> extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "onChange" | "className"> {
|
|
2122
|
+
/** Filter label displayed in the trigger button */
|
|
2123
|
+
label?: string;
|
|
2124
|
+
/** Icon displayed on the left side of the trigger */
|
|
2125
|
+
icon?: LucideIcon;
|
|
2126
|
+
/** Array of selected item values */
|
|
2127
|
+
selectedItems?: T[];
|
|
2128
|
+
/** Available items for selection (flat or sectioned) */
|
|
2129
|
+
items: (FilterItem<T> | FilterItemWithSection<T>)[];
|
|
2130
|
+
/** Enable drag-and-drop reordering (default: false) */
|
|
2131
|
+
draggable?: boolean;
|
|
2132
|
+
/** To show clear button regardless of selected items or text / date content (default: true) */
|
|
2133
|
+
showClearBtn?: boolean;
|
|
2134
|
+
/** Callback when selection changes */
|
|
2135
|
+
onSelectionChange?: (values: T[]) => void;
|
|
2136
|
+
/** Callback when order changes (draggable mode) */
|
|
2137
|
+
onOrderChange?: (values: T[]) => void;
|
|
2138
|
+
/** Max width for selected items display */
|
|
2139
|
+
selectedItemsMaxWidth?: string;
|
|
2140
|
+
/** Override classes for selected items display area */
|
|
2141
|
+
selectedItemsClassName?: string;
|
|
2142
|
+
/** Default open state */
|
|
2143
|
+
defaultOpen?: boolean;
|
|
2144
|
+
/** Controlled open state */
|
|
2145
|
+
open?: boolean;
|
|
2146
|
+
/** Callback when open state changes */
|
|
2147
|
+
onOpenChange?: (open: boolean) => void;
|
|
2148
|
+
/** Max height for dropdown content */
|
|
2149
|
+
dropdownMaxHeight?: string;
|
|
2150
|
+
/** Show loading spinner in dropdown */
|
|
2151
|
+
loading?: boolean;
|
|
2152
|
+
onRemoveAll?: () => void;
|
|
2153
|
+
/** Type of filter select */
|
|
2154
|
+
type?: FilterSelectType;
|
|
2155
|
+
/** Controlled text value */
|
|
2156
|
+
text?: string;
|
|
2157
|
+
/** Callback when text changes */
|
|
2158
|
+
onTextChange?: (text: string) => void;
|
|
2159
|
+
/** Selected operand value */
|
|
2160
|
+
operand?: string;
|
|
2161
|
+
/** Callback when operand changes */
|
|
2162
|
+
onOperandChange?: (operand: string) => void;
|
|
2163
|
+
/** Available operands with label and value */
|
|
2164
|
+
operands?: {
|
|
2165
|
+
value: string;
|
|
2166
|
+
label: string;
|
|
2167
|
+
}[];
|
|
2168
|
+
/** Placeholder text for textarea/input */
|
|
2169
|
+
textPlaceholder?: string;
|
|
2170
|
+
/** Placeholder for operand select (default: "") */
|
|
2171
|
+
operandPlaceholder?: string;
|
|
2172
|
+
/** Unit label suffix shown inside numeric input (e.g. "sec", "min") */
|
|
2173
|
+
unitLabel?: string;
|
|
2174
|
+
/** Enable range mode for "numeric_with_operands" - shows min/max inputs */
|
|
2175
|
+
isRangeMode?: boolean;
|
|
2176
|
+
/** Range min value */
|
|
2177
|
+
rangeMin?: string;
|
|
2178
|
+
/** Range max value */
|
|
2179
|
+
rangeMax?: string;
|
|
2180
|
+
/** Callback when range min changes */
|
|
2181
|
+
onRangeMinChange?: (value: string) => void;
|
|
2182
|
+
/** Callback when range max changes */
|
|
2183
|
+
onRangeMaxChange?: (value: string) => void;
|
|
2184
|
+
/**
|
|
2185
|
+
* Duration filter options — when type="duration" this defines the unit dropdown choices.
|
|
2186
|
+
* Defaults to [{ value: "sec", label: "sec" }, { value: "min", label: "min" }, { value: "hours", label: "hours" }].
|
|
2187
|
+
*/
|
|
2188
|
+
durationUnits?: {
|
|
2189
|
+
value: string;
|
|
2190
|
+
label: string;
|
|
2191
|
+
}[];
|
|
2192
|
+
/** Currently selected duration unit value */
|
|
2193
|
+
durationUnit?: string;
|
|
2194
|
+
/** Callback when duration unit changes */
|
|
2195
|
+
onDurationUnitChange?: (unit: string) => void;
|
|
2196
|
+
/** Show search input to filter list items */
|
|
2197
|
+
showSearch?: boolean;
|
|
2198
|
+
/** Search placeholder text (default: "Search...") */
|
|
2199
|
+
searchPlaceholder?: string;
|
|
2200
|
+
/** Date range value (for "date" type) */
|
|
2201
|
+
date?: {
|
|
2202
|
+
start?: Date;
|
|
2203
|
+
end?: Date;
|
|
2204
|
+
};
|
|
2205
|
+
/** Callback when date range changes */
|
|
2206
|
+
onDateChange?: (date: {
|
|
2207
|
+
start?: Date;
|
|
2208
|
+
end?: Date;
|
|
2209
|
+
}) => void;
|
|
2210
|
+
/** Date presets to show (default: true) */
|
|
2211
|
+
datePresets?: boolean | DatePreset[];
|
|
2212
|
+
/** Show time picker in date filter (default: true) */
|
|
2213
|
+
showTime?: boolean;
|
|
2214
|
+
/** Empty state label when no items available */
|
|
2215
|
+
emptyStateLabel?: string;
|
|
2216
|
+
/** Additional className for the trigger button */
|
|
2217
|
+
triggerClassName?: string;
|
|
2218
|
+
/** Additional className for the dropdown content */
|
|
2219
|
+
dropdownClassName?: string;
|
|
2220
|
+
/**
|
|
2221
|
+
* Override className for the `label` span inside the trigger. Useful when embedding
|
|
2222
|
+
* FilterSelect as the right pill of `<CompoundFilterSelect>`, where the Figma spec
|
|
2223
|
+
* paints the label in `text-fg-brand` (Subtext/xs) — see Figma 5427:32334.
|
|
2224
|
+
*/
|
|
2225
|
+
labelClassName?: string;
|
|
2226
|
+
}
|
|
2227
|
+
/** Date preset: label and function to compute the range */
|
|
2228
|
+
interface DatePreset {
|
|
2229
|
+
value: string;
|
|
2230
|
+
label: string;
|
|
2231
|
+
getRange: () => {
|
|
2232
|
+
start: Date;
|
|
2233
|
+
end: Date;
|
|
2234
|
+
};
|
|
2235
|
+
}
|
|
2236
|
+
/**
|
|
2237
|
+
* Props for FilterListItem component
|
|
2238
|
+
*/
|
|
2239
|
+
interface FilterListItemProps<T = string> {
|
|
2240
|
+
/** Unique item value */
|
|
2241
|
+
value: T;
|
|
2242
|
+
/** Display text */
|
|
2243
|
+
label: string;
|
|
2244
|
+
/** Optional subtext displayed below the label (two-line option) */
|
|
2245
|
+
subtext?: string;
|
|
2246
|
+
/** Selection state */
|
|
2247
|
+
selected?: boolean;
|
|
2248
|
+
/** Show drag handle */
|
|
2249
|
+
draggable?: boolean;
|
|
2250
|
+
/** Selection handler */
|
|
2251
|
+
onSelect?: (value: T) => void;
|
|
2252
|
+
/** Optional icon for this item */
|
|
2253
|
+
icon?: React$1.ComponentType<any> | React$1.ReactNode;
|
|
2254
|
+
/** Show loading spinner on this item */
|
|
2255
|
+
loading?: boolean;
|
|
2256
|
+
/** Optional custom display node replacing the plain label */
|
|
2257
|
+
labelNode?: React$1.ReactNode;
|
|
2258
|
+
/** Hover state (for stories) */
|
|
2259
|
+
hover?: boolean;
|
|
2260
|
+
/** Additional className */
|
|
2261
|
+
className?: string;
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
declare const FilterSelect: React$1.ForwardRefExoticComponent<FilterSelectProps<string> & React$1.RefAttributes<HTMLDivElement>>;
|
|
2265
|
+
|
|
2266
|
+
/**
|
|
2267
|
+
* FilterListItem — single row in a FilterSelect dropdown list.
|
|
2268
|
+
*
|
|
2269
|
+
* Figma spec (4085:5872, 4085:5885):
|
|
2270
|
+
* [drag handle?] [leading icon?] [label / optional subtext] [trailing tick when selected]
|
|
2271
|
+
*
|
|
2272
|
+
* Key fix: only the SELECTED option renders a tick — NOT every option.
|
|
2273
|
+
* We do not render a Checkbox; the design uses trailing check + bg-brand-secondary for selection.
|
|
2274
|
+
*
|
|
2275
|
+
* Layout-shift: the trailing tick slot is always reserved (same width) so selection does not
|
|
2276
|
+
* jitter item width. Hover / selected use background swaps only — no padding or border changes.
|
|
2277
|
+
*/
|
|
2278
|
+
declare const FilterListItem: React$1.ForwardRefExoticComponent<FilterListItemProps<string> & {
|
|
2279
|
+
onDragStart?: (e: React$1.DragEvent) => void;
|
|
2280
|
+
onDragOver?: (e: React$1.DragEvent) => void;
|
|
2281
|
+
onDragLeave?: (e: React$1.DragEvent) => void;
|
|
2282
|
+
onDrop?: (e: React$1.DragEvent) => void;
|
|
2283
|
+
onDragEnd?: (e: React$1.DragEvent) => void;
|
|
2284
|
+
isDragging?: boolean;
|
|
2285
|
+
isDragOver?: boolean;
|
|
2286
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
2287
|
+
|
|
2288
|
+
/**
|
|
2289
|
+
* Option for the left-side toggle dropdown (e.g., Agent/Crew).
|
|
2290
|
+
*/
|
|
2291
|
+
interface CompoundFilterToggleOption<T extends string = string> {
|
|
2292
|
+
value: T;
|
|
2293
|
+
label: string;
|
|
2294
|
+
/** Icon shown inside the dropdown menu next to the label */
|
|
2295
|
+
icon?: LucideIcon | React$1.ReactNode;
|
|
2296
|
+
}
|
|
2297
|
+
interface CompoundFilterSelectProps<T extends string = string> extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
2298
|
+
/** Options for the left-side toggle dropdown */
|
|
2299
|
+
options: CompoundFilterToggleOption<T>[];
|
|
2300
|
+
/** Current selected value for the left toggle */
|
|
2301
|
+
value: T;
|
|
2302
|
+
/** Callback when left toggle value changes */
|
|
2303
|
+
onChange: (value: T) => void;
|
|
2304
|
+
/**
|
|
2305
|
+
* Leading icon shown on the left pill (e.g., an icon representing the current selection).
|
|
2306
|
+
* If omitted, falls back to the icon on the currently-selected option.
|
|
2307
|
+
*/
|
|
2308
|
+
leadingIcon?: LucideIcon | React$1.ReactNode;
|
|
2309
|
+
/** Optional label shown on the left pill next to the icon. If omitted, only icon + chevron are shown (compact mode). */
|
|
2310
|
+
leftLabel?: string;
|
|
2311
|
+
/** Right-side content, typically a <FilterSelect /> */
|
|
2312
|
+
children?: React$1.ReactNode;
|
|
2313
|
+
/** Disable the left toggle */
|
|
2314
|
+
disabled?: boolean;
|
|
2315
|
+
}
|
|
2316
|
+
/**
|
|
2317
|
+
* CompoundFilterSelect
|
|
2318
|
+
*
|
|
2319
|
+
* A compound filter comprising:
|
|
2320
|
+
* - Left pill: a dropdown toggle (e.g., Agent / Crew) with its own rounded-left border
|
|
2321
|
+
* - Right pill: any content (typically a <FilterSelect />) with its own rounded-right border
|
|
2322
|
+
*
|
|
2323
|
+
* The two pills overlap by 1px so their borders merge visually into a single continuous pill.
|
|
2324
|
+
* Per Figma spec (1XTtQGgJ2Tb0wycZ7O1Ez9 · 5427:32324).
|
|
2325
|
+
*/
|
|
2326
|
+
declare function CompoundFilterSelect<T extends string = string>({ options, value, onChange, leadingIcon, leftLabel, children, disabled, className, ...props }: CompoundFilterSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
2327
|
+
declare namespace CompoundFilterSelect {
|
|
2328
|
+
var displayName: string;
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
interface ButtonListItem {
|
|
2332
|
+
value: string;
|
|
2333
|
+
label: string;
|
|
2334
|
+
icon?: LucideIcon;
|
|
2335
|
+
}
|
|
2336
|
+
interface ButtonListProps {
|
|
2337
|
+
label?: string;
|
|
2338
|
+
leadingIcon?: LucideIcon;
|
|
2339
|
+
items: ButtonListItem[];
|
|
2340
|
+
onSelect?: (value: string) => void;
|
|
2341
|
+
defaultOpen?: boolean;
|
|
2342
|
+
open?: boolean;
|
|
2343
|
+
onOpenChange?: (open: boolean) => void;
|
|
2344
|
+
className?: string;
|
|
2345
|
+
dropdownClassName?: string;
|
|
2346
|
+
}
|
|
2347
|
+
|
|
2348
|
+
declare const ButtonList: React$1.ForwardRefExoticComponent<ButtonListProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2349
|
+
|
|
2350
|
+
type SpinnerSize = "sm" | "md" | "lg" | "xl";
|
|
2351
|
+
interface SpinnerProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
2352
|
+
/**
|
|
2353
|
+
* Size of the spinner
|
|
2354
|
+
* @default "md"
|
|
2355
|
+
*/
|
|
2356
|
+
size?: SpinnerSize;
|
|
2357
|
+
/**
|
|
2358
|
+
* Custom className for the spinner container
|
|
2359
|
+
*/
|
|
2360
|
+
className?: string;
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2363
|
+
/**
|
|
2364
|
+
* Spinner component - Displays a loading spinner with size variations
|
|
2365
|
+
* Based on Figma design node: 3357:4429
|
|
2366
|
+
*/
|
|
2367
|
+
declare const Spinner: React$1.ForwardRefExoticComponent<SpinnerProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2368
|
+
|
|
2369
|
+
/**
|
|
2370
|
+
* Supported Monaco editor languages.
|
|
2371
|
+
*/
|
|
2372
|
+
type JsonEditorLanguage = "json" | "javascript" | "typescript" | "yaml" | "xml" | "html" | "css" | "markdown" | "sql" | "plaintext";
|
|
2373
|
+
declare const JSON_EDITOR_LANGUAGE_OPTIONS: readonly JsonEditorLanguage[];
|
|
2374
|
+
interface JsonEditorProps {
|
|
2375
|
+
value: string;
|
|
2376
|
+
onChange: (val: string) => void;
|
|
2377
|
+
onParsedObject?: (obj: unknown | null) => void;
|
|
2378
|
+
height?: string;
|
|
2379
|
+
label?: string;
|
|
2380
|
+
schema?: Schema;
|
|
2381
|
+
nodeId?: string;
|
|
2382
|
+
language?: JsonEditorLanguage;
|
|
2383
|
+
showExpandButton?: boolean;
|
|
2384
|
+
/** When true, hide the header/toolbar (for embedding in KeyValueJsonEditor). */
|
|
2385
|
+
hideHeader?: boolean;
|
|
2386
|
+
}
|
|
2387
|
+
|
|
2388
|
+
declare function JsonEditor({ value, onChange, onParsedObject, height, label, schema, nodeId, language, showExpandButton, hideHeader, }: JsonEditorProps): react_jsx_runtime.JSX.Element;
|
|
2389
|
+
|
|
2390
|
+
interface UseJsonEditorParams {
|
|
2391
|
+
value: string;
|
|
2392
|
+
onChange: (val: string) => void;
|
|
2393
|
+
onParsedObject?: (obj: unknown | null) => void;
|
|
2394
|
+
schema?: Schema;
|
|
2395
|
+
nodeId?: string;
|
|
2396
|
+
language?: JsonEditorLanguage;
|
|
2397
|
+
}
|
|
2398
|
+
declare function useJsonEditor({ value, onChange, onParsedObject, schema, nodeId, language, }: UseJsonEditorParams): {
|
|
2399
|
+
handleMount: OnMount;
|
|
2400
|
+
handleExpandedMount: OnMount;
|
|
2401
|
+
handleChange: (val: string | undefined) => void;
|
|
2402
|
+
formatJson: () => Promise<void> | undefined;
|
|
2403
|
+
formatExpandedJson: () => Promise<void> | undefined;
|
|
2404
|
+
copyToClipboard: () => void;
|
|
2405
|
+
errors: string[];
|
|
2406
|
+
copied: boolean;
|
|
2407
|
+
};
|
|
2408
|
+
|
|
2409
|
+
declare const enhanceJsonError: (message: string) => string;
|
|
2410
|
+
declare const MONACO_OPTIONS: {
|
|
2411
|
+
fontSize: number;
|
|
2412
|
+
lineHeight: number;
|
|
2413
|
+
padding: {
|
|
2414
|
+
top: number;
|
|
2415
|
+
bottom: number;
|
|
2416
|
+
};
|
|
2417
|
+
minimap: {
|
|
2418
|
+
readonly enabled: false;
|
|
2419
|
+
};
|
|
2420
|
+
automaticLayout: true;
|
|
2421
|
+
scrollBeyondLastLine: false;
|
|
2422
|
+
folding: true;
|
|
2423
|
+
lineNumbers: "on";
|
|
2424
|
+
renderLineHighlight: "none";
|
|
2425
|
+
fontFamily: "'Geist Mono', 'Cascadia Code', 'Fira Code', monospace";
|
|
2426
|
+
fontLigatures: true;
|
|
2427
|
+
bracketPairColorization: {
|
|
2428
|
+
readonly enabled: true;
|
|
2429
|
+
};
|
|
2430
|
+
guides: {
|
|
2431
|
+
readonly bracketPairs: false;
|
|
2432
|
+
readonly indentation: false;
|
|
2433
|
+
};
|
|
2434
|
+
overviewRulerLanes: 0;
|
|
2435
|
+
hideCursorInOverviewRuler: true;
|
|
2436
|
+
overviewRulerBorder: false;
|
|
2437
|
+
scrollbar: {
|
|
2438
|
+
readonly vertical: "auto";
|
|
2439
|
+
readonly horizontal: "auto";
|
|
2440
|
+
readonly useShadows: false;
|
|
2441
|
+
readonly verticalScrollbarSize: 6;
|
|
2442
|
+
readonly horizontalScrollbarSize: 6;
|
|
2443
|
+
readonly arrowSize: 0;
|
|
2444
|
+
};
|
|
2445
|
+
};
|
|
2446
|
+
/** Dialog editor: tighter padding, slightly larger font for readability in expanded view */
|
|
2447
|
+
declare const MONACO_OPTIONS_DIALOG: {
|
|
2448
|
+
fontSize: number;
|
|
2449
|
+
lineHeight: number;
|
|
2450
|
+
padding: {
|
|
2451
|
+
top: number;
|
|
2452
|
+
bottom: number;
|
|
2453
|
+
};
|
|
2454
|
+
minimap: {
|
|
2455
|
+
readonly enabled: false;
|
|
2456
|
+
};
|
|
2457
|
+
automaticLayout: true;
|
|
2458
|
+
scrollBeyondLastLine: false;
|
|
2459
|
+
folding: true;
|
|
2460
|
+
lineNumbers: "on";
|
|
2461
|
+
renderLineHighlight: "none";
|
|
2462
|
+
fontFamily: "'Geist Mono', 'Cascadia Code', 'Fira Code', monospace";
|
|
2463
|
+
fontLigatures: true;
|
|
2464
|
+
bracketPairColorization: {
|
|
2465
|
+
readonly enabled: true;
|
|
2466
|
+
};
|
|
2467
|
+
guides: {
|
|
2468
|
+
readonly bracketPairs: false;
|
|
2469
|
+
readonly indentation: false;
|
|
2470
|
+
};
|
|
2471
|
+
overviewRulerLanes: 0;
|
|
2472
|
+
hideCursorInOverviewRuler: true;
|
|
2473
|
+
overviewRulerBorder: false;
|
|
2474
|
+
scrollbar: {
|
|
2475
|
+
readonly vertical: "auto";
|
|
2476
|
+
readonly horizontal: "auto";
|
|
2477
|
+
readonly useShadows: false;
|
|
2478
|
+
readonly verticalScrollbarSize: 6;
|
|
2479
|
+
readonly horizontalScrollbarSize: 6;
|
|
2480
|
+
readonly arrowSize: 0;
|
|
2481
|
+
};
|
|
2482
|
+
};
|
|
2483
|
+
|
|
2484
|
+
interface KeyValuePair {
|
|
2485
|
+
key: string;
|
|
2486
|
+
value: string;
|
|
2487
|
+
/**
|
|
2488
|
+
* Optional per-row error for the key field. When set, the key Input is
|
|
2489
|
+
* rendered with `invalid` + this message as supporting-text.
|
|
2490
|
+
*/
|
|
2491
|
+
keyError?: string;
|
|
2492
|
+
/**
|
|
2493
|
+
* Optional per-row error for the value field. When set, the value Input is
|
|
2494
|
+
* rendered with `invalid` + this message as supporting-text.
|
|
2495
|
+
*/
|
|
2496
|
+
valueError?: string;
|
|
2497
|
+
}
|
|
2498
|
+
interface KeyValueEditorProps {
|
|
2499
|
+
/**
|
|
2500
|
+
* Key-value pairs.
|
|
2501
|
+
*/
|
|
2502
|
+
pairs: KeyValuePair[];
|
|
2503
|
+
/**
|
|
2504
|
+
* Called when pairs change.
|
|
2505
|
+
*/
|
|
2506
|
+
onPairsChange: (pairs: KeyValuePair[]) => void;
|
|
2507
|
+
/**
|
|
2508
|
+
* Placeholder for key inputs.
|
|
2509
|
+
*/
|
|
2510
|
+
keyPlaceholder?: string;
|
|
2511
|
+
/**
|
|
2512
|
+
* Placeholder for value inputs.
|
|
2513
|
+
*/
|
|
2514
|
+
valuePlaceholder?: string;
|
|
2515
|
+
/**
|
|
2516
|
+
* Optional toolbar content (e.g. Toggle button) rendered in the header.
|
|
2517
|
+
*/
|
|
2518
|
+
toolbar?: React$1.ReactNode;
|
|
2519
|
+
/**
|
|
2520
|
+
* When true, omit the header row. For use inside KeyValueJsonEditor.
|
|
2521
|
+
*/
|
|
2522
|
+
hideHeader?: boolean;
|
|
2523
|
+
/**
|
|
2524
|
+
* When true, show delete button on each row. When false, delete is hidden.
|
|
2525
|
+
* Rows can only be deleted until 1 row remains.
|
|
2526
|
+
* @default true
|
|
2527
|
+
*/
|
|
2528
|
+
allowDeleteRow?: boolean;
|
|
2529
|
+
/**
|
|
2530
|
+
* Optional leading icon rendered inside the value field (e.g. a type
|
|
2531
|
+
* indicator like `<Brackets />`). Defaults to the git-compare glyph that
|
|
2532
|
+
* matches the Figma reference.
|
|
2533
|
+
*/
|
|
2534
|
+
valueLeadingIcon?: React$1.ReactNode;
|
|
2535
|
+
className?: string;
|
|
2536
|
+
style?: React$1.CSSProperties;
|
|
2537
|
+
}
|
|
2538
|
+
|
|
2539
|
+
/**
|
|
2540
|
+
* KeyValueEditor - Table-style key-value pair editor.
|
|
2541
|
+
* Renders header (Key, Value) and editable rows with delete on hover.
|
|
2542
|
+
*
|
|
2543
|
+
* Each row's key and value fields use the shared <Input> component
|
|
2544
|
+
* (inputSize="sm"), so focus/hover/pressed/invalid states and typography
|
|
2545
|
+
* are inherited from the design system — no ad-hoc input styling lives
|
|
2546
|
+
* here.
|
|
2547
|
+
*
|
|
2548
|
+
* Figma reference: 5905:39527
|
|
2549
|
+
*/
|
|
2550
|
+
declare const KeyValueEditor: React$1.ForwardRefExoticComponent<KeyValueEditorProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2551
|
+
|
|
2552
|
+
interface AudioPlayerProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "onSeek" | "onRateChange"> {
|
|
2553
|
+
/** Whether audio is currently playing. Controls the play/pause icon. */
|
|
2554
|
+
isPlaying: boolean;
|
|
2555
|
+
/** Current playback position, in seconds. */
|
|
2556
|
+
currentTime: number;
|
|
2557
|
+
/** Total duration, in seconds. */
|
|
2558
|
+
duration: number;
|
|
2559
|
+
/**
|
|
2560
|
+
* Normalized bar heights for the waveform, each between 0 and 1.
|
|
2561
|
+
* If omitted, a flat baseline line is rendered.
|
|
2562
|
+
*/
|
|
2563
|
+
waveform?: number[];
|
|
2564
|
+
/** Current playback speed (e.g. 1, 1.5, 2). Shown in a trailing pill. */
|
|
2565
|
+
playbackRate?: number;
|
|
2566
|
+
/** Available playback speeds to cycle through on pill click. */
|
|
2567
|
+
playbackRateOptions?: number[];
|
|
2568
|
+
/** Called when the play/pause button is clicked. */
|
|
2569
|
+
onPlayPause?: () => void;
|
|
2570
|
+
/** Called when the user clicks a position on the waveform. */
|
|
2571
|
+
onSeek?: (seconds: number) => void;
|
|
2572
|
+
/** Called when the user clicks the speed pill. */
|
|
2573
|
+
onRateChange?: (rate: number) => void;
|
|
2574
|
+
/** Custom formatter for times. Defaults to `m:ss`. */
|
|
2575
|
+
formatTime?: (seconds: number) => string;
|
|
2576
|
+
}
|
|
2577
|
+
|
|
2578
|
+
/**
|
|
2579
|
+
* AudioPlayer — presentational waveform audio player.
|
|
2580
|
+
*
|
|
2581
|
+
* Pure / controlled: all state (playing, time, rate) is driven by props.
|
|
2582
|
+
* Clicks on the waveform emit `onSeek(seconds)`; clicking the speed pill
|
|
2583
|
+
* cycles through `playbackRateOptions` (default `[1, 1.5, 2]`).
|
|
2584
|
+
*
|
|
2585
|
+
* Figma: 3576:2351
|
|
2586
|
+
*/
|
|
2587
|
+
declare const AudioPlayer: React$1.ForwardRefExoticComponent<AudioPlayerProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2588
|
+
|
|
2589
|
+
interface ChatBubbleBaseProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
2590
|
+
/** Message body (string or rich node). */
|
|
2591
|
+
message: React$1.ReactNode;
|
|
2592
|
+
/** Timestamp text (e.g. "04:47 PM"). Revealed on hover by default. */
|
|
2593
|
+
timestamp?: string;
|
|
2594
|
+
/** When true, timestamp is always visible. */
|
|
2595
|
+
alwaysShowTimestamp?: boolean;
|
|
2596
|
+
/** Override for the 16px avatar slot. */
|
|
2597
|
+
avatar?: React$1.ReactNode;
|
|
2598
|
+
}
|
|
2599
|
+
interface ChatBubbleAgentProps extends ChatBubbleBaseProps {
|
|
2600
|
+
/** Shown below the bubble (e.g. a "Tool Call" tag). */
|
|
2601
|
+
trailing?: React$1.ReactNode;
|
|
2602
|
+
/** In-Focus state — draws the brand ring around the bubble. */
|
|
2603
|
+
focused?: boolean;
|
|
2604
|
+
}
|
|
2605
|
+
interface ChatBubbleUserProps extends ChatBubbleBaseProps {
|
|
2606
|
+
/** Shown below the message (e.g. a "Tool Call" tag). */
|
|
2607
|
+
trailing?: React$1.ReactNode;
|
|
2608
|
+
/** In-Focus state — draws the brand ring around the row. */
|
|
2609
|
+
focused?: boolean;
|
|
2610
|
+
}
|
|
2611
|
+
|
|
2612
|
+
/**
|
|
2613
|
+
* ChatBubbleAgent — right-aligned agent message with an avatar dot.
|
|
2614
|
+
* Figma: 3575:10095 / 3575:10154 (hover) / 5494:33659 (in-focus).
|
|
2615
|
+
*/
|
|
2616
|
+
declare const ChatBubbleAgent: React$1.ForwardRefExoticComponent<ChatBubbleAgentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2617
|
+
/**
|
|
2618
|
+
* ChatBubbleUser — left-aligned user message with a grey avatar icon.
|
|
2619
|
+
* No bubble background; just inline icon + grey text.
|
|
2620
|
+
* Figma: 3575:10815 / 3575:10829 (hover).
|
|
2621
|
+
*/
|
|
2622
|
+
declare const ChatBubbleUser: React$1.ForwardRefExoticComponent<ChatBubbleUserProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2623
|
+
|
|
2624
|
+
type PopoverSide = "top" | "right" | "bottom" | "left";
|
|
2625
|
+
type PopoverAlign = "start" | "center" | "end";
|
|
2626
|
+
type PopoverShadow = "none" | "xs" | "sm" | "md" | "lg";
|
|
2627
|
+
interface PopoverProps {
|
|
2628
|
+
/** Controlled open state. If omitted, component is uncontrolled. */
|
|
2629
|
+
open?: boolean;
|
|
2630
|
+
/** Called when open state changes (both controlled and uncontrolled). */
|
|
2631
|
+
onOpenChange?: (open: boolean) => void;
|
|
2632
|
+
/** Uncontrolled default open. */
|
|
2633
|
+
defaultOpen?: boolean;
|
|
2634
|
+
/** The trigger element (e.g. button). Rendered in place. */
|
|
2635
|
+
trigger: React$1.ReactNode;
|
|
2636
|
+
/** Popover body content — can be anything. */
|
|
2637
|
+
children: React$1.ReactNode;
|
|
2638
|
+
/**
|
|
2639
|
+
* Optional search input rendered at the top of the popover.
|
|
2640
|
+
* When provided, renders a search bar above `children`.
|
|
2641
|
+
*/
|
|
2642
|
+
search?: {
|
|
2643
|
+
/** Controlled search value */
|
|
2644
|
+
value?: string;
|
|
2645
|
+
/** Called when the search input changes */
|
|
2646
|
+
onValueChange?: (value: string) => void;
|
|
2647
|
+
/** Placeholder text */
|
|
2648
|
+
placeholder?: string;
|
|
2649
|
+
/** Auto-focus the search input when popover opens */
|
|
2650
|
+
autoFocus?: boolean;
|
|
2651
|
+
};
|
|
2652
|
+
/**
|
|
2653
|
+
* Position relative to trigger.
|
|
2654
|
+
* @default "bottom"
|
|
2655
|
+
*/
|
|
2656
|
+
side?: PopoverSide;
|
|
2657
|
+
/**
|
|
2658
|
+
* Alignment along the side.
|
|
2659
|
+
* @default "start"
|
|
2660
|
+
*/
|
|
2661
|
+
align?: PopoverAlign;
|
|
2662
|
+
/**
|
|
2663
|
+
* Offset (px) between trigger and popover.
|
|
2664
|
+
* @default 4
|
|
2665
|
+
*/
|
|
2666
|
+
sideOffset?: number;
|
|
2667
|
+
/**
|
|
2668
|
+
* Show border around the popover container.
|
|
2669
|
+
* @default false
|
|
2670
|
+
*/
|
|
2671
|
+
bordered?: boolean;
|
|
2672
|
+
/**
|
|
2673
|
+
* Shadow variant.
|
|
2674
|
+
* @default "md"
|
|
2675
|
+
*/
|
|
2676
|
+
shadow?: PopoverShadow;
|
|
2677
|
+
/** Width (px or CSS value). If omitted, popover sizes to content. */
|
|
2678
|
+
width?: number | string;
|
|
2679
|
+
/** Min width (defaults to trigger width if omitted) */
|
|
2680
|
+
minWidth?: number | string;
|
|
2681
|
+
/** Max height — content scrolls beyond this. */
|
|
2682
|
+
maxHeight?: number | string;
|
|
2683
|
+
/** Additional className for the popover container. */
|
|
2684
|
+
className?: string;
|
|
2685
|
+
/** Additional className for the outer wrapper (trigger + popover). */
|
|
2686
|
+
wrapperClassName?: string;
|
|
2687
|
+
/** Close popover on outside click. @default true */
|
|
2688
|
+
closeOnOutsideClick?: boolean;
|
|
2689
|
+
/** Close popover on Escape key. @default true */
|
|
2690
|
+
closeOnEscape?: boolean;
|
|
2691
|
+
}
|
|
2692
|
+
|
|
2693
|
+
/**
|
|
2694
|
+
* Popover — generic floating container.
|
|
2695
|
+
*
|
|
2696
|
+
* Supports:
|
|
2697
|
+
* - Any children as content
|
|
2698
|
+
* - Optional search bar at the top
|
|
2699
|
+
* - Border / shadow variants
|
|
2700
|
+
* - Controlled or uncontrolled open state
|
|
2701
|
+
* - Positioning (side + align)
|
|
2702
|
+
* - Click-outside / Escape to close
|
|
2703
|
+
*
|
|
2704
|
+
* Figma reference: 43:10346 (Menu Dropdown)
|
|
2705
|
+
*
|
|
2706
|
+
* @example
|
|
2707
|
+
* <Popover trigger={<Button>Open</Button>}>
|
|
2708
|
+
* <div>Any content here</div>
|
|
2709
|
+
* </Popover>
|
|
2710
|
+
*
|
|
2711
|
+
* @example with search
|
|
2712
|
+
* <Popover
|
|
2713
|
+
* trigger={<Button>Filter</Button>}
|
|
2714
|
+
* search={{ value: q, onValueChange: setQ, placeholder: "Search…" }}
|
|
2715
|
+
* >
|
|
2716
|
+
* <ListItems />
|
|
2717
|
+
* </Popover>
|
|
2718
|
+
*/
|
|
2719
|
+
declare const Popover: React$1.ForwardRefExoticComponent<PopoverProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
26
2720
|
|
|
27
|
-
export { Button, type ButtonProps,
|
|
2721
|
+
export { Accordion, AccordionContent, AccordionContentPlaceholder, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionSectionTrigger, type AccordionSectionTriggerProps, AccordionTrigger, type AccordionTriggerProps, type AccordionType, type AccordionValue, AudioPlayer, type AudioPlayerProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarShape, type AvatarSize, type BackButtonPosition, Badge, type BadgeProps, type BadgeVariant, Button, type ButtonBorderRadius, ButtonList, type ButtonListItem, type ButtonListProps, type ButtonProps, type ButtonSize, type ButtonVariant, type CellContent, type CellTextContent, ChatBubbleAgent, type ChatBubbleAgentProps, ChatBubbleUser, type ChatBubbleUserProps, Checkbox, type CheckboxProps, type ColumnDef, ColumnWidth, CompoundFilterSelect, type CompoundFilterSelectProps, type CompoundFilterToggleOption, DEFAULT_THEME, DataTable, type DataTableProps, type DatePreset, Dialog, DialogBody, type DialogBodyProps, DialogFooter, type DialogFooterProps, DialogHeader, DialogHeaderNavigation, type DialogHeaderNavigationProps, type DialogHeaderNavigationVariant, type DialogHeaderProps, DialogIcon, type DialogIconProps, type DialogProps, type DialogSize, type DialogType, EmptyState, type EmptyStateIllustrationPosition, type EmptyStateIllustrationSize, type EmptyStateProps, FileInput, type FileInputProps, type FilterItem, type FilterItemWithSection, FilterListItem, type FilterListItemProps, FilterSelect, type FilterSelectProps, type IconColor, IconPicker, type IconPickerProps, type IconSize, IconWrapper, type IconWrapperProps, Input, type InputBorderRadius, type InputForceState, InputGroup, type InputGroupBorderRadius, type InputGroupForceState, type InputGroupProps, type InputProps, type InputVariant, JSON_EDITOR_LANGUAGE_OPTIONS, JsonEditor, type JsonEditorLanguage, type JsonEditorProps, KeyValueEditor, type KeyValueEditorProps, type KeyValuePair, LegoLandWrapper, type LegoLandWrapperProps, List, type ListBorderRadius, type ListNavItemProps, ListNavigation, type ListNavigationProps, type ListProps, type ListType, type ListVariant, MONACO_OPTIONS, MONACO_OPTIONS_DIALOG, NestedButtonGroup, type NestedButtonGroupProps, NumberBadge, type NumberBadgeProps, type NumberBadgeVariant, NurixThemeProvider, Pagination, type PaginationProps, PlaySelect, type PlaySelectAudioItem, type PlaySelectProps, PlaybackControl, type PlaybackControlProps, type PlaybackState, Popover, type PopoverAlign, type PopoverProps, type PopoverShadow, type PopoverSide, ProgressBar, type ProgressBarProps, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, Select, SelectContent, type SelectContentItem, SelectFormLabel, SelectGroup, type SelectGroupProps, SelectItem, SelectLabel, type SelectLabelProps, type SelectMenuItemProps, type SelectProps, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, ShadowDOMWrapper, type ShowToastOptions, type SortDirection, type SortState, Spinner, type SpinnerProps, type SpinnerSize, type StepItem, type StepState, Stepper, StepperBar, type StepperBarProps, type StepperProps, type SupportingTextType, Surface, type SurfaceBackground, SurfaceBody, type SurfaceBodyProps, SurfaceFooter, type SurfaceFooterProps, SurfaceHeader, type SurfaceHeaderProps, type SurfaceProps, Switch, type SwitchProps, type SwitchSize, type TabVariant, type TableAction, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TagBadge, type TagBadgeProps, type TagOption, Textarea, type TextareaBorderRadius, type TextareaForceState, type TextareaProps, ThemeProvider, Toast, type ToastProps, type ToastVariant, Toaster, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, Typography, type TypographyProps, type TypographySize, type TypographyTone, type TypographyVariant, type TypographyWeight, type UsePlaySelectProps, type UseSelectProps, enhanceJsonError, showToast, useJsonEditor, usePlaySelect, useSelect, useTheme };
|