@cere/cere-design-system 0.0.19 → 0.0.20

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
@@ -125,6 +125,45 @@ declare const deploymentStatusColors: {
125
125
  disabled: string;
126
126
  disabledDim: string;
127
127
  };
128
+ /**
129
+ * ROB primary brand color palette (Figma node 11-1393)
130
+ * Four main brand colors for the ROB design system
131
+ */
132
+ declare const robPrimaryPalette: {
133
+ /** Primary magenta/pink - Figma node 11-1394 */
134
+ readonly fandango: "#BD32A7";
135
+ /** Vivid purple - Figma node 11-1407 */
136
+ readonly electricViolet: "#8B00EC";
137
+ /** Mid-tone purple - Figma node 11-1420 */
138
+ readonly ultraViolet: "#6750A4";
139
+ /** Light lavender - Figma node 11-1433 */
140
+ readonly periwinkle: "#D0BCFF";
141
+ };
142
+ /**
143
+ * ROB extended palette with additional swatches (Figma node 11-1447)
144
+ * Gradient shades and secondary accents from the ROB color grid
145
+ */
146
+ declare const robPaletteExtended: {
147
+ readonly dark1: "#280e61";
148
+ readonly dark2: "#531584";
149
+ readonly dark3: "#710c7a";
150
+ readonly dark4: "#920269";
151
+ readonly dark5: "#c71454";
152
+ readonly dark6: "#ff6341";
153
+ readonly bright1: "#5311e3";
154
+ readonly bright2: "#eb03ff";
155
+ readonly bright3: "#ff17ab";
156
+ readonly bright4: "#ff6a85";
157
+ readonly light1: "#baa0f4";
158
+ readonly light2: "#d399fc";
159
+ readonly light3: "#f79aff";
160
+ readonly light4: "#faabde";
161
+ readonly light5: "#ffc4ce";
162
+ readonly nearBlack1: "#0b0f18";
163
+ readonly nearBlack2: "#0d0627";
164
+ readonly nearBlack3: "#161d30";
165
+ readonly nearBlack4: "#23194b";
166
+ };
128
167
  declare const theme: Theme;
129
168
 
130
169
  declare const CheckMarkAnimation: () => react_jsx_runtime.JSX.Element;
@@ -940,6 +979,108 @@ interface ChipProps extends Omit<ChipProps$1, 'color' | 'variant'> {
940
979
  }
941
980
  declare const Chip: React__default.FC<ChipProps>;
942
981
 
982
+ /**
983
+ * Color variants for the RoleBadge component
984
+ */
985
+ type RoleBadgeColor = 'primary' | 'secondary' | 'success' | 'error' | 'warning';
986
+ /**
987
+ * Size variants for the RoleBadge component
988
+ */
989
+ type RoleBadgeSize = 'small' | 'medium';
990
+ /**
991
+ * RoleBadge component props
992
+ */
993
+ interface RoleBadgeProps extends Omit<ChipProps$1, 'label' | 'variant' | 'color' | 'size'> {
994
+ /**
995
+ * The text content to display in the badge
996
+ */
997
+ label: string;
998
+ /**
999
+ * The color theme of the badge
1000
+ * @default 'primary'
1001
+ */
1002
+ color?: RoleBadgeColor;
1003
+ /**
1004
+ * The size of the badge
1005
+ * @default 'small'
1006
+ */
1007
+ size?: RoleBadgeSize;
1008
+ }
1009
+ /**
1010
+ * RoleBadge - Pill-shaped badge component for displaying roles or status labels
1011
+ *
1012
+ * A reusable badge component that extends MUI Chip with a pill-shaped outline style.
1013
+ * Designed for displaying user roles, status indicators, or categorization labels.
1014
+ *
1015
+ * @example
1016
+ * ```tsx
1017
+ * // Basic usage
1018
+ * <RoleBadge label="Manager" />
1019
+ *
1020
+ * // With color variants
1021
+ * <RoleBadge label="Admin" color="error" />
1022
+ * <RoleBadge label="Active" color="success" />
1023
+ *
1024
+ * // With size variants
1025
+ * <RoleBadge label="Owner" size="medium" />
1026
+ * ```
1027
+ *
1028
+ * @see Figma node 17-3595 for design specifications
1029
+ */
1030
+ declare const RoleBadge: React__default.FC<RoleBadgeProps>;
1031
+
1032
+ /**
1033
+ * IDBlock component props
1034
+ */
1035
+ interface IDBlockProps {
1036
+ /**
1037
+ * The identifier value to display and copy
1038
+ */
1039
+ id: string;
1040
+ /**
1041
+ * Label prefix text
1042
+ * @default 'ID'
1043
+ */
1044
+ label?: string;
1045
+ /**
1046
+ * Entity type for accessibility (used in aria-label)
1047
+ * @default 'entity'
1048
+ */
1049
+ entityType?: string;
1050
+ /**
1051
+ * Additional callback to execute after successful copy
1052
+ */
1053
+ onCopy?: () => void;
1054
+ }
1055
+ /**
1056
+ * IDBlock - Read-only identifier display with integrated copy-to-clipboard button
1057
+ *
1058
+ * A component that displays an identifier (ID, account number, etc.) with a copy button.
1059
+ * Provides user feedback via Snackbar messages when copy succeeds or fails.
1060
+ * Requires MessagesProvider to be present in the component tree.
1061
+ *
1062
+ * @example
1063
+ * ```tsx
1064
+ * // Basic usage
1065
+ * <IDBlock id="W1234567890" />
1066
+ *
1067
+ * // With custom label
1068
+ * <IDBlock id="ACC-9876543" label="Account ID" entityType="account" />
1069
+ *
1070
+ * // With callback
1071
+ * <IDBlock
1072
+ * id="DEPLOY-12345"
1073
+ * label="Deployment ID"
1074
+ * entityType="deployment"
1075
+ * onCopy={() => console.log('ID copied')}
1076
+ * />
1077
+ * ```
1078
+ *
1079
+ * @see Figma node 17-3596 for design specifications
1080
+ * @requires MessagesProvider - Must be wrapped in MessagesProvider context
1081
+ */
1082
+ declare const IDBlock: React__default.FC<IDBlockProps>;
1083
+
943
1084
  type TooltipProps = TooltipProps$1;
