@nurix/ui-component-library 1.1.3-stage.89 → 1.1.3-stage.91
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 +1 -1
- package/dist/index.d.mts +561 -71
- package/dist/index.d.ts +561 -71
- package/dist/index.js +1460 -26
- package/dist/index.mjs +1428 -26
- package/dist/styles.css +538 -42
- package/package.json +3 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
2
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
3
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
4
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';
|
|
5
8
|
|
|
6
9
|
type ButtonBorderRadius = "none" | "soft" | "rounded";
|
|
7
10
|
type ButtonVariant = "primary" | "secondary" | "destructive" | "outline" | "link" | "iconPrimary" | "iconSecondary" | "iconOutline";
|
|
8
|
-
type ButtonSize = "default" | "sm" | "lg" | "icon" | "iconSm";
|
|
9
|
-
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
11
|
+
type ButtonSize = "default" | "sm" | "lg" | "link" | "icon" | "iconSm";
|
|
12
|
+
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
10
13
|
variant?: ButtonVariant;
|
|
11
14
|
size?: ButtonSize;
|
|
12
15
|
onClick?: () => void;
|
|
@@ -15,8 +18,8 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
15
18
|
* Optional leading/trailing icons (e.g. lucide-react). If `asChild` is true,
|
|
16
19
|
* children layout is controlled by the consumer, so these are not injected.
|
|
17
20
|
*/
|
|
18
|
-
leadingIcon?: React.ReactNode;
|
|
19
|
-
trailingIcon?: React.ReactNode;
|
|
21
|
+
leadingIcon?: React$1.ReactNode;
|
|
22
|
+
trailingIcon?: React$1.ReactNode;
|
|
20
23
|
showLeadingIcon?: boolean;
|
|
21
24
|
showTrailingIcon?: boolean;
|
|
22
25
|
/**
|
|
@@ -26,12 +29,12 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
26
29
|
asChild?: boolean;
|
|
27
30
|
}
|
|
28
31
|
|
|
29
|
-
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
32
|
+
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
30
33
|
|
|
31
34
|
type InputBorderRadius = "none" | "soft" | "rounded" | "pill";
|
|
32
35
|
type SupportingTextType = "help" | "error";
|
|
33
36
|
type InputForceState = "active" | "focussed" | "disabled";
|
|
34
|
-
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
37
|
+
interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
35
38
|
/**
|
|
36
39
|
* Optional label shown above the field.
|
|
37
40
|
*/
|
|
@@ -69,7 +72,7 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
|
69
72
|
*/
|
|
70
73
|
invalid?: boolean;
|
|
71
74
|
}
|
|
72
|
-
interface FileInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "onChange"> {
|
|
75
|
+
interface FileInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "onChange"> {
|
|
73
76
|
label?: string;
|
|
74
77
|
mandatory?: boolean;
|
|
75
78
|
buttonLabel?: string;
|
|
@@ -79,13 +82,13 @@ interface FileInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement
|
|
|
79
82
|
onFileChange?: (file: File | null) => void;
|
|
80
83
|
}
|
|
81
84
|
|
|
82
|
-
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
85
|
+
declare const Input: React$1.ForwardRefExoticComponent<InputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
83
86
|
|
|
84
|
-
declare const FileInput: React.ForwardRefExoticComponent<FileInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
87
|
+
declare const FileInput: React$1.ForwardRefExoticComponent<FileInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
85
88
|
|
|
86
89
|
type InputGroupBorderRadius = "none" | "soft" | "rounded" | "pill";
|
|
87
90
|
type InputGroupForceState = "active" | "focussed" | "disabled";
|
|
88
|
-
interface InputGroupProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
91
|
+
interface InputGroupProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
89
92
|
/**
|
|
90
93
|
* Optional label shown above the field.
|
|
91
94
|
*/
|
|
@@ -109,22 +112,22 @@ interface InputGroupProps extends Omit<React.InputHTMLAttributes<HTMLInputElemen
|
|
|
109
112
|
/**
|
|
110
113
|
* Optional content shown on the left of the input (icon/text/button).
|
|
111
114
|
*/
|
|
112
|
-
startAdornment?: React.ReactNode;
|
|
115
|
+
startAdornment?: React$1.ReactNode;
|
|
113
116
|
/**
|
|
114
117
|
* Optional content shown on the right of the input (icon/text/button).
|
|
115
118
|
*/
|
|
116
|
-
endAdornment?: React.ReactNode;
|
|
119
|
+
endAdornment?: React$1.ReactNode;
|
|
117
120
|
/**
|
|
118
121
|
* Optional content separated by a divider on the far left (e.g. "https://").
|
|
119
122
|
*/
|
|
120
|
-
startSegment?: React.ReactNode;
|
|
123
|
+
startSegment?: React$1.ReactNode;
|
|
121
124
|
/**
|
|
122
125
|
* Optional content separated by a divider on the far right (e.g. ".com").
|
|
123
126
|
*/
|
|
124
|
-
endSegment?: React.ReactNode;
|
|
127
|
+
endSegment?: React$1.ReactNode;
|
|
125
128
|
input_border_radius?: InputGroupBorderRadius;
|
|
126
129
|
}
|
|
127
|
-
interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
130
|
+
interface TextareaProps extends React$1.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
128
131
|
label?: string;
|
|
129
132
|
mandatory?: boolean;
|
|
130
133
|
supportingText?: string;
|
|
@@ -133,8 +136,8 @@ interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement
|
|
|
133
136
|
input_border_radius?: InputGroupBorderRadius;
|
|
134
137
|
}
|
|
135
138
|
|
|
136
|
-
declare const InputGroup: React.ForwardRefExoticComponent<InputGroupProps & React.RefAttributes<HTMLInputElement>>;
|
|
137
|
-
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
139
|
+
declare const InputGroup: React$1.ForwardRefExoticComponent<InputGroupProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
140
|
+
declare const Textarea: React$1.ForwardRefExoticComponent<TextareaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
138
141
|
|
|
139
142
|
type SwitchSize = "default" | "small";
|
|
140
143
|
interface SwitchProps {
|
|
@@ -170,28 +173,28 @@ interface SwitchProps {
|
|
|
170
173
|
*/
|
|
171
174
|
id?: string;
|
|
172
175
|
className?: string;
|
|
173
|
-
style?: React.CSSProperties;
|
|
176
|
+
style?: React$1.CSSProperties;
|
|
174
177
|
}
|
|
175
178
|
|
|
176
|
-
declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
|
|
179
|
+
declare const Switch: React$1.ForwardRefExoticComponent<SwitchProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
177
180
|
|
|
178
|
-
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
181
|
+
declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
179
182
|
|
|
180
183
|
/**
|
|
181
184
|
* shadcn-style Checkbox props (Radix primitive props).
|
|
182
185
|
* Note: Radix supports `checked: boolean | "indeterminate"`. Figma uses boolean.
|
|
183
186
|
*/
|
|
184
|
-
type CheckboxProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>;
|
|
187
|
+
type CheckboxProps = React$1.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>;
|
|
185
188
|
|
|
186
|
-
declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
187
|
-
declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
189
|
+
declare const RadioGroup: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
190
|
+
declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
188
191
|
|
|
189
|
-
type RadioGroupProps = React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>;
|
|
190
|
-
type RadioGroupItemProps = React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>;
|
|
192
|
+
type RadioGroupProps = React$1.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>;
|
|
193
|
+
type RadioGroupItemProps = React$1.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>;
|
|
191
194
|
|
|
192
195
|
type DialogHeaderNavigationVariant = "primary" | "inner";
|
|
193
196
|
type BackButtonPosition = "left" | "right";
|
|
194
|
-
interface DialogHeaderNavigationProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
197
|
+
interface DialogHeaderNavigationProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
195
198
|
title: string;
|
|
196
199
|
subtitle?: string;
|
|
197
200
|
/**
|
|
@@ -205,36 +208,36 @@ interface DialogHeaderNavigationProps extends React.HTMLAttributes<HTMLDivElemen
|
|
|
205
208
|
disabled?: boolean;
|
|
206
209
|
}
|
|
207
210
|
type TabVariant = "top" | "side";
|
|
208
|
-
interface TabsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
211
|
+
interface TabsProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
209
212
|
value?: string;
|
|
210
213
|
defaultValue?: string;
|
|
211
214
|
onValueChange?: (value: string) => void;
|
|
212
215
|
variant?: TabVariant;
|
|
213
216
|
}
|
|
214
|
-
interface TabsListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
217
|
+
interface TabsListProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
215
218
|
variant?: TabVariant;
|
|
216
219
|
}
|
|
217
|
-
interface TabsTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
220
|
+
interface TabsTriggerProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
218
221
|
value: string;
|
|
219
222
|
variant?: TabVariant;
|
|
220
|
-
iconLeft?: React.ReactNode;
|
|
223
|
+
iconLeft?: React$1.ReactNode;
|
|
221
224
|
}
|
|
222
|
-
interface TabsContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
225
|
+
interface TabsContentProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
223
226
|
value: string;
|
|
224
227
|
forceMount?: boolean;
|
|
225
228
|
}
|
|
226
229
|
|
|
227
|
-
declare const DialogHeaderNavigation: React.ForwardRefExoticComponent<DialogHeaderNavigationProps & React.RefAttributes<HTMLDivElement>>;
|
|
230
|
+
declare const DialogHeaderNavigation: React$1.ForwardRefExoticComponent<DialogHeaderNavigationProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
228
231
|
|
|
229
232
|
declare function Tabs({ className, value, defaultValue, onValueChange, variant, ...props }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
230
|
-
declare const TabsList: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<HTMLDivElement>>;
|
|
231
|
-
declare const TabsTrigger: React.ForwardRefExoticComponent<TabsTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
233
|
+
declare const TabsList: React$1.ForwardRefExoticComponent<TabsListProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
234
|
+
declare const TabsTrigger: React$1.ForwardRefExoticComponent<TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
232
235
|
declare function TabsContent({ value, forceMount, className, children, ...props }: TabsContentProps): react_jsx_runtime.JSX.Element | null;
|
|
233
236
|
|
|
234
237
|
type AccordionType = "single" | "multiple";
|
|
235
238
|
type AccordionValue<TType extends AccordionType> = TType extends "multiple" ? string[] : string | null;
|
|
236
239
|
type AccordionOnValueChange<TType extends AccordionType> = (value: AccordionValue<TType>) => void;
|
|
237
|
-
interface AccordionProps<TType extends AccordionType = "single"> extends Omit<React.HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> {
|
|
240
|
+
interface AccordionProps<TType extends AccordionType = "single"> extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> {
|
|
238
241
|
type?: TType;
|
|
239
242
|
/**
|
|
240
243
|
* When `type="single"`, allows collapsing the open item.
|
|
@@ -245,31 +248,31 @@ interface AccordionProps<TType extends AccordionType = "single"> extends Omit<Re
|
|
|
245
248
|
onValueChange?: AccordionOnValueChange<TType>;
|
|
246
249
|
disabled?: boolean;
|
|
247
250
|
}
|
|
248
|
-
interface AccordionItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
251
|
+
interface AccordionItemProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
249
252
|
value: string;
|
|
250
253
|
disabled?: boolean;
|
|
251
254
|
}
|
|
252
|
-
interface AccordionTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
255
|
+
interface AccordionTriggerProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
253
256
|
/**
|
|
254
257
|
* Optional description under the label (matches Figma).
|
|
255
258
|
*/
|
|
256
|
-
description?: React.ReactNode;
|
|
259
|
+
description?: React$1.ReactNode;
|
|
257
260
|
/**
|
|
258
261
|
* Optional right-side action (e.g. "Add" button).
|
|
259
262
|
* Note: click events are stopped from toggling the accordion.
|
|
260
263
|
*/
|
|
261
|
-
action?: React.ReactNode;
|
|
264
|
+
action?: React$1.ReactNode;
|
|
262
265
|
}
|
|
263
|
-
interface AccordionContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
266
|
+
interface AccordionContentProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
264
267
|
}
|
|
265
268
|
|
|
266
269
|
declare function Accordion<TType extends AccordionType = "single">({ className, type, collapsible, value, defaultValue, onValueChange, disabled, ...props }: AccordionProps<TType>): react_jsx_runtime.JSX.Element;
|
|
267
|
-
declare const AccordionItem: React.ForwardRefExoticComponent<AccordionItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
268
|
-
declare const AccordionTrigger: React.ForwardRefExoticComponent<AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
269
|
-
declare const AccordionContent: React.ForwardRefExoticComponent<AccordionContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
270
|
+
declare const AccordionItem: React$1.ForwardRefExoticComponent<AccordionItemProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
271
|
+
declare const AccordionTrigger: React$1.ForwardRefExoticComponent<AccordionTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
272
|
+
declare const AccordionContent: React$1.ForwardRefExoticComponent<AccordionContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
270
273
|
declare function AccordionContentPlaceholder({ className, children, }: {
|
|
271
274
|
className?: string;
|
|
272
|
-
children?: React.ReactNode;
|
|
275
|
+
children?: React$1.ReactNode;
|
|
273
276
|
}): react_jsx_runtime.JSX.Element;
|
|
274
277
|
|
|
275
278
|
type AvatarSize = "sm" | "default" | "lg";
|
|
@@ -298,7 +301,7 @@ interface AvatarProps {
|
|
|
298
301
|
*/
|
|
299
302
|
shape?: AvatarShape;
|
|
300
303
|
className?: string;
|
|
301
|
-
style?: React.CSSProperties;
|
|
304
|
+
style?: React$1.CSSProperties;
|
|
302
305
|
}
|
|
303
306
|
interface AvatarGroupProps {
|
|
304
307
|
/**
|
|
@@ -319,22 +322,22 @@ interface AvatarGroupProps {
|
|
|
319
322
|
/**
|
|
320
323
|
* The avatar items to display.
|
|
321
324
|
*/
|
|
322
|
-
children: React.ReactNode;
|
|
325
|
+
children: React$1.ReactNode;
|
|
323
326
|
className?: string;
|
|
324
|
-
style?: React.CSSProperties;
|
|
327
|
+
style?: React$1.CSSProperties;
|
|
325
328
|
}
|
|
326
329
|
|
|
327
330
|
/**
|
|
328
331
|
* Avatar component - An image element with a fallback for representing the user.
|
|
329
332
|
* Based on Figma design node: 3316:3490
|
|
330
333
|
*/
|
|
331
|
-
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
|
334
|
+
declare const Avatar: React$1.ForwardRefExoticComponent<AvatarProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
332
335
|
/**
|
|
333
336
|
* AvatarGroup component - Displays multiple avatars in a stacked layout
|
|
334
337
|
*/
|
|
335
|
-
declare const AvatarGroup: React.ForwardRefExoticComponent<AvatarGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
338
|
+
declare const AvatarGroup: React$1.ForwardRefExoticComponent<AvatarGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
336
339
|
|
|
337
|
-
type BadgeVariant = "default" | "secondary" | "destructive" | "outline" | "success";
|
|
340
|
+
type BadgeVariant = "default" | "secondary" | "destructive" | "outline" | "success" | "warning";
|
|
338
341
|
interface BadgeProps {
|
|
339
342
|
/**
|
|
340
343
|
* The badge variant style.
|
|
@@ -348,11 +351,11 @@ interface BadgeProps {
|
|
|
348
351
|
/**
|
|
349
352
|
* Optional leading icon (renders before the label).
|
|
350
353
|
*/
|
|
351
|
-
leadingIcon?: React.ReactNode;
|
|
354
|
+
leadingIcon?: React$1.ReactNode;
|
|
352
355
|
/**
|
|
353
356
|
* Optional trailing icon (renders after the label).
|
|
354
357
|
*/
|
|
355
|
-
trailingIcon?: React.ReactNode;
|
|
358
|
+
trailingIcon?: React$1.ReactNode;
|
|
356
359
|
/**
|
|
357
360
|
* Whether to show the leading icon.
|
|
358
361
|
* @default true
|
|
@@ -366,9 +369,9 @@ interface BadgeProps {
|
|
|
366
369
|
/**
|
|
367
370
|
* Badge content (alternative to label prop).
|
|
368
371
|
*/
|
|
369
|
-
children?: React.ReactNode;
|
|
372
|
+
children?: React$1.ReactNode;
|
|
370
373
|
className?: string;
|
|
371
|
-
style?: React.CSSProperties;
|
|
374
|
+
style?: React$1.CSSProperties;
|
|
372
375
|
}
|
|
373
376
|
type NumberBadgeVariant = "default" | "destructive" | "secondary";
|
|
374
377
|
interface NumberBadgeProps {
|
|
@@ -392,42 +395,311 @@ interface NumberBadgeProps {
|
|
|
392
395
|
*/
|
|
393
396
|
showZero?: boolean;
|
|
394
397
|
className?: string;
|
|
395
|
-
style?: React.CSSProperties;
|
|
398
|
+
style?: React$1.CSSProperties;
|
|
396
399
|
}
|
|
397
400
|
|
|
398
401
|
/**
|
|
399
402
|
* Badge component - Displays a badge with options for leading and trailing icons
|
|
400
403
|
* Based on Figma design node: 3333:1629
|
|
401
404
|
*/
|
|
402
|
-
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLDivElement>>;
|
|
405
|
+
declare const Badge: React$1.ForwardRefExoticComponent<BadgeProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
403
406
|
/**
|
|
404
407
|
* NumberBadge component - Displays a circular badge with a count
|
|
405
408
|
* Based on Figma design node: 3333:1629
|
|
406
409
|
*/
|
|
407
|
-
declare const NumberBadge: React.ForwardRefExoticComponent<NumberBadgeProps & React.RefAttributes<HTMLDivElement>>;
|
|
410
|
+
declare const NumberBadge: React$1.ForwardRefExoticComponent<NumberBadgeProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
411
|
+
|
|
412
|
+
type SelectType = "Single Line Regular" | "Single Line Large" | "Double Line";
|
|
413
|
+
type SelectState = "Default" | "Open";
|
|
414
|
+
interface SelectProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
415
|
+
type?: SelectType;
|
|
416
|
+
state?: SelectState;
|
|
417
|
+
showLead?: boolean;
|
|
418
|
+
showSearch?: boolean;
|
|
419
|
+
value?: string;
|
|
420
|
+
onValueChange?: (value: string) => void;
|
|
421
|
+
placeholder?: string;
|
|
422
|
+
placeholderSubtext?: string;
|
|
423
|
+
}
|
|
424
|
+
interface SelectLabelProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
425
|
+
label?: string;
|
|
426
|
+
mandatory?: boolean;
|
|
427
|
+
}
|
|
428
|
+
interface SelectMenuItemProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
429
|
+
value: string;
|
|
430
|
+
hover?: boolean;
|
|
431
|
+
menuItem?: string;
|
|
432
|
+
menuItemSubtext?: string;
|
|
433
|
+
showPlaybackControl?: boolean;
|
|
434
|
+
selected?: boolean;
|
|
435
|
+
}
|
|
436
|
+
interface SelectGroupProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
437
|
+
showLabel?: boolean;
|
|
438
|
+
}
|
|
439
|
+
/** Item shape when using SelectContent `items` prop. Search filters by label and subtext. */
|
|
440
|
+
interface SelectContentItem {
|
|
441
|
+
value: string;
|
|
442
|
+
label: string;
|
|
443
|
+
subtext?: string;
|
|
444
|
+
leadIcon?: React$1.ReactNode;
|
|
445
|
+
leadIconSize?: "xs" | "sm" | "md";
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
declare const Select: React$1.FC<SelectPrimitive.SelectProps>;
|
|
449
|
+
declare const SelectGroup: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectGroupProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
450
|
+
/**
|
|
451
|
+
* Select value text (placeholder/value) using Typography tokens.
|
|
452
|
+
* We style placeholder color via `group-data-[placeholder]` on the trigger.
|
|
453
|
+
*/
|
|
454
|
+
declare const SelectValue: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectValueProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
455
|
+
declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
456
|
+
showLead?: boolean;
|
|
457
|
+
leadIcon?: React$1.ReactNode;
|
|
458
|
+
/** Size of lead icon. "xs" = 16px, "sm" = 24px (default) */
|
|
459
|
+
leadIconSize?: "xs" | "sm";
|
|
460
|
+
size?: "regular" | "large";
|
|
461
|
+
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
462
|
+
declare const SelectScrollUpButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
463
|
+
declare const SelectScrollDownButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
464
|
+
declare const SelectContent: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
465
|
+
/** Dropdown list items. When provided, search filters them by default. */
|
|
466
|
+
items?: SelectContentItem[];
|
|
467
|
+
/** Section label when using items (e.g. "Section", "Audio") */
|
|
468
|
+
sectionLabel?: string;
|
|
469
|
+
showSearch?: boolean;
|
|
470
|
+
searchPlaceholder?: string;
|
|
471
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
472
|
+
declare const SelectLabel: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
473
|
+
declare const SelectItem: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
474
|
+
subtext?: string;
|
|
475
|
+
type?: "single" | "double";
|
|
476
|
+
leadIcon?: React$1.ReactNode;
|
|
477
|
+
/** Size of leadIcon area. "xs" = 16px, "sm" = 24px, "md" = 36px (for playback controls) */
|
|
478
|
+
leadIconSize?: "xs" | "sm" | "md";
|
|
479
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
480
|
+
declare const SelectSeparator: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
481
|
+
declare function SelectFormLabel({ className, label, mandatory }: SelectLabelProps): react_jsx_runtime.JSX.Element;
|
|
482
|
+
|
|
483
|
+
interface PlaySelectAudioItem {
|
|
484
|
+
value: string;
|
|
485
|
+
label: string;
|
|
486
|
+
subtext?: string;
|
|
487
|
+
url: string;
|
|
488
|
+
}
|
|
489
|
+
interface PlaySelectProps {
|
|
490
|
+
/** List of audio items to display. Each has value, label, subtext, and playable url. */
|
|
491
|
+
dropdownListItems: PlaySelectAudioItem[];
|
|
492
|
+
/** Trigger label (e.g. "Title") */
|
|
493
|
+
label?: string;
|
|
494
|
+
/** Placeholder when nothing selected */
|
|
495
|
+
placeholder?: string;
|
|
496
|
+
/** Show search input in dropdown */
|
|
497
|
+
showSearch?: boolean;
|
|
498
|
+
/** Search placeholder text */
|
|
499
|
+
searchPlaceholder?: string;
|
|
500
|
+
/** Controlled value */
|
|
501
|
+
value?: string;
|
|
502
|
+
/** Default value when uncontrolled */
|
|
503
|
+
defaultValue?: string;
|
|
504
|
+
/** Called when value changes (alias for onValueChange) */
|
|
505
|
+
onValueChange?: (value: string) => void;
|
|
506
|
+
/** Called when user clicks play/pause button. Receives url and item. */
|
|
507
|
+
onPlayClick?: (url: string, item: PlaySelectAudioItem) => void;
|
|
508
|
+
/** Called when user selects a value (clicks item text to select) */
|
|
509
|
+
onSelectValue?: (value: string) => void;
|
|
510
|
+
/** Called when dropdown closes (select, click outside, escape, etc.) */
|
|
511
|
+
onCloseDropdown?: () => void;
|
|
512
|
+
/** Disabled state */
|
|
513
|
+
disabled?: boolean;
|
|
514
|
+
/** Trigger size */
|
|
515
|
+
size?: "regular" | "large";
|
|
516
|
+
/** Optional lead icon for the trigger */
|
|
517
|
+
triggerLeadIcon?: React$1.ReactNode;
|
|
518
|
+
/** Optional wrapper className (e.g. to control width) */
|
|
519
|
+
className?: string;
|
|
520
|
+
/** Minimum width (e.g. "196px"). Override via className if needed. */
|
|
521
|
+
minWidth?: string;
|
|
522
|
+
}
|
|
523
|
+
declare const PlaySelect: React$1.ForwardRefExoticComponent<PlaySelectProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
524
|
+
|
|
525
|
+
type PlaybackState = "play" | "pause";
|
|
526
|
+
interface PlaybackControlProps extends Omit<React$1.ComponentProps<typeof Button>, "children"> {
|
|
527
|
+
/**
|
|
528
|
+
* Which icon to show. `play` = play icon (triangle), `pause` = pause icon (two bars).
|
|
529
|
+
*/
|
|
530
|
+
state?: PlaybackState;
|
|
531
|
+
/**
|
|
532
|
+
* Alias for `state`. When true, show pause icon; when false, show play icon.
|
|
533
|
+
*/
|
|
534
|
+
playing?: boolean;
|
|
535
|
+
}
|
|
536
|
+
declare const PlaybackControl: React$1.ForwardRefExoticComponent<Omit<PlaybackControlProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
537
|
+
|
|
538
|
+
interface UseSelectProps {
|
|
539
|
+
value?: string;
|
|
540
|
+
defaultValue?: string;
|
|
541
|
+
onValueChange?: (value: string) => void;
|
|
542
|
+
}
|
|
543
|
+
declare function useSelect({ value, defaultValue, onValueChange }: UseSelectProps): {
|
|
544
|
+
value: string | undefined;
|
|
545
|
+
setValue: React$1.Dispatch<React$1.SetStateAction<string | undefined>>;
|
|
546
|
+
handleValueChange: (newValue: string) => void;
|
|
547
|
+
};
|
|
548
|
+
|
|
549
|
+
interface UsePlaySelectProps {
|
|
550
|
+
value?: string;
|
|
551
|
+
defaultValue?: string;
|
|
552
|
+
onValueChange?: (value: string) => void;
|
|
553
|
+
/** Called when user clicks play/pause button */
|
|
554
|
+
onPlayClick?: (url: string, item: PlaySelectAudioItem) => void;
|
|
555
|
+
/** Called when user selects a value (clicks item text) */
|
|
556
|
+
onSelectValue?: (value: string) => void;
|
|
557
|
+
/** Called when dropdown closes (select, click outside, escape, etc.) */
|
|
558
|
+
onCloseDropdown?: () => void;
|
|
559
|
+
}
|
|
560
|
+
declare function usePlaySelect({ value, defaultValue, onValueChange, onPlayClick, onSelectValue, onCloseDropdown, }: UsePlaySelectProps): {
|
|
561
|
+
value: string | undefined;
|
|
562
|
+
playingUrl: string | null;
|
|
563
|
+
audioRef: React$1.MutableRefObject<HTMLAudioElement | null>;
|
|
564
|
+
handleValueChange: (newValue: string) => void;
|
|
565
|
+
handleOpenChange: (open: boolean) => void;
|
|
566
|
+
handlePlay: (url: string, item: PlaySelectAudioItem) => void;
|
|
567
|
+
stopEvent: (e: React$1.PointerEvent | React$1.MouseEvent) => void;
|
|
568
|
+
createPlayHandler: (item: PlaySelectAudioItem) => (e: React$1.PointerEvent | React$1.MouseEvent) => void;
|
|
569
|
+
pauseAudio: () => void;
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
interface EmptyStateProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
573
|
+
/** Illustration element (e.g. image, icon, or SVG) displayed above the text. */
|
|
574
|
+
illustration?: React$1.ReactNode;
|
|
575
|
+
/** Primary title text. */
|
|
576
|
+
title: string;
|
|
577
|
+
/** Secondary description text. */
|
|
578
|
+
description?: string;
|
|
579
|
+
/** Action element (e.g. a Button) displayed below the text. */
|
|
580
|
+
action?: React$1.ReactNode;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Empty state placeholder.
|
|
585
|
+
* Figma reference node: 3696:2825
|
|
586
|
+
*/
|
|
587
|
+
declare const EmptyState: React$1.ForwardRefExoticComponent<EmptyStateProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
588
|
+
|
|
589
|
+
type ListVariant = "default" | "outline" | "muted";
|
|
590
|
+
type ListType = "card" | "list";
|
|
591
|
+
type ListBorderRadius = "none" | "soft" | "rounded";
|
|
592
|
+
interface ListProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
593
|
+
/**
|
|
594
|
+
* Layout type.
|
|
595
|
+
* - card: vertical card layout
|
|
596
|
+
* - list: horizontal row layout
|
|
597
|
+
* @default "card"
|
|
598
|
+
*/
|
|
599
|
+
type?: ListType;
|
|
600
|
+
/**
|
|
601
|
+
* Visual style variant.
|
|
602
|
+
* - default: card bg only (card) / no border, no bg (list)
|
|
603
|
+
* - outline: border with horizontal padding
|
|
604
|
+
* - muted: subtle background fill
|
|
605
|
+
* @default "default"
|
|
606
|
+
*/
|
|
607
|
+
variant?: ListVariant;
|
|
608
|
+
/**
|
|
609
|
+
* Design-system controlled border radius.
|
|
610
|
+
* @default "rounded"
|
|
611
|
+
*/
|
|
612
|
+
list_border_radius?: ListBorderRadius;
|
|
613
|
+
children?: React$1.ReactNode;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* List component - A composable card/list container with layout type,
|
|
618
|
+
* variant styles, hover overlay, and design-system border radius.
|
|
619
|
+
* Based on Figma design node: 3316:3511
|
|
620
|
+
*/
|
|
621
|
+
declare const List: React$1.ForwardRefExoticComponent<ListProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Tooltip provider. Wrap your app (or a subtree) with this to enable tooltips.
|
|
625
|
+
* Based on shadcn/ui + Radix Tooltip.
|
|
626
|
+
*/
|
|
627
|
+
declare const TooltipProvider: React$1.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
628
|
+
/**
|
|
629
|
+
* Tooltip root. Groups trigger and content.
|
|
630
|
+
*/
|
|
631
|
+
declare const Tooltip: React$1.FC<TooltipPrimitive.TooltipProps>;
|
|
632
|
+
/**
|
|
633
|
+
* Tooltip trigger. The element that shows the tooltip on hover.
|
|
634
|
+
*/
|
|
635
|
+
declare const TooltipTrigger: React$1.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
636
|
+
/**
|
|
637
|
+
* Tooltip content. Renders the tooltip popover with optional arrow and shortcut badge.
|
|
638
|
+
* Figma design: primary background, rounded, optional keyboard shortcut on the right.
|
|
639
|
+
* Portals into .lego-land when present for correct theming.
|
|
640
|
+
*/
|
|
641
|
+
declare const TooltipContent: React$1.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
642
|
+
shortcut?: string;
|
|
643
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
644
|
+
|
|
645
|
+
type TooltipContentProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> & {
|
|
646
|
+
/** Optional keyboard shortcut to display (e.g. "U", "⌘S") */
|
|
647
|
+
shortcut?: string;
|
|
648
|
+
};
|
|
649
|
+
|
|
650
|
+
type TypographyVariant = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p1" | "p2" | "p3";
|
|
651
|
+
type TypographyTone = "default" | "muted" | "inherit";
|
|
652
|
+
interface TypographyProps extends React$1.HTMLAttributes<HTMLElement> {
|
|
653
|
+
/**
|
|
654
|
+
* Typography variant (maps to Figma text styles).
|
|
655
|
+
* @default "p2"
|
|
656
|
+
*/
|
|
657
|
+
variant?: TypographyVariant;
|
|
658
|
+
/**
|
|
659
|
+
* Text color tone.
|
|
660
|
+
* @default "default"
|
|
661
|
+
*/
|
|
662
|
+
tone?: TypographyTone;
|
|
663
|
+
/**
|
|
664
|
+
* Render as the child element (Radix Slot).
|
|
665
|
+
* @default false
|
|
666
|
+
*/
|
|
667
|
+
asChild?: boolean;
|
|
668
|
+
/**
|
|
669
|
+
* Override the default HTML tag for the selected variant.
|
|
670
|
+
* Ignored when `asChild` is true.
|
|
671
|
+
*/
|
|
672
|
+
as?: React$1.ElementType;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* Typography component
|
|
677
|
+
* Figma reference: 3732-2079 (Text aliases / use cases)
|
|
678
|
+
*/
|
|
679
|
+
declare const Typography: React$1.ForwardRefExoticComponent<TypographyProps & React$1.RefAttributes<HTMLElement>>;
|
|
408
680
|
|
|
409
681
|
type Theme = "light" | "dark";
|
|
410
682
|
interface ThemeContextType {
|
|
411
683
|
theme: Theme;
|
|
412
684
|
setTheme: (theme: Theme) => void;
|
|
413
685
|
}
|
|
414
|
-
declare const ThemeProvider: React.FC<{
|
|
415
|
-
children: React.ReactNode;
|
|
686
|
+
declare const ThemeProvider: React$1.FC<{
|
|
687
|
+
children: React$1.ReactNode;
|
|
416
688
|
defaultTheme?: Theme;
|
|
417
689
|
}>;
|
|
418
|
-
declare const NurixThemeProvider: React.FC<{
|
|
419
|
-
children: React.ReactNode;
|
|
690
|
+
declare const NurixThemeProvider: React$1.FC<{
|
|
691
|
+
children: React$1.ReactNode;
|
|
420
692
|
defaultTheme?: Theme;
|
|
421
693
|
}>;
|
|
422
694
|
declare const useTheme: () => ThemeContextType;
|
|
423
695
|
|
|
424
696
|
interface LegoLandWrapperProps {
|
|
425
|
-
children: React.ReactNode;
|
|
697
|
+
children: React$1.ReactNode;
|
|
426
698
|
theme: "light" | "dark";
|
|
427
699
|
className?: string;
|
|
428
|
-
style?: React.CSSProperties;
|
|
700
|
+
style?: React$1.CSSProperties;
|
|
429
701
|
}
|
|
430
|
-
declare const LegoLandWrapper: React.FC<LegoLandWrapperProps>;
|
|
702
|
+
declare const LegoLandWrapper: React$1.FC<LegoLandWrapperProps>;
|
|
431
703
|
|
|
432
704
|
/**
|
|
433
705
|
* Hardcoded theme JSON (as requested).
|
|
@@ -783,7 +1055,7 @@ declare const DEFAULT_THEME: {
|
|
|
783
1055
|
readonly background: "#f5f5f5";
|
|
784
1056
|
readonly foreground: "#0a0a0a";
|
|
785
1057
|
readonly border: "#e5e5e5";
|
|
786
|
-
readonly destructive: "#
|
|
1058
|
+
readonly destructive: "#ef4444";
|
|
787
1059
|
readonly secondary: "#e5e5e5";
|
|
788
1060
|
readonly mutedForeground: "#737373";
|
|
789
1061
|
readonly muted: "#f5f5f5";
|
|
@@ -817,7 +1089,9 @@ declare const DEFAULT_THEME: {
|
|
|
817
1089
|
readonly semanticForeground: "#ffffff";
|
|
818
1090
|
readonly disabled: "#d4d4d4";
|
|
819
1091
|
readonly primary10: "#1d488519";
|
|
820
|
-
readonly success: "#
|
|
1092
|
+
readonly success: "#10b981";
|
|
1093
|
+
readonly warning: "#fef3c7";
|
|
1094
|
+
readonly warningForeground: "#78350f";
|
|
821
1095
|
readonly switchTrack: "#e5e5e5";
|
|
822
1096
|
};
|
|
823
1097
|
readonly darkMode: {
|
|
@@ -839,7 +1113,7 @@ declare const DEFAULT_THEME: {
|
|
|
839
1113
|
readonly chart4: "#0d74ce";
|
|
840
1114
|
readonly chart1: "#5eb1ef";
|
|
841
1115
|
readonly chart5: "#113264";
|
|
842
|
-
readonly card: "#
|
|
1116
|
+
readonly card: "#262626";
|
|
843
1117
|
readonly cardForeground: "#fafafa";
|
|
844
1118
|
readonly popover: "#262626";
|
|
845
1119
|
readonly popoverForeground: "#fafafa";
|
|
@@ -859,6 +1133,8 @@ declare const DEFAULT_THEME: {
|
|
|
859
1133
|
readonly disabled: "#404040";
|
|
860
1134
|
readonly primary10: "#e6f1ff1a";
|
|
861
1135
|
readonly success: "#a7f3d0";
|
|
1136
|
+
readonly warning: "#fde68a";
|
|
1137
|
+
readonly warningForeground: "#78350f";
|
|
862
1138
|
readonly switchTrack: "#ffffff";
|
|
863
1139
|
};
|
|
864
1140
|
};
|
|
@@ -878,8 +1154,222 @@ declare const DEFAULT_THEME: {
|
|
|
878
1154
|
};
|
|
879
1155
|
};
|
|
880
1156
|
|
|
1157
|
+
type DialogSize = "sm" | "default" | "wide";
|
|
1158
|
+
/**
|
|
1159
|
+
* Controls the dialog layout preset:
|
|
1160
|
+
* - `"default"` — header with × close, plain body, footer
|
|
1161
|
+
* - `"icon"` — large icon circle at top, no × close, body, footer
|
|
1162
|
+
* - `"scrollable"` — header with × close, scrollable body, footer
|
|
1163
|
+
* - `"scrollable-fixed"` — same as scrollable but header and footer have dividers (sticky feel)
|
|
1164
|
+
*/
|
|
1165
|
+
type DialogType = "default" | "icon" | "scrollable" | "scrollable-fixed";
|
|
1166
|
+
interface DialogProps {
|
|
1167
|
+
open: boolean;
|
|
1168
|
+
onOpenChange: (open: boolean) => void;
|
|
1169
|
+
/** @default "default" */
|
|
1170
|
+
type?: DialogType;
|
|
1171
|
+
/** @default "default" */
|
|
1172
|
+
size?: DialogSize;
|
|
1173
|
+
title?: string;
|
|
1174
|
+
/** Icon element for the blue circle (only used when `type="icon"`). */
|
|
1175
|
+
icon?: React$1.ReactNode;
|
|
1176
|
+
children?: React$1.ReactNode;
|
|
1177
|
+
/** @default "Cancel" */
|
|
1178
|
+
cancelLabel?: string;
|
|
1179
|
+
/** @default "Continue" */
|
|
1180
|
+
confirmLabel?: string;
|
|
1181
|
+
/**
|
|
1182
|
+
* Show the Cancel button in the footer.
|
|
1183
|
+
* @default true
|
|
1184
|
+
*/
|
|
1185
|
+
showCancel?: boolean;
|
|
1186
|
+
onCancel?: () => void;
|
|
1187
|
+
onConfirm?: () => void;
|
|
1188
|
+
className?: string;
|
|
1189
|
+
}
|
|
1190
|
+
interface DialogIconProps {
|
|
1191
|
+
children: React$1.ReactNode;
|
|
1192
|
+
className?: string;
|
|
1193
|
+
}
|
|
1194
|
+
interface DialogHeaderProps {
|
|
1195
|
+
title: string;
|
|
1196
|
+
showClose?: boolean;
|
|
1197
|
+
showDivider?: boolean;
|
|
1198
|
+
className?: string;
|
|
1199
|
+
}
|
|
1200
|
+
interface DialogBodyProps {
|
|
1201
|
+
children?: React$1.ReactNode;
|
|
1202
|
+
scrollable?: boolean;
|
|
1203
|
+
className?: string;
|
|
1204
|
+
}
|
|
1205
|
+
interface DialogFooterProps {
|
|
1206
|
+
cancelLabel?: string;
|
|
1207
|
+
confirmLabel?: string;
|
|
1208
|
+
/**
|
|
1209
|
+
* Show the Cancel button.
|
|
1210
|
+
* @default true
|
|
1211
|
+
*/
|
|
1212
|
+
showCancel?: boolean;
|
|
1213
|
+
onCancel?: () => void;
|
|
1214
|
+
onConfirm?: () => void;
|
|
1215
|
+
showDivider?: boolean;
|
|
1216
|
+
className?: string;
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
/**
|
|
1220
|
+
* Modal dialog. Rendered inline (no portal) so CSS variables from the
|
|
1221
|
+
* `.lego-land` ancestor always apply. Uses `fixed inset-0` so it still covers
|
|
1222
|
+
* the full viewport regardless of its position in the tree.
|
|
1223
|
+
*
|
|
1224
|
+
* Use the `type` prop to select a layout preset:
|
|
1225
|
+
* - `"default"` — header + × close + plain body + footer
|
|
1226
|
+
* - `"icon"` — icon circle at top + header (no ×) + body + footer
|
|
1227
|
+
* - `"scrollable"` — header + × close + scrollable body + footer
|
|
1228
|
+
* - `"scrollable-fixed"` — scrollable + dividers between header/body/footer
|
|
1229
|
+
*
|
|
1230
|
+
* Figma reference: 3316:3400 (Dialogs & Toasts)
|
|
1231
|
+
*/
|
|
1232
|
+
declare const Dialog: React$1.ForwardRefExoticComponent<DialogProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1233
|
+
/**
|
|
1234
|
+
* Blue tinted icon circle for the top of a dialog.
|
|
1235
|
+
* Figma reference: 3364:1516
|
|
1236
|
+
*/
|
|
1237
|
+
declare const DialogIcon: React$1.ForwardRefExoticComponent<DialogIconProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1238
|
+
/**
|
|
1239
|
+
* Header row with title and optional × close button / bottom divider.
|
|
1240
|
+
* Figma reference: 3364:1437
|
|
1241
|
+
*/
|
|
1242
|
+
declare const DialogHeader: React$1.ForwardRefExoticComponent<DialogHeaderProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1243
|
+
/**
|
|
1244
|
+
* Content area. Pass `scrollable` to constrain height and enable vertical scroll.
|
|
1245
|
+
* Figma reference: 3364:1541
|
|
1246
|
+
*/
|
|
1247
|
+
declare const DialogBody: React$1.ForwardRefExoticComponent<DialogBodyProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1248
|
+
/**
|
|
1249
|
+
* Footer with Cancel + Confirm buttons and an optional top divider.
|
|
1250
|
+
* Figma reference: 3364:1397
|
|
1251
|
+
*/
|
|
1252
|
+
declare const DialogFooter: React$1.ForwardRefExoticComponent<DialogFooterProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1253
|
+
|
|
1254
|
+
type ToastVariant = "success" | "error" | "default";
|
|
1255
|
+
interface ToastProps {
|
|
1256
|
+
/**
|
|
1257
|
+
* Determines the leading icon and title colour.
|
|
1258
|
+
* @default "default"
|
|
1259
|
+
*/
|
|
1260
|
+
variant?: ToastVariant;
|
|
1261
|
+
/** Primary message text. */
|
|
1262
|
+
title: string;
|
|
1263
|
+
/** Optional secondary line shown below the title. */
|
|
1264
|
+
subtext?: string;
|
|
1265
|
+
/**
|
|
1266
|
+
* Show the icon-only Cancel action button on the right.
|
|
1267
|
+
* When used with `showToast()`, automatically dismisses the toast.
|
|
1268
|
+
* @default false
|
|
1269
|
+
*/
|
|
1270
|
+
showCancel?: boolean;
|
|
1271
|
+
/** Called when the Cancel button is clicked. */
|
|
1272
|
+
onCancel?: () => void;
|
|
1273
|
+
/**
|
|
1274
|
+
* Show the thin progress bar pinned to the bottom of the toast.
|
|
1275
|
+
* @default false
|
|
1276
|
+
*/
|
|
1277
|
+
showProgress?: boolean;
|
|
1278
|
+
/**
|
|
1279
|
+
* Progress percentage 0–100. Only used when `showProgress` is true.
|
|
1280
|
+
* @default 0
|
|
1281
|
+
*/
|
|
1282
|
+
progress?: number;
|
|
1283
|
+
className?: string;
|
|
1284
|
+
style?: React$1.CSSProperties;
|
|
1285
|
+
}
|
|
1286
|
+
/** Options passed to `showToast()`. */
|
|
1287
|
+
interface ShowToastOptions extends Omit<ToastProps, "onCancel"> {
|
|
1288
|
+
/** Duration in ms before auto-dismiss. Defaults to Sonner's default (4000ms). */
|
|
1289
|
+
duration?: number;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
/**
|
|
1293
|
+
* Place `<Toaster />` once near the root of your app (inside `LegoLandWrapper`).
|
|
1294
|
+
* It is a thin wrapper around Sonner's Toaster with sensible defaults for this
|
|
1295
|
+
* design system.
|
|
1296
|
+
*
|
|
1297
|
+
* @example
|
|
1298
|
+
* // In your app root:
|
|
1299
|
+
* <LegoLandWrapper>
|
|
1300
|
+
* <Toaster />
|
|
1301
|
+
* <App />
|
|
1302
|
+
* </LegoLandWrapper>
|
|
1303
|
+
*/
|
|
1304
|
+
declare const Toaster: {
|
|
1305
|
+
({ position, ...props }: React$1.ComponentProps<typeof Toaster$1>): react_jsx_runtime.JSX.Element;
|
|
1306
|
+
displayName: string;
|
|
1307
|
+
};
|
|
1308
|
+
/**
|
|
1309
|
+
* Visual Toast component. Can be used standalone or via `showToast()` for
|
|
1310
|
+
* Sonner-powered positioning and auto-dismiss.
|
|
1311
|
+
*
|
|
1312
|
+
* Figma reference: 3364:1614 (success), 3728:2422 (default), 3728:2438 (error)
|
|
1313
|
+
*/
|
|
1314
|
+
declare const Toast: React$1.ForwardRefExoticComponent<ToastProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1315
|
+
/**
|
|
1316
|
+
* Trigger a toast notification. Requires `<Toaster />` to be mounted in the app.
|
|
1317
|
+
*
|
|
1318
|
+
* @example
|
|
1319
|
+
* showToast({ variant: "success", title: "Saved!", subtext: "All changes saved." });
|
|
1320
|
+
* showToast({ variant: "error", title: "Something went wrong", showCancel: true });
|
|
1321
|
+
* showToast({ variant: "default", title: "Thanks for the feedback!", showProgress: true, progress: 40 });
|
|
1322
|
+
*/
|
|
1323
|
+
declare const showToast: ({ duration, ...props }: ShowToastOptions) => string | number;
|
|
1324
|
+
|
|
1325
|
+
type StepState = "incomplete" | "active" | "complete";
|
|
1326
|
+
interface StepItem {
|
|
1327
|
+
/**
|
|
1328
|
+
* The label text shown next to the step indicator.
|
|
1329
|
+
*/
|
|
1330
|
+
label: string;
|
|
1331
|
+
/**
|
|
1332
|
+
* The state of this step.
|
|
1333
|
+
* @default "incomplete"
|
|
1334
|
+
*/
|
|
1335
|
+
state?: StepState;
|
|
1336
|
+
}
|
|
1337
|
+
interface StepperProps {
|
|
1338
|
+
/**
|
|
1339
|
+
* Array of step items to display.
|
|
1340
|
+
*/
|
|
1341
|
+
steps: StepItem[];
|
|
1342
|
+
className?: string;
|
|
1343
|
+
style?: React$1.CSSProperties;
|
|
1344
|
+
}
|
|
1345
|
+
interface StepperBarProps {
|
|
1346
|
+
/**
|
|
1347
|
+
* Total number of steps (segments).
|
|
1348
|
+
* @default 4
|
|
1349
|
+
*/
|
|
1350
|
+
totalSteps?: number;
|
|
1351
|
+
/**
|
|
1352
|
+
* Current active step (1-indexed). Segments up to this index are filled.
|
|
1353
|
+
*/
|
|
1354
|
+
currentStep: number;
|
|
1355
|
+
className?: string;
|
|
1356
|
+
style?: React$1.CSSProperties;
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
/**
|
|
1360
|
+
* StepperBar — Segmented progress bar indicating how many steps are complete.
|
|
1361
|
+
* Based on Figma design node: 3706:2092
|
|
1362
|
+
*/
|
|
1363
|
+
declare const StepperBar: React$1.ForwardRefExoticComponent<StepperBarProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1364
|
+
/**
|
|
1365
|
+
* Stepper — Horizontal stepper with labeled steps and state indicators.
|
|
1366
|
+
* Each step can be "incomplete", "active", or "complete".
|
|
1367
|
+
* Based on Figma design node: 3729:2600
|
|
1368
|
+
*/
|
|
1369
|
+
declare const Stepper: React$1.ForwardRefExoticComponent<StepperProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1370
|
+
|
|
881
1371
|
interface ShadowDOMWrapperProps {
|
|
882
|
-
children: React.ReactNode;
|
|
1372
|
+
children: React$1.ReactNode;
|
|
883
1373
|
/**
|
|
884
1374
|
* CSS styles to inject into the shadow root.
|
|
885
1375
|
* If not provided, styles will be extracted from the document's stylesheets.
|
|
@@ -906,6 +1396,6 @@ interface ShadowDOMWrapperProps {
|
|
|
906
1396
|
* ShadowDOMWrapper component that wraps children in a Shadow DOM.
|
|
907
1397
|
* This isolates component styles and DOM structure from the parent document.
|
|
908
1398
|
*/
|
|
909
|
-
declare const ShadowDOMWrapper: React.FC<ShadowDOMWrapperProps>;
|
|
1399
|
+
declare const ShadowDOMWrapper: React$1.FC<ShadowDOMWrapperProps>;
|
|
910
1400
|
|
|
911
|
-
export { Accordion, AccordionContent, AccordionContentPlaceholder, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type AccordionType, type AccordionValue, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarShape, type AvatarSize, type BackButtonPosition, Badge, type BadgeProps, type BadgeVariant, Button, type ButtonBorderRadius, type ButtonProps, type ButtonSize, type ButtonVariant, Checkbox, type CheckboxProps, DEFAULT_THEME, DialogHeaderNavigation, type DialogHeaderNavigationProps, type DialogHeaderNavigationVariant, FileInput, type FileInputProps, Input, type InputBorderRadius, type InputForceState, InputGroup, type InputGroupBorderRadius, type InputGroupForceState, type InputGroupProps, type InputProps, LegoLandWrapper, type LegoLandWrapperProps, NumberBadge, type NumberBadgeProps, type NumberBadgeVariant, NurixThemeProvider, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, ShadowDOMWrapper, type SupportingTextType, Switch, type SwitchProps, type SwitchSize, type TabVariant, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, ThemeProvider, useTheme };
|
|
1401
|
+
export { Accordion, AccordionContent, AccordionContentPlaceholder, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type AccordionType, type AccordionValue, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarShape, type AvatarSize, type BackButtonPosition, Badge, type BadgeProps, type BadgeVariant, Button, type ButtonBorderRadius, type ButtonProps, type ButtonSize, type ButtonVariant, Checkbox, type CheckboxProps, DEFAULT_THEME, 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 EmptyStateProps, FileInput, type FileInputProps, Input, type InputBorderRadius, type InputForceState, InputGroup, type InputGroupBorderRadius, type InputGroupForceState, type InputGroupProps, type InputProps, LegoLandWrapper, type LegoLandWrapperProps, List, type ListBorderRadius, type ListProps, type ListType, type ListVariant, NumberBadge, type NumberBadgeProps, type NumberBadgeVariant, NurixThemeProvider, PlaySelect, type PlaySelectAudioItem, type PlaySelectProps, PlaybackControl, type PlaybackControlProps, type PlaybackState, 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 StepItem, type StepState, Stepper, StepperBar, type StepperBarProps, type StepperProps, type SupportingTextType, Switch, type SwitchProps, type SwitchSize, type TabVariant, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, ThemeProvider, Toast, type ToastProps, type ToastVariant, Toaster, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, Typography, type TypographyProps, type TypographyTone, type TypographyVariant, type UsePlaySelectProps, type UseSelectProps, showToast, usePlaySelect, useSelect, useTheme };
|