@nurix/ui-component-library 1.1.3-stage.107 → 1.1.3-stage.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +536 -75
- package/dist/index.d.ts +536 -75
- package/dist/index.js +2898 -1550
- package/dist/index.mjs +2830 -1489
- package/dist/styles.css +829 -308
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -9,9 +9,9 @@ import { LucideIcon } from 'lucide-react';
|
|
|
9
9
|
import { Schema } from 'ajv';
|
|
10
10
|
import { OnMount } from '@monaco-editor/react';
|
|
11
11
|
|
|
12
|
-
type ButtonBorderRadius = "none" | "soft" | "rounded";
|
|
13
|
-
type ButtonVariant = "primary" | "secondary" | "destructive" | "outline" | "link" | "iconPrimary" | "iconSecondary" | "iconOutline";
|
|
14
|
-
type ButtonSize = "default" | "sm" | "
|
|
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
15
|
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
16
16
|
variant?: ButtonVariant;
|
|
17
17
|
size?: ButtonSize;
|
|
@@ -33,10 +33,20 @@ interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
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>>;
|
|
36
46
|
|
|
37
47
|
type InputBorderRadius = "none" | "soft" | "rounded" | "pill";
|
|
38
48
|
type InputVariant = "grey" | "white";
|
|
39
|
-
type SupportingTextType = "help" | "error";
|
|
49
|
+
type SupportingTextType = "help" | "error" | "success";
|
|
40
50
|
type InputForceState = "active" | "focussed" | "disabled";
|
|
41
51
|
interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
42
52
|
/**
|
|
@@ -47,6 +57,19 @@ interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>,
|
|
|
47
57
|
* Whether to show a red "*" required indicator next to the label.
|
|
48
58
|
*/
|
|
49
59
|
mandatory?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Icon or element rendered in the leading slot (left side, 16px).
|
|
62
|
+
*/
|
|
63
|
+
leadingIcon?: React$1.ReactNode;
|
|
64
|
+
/**
|
|
65
|
+
* Icon or element rendered in the trailing slot (right side, 16px).
|
|
66
|
+
*/
|
|
67
|
+
trailingIcon?: React$1.ReactNode;
|
|
68
|
+
/**
|
|
69
|
+
* Suffix text rendered at the trailing end (e.g. ".com", "kg").
|
|
70
|
+
* Ignored when `trailingIcon` is provided.
|
|
71
|
+
*/
|
|
72
|
+
suffix?: string;
|
|
50
73
|
/**
|
|
51
74
|
* Supporting/help/error text shown below the field.
|
|
52
75
|
*/
|
|
@@ -271,7 +294,25 @@ interface DialogHeaderNavigationProps extends React$1.HTMLAttributes<HTMLDivElem
|
|
|
271
294
|
backButtonPosition?: BackButtonPosition;
|
|
272
295
|
disabled?: boolean;
|
|
273
296
|
}
|
|
274
|
-
type TabVariant = "top" | "side";
|
|
297
|
+
type TabVariant = "top" | "side" | "section";
|
|
298
|
+
interface ListNavItemProps {
|
|
299
|
+
/** Unique identifier */
|
|
300
|
+
id: string;
|
|
301
|
+
/** Primary text */
|
|
302
|
+
title: string;
|
|
303
|
+
/** Secondary text */
|
|
304
|
+
subtitle?: string;
|
|
305
|
+
/** Trailing content (badges, icons, etc.) */
|
|
306
|
+
trailing?: React$1.ReactNode;
|
|
307
|
+
}
|
|
308
|
+
interface ListNavigationProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, 'onSelect'> {
|
|
309
|
+
/** List of items */
|
|
310
|
+
items: ListNavItemProps[];
|
|
311
|
+
/** Currently selected item id */
|
|
312
|
+
selectedId?: string | null;
|
|
313
|
+
/** Callback when an item is clicked */
|
|
314
|
+
onSelect?: (id: string) => void;
|
|
315
|
+
}
|
|
275
316
|
interface TabsProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
276
317
|
value?: string;
|
|
277
318
|
defaultValue?: string;
|
|
@@ -297,6 +338,11 @@ declare function Tabs({ className, value, defaultValue, onValueChange, variant,
|
|
|
297
338
|
declare const TabsList: React$1.ForwardRefExoticComponent<TabsListProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
298
339
|
declare const TabsTrigger: React$1.ForwardRefExoticComponent<TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
299
340
|
declare function TabsContent({ value, forceMount, className, children, ...props }: TabsContentProps): react_jsx_runtime.JSX.Element | null;
|
|
341
|
+
/**
|
|
342
|
+
* ListNavigation — A vertical list of selectable items (e.g. call history).
|
|
343
|
+
* Based on Figma design node: 5503:34142
|
|
344
|
+
*/
|
|
345
|
+
declare const ListNavigation: React$1.ForwardRefExoticComponent<ListNavigationProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
300
346
|
|
|
301
347
|
type AccordionType = "single" | "multiple";
|
|
302
348
|
type AccordionValue<TType extends AccordionType> = TType extends "multiple" ? string[] : string | null;
|
|
@@ -339,7 +385,7 @@ declare function AccordionContentPlaceholder({ className, children, }: {
|
|
|
339
385
|
children?: React$1.ReactNode;
|
|
340
386
|
}): react_jsx_runtime.JSX.Element;
|
|
341
387
|
|
|
342
|
-
type AvatarSize = "sm" | "default" | "lg";
|
|
388
|
+
type AvatarSize = "xxs" | "xs" | "sm" | "default" | "lg";
|
|
343
389
|
type AvatarShape = "circle" | "square";
|
|
344
390
|
interface AvatarProps {
|
|
345
391
|
/**
|
|
@@ -402,6 +448,19 @@ declare const Avatar: React$1.ForwardRefExoticComponent<AvatarProps & React$1.Re
|
|
|
402
448
|
declare const AvatarGroup: React$1.ForwardRefExoticComponent<AvatarGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
403
449
|
|
|
404
450
|
type BadgeVariant = "default" | "secondary" | "destructive" | "outline" | "success" | "warning";
|
|
451
|
+
/**
|
|
452
|
+
* A tag option for the TagBadge dropdown menu.
|
|
453
|
+
*/
|
|
454
|
+
interface TagOption {
|
|
455
|
+
value: string;
|
|
456
|
+
label: string;
|
|
457
|
+
/** Badge variant to use when this tag is selected */
|
|
458
|
+
variant?: BadgeVariant;
|
|
459
|
+
/** Custom background color (overrides variant) */
|
|
460
|
+
background?: string;
|
|
461
|
+
/** Custom text color (overrides variant) */
|
|
462
|
+
color?: string;
|
|
463
|
+
}
|
|
405
464
|
interface BadgeProps {
|
|
406
465
|
/**
|
|
407
466
|
* The badge variant style.
|
|
@@ -434,6 +493,30 @@ interface BadgeProps {
|
|
|
434
493
|
* Badge content (alternative to label prop).
|
|
435
494
|
*/
|
|
436
495
|
children?: React$1.ReactNode;
|
|
496
|
+
/**
|
|
497
|
+
* Click handler. When provided, badge renders as a button.
|
|
498
|
+
*/
|
|
499
|
+
onClick?: (e: React$1.MouseEvent) => void;
|
|
500
|
+
className?: string;
|
|
501
|
+
style?: React$1.CSSProperties;
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Props for TagBadge - an interactive badge that opens a dropdown to select a tag.
|
|
505
|
+
* Mirrors the TagsDropdown pattern from the zero repo.
|
|
506
|
+
*/
|
|
507
|
+
interface TagBadgeProps {
|
|
508
|
+
/** Currently selected tag value */
|
|
509
|
+
value: string | null;
|
|
510
|
+
/** Callback when a tag is selected */
|
|
511
|
+
onValueChange?: (value: string) => void;
|
|
512
|
+
/** Available tag options */
|
|
513
|
+
options: TagOption[];
|
|
514
|
+
/** When true, renders as a non-interactive badge (no dropdown) */
|
|
515
|
+
viewOnly?: boolean;
|
|
516
|
+
/** Placeholder text when no tag is selected */
|
|
517
|
+
placeholder?: string;
|
|
518
|
+
/** Default variant when no tag is selected */
|
|
519
|
+
defaultVariant?: BadgeVariant;
|
|
437
520
|
className?: string;
|
|
438
521
|
style?: React$1.CSSProperties;
|
|
439
522
|
}
|
|
@@ -472,6 +555,13 @@ declare const Badge: React$1.ForwardRefExoticComponent<BadgeProps & React$1.RefA
|
|
|
472
555
|
* Based on Figma design node: 3333:1629
|
|
473
556
|
*/
|
|
474
557
|
declare const NumberBadge: React$1.ForwardRefExoticComponent<NumberBadgeProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
558
|
+
/**
|
|
559
|
+
* TagBadge - An interactive badge that opens a dropdown to pick a tag.
|
|
560
|
+
* Mirrors the TagsDropdown behavior from the zero repo:
|
|
561
|
+
* - viewOnly=true: renders as a static badge
|
|
562
|
+
* - viewOnly=false (default): renders as a clickable badge with chevron that opens a tag menu
|
|
563
|
+
*/
|
|
564
|
+
declare const TagBadge: React$1.ForwardRefExoticComponent<TagBadgeProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
475
565
|
|
|
476
566
|
type SelectType = "Single Line Regular" | "Single Line Large" | "Double Line";
|
|
477
567
|
type SelectState = "Default" | "Open";
|
|
@@ -729,16 +819,35 @@ type TooltipContentProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitiv
|
|
|
729
819
|
shortcut?: string;
|
|
730
820
|
};
|
|
731
821
|
|
|
732
|
-
|
|
822
|
+
/**
|
|
823
|
+
* Semantic text-style variants (mapped 1:1 from Figma text styles).
|
|
824
|
+
* Each has a predefined font-size, line-height, and font-weight.
|
|
825
|
+
*/
|
|
826
|
+
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";
|
|
827
|
+
/** Utility text sizes (text-xs through text-6xl). Use with `weight` prop. */
|
|
828
|
+
type TypographySize = "xs" | "sm" | "base" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl";
|
|
829
|
+
/** Font weight options (maps to Figma weight tokens). */
|
|
830
|
+
type TypographyWeight = "thin" | "extra-light" | "light" | "regular" | "medium" | "semi-bold" | "bold" | "extra-bold" | "black";
|
|
733
831
|
type TypographyTone = "default" | "muted" | "inherit";
|
|
734
|
-
/** Font family. sans = Nunito (Figma design system). inherit = use parent. */
|
|
735
|
-
type TypographyFontFamily = "sans" | "inherit";
|
|
736
832
|
interface TypographyProps extends React$1.HTMLAttributes<HTMLElement> {
|
|
737
833
|
/**
|
|
738
|
-
*
|
|
834
|
+
* Semantic typography variant (maps to Figma text styles).
|
|
835
|
+
* Provides predefined size + weight combos.
|
|
836
|
+
* Cannot be used together with `size`.
|
|
739
837
|
* @default "p2"
|
|
740
838
|
*/
|
|
741
839
|
variant?: TypographyVariant;
|
|
840
|
+
/**
|
|
841
|
+
* Utility text size. Use together with `weight` for fine-grained control.
|
|
842
|
+
* Cannot be used together with `variant`.
|
|
843
|
+
*/
|
|
844
|
+
size?: TypographySize;
|
|
845
|
+
/**
|
|
846
|
+
* Font weight. Used with `size` for utility text styles.
|
|
847
|
+
* When used with `variant`, overrides the variant's default weight.
|
|
848
|
+
* @default "regular" (when using `size`)
|
|
849
|
+
*/
|
|
850
|
+
weight?: TypographyWeight;
|
|
742
851
|
/**
|
|
743
852
|
* Text color tone.
|
|
744
853
|
* @default "default"
|
|
@@ -754,17 +863,15 @@ interface TypographyProps extends React$1.HTMLAttributes<HTMLElement> {
|
|
|
754
863
|
* Ignored when `asChild` is true.
|
|
755
864
|
*/
|
|
756
865
|
as?: React$1.ElementType;
|
|
757
|
-
/**
|
|
758
|
-
* Font family. "sans" uses Nunito (Figma/Nurix design system).
|
|
759
|
-
* "inherit" uses the parent's font.
|
|
760
|
-
* @default "sans"
|
|
761
|
-
*/
|
|
762
|
-
fontFamily?: TypographyFontFamily;
|
|
763
866
|
}
|
|
764
867
|
|
|
765
868
|
/**
|
|
766
869
|
* Typography component
|
|
767
870
|
* Figma reference: 3732-2079 (Text aliases / use cases)
|
|
871
|
+
*
|
|
872
|
+
* Two usage modes:
|
|
873
|
+
* 1. Semantic: `<Typography variant="h1">` — uses predefined size+weight from Figma
|
|
874
|
+
* 2. Utility: `<Typography size="lg" weight="bold">` — fine-grained size × weight control
|
|
768
875
|
*/
|
|
769
876
|
declare const Typography: React$1.ForwardRefExoticComponent<TypographyProps & React$1.RefAttributes<HTMLElement>>;
|
|
770
877
|
|
|
@@ -1188,6 +1295,55 @@ declare const DEFAULT_THEME: {
|
|
|
1188
1295
|
readonly filterInput: "#fff";
|
|
1189
1296
|
readonly primarySelected: "#fff";
|
|
1190
1297
|
readonly hoverSolid: "#efefef";
|
|
1298
|
+
readonly bgWhite: "#ffffff";
|
|
1299
|
+
readonly bgLightGrey: "#fafafa";
|
|
1300
|
+
readonly bgGrey: "#f5f5f5";
|
|
1301
|
+
readonly bgDarkGrey: "#e5e5e5";
|
|
1302
|
+
readonly bgDark: "#0a0a0a";
|
|
1303
|
+
readonly bgBrandPrimary: "#1d4885";
|
|
1304
|
+
readonly bgBrandSecondary: "#eff8ff";
|
|
1305
|
+
readonly bgDestructivePrimary: "#b91c1c";
|
|
1306
|
+
readonly bgDestructiveSecondary: "#fef2f2";
|
|
1307
|
+
readonly bgWarningPrimary: "#92400e";
|
|
1308
|
+
readonly bgWarningSecondary: "#fef3c7";
|
|
1309
|
+
readonly bgSuccessPrimary: "#047857";
|
|
1310
|
+
readonly bgSuccessSecondary: "#ecfdf5";
|
|
1311
|
+
readonly bgBluePrimary: "#0369a1";
|
|
1312
|
+
readonly bgBlueSecondary: "#f0f9ff";
|
|
1313
|
+
readonly borderXlight: "#f5f5f5";
|
|
1314
|
+
readonly borderLight: "#e5e5e5";
|
|
1315
|
+
readonly borderBrand: "#1d4885";
|
|
1316
|
+
readonly borderDestructive: "#b91c1c";
|
|
1317
|
+
readonly borderInput: "#e5e5e5";
|
|
1318
|
+
readonly hovSolidPrimary: "#fafafa";
|
|
1319
|
+
readonly hovSolidSecondary: "#f5f5f5";
|
|
1320
|
+
readonly pressedSolid: "#e5e5e5";
|
|
1321
|
+
readonly inFocusSolid: "#f5f5f5";
|
|
1322
|
+
readonly interactionSelected: "#eff8ff";
|
|
1323
|
+
readonly iconWhite: "#fafafa";
|
|
1324
|
+
readonly iconBlack: "#0a0a0a";
|
|
1325
|
+
readonly iconDisable: "#a3a3a3";
|
|
1326
|
+
readonly iconPlaceholder: "#a3a3a3";
|
|
1327
|
+
readonly iconGreyPrimary: "#a3a3a3";
|
|
1328
|
+
readonly iconGreySecondary: "#737373";
|
|
1329
|
+
readonly iconGreyTertiary: "#525252";
|
|
1330
|
+
readonly iconDestructive: "#b91c1c";
|
|
1331
|
+
readonly iconLink: "#1d4885";
|
|
1332
|
+
readonly iconSuccess: "#047857";
|
|
1333
|
+
readonly iconWarning: "#92400e";
|
|
1334
|
+
readonly iconBlue: "#0369a1";
|
|
1335
|
+
readonly textWhite: "#fafafa";
|
|
1336
|
+
readonly textBlack: "#0a0a0a";
|
|
1337
|
+
readonly textDisable: "#a3a3a3";
|
|
1338
|
+
readonly textPlaceholder: "#a3a3a3";
|
|
1339
|
+
readonly textGreyPrimary: "#a3a3a3";
|
|
1340
|
+
readonly textGreySecondary: "#737373";
|
|
1341
|
+
readonly textGreyTertiary: "#525252";
|
|
1342
|
+
readonly textDestructive: "#b91c1c";
|
|
1343
|
+
readonly textBrand: "#1d4885";
|
|
1344
|
+
readonly textSuccess: "#047857";
|
|
1345
|
+
readonly textWarning: "#92400e";
|
|
1346
|
+
readonly textBlue: "#0369a1";
|
|
1191
1347
|
readonly badgeDefaultBg: "#f0f9ff";
|
|
1192
1348
|
readonly badgeDefaultFg: "#0369a1";
|
|
1193
1349
|
readonly badgeSuccessBg: "#ecfdf5";
|
|
@@ -1242,6 +1398,55 @@ declare const DEFAULT_THEME: {
|
|
|
1242
1398
|
readonly warning: "#fde68a";
|
|
1243
1399
|
readonly warningForeground: "#78350f";
|
|
1244
1400
|
readonly filterInput: "#171717";
|
|
1401
|
+
readonly bgWhite: "#0a0a0a";
|
|
1402
|
+
readonly bgLightGrey: "#171717";
|
|
1403
|
+
readonly bgGrey: "#262626";
|
|
1404
|
+
readonly bgDarkGrey: "#262626";
|
|
1405
|
+
readonly bgDark: "#ffffff";
|
|
1406
|
+
readonly bgBrandPrimary: "#bfdbfe";
|
|
1407
|
+
readonly bgBrandSecondary: "#262626";
|
|
1408
|
+
readonly bgDestructivePrimary: "#f87171";
|
|
1409
|
+
readonly bgDestructiveSecondary: "#0a0a0a";
|
|
1410
|
+
readonly bgWarningPrimary: "#fbbf24";
|
|
1411
|
+
readonly bgWarningSecondary: "#0a0a0a";
|
|
1412
|
+
readonly bgSuccessPrimary: "#a7f3d0";
|
|
1413
|
+
readonly bgSuccessSecondary: "#0a0a0a";
|
|
1414
|
+
readonly bgBluePrimary: "#7dd3fc";
|
|
1415
|
+
readonly bgBlueSecondary: "#0a0a0a";
|
|
1416
|
+
readonly borderXlight: "#262626";
|
|
1417
|
+
readonly borderLight: "#404040";
|
|
1418
|
+
readonly borderBrand: "#bfdbfe";
|
|
1419
|
+
readonly borderDestructive: "#f87171";
|
|
1420
|
+
readonly borderInput: "#262626";
|
|
1421
|
+
readonly hovSolidPrimary: "#262626";
|
|
1422
|
+
readonly hovSolidSecondary: "#262626";
|
|
1423
|
+
readonly pressedSolid: "#171717";
|
|
1424
|
+
readonly inFocusSolid: "#262626";
|
|
1425
|
+
readonly interactionSelected: "#262626";
|
|
1426
|
+
readonly iconWhite: "#171717";
|
|
1427
|
+
readonly iconBlack: "#d4d4d4";
|
|
1428
|
+
readonly iconDisable: "#525252";
|
|
1429
|
+
readonly iconPlaceholder: "#a3a3a3";
|
|
1430
|
+
readonly iconGreyPrimary: "#737373";
|
|
1431
|
+
readonly iconGreySecondary: "#a3a3a3";
|
|
1432
|
+
readonly iconGreyTertiary: "#d4d4d4";
|
|
1433
|
+
readonly iconDestructive: "#f87171";
|
|
1434
|
+
readonly iconLink: "#bfdbfe";
|
|
1435
|
+
readonly iconSuccess: "#a7f3d0";
|
|
1436
|
+
readonly iconWarning: "#fbbf24";
|
|
1437
|
+
readonly iconBlue: "#7dd3fc";
|
|
1438
|
+
readonly textWhite: "#0a0a0a";
|
|
1439
|
+
readonly textBlack: "#d4d4d4";
|
|
1440
|
+
readonly textDisable: "#525252";
|
|
1441
|
+
readonly textPlaceholder: "#a3a3a3";
|
|
1442
|
+
readonly textGreyPrimary: "#737373";
|
|
1443
|
+
readonly textGreySecondary: "#a3a3a3";
|
|
1444
|
+
readonly textGreyTertiary: "#d4d4d4";
|
|
1445
|
+
readonly textDestructive: "#f87171";
|
|
1446
|
+
readonly textBrand: "#bfdbfe";
|
|
1447
|
+
readonly textSuccess: "#a7f3d0";
|
|
1448
|
+
readonly textWarning: "#fbbf24";
|
|
1449
|
+
readonly textBlue: "#7dd3fc";
|
|
1245
1450
|
readonly badgeDefaultBg: "#0c4a6e";
|
|
1246
1451
|
readonly badgeDefaultFg: "#7dd3fc";
|
|
1247
1452
|
readonly badgeSuccessBg: "#064e3b";
|
|
@@ -1260,11 +1465,11 @@ declare const DEFAULT_THEME: {
|
|
|
1260
1465
|
};
|
|
1261
1466
|
readonly components: {
|
|
1262
1467
|
readonly mode1: {
|
|
1263
|
-
readonly inputRadius:
|
|
1264
|
-
readonly inputHeight:
|
|
1468
|
+
readonly inputRadius: 12;
|
|
1469
|
+
readonly inputHeight: 40;
|
|
1265
1470
|
readonly inputHeightLarge: 56;
|
|
1266
|
-
readonly inputPaddingHorizontal:
|
|
1267
|
-
readonly inputPaddingVertical:
|
|
1471
|
+
readonly inputPaddingHorizontal: 12;
|
|
1472
|
+
readonly inputPaddingVertical: 10;
|
|
1268
1473
|
readonly buttonHeight: 40;
|
|
1269
1474
|
readonly buttonRadius: 24;
|
|
1270
1475
|
readonly inputActiveBg: "#2e3034";
|
|
@@ -1411,11 +1616,8 @@ interface ShowToastOptions extends Omit<ToastProps, "onCancel"> {
|
|
|
1411
1616
|
|
|
1412
1617
|
/**
|
|
1413
1618
|
* Place `<Toaster />` once near the root of your app (inside `LegoLandWrapper`).
|
|
1414
|
-
* It is a thin wrapper around Sonner's Toaster with sensible defaults for this
|
|
1415
|
-
* design system.
|
|
1416
1619
|
*
|
|
1417
1620
|
* @example
|
|
1418
|
-
* // In your app root:
|
|
1419
1621
|
* <LegoLandWrapper>
|
|
1420
1622
|
* <Toaster />
|
|
1421
1623
|
* <App />
|
|
@@ -1475,6 +1677,19 @@ interface StepperBarProps {
|
|
|
1475
1677
|
className?: string;
|
|
1476
1678
|
style?: React$1.CSSProperties;
|
|
1477
1679
|
}
|
|
1680
|
+
interface ProgressBarProps {
|
|
1681
|
+
/**
|
|
1682
|
+
* Progress value from 0 to 100.
|
|
1683
|
+
*/
|
|
1684
|
+
value: number;
|
|
1685
|
+
/**
|
|
1686
|
+
* Maximum value.
|
|
1687
|
+
* @default 100
|
|
1688
|
+
*/
|
|
1689
|
+
max?: number;
|
|
1690
|
+
className?: string;
|
|
1691
|
+
style?: React$1.CSSProperties;
|
|
1692
|
+
}
|
|
1478
1693
|
|
|
1479
1694
|
/**
|
|
1480
1695
|
* StepperBar — Segmented progress bar indicating how many steps are complete.
|
|
@@ -1487,6 +1702,126 @@ declare const StepperBar: React$1.ForwardRefExoticComponent<StepperBarProps & Re
|
|
|
1487
1702
|
* Based on Figma design node: 3729:2600
|
|
1488
1703
|
*/
|
|
1489
1704
|
declare const Stepper: React$1.ForwardRefExoticComponent<StepperProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1705
|
+
/**
|
|
1706
|
+
* ProgressBar — Continuous progress bar with fill percentage.
|
|
1707
|
+
* Based on Figma design node: 3357:4677
|
|
1708
|
+
*/
|
|
1709
|
+
declare const ProgressBar: React$1.ForwardRefExoticComponent<ProgressBarProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1710
|
+
|
|
1711
|
+
/**
|
|
1712
|
+
* Icon component tokens.
|
|
1713
|
+
* Maps semantic color names to the icon CSS variable tokens.
|
|
1714
|
+
* These automatically adapt to light/dark mode.
|
|
1715
|
+
*/
|
|
1716
|
+
declare const ICON_TOKENS: {
|
|
1717
|
+
readonly color: {
|
|
1718
|
+
readonly default: "text-icon-black";
|
|
1719
|
+
readonly white: "text-icon-white";
|
|
1720
|
+
readonly black: "text-icon-black";
|
|
1721
|
+
readonly disable: "text-icon-disable";
|
|
1722
|
+
readonly placeholder: "text-icon-placeholder";
|
|
1723
|
+
readonly "grey-primary": "text-icon-grey-primary";
|
|
1724
|
+
readonly "grey-secondary": "text-icon-grey-secondary";
|
|
1725
|
+
readonly "grey-tertiary": "text-icon-grey-tertiary";
|
|
1726
|
+
readonly destructive: "text-icon-destructive";
|
|
1727
|
+
readonly link: "text-icon-link";
|
|
1728
|
+
readonly success: "text-icon-success";
|
|
1729
|
+
readonly warning: "text-icon-warning";
|
|
1730
|
+
readonly blue: "text-icon-blue";
|
|
1731
|
+
};
|
|
1732
|
+
readonly size: {
|
|
1733
|
+
readonly xs: "size-3";
|
|
1734
|
+
readonly sm: "size-4";
|
|
1735
|
+
readonly md: "size-5";
|
|
1736
|
+
readonly lg: "size-6";
|
|
1737
|
+
readonly xl: "size-8";
|
|
1738
|
+
};
|
|
1739
|
+
readonly picker: {
|
|
1740
|
+
readonly trigger: "inline-flex items-center justify-center border border-border-token-light rounded-xl p-2 cursor-pointer hover:bg-foreground/5 transition-colors";
|
|
1741
|
+
readonly dropdown: "bg-card rounded-xl p-3 shadow-sm border border-border-token-xlight w-[320px] max-h-[400px] flex flex-col gap-2";
|
|
1742
|
+
readonly search: "bg-bg-token-light-grey rounded-xl px-3 py-2 text-xs text-text-black placeholder:text-text-placeholder outline-none border border-border-token-xlight focus:border-border-token-brand w-full";
|
|
1743
|
+
readonly grid: "grid grid-cols-8 gap-1 overflow-y-auto max-h-[280px] p-1";
|
|
1744
|
+
readonly gridItem: "flex items-center justify-center p-2 rounded-xl cursor-pointer hover:bg-interaction-hov-solid-primary transition-colors";
|
|
1745
|
+
readonly gridItemSelected: "bg-bg-token-brand-secondary";
|
|
1746
|
+
readonly emptyText: "text-xs text-text-grey-secondary text-center py-4";
|
|
1747
|
+
};
|
|
1748
|
+
};
|
|
1749
|
+
type IconColor = keyof typeof ICON_TOKENS.color;
|
|
1750
|
+
type IconSize = keyof typeof ICON_TOKENS.size;
|
|
1751
|
+
|
|
1752
|
+
interface IconWrapperProps {
|
|
1753
|
+
/**
|
|
1754
|
+
* Semantic icon color. Automatically adapts to light/dark mode.
|
|
1755
|
+
* @default "default" (icon-black in light, icon-d4d4d4 in dark)
|
|
1756
|
+
*/
|
|
1757
|
+
color?: IconColor;
|
|
1758
|
+
/**
|
|
1759
|
+
* Icon size preset.
|
|
1760
|
+
* @default "sm" (16px)
|
|
1761
|
+
*/
|
|
1762
|
+
size?: IconSize;
|
|
1763
|
+
/**
|
|
1764
|
+
* The icon to render. Can be a Lucide icon element or any ReactNode.
|
|
1765
|
+
*/
|
|
1766
|
+
children: React$1.ReactNode;
|
|
1767
|
+
className?: string;
|
|
1768
|
+
style?: React$1.CSSProperties;
|
|
1769
|
+
}
|
|
1770
|
+
interface IconPickerProps {
|
|
1771
|
+
/**
|
|
1772
|
+
* Currently selected icon name (e.g. "Home", "Search").
|
|
1773
|
+
*/
|
|
1774
|
+
value?: string | null;
|
|
1775
|
+
/**
|
|
1776
|
+
* Callback when an icon is selected.
|
|
1777
|
+
*/
|
|
1778
|
+
onValueChange?: (iconName: string) => void;
|
|
1779
|
+
/**
|
|
1780
|
+
* Subset of Lucide icon names to show. If not provided, shows all common icons.
|
|
1781
|
+
*/
|
|
1782
|
+
icons?: string[];
|
|
1783
|
+
/**
|
|
1784
|
+
* Icon color for the trigger and grid.
|
|
1785
|
+
* @default "default"
|
|
1786
|
+
*/
|
|
1787
|
+
color?: IconColor;
|
|
1788
|
+
/**
|
|
1789
|
+
* Icon size in the trigger.
|
|
1790
|
+
* @default "md"
|
|
1791
|
+
*/
|
|
1792
|
+
size?: IconSize;
|
|
1793
|
+
/**
|
|
1794
|
+
* Placeholder text when no icon is selected.
|
|
1795
|
+
* @default "Pick icon"
|
|
1796
|
+
*/
|
|
1797
|
+
placeholder?: string;
|
|
1798
|
+
className?: string;
|
|
1799
|
+
style?: React$1.CSSProperties;
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
/**
|
|
1803
|
+
* IconWrapper — Wraps any icon (Lucide or custom SVG) with theme-aware colors.
|
|
1804
|
+
*
|
|
1805
|
+
* Automatically adapts icon color to light/dark mode using the icon/* CSS variable tokens.
|
|
1806
|
+
* Solves the problem of icons breaking when switching themes.
|
|
1807
|
+
*
|
|
1808
|
+
* Usage:
|
|
1809
|
+
* ```tsx
|
|
1810
|
+
* <IconWrapper color="destructive" size="lg">
|
|
1811
|
+
* <Trash2 />
|
|
1812
|
+
* </IconWrapper>
|
|
1813
|
+
* ```
|
|
1814
|
+
*/
|
|
1815
|
+
declare const IconWrapper: React$1.ForwardRefExoticComponent<IconWrapperProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
1816
|
+
/**
|
|
1817
|
+
* IconPicker — A dropdown grid of Lucide icons for the user to pick from.
|
|
1818
|
+
*
|
|
1819
|
+
* Usage:
|
|
1820
|
+
* ```tsx
|
|
1821
|
+
* <IconPicker value={icon} onValueChange={setIcon} />
|
|
1822
|
+
* ```
|
|
1823
|
+
*/
|
|
1824
|
+
declare const IconPicker: React$1.ForwardRefExoticComponent<IconPickerProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1490
1825
|
|
|
1491
1826
|
interface ShadowDOMWrapperProps {
|
|
1492
1827
|
children: React$1.ReactNode;
|
|
@@ -1658,6 +1993,11 @@ interface DataTableProps<TRow> {
|
|
|
1658
1993
|
* When true, the header row stays fixed at the top while the table body scrolls.
|
|
1659
1994
|
*/
|
|
1660
1995
|
stickyHeader?: boolean;
|
|
1996
|
+
/**
|
|
1997
|
+
* Optional React node to render in the header's top-right corner.
|
|
1998
|
+
* Useful for header-level actions like column filters or settings.
|
|
1999
|
+
*/
|
|
2000
|
+
headerAction?: React$1.ReactNode;
|
|
1661
2001
|
className?: string;
|
|
1662
2002
|
/**
|
|
1663
2003
|
* When true, shows skeleton loading state with 10 rows.
|
|
@@ -1691,7 +2031,7 @@ declare namespace Pagination {
|
|
|
1691
2031
|
*
|
|
1692
2032
|
* Figma reference node: 3338:6396
|
|
1693
2033
|
*/
|
|
1694
|
-
declare function DataTable<TRow>({ columns, data, pinnedColumns, showCheckbox, actions, getRowId, selectedRows, onSelectionChange, onSortChange, showPagination, currentPage, rowsPerPage, total, onPageChange, onRowsPerPageChange, entityName, showBorder, stickyHeader, className, loading, onRowClick, }: DataTableProps<TRow>): react_jsx_runtime.JSX.Element;
|
|
2034
|
+
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;
|
|
1695
2035
|
declare namespace DataTable {
|
|
1696
2036
|
var displayName: string;
|
|
1697
2037
|
}
|
|
@@ -1702,6 +2042,19 @@ declare namespace DataTable {
|
|
|
1702
2042
|
interface FilterItem<T = string> {
|
|
1703
2043
|
value: T;
|
|
1704
2044
|
label: string;
|
|
2045
|
+
/** Optional icon for this item (per-item icon support - feature 5) */
|
|
2046
|
+
icon?: LucideIcon | React$1.ReactNode;
|
|
2047
|
+
/** Show loading state for this item (per-item loading - feature 6) */
|
|
2048
|
+
loading?: boolean;
|
|
2049
|
+
/** Optional custom display node to render instead of plain label (e.g. ratings with star + color pill) */
|
|
2050
|
+
labelNode?: React$1.ReactNode;
|
|
2051
|
+
}
|
|
2052
|
+
/**
|
|
2053
|
+
* Filter item with section grouping (feature 4)
|
|
2054
|
+
*/
|
|
2055
|
+
interface FilterItemWithSection<T = string> {
|
|
2056
|
+
sectionLabel: string;
|
|
2057
|
+
items: FilterItem<T>[];
|
|
1705
2058
|
}
|
|
1706
2059
|
/**
|
|
1707
2060
|
* Props for FilterSelect component
|
|
@@ -1713,8 +2066,8 @@ interface FilterSelectProps<T = string> extends Omit<React$1.HTMLAttributes<HTML
|
|
|
1713
2066
|
icon?: LucideIcon;
|
|
1714
2067
|
/** Array of selected item values */
|
|
1715
2068
|
selectedItems?: T[];
|
|
1716
|
-
/** Available items for selection */
|
|
1717
|
-
items: FilterItem<T>[];
|
|
2069
|
+
/** Available items for selection (flat or sectioned) - feature 4: section grouping */
|
|
2070
|
+
items: (FilterItem<T> | FilterItemWithSection<T>)[];
|
|
1718
2071
|
/** Enable drag-and-drop reordering (default: false) */
|
|
1719
2072
|
draggable?: boolean;
|
|
1720
2073
|
/** To show clear button regardless of selected items or text / date content (default: true) */
|
|
@@ -1738,25 +2091,41 @@ interface FilterSelectProps<T = string> extends Omit<React$1.HTMLAttributes<HTML
|
|
|
1738
2091
|
/** Show loading spinner in dropdown */
|
|
1739
2092
|
loading?: boolean;
|
|
1740
2093
|
onRemoveAll?: () => void;
|
|
1741
|
-
/** Type of filter select: "list" (default), "text", "text_with_operands", or "date" */
|
|
1742
|
-
type?: "list" | "text" | "text_with_operands" | "date";
|
|
1743
|
-
/** Controlled text value for textarea/input (for "text" and "
|
|
2094
|
+
/** Type of filter select: "list" (default), "text", "text_with_operands", "numeric", "numeric_with_operands", or "date" */
|
|
2095
|
+
type?: "list" | "text" | "text_with_operands" | "numeric" | "numeric_with_operands" | "date";
|
|
2096
|
+
/** Controlled text value for textarea/input (for "text", "text_with_operands", and "numeric" types) */
|
|
1744
2097
|
text?: string;
|
|
1745
|
-
/** Callback when text changes (for "text" and "
|
|
2098
|
+
/** Callback when text changes (for "text", "text_with_operands", and "numeric" types) */
|
|
1746
2099
|
onTextChange?: (text: string) => void;
|
|
1747
|
-
/** Selected operand value (for "text_with_operands" type) */
|
|
2100
|
+
/** Selected operand value (for "text_with_operands" type) - feature 2: operands as prop */
|
|
1748
2101
|
operand?: string;
|
|
1749
2102
|
/** Callback when operand changes (for "text_with_operands" type) */
|
|
1750
2103
|
onOperandChange?: (operand: string) => void;
|
|
1751
|
-
/** Available operands
|
|
2104
|
+
/** Available operands with label and value - feature 2: operands support for conversation logs */
|
|
1752
2105
|
operands?: {
|
|
1753
2106
|
value: string;
|
|
1754
2107
|
label: string;
|
|
1755
2108
|
}[];
|
|
1756
|
-
/** Placeholder text for textarea/input (for "text" and "
|
|
2109
|
+
/** Placeholder text for textarea/input (for "text", "text_with_operands", and "numeric" types) */
|
|
1757
2110
|
textPlaceholder?: string;
|
|
1758
|
-
/** Placeholder for operand select (for "text_with_operands" type, default: "") */
|
|
2111
|
+
/** Placeholder for operand select (for "text_with_operands"/"numeric_with_operands" type, default: "") */
|
|
1759
2112
|
operandPlaceholder?: string;
|
|
2113
|
+
/** Unit label suffix shown inside numeric input (e.g. "sec", "min") */
|
|
2114
|
+
unitLabel?: string;
|
|
2115
|
+
/** Enable range mode for "numeric_with_operands" - shows min/max inputs */
|
|
2116
|
+
isRangeMode?: boolean;
|
|
2117
|
+
/** Range min value (for numeric_with_operands in range mode) */
|
|
2118
|
+
rangeMin?: string;
|
|
2119
|
+
/** Range max value (for numeric_with_operands in range mode) */
|
|
2120
|
+
rangeMax?: string;
|
|
2121
|
+
/** Callback when range min changes */
|
|
2122
|
+
onRangeMinChange?: (value: string) => void;
|
|
2123
|
+
/** Callback when range max changes */
|
|
2124
|
+
onRangeMaxChange?: (value: string) => void;
|
|
2125
|
+
/** Feature 1: Search functionality - show search input to filter list items */
|
|
2126
|
+
showSearch?: boolean;
|
|
2127
|
+
/** Feature 1: Search placeholder text (default: "Search...") */
|
|
2128
|
+
searchPlaceholder?: string;
|
|
1760
2129
|
/** Date range value (for "date" type): { start, end } */
|
|
1761
2130
|
date?: {
|
|
1762
2131
|
start?: Date;
|
|
@@ -1771,6 +2140,8 @@ interface FilterSelectProps<T = string> extends Omit<React$1.HTMLAttributes<HTML
|
|
|
1771
2140
|
datePresets?: boolean | DatePreset[];
|
|
1772
2141
|
/** Show time picker in date filter (default: true) */
|
|
1773
2142
|
showTime?: boolean;
|
|
2143
|
+
/** Feature 7: Empty state label when no items available */
|
|
2144
|
+
emptyStateLabel?: string;
|
|
1774
2145
|
/** Additional className for the trigger button */
|
|
1775
2146
|
triggerClassName?: string;
|
|
1776
2147
|
/** Additional className for the dropdown content */
|
|
@@ -1799,6 +2170,12 @@ interface FilterListItemProps<T = string> {
|
|
|
1799
2170
|
draggable?: boolean;
|
|
1800
2171
|
/** Selection handler */
|
|
1801
2172
|
onSelect?: (value: T) => void;
|
|
2173
|
+
/** Feature 5: Optional icon for this item */
|
|
2174
|
+
icon?: React$1.ComponentType<any> | React$1.ReactNode;
|
|
2175
|
+
/** Feature 6: Show loading spinner on this item */
|
|
2176
|
+
loading?: boolean;
|
|
2177
|
+
/** Optional custom display node replacing the plain label (e.g. rating pill) */
|
|
2178
|
+
labelNode?: React$1.ReactNode;
|
|
1802
2179
|
/** Hover state (for stories) */
|
|
1803
2180
|
hover?: boolean;
|
|
1804
2181
|
/** Additional className */
|
|
@@ -1817,6 +2194,49 @@ declare const FilterListItem: React$1.ForwardRefExoticComponent<FilterListItemPr
|
|
|
1817
2194
|
isDragOver?: boolean;
|
|
1818
2195
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
1819
2196
|
|
|
2197
|
+
/**
|
|
2198
|
+
* Option for the left-side toggle dropdown (e.g., Agent/Crew).
|
|
2199
|
+
*/
|
|
2200
|
+
interface CompoundFilterToggleOption<T extends string = string> {
|
|
2201
|
+
value: T;
|
|
2202
|
+
label: string;
|
|
2203
|
+
/** Icon shown inside the dropdown menu next to the label */
|
|
2204
|
+
icon?: LucideIcon | React$1.ReactNode;
|
|
2205
|
+
}
|
|
2206
|
+
interface CompoundFilterSelectProps<T extends string = string> extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
2207
|
+
/** Options for the left-side toggle dropdown */
|
|
2208
|
+
options: CompoundFilterToggleOption<T>[];
|
|
2209
|
+
/** Current selected value for the left toggle */
|
|
2210
|
+
value: T;
|
|
2211
|
+
/** Callback when left toggle value changes */
|
|
2212
|
+
onChange: (value: T) => void;
|
|
2213
|
+
/**
|
|
2214
|
+
* Leading icon shown on the left pill (e.g., an icon representing the current selection).
|
|
2215
|
+
* If omitted, falls back to the icon on the currently-selected option.
|
|
2216
|
+
*/
|
|
2217
|
+
leadingIcon?: LucideIcon | React$1.ReactNode;
|
|
2218
|
+
/** Optional label shown on the left pill next to the icon. If omitted, only icon + chevron are shown (compact mode). */
|
|
2219
|
+
leftLabel?: string;
|
|
2220
|
+
/** Right-side content, typically a <FilterSelect /> */
|
|
2221
|
+
children?: React$1.ReactNode;
|
|
2222
|
+
/** Disable the left toggle */
|
|
2223
|
+
disabled?: boolean;
|
|
2224
|
+
}
|
|
2225
|
+
/**
|
|
2226
|
+
* CompoundFilterSelect
|
|
2227
|
+
*
|
|
2228
|
+
* A compound filter comprising:
|
|
2229
|
+
* - Left pill: a dropdown toggle (e.g., Agent / Crew) with its own rounded-left border
|
|
2230
|
+
* - Right pill: any content (typically a <FilterSelect />) with its own rounded-right border
|
|
2231
|
+
*
|
|
2232
|
+
* The two pills overlap by 1px so their borders merge visually into a single continuous pill.
|
|
2233
|
+
* Per Figma spec (1XTtQGgJ2Tb0wycZ7O1Ez9 · 5427:32324).
|
|
2234
|
+
*/
|
|
2235
|
+
declare function CompoundFilterSelect<T extends string = string>({ options, value, onChange, leadingIcon, leftLabel, children, disabled, className, ...props }: CompoundFilterSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
2236
|
+
declare namespace CompoundFilterSelect {
|
|
2237
|
+
var displayName: string;
|
|
2238
|
+
}
|
|
2239
|
+
|
|
1820
2240
|
interface ButtonListItem {
|
|
1821
2241
|
value: string;
|
|
1822
2242
|
label: string;
|
|
@@ -2012,64 +2432,105 @@ interface KeyValueEditorProps {
|
|
|
2012
2432
|
/**
|
|
2013
2433
|
* KeyValueEditor - Table-style key-value pair editor.
|
|
2014
2434
|
* Renders header (Key, Value) and editable rows with delete on hover.
|
|
2015
|
-
* Figma reference:
|
|
2435
|
+
* Figma reference: 5905:39527
|
|
2016
2436
|
*/
|
|
2017
2437
|
declare const KeyValueEditor: React$1.ForwardRefExoticComponent<KeyValueEditorProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2018
2438
|
|
|
2019
|
-
type
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
/**
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
/**
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
/**
|
|
2034
|
-
* Key-value pairs (controlled). Used when mode is "keyValue".
|
|
2035
|
-
*/
|
|
2036
|
-
pairs?: KeyValuePair[];
|
|
2439
|
+
type PopoverSide = "top" | "right" | "bottom" | "left";
|
|
2440
|
+
type PopoverAlign = "start" | "center" | "end";
|
|
2441
|
+
type PopoverShadow = "none" | "xs" | "sm" | "md" | "lg";
|
|
2442
|
+
interface PopoverProps {
|
|
2443
|
+
/** Controlled open state. If omitted, component is uncontrolled. */
|
|
2444
|
+
open?: boolean;
|
|
2445
|
+
/** Called when open state changes (both controlled and uncontrolled). */
|
|
2446
|
+
onOpenChange?: (open: boolean) => void;
|
|
2447
|
+
/** Uncontrolled default open. */
|
|
2448
|
+
defaultOpen?: boolean;
|
|
2449
|
+
/** The trigger element (e.g. button). Rendered in place. */
|
|
2450
|
+
trigger: React$1.ReactNode;
|
|
2451
|
+
/** Popover body content — can be anything. */
|
|
2452
|
+
children: React$1.ReactNode;
|
|
2037
2453
|
/**
|
|
2038
|
-
*
|
|
2039
|
-
|
|
2040
|
-
|
|
2454
|
+
* Optional search input rendered at the top of the popover.
|
|
2455
|
+
* When provided, renders a search bar above `children`.
|
|
2456
|
+
*/
|
|
2457
|
+
search?: {
|
|
2458
|
+
/** Controlled search value */
|
|
2459
|
+
value?: string;
|
|
2460
|
+
/** Called when the search input changes */
|
|
2461
|
+
onValueChange?: (value: string) => void;
|
|
2462
|
+
/** Placeholder text */
|
|
2463
|
+
placeholder?: string;
|
|
2464
|
+
/** Auto-focus the search input when popover opens */
|
|
2465
|
+
autoFocus?: boolean;
|
|
2466
|
+
};
|
|
2041
2467
|
/**
|
|
2042
|
-
*
|
|
2468
|
+
* Position relative to trigger.
|
|
2469
|
+
* @default "bottom"
|
|
2043
2470
|
*/
|
|
2044
|
-
|
|
2471
|
+
side?: PopoverSide;
|
|
2045
2472
|
/**
|
|
2046
|
-
*
|
|
2473
|
+
* Alignment along the side.
|
|
2474
|
+
* @default "start"
|
|
2047
2475
|
*/
|
|
2048
|
-
|
|
2476
|
+
align?: PopoverAlign;
|
|
2049
2477
|
/**
|
|
2050
|
-
*
|
|
2478
|
+
* Offset (px) between trigger and popover.
|
|
2479
|
+
* @default 4
|
|
2051
2480
|
*/
|
|
2052
|
-
|
|
2481
|
+
sideOffset?: number;
|
|
2053
2482
|
/**
|
|
2054
|
-
*
|
|
2483
|
+
* Show border around the popover container.
|
|
2484
|
+
* @default false
|
|
2055
2485
|
*/
|
|
2056
|
-
|
|
2057
|
-
keyPlaceholder?: string;
|
|
2058
|
-
valuePlaceholder?: string;
|
|
2059
|
-
jsonHeight?: string;
|
|
2060
|
-
jsonLabel?: string;
|
|
2486
|
+
bordered?: boolean;
|
|
2061
2487
|
/**
|
|
2062
|
-
*
|
|
2488
|
+
* Shadow variant.
|
|
2489
|
+
* @default "md"
|
|
2063
2490
|
*/
|
|
2064
|
-
|
|
2491
|
+
shadow?: PopoverShadow;
|
|
2492
|
+
/** Width (px or CSS value). If omitted, popover sizes to content. */
|
|
2493
|
+
width?: number | string;
|
|
2494
|
+
/** Min width (defaults to trigger width if omitted) */
|
|
2495
|
+
minWidth?: number | string;
|
|
2496
|
+
/** Max height — content scrolls beyond this. */
|
|
2497
|
+
maxHeight?: number | string;
|
|
2498
|
+
/** Additional className for the popover container. */
|
|
2065
2499
|
className?: string;
|
|
2066
|
-
|
|
2500
|
+
/** Additional className for the outer wrapper (trigger + popover). */
|
|
2501
|
+
wrapperClassName?: string;
|
|
2502
|
+
/** Close popover on outside click. @default true */
|
|
2503
|
+
closeOnOutsideClick?: boolean;
|
|
2504
|
+
/** Close popover on Escape key. @default true */
|
|
2505
|
+
closeOnEscape?: boolean;
|
|
2067
2506
|
}
|
|
2068
2507
|
|
|
2069
2508
|
/**
|
|
2070
|
-
*
|
|
2071
|
-
*
|
|
2509
|
+
* Popover — generic floating container.
|
|
2510
|
+
*
|
|
2511
|
+
* Supports:
|
|
2512
|
+
* - Any children as content
|
|
2513
|
+
* - Optional search bar at the top
|
|
2514
|
+
* - Border / shadow variants
|
|
2515
|
+
* - Controlled or uncontrolled open state
|
|
2516
|
+
* - Positioning (side + align)
|
|
2517
|
+
* - Click-outside / Escape to close
|
|
2518
|
+
*
|
|
2519
|
+
* Figma reference: 43:10346 (Menu Dropdown)
|
|
2520
|
+
*
|
|
2521
|
+
* @example
|
|
2522
|
+
* <Popover trigger={<Button>Open</Button>}>
|
|
2523
|
+
* <div>Any content here</div>
|
|
2524
|
+
* </Popover>
|
|
2525
|
+
*
|
|
2526
|
+
* @example with search
|
|
2527
|
+
* <Popover
|
|
2528
|
+
* trigger={<Button>Filter</Button>}
|
|
2529
|
+
* search={{ value: q, onValueChange: setQ, placeholder: "Search…" }}
|
|
2530
|
+
* >
|
|
2531
|
+
* <ListItems />
|
|
2532
|
+
* </Popover>
|
|
2072
2533
|
*/
|
|
2073
|
-
declare const
|
|
2534
|
+
declare const Popover: React$1.ForwardRefExoticComponent<PopoverProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2074
2535
|
|
|
2075
|
-
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, ButtonList, type ButtonListItem, type ButtonListProps, type ButtonProps, type ButtonSize, type ButtonVariant, type CellContent, type CellTextContent, Checkbox, type CheckboxProps, type ColumnDef, ColumnWidth, 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, FilterListItem, type FilterListItemProps, FilterSelect, type FilterSelectProps, 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,
|
|
2536
|
+
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, ButtonList, type ButtonListItem, type ButtonListProps, type ButtonProps, type ButtonSize, type ButtonVariant, type CellContent, type CellTextContent, 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, 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 };
|