944
1085
  declare const Tooltip: React__default.FC<TooltipProps>;
945
1086
 
@@ -1006,6 +1147,104 @@ type LogoProps = PropsWithChildren<{
1006
1147
  }>;
1007
1148
  declare const Logo: ({ children, size, icon }: LogoProps) => react_jsx_runtime.JSX.Element;
1008
1149
 
1150
+ /**
1151
+ * Primary action configuration for EntityHeader
1152
+ */
1153
+ interface PrimaryAction {
1154
+ /**
1155
+ * Button label text
1156
+ */
1157
+ label: string;
1158
+ /**
1159
+ * Optional count to display as "Label (N)"
1160
+ */
1161
+ count?: number;
1162
+ /**
1163
+ * Optional leading icon
1164
+ */
1165
+ icon?: React__default.ReactNode;
1166
+ /**
1167
+ * Click handler for the button
1168
+ */
1169
+ onClick?: () => void;
1170
+ }
1171
+ /**
1172
+ * EntityHeader component props
1173
+ */
1174
+ interface EntityHeaderProps {
1175
+ /**
1176
+ * Primary title text (e.g., entity name)
1177
+ * @required
1178
+ */
1179
+ title: string;
1180
+ /**
1181
+ * Secondary descriptive text below title
1182
+ */
1183
+ subtitle?: string;
1184
+ /**
1185
+ * Role or status label - displays as RoleBadge pill
1186
+ */
1187
+ role?: string;
1188
+ /**
1189
+ * Entity identifier - displays as IDBlock with copy action
1190
+ */
1191
+ id?: string;
1192
+ /**
1193
+ * Main action button configuration
1194
+ */
1195
+ primaryAction?: PrimaryAction;
1196
+ /**
1197
+ * Callback when ID is copied (internal copy + this callback)
1198
+ */
1199
+ onCopyId?: () => void;
1200
+ /**
1201
+ * Callback when more options button clicked (receives event for anchor positioning)
1202
+ */
1203
+ onMoreOptions?: (event: React__default.MouseEvent<HTMLElement>) => void;
1204
+ /**
1205
+ * HTML heading level for the title element
1206
+ * @default 'h2'
1207
+ */
1208
+ headingLevel?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
1209
+ /**
1210
+ * Show bottom divider line
1211
+ * @default true
1212
+ */
1213
+ divider?: boolean;
1214
+ }
1215
+ /**
1216
+ * EntityHeader - Composite UI component for entity (workspace, account, etc.) headers
1217
+ *
1218
+ * Displays an entity with title, optional subtitle, role badge, ID with copy action,
1219
+ * primary action button, and more options control. Matches Figma node 15-1258 specifications.
1220
+ *
1221
+ * @example
1222
+ * ```tsx
1223
+ * // Full example with all props
1224
+ * <EntityHeader
1225
+ * title="Game Co. WF 1769936170928"
1226
+ * subtitle="Gaming Demo Account"
1227
+ * role="Manager"
1228
+ * id="W1234567890"
1229
+ * primaryAction={{
1230
+ * label: 'Members',
1231
+ * count: 5,
1232
+ * icon: <AddCircleIcon />,
1233
+ * onClick: () => console.log('Open members')
1234
+ * }}
1235
+ * onCopyId={() => console.log('ID copied')}
1236
+ * onMoreOptions={(e) => setAnchorEl(e.currentTarget)}
1237
+ * />
1238
+ *
1239
+ * // Minimal example
1240
+ * <EntityHeader title="Simple Entity" />
1241
+ * ```
1242
+ *
1243
+ * @see Figma node 15-1258 for design specifications
1244
+ * @requires MessagesProvider - Must be wrapped in MessagesProvider context for ID copy feedback
1245
+ */
1246
+ declare const EntityHeader: React__default.FC<EntityHeaderProps>;
1247
+
1009
1248
  interface DialogProps extends Omit<DialogProps$1, 'title'> {
1010
1249
  open: boolean;
1011
1250
  title: ReactNode;
@@ -1180,41 +1419,86 @@ interface DeploymentDashboardCardProps {
1180
1419
  }
1181
1420
  declare const DeploymentDashboardCard: React__default.FC<DeploymentDashboardCardProps>;
1182
1421
 
1422
+ /**
1423
+ * Describes a single item inside {@link DeploymentEntityContextMenu}.
1424
+ *
1425
+ * Items can be action rows (icon + label), toggle rows (switch + label),
1426
+ * or visual dividers. Use the pre-built `contextMenuItems` factories
1427
+ * for standard deployment-entity actions.
1428
+ *
1429
+ * @see Figma 11-1102
1430
+ */
1183
1431
  interface ContextMenuItem {
1432
+ /** Unique key used for React reconciliation */
1184
1433
  id: string;
1434
+ /** Display label shown next to the icon */
1185
1435
  label: string;
1436
+ /** Optional leading icon (24 × 24) */
1186
1437
  icon?: React__default.ReactNode;
1438
+ /** Click handler — called when an action item is selected */
1187
1439
  onClick?: () => void;
1188
- type?: 'action' | 'toggle';
1440
+ /**
1441
+ * Item variant:
1442
+ * - `'action'` (default) — clickable row with icon + label
1443
+ * - `'toggle'` — switch on left + label, controlled by `enableChecked` / `onEnableChange`
1444
+ * - `'divider'` — horizontal separator (label is ignored)
1445
+ */
1446
+ type?: 'action' | 'toggle' | 'divider';
1447
+ /**
1448
+ * When `true` the item renders with a blue highlight background
1449
+ * (Figma blue-50 / blue-100 tokens). Used for the "Agent Flow Visualization" row.
1450
+ * @default false
1451
+ */
1452
+ highlighted?: boolean;
1189
1453
  }
1190
1454
  /** Pre-built item factories for common deployment entity actions (Figma 11-1102) */
1191
1455
  declare const contextMenuItems: {
1456
+ /** Add Engagement action (Add Circle icon) */
1192
1457
  readonly addEngagement: (onClick: () => void) => ContextMenuItem;
1458
+ /** Add Agent action (Add Circle icon) */
1193
1459
  readonly addAgent: (onClick: () => void) => ContextMenuItem;
1460
+ /** Add Stream action (Add Circle icon) */
1194
1461
  readonly addStream: (onClick: () => void) => ContextMenuItem;
1462
+ /** Edit action (Pen / Edit icon) */
1195
1463
  readonly edit: (onClick: () => void) => ContextMenuItem;
1464
+ /** Copy ID action (Copy icon) */
1196
1465
  readonly copyId: (onClick: () => void) => ContextMenuItem;
1466
+ /** Agent Flow Visualization — highlighted action (SmartToy icon) */
1197
1467
  readonly agentFlowVisualization: (onClick: () => void) => ContextMenuItem;
1468
+ /** View Logs action (Document / Description icon) */
1198
1469
  readonly viewLogs: (onClick: () => void) => ContextMenuItem;
1470
+ /** Horizontal divider between sections */
1471
+ readonly divider: () => ContextMenuItem;
1472
+ /** Enable toggle row (switch on left + label) */
1473
+ readonly enable: () => ContextMenuItem;
1474
+ /** Settings action (Settings / Gear icon) */
1199
1475
  readonly settings: (onClick: () => void) => ContextMenuItem;
1200
1476
  };
1201
1477
 
1202
1478
  interface DeploymentEntityContextMenuProps {
1203
1479
  /** Controlled open state */
1204
1480
  open: boolean;
1205
- /** Anchor for menu position */
1481
+ /** Anchor element for menu position */
1206
1482
  anchorEl: HTMLElement | null;
1207
- /** When menu closes */
1483
+ /** Callback when the menu closes */
1208
1484
  onClose: () => void;
1209
1485
  /** Menu items to render (use contextMenuItems helpers to build) */
1210
1486
  items: ContextMenuItem[];
1211
- /** Whether to show "Enable" row with toggle */
1487
+ /** Whether to show an "Enable" row with toggle at the bottom (legacy — prefer inline toggle item) */
1212
1488
  enableToggle?: boolean;
1213
1489
  /** Toggle checked state */
1214
1490
  enableChecked?: boolean;
1215
1491
  /** Toggle callback */
1216
1492
  onEnableChange?: (checked: boolean) => void;
1217
1493
  }
1494
+ /**
1495
+ * Floating context menu for deployment entities.
1496
+ *
1497
+ * Use the `contextMenuItems` factory to compose your menu. Supports action items,
1498
+ * dividers, toggle rows, and highlighted (active-state) items.
1499
+ *
1500
+ * @see {@link https://www.figma.com/design/xky11VbkkFcgZLwZE8BdCN/ROB?node-id=11-1102 Figma 11-1102}
1501
+ */
1218
1502
  declare const DeploymentEntityContextMenu: React__default.FC<DeploymentEntityContextMenuProps>;
1219
1503
 
1220
1504
  interface DeploymentTreeNode {
@@ -1720,4 +2004,4 @@ interface CodeEditorProps {
1720
2004
  */
1721
2005
  declare const CodeEditor: React__default.FC<CodeEditorProps>;
1722
2006
 
1723
- export { Accordion, type AccordionProps, AccountSection, type AccountSectionProps, ActivityAppIcon, Alert, type AlertProps, type AlertSeverity, AppBar, type AppBarProps, AppLoading, type AppLoadingProps, Avatar, AvatarIcon, type AvatarProps, Badge, type BadgeProps, BarTrackingIcon, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, BytesSize, type BytesSizeProps, Card, CardActions, CardContent, CardHeader, type CardProps, CereIcon, ChartWidget, type ChartWidgetProps, CheckMarkAnimation, Checkbox, type CheckboxProps, Chip, type ChipProps, CircularProgress, type CircularProgressProps, ClockIcon, CloudFlashIcon, CodeEditor, type CodeEditorLanguage, type CodeEditorProps, Collapse, type CollapseProps, ConnectionStatus, type ConnectionStatusProps, type ContextMenuItem, DecentralizedServerIcon, type DeploymentCardAction, DeploymentDashboardCard, type DeploymentDashboardCardProps, DeploymentDashboardPanel, type DeploymentDashboardPanelProps, DeploymentDashboardTree, type DeploymentDashboardTreeProps, DeploymentEntityContextMenu, type DeploymentEntityContextMenuProps, type DeploymentEntityType, type DeploymentStatusIndicator, type DeploymentTreeNode, Dialog, type DialogProps, DiscordIcon, Divider, type DividerProps, DownloadIcon, Drawer, type DrawerProps, Dropdown, DropdownAnchor, type DropdownAnchorProps, type DropdownProps, EmptyState, type EmptyStateProps, FilledFolderIcon, FlowEditor, type FlowEditorProps, FolderIcon, GithubLogoIcon, IconButton, type IconButtonProps, LeftArrowIcon, Link, type LinkProps, List, ListItem, type ListItemProps, type ListProps, Loading, LoadingAnimation, type LoadingAnimationProps, LoadingButton, type LoadingButtonProps, type LoadingProps, Logo, type LogoProps, Markdown, type MarkdownProps, Menu, MenuItem, type MenuItemProps, type MenuProps, type MessageOptions, MessagesProvider, MetricsChart, type MetricsChartProps, type MetricsPeriod, NavigationItem, type NavigationItemProps, NavigationList, type NavigationListProps, OnboardingProvider, Pagination, type PaginationProps, Paper, type PaperProps, PeriodSelect, Progress, type ProgressProps, QRCode, type QRCodeProps, Radio, type RadioProps, RightArrowIcon, SearchField, type SearchFieldProps, Selector, type SelectorOption, type SelectorProps, type Service, ServiceSelectorButton, type ServiceSelectorButtonProps, ShareIcon, SideNav, SideNavHeader, type SideNavHeaderProps, type SideNavProps, Sidebar, SidebarItem, type SidebarItemProps, type SidebarProps, Snackbar, type SnackbarProps, Step, StepButton, type StepButtonProps, StepContent, type StepContentProps, StepLabel, type StepLabelProps, type StepProps, Stepper, type StepperProps, StorageAppIcon, Switch, type SwitchProps, Tab, type TabProps, Table, TableHeader, type TableHeaderProps, type TableProps, TextField, type TextFieldProps, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, Tooltip, type TooltipProps, Truncate, type TruncateProps, UploadFileIcon, UploadFolderIcon, type UserInfo, type Workspace, WorkspaceSelectorButton, type WorkspaceSelectorButtonProps, colors, contextMenuItems, theme, useIsDesktop, useIsMobile, useIsTablet, useMessages, useOnboarding };
2007
+ export { Accordion, type AccordionProps, AccountSection, type AccountSectionProps, ActivityAppIcon, Alert, type AlertProps, type AlertSeverity, AppBar, type AppBarProps, AppLoading, type AppLoadingProps, Avatar, AvatarIcon, type AvatarProps, Badge, type BadgeProps, BarTrackingIcon, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, BytesSize, type BytesSizeProps, Card, CardActions, CardContent, CardHeader, type CardProps, CereIcon, ChartWidget, type ChartWidgetProps, CheckMarkAnimation, Checkbox, type CheckboxProps, Chip, type ChipProps, CircularProgress, type CircularProgressProps, ClockIcon, CloudFlashIcon, CodeEditor, type CodeEditorLanguage, type CodeEditorProps, Collapse, type CollapseProps, ConnectionStatus, type ConnectionStatusProps, type ContextMenuItem, DecentralizedServerIcon, type DeploymentCardAction, DeploymentDashboardCard, type DeploymentDashboardCardProps, DeploymentDashboardPanel, type DeploymentDashboardPanelProps, DeploymentDashboardTree, type DeploymentDashboardTreeProps, DeploymentEntityContextMenu, type DeploymentEntityContextMenuProps, type DeploymentEntityType, type DeploymentStatusIndicator, type DeploymentTreeNode, Dialog, type DialogProps, DiscordIcon, Divider, type DividerProps, DownloadIcon, Drawer, type DrawerProps, Dropdown, DropdownAnchor, type DropdownAnchorProps, type DropdownProps, EmptyState, type EmptyStateProps, EntityHeader, type EntityHeaderProps, FilledFolderIcon, FlowEditor, type FlowEditorProps, FolderIcon, GithubLogoIcon, IDBlock, type IDBlockProps, IconButton, type IconButtonProps, LeftArrowIcon, Link, type LinkProps, List, ListItem, type ListItemProps, type ListProps, Loading, LoadingAnimation, type LoadingAnimationProps, LoadingButton, type LoadingButtonProps, type LoadingProps, Logo, type LogoProps, Markdown, type MarkdownProps, Menu, MenuItem, type MenuItemProps, type MenuProps, type MessageOptions, MessagesProvider, MetricsChart, type MetricsChartProps, type MetricsPeriod, NavigationItem, type NavigationItemProps, NavigationList, type NavigationListProps, OnboardingProvider, Pagination, type PaginationProps, Paper, type PaperProps, PeriodSelect, type PrimaryAction, Progress, type ProgressProps, QRCode, type QRCodeProps, Radio, type RadioProps, RightArrowIcon, RoleBadge, type RoleBadgeColor, type RoleBadgeProps, type RoleBadgeSize, SearchField, type SearchFieldProps, Selector, type SelectorOption, type SelectorProps, type Service, ServiceSelectorButton, type ServiceSelectorButtonProps, ShareIcon, SideNav, SideNavHeader, type SideNavHeaderProps, type SideNavProps, Sidebar, SidebarItem, type SidebarItemProps, type SidebarProps, Snackbar, type SnackbarProps, Step, StepButton, type StepButtonProps, StepContent, type StepContentProps, StepLabel, type StepLabelProps, type StepProps, Stepper, type StepperProps, StorageAppIcon, Switch, type SwitchProps, Tab, type TabProps, Table, TableHeader, type TableHeaderProps, type TableProps, TextField, type TextFieldProps, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, Tooltip, type TooltipProps, Truncate, type TruncateProps, UploadFileIcon, UploadFolderIcon, type UserInfo, type Workspace, WorkspaceSelectorButton, type WorkspaceSelectorButtonProps, colors, contextMenuItems, robPaletteExtended, robPrimaryPalette, theme, useIsDesktop, useIsMobile, useIsTablet, useMessages, useOnboarding };