@refraction-ui/react 0.12.3 → 0.14.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.
Files changed (75) hide show
  1. package/dist/index.cjs +4285 -10
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +28 -0
  4. package/dist/index.d.ts +28 -0
  5. package/dist/index.js +4238 -11
  6. package/dist/index.js.map +1 -1
  7. package/dist/internal/audio-room/index.d.ts +91 -0
  8. package/dist/internal/call-controls/index.d.ts +83 -0
  9. package/dist/internal/checklist/index.d.ts +84 -0
  10. package/dist/internal/editor-status-bar/index.d.ts +70 -0
  11. package/dist/internal/editor-tabs/index.d.ts +68 -0
  12. package/dist/internal/empty-state/index.d.cts +39 -0
  13. package/dist/internal/empty-state/index.d.ts +39 -0
  14. package/dist/internal/floating-reactions/index.d.ts +98 -0
  15. package/dist/internal/flow-editor/index.d.ts +91 -0
  16. package/dist/internal/graph-view/index.d.ts +107 -0
  17. package/dist/internal/infinite-canvas/index.d.ts +74 -0
  18. package/dist/internal/input/index.d.cts +19 -1
  19. package/dist/internal/input/index.d.ts +19 -1
  20. package/dist/internal/live-captions/index.d.ts +59 -0
  21. package/dist/internal/live-cursors/index.d.ts +65 -0
  22. package/dist/internal/live-transcript/index.d.ts +73 -0
  23. package/dist/internal/mini-map/index.d.ts +81 -0
  24. package/dist/internal/pre-call-lobby/index.d.ts +97 -0
  25. package/dist/internal/radial-gauge/index.d.ts +120 -0
  26. package/dist/internal/rating-scale/index.d.ts +76 -0
  27. package/dist/internal/react-audio-room/index.d.ts +39 -0
  28. package/dist/internal/react-call-controls/index.d.ts +44 -0
  29. package/dist/internal/react-checklist/index.d.ts +27 -0
  30. package/dist/internal/react-editor-status-bar/index.d.ts +43 -0
  31. package/dist/internal/react-editor-tabs/index.d.ts +25 -0
  32. package/dist/internal/react-empty-state/index.d.cts +36 -0
  33. package/dist/internal/react-empty-state/index.d.ts +36 -0
  34. package/dist/internal/react-floating-reactions/index.d.ts +65 -0
  35. package/dist/internal/react-flow-editor/index.d.ts +35 -0
  36. package/dist/internal/react-graph-view/index.d.ts +25 -0
  37. package/dist/internal/react-infinite-canvas/index.d.ts +40 -0
  38. package/dist/internal/react-input/index.d.cts +16 -0
  39. package/dist/internal/react-input/index.d.ts +16 -0
  40. package/dist/internal/react-live-captions/index.d.ts +29 -0
  41. package/dist/internal/react-live-cursors/index.d.ts +42 -0
  42. package/dist/internal/react-live-transcript/index.d.ts +22 -0
  43. package/dist/internal/react-mini-map/index.d.ts +35 -0
  44. package/dist/internal/react-password-input/index.d.cts +26 -0
  45. package/dist/internal/react-password-input/index.d.ts +26 -0
  46. package/dist/internal/react-pre-call-lobby/index.d.ts +47 -0
  47. package/dist/internal/react-radial-gauge/index.d.ts +43 -0
  48. package/dist/internal/react-rating-scale/index.d.ts +38 -0
  49. package/dist/internal/react-segmented-control/index.d.cts +38 -0
  50. package/dist/internal/react-segmented-control/index.d.ts +38 -0
  51. package/dist/internal/react-separator/index.d.cts +29 -0
  52. package/dist/internal/react-separator/index.d.ts +29 -0
  53. package/dist/internal/react-social-auth-button/index.d.cts +31 -0
  54. package/dist/internal/react-social-auth-button/index.d.ts +31 -0
  55. package/dist/internal/react-sticky-note/index.d.ts +39 -0
  56. package/dist/internal/react-terminal/index.d.ts +39 -0
  57. package/dist/internal/react-test-results/index.d.ts +21 -0
  58. package/dist/internal/react-timeline/index.d.ts +35 -0
  59. package/dist/internal/react-video-grid/index.d.ts +33 -0
  60. package/dist/internal/react-video-tile/index.d.ts +41 -0
  61. package/dist/internal/react-wizard/index.d.ts +59 -0
  62. package/dist/internal/segmented-control/index.d.cts +56 -0
  63. package/dist/internal/segmented-control/index.d.ts +56 -0
  64. package/dist/internal/separator/index.d.cts +55 -0
  65. package/dist/internal/separator/index.d.ts +55 -0
  66. package/dist/internal/social-auth-button/index.d.cts +47 -0
  67. package/dist/internal/social-auth-button/index.d.ts +47 -0
  68. package/dist/internal/sticky-note/index.d.ts +49 -0
  69. package/dist/internal/terminal/index.d.ts +65 -0
  70. package/dist/internal/test-results/index.d.ts +97 -0
  71. package/dist/internal/timeline/index.d.ts +111 -0
  72. package/dist/internal/video-grid/index.d.ts +83 -0
  73. package/dist/internal/video-tile/index.d.ts +88 -0
  74. package/dist/internal/wizard/index.d.ts +148 -0
  75. package/package.json +48 -20
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { InputValidationState } from '../input/index.js';
2
3
  export { InputType, inputVariants } from '../input/index.js';
