@peerbots/core 0.2.5 → 1.0.0
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 +643 -131
- package/dist/index.d.ts +643 -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} +7 -3
- package/src/ui/forms/SliderWithNumberField.stories.tsx +136 -0
- package/src/ui/{SliderWithNumberField.tsx → forms/SliderWithNumberField.tsx} +19 -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 -28
- 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/BasePanel.stories.tsx +0 -36
- package/src/ui/BasePanel.tsx +0 -59
- 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;
|
|
@@ -423,7 +577,7 @@ interface SliderProps {
|
|
|
423
577
|
}
|
|
424
578
|
declare const Slider: React__default.ForwardRefExoticComponent<SliderProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
425
579
|
|
|
426
|
-
interface SliderWithNumberFieldProps {
|
|
580
|
+
interface SliderWithNumberFieldProps extends React__default.AriaAttributes {
|
|
427
581
|
min?: number;
|
|
428
582
|
max?: number;
|
|
429
583
|
step?: number;
|
|
@@ -433,47 +587,10 @@ interface SliderWithNumberFieldProps {
|
|
|
433
587
|
onChange?: (value: number, event: Event) => void;
|
|
434
588
|
className?: string;
|
|
435
589
|
inputWidth?: string;
|
|
590
|
+
showButtons?: boolean;
|
|
436
591
|
}
|
|
437
592
|
declare const SliderWithNumberField: React__default.ForwardRefExoticComponent<SliderWithNumberFieldProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
438
593
|
|
|
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
594
|
interface DropdownProps {
|
|
478
595
|
trigger: React__default.ReactNode;
|
|
479
596
|
children: React__default.ReactNode;
|
|
@@ -484,18 +601,6 @@ declare function Dropdown({ trigger, children, align, className, }: DropdownProp
|
|
|
484
601
|
declare const DropdownItem: React__default.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.ContextMenuItemProps, "ref"> & React__default.RefAttributes<HTMLElement>, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
485
602
|
declare const DropdownSeparator: React__default.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.SeparatorProps, "ref"> & React__default.RefAttributes<HTMLDivElement>, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
486
603
|
|
|
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
604
|
interface SwitchProps extends React__default.AriaAttributes {
|
|
500
605
|
checked?: boolean;
|
|
501
606
|
defaultChecked?: boolean;
|
|
@@ -514,17 +619,6 @@ interface LabelProps extends React__default.LabelHTMLAttributes<HTMLLabelElement
|
|
|
514
619
|
}
|
|
515
620
|
declare function Label({ children, tooltip, className, ...props }: LabelProps): react_jsx_runtime.JSX.Element;
|
|
516
621
|
|
|
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
622
|
interface TabRadioOption<T extends string> {
|
|
529
623
|
value: T;
|
|
530
624
|
label: ReactNode;
|
|
@@ -540,7 +634,7 @@ interface TabRadioProps<T extends string> {
|
|
|
540
634
|
}
|
|
541
635
|
declare function TabRadio<T extends string>({ options, value, onChange, className, variant, "aria-label": ariaLabel, }: TabRadioProps<T>): react_jsx_runtime.JSX.Element;
|
|
542
636
|
|
|
543
|
-
interface NumberFieldProps {
|
|
637
|
+
interface NumberFieldProps extends React__default.AriaAttributes {
|
|
544
638
|
value?: number | null;
|
|
545
639
|
defaultValue?: number;
|
|
546
640
|
min?: number;
|
|
@@ -572,15 +666,150 @@ interface FieldProps extends Field$1.Root.Props {
|
|
|
572
666
|
*/
|
|
573
667
|
declare const Field: React__default.ForwardRefExoticComponent<Omit<FieldProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
574
668
|
|
|
575
|
-
type AnchorProps = React$1.AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
576
|
-
declare const Anchor: React$1.ForwardRefExoticComponent<AnchorProps & React$1.RefAttributes<HTMLAnchorElement>>;
|
|
577
|
-
|
|
578
669
|
type TextAreaProps = React__default.TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
579
670
|
declare const TextArea: React__default.ForwardRefExoticComponent<TextAreaProps & React__default.RefAttributes<HTMLTextAreaElement>>;
|
|
580
671
|
|
|
581
672
|
type CheckboxProps = React__default.InputHTMLAttributes<HTMLInputElement>;
|
|
582
673
|
declare const Checkbox: React__default.ForwardRefExoticComponent<CheckboxProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
583
674
|
|
|
675
|
+
type PeerbotsColor = "Light Blue" | "Blue" | "Green" | "Red" | "Purple" | "Pink" | "Yellow" | "Orange" | "Grey" | "Black" | "White";
|
|
676
|
+
declare const PEERBOTS_COLOR_MAP: Record<PeerbotsColor, string>;
|
|
677
|
+
declare const PEERBOTS_FONT_COLOR_MAP: Record<PeerbotsColor, string>;
|
|
678
|
+
interface PeerbotsColorSelectorProps {
|
|
679
|
+
selectedColor?: PeerbotsColor | string;
|
|
680
|
+
onColorSelect: (color: PeerbotsColor) => void;
|
|
681
|
+
colors?: PeerbotsColor[];
|
|
682
|
+
size?: "sm" | "md" | "lg";
|
|
683
|
+
className?: string;
|
|
684
|
+
ariaLabelPrefix?: string;
|
|
685
|
+
}
|
|
686
|
+
declare function PeerbotsColorSelector({ selectedColor, onColorSelect, colors, size, className, ariaLabelPrefix, }: PeerbotsColorSelectorProps): react_jsx_runtime.JSX.Element;
|
|
687
|
+
|
|
688
|
+
interface ChipOption<T = string> {
|
|
689
|
+
value: T;
|
|
690
|
+
label: React__default.ReactNode;
|
|
691
|
+
badge?: React__default.ReactNode;
|
|
692
|
+
disabled?: boolean;
|
|
693
|
+
icon?: React__default.ReactNode;
|
|
694
|
+
}
|
|
695
|
+
interface ChipGroupProps<T = string> {
|
|
696
|
+
/** Array of selectable chip options */
|
|
697
|
+
options: ChipOption<T>[];
|
|
698
|
+
/** Controlled single selected value */
|
|
699
|
+
value?: T;
|
|
700
|
+
/** Uncontrolled initial single selected value */
|
|
701
|
+
defaultValue?: T;
|
|
702
|
+
/** Callback fired when single selection changes */
|
|
703
|
+
onChange?: (value: T) => void;
|
|
704
|
+
/** Enable multiple selection mode */
|
|
705
|
+
multiple?: boolean;
|
|
706
|
+
/** Controlled array of selected values (for multi mode) */
|
|
707
|
+
values?: T[];
|
|
708
|
+
/** Uncontrolled initial array of selected values (for multi mode) */
|
|
709
|
+
defaultValues?: T[];
|
|
710
|
+
/** Callback fired when multiple selection changes */
|
|
711
|
+
onMultipleChange?: (values: T[]) => void;
|
|
712
|
+
/** Color theme */
|
|
713
|
+
color?: ComponentColor;
|
|
714
|
+
/** Visual fill style */
|
|
715
|
+
variant?: "solid" | "soft" | "outline";
|
|
716
|
+
/** Size scale */
|
|
717
|
+
size?: ComponentSize;
|
|
718
|
+
/** Border radius scale */
|
|
719
|
+
radius?: ComponentRadius;
|
|
720
|
+
/** Enable horizontal scrollable rail */
|
|
721
|
+
scrollable?: boolean;
|
|
722
|
+
className?: string;
|
|
723
|
+
id?: string;
|
|
724
|
+
name?: string;
|
|
725
|
+
}
|
|
726
|
+
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;
|
|
727
|
+
|
|
728
|
+
interface CardProps extends React__default.HTMLAttributes<HTMLElement> {
|
|
729
|
+
children: React__default.ReactNode;
|
|
730
|
+
/**
|
|
731
|
+
* Surface treatment / fill style.
|
|
732
|
+
* @default "surface"
|
|
733
|
+
*/
|
|
734
|
+
variant?: SurfaceVariant | "default" | "elevated";
|
|
735
|
+
/**
|
|
736
|
+
* Background color tinting.
|
|
737
|
+
* @default "default"
|
|
738
|
+
*/
|
|
739
|
+
color?: "default" | "teal" | "pink";
|
|
740
|
+
/**
|
|
741
|
+
* Card padding scale.
|
|
742
|
+
* @default "md"
|
|
743
|
+
*/
|
|
744
|
+
padding?: "none" | ComponentSize;
|
|
745
|
+
/**
|
|
746
|
+
* Border radius scale.
|
|
747
|
+
* @default "2xl"
|
|
748
|
+
*/
|
|
749
|
+
radius?: ComponentRadius;
|
|
750
|
+
/** Whether the card shows interactive hover elevation */
|
|
751
|
+
hoverable?: boolean;
|
|
752
|
+
id?: string;
|
|
753
|
+
as?: React__default.ElementType;
|
|
754
|
+
href?: string;
|
|
755
|
+
target?: string;
|
|
756
|
+
rel?: string;
|
|
757
|
+
}
|
|
758
|
+
declare const Card: React__default.ForwardRefExoticComponent<CardProps & React__default.RefAttributes<HTMLElement>>;
|
|
759
|
+
|
|
760
|
+
interface AccordionItem {
|
|
761
|
+
id?: string;
|
|
762
|
+
question?: React__default.ReactNode;
|
|
763
|
+
title?: React__default.ReactNode;
|
|
764
|
+
answer?: React__default.ReactNode;
|
|
765
|
+
content?: React__default.ReactNode;
|
|
766
|
+
description?: React__default.ReactNode;
|
|
767
|
+
bodyHtml?: string;
|
|
768
|
+
isOpenDefault?: boolean;
|
|
769
|
+
}
|
|
770
|
+
interface AccordionProps {
|
|
771
|
+
/** List of accordion items for multi-item list mode */
|
|
772
|
+
items?: AccordionItem[];
|
|
773
|
+
/** Allow multiple items to be opened simultaneously */
|
|
774
|
+
allowMultiple?: boolean;
|
|
775
|
+
/** Visual style variant */
|
|
776
|
+
variant?: "default" | "bordered" | "flat";
|
|
777
|
+
/** Single-item mode: title for the disclosure */
|
|
778
|
+
title?: React__default.ReactNode;
|
|
779
|
+
/** Single-item mode: content/children for the disclosure */
|
|
780
|
+
children?: React__default.ReactNode;
|
|
781
|
+
/** Single-item mode: default open state */
|
|
782
|
+
defaultOpen?: boolean;
|
|
783
|
+
/** Controlled open state for single-item mode */
|
|
784
|
+
isOpen?: boolean;
|
|
785
|
+
/** Controlled toggle callback for single-item mode */
|
|
786
|
+
onToggle?: (open: boolean) => void;
|
|
787
|
+
className?: string;
|
|
788
|
+
headerClassName?: string;
|
|
789
|
+
contentClassName?: string;
|
|
790
|
+
}
|
|
791
|
+
declare const Accordion: React__default.FC<AccordionProps>;
|
|
792
|
+
|
|
793
|
+
interface CollapsibleProps {
|
|
794
|
+
title: React__default.ReactNode;
|
|
795
|
+
children: React__default.ReactNode;
|
|
796
|
+
/** The variant of the trigger or panel */
|
|
797
|
+
variant?: ButtonProps["variant"] | "default" | "bordered" | "flat";
|
|
798
|
+
/** The size of the trigger button */
|
|
799
|
+
size?: ButtonProps["size"];
|
|
800
|
+
defaultOpen?: boolean;
|
|
801
|
+
isOpen?: boolean;
|
|
802
|
+
onToggle?: (open: boolean) => void;
|
|
803
|
+
className?: string;
|
|
804
|
+
}
|
|
805
|
+
declare function Collapsible({ title, children, variant, defaultOpen, isOpen: controlledIsOpen, onToggle, className, }: CollapsibleProps): react_jsx_runtime.JSX.Element;
|
|
806
|
+
|
|
807
|
+
interface SeparatorProps extends React.ComponentPropsWithoutRef<typeof Separator$1> {
|
|
808
|
+
orientation?: "horizontal" | "vertical";
|
|
809
|
+
className?: string;
|
|
810
|
+
}
|
|
811
|
+
declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
812
|
+
|
|
584
813
|
interface SettingsPanelProps {
|
|
585
814
|
/** The title of the section */
|
|
586
815
|
title?: ReactNode;
|
|
@@ -599,21 +828,217 @@ interface SettingsPanelProps {
|
|
|
599
828
|
}
|
|
600
829
|
/**
|
|
601
830
|
* A standardized panel for settings sections.
|
|
602
|
-
*
|
|
831
|
+
* Built on top of Card and Collapsible for design system consistency.
|
|
603
832
|
*/
|
|
604
833
|
declare function SettingsPanel({ title, children, className, contentClassName, collapsible, defaultOpen, headingLevel, }: SettingsPanelProps): react_jsx_runtime.JSX.Element;
|
|
605
834
|
|
|
606
|
-
interface
|
|
607
|
-
|
|
835
|
+
interface AvatarProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
836
|
+
/** Image source URL. */
|
|
837
|
+
src?: string | null;
|
|
838
|
+
/** Full name of the user, maker, or robot. Used to generate initials and accessible label. */
|
|
839
|
+
name?: string;
|
|
840
|
+
/** Accessible alt text for the avatar image. Defaults to `name` or `"Avatar"`. */
|
|
841
|
+
alt?: string;
|
|
842
|
+
/** Size variant. Defaults to `"md"`. */
|
|
843
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
844
|
+
/** Shape of the avatar. Defaults to `"circle"`. */
|
|
845
|
+
shape?: "circle" | "rounded";
|
|
846
|
+
/** Custom fallback icon if no image or initials are available. */
|
|
847
|
+
fallbackIcon?: React__default.ReactNode;
|
|
848
|
+
}
|
|
849
|
+
declare const Avatar: React__default.ForwardRefExoticComponent<AvatarProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
850
|
+
|
|
851
|
+
interface DropzoneProps {
|
|
852
|
+
/** Accepted MIME types or extensions (e.g. `"image/*"`, `"video/*"`, `".zip"`). */
|
|
853
|
+
accept?: string;
|
|
854
|
+
/** Maximum file size allowed in Megabytes (MB). */
|
|
855
|
+
maxSizeMB?: number;
|
|
856
|
+
/** Whether the dropzone is disabled. */
|
|
857
|
+
disabled?: boolean;
|
|
858
|
+
/**
|
|
859
|
+
* Optional controlled URL or data URL of an uploaded file to display in preview mode.
|
|
860
|
+
* If not provided, Dropzone will automatically generate and display a preview for selected images/videos.
|
|
861
|
+
*/
|
|
862
|
+
previewUrl?: string | null;
|
|
863
|
+
/** Optional controlled File object. */
|
|
864
|
+
value?: File | null;
|
|
865
|
+
/** Whether to automatically show a preview when an image/video is selected. Default is `true`. */
|
|
866
|
+
showPreview?: boolean;
|
|
867
|
+
/** How to render the preview. Default is `"auto"`. */
|
|
868
|
+
previewType?: "image" | "video" | "auto";
|
|
869
|
+
/** Main callout title. Default is `"Click or drag file to upload"`. */
|
|
870
|
+
title?: React__default.ReactNode;
|
|
871
|
+
/** Subtitle or requirement text. Default is `"Supported formats: PNG, JPG, WEBP, MP4"`. */
|
|
872
|
+
subtitle?: React__default.ReactNode;
|
|
873
|
+
/** Custom icon for the dropzone idle state. */
|
|
874
|
+
icon?: React__default.ReactNode;
|
|
875
|
+
/** Callback fired when a valid file is dropped or selected. */
|
|
876
|
+
onFileSelect?: (file: File) => void;
|
|
877
|
+
/** Callback fired when the active file/preview is cleared. */
|
|
878
|
+
onFileRemove?: () => void;
|
|
879
|
+
/** Callback fired when a file exceeds size limit or validation fails. */
|
|
880
|
+
onError?: (errorMessage: string) => void;
|
|
881
|
+
/** Optional custom CSS classes for the root dropzone container. */
|
|
882
|
+
className?: string;
|
|
883
|
+
id?: string;
|
|
884
|
+
name?: string;
|
|
885
|
+
}
|
|
886
|
+
declare const Dropzone: React__default.ForwardRefExoticComponent<DropzoneProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
887
|
+
|
|
888
|
+
interface FileUploadProps {
|
|
889
|
+
/** Accepted file types (e.g. `"image/*"`, `".pdf"`, `"audio/*"`). */
|
|
890
|
+
accept?: string;
|
|
891
|
+
/** Whether multiple files can be selected. */
|
|
892
|
+
multiple?: boolean;
|
|
893
|
+
/** Whether the input is disabled. */
|
|
894
|
+
disabled?: boolean;
|
|
895
|
+
/** Maximum allowable file size in bytes. */
|
|
896
|
+
maxSizeBytes?: number;
|
|
897
|
+
/** Text displayed inside the trigger button. Default is `"Choose File"`. */
|
|
898
|
+
buttonText?: React__default.ReactNode;
|
|
899
|
+
/** Button style variant. Default is `"secondary"`. */
|
|
900
|
+
buttonVariant?: ButtonProps["variant"];
|
|
901
|
+
/** Button size. Default is `"md"`. */
|
|
902
|
+
buttonSize?: ButtonProps["size"];
|
|
903
|
+
/** Icon shown inside the button. Default is `<Icon name="arrowUpTray" />`. */
|
|
904
|
+
buttonIcon?: React__default.ReactNode;
|
|
905
|
+
/** Text shown when no file has been chosen. Default is `"No file chosen"`. */
|
|
906
|
+
placeholder?: string;
|
|
907
|
+
/** Whether to show a clear/remove button when files are selected. Default is `true`. */
|
|
908
|
+
clearable?: boolean;
|
|
909
|
+
/** Controlled file(s) value. */
|
|
910
|
+
value?: File | File[] | null;
|
|
911
|
+
/** Callback fired when file selection changes. */
|
|
912
|
+
onChange?: (files: File | File[] | null) => void;
|
|
913
|
+
/** Callback fired when a file exceeds size limit or validation fails. */
|
|
914
|
+
onError?: (errorMessage: string) => void;
|
|
915
|
+
/** Optional custom CSS classes. */
|
|
916
|
+
className?: string;
|
|
917
|
+
id?: string;
|
|
918
|
+
name?: string;
|
|
919
|
+
}
|
|
920
|
+
declare const FileUpload: React__default.ForwardRefExoticComponent<FileUploadProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
921
|
+
|
|
922
|
+
interface TooltipProps {
|
|
923
|
+
content: React__default.ReactNode;
|
|
924
|
+
children: React__default.ReactNode;
|
|
608
925
|
className?: string;
|
|
926
|
+
delay?: "normal" | "slow";
|
|
609
927
|
}
|
|
610
|
-
declare
|
|
928
|
+
declare function Tooltip({ content, children, className, delay, }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
929
|
+
interface HelperTooltipProps {
|
|
930
|
+
content: React__default.ReactNode;
|
|
931
|
+
className?: string;
|
|
932
|
+
}
|
|
933
|
+
declare function HelperTooltip({ content, className }: HelperTooltipProps): react_jsx_runtime.JSX.Element;
|
|
934
|
+
|
|
935
|
+
interface DialogProps {
|
|
936
|
+
open?: boolean;
|
|
937
|
+
onOpenChange?: (open: boolean, event?: Event) => void;
|
|
938
|
+
trigger?: React__default.ReactNode;
|
|
939
|
+
children: React__default.ReactNode;
|
|
940
|
+
className?: string;
|
|
941
|
+
}
|
|
942
|
+
declare function Dialog({ open, onOpenChange, trigger, children, className, }: DialogProps): react_jsx_runtime.JSX.Element;
|
|
943
|
+
declare const DialogTitle: (props: React__default.ComponentProps<typeof Dialog$1.Title>) => react_jsx_runtime.JSX.Element;
|
|
944
|
+
declare const DialogDescription: (props: React__default.ComponentProps<typeof Dialog$1.Description>) => react_jsx_runtime.JSX.Element;
|
|
945
|
+
declare const DialogClose: (props: React__default.ComponentProps<typeof Dialog$1.Close>) => react_jsx_runtime.JSX.Element;
|
|
946
|
+
|
|
947
|
+
interface PopoverProps {
|
|
948
|
+
/** The element that triggers the popover when clicked */
|
|
949
|
+
trigger: React__default.ReactNode;
|
|
950
|
+
/** Popover body content */
|
|
951
|
+
children: React__default.ReactNode;
|
|
952
|
+
/** Optional header title */
|
|
953
|
+
title?: React__default.ReactNode;
|
|
954
|
+
/** Controlled open state */
|
|
955
|
+
open?: boolean;
|
|
956
|
+
/** Initial open state in uncontrolled mode */
|
|
957
|
+
defaultOpen?: boolean;
|
|
958
|
+
/** Callback fired when open state changes */
|
|
959
|
+
onOpenChange?: (open: boolean) => void;
|
|
960
|
+
/** Side where the popover appears */
|
|
961
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
962
|
+
/** Alignment relative to the trigger */
|
|
963
|
+
align?: "start" | "center" | "end";
|
|
964
|
+
/** Distance from the trigger in pixels */
|
|
965
|
+
sideOffset?: number;
|
|
966
|
+
/** Surface visual variant */
|
|
967
|
+
variant?: SurfaceVariant | "default";
|
|
968
|
+
/** Whether to show a close button in the header */
|
|
969
|
+
showCloseButton?: boolean;
|
|
970
|
+
/** Whether to display a pointing arrow */
|
|
971
|
+
showArrow?: boolean;
|
|
972
|
+
className?: string;
|
|
973
|
+
}
|
|
974
|
+
declare function Popover({ trigger, children, title, open, defaultOpen, onOpenChange, side, align, sideOffset, variant, showCloseButton, showArrow, className, }: PopoverProps): react_jsx_runtime.JSX.Element;
|
|
975
|
+
declare const PopoverTitle: (props: React__default.ComponentProps<typeof Popover$1.Title>) => react_jsx_runtime.JSX.Element;
|
|
976
|
+
declare const PopoverDescription: (props: React__default.ComponentProps<typeof Popover$1.Description>) => react_jsx_runtime.JSX.Element;
|
|
977
|
+
declare const PopoverClose: (props: React__default.ComponentProps<typeof Popover$1.Close>) => react_jsx_runtime.JSX.Element;
|
|
611
978
|
|
|
612
979
|
interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
613
980
|
className?: string;
|
|
614
981
|
}
|
|
615
982
|
declare function Skeleton({ className, ...props }: SkeletonProps): react_jsx_runtime.JSX.Element;
|
|
616
983
|
|
|
984
|
+
type AlertLevel = "Error" | "Warning" | "Success" | "Info";
|
|
985
|
+
type AlertColor = "danger" | "warning" | "success" | "info" | "neutral";
|
|
986
|
+
interface AlertAction {
|
|
987
|
+
name: string;
|
|
988
|
+
callback: () => void;
|
|
989
|
+
}
|
|
990
|
+
interface AlertUIProps {
|
|
991
|
+
/** Alert semantic color */
|
|
992
|
+
color?: AlertColor;
|
|
993
|
+
/** Legacy level prop for backward compatibility */
|
|
994
|
+
level?: AlertLevel;
|
|
995
|
+
/** Visual style variant */
|
|
996
|
+
variant?: "soft" | "outline" | "solid";
|
|
997
|
+
/** Optional alert title */
|
|
998
|
+
title?: React__default.ReactNode;
|
|
999
|
+
/** Alert message body */
|
|
1000
|
+
message?: React__default.ReactNode;
|
|
1001
|
+
/** Children as alternative to message */
|
|
1002
|
+
children?: React__default.ReactNode;
|
|
1003
|
+
/** Optional action button */
|
|
1004
|
+
action?: AlertAction;
|
|
1005
|
+
/** Callback fired when alert is dismissed */
|
|
1006
|
+
onClose?: () => void;
|
|
1007
|
+
/** Border radius scale */
|
|
1008
|
+
radius?: ComponentRadius;
|
|
1009
|
+
className?: string;
|
|
1010
|
+
}
|
|
1011
|
+
declare function Alert({ color, level, variant, title, message, children, action, onClose, radius, className, }: AlertUIProps): react_jsx_runtime.JSX.Element | null;
|
|
1012
|
+
|
|
1013
|
+
interface EmptyStateAction {
|
|
1014
|
+
label: React__default.ReactNode;
|
|
1015
|
+
onClick?: () => void;
|
|
1016
|
+
render?: React__default.ReactElement;
|
|
1017
|
+
variant?: FillVariant;
|
|
1018
|
+
color?: ComponentColor;
|
|
1019
|
+
icon?: IconProps["name"] | React__default.ReactNode;
|
|
1020
|
+
}
|
|
1021
|
+
interface EmptyStateProps {
|
|
1022
|
+
title: React__default.ReactNode;
|
|
1023
|
+
description?: React__default.ReactNode;
|
|
1024
|
+
icon?: IconProps["name"] | React__default.ReactNode;
|
|
1025
|
+
primaryAction?: EmptyStateAction;
|
|
1026
|
+
secondaryAction?: EmptyStateAction;
|
|
1027
|
+
children?: React__default.ReactNode;
|
|
1028
|
+
className?: string;
|
|
1029
|
+
}
|
|
1030
|
+
declare function EmptyState({ title, description, icon, primaryAction, secondaryAction, children, className, }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
1031
|
+
|
|
1032
|
+
interface SpinnerProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
1033
|
+
/** Size variant of the spinner */
|
|
1034
|
+
size?: ComponentSize;
|
|
1035
|
+
/** Color theme of the spinner */
|
|
1036
|
+
color?: BrandColor | "primary" | "neutral";
|
|
1037
|
+
/** Screen-reader accessible label */
|
|
1038
|
+
label?: string;
|
|
1039
|
+
}
|
|
1040
|
+
declare const Spinner: React__default.ForwardRefExoticComponent<SpinnerProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
1041
|
+
|
|
617
1042
|
type AuthFormMode = "signing up" | "signing in" | "resetting password";
|
|
618
1043
|
interface AuthFormUIProps {
|
|
619
1044
|
mode: AuthFormMode;
|
|
@@ -624,23 +1049,11 @@ interface AuthFormUIProps {
|
|
|
624
1049
|
message: string;
|
|
625
1050
|
};
|
|
626
1051
|
onGoogleSignIn?: () => void;
|
|
627
|
-
title?:
|
|
628
|
-
description?:
|
|
1052
|
+
title?: React__default.ReactNode;
|
|
1053
|
+
description?: React__default.ReactNode;
|
|
629
1054
|
}
|
|
630
1055
|
declare function AuthFormUI({ mode, onModeChange, formAction, actionState, onGoogleSignIn, title, description, }: AuthFormUIProps): react_jsx_runtime.JSX.Element;
|
|
631
1056
|
|
|
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
1057
|
interface TabItem {
|
|
645
1058
|
id: string;
|
|
646
1059
|
label: string;
|
|
@@ -656,6 +1069,77 @@ interface TabSelectionProps {
|
|
|
656
1069
|
}
|
|
657
1070
|
declare function TabSelection({ tabs, activeTabId, onTabClick, onAddClick, className, }: TabSelectionProps): react_jsx_runtime.JSX.Element;
|
|
658
1071
|
|
|
1072
|
+
interface SearchInputProps extends Omit<InputProps, "leftIcon" | "rightIcon"> {
|
|
1073
|
+
onSearch?: (query: string) => void;
|
|
1074
|
+
onClear?: () => void;
|
|
1075
|
+
showClearButton?: boolean;
|
|
1076
|
+
}
|
|
1077
|
+
declare const SearchInput: React__default.ForwardRefExoticComponent<SearchInputProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
1078
|
+
|
|
1079
|
+
interface CopyButtonProps extends Omit<ButtonProps, "onClick"> {
|
|
1080
|
+
/** The text value to copy to the clipboard. */
|
|
1081
|
+
value: string;
|
|
1082
|
+
/** Label displayed before copying. Default is `"Copy"`. Pass `null` or use `isIconOnly` for icon-only. */
|
|
1083
|
+
label?: React__default.ReactNode;
|
|
1084
|
+
/** Label displayed after copying. Default is `"Copied!"`. */
|
|
1085
|
+
successLabel?: React__default.ReactNode;
|
|
1086
|
+
/** Duration in milliseconds for the success state. Default is `2000`. */
|
|
1087
|
+
timeout?: number;
|
|
1088
|
+
/** Callback fired after successfully copying to clipboard. */
|
|
1089
|
+
onCopied?: (value: string) => void;
|
|
1090
|
+
/** Callback fired if copying fails. */
|
|
1091
|
+
onCopyError?: (error: Error) => void;
|
|
1092
|
+
/** Custom icon shown in default state. */
|
|
1093
|
+
copyIcon?: React__default.ReactNode;
|
|
1094
|
+
/** Custom icon shown in copied state. */
|
|
1095
|
+
successIcon?: React__default.ReactNode;
|
|
1096
|
+
/** Whether to show icons. Default is `true`. */
|
|
1097
|
+
showIcon?: boolean;
|
|
1098
|
+
}
|
|
1099
|
+
declare const CopyButton: React__default.ForwardRefExoticComponent<CopyButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
1100
|
+
|
|
1101
|
+
interface UseClipboardOptions {
|
|
1102
|
+
/**
|
|
1103
|
+
* Duration in milliseconds for the `copied` state to remain `true`.
|
|
1104
|
+
* @default 2000
|
|
1105
|
+
*/
|
|
1106
|
+
timeout?: number;
|
|
1107
|
+
/** Callback fired after successfully copying to clipboard. */
|
|
1108
|
+
onSuccess?: (text: string) => void;
|
|
1109
|
+
/** Callback fired if copying fails. */
|
|
1110
|
+
onError?: (error: Error) => void;
|
|
1111
|
+
}
|
|
1112
|
+
declare function useClipboard(options?: UseClipboardOptions): {
|
|
1113
|
+
copy: (text: string) => Promise<boolean>;
|
|
1114
|
+
copied: boolean;
|
|
1115
|
+
error: Error | null;
|
|
1116
|
+
};
|
|
1117
|
+
|
|
1118
|
+
type StepStatus = "complete" | "current" | "upcoming" | "disabled";
|
|
1119
|
+
interface StepItem {
|
|
1120
|
+
id: string;
|
|
1121
|
+
title: React__default.ReactNode;
|
|
1122
|
+
description?: React__default.ReactNode;
|
|
1123
|
+
status?: StepStatus;
|
|
1124
|
+
icon?: React__default.ReactNode;
|
|
1125
|
+
}
|
|
1126
|
+
interface StepperProps {
|
|
1127
|
+
/** Array of sequential steps */
|
|
1128
|
+
steps: StepItem[];
|
|
1129
|
+
/** Controlled currently active step id */
|
|
1130
|
+
activeStepId?: string;
|
|
1131
|
+
/** Callback fired when a step is clicked */
|
|
1132
|
+
onStepClick?: (stepId: string) => void;
|
|
1133
|
+
/** Layout orientation */
|
|
1134
|
+
orientation?: "horizontal" | "vertical" | "chips";
|
|
1135
|
+
/** Brand color theme */
|
|
1136
|
+
color?: ComponentColor;
|
|
1137
|
+
/** Size scale */
|
|
1138
|
+
size?: ComponentSize;
|
|
1139
|
+
className?: string;
|
|
1140
|
+
}
|
|
1141
|
+
declare function Stepper({ steps, activeStepId, onStepClick, orientation, color, size, className, }: StepperProps): react_jsx_runtime.JSX.Element;
|
|
1142
|
+
|
|
659
1143
|
interface SEOProps {
|
|
660
1144
|
title: string;
|
|
661
1145
|
description?: string;
|
|
@@ -701,4 +1185,32 @@ interface DistributionHistogramProps {
|
|
|
701
1185
|
}
|
|
702
1186
|
declare function DistributionHistogram({ data, alt, label, average, referenceLineValue, referenceLineLabel, chartWidth, chartHeight, }: DistributionHistogramProps): react_jsx_runtime.JSX.Element | null;
|
|
703
1187
|
|
|
704
|
-
|
|
1188
|
+
interface LineGraphPoint {
|
|
1189
|
+
x: number;
|
|
1190
|
+
y: number;
|
|
1191
|
+
}
|
|
1192
|
+
interface LineGraphHighlightPoint extends LineGraphPoint {
|
|
1193
|
+
color?: string;
|
|
1194
|
+
label?: string;
|
|
1195
|
+
}
|
|
1196
|
+
interface LineGraphProps {
|
|
1197
|
+
data: LineGraphPoint[];
|
|
1198
|
+
highlightPoints?: LineGraphHighlightPoint[];
|
|
1199
|
+
minX?: number;
|
|
1200
|
+
maxX?: number;
|
|
1201
|
+
minY?: number;
|
|
1202
|
+
maxY?: number;
|
|
1203
|
+
width?: number | string;
|
|
1204
|
+
height?: number;
|
|
1205
|
+
strokeColor?: string;
|
|
1206
|
+
strokeWidth?: number;
|
|
1207
|
+
fillColor?: string;
|
|
1208
|
+
showGrid?: boolean;
|
|
1209
|
+
showAxisLabels?: boolean;
|
|
1210
|
+
xUnit?: string;
|
|
1211
|
+
padding?: number;
|
|
1212
|
+
className?: string;
|
|
1213
|
+
}
|
|
1214
|
+
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;
|
|
1215
|
+
|
|
1216
|
+
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 };
|