@nurix/ui-component-library 1.1.3-stage.94 → 1.1.3-stage.96

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 CHANGED
@@ -6,10 +6,12 @@ import * as SelectPrimitive from '@radix-ui/react-select';
6
6
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
7
7
  import { Toaster as Toaster$1 } from 'sonner';
8
8
  import { LucideIcon } from 'lucide-react';
9
+ import { Schema } from 'ajv';
10
+ import { OnMount } from '@monaco-editor/react';
9
11
 
10
12
  type ButtonBorderRadius = "none" | "soft" | "rounded";
11
13
  type ButtonVariant = "primary" | "secondary" | "destructive" | "outline" | "link" | "iconPrimary" | "iconSecondary" | "iconOutline";
12
- type ButtonSize = "default" | "sm" | "lg" | "link" | "icon" | "iconSm";
14
+ type ButtonSize = "default" | "sm" | "lg" | "link" | "icon" | "iconSm" | "iconXs";
13
15
  interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
14
16
  variant?: ButtonVariant;
15
17
  size?: ButtonSize;
@@ -483,7 +485,7 @@ declare const SelectItem: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive
483
485
  leadIconSize?: "xs" | "sm" | "md";
484
486
  } & React$1.RefAttributes<HTMLDivElement>>;
485
487
  declare const SelectSeparator: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
486
- declare function SelectFormLabel({ className, label, mandatory }: SelectLabelProps): react_jsx_runtime.JSX.Element;
488
+ declare function SelectFormLabel({ className, label, mandatory, }: SelectLabelProps): react_jsx_runtime.JSX.Element;
487
489
 
