@peerbots/core 0.2.6 → 1.0.1
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/.changeset/config.json +1 -1
- package/.github/workflows/storybook.yml +9 -1
- package/CHANGELOG.md +100 -0
- package/dist/index.d.mts +645 -131
- package/dist/index.d.ts +645 -131
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -3
- package/src/charts/DistributionBarChart.tsx +10 -4
- package/src/charts/DistributionHistogram.tsx +13 -5
- package/src/charts/LineGraph.stories.tsx +60 -0
- package/src/charts/LineGraph.tsx +216 -0
- package/src/charts/index.ts +2 -0
- package/src/docs/DesignSystem.mdx +241 -25
- package/src/styles/theme.css +8 -0
- package/src/ui/feedback/Alert.stories.tsx +56 -0
- package/src/ui/feedback/Alert.tsx +168 -0
- package/src/ui/{Dialog.stories.tsx → feedback/Dialog.stories.tsx} +2 -2
- package/src/ui/{Dialog.tsx → feedback/Dialog.tsx} +2 -2
- package/src/ui/feedback/EmptyState.stories.tsx +57 -0
- package/src/ui/feedback/EmptyState.tsx +123 -0
- package/src/ui/feedback/Popover.stories.tsx +130 -0
- package/src/ui/feedback/Popover.tsx +135 -0
- package/src/ui/feedback/Skeleton.stories.tsx +88 -0
- package/src/ui/{Skeleton.tsx → feedback/Skeleton.tsx} +2 -2
- package/src/ui/feedback/Spinner.stories.tsx +77 -0
- package/src/ui/feedback/Spinner.tsx +62 -0
- package/src/ui/{Tooltip.stories.tsx → feedback/Tooltip.stories.tsx} +3 -3
- package/src/ui/{Tooltip.tsx → feedback/Tooltip.tsx} +2 -2
- package/src/ui/feedback/index.ts +7 -0
- package/src/ui/forms/Button.stories.tsx +181 -0
- package/src/ui/forms/Button.tsx +323 -0
- package/src/ui/{Checkbox.stories.tsx → forms/Checkbox.stories.tsx} +2 -2
- package/src/ui/{Checkbox.tsx → forms/Checkbox.tsx} +2 -2
- package/src/ui/forms/ChipGroup.stories.tsx +118 -0
- package/src/ui/forms/ChipGroup.tsx +239 -0
- package/src/ui/{Dropdown.tsx → forms/Dropdown.tsx} +1 -1
- package/src/ui/{Field.stories.tsx → forms/Field.stories.tsx} +3 -3
- package/src/ui/{Field.tsx → forms/Field.tsx} +1 -1
- package/src/ui/{Input.stories.tsx → forms/Input.stories.tsx} +6 -6
- package/src/ui/{Input.tsx → forms/Input.tsx} +1 -1
- package/src/ui/{Label.stories.tsx → forms/Label.stories.tsx} +2 -2
- package/src/ui/{Label.tsx → forms/Label.tsx} +2 -2
- package/src/ui/{NumberField.stories.tsx → forms/NumberField.stories.tsx} +2 -2
- package/src/ui/{NumberField.tsx → forms/NumberField.tsx} +8 -9
- package/src/ui/forms/PeerbotsColorSelector.stories.tsx +49 -0
- package/src/ui/forms/PeerbotsColorSelector.tsx +100 -0
- package/src/ui/{Select.stories.tsx → forms/Select.stories.tsx} +2 -2
- package/src/ui/{Select.tsx → forms/Select.tsx} +5 -3
- package/src/ui/{Slider.stories.tsx → forms/Slider.stories.tsx} +6 -4
- package/src/ui/{Slider.tsx → forms/Slider.tsx} +12 -5
- package/src/ui/forms/SliderWithNumberField.stories.tsx +136 -0
- package/src/ui/{SliderWithNumberField.tsx → forms/SliderWithNumberField.tsx} +28 -7
- package/src/ui/{Switch.stories.tsx → forms/Switch.stories.tsx} +2 -2
- package/src/ui/{Switch.tsx → forms/Switch.tsx} +1 -1
- package/src/ui/{TabRadio.stories.tsx → forms/TabRadio.stories.tsx} +3 -3
- package/src/ui/{TabRadio.tsx → forms/TabRadio.tsx} +1 -1
- package/src/ui/{TextArea.stories.tsx → forms/TextArea.stories.tsx} +5 -3
- package/src/ui/{TextArea.tsx → forms/TextArea.tsx} +1 -1
- package/src/ui/forms/index.ts +15 -0
- package/src/ui/foundations/Anchor.stories.tsx +39 -0
- package/src/ui/foundations/Anchor.tsx +96 -0
- package/src/ui/foundations/CodeBlock.stories.tsx +86 -0
- package/src/ui/foundations/CodeBlock.tsx +148 -0
- package/src/ui/foundations/Colors.stories.tsx +80 -0
- package/src/ui/{Icon.stories.tsx → foundations/Icon.stories.tsx} +1 -1
- package/src/ui/{Icon.tsx → foundations/Icon.tsx} +1 -1
- package/src/ui/{IconRegistry.tsx → foundations/IconRegistry.tsx} +261 -57
- package/src/ui/foundations/SocialLinks.stories.tsx +38 -0
- package/src/ui/foundations/SocialLinks.tsx +117 -0
- package/src/ui/foundations/Typography.stories.tsx +58 -0
- package/src/ui/foundations/Typography.tsx +163 -0
- package/src/ui/foundations/index.ts +6 -0
- package/src/ui/index.ts +7 -27
- package/src/ui/layout/Accordion.stories.tsx +86 -0
- package/src/ui/layout/Accordion.tsx +205 -0
- package/src/ui/layout/Card.stories.tsx +151 -0
- package/src/ui/layout/Card.tsx +124 -0
- package/src/ui/layout/Collapsible.stories.tsx +54 -0
- package/src/ui/layout/Collapsible.tsx +54 -0
- package/src/ui/{Separator.stories.tsx → layout/Separator.stories.tsx} +2 -2
- package/src/ui/{Separator.tsx → layout/Separator.tsx} +1 -1
- package/src/ui/{SettingsPanel.stories.tsx → layout/SettingsPanel.stories.tsx} +5 -5
- package/src/ui/{SettingsPanel.tsx → layout/SettingsPanel.tsx} +33 -29
- package/src/ui/layout/index.ts +5 -0
- package/src/ui/media/Avatar.stories.tsx +89 -0
- package/src/ui/media/Avatar.tsx +122 -0
- package/src/ui/media/Dropzone.stories.tsx +95 -0
- package/src/ui/media/Dropzone.tsx +328 -0
- package/src/ui/media/FileUpload.stories.tsx +62 -0
- package/src/ui/media/FileUpload.tsx +175 -0
- package/src/ui/media/index.ts +3 -0
- package/src/ui/{AuthFormUI.stories.tsx → patterns/AuthFormUI.stories.tsx} +1 -1
- package/src/ui/{AuthFormUI.tsx → patterns/AuthFormUI.tsx} +24 -23
- package/src/ui/patterns/CopyButton.stories.tsx +77 -0
- package/src/ui/patterns/CopyButton.tsx +93 -0
- package/src/ui/patterns/SearchInput.stories.tsx +51 -0
- package/src/ui/patterns/SearchInput.tsx +93 -0
- package/src/ui/patterns/Stepper.stories.tsx +129 -0
- package/src/ui/patterns/Stepper.tsx +295 -0
- package/src/ui/{TabSelection.stories.tsx → patterns/TabSelection.stories.tsx} +1 -1
- package/src/ui/{TabSelection.tsx → patterns/TabSelection.tsx} +2 -2
- package/src/ui/patterns/index.ts +6 -0
- package/src/ui/patterns/useClipboard.ts +75 -0
- package/src/ui/types.ts +48 -0
- package/src/ui/Alert.stories.tsx +0 -41
- package/src/ui/Alert.tsx +0 -72
- package/src/ui/Anchor.stories.tsx +0 -25
- package/src/ui/Anchor.tsx +0 -32
- package/src/ui/Button.stories.tsx +0 -108
- package/src/ui/Button.tsx +0 -121
- package/src/ui/Collapsible.stories.tsx +0 -91
- package/src/ui/Collapsible.tsx +0 -52
- package/src/ui/Colors.stories.tsx +0 -67
- package/src/ui/Popover.tsx +0 -42
- package/src/ui/Skeleton.stories.tsx +0 -43
- package/src/ui/SliderWithNumberField.stories.tsx +0 -101
- package/src/ui/Typography.stories.tsx +0 -87
- package/src/ui/Typography.tsx +0 -80
package/dist/index.d.mts
CHANGED
|
@@ -1,51 +1,56 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import * as React$1 from 'react';
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
import * as React from 'react';
|
|
4
3
|
import React__default, { ReactNode, HTMLAttributes } from 'react';
|
|
5
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
-
import
|
|
5
|
+
import * as _base_ui_react from '@base-ui/react';
|
|
6
|
+
import { Button as Button$1, Field as Field$1, Dialog as Dialog$1, Popover as Popover$1 } from '@base-ui/react';
|
|
7
7
|
import { Separator as Separator$1 } from '@base-ui/react/separator';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Canonical Peerbots Brand Palette
|
|
11
|
+
*/
|
|
12
|
+
type BrandColor = "teal" | "pink" | "darkteal" | "darkblue" | "olive" | "dark" | "light" | "white";
|
|
13
|
+
/**
|
|
14
|
+
* Semantic Action & Status Intents
|
|
15
|
+
*/
|
|
16
|
+
type IntentColor = "primary" | "neutral" | "success" | "warning" | "danger" | "info";
|
|
17
|
+
/**
|
|
18
|
+
* Composite Color Token for UI Components
|
|
19
|
+
*/
|
|
20
|
+
type ComponentColor = IntentColor | BrandColor;
|
|
21
|
+
/**
|
|
22
|
+
* Visual Fill Style / Treatment
|
|
23
|
+
*/
|
|
24
|
+
type FillVariant = "solid" | "soft" | "outline" | "ghost" | "link";
|
|
25
|
+
/**
|
|
26
|
+
* Surface & Container Styles (Cards, Dialogs, Panels)
|
|
27
|
+
*/
|
|
28
|
+
type SurfaceVariant = "surface" | "outline" | "glass" | "flat";
|
|
29
|
+
/**
|
|
30
|
+
* Standard Sizing Scale
|
|
31
|
+
*/
|
|
32
|
+
type ComponentSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
33
|
+
/**
|
|
34
|
+
* Standard Geometric Border Radii
|
|
35
|
+
*/
|
|
36
|
+
type ComponentRadius = "none" | "sm" | "md" | "lg" | "2xl" | "pill";
|
|
26
37
|
|
|
27
|
-
|
|
28
|
-
label: string;
|
|
29
|
-
value: string | number;
|
|
30
|
-
}
|
|
31
|
-
interface SelectProps {
|
|
32
|
-
options: (string | SelectOption)[];
|
|
33
|
-
value?: string | number;
|
|
34
|
-
defaultValue?: string | number;
|
|
35
|
-
onChange?: (value: string | number | null, event: Event) => void;
|
|
36
|
-
disabled?: boolean;
|
|
37
|
-
placeholder?: string;
|
|
38
|
-
className?: string;
|
|
39
|
-
id?: string;
|
|
40
|
-
onFocus?: React__default.FocusEventHandler<HTMLButtonElement>;
|
|
41
|
-
}
|
|
42
|
-
declare const Select: React__default.ForwardRefExoticComponent<SelectProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
38
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
43
39
|
|
|
44
40
|
interface HeadingProps extends React__default.HTMLAttributes<HTMLHeadingElement> {
|
|
41
|
+
/** Semantic HTML heading level (h1 - h6) */
|
|
45
42
|
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
43
|
+
/** Visual heading scale override (defaults to level) */
|
|
44
|
+
size?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
45
|
+
/** Palette color or gradient text fill */
|
|
46
|
+
color?: BrandColor | "gradient" | "default";
|
|
47
|
+
/** Legacy variant prop (alias for color) */
|
|
48
|
+
variant?: BrandColor | "gradient" | "default";
|
|
49
|
+
/** Font weight */
|
|
50
|
+
weight?: "normal" | "medium" | "semibold" | "bold";
|
|
46
51
|
children?: React__default.ReactNode;
|
|
47
52
|
}
|
|
48
|
-
declare const Heading: ({ level, className, children, ...props }: HeadingProps) => React__default.DetailedReactHTMLElement<{
|
|
53
|
+
declare const Heading: ({ level, size, color, variant, weight, className, children, ...props }: HeadingProps) => React__default.DetailedReactHTMLElement<{
|
|
49
54
|
defaultChecked?: boolean | undefined;
|
|
50
55
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
51
56
|
suppressContentEditableWarning?: boolean | undefined;
|
|
@@ -83,7 +88,6 @@ declare const Heading: ({ level, className, children, ...props }: HeadingProps)
|
|
|
83
88
|
vocab?: string | undefined;
|
|
84
89
|
autoCorrect?: string | undefined;
|
|
85
90
|
autoSave?: string | undefined;
|
|
86
|
-
color?: string | undefined;
|
|
87
91
|
itemProp?: string | undefined;
|
|
88
92
|
itemScope?: boolean | undefined;
|
|
89
93
|
itemType?: string | undefined;
|
|
@@ -327,14 +331,21 @@ declare const Heading: ({ level, className, children, ...props }: HeadingProps)
|
|
|
327
331
|
className: string;
|
|
328
332
|
}, HTMLElement>;
|
|
329
333
|
interface TextProps extends React__default.HTMLAttributes<HTMLElement> {
|
|
330
|
-
|
|
334
|
+
/** HTML rendering tag */
|
|
331
335
|
as?: React__default.ElementType;
|
|
336
|
+
/** Typography scale */
|
|
337
|
+
size?: ComponentSize | "lead";
|
|
338
|
+
/** Text color / intent */
|
|
339
|
+
color?: ComponentColor | "muted" | "error" | "success" | "default";
|
|
340
|
+
/** Legacy variant prop for convenience / backward compatibility */
|
|
341
|
+
variant?: "default" | "muted" | "small" | "large" | "lead" | "error" | "success";
|
|
342
|
+
/** Font weight */
|
|
343
|
+
weight?: "normal" | "medium" | "semibold" | "bold";
|
|
344
|
+
/** Text alignment */
|
|
345
|
+
align?: "left" | "center" | "right";
|
|
332
346
|
children?: React__default.ReactNode;
|
|
333
347
|
}
|
|
334
|
-
declare const Text: ({
|
|
335
|
-
declare const TypographyList: ({ args }: {
|
|
336
|
-
args: Record<string, unknown>;
|
|
337
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
348
|
+
declare const Text: ({ as: Component, size, color, variant, weight, align, className, children, ...props }: TextProps) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>>;
|
|
338
349
|
|
|
339
350
|
/**
|
|
340
351
|
* Raw path data for icons, useful for non-React contexts (like PixiJS Graphics.svg)
|
|
@@ -393,6 +404,9 @@ declare const iconPaths: {
|
|
|
393
404
|
export: string;
|
|
394
405
|
home: string;
|
|
395
406
|
play: string;
|
|
407
|
+
star: string;
|
|
408
|
+
shield: string;
|
|
409
|
+
chat: string;
|
|
396
410
|
};
|
|
397
411
|
/**
|
|
398
412
|
* Icons that are complex React nodes
|
|
@@ -400,8 +414,31 @@ declare const iconPaths: {
|
|
|
400
414
|
declare const complexIcons: {
|
|
401
415
|
readonly eye: react_jsx_runtime.JSX.Element;
|
|
402
416
|
readonly google: react_jsx_runtime.JSX.Element;
|
|
417
|
+
readonly face: react_jsx_runtime.JSX.Element;
|
|
418
|
+
readonly mic: react_jsx_runtime.JSX.Element;
|
|
419
|
+
readonly brain: react_jsx_runtime.JSX.Element;
|
|
420
|
+
readonly user: react_jsx_runtime.JSX.Element;
|
|
421
|
+
readonly users: react_jsx_runtime.JSX.Element;
|
|
422
|
+
readonly globe: react_jsx_runtime.JSX.Element;
|
|
423
|
+
readonly devices: react_jsx_runtime.JSX.Element;
|
|
424
|
+
readonly volume: react_jsx_runtime.JSX.Element;
|
|
425
|
+
readonly sliders: react_jsx_runtime.JSX.Element;
|
|
426
|
+
readonly joystick: react_jsx_runtime.JSX.Element;
|
|
427
|
+
readonly book: react_jsx_runtime.JSX.Element;
|
|
428
|
+
readonly store: react_jsx_runtime.JSX.Element;
|
|
429
|
+
readonly award: react_jsx_runtime.JSX.Element;
|
|
430
|
+
readonly headset: react_jsx_runtime.JSX.Element;
|
|
431
|
+
readonly layout: react_jsx_runtime.JSX.Element;
|
|
432
|
+
readonly video: react_jsx_runtime.JSX.Element;
|
|
433
|
+
readonly facebook: react_jsx_runtime.JSX.Element;
|
|
434
|
+
readonly instagram: react_jsx_runtime.JSX.Element;
|
|
435
|
+
readonly linkedin: react_jsx_runtime.JSX.Element;
|
|
436
|
+
readonly twitter: react_jsx_runtime.JSX.Element;
|
|
437
|
+
readonly youtube: react_jsx_runtime.JSX.Element;
|
|
438
|
+
readonly bluesky: react_jsx_runtime.JSX.Element;
|
|
439
|
+
readonly github: react_jsx_runtime.JSX.Element;
|
|
403
440
|
};
|
|
404
|
-
type IconName = keyof typeof iconPaths | keyof typeof complexIcons;
|
|
441
|
+
type IconName = keyof typeof iconPaths | keyof typeof complexIcons | "smile" | "avatar" | "voice" | "audio" | "speech" | "expert" | "profile" | "world" | "language" | "screen" | "laptop" | "sound" | "speaker" | "tune" | "adjust" | "message" | "team" | "group" | "motion" | "gamepad" | "curriculum" | "learning" | "education" | "marketplace" | "security" | "privacy" | "badge" | "certificate" | "support" | "help" | "x-brand" | "bsky";
|
|
405
442
|
|
|
406
443
|
interface IconProps extends React__default.SVGProps<SVGSVGElement> {
|
|
407
444
|
size?: "sm" | "md" | "lg" | "xl";
|
|
@@ -409,7 +446,124 @@ interface IconProps extends React__default.SVGProps<SVGSVGElement> {
|
|
|
409
446
|
}
|
|
410
447
|
declare const Icon: React__default.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
411
448
|
|
|
412
|
-
interface
|
|
449
|
+
interface SocialLinkItem {
|
|
450
|
+
name: string;
|
|
451
|
+
url: string;
|
|
452
|
+
ariaLabel?: string;
|
|
453
|
+
icon?: IconName;
|
|
454
|
+
}
|
|
455
|
+
declare const DEFAULT_PEERBOTS_SOCIAL_LINKS: SocialLinkItem[];
|
|
456
|
+
interface SocialLinksProps {
|
|
457
|
+
className?: string;
|
|
458
|
+
links?: SocialLinkItem[];
|
|
459
|
+
size?: "sm" | "md" | "lg";
|
|
460
|
+
variant?: "default" | "white" | "teal" | "dark" | "muted";
|
|
461
|
+
}
|
|
462
|
+
declare const SocialLinks: React__default.FC<SocialLinksProps>;
|
|
463
|
+
|
|
464
|
+
interface CodeBlockProps {
|
|
465
|
+
/** The code string to display */
|
|
466
|
+
code: string;
|
|
467
|
+
/** Programming language for syntax/badge (e.g. bash, tsx, json) */
|
|
468
|
+
language?: string;
|
|
469
|
+
/** Optional file name displayed in the window header */
|
|
470
|
+
fileName?: string;
|
|
471
|
+
/** Whether to show line numbers */
|
|
472
|
+
showLineNumbers?: boolean;
|
|
473
|
+
/** Style variant: 'default' (clean block) or 'window' (macOS window with colored dots) */
|
|
474
|
+
variant?: "default" | "window" | "flat";
|
|
475
|
+
/** Whether to show the copy button */
|
|
476
|
+
showCopyButton?: boolean;
|
|
477
|
+
className?: string;
|
|
478
|
+
}
|
|
479
|
+
declare const CodeBlock: React__default.FC<CodeBlockProps>;
|
|
480
|
+
|
|
481
|
+
interface AnchorProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
482
|
+
/**
|
|
483
|
+
* Palette color or semantic intent.
|
|
484
|
+
* @default "default"
|
|
485
|
+
*/
|
|
486
|
+
color?: ComponentColor | "muted" | "default";
|
|
487
|
+
/**
|
|
488
|
+
* Underline text decoration control.
|
|
489
|
+
* @default "hover"
|
|
490
|
+
*/
|
|
491
|
+
underline?: "hover" | "always" | "none";
|
|
492
|
+
/**
|
|
493
|
+
* Interaction style variant.
|
|
494
|
+
* @default "default"
|
|
495
|
+
*/
|
|
496
|
+
variant?: "default" | "ghost";
|
|
497
|
+
/** Polymorphic component wrapper (e.g. react-router Link, Next.js Link) */
|
|
498
|
+
as?: React.ElementType;
|
|
499
|
+
/** Custom render prop */
|
|
500
|
+
render?: (props: React.AnchorHTMLAttributes<HTMLAnchorElement>) => React.ReactElement;
|
|
501
|
+
}
|
|
502
|
+
type LinkProps = AnchorProps;
|
|
503
|
+
declare const Anchor: React.ForwardRefExoticComponent<AnchorProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
504
|
+
declare const Link: React.ForwardRefExoticComponent<AnchorProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
505
|
+
|
|
506
|
+
type ButtonVariant = FillVariant | "primary" | "secondary" | "danger" | "ghostly-danger" | "marketing-teal" | "marketing-pink" | "teal" | "pink";
|
|
507
|
+
interface ButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement | HTMLAnchorElement> {
|
|
508
|
+
/**
|
|
509
|
+
* Visual fill style / treatment or legacy variant.
|
|
510
|
+
* @default "solid"
|
|
511
|
+
*/
|
|
512
|
+
variant?: ButtonVariant;
|
|
513
|
+
/**
|
|
514
|
+
* Palette color or semantic intent.
|
|
515
|
+
* @default "primary"
|
|
516
|
+
*/
|
|
517
|
+
color?: ComponentColor;
|
|
518
|
+
/**
|
|
519
|
+
* Button scale / padding.
|
|
520
|
+
* @default "md"
|
|
521
|
+
*/
|
|
522
|
+
size?: ComponentSize;
|
|
523
|
+
/**
|
|
524
|
+
* Border radius geometry.
|
|
525
|
+
* @default "md" (rounded-xl)
|
|
526
|
+
*/
|
|
527
|
+
radius?: ComponentRadius;
|
|
528
|
+
/** Loading spinner indicator state */
|
|
529
|
+
isLoading?: boolean;
|
|
530
|
+
/** Icon placed before children */
|
|
531
|
+
leftIcon?: React__default.ReactNode;
|
|
532
|
+
/** Icon placed after children */
|
|
533
|
+
rightIcon?: React__default.ReactNode;
|
|
534
|
+
render?: Button$1.Props["render"];
|
|
535
|
+
nativeButton?: boolean;
|
|
536
|
+
isIconOnly?: boolean;
|
|
537
|
+
href?: string;
|
|
538
|
+
target?: string;
|
|
539
|
+
rel?: string;
|
|
540
|
+
}
|
|
541
|
+
declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
542
|
+
|
|
543
|
+
interface InputProps extends React__default.InputHTMLAttributes<HTMLInputElement> {
|
|
544
|
+
leftIcon?: React__default.ReactNode;
|
|
545
|
+
rightIcon?: React__default.ReactNode;
|
|
546
|
+
}
|
|
547
|
+
declare const Input: React__default.ForwardRefExoticComponent<InputProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
548
|
+
|
|
549
|
+
interface SelectOption {
|
|
550
|
+
label: string;
|
|
551
|
+
value: string | number;
|
|
552
|
+
}
|
|
553
|
+
interface SelectProps extends React__default.AriaAttributes {
|
|
554
|
+
options: (string | SelectOption)[];
|
|
555
|
+
value?: string | number;
|
|
556
|
+
defaultValue?: string | number;
|
|
557
|
+
onChange?: (value: string | number | null, event: Event) => void;
|
|
558
|
+
disabled?: boolean;
|
|
559
|
+
placeholder?: string;
|
|
560
|
+
className?: string;
|
|
561
|
+
id?: string;
|
|
562
|
+
onFocus?: React__default.FocusEventHandler<HTMLButtonElement>;
|
|
563
|
+
}
|
|
564
|
+
declare const Select: React__default.ForwardRefExoticComponent<SelectProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
565
|
+
|
|
566
|
+
interface SliderProps extends React__default.AriaAttributes {
|
|
413
567
|
min?: number;
|
|
414
568
|
max?: number;
|
|
415
569
|
step?: number;
|
|
@@ -420,10 +574,11 @@ interface SliderProps {
|
|
|
420
574
|
className?: string;
|
|
421
575
|
name?: string;
|
|
422
576
|
icon?: React__default.ReactNode;
|
|
577
|
+
id?: string;
|
|
423
578
|
}
|
|
424
579
|
declare const Slider: React__default.ForwardRefExoticComponent<SliderProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
425
580
|
|
|
426
|
-
interface SliderWithNumberFieldProps {
|
|
581
|
+
interface SliderWithNumberFieldProps extends React__default.AriaAttributes {
|
|
427
582
|
min?: number;
|
|
428
583
|
max?: number;
|
|
429
584
|
step?: number;
|
|
@@ -433,47 +588,11 @@ interface SliderWithNumberFieldProps {
|
|
|
433
588
|
onChange?: (value: number, event: Event) => void;
|
|
434
589
|
className?: string;
|
|
435
590
|
inputWidth?: string;
|
|
591
|
+
showButtons?: boolean;
|
|
592
|
+
id?: string;
|
|
436
593
|
}
|
|
437
594
|
declare const SliderWithNumberField: React__default.ForwardRefExoticComponent<SliderWithNumberFieldProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
438
595
|
|
|
439
|
-
interface TooltipProps {
|
|
440
|
-
content: React__default.ReactNode;
|
|
441
|
-
children: React__default.ReactNode;
|
|
442
|
-
className?: string;
|
|
443
|
-
delay?: "normal" | "slow";
|
|
444
|
-
}
|
|
445
|
-
declare function Tooltip({ content, children, className, delay, }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
446
|
-
interface HelperTooltipProps {
|
|
447
|
-
content: React__default.ReactNode;
|
|
448
|
-
className?: string;
|
|
449
|
-
}
|
|
450
|
-
declare function HelperTooltip({ content, className }: HelperTooltipProps): react_jsx_runtime.JSX.Element;
|
|
451
|
-
|
|
452
|
-
declare function cn(...inputs: ClassValue[]): string;
|
|
453
|
-
|
|
454
|
-
interface DialogProps {
|
|
455
|
-
open?: boolean;
|
|
456
|
-
onOpenChange?: (open: boolean, event?: Event) => void;
|
|
457
|
-
trigger?: React__default.ReactNode;
|
|
458
|
-
children: React__default.ReactNode;
|
|
459
|
-
className?: string;
|
|
460
|
-
}
|
|
461
|
-
declare function Dialog({ open, onOpenChange, trigger, children, className, }: DialogProps): react_jsx_runtime.JSX.Element;
|
|
462
|
-
declare const DialogTitle: (props: React__default.ComponentProps<typeof Dialog$1.Title>) => react_jsx_runtime.JSX.Element;
|
|
463
|
-
declare const DialogDescription: (props: React__default.ComponentProps<typeof Dialog$1.Description>) => react_jsx_runtime.JSX.Element;
|
|
464
|
-
declare const DialogClose: (props: React__default.ComponentProps<typeof Dialog$1.Close>) => react_jsx_runtime.JSX.Element;
|
|
465
|
-
|
|
466
|
-
interface PopoverProps {
|
|
467
|
-
trigger: React__default.ReactNode;
|
|
468
|
-
children: React__default.ReactNode;
|
|
469
|
-
side?: "top" | "right" | "bottom" | "left";
|
|
470
|
-
align?: "start" | "center" | "end";
|
|
471
|
-
className?: string;
|
|
472
|
-
open?: boolean;
|
|
473
|
-
onOpenChange?: (open: boolean) => void;
|
|
474
|
-
}
|
|
475
|
-
declare function Popover({ trigger, children, side, align, className, open, onOpenChange, }: PopoverProps): react_jsx_runtime.JSX.Element;
|
|
476
|
-
|
|
477
596
|
interface DropdownProps {
|
|
478
597
|
trigger: React__default.ReactNode;
|
|
479
598
|
children: React__default.ReactNode;
|
|
@@ -484,18 +603,6 @@ declare function Dropdown({ trigger, children, align, className, }: DropdownProp
|
|
|
484
603
|
declare const DropdownItem: React__default.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.ContextMenuItemProps, "ref"> & React__default.RefAttributes<HTMLElement>, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
485
604
|
declare const DropdownSeparator: React__default.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.SeparatorProps, "ref"> & React__default.RefAttributes<HTMLDivElement>, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
486
605
|
|
|
487
|
-
interface CollapsibleProps {
|
|
488
|
-
title: React__default.ReactNode;
|
|
489
|
-
children: React__default.ReactNode;
|
|
490
|
-
/** The variant of the trigger button */
|
|
491
|
-
variant?: ButtonProps["variant"];
|
|
492
|
-
/** The size of the trigger button */
|
|
493
|
-
size?: ButtonProps["size"];
|
|
494
|
-
defaultOpen?: boolean;
|
|
495
|
-
className?: string;
|
|
496
|
-
}
|
|
497
|
-
declare function Collapsible({ title, children, variant, size, defaultOpen, className, }: CollapsibleProps): react_jsx_runtime.JSX.Element;
|
|
498
|
-
|
|
499
606
|
interface SwitchProps extends React__default.AriaAttributes {
|
|
500
607
|
checked?: boolean;
|
|
501
608
|
defaultChecked?: boolean;
|
|
@@ -514,17 +621,6 @@ interface LabelProps extends React__default.LabelHTMLAttributes<HTMLLabelElement
|
|
|
514
621
|
}
|
|
515
622
|
declare function Label({ children, tooltip, className, ...props }: LabelProps): react_jsx_runtime.JSX.Element;
|
|
516
623
|
|
|
517
|
-
interface BasePanelProps {
|
|
518
|
-
title: string;
|
|
519
|
-
children: ReactNode;
|
|
520
|
-
onClose?: () => void;
|
|
521
|
-
className?: string;
|
|
522
|
-
headerClassName?: string;
|
|
523
|
-
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
524
|
-
setPanel: (panel: string) => void;
|
|
525
|
-
}
|
|
526
|
-
declare function BasePanel({ title, children, onClose, className, headerClassName, headingLevel, setPanel }: BasePanelProps): react_jsx_runtime.JSX.Element;
|
|
527
|
-
|
|
528
624
|
interface TabRadioOption<T extends string> {
|
|
529
625
|
value: T;
|
|
530
626
|
label: ReactNode;
|
|
@@ -540,7 +636,7 @@ interface TabRadioProps<T extends string> {
|
|
|
540
636
|
}
|
|
541
637
|
declare function TabRadio<T extends string>({ options, value, onChange, className, variant, "aria-label": ariaLabel, }: TabRadioProps<T>): react_jsx_runtime.JSX.Element;
|
|
542
638
|
|
|
543
|
-
interface NumberFieldProps {
|
|
639
|
+
interface NumberFieldProps extends React__default.AriaAttributes {
|
|
544
640
|
value?: number | null;
|
|
545
641
|
defaultValue?: number;
|
|
546
642
|
min?: number;
|
|
@@ -572,15 +668,150 @@ interface FieldProps extends Field$1.Root.Props {
|
|
|
572
668
|
*/
|
|
573
669
|
declare const Field: React__default.ForwardRefExoticComponent<Omit<FieldProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
574
670
|
|
|
575
|
-
type AnchorProps = React$1.AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
576
|
-
declare const Anchor: React$1.ForwardRefExoticComponent<AnchorProps & React$1.RefAttributes<HTMLAnchorElement>>;
|
|
577
|
-
|
|
578
671
|
type TextAreaProps = React__default.TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
579
672
|
declare const TextArea: React__default.ForwardRefExoticComponent<TextAreaProps & React__default.RefAttributes<HTMLTextAreaElement>>;
|
|
580
673
|
|
|
581
674
|
type CheckboxProps = React__default.InputHTMLAttributes<HTMLInputElement>;
|
|
582
675
|
declare const Checkbox: React__default.ForwardRefExoticComponent<CheckboxProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
583
676
|
|
|
677
|
+
type PeerbotsColor = "Light Blue" | "Blue" | "Green" | "Red" | "Purple" | "Pink" | "Yellow" | "Orange" | "Grey" | "Black" | "White";
|
|
678
|
+
declare const PEERBOTS_COLOR_MAP: Record<PeerbotsColor, string>;
|
|
679
|
+
declare const PEERBOTS_FONT_COLOR_MAP: Record<PeerbotsColor, string>;
|
|
680
|
+
interface PeerbotsColorSelectorProps {
|
|
681
|
+
selectedColor?: PeerbotsColor | string;
|
|
682
|
+
onColorSelect: (color: PeerbotsColor) => void;
|
|
683
|
+
colors?: PeerbotsColor[];
|
|
684
|
+
size?: "sm" | "md" | "lg";
|
|
685
|
+
className?: string;
|
|
686
|
+
ariaLabelPrefix?: string;
|
|
687
|
+
}
|
|
688
|
+
declare function PeerbotsColorSelector({ selectedColor, onColorSelect, colors, size, className, ariaLabelPrefix, }: PeerbotsColorSelectorProps): react_jsx_runtime.JSX.Element;
|
|
689
|
+
|
|
690
|
+
interface ChipOption<T = string> {
|
|
691
|
+
value: T;
|
|
692
|
+
label: React__default.ReactNode;
|
|
693
|
+
badge?: React__default.ReactNode;
|
|
694
|
+
disabled?: boolean;
|
|
695
|
+
icon?: React__default.ReactNode;
|
|
696
|
+
}
|
|
697
|
+
interface ChipGroupProps<T = string> {
|
|
698
|
+
/** Array of selectable chip options */
|
|
699
|
+
options: ChipOption<T>[];
|
|
700
|
+
/** Controlled single selected value */
|
|
701
|
+
value?: T;
|
|
702
|
+
/** Uncontrolled initial single selected value */
|
|
703
|
+
defaultValue?: T;
|
|
704
|
+
/** Callback fired when single selection changes */
|
|
705
|
+
onChange?: (value: T) => void;
|
|
706
|
+
/** Enable multiple selection mode */
|
|
707
|
+
multiple?: boolean;
|
|
708
|
+
/** Controlled array of selected values (for multi mode) */
|
|
709
|
+
values?: T[];
|
|
710
|
+
/** Uncontrolled initial array of selected values (for multi mode) */
|
|
711
|
+
defaultValues?: T[];
|
|
712
|
+
/** Callback fired when multiple selection changes */
|
|
713
|
+
onMultipleChange?: (values: T[]) => void;
|
|
714
|
+
/** Color theme */
|
|
715
|
+
color?: ComponentColor;
|
|
716
|
+
/** Visual fill style */
|
|
717
|
+
variant?: "solid" | "soft" | "outline";
|
|
718
|
+
/** Size scale */
|
|
719
|
+
size?: ComponentSize;
|
|
720
|
+
/** Border radius scale */
|
|
721
|
+
radius?: ComponentRadius;
|
|
722
|
+
/** Enable horizontal scrollable rail */
|
|
723
|
+
scrollable?: boolean;
|
|
724
|
+
className?: string;
|
|
725
|
+
id?: string;
|
|
726
|
+
name?: string;
|
|
727
|
+
}
|
|
728
|
+
declare function ChipGroup<T = string>({ options, value: controlledValue, defaultValue, onChange, multiple, values: controlledValues, defaultValues, onMultipleChange, color, variant, size, radius, scrollable, className, id, name, }: ChipGroupProps<T>): react_jsx_runtime.JSX.Element;
|
|
729
|
+
|
|
730
|
+
interface CardProps extends React__default.HTMLAttributes<HTMLElement> {
|
|
731
|
+
children: React__default.ReactNode;
|
|
732
|
+
/**
|
|
733
|
+
* Surface treatment / fill style.
|
|
734
|
+
* @default "surface"
|
|
735
|
+
*/
|
|
736
|
+
variant?: SurfaceVariant | "default" | "elevated";
|
|
737
|
+
/**
|
|
738
|
+
* Background color tinting.
|
|
739
|
+
* @default "default"
|
|
740
|
+
*/
|
|
741
|
+
color?: "default" | "teal" | "pink";
|
|
742
|
+
/**
|
|
743
|
+
* Card padding scale.
|
|
744
|
+
* @default "md"
|
|
745
|
+
*/
|
|
746
|
+
padding?: "none" | ComponentSize;
|
|
747
|
+
/**
|
|
748
|
+
* Border radius scale.
|
|
749
|
+
* @default "2xl"
|
|
750
|
+
*/
|
|
751
|
+
radius?: ComponentRadius;
|
|
752
|
+
/** Whether the card shows interactive hover elevation */
|
|
753
|
+
hoverable?: boolean;
|
|
754
|
+
id?: string;
|
|
755
|
+
as?: React__default.ElementType;
|
|
756
|
+
href?: string;
|
|
757
|
+
target?: string;
|
|
758
|
+
rel?: string;
|
|
759
|
+
}
|
|
760
|
+
declare const Card: React__default.ForwardRefExoticComponent<CardProps & React__default.RefAttributes<HTMLElement>>;
|
|
761
|
+
|
|
762
|
+
interface AccordionItem {
|
|
763
|
+
id?: string;
|
|
764
|
+
question?: React__default.ReactNode;
|
|
765
|
+
title?: React__default.ReactNode;
|
|
766
|
+
answer?: React__default.ReactNode;
|
|
767
|
+
content?: React__default.ReactNode;
|
|
768
|
+
description?: React__default.ReactNode;
|
|
769
|
+
bodyHtml?: string;
|
|
770
|
+
isOpenDefault?: boolean;
|
|
771
|
+
}
|
|
772
|
+
interface AccordionProps {
|
|
773
|
+
/** List of accordion items for multi-item list mode */
|
|
774
|
+
items?: AccordionItem[];
|
|
775
|
+
/** Allow multiple items to be opened simultaneously */
|
|
776
|
+
allowMultiple?: boolean;
|
|
777
|
+
/** Visual style variant */
|
|
778
|
+
variant?: "default" | "bordered" | "flat";
|
|
779
|
+
/** Single-item mode: title for the disclosure */
|
|
780
|
+
title?: React__default.ReactNode;
|
|
781
|
+
/** Single-item mode: content/children for the disclosure */
|
|
782
|
+
children?: React__default.ReactNode;
|
|
783
|
+
/** Single-item mode: default open state */
|
|
784
|
+
defaultOpen?: boolean;
|
|
785
|
+
/** Controlled open state for single-item mode */
|
|
786
|
+
isOpen?: boolean;
|
|
787
|
+
/** Controlled toggle callback for single-item mode */
|
|
788
|
+
onToggle?: (open: boolean) => void;
|
|
789
|
+
className?: string;
|
|
790
|
+
headerClassName?: string;
|
|
791
|
+
contentClassName?: string;
|
|
792
|
+
}
|
|
793
|
+
declare const Accordion: React__default.FC<AccordionProps>;
|
|
794
|
+
|
|
795
|
+
interface CollapsibleProps {
|
|
796
|
+
title: React__default.ReactNode;
|
|
797
|
+
children: React__default.ReactNode;
|
|
798
|
+
/** The variant of the trigger or panel */
|
|
799
|
+
variant?: ButtonProps["variant"] | "default" | "bordered" | "flat";
|
|
800
|
+
/** The size of the trigger button */
|
|
801
|
+
size?: ButtonProps["size"];
|
|
802
|
+
defaultOpen?: boolean;
|
|
803
|
+
isOpen?: boolean;
|
|
804
|
+
onToggle?: (open: boolean) => void;
|
|
805
|
+
className?: string;
|
|
806
|
+
}
|
|
807
|
+
declare function Collapsible({ title, children, variant, defaultOpen, isOpen: controlledIsOpen, onToggle, className, }: CollapsibleProps): react_jsx_runtime.JSX.Element;
|
|
808
|
+
|
|
809
|
+
interface SeparatorProps extends React.ComponentPropsWithoutRef<typeof Separator$1> {
|
|
810
|
+
orientation?: "horizontal" | "vertical";
|
|
811
|
+
className?: string;
|
|
812
|
+
}
|
|
813
|
+
declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
814
|
+
|
|
584
815
|
interface SettingsPanelProps {
|
|
585
816
|
/** The title of the section */
|
|
586
817
|
title?: ReactNode;
|
|
@@ -599,21 +830,217 @@ interface SettingsPanelProps {
|
|
|
599
830
|
}
|
|
600
831
|
/**
|
|
601
832
|
* A standardized panel for settings sections.
|
|
602
|
-
*
|
|
833
|
+
* Built on top of Card and Collapsible for design system consistency.
|
|
603
834
|
*/
|
|
604
835
|
declare function SettingsPanel({ title, children, className, contentClassName, collapsible, defaultOpen, headingLevel, }: SettingsPanelProps): react_jsx_runtime.JSX.Element;
|
|
605
836
|
|
|
606
|
-
interface
|
|
607
|
-
|
|
837
|
+
interface AvatarProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
838
|
+
/** Image source URL. */
|
|
839
|
+
src?: string | null;
|
|
840
|
+
/** Full name of the user, maker, or robot. Used to generate initials and accessible label. */
|
|
841
|
+
name?: string;
|
|
842
|
+
/** Accessible alt text for the avatar image. Defaults to `name` or `"Avatar"`. */
|
|
843
|
+
alt?: string;
|
|
844
|
+
/** Size variant. Defaults to `"md"`. */
|
|
845
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
846
|
+
/** Shape of the avatar. Defaults to `"circle"`. */
|
|
847
|
+
shape?: "circle" | "rounded";
|
|
848
|
+
/** Custom fallback icon if no image or initials are available. */
|
|
849
|
+
fallbackIcon?: React__default.ReactNode;
|
|
850
|
+
}
|
|
851
|
+
declare const Avatar: React__default.ForwardRefExoticComponent<AvatarProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
852
|
+
|
|
853
|
+
interface DropzoneProps {
|
|
854
|
+
/** Accepted MIME types or extensions (e.g. `"image/*"`, `"video/*"`, `".zip"`). */
|
|
855
|
+
accept?: string;
|
|
856
|
+
/** Maximum file size allowed in Megabytes (MB). */
|
|
857
|
+
maxSizeMB?: number;
|
|
858
|
+
/** Whether the dropzone is disabled. */
|
|
859
|
+
disabled?: boolean;
|
|
860
|
+
/**
|
|
861
|
+
* Optional controlled URL or data URL of an uploaded file to display in preview mode.
|
|
862
|
+
* If not provided, Dropzone will automatically generate and display a preview for selected images/videos.
|
|
863
|
+
*/
|
|
864
|
+
previewUrl?: string | null;
|
|
865
|
+
/** Optional controlled File object. */
|
|
866
|
+
value?: File | null;
|
|
867
|
+
/** Whether to automatically show a preview when an image/video is selected. Default is `true`. */
|
|
868
|
+
showPreview?: boolean;
|
|
869
|
+
/** How to render the preview. Default is `"auto"`. */
|
|
870
|
+
previewType?: "image" | "video" | "auto";
|
|
871
|
+
/** Main callout title. Default is `"Click or drag file to upload"`. */
|
|
872
|
+
title?: React__default.ReactNode;
|
|
873
|
+
/** Subtitle or requirement text. Default is `"Supported formats: PNG, JPG, WEBP, MP4"`. */
|
|
874
|
+
subtitle?: React__default.ReactNode;
|
|
875
|
+
/** Custom icon for the dropzone idle state. */
|
|
876
|
+
icon?: React__default.ReactNode;
|
|
877
|
+
/** Callback fired when a valid file is dropped or selected. */
|
|
878
|
+
onFileSelect?: (file: File) => void;
|
|
879
|
+
/** Callback fired when the active file/preview is cleared. */
|
|
880
|
+
onFileRemove?: () => void;
|
|
881
|
+
/** Callback fired when a file exceeds size limit or validation fails. */
|
|
882
|
+
onError?: (errorMessage: string) => void;
|
|
883
|
+
/** Optional custom CSS classes for the root dropzone container. */
|
|
884
|
+
className?: string;
|
|
885
|
+
id?: string;
|
|
886
|
+
name?: string;
|
|
887
|
+
}
|
|
888
|
+
declare const Dropzone: React__default.ForwardRefExoticComponent<DropzoneProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
889
|
+
|
|
890
|
+
interface FileUploadProps {
|
|
891
|
+
/** Accepted file types (e.g. `"image/*"`, `".pdf"`, `"audio/*"`). */
|
|
892
|
+
accept?: string;
|
|
893
|
+
/** Whether multiple files can be selected. */
|
|
894
|
+
multiple?: boolean;
|
|
895
|
+
/** Whether the input is disabled. */
|
|
896
|
+
disabled?: boolean;
|
|
897
|
+
/** Maximum allowable file size in bytes. */
|
|
898
|
+
maxSizeBytes?: number;
|
|
899
|
+
/** Text displayed inside the trigger button. Default is `"Choose File"`. */
|
|
900
|
+
buttonText?: React__default.ReactNode;
|
|
901
|
+
/** Button style variant. Default is `"secondary"`. */
|
|
902
|
+
buttonVariant?: ButtonProps["variant"];
|
|
903
|
+
/** Button size. Default is `"md"`. */
|
|
904
|
+
buttonSize?: ButtonProps["size"];
|
|
905
|
+
/** Icon shown inside the button. Default is `<Icon name="arrowUpTray" />`. */
|
|
906
|
+
buttonIcon?: React__default.ReactNode;
|
|
907
|
+
/** Text shown when no file has been chosen. Default is `"No file chosen"`. */
|
|
908
|
+
placeholder?: string;
|
|
909
|
+
/** Whether to show a clear/remove button when files are selected. Default is `true`. */
|
|
910
|
+
clearable?: boolean;
|
|
911
|
+
/** Controlled file(s) value. */
|
|
912
|
+
value?: File | File[] | null;
|
|
913
|
+
/** Callback fired when file selection changes. */
|
|
914
|
+
onChange?: (files: File | File[] | null) => void;
|
|
915
|
+
/** Callback fired when a file exceeds size limit or validation fails. */
|
|
916
|
+
onError?: (errorMessage: string) => void;
|
|
917
|
+
/** Optional custom CSS classes. */
|
|
918
|
+
className?: string;
|
|
919
|
+
id?: string;
|
|
920
|
+
name?: string;
|
|
921
|
+
}
|
|
922
|
+
declare const FileUpload: React__default.ForwardRefExoticComponent<FileUploadProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
923
|
+
|
|
924
|
+
interface TooltipProps {
|
|
925
|
+
content: React__default.ReactNode;
|
|
926
|
+
children: React__default.ReactNode;
|
|
927
|
+
className?: string;
|
|
928
|
+
delay?: "normal" | "slow";
|
|
929
|
+
}
|
|
930
|
+
declare function Tooltip({ content, children, className, delay, }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
931
|
+
interface HelperTooltipProps {
|
|
932
|
+
content: React__default.ReactNode;
|
|
933
|
+
className?: string;
|
|
934
|
+
}
|
|
935
|
+
declare function HelperTooltip({ content, className }: HelperTooltipProps): react_jsx_runtime.JSX.Element;
|
|
936
|
+
|
|
937
|
+
interface DialogProps {
|
|
938
|
+
open?: boolean;
|
|
939
|
+
onOpenChange?: (open: boolean, event?: Event) => void;
|
|
940
|
+
trigger?: React__default.ReactNode;
|
|
941
|
+
children: React__default.ReactNode;
|
|
942
|
+
className?: string;
|
|
943
|
+
}
|
|
944
|
+
declare function Dialog({ open, onOpenChange, trigger, children, className, }: DialogProps): react_jsx_runtime.JSX.Element;
|
|
945
|
+
declare const DialogTitle: (props: React__default.ComponentProps<typeof Dialog$1.Title>) => react_jsx_runtime.JSX.Element;
|
|
946
|
+
declare const DialogDescription: (props: React__default.ComponentProps<typeof Dialog$1.Description>) => react_jsx_runtime.JSX.Element;
|
|
947
|
+
declare const DialogClose: (props: React__default.ComponentProps<typeof Dialog$1.Close>) => react_jsx_runtime.JSX.Element;
|
|
948
|
+
|
|
949
|
+
interface PopoverProps {
|
|
950
|
+
/** The element that triggers the popover when clicked */
|
|
951
|
+
trigger: React__default.ReactNode;
|
|
952
|
+
/** Popover body content */
|
|
953
|
+
children: React__default.ReactNode;
|
|
954
|
+
/** Optional header title */
|
|
955
|
+
title?: React__default.ReactNode;
|
|
956
|
+
/** Controlled open state */
|
|
957
|
+
open?: boolean;
|
|
958
|
+
/** Initial open state in uncontrolled mode */
|
|
959
|
+
defaultOpen?: boolean;
|
|
960
|
+
/** Callback fired when open state changes */
|
|
961
|
+
onOpenChange?: (open: boolean) => void;
|
|
962
|
+
/** Side where the popover appears */
|
|
963
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
964
|
+
/** Alignment relative to the trigger */
|
|
965
|
+
align?: "start" | "center" | "end";
|
|
966
|
+
/** Distance from the trigger in pixels */
|
|
967
|
+
sideOffset?: number;
|
|
968
|
+
/** Surface visual variant */
|
|
969
|
+
variant?: SurfaceVariant | "default";
|
|
970
|
+
/** Whether to show a close button in the header */
|
|
971
|
+
showCloseButton?: boolean;
|
|
972
|
+
/** Whether to display a pointing arrow */
|
|
973
|
+
showArrow?: boolean;
|
|
608
974
|
className?: string;
|
|
609
975
|
}
|
|
610
|
-
declare
|
|
976
|
+
declare function Popover({ trigger, children, title, open, defaultOpen, onOpenChange, side, align, sideOffset, variant, showCloseButton, showArrow, className, }: PopoverProps): react_jsx_runtime.JSX.Element;
|
|
977
|
+
declare const PopoverTitle: (props: React__default.ComponentProps<typeof Popover$1.Title>) => react_jsx_runtime.JSX.Element;
|
|
978
|
+
declare const PopoverDescription: (props: React__default.ComponentProps<typeof Popover$1.Description>) => react_jsx_runtime.JSX.Element;
|
|
979
|
+
declare const PopoverClose: (props: React__default.ComponentProps<typeof Popover$1.Close>) => react_jsx_runtime.JSX.Element;
|
|
611
980
|
|
|
612
981
|
interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
613
982
|
className?: string;
|
|
614
983
|
}
|
|
615
984
|
declare function Skeleton({ className, ...props }: SkeletonProps): react_jsx_runtime.JSX.Element;
|
|
616
985
|
|
|
986
|
+
type AlertLevel = "Error" | "Warning" | "Success" | "Info";
|
|
987
|
+
type AlertColor = "danger" | "warning" | "success" | "info" | "neutral";
|
|
988
|
+
interface AlertAction {
|
|
989
|
+
name: string;
|
|
990
|
+
callback: () => void;
|
|
991
|
+
}
|
|
992
|
+
interface AlertUIProps {
|
|
993
|
+
/** Alert semantic color */
|
|
994
|
+
color?: AlertColor;
|
|
995
|
+
/** Legacy level prop for backward compatibility */
|
|
996
|
+
level?: AlertLevel;
|
|
997
|
+
/** Visual style variant */
|
|
998
|
+
variant?: "soft" | "outline" | "solid";
|
|
999
|
+
/** Optional alert title */
|
|
1000
|
+
title?: React__default.ReactNode;
|
|
1001
|
+
/** Alert message body */
|
|
1002
|
+
message?: React__default.ReactNode;
|
|
1003
|
+
/** Children as alternative to message */
|
|
1004
|
+
children?: React__default.ReactNode;
|
|
1005
|
+
/** Optional action button */
|
|
1006
|
+
action?: AlertAction;
|
|
1007
|
+
/** Callback fired when alert is dismissed */
|
|
1008
|
+
onClose?: () => void;
|
|
1009
|
+
/** Border radius scale */
|
|
1010
|
+
radius?: ComponentRadius;
|
|
1011
|
+
className?: string;
|
|
1012
|
+
}
|
|
1013
|
+
declare function Alert({ color, level, variant, title, message, children, action, onClose, radius, className, }: AlertUIProps): react_jsx_runtime.JSX.Element | null;
|
|
1014
|
+
|
|
1015
|
+
interface EmptyStateAction {
|
|
1016
|
+
label: React__default.ReactNode;
|
|
1017
|
+
onClick?: () => void;
|
|
1018
|
+
render?: React__default.ReactElement;
|
|
1019
|
+
variant?: FillVariant;
|
|
1020
|
+
color?: ComponentColor;
|
|
1021
|
+
icon?: IconProps["name"] | React__default.ReactNode;
|
|
1022
|
+
}
|
|
1023
|
+
interface EmptyStateProps {
|
|
1024
|
+
title: React__default.ReactNode;
|
|
1025
|
+
description?: React__default.ReactNode;
|
|
1026
|
+
icon?: IconProps["name"] | React__default.ReactNode;
|
|
1027
|
+
primaryAction?: EmptyStateAction;
|
|
1028
|
+
secondaryAction?: EmptyStateAction;
|
|
1029
|
+
children?: React__default.ReactNode;
|
|
1030
|
+
className?: string;
|
|
1031
|
+
}
|
|
1032
|
+
declare function EmptyState({ title, description, icon, primaryAction, secondaryAction, children, className, }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
1033
|
+
|
|
1034
|
+
interface SpinnerProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
1035
|
+
/** Size variant of the spinner */
|
|
1036
|
+
size?: ComponentSize;
|
|
1037
|
+
/** Color theme of the spinner */
|
|
1038
|
+
color?: BrandColor | "primary" | "neutral";
|
|
1039
|
+
/** Screen-reader accessible label */
|
|
1040
|
+
label?: string;
|
|
1041
|
+
}
|
|
1042
|
+
declare const Spinner: React__default.ForwardRefExoticComponent<SpinnerProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
1043
|
+
|
|
617
1044
|
type AuthFormMode = "signing up" | "signing in" | "resetting password";
|
|
618
1045
|
interface AuthFormUIProps {
|
|
619
1046
|
mode: AuthFormMode;
|
|
@@ -624,23 +1051,11 @@ interface AuthFormUIProps {
|
|
|
624
1051
|
message: string;
|
|
625
1052
|
};
|
|
626
1053
|
onGoogleSignIn?: () => void;
|
|
627
|
-
title?:
|
|
628
|
-
description?:
|
|
1054
|
+
title?: React__default.ReactNode;
|
|
1055
|
+
description?: React__default.ReactNode;
|
|
629
1056
|
}
|
|
630
1057
|
declare function AuthFormUI({ mode, onModeChange, formAction, actionState, onGoogleSignIn, title, description, }: AuthFormUIProps): react_jsx_runtime.JSX.Element;
|
|
631
1058
|
|
|
632
|
-
type AlertLevel = "Error" | "Warning" | "Success" | "Info";
|
|
633
|
-
interface AlertAction {
|
|
634
|
-
name: string;
|
|
635
|
-
callback: () => void;
|
|
636
|
-
}
|
|
637
|
-
interface AlertUIProps {
|
|
638
|
-
level: AlertLevel;
|
|
639
|
-
message: React.ReactNode;
|
|
640
|
-
action?: AlertAction;
|
|
641
|
-
}
|
|
642
|
-
declare function Alert({ level, message, action }: AlertUIProps): react_jsx_runtime.JSX.Element;
|
|
643
|
-
|
|
644
1059
|
interface TabItem {
|
|
645
1060
|
id: string;
|
|
646
1061
|
label: string;
|
|
@@ -656,6 +1071,77 @@ interface TabSelectionProps {
|
|
|
656
1071
|
}
|
|
657
1072
|
declare function TabSelection({ tabs, activeTabId, onTabClick, onAddClick, className, }: TabSelectionProps): react_jsx_runtime.JSX.Element;
|
|
658
1073
|
|
|
1074
|
+
interface SearchInputProps extends Omit<InputProps, "leftIcon" | "rightIcon"> {
|
|
1075
|
+
onSearch?: (query: string) => void;
|
|
1076
|
+
onClear?: () => void;
|
|
1077
|
+
showClearButton?: boolean;
|
|
1078
|
+
}
|
|
1079
|
+
declare const SearchInput: React__default.ForwardRefExoticComponent<SearchInputProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
1080
|
+
|
|
1081
|
+
interface CopyButtonProps extends Omit<ButtonProps, "onClick"> {
|
|
1082
|
+
/** The text value to copy to the clipboard. */
|
|
1083
|
+
value: string;
|
|
1084
|
+
/** Label displayed before copying. Default is `"Copy"`. Pass `null` or use `isIconOnly` for icon-only. */
|
|
1085
|
+
label?: React__default.ReactNode;
|
|
1086
|
+
/** Label displayed after copying. Default is `"Copied!"`. */
|
|
1087
|
+
successLabel?: React__default.ReactNode;
|
|
1088
|
+
/** Duration in milliseconds for the success state. Default is `2000`. */
|
|
1089
|
+
timeout?: number;
|
|
1090
|
+
/** Callback fired after successfully copying to clipboard. */
|
|
1091
|
+
onCopied?: (value: string) => void;
|
|
1092
|
+
/** Callback fired if copying fails. */
|
|
1093
|
+
onCopyError?: (error: Error) => void;
|
|
1094
|
+
/** Custom icon shown in default state. */
|
|
1095
|
+
copyIcon?: React__default.ReactNode;
|
|
1096
|
+
/** Custom icon shown in copied state. */
|
|
1097
|
+
successIcon?: React__default.ReactNode;
|
|
1098
|
+
/** Whether to show icons. Default is `true`. */
|
|
1099
|
+
showIcon?: boolean;
|
|
1100
|
+
}
|
|
1101
|
+
declare const CopyButton: React__default.ForwardRefExoticComponent<CopyButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
1102
|
+
|
|
1103
|
+
interface UseClipboardOptions {
|
|
1104
|
+
/**
|
|
1105
|
+
* Duration in milliseconds for the `copied` state to remain `true`.
|
|
1106
|
+
* @default 2000
|
|
1107
|
+
*/
|
|
1108
|
+
timeout?: number;
|
|
1109
|
+
/** Callback fired after successfully copying to clipboard. */
|
|
1110
|
+
onSuccess?: (text: string) => void;
|
|
1111
|
+
/** Callback fired if copying fails. */
|
|
1112
|
+
onError?: (error: Error) => void;
|
|
1113
|
+
}
|
|
1114
|
+
declare function useClipboard(options?: UseClipboardOptions): {
|
|
1115
|
+
copy: (text: string) => Promise<boolean>;
|
|
1116
|
+
copied: boolean;
|
|
1117
|
+
error: Error | null;
|
|
1118
|
+
};
|
|
1119
|
+
|
|
1120
|
+
type StepStatus = "complete" | "current" | "upcoming" | "disabled";
|
|
1121
|
+
interface StepItem {
|
|
1122
|
+
id: string;
|
|
1123
|
+
title: React__default.ReactNode;
|
|
1124
|
+
description?: React__default.ReactNode;
|
|
1125
|
+
status?: StepStatus;
|
|
1126
|
+
icon?: React__default.ReactNode;
|
|
1127
|
+
}
|
|
1128
|
+
interface StepperProps {
|
|
1129
|
+
/** Array of sequential steps */
|
|
1130
|
+
steps: StepItem[];
|
|
1131
|
+
/** Controlled currently active step id */
|
|
1132
|
+
activeStepId?: string;
|
|
1133
|
+
/** Callback fired when a step is clicked */
|
|
1134
|
+
onStepClick?: (stepId: string) => void;
|
|
1135
|
+
/** Layout orientation */
|
|
1136
|
+
orientation?: "horizontal" | "vertical" | "chips";
|
|
1137
|
+
/** Brand color theme */
|
|
1138
|
+
color?: ComponentColor;
|
|
1139
|
+
/** Size scale */
|
|
1140
|
+
size?: ComponentSize;
|
|
1141
|
+
className?: string;
|
|
1142
|
+
}
|
|
1143
|
+
declare function Stepper({ steps, activeStepId, onStepClick, orientation, color, size, className, }: StepperProps): react_jsx_runtime.JSX.Element;
|
|
1144
|
+
|
|
659
1145
|
interface SEOProps {
|
|
660
1146
|
title: string;
|
|
661
1147
|
description?: string;
|
|
@@ -701,4 +1187,32 @@ interface DistributionHistogramProps {
|
|
|
701
1187
|
}
|
|
702
1188
|
declare function DistributionHistogram({ data, alt, label, average, referenceLineValue, referenceLineLabel, chartWidth, chartHeight, }: DistributionHistogramProps): react_jsx_runtime.JSX.Element | null;
|
|
703
1189
|
|
|
704
|
-
|
|
1190
|
+
interface LineGraphPoint {
|
|
1191
|
+
x: number;
|
|
1192
|
+
y: number;
|
|
1193
|
+
}
|
|
1194
|
+
interface LineGraphHighlightPoint extends LineGraphPoint {
|
|
1195
|
+
color?: string;
|
|
1196
|
+
label?: string;
|
|
1197
|
+
}
|
|
1198
|
+
interface LineGraphProps {
|
|
1199
|
+
data: LineGraphPoint[];
|
|
1200
|
+
highlightPoints?: LineGraphHighlightPoint[];
|
|
1201
|
+
minX?: number;
|
|
1202
|
+
maxX?: number;
|
|
1203
|
+
minY?: number;
|
|
1204
|
+
maxY?: number;
|
|
1205
|
+
width?: number | string;
|
|
1206
|
+
height?: number;
|
|
1207
|
+
strokeColor?: string;
|
|
1208
|
+
strokeWidth?: number;
|
|
1209
|
+
fillColor?: string;
|
|
1210
|
+
showGrid?: boolean;
|
|
1211
|
+
showAxisLabels?: boolean;
|
|
1212
|
+
xUnit?: string;
|
|
1213
|
+
padding?: number;
|
|
1214
|
+
className?: string;
|
|
1215
|
+
}
|
|
1216
|
+
declare function LineGraph({ data, highlightPoints, minX, maxX, minY, maxY, width, height, strokeColor, strokeWidth, fillColor, showGrid, showAxisLabels, xUnit, padding, className, }: LineGraphProps): react_jsx_runtime.JSX.Element;
|
|
1217
|
+
|
|
1218
|
+
export { Accordion, type AccordionItem, type AccordionProps, Alert, type AlertAction, type AlertColor, type AlertLevel, type AlertUIProps, Anchor, type AnchorProps, type AuthFormMode, AuthFormUI, type AuthFormUIProps, Avatar, type AvatarProps, type BrandColor, Button, type ButtonProps, type ButtonVariant, Card, type CardProps, Checkbox, type CheckboxProps, ChipGroup, type ChipGroupProps, type ChipOption, CodeBlock, type CodeBlockProps, Collapsible, type CollapsibleProps, type ComponentColor, type ComponentRadius, type ComponentSize, CopyButton, type CopyButtonProps, DEFAULT_PEERBOTS_SOCIAL_LINKS, Dialog, DialogClose, DialogDescription, type DialogProps, DialogTitle, DistributionBarChart, type DistributionBarChartProps, type DistributionBarData, DistributionHistogram, type DistributionHistogramData, type DistributionHistogramProps, Dropdown, DropdownItem, type DropdownProps, DropdownSeparator, Dropzone, type DropzoneProps, EmptyState, type EmptyStateAction, type EmptyStateProps, Field, type FieldProps, FileUpload, type FileUploadProps, type FillVariant, Heading, type HeadingProps, HelperTooltip, type HelperTooltipProps, Icon, type IconName, type IconProps, Input, type InputProps, type IntentColor, Label, type LabelProps, LineGraph, type LineGraphPoint, type LineGraphProps, Link, type LinkProps, NumberField, type NumberFieldProps, PEERBOTS_COLOR_MAP, PEERBOTS_FONT_COLOR_MAP, type PeerbotsColor, PeerbotsColorSelector, type PeerbotsColorSelectorProps, Popover, PopoverClose, PopoverDescription, type PopoverProps, PopoverTitle, SEO, SearchInput, type SearchInputProps, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, SettingsPanel, type SettingsPanelProps, Skeleton, type SkeletonProps, Slider, type SliderProps, SliderWithNumberField, type SliderWithNumberFieldProps, type SocialLinkItem, SocialLinks, type SocialLinksProps, Spinner, type SpinnerProps, type StepItem, type StepStatus, Stepper, type StepperProps, type SurfaceVariant, Switch, type SwitchProps, type TabItem, TabRadio, type TabRadioOption, type TabRadioProps, TabSelection, type TabSelectionProps, Text, TextArea, type TextAreaProps, type TextProps, Tooltip, type TooltipProps, type UseClipboardOptions, cn, iconPaths, useClipboard };
|