3
4
 
4
5
  interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
@@ -19,6 +20,21 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, '
19
20
  * See the package README's "Sizing" section for more.
20
21
  */
21
22
  size?: 'sm' | 'default' | 'lg';
23
+ /**
24
+ * Validation affordance. Tints the border and wires `aria-invalid`:
25
+ * - `'valid'` → green border, trailing check icon, `aria-invalid={false}`
26
+ * - `'invalid'` → destructive border, `aria-invalid={true}`
27
+ *
28
+ * When omitted the input is rendered without a wrapper (identical to the
29
+ * legacy bare `<input>` markup), unless `leadingIcon` is set.
30
+ */
31
+ validationState?: InputValidationState;
32
+ /**
33
+ * Optional icon rendered inside the input's left padding. When provided
34
+ * (or when `validationState` is set) the input is wrapped in a relative
35
+ * `<div>` and gains left padding to make room for the icon.
36
+ */
37
+ leadingIcon?: React.ReactNode;
22
38
  }
23
39
  /**
24
40
  * Input component — renders a styled input with size support.
@@ -0,0 +1,29 @@
1
+ import * as React from 'react';
2
+ import { CaptionCue } from '../live-captions/index.js';
3
+ export { CaptionCue } from '../live-captions/index.js';
4
+
5
+ interface LiveCaptionsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'content' | 'color'> {
6
+ /** The full ordered list of caption cues. */
7
+ cues: CaptionCue[];
8
+ /**
9
+ * Maximum number of cue lines to display at once.
10
+ * @default 2
11
+ */
12
+ maxLines?: number;
13
+ /**
14
+ * How the container is positioned in the layout.
15
+ * @default 'static'
16
+ */
17
+ position?: 'static' | 'absolute';
18
+ }
19
+ /**
20
+ * LiveCaptions — a rolling caption overlay for meeting / video surfaces.
21
+ *
22
+ * Renders `role="log"` with `aria-live="polite"` so screen readers announce
23
+ * incoming cues without replaying the full history. Only the last `maxLines`
24
+ * cues are shown; non-final (interim) cues are rendered dimmed and italic.
25
+ * Logic and styles come from the headless `@refraction-ui/live-captions` core.
26
+ */
27
+ declare const LiveCaptions: React.ForwardRefExoticComponent<LiveCaptionsProps & React.RefAttributes<HTMLDivElement>>;
28
+
29
+ export { LiveCaptions, type LiveCaptionsProps };
@@ -0,0 +1,42 @@
1
+ import * as React from 'react';
2
+ import { CursorData } from '../live-cursors/index.js';
3
+ export { CURSOR_COLORS, CursorData, assignCursorColor } from '../live-cursors/index.js';
4
+
5
+ interface CursorProps {
6
+ /** Collaborator display name shown in the label chip. */
7
+ name: string;
8
+ /** Horizontal position in pixels from the left of the container. */
9
+ x: number;
10
+ /** Vertical position in pixels from the top of the container. */
11
+ y: number;
12
+ /** Hex color applied to both the SVG arrow and the label chip. */
13
+ color: string;
14
+ }
15
+ /**
16
+ * Cursor — a single labeled collaborator cursor (SVG arrow + name chip).
17
+ *
18
+ * Positioned absolutely via inline `left`/`top` style so it can be placed
19
+ * anywhere within its containing overlay. Color is applied via inline style
20
+ * (not a utility class) so each collaborator gets a unique hue without
21
+ * generating a CSS class per color.
22
+ */
23
+ declare const Cursor: React.NamedExoticComponent<CursorProps>;
24
+ interface LiveCursorsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color' | 'content'> {
25
+ /** Array of collaborator cursor data to render. */
26
+ cursors: CursorData[];
27
+ }
28
+ /**
29
+ * LiveCursors — an absolutely-positioned overlay that renders one `<Cursor>`
30
+ * per collaborator.
31
+ *
32
+ * Drop this as a direct child of a `position: relative` container (e.g. a
33
+ * canvas or whiteboard surface). It fills the container via `absolute inset-0`
34
+ * and is `pointer-events-none` so it never blocks interaction.
35
+ *
36
+ * Colors are resolved via `assignCursorColor` when a cursor entry has no
37
+ * explicit `color`. The overlay is marked `aria-hidden` — cursors are
38
+ * decorative presence indicators, not interactive elements.
39
+ */
40
+ declare const LiveCursors: React.ForwardRefExoticComponent<LiveCursorsProps & React.RefAttributes<HTMLDivElement>>;
41
+
42
+ export { Cursor, type CursorProps, LiveCursors, type LiveCursorsProps };
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+ import { TranscriptEntry } from '../live-transcript/index.js';
3
+ export { TranscriptEntry } from '../live-transcript/index.js';
4
+
5
+ interface LiveTranscriptProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'content' | 'color'> {
6
+ /** The ordered list of transcript entries to display. */
7
+ entries: TranscriptEntry[];
8
+ /** Tightens spacing between speaker blocks. */
9
+ compact?: boolean;
10
+ }
11
+ /**
12
+ * LiveTranscript — a speaker-attributed transcript panel for audio rooms and
13
+ * meetings.
14
+ *
15
+ * Consecutive entries from the same speaker are merged into a single block
16
+ * (one speaker header followed by all their text lines) so the panel stays
17
+ * readable. The container carries `role="log"` and `aria-live="polite"` so
18
+ * screen readers announce new entries without interrupting the user.
19
+ */
20
+ declare const LiveTranscript: React.ForwardRefExoticComponent<LiveTranscriptProps & React.RefAttributes<HTMLDivElement>>;
21
+
22
+ export { LiveTranscript, type LiveTranscriptProps };
@@ -0,0 +1,35 @@
1
+ import * as React from 'react';
2
+ import { MiniMapItem, Rect } from '../mini-map/index.js';
3
+ export { MiniMapItem, Rect } from '../mini-map/index.js';
4
+
5
+ interface MiniMapProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect' | 'results' | 'color' | 'content'> {
6
+ /** Items to render as dots on the minimap. */
7
+ items: MiniMapItem[];
8
+ /** Current viewport in world coordinates. Renders a viewport indicator rect. */
9
+ viewport?: Rect;
10
+ /** Width of the minimap box in px. */
11
+ width?: number;
12
+ /** Height of the minimap box in px. */
13
+ height?: number;
14
+ /** Padding inset in px (applied to all sides). */
15
+ padding?: number;
16
+ /**
17
+ * Called when the user clicks or drags in the minimap, with the new
18
+ * world-space viewport center `{ x, y }`.
19
+ */
20
+ onViewportChange?: (center: {
21
+ x: number;
22
+ y: number;
23
+ }) => void;
24
+ }
25
+ /**
26
+ * MiniMap — a canvas/editor overview map.
27
+ *
28
+ * Renders each `MiniMapItem` as a positioned dot and an optional `viewport`
29
+ * as a draggable indicator rectangle. All scale math lives in the headless
30
+ * `@refraction-ui/mini-map` core; the React layer only handles event binding
31
+ * and rendering. SSR-safe (no `Math.random` or `Date.now`).
32
+ */
33
+ declare const MiniMap: React.ForwardRefExoticComponent<MiniMapProps & React.RefAttributes<HTMLDivElement>>;
34
+
35
+ export { MiniMap, type MiniMapProps };
@@ -0,0 +1,26 @@
1
+ import * as React from 'react';
2
+ import { InputProps } from '../react-input/index.cjs';
3
+
4
+ interface PasswordInputProps extends Omit<InputProps, 'type' | 'leadingIcon'> {
5
+ /**
6
+ * Accessible label for the reveal (show password) action.
7
+ * @default 'Show password'
8
+ */
9
+ revealLabel?: string;
10
+ /**
11
+ * Accessible label for the hide action.
12
+ * @default 'Hide password'
13
+ */
14
+ hideLabel?: string;
15
+ }
16
+ /**
17
+ * PasswordInput — a password field with a built-in reveal/hide toggle.
18
+ *
19
+ * Wraps the styled {@link Input} from `@refraction-ui/react-input`, toggling
20
+ * the underlying input `type` between `'password'` and `'text'`. Forwards all
21
+ * Input props (`value`, `onChange`, `validationState`, `minLength`, …) through
22
+ * to the underlying element, including the `ref`.
23
+ */
24
+ declare const PasswordInput: React.ForwardRefExoticComponent<PasswordInputProps & React.RefAttributes<HTMLInputElement>>;
25
+
26
+ export { PasswordInput, type PasswordInputProps };
@@ -0,0 +1,26 @@
1
+ import * as React from 'react';
2
+ import { InputProps } from '../react-input/index.js';
3
+
4
+ interface PasswordInputProps extends Omit<InputProps, 'type' | 'leadingIcon'> {
5
+ /**
6
+ * Accessible label for the reveal (show password) action.
7
+ * @default 'Show password'
8
+ */
9
+ revealLabel?: string;
10
+ /**
11
+ * Accessible label for the hide action.
12
+ * @default 'Hide password'
13
+ */
14
+ hideLabel?: string;
15
+ }
16
+ /**
17
+ * PasswordInput — a password field with a built-in reveal/hide toggle.
18
+ *
19
+ * Wraps the styled {@link Input} from `@refraction-ui/react-input`, toggling
20
+ * the underlying input `type` between `'password'` and `'text'`. Forwards all
21
+ * Input props (`value`, `onChange`, `validationState`, `minLength`, …) through
22
+ * to the underlying element, including the `ref`.
23
+ */
24
+ declare const PasswordInput: React.ForwardRefExoticComponent<PasswordInputProps & React.RefAttributes<HTMLInputElement>>;
25
+
26
+ export { PasswordInput, type PasswordInputProps };
@@ -0,0 +1,47 @@
1
+ import * as React from 'react';
2
+ import { MediaDeviceOption } from '../pre-call-lobby/index.js';
3
+ export { DeviceKind, MediaDeviceOption, PreCallLobbyAPI, createPreCallLobby, micLevelToBars } from '../pre-call-lobby/index.js';
4
+
5
+ interface PreCallLobbyProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {
6
+ /** Whether the camera is on. */
7
+ cameraOn: boolean;
8
+ /** Whether the microphone is on. */
9
+ micOn: boolean;
10
+ /** Called when the user toggles the camera. */
11
+ onToggleCamera?: () => void;
12
+ /** Called when the user toggles the microphone. */
13
+ onToggleMic?: () => void;
14
+ /** Current microphone level (0..1). */
15
+ micLevel?: number;
16
+ /** Available cameras. */
17
+ cameras?: MediaDeviceOption[];
18
+ /** Available microphones. */
19
+ microphones?: MediaDeviceOption[];
20
+ /** Available speakers. */
21
+ speakers?: MediaDeviceOption[];
22
+ /** Currently selected camera id. */
23
+ selectedCamera?: string;
24
+ /** Currently selected microphone id. */
25
+ selectedMicrophone?: string;
26
+ /** Currently selected speaker id. */
27
+ selectedSpeaker?: string;
28
+ /** Called when the user changes a device. */
29
+ onDeviceChange?: (kind: 'camera' | 'microphone' | 'speaker', deviceId: string) => void;
30
+ /** Slot rendered inside the camera preview area when the camera is on. */
31
+ previewSlot?: React.ReactNode;
32
+ /** Label for the join button. */
33
+ joinLabel?: string;
34
+ /** Called when the user clicks the join button. */
35
+ onJoin?: () => void;
36
+ }
37
+ /**
38
+ * PreCallLobby — device-check panel shown before joining a meeting.
39
+ *
40
+ * Renders a camera preview, mic level meter, device selectors for camera /
41
+ * microphone / speaker, toggle buttons for cam and mic, and a primary join CTA.
42
+ * Logic and styles come from the headless `@refraction-ui/pre-call-lobby` core.
43
+ * All device controls are plain HTML elements — no external component deps.
44
+ */
45
+ declare const PreCallLobby: React.ForwardRefExoticComponent<PreCallLobbyProps & React.RefAttributes<HTMLDivElement>>;
46
+
47
+ export { PreCallLobby, type PreCallLobbyProps };
@@ -0,0 +1,43 @@
1
+ import * as React from 'react';
2
+ import { GaugeSize, GaugeZone } from '../radial-gauge/index.js';
3
+ export { GaugeSize, GaugeTone, GaugeZone } from '../radial-gauge/index.js';
4
+
5
+ interface RadialGaugeProps extends React.SVGAttributes<SVGSVGElement> {
6
+ /** Current value. */
7
+ value: number;
8
+ /** Minimum value. Defaults to 0. */
9
+ min?: number;
10
+ /** Maximum value. Defaults to 100. */
11
+ max?: number;
12
+ /** Visual size of the gauge. Defaults to 'md'. */
13
+ size?: GaugeSize;
14
+ /** Stroke thickness in px. Defaults to 8. */
15
+ thickness?: number;
16
+ /** Primary center label. When omitted and `showValue` is true, the numeric value is shown. */
17
+ label?: React.ReactNode;
18
+ /** Secondary label shown below the primary label. */
19
+ sublabel?: React.ReactNode;
20
+ /**
21
+ * Threshold zones that colour the arc based on the current value.
22
+ * List in ascending `upTo` order for clarity (internally sorted).
23
+ */
24
+ zones?: GaugeZone[];
25
+ /** Show the numeric value in the center when no explicit label is given. Defaults to true. */
26
+ showValue?: boolean;
27
+ /** Accessible name for the gauge. */
28
+ 'aria-label'?: string;
29
+ }
30
+ /**
31
+ * RadialGauge — a circular progress / gauge component.
32
+ *
33
+ * Renders an SVG with a background track ring and a value arc whose length is
34
+ * proportional to the current value fraction. Center text shows the value or a
35
+ * custom label. Supports semantic zone colouring (success / warning / danger)
36
+ * so the arc hue communicates health at a glance — ideal for score cards,
37
+ * interview report rings, and dashboard KPIs.
38
+ *
39
+ * Accessibility: `role="meter"` with `aria-valuenow/min/max` on the SVG.
40
+ */
41
+ declare const RadialGauge: React.ForwardRefExoticComponent<RadialGaugeProps & React.RefAttributes<SVGSVGElement>>;
42
+
43
+ export { RadialGauge, type RadialGaugeProps };
@@ -0,0 +1,38 @@
1
+ import * as React from 'react';
2
+ import { RatingScalePoint, RatingScaleSize } from '../rating-scale/index.js';
3
+ export { RatingScalePoint, RatingScaleSize } from '../rating-scale/index.js';
4
+
5
+ interface RatingScaleProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
6
+ /** Controlled selected value. */
7
+ value?: number;
8
+ /** Initial value for uncontrolled usage. */
9
+ defaultValue?: number;
10
+ /** Called with the newly selected value. */
11
+ onValueChange?: (value: number) => void;
12
+ /** Number of points (1..count). Ignored when `points` is provided. */
13
+ count?: number;
14
+ /** Explicit points with accessible labels. */
15
+ points?: RatingScalePoint[];
16
+ /** Label shown before the scale (the low end). */
17
+ minLabel?: React.ReactNode;
18
+ /** Label shown after the scale (the high end). */
19
+ maxLabel?: React.ReactNode;
20
+ /** Visual size. */
21
+ size?: RatingScaleSize;
22
+ /** Disables the whole scale. */
23
+ disabled?: boolean;
24
+ /** Accessible name for the group. */
25
+ 'aria-label'?: string;
26
+ }
27
+ /**
28
+ * RatingScale — a single-select ordinal rating / Likert control.
29
+ *
30
+ * Renders `role="radiogroup"`; each point is a `role="radio"` button with
31
+ * roving tabindex and arrow/Home/End keyboard navigation (clamped at the
32
+ * ends — ordinal scales don't wrap). Supports controlled (`value`) and
33
+ * uncontrolled (`defaultValue`) usage. Logic, point resolution, and styles
34
+ * come from the headless `@refraction-ui/rating-scale` core.
35
+ */
36
+ declare const RatingScale: React.ForwardRefExoticComponent<RatingScaleProps & React.RefAttributes<HTMLDivElement>>;
37
+
38
+ export { RatingScale, type RatingScaleProps };
@@ -0,0 +1,38 @@
1
+ import * as React from 'react';
2
+ import { SegmentedControlSize } from '../segmented-control/index.cjs';
3
+ export { SegmentedControlSize, SegmentedControlValue, createSegmentedControl, getNextSegmentIndex, segmentedControlItemVariants, segmentedControlVariants } from '../segmented-control/index.cjs';
4
+
5
+ interface SegmentedControlProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
6
+ /** Controlled selected item value. */
7
+ value?: string;
8
+ /** Initial selected value for uncontrolled usage. */
9
+ defaultValue?: string;
10
+ /** Called with the newly selected item value. */
11
+ onValueChange?: (value: string) => void;
12
+ /** Visual size of the control. */
13
+ size?: SegmentedControlSize;
14
+ }
15
+ /**
16
+ * SegmentedControl — a pill-shaped single-select control with radio semantics.
17
+ *
18
+ * Renders `role="radiogroup"`; each {@link SegmentedControlItem} is a
19
+ * `role="radio"`. Supports controlled (`value`/`onValueChange`) and
20
+ * uncontrolled (`defaultValue`) usage, roving tabindex, arrow-key navigation
21
+ * with wrap, and Home/End jumps. Logic/styles come from the headless
22
+ * `@refraction-ui/segmented-control` core; styling via Tailwind utilities only.
23
+ */
24
+ declare const SegmentedControl: React.ForwardRefExoticComponent<SegmentedControlProps & React.RefAttributes<HTMLDivElement>>;
25
+ interface SegmentedControlItemProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'value'> {
26
+ /** Value identifying this item; selected when it matches the group value. */
27
+ value: string;
28
+ }
29
+ /**
30
+ * SegmentedControlItem — a single selectable segment (`role="radio"`).
31
+ *
32
+ * Children may include a leading icon. Only the active item is tabbable
33
+ * (roving tabindex); arrow/Home/End keys delegate navigation to the group,
34
+ * which applies the shared `getNextSegmentIndex` rule from the core.
35
+ */
36
+ declare const SegmentedControlItem: React.ForwardRefExoticComponent<SegmentedControlItemProps & React.RefAttributes<HTMLButtonElement>>;
37
+
38
+ export { SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps };
@@ -0,0 +1,38 @@
1
+ import * as React from 'react';
2
+ import { SegmentedControlSize } from '../segmented-control/index.js';
3
+ export { SegmentedControlSize, SegmentedControlValue, createSegmentedControl, getNextSegmentIndex, segmentedControlItemVariants, segmentedControlVariants } from '../segmented-control/index.js';
4
+
5
+ interface SegmentedControlProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
6
+ /** Controlled selected item value. */
7
+ value?: string;
8
+ /** Initial selected value for uncontrolled usage. */
9
+ defaultValue?: string;
10
+ /** Called with the newly selected item value. */
11
+ onValueChange?: (value: string) => void;
12
+ /** Visual size of the control. */
13
+ size?: SegmentedControlSize;
14
+ }
15
+ /**
16
+ * SegmentedControl — a pill-shaped single-select control with radio semantics.
17
+ *
18
+ * Renders `role="radiogroup"`; each {@link SegmentedControlItem} is a
19
+ * `role="radio"`. Supports controlled (`value`/`onValueChange`) and
20
+ * uncontrolled (`defaultValue`) usage, roving tabindex, arrow-key navigation
21
+ * with wrap, and Home/End jumps. Logic/styles come from the headless
22
+ * `@refraction-ui/segmented-control` core; styling via Tailwind utilities only.
23
+ */
24
+ declare const SegmentedControl: React.ForwardRefExoticComponent<SegmentedControlProps & React.RefAttributes<HTMLDivElement>>;
25
+ interface SegmentedControlItemProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'value'> {
26
+ /** Value identifying this item; selected when it matches the group value. */
27
+ value: string;
28
+ }
29
+ /**
30
+ * SegmentedControlItem — a single selectable segment (`role="radio"`).
31
+ *
32
+ * Children may include a leading icon. Only the active item is tabbable
33
+ * (roving tabindex); arrow/Home/End keys delegate navigation to the group,
34
+ * which applies the shared `getNextSegmentIndex` rule from the core.
35
+ */
36
+ declare const SegmentedControlItem: React.ForwardRefExoticComponent<SegmentedControlItemProps & React.RefAttributes<HTMLButtonElement>>;
37
+
38
+ export { SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps };
@@ -0,0 +1,29 @@
1
+ import * as React from 'react';
2
+ import { SeparatorOrientation } from '../separator/index.cjs';
3
+
4
+ interface SeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
5
+ /** Orientation of the separator. Defaults to `'horizontal'`. */
6
+ orientation?: SeparatorOrientation;
7
+ /**
8
+ * Optional centered label. Only meaningful for horizontal separators —
9
+ * renders a line on each side of the label (a "labeled divider").
10
+ */
11
+ label?: React.ReactNode;
12
+ /**
13
+ * When `true` (the default) the separator is purely visual and is hidden
14
+ * from assistive tech (`role="none"`). When `false` it is exposed as a
15
+ * semantic `role="separator"` with the appropriate `aria-orientation`.
16
+ */
17
+ decorative?: boolean;
18
+ }
19
+ /**
20
+ * Separator / LabeledDivider — a thin rule that visually divides content.
21
+ *
22
+ * Supports horizontal and vertical orientations and an optional centered
23
+ * label (the "labeled divider" variant, horizontal only). State and ARIA
24
+ * semantics come from the headless @refraction-ui/separator core; styling
25
+ * via Tailwind utility classes (no external CSS-in-JS).
26
+ */
27
+ declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
28
+
29
+ export { Separator, type SeparatorProps };
@@ -0,0 +1,29 @@
1
+ import * as React from 'react';
2
+ import { SeparatorOrientation } from '../separator/index.js';
3
+
4
+ interface SeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
5
+ /** Orientation of the separator. Defaults to `'horizontal'`. */
6
+ orientation?: SeparatorOrientation;
7
+ /**
8
+ * Optional centered label. Only meaningful for horizontal separators —
9
+ * renders a line on each side of the label (a "labeled divider").
10
+ */
11
+ label?: React.ReactNode;
12
+ /**
13
+ * When `true` (the default) the separator is purely visual and is hidden
14
+ * from assistive tech (`role="none"`). When `false` it is exposed as a
15
+ * semantic `role="separator"` with the appropriate `aria-orientation`.
16
+ */
17
+ decorative?: boolean;
18
+ }
19
+ /**
20
+ * Separator / LabeledDivider — a thin rule that visually divides content.
21
+ *
22
+ * Supports horizontal and vertical orientations and an optional centered
23
+ * label (the "labeled divider" variant, horizontal only). State and ARIA
24
+ * semantics come from the headless @refraction-ui/separator core; styling
25
+ * via Tailwind utility classes (no external CSS-in-JS).
26
+ */
27
+ declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
28
+
29
+ export { Separator, type SeparatorProps };
@@ -0,0 +1,31 @@
1
+ import * as React from 'react';
2
+ import { ButtonProps } from '../react-button/index.cjs';
3
+ import { SocialProvider } from '../social-auth-button/index.cjs';
4
+ export { SocialProvider } from '../social-auth-button/index.cjs';
5
+
6
+ interface SocialAuthButtonProps extends Omit<ButtonProps, 'variant' | 'children'> {
7
+ /** Identity provider this button authenticates against. */
8
+ provider: SocialProvider;
9
+ /** Marks this as the provider the user signed in with last. */
10
+ lastUsed?: boolean;
11
+ /** Shows a spinner and disables interaction. */
12
+ loading?: boolean;
13
+ }
14
+ /**
15
+ * A branded social sign-in button built on the outline Button. Renders the
16
+ * provider's brand icon and a "Continue with …" label, with optional loading
17
+ * and "Last used" affordances. Labels, the `data-provider` hook, and the
18
+ * monochrome decision come from the headless @refraction-ui/social-auth-button
19
+ * core; only the icon markup lives here.
20
+ */
21
+ declare const SocialAuthButton: React.ForwardRefExoticComponent<SocialAuthButtonProps & React.RefAttributes<HTMLButtonElement>>;
22
+ interface SocialAuthRowProps extends React.HTMLAttributes<HTMLDivElement> {
23
+ children?: React.ReactNode;
24
+ }
25
+ /**
26
+ * Responsive grid wrapper for SocialAuthButtons: one column on mobile, two
27
+ * columns from the `sm` breakpoint up.
28
+ */
29
+ declare const SocialAuthRow: React.ForwardRefExoticComponent<SocialAuthRowProps & React.RefAttributes<HTMLDivElement>>;
30
+
31
+ export { SocialAuthButton, type SocialAuthButtonProps, SocialAuthRow, type SocialAuthRowProps };
@@ -0,0 +1,31 @@
1
+ import * as React from 'react';
2
+ import { ButtonProps } from '../react-button/index.js';
3
+ import { SocialProvider } from '../social-auth-button/index.js';
4
+ export { SocialProvider } from '../social-auth-button/index.js';
5
+
6
+ interface SocialAuthButtonProps extends Omit<ButtonProps, 'variant' | 'children'> {
7
+ /** Identity provider this button authenticates against. */
8
+ provider: SocialProvider;
9
+ /** Marks this as the provider the user signed in with last. */
10
+ lastUsed?: boolean;
11
+ /** Shows a spinner and disables interaction. */
12
+ loading?: boolean;
13
+ }
14
+ /**
15
+ * A branded social sign-in button built on the outline Button. Renders the
16
+ * provider's brand icon and a "Continue with …" label, with optional loading
17
+ * and "Last used" affordances. Labels, the `data-provider` hook, and the
18
+ * monochrome decision come from the headless @refraction-ui/social-auth-button
19
+ * core; only the icon markup lives here.
20
+ */
21
+ declare const SocialAuthButton: React.ForwardRefExoticComponent<SocialAuthButtonProps & React.RefAttributes<HTMLButtonElement>>;
22
+ interface SocialAuthRowProps extends React.HTMLAttributes<HTMLDivElement> {
23
+ children?: React.ReactNode;
24
+ }
25
+ /**
26
+ * Responsive grid wrapper for SocialAuthButtons: one column on mobile, two
27
+ * columns from the `sm` breakpoint up.
28
+ */
29
+ declare const SocialAuthRow: React.ForwardRefExoticComponent<SocialAuthRowProps & React.RefAttributes<HTMLDivElement>>;
30
+
31
+ export { SocialAuthButton, type SocialAuthButtonProps, SocialAuthRow, type SocialAuthRowProps };
@@ -0,0 +1,39 @@
1
+ import * as React from 'react';
2
+ import { StickyNoteColor } from '../sticky-note/index.js';
3
+ export { STICKY_NOTE_COLORS, StickyNoteColor, nextStickyColor } from '../sticky-note/index.js';
4
+
5
+ interface StickyNoteProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color' | 'content' | 'onSelect'> {
6
+ /** Color of the sticky note. */
7
+ color?: StickyNoteColor;
8
+ /** Text content of the note. */
9
+ text?: string;
10
+ /** Called when the text changes (makes text editable via a textarea). */
11
+ onTextChange?: (value: string) => void;
12
+ /** Optional author name shown in the note footer. */
13
+ author?: string;
14
+ /** Absolute x position in pixels (for board/canvas placement). */
15
+ x?: number;
16
+ /** Absolute y position in pixels (for board/canvas placement). */
17
+ y?: number;
18
+ /** Whether the note can be dragged. Requires `onMove` to receive updates. */
19
+ draggable?: boolean;
20
+ /** Called with the new `{ x, y }` position after a drag completes. */
21
+ onMove?: (position: {
22
+ x: number;
23
+ y: number;
24
+ }) => void;
25
+ }
26
+ /**
27
+ * StickyNote — a draggable colored note for whiteboard / canvas surfaces.
28
+ *
29
+ * - `color` selects the soft-tint palette (yellow, pink, blue, green, purple, orange).
30
+ * - `text` + `onTextChange` switch to an editable textarea; without `onTextChange` the
31
+ * text is static.
32
+ * - `x` / `y` absolutely position the note; pair with `draggable` + `onMove` for
33
+ * drag-to-reposition. Drag is implemented via pointer events and is SSR-safe (no
34
+ * handlers attach until the component mounts on the client).
35
+ * - Forwards the ref to the outer `<div>`.
36
+ */
37
+ declare const StickyNote: React.ForwardRefExoticComponent<StickyNoteProps & React.RefAttributes<HTMLDivElement>>;
38
+
39
+ export { StickyNote, type StickyNoteProps };
@@ -0,0 +1,39 @@
1
+ import * as React from 'react';
2
+ import { TerminalLine } from '../terminal/index.js';
3
+ export { TerminalLine, TerminalLineKind } from '../terminal/index.js';
4
+
5
+ /** Height cap for the scrollable terminal surface. */
6
+ type TerminalMaxHeight = 'sm' | 'md' | 'lg' | 'none';
7
+ interface TerminalProps extends React.HTMLAttributes<HTMLDivElement> {
8
+ /** Lines to render in order. Each line's `kind` determines its styling. */
9
+ lines: TerminalLine[];
10
+ /**
11
+ * Prompt symbol prepended to `command` lines.
12
+ * @default '$'
13
+ */
14
+ promptSymbol?: string;
15
+ /**
16
+ * Maximum height of the scroll region before it becomes scrollable.
17
+ * @default 'md'
18
+ */
19
+ maxHeight?: TerminalMaxHeight;
20
+ /** Accessible label for the live region (e.g. `'Run output'`). */
21
+ 'aria-label'?: string;
22
+ }
23
+ /**
24
+ * Terminal — a read-only output console panel.
25
+ *
26
+ * Renders a monospaced scroll region (`role="log"`, `aria-live="polite"`) with
27
+ * each line styled by its semantic kind:
28
+ * - `command` — foreground bold, prefixed with the prompt symbol
29
+ * - `stdout` — foreground
30
+ * - `stderr` — destructive (error token)
31
+ * - `info` — muted-foreground
32
+ * - `success` — emerald / success token
33
+ *
34
+ * This is a presentational component — it has no internal state and does not
35
+ * handle keyboard input (v1). Pass new lines from the parent to stream output.
36
+ */
37
+ declare const Terminal: React.ForwardRefExoticComponent<TerminalProps & React.RefAttributes<HTMLDivElement>>;
38
+
39
+ export { Terminal, type TerminalMaxHeight, type TerminalProps };
@@ -0,0 +1,21 @@
1
+ import * as React from 'react';
2
+ import { TestResultData } from '../test-results/index.js';
3
+ export { TestResultData, TestStatus } from '../test-results/index.js';
4
+
5
+ interface TestResultsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'results'> {
6
+ /** Array of test case results to display. */
7
+ results: TestResultData[];
8
+ /** When true, renders a summary bar showing "{passed}/{total} passed". */
9
+ showSummary?: boolean;
10
+ }
11
+ /**
12
+ * TestResults — displays a list of test case results with pass/fail/skip
13
+ * status, optional expected/actual diff for failures, and an optional summary
14
+ * bar.
15
+ *
16
+ * Renders `role="list"` on the container; each row has `role="listitem"`.
17
+ * Logic and styles come from the headless `@refraction-ui/test-results` core.
18
+ */
19
+ declare const TestResults: React.ForwardRefExoticComponent<TestResultsProps & React.RefAttributes<HTMLDivElement>>;
20
+
21
+ export { TestResults, type TestResultsProps };