488
490
  interface PlaySelectAudioItem {
489
491
  value: string;
@@ -574,20 +576,32 @@ declare function usePlaySelect({ value, defaultValue, onValueChange, onPlayClick
574
576
  pauseAudio: () => void;
575
577
  };
576
578
 
579
+ /** Illustration position relative to text and CTAs. */
580
+ type EmptyStateIllustrationPosition = "top" | "bottom";
581
+ /** Illustration size variant. */
582
+ type EmptyStateIllustrationSize = "small" | "banner";
577
583
  interface EmptyStateProps extends React$1.HTMLAttributes<HTMLDivElement> {
578
- /** Illustration element (e.g. image, icon, or SVG) displayed above the text. */
584
+ /** Illustration element (e.g. image, icon, or SVG). */
579
585
  illustration?: React$1.ReactNode;
586
+ /** Where to place the illustration: above or below the text/CTAs. */
587
+ illustrationPosition?: EmptyStateIllustrationPosition;
588
+ /** Size of the illustration area. Small: 120×120px, Banner: 220×500px (overridden by width/height). */
589
+ illustrationSize?: EmptyStateIllustrationSize;
590
+ /** Custom illustration width (e.g. "500px", 300). Overrides illustrationSize for width. */
591
+ illustrationWidth?: string | number;
592
+ /** Custom illustration height (e.g. "220px", 200). Overrides illustrationSize for height. */
593
+ illustrationHeight?: string | number;
580
594
  /** Primary title text. */
581
595
  title: string;
582
596
  /** Secondary description text. */
583
597
  description?: string;
584
- /** Action element (e.g. a Button) displayed below the text. */
585
- action?: React$1.ReactNode;
598
+ /** Action element(s) displayed below the text. Single button or array of buttons. */
599
+ action?: React$1.ReactNode | React$1.ReactNode[];
586
600
  }
587
601
 
588
602
  /**
589
603
  * Empty state placeholder.
590
- * Figma reference node: 3696:2825
604
+ * Figma reference: 3619:3067 (Nurix Design System 2026)
591
605
  */
592
606
  declare const EmptyState: React$1.ForwardRefExoticComponent<EmptyStateProps & React$1.RefAttributes<HTMLDivElement>>;
593
607
 
@@ -1100,6 +1114,17 @@ declare const DEFAULT_THEME: {
1100
1114
  readonly warningForeground: "#78350f";
1101
1115
  readonly switchTrack: "#e5e5e5";
1102
1116
  readonly hover: "#0a0a0a1a";
1117
+ readonly filterInput: "#fff";
1118
+ readonly badgeDefaultBg: "#f0f9ff";
1119
+ readonly badgeDefaultFg: "#0369a1";
1120
+ readonly badgeSuccessBg: "#ecfdf5";
1121
+ readonly badgeSuccessFg: "#047857";
1122
+ readonly badgeWarningBg: "#fef3c7";
1123
+ readonly badgeWarningFg: "#92400e";
1124
+ readonly badgeNeutralBg: "#e5e5e5";
1125
+ readonly badgeNeutralFg: "#525252";
1126
+ readonly badgeDestructiveBg: "#fef2f2";
1127
+ readonly badgeDestructiveFg: "#b91c1c";
1103
1128
  };
1104
1129
  readonly darkMode: {
1105
1130
  readonly background: "#1e1e1e";
@@ -1143,6 +1168,17 @@ declare const DEFAULT_THEME: {
1143
1168
  readonly success: "#a7f3d0";
1144
1169
  readonly warning: "#fde68a";
1145
1170
  readonly warningForeground: "#78350f";
1171
+ readonly filterInput: "#171717";
1172
+ readonly badgeDefaultBg: "#0c4a6e";
1173
+ readonly badgeDefaultFg: "#7dd3fc";
1174
+ readonly badgeSuccessBg: "#064e3b";
1175
+ readonly badgeSuccessFg: "#6ee7b7";
1176
+ readonly badgeWarningBg: "#78350f";
1177
+ readonly badgeWarningFg: "#fcd34d";
1178
+ readonly badgeNeutralBg: "#404040";
1179
+ readonly badgeNeutralFg: "#d4d4d4";
1180
+ readonly badgeDestructiveBg: "#7f1d1d";
1181
+ readonly badgeDestructiveFg: "#fecaca";
1146
1182
  readonly switchTrack: "#ffffff";
1147
1183
  readonly hover: "#ffffff1a";
1148
1184
  };
@@ -1150,8 +1186,8 @@ declare const DEFAULT_THEME: {
1150
1186
  readonly components: {
1151
1187
  readonly mode1: {
1152
1188
  readonly inputRadius: 16;
1153
- readonly inputHeight: 48;
1154
- readonly inputHeightLarge: 64;
1189
+ readonly inputHeight: 42;
1190
+ readonly inputHeightLarge: 56;
1155
1191
  readonly inputPaddingHorizontal: 16;
1156
1192
  readonly inputPaddingVertical: 8;
1157
1193
  readonly buttonHeight: 40;
@@ -1579,7 +1615,7 @@ interface FilterItem<T = string> {
1579
1615
  /**
1580
1616
  * Props for FilterSelect component
1581
1617
  */
1582
- interface FilterSelectProps<T = string> extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "onChange"> {
1618
+ interface FilterSelectProps<T = string> extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "onChange" | "className"> {
1583
1619
  /** Filter label displayed in the trigger button */
1584
1620
  label?: string;
1585
1621
  /** Icon displayed on the left side of the trigger */
@@ -1640,6 +1676,12 @@ interface FilterSelectProps<T = string> extends Omit<React$1.HTMLAttributes<HTML
1640
1676
  }) => void;
1641
1677
  /** Date presets to show (default: true = built-in presets). Set false to hide, or pass custom array */
1642
1678
  datePresets?: boolean | DatePreset[];
1679
+ /** Show time picker in date filter (default: true) */
1680
+ showTime?: boolean;
1681
+ /** Additional className for the trigger button */
1682
+ triggerClassName?: string;
1683
+ /** Additional className for the dropdown content */
1684
+ dropdownClassName?: string;
1643
1685
  }
1644
1686
  /** Date preset: label and function to compute the range */
1645
1687
  interface DatePreset {
@@ -1701,4 +1743,215 @@ interface SpinnerProps extends React$1.HTMLAttributes<HTMLDivElement> {
1701
1743
  */
1702
1744
  declare const Spinner: React$1.ForwardRefExoticComponent<SpinnerProps & React$1.RefAttributes<HTMLDivElement>>;
1703
1745
 
1704
- 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, 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 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, LegoLandWrapper, type LegoLandWrapperProps, List, type ListBorderRadius, type ListProps, type ListType, type ListVariant, NumberBadge, type NumberBadgeProps, type NumberBadgeVariant, NurixThemeProvider, Pagination, type PaginationProps, 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 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, 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 };
1746
+ /**
1747
+ * Supported Monaco editor languages.
1748
+ */
1749
+ type JsonEditorLanguage = "json" | "javascript" | "typescript" | "yaml" | "xml" | "html" | "css" | "markdown" | "sql" | "plaintext";
1750
+ declare const JSON_EDITOR_LANGUAGE_OPTIONS: readonly JsonEditorLanguage[];
1751
+ interface JsonEditorProps {
1752
+ value: string;
1753
+ onChange: (val: string) => void;
1754
+ onParsedObject?: (obj: unknown | null) => void;
1755
+ height?: string;
1756
+ label?: string;
1757
+ schema?: Schema;
1758
+ nodeId?: string;
1759
+ language?: JsonEditorLanguage;
1760
+ showExpandButton?: boolean;
1761
+ /** When true, hide the header/toolbar (for embedding in KeyValueJsonEditor). */
1762
+ hideHeader?: boolean;
1763
+ }
1764
+
1765
+ declare function JsonEditor({ value, onChange, onParsedObject, height, label, schema, nodeId, language, showExpandButton, hideHeader, }: JsonEditorProps): react_jsx_runtime.JSX.Element;
1766
+
1767
+ interface UseJsonEditorParams {
1768
+ value: string;
1769
+ onChange: (val: string) => void;
1770
+ onParsedObject?: (obj: unknown | null) => void;
1771
+ schema?: Schema;
1772
+ nodeId?: string;
1773
+ language?: JsonEditorLanguage;
1774
+ }
1775
+ declare function useJsonEditor({ value, onChange, onParsedObject, schema, nodeId, language, }: UseJsonEditorParams): {
1776
+ handleMount: OnMount;
1777
+ handleExpandedMount: OnMount;
1778
+ handleChange: (val: string | undefined) => void;
1779
+ formatJson: () => Promise<void> | undefined;
1780
+ formatExpandedJson: () => Promise<void> | undefined;
1781
+ copyToClipboard: () => void;
1782
+ errors: string[];
1783
+ copied: boolean;
1784
+ };
1785
+
1786
+ declare const enhanceJsonError: (message: string) => string;
1787
+ declare const MONACO_OPTIONS: {
1788
+ fontSize: number;
1789
+ lineHeight: number;
1790
+ padding: {
1791
+ top: number;
1792
+ bottom: number;
1793
+ };
1794
+ minimap: {
1795
+ readonly enabled: false;
1796
+ };
1797
+ automaticLayout: true;
1798
+ scrollBeyondLastLine: false;
1799
+ folding: true;
1800
+ lineNumbers: "on";
1801
+ renderLineHighlight: "none";
1802
+ fontFamily: "'Geist Mono', 'Cascadia Code', 'Fira Code', monospace";
1803
+ fontLigatures: true;
1804
+ bracketPairColorization: {
1805
+ readonly enabled: true;
1806
+ };
1807
+ guides: {
1808
+ readonly bracketPairs: false;
1809
+ readonly indentation: false;
1810
+ };
1811
+ overviewRulerLanes: 0;
1812
+ hideCursorInOverviewRuler: true;
1813
+ overviewRulerBorder: false;
1814
+ scrollbar: {
1815
+ readonly vertical: "auto";
1816
+ readonly horizontal: "auto";
1817
+ readonly useShadows: false;
1818
+ readonly verticalScrollbarSize: 6;
1819
+ readonly horizontalScrollbarSize: 6;
1820
+ readonly arrowSize: 0;
1821
+ };
1822
+ };
1823
+ /** Dialog editor: tighter padding, slightly larger font for readability in expanded view */
1824
+ declare const MONACO_OPTIONS_DIALOG: {
1825
+ fontSize: number;
1826
+ lineHeight: number;
1827
+ padding: {
1828
+ top: number;
1829
+ bottom: number;
1830
+ };
1831
+ minimap: {
1832
+ readonly enabled: false;
1833
+ };
1834
+ automaticLayout: true;
1835
+ scrollBeyondLastLine: false;
1836
+ folding: true;
1837
+ lineNumbers: "on";
1838
+ renderLineHighlight: "none";
1839
+ fontFamily: "'Geist Mono', 'Cascadia Code', 'Fira Code', monospace";
1840
+ fontLigatures: true;
1841
+ bracketPairColorization: {
1842
+ readonly enabled: true;
1843
+ };
1844
+ guides: {
1845
+ readonly bracketPairs: false;
1846
+ readonly indentation: false;
1847
+ };
1848
+ overviewRulerLanes: 0;
1849
+ hideCursorInOverviewRuler: true;
1850
+ overviewRulerBorder: false;
1851
+ scrollbar: {
1852
+ readonly vertical: "auto";
1853
+ readonly horizontal: "auto";
1854
+ readonly useShadows: false;
1855
+ readonly verticalScrollbarSize: 6;
1856
+ readonly horizontalScrollbarSize: 6;
1857
+ readonly arrowSize: 0;
1858
+ };
1859
+ };
1860
+
1861
+ interface KeyValuePair {
1862
+ key: string;
1863
+ value: string;
1864
+ }
1865
+ interface KeyValueEditorProps {
1866
+ /**
1867
+ * Key-value pairs.
1868
+ */
1869
+ pairs: KeyValuePair[];
1870
+ /**
1871
+ * Called when pairs change.
1872
+ */
1873
+ onPairsChange: (pairs: KeyValuePair[]) => void;
1874
+ /**
1875
+ * Placeholder for key inputs.
1876
+ */
1877
+ keyPlaceholder?: string;
1878
+ /**
1879
+ * Placeholder for value inputs.
1880
+ */
1881
+ valuePlaceholder?: string;
1882
+ /**
1883
+ * Optional toolbar content (e.g. Toggle button) rendered in the header.
1884
+ */
1885
+ toolbar?: React$1.ReactNode;
1886
+ /**
1887
+ * When true, omit the header row. For use inside KeyValueJsonEditor.
1888
+ */
1889
+ hideHeader?: boolean;
1890
+ className?: string;
1891
+ style?: React$1.CSSProperties;
1892
+ }
1893
+
1894
+ /**
1895
+ * KeyValueEditor - Table-style key-value pair editor.
1896
+ * Renders header (Key, Value) and editable rows with delete on hover.
1897
+ * Figma reference: 258:10275
1898
+ */
1899
+ declare const KeyValueEditor: React$1.ForwardRefExoticComponent<KeyValueEditorProps & React$1.RefAttributes<HTMLDivElement>>;
1900
+
1901
+ type KeyValueJsonEditorMode = "keyValue" | "json";
1902
+ interface KeyValueJsonEditorProps {
1903
+ /**
1904
+ * Current mode: key-value table or JSON editor.
1905
+ */
1906
+ mode?: KeyValueJsonEditorMode;
1907
+ /**
1908
+ * Initial mode when uncontrolled.
1909
+ */
1910
+ defaultMode?: KeyValueJsonEditorMode;
1911
+ /**
1912
+ * Called when mode changes (e.g. via toggle).
1913
+ */
1914
+ onModeChange?: (mode: KeyValueJsonEditorMode) => void;
1915
+ /**
1916
+ * Key-value pairs (controlled). Used when mode is "keyValue".
1917
+ */
1918
+ pairs?: KeyValuePair[];
1919
+ /**
1920
+ * JSON string (controlled). Used when mode is "json".
1921
+ */
1922
+ jsonValue?: string;
1923
+ /**
1924
+ * Called when pairs change (key-value mode).
1925
+ */
1926
+ onPairsChange?: (pairs: KeyValuePair[]) => void;
1927
+ /**
1928
+ * Called when JSON changes (json mode).
1929
+ */
1930
+ onJsonChange?: (json: string) => void;
1931
+ /**
1932
+ * Initial pairs when uncontrolled.
1933
+ */
1934
+ defaultPairs?: KeyValuePair[];
1935
+ /**
1936
+ * Initial JSON when uncontrolled.
1937
+ */
1938
+ defaultJson?: string;
1939
+ keyPlaceholder?: string;
1940
+ valuePlaceholder?: string;
1941
+ jsonHeight?: string;
1942
+ jsonLabel?: string;
1943
+ /**
1944
+ * JsonEditor language when in JSON mode.
1945
+ */
1946
+ jsonLanguage?: JsonEditorLanguage;
1947
+ className?: string;
1948
+ style?: React.CSSProperties;
1949
+ }
1950
+
1951
+ /**
1952
+ * KeyValueJsonEditor - Unified component with toggle between Key-Value and JSON modes.
1953
+ * Figma reference: 258:10275, 298:6652
1954
+ */
1955
+ declare const KeyValueJsonEditor: React$1.ForwardRefExoticComponent<KeyValueJsonEditorProps & React$1.RefAttributes<HTMLDivElement>>;
1956
+
1957
+ 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, 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, JSON_EDITOR_LANGUAGE_OPTIONS, JsonEditor, type JsonEditorLanguage, type JsonEditorProps, KeyValueEditor, type KeyValueEditorProps, KeyValueJsonEditor, type KeyValueJsonEditorMode, type KeyValueJsonEditorProps, type KeyValuePair, LegoLandWrapper, type LegoLandWrapperProps, List, type ListBorderRadius, type ListProps, type ListType, type ListVariant, MONACO_OPTIONS, MONACO_OPTIONS_DIALOG, NumberBadge, type NumberBadgeProps, type NumberBadgeVariant, NurixThemeProvider, Pagination, type PaginationProps, 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 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, 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, enhanceJsonError, showToast, useJsonEditor, usePlaySelect, useSelect, useTheme };