@refraction-ui/react 0.13.0 → 0.15.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/dist/index.cjs +4244 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +4199 -3
- package/dist/index.js.map +1 -1
- package/dist/internal/audio-room/index.d.ts +91 -0
- package/dist/internal/browser-chrome-mock/index.d.ts +57 -0
- package/dist/internal/call-controls/index.d.ts +83 -0
- package/dist/internal/checklist/index.d.ts +84 -0
- package/dist/internal/editor-status-bar/index.d.ts +70 -0
- package/dist/internal/editor-tabs/index.d.ts +68 -0
- package/dist/internal/floating-reactions/index.d.ts +98 -0
- package/dist/internal/flow-editor/index.d.ts +91 -0
- package/dist/internal/graph-view/index.d.ts +107 -0
- package/dist/internal/infinite-canvas/index.d.ts +74 -0
- package/dist/internal/live-captions/index.d.ts +59 -0
- package/dist/internal/live-cursors/index.d.ts +65 -0
- package/dist/internal/live-transcript/index.d.ts +73 -0
- package/dist/internal/mastery-bar/index.d.ts +60 -0
- package/dist/internal/mini-map/index.d.ts +81 -0
- package/dist/internal/numbered-steps/index.d.ts +71 -0
- package/dist/internal/pre-call-lobby/index.d.ts +97 -0
- package/dist/internal/pricing-card/index.d.ts +61 -0
- package/dist/internal/radial-gauge/index.d.ts +120 -0
- package/dist/internal/rating-scale/index.d.ts +76 -0
- package/dist/internal/react-audience-feature-card/index.d.ts +22 -0
- package/dist/internal/react-audio-room/index.d.ts +39 -0
- package/dist/internal/react-brand-network-cell/index.d.ts +30 -0
- package/dist/internal/react-browser-chrome-mock/index.d.ts +21 -0
- package/dist/internal/react-call-controls/index.d.ts +44 -0
- package/dist/internal/react-checklist/index.d.ts +27 -0
- package/dist/internal/react-editor-status-bar/index.d.ts +43 -0
- package/dist/internal/react-editor-tabs/index.d.ts +25 -0
- package/dist/internal/react-floating-reactions/index.d.ts +65 -0
- package/dist/internal/react-flow-editor/index.d.ts +35 -0
- package/dist/internal/react-graph-view/index.d.ts +25 -0
- package/dist/internal/react-infinite-canvas/index.d.ts +40 -0
- package/dist/internal/react-live-captions/index.d.ts +29 -0
- package/dist/internal/react-live-cursors/index.d.ts +42 -0
- package/dist/internal/react-live-transcript/index.d.ts +22 -0
- package/dist/internal/react-marquee-strip/index.d.ts +33 -0
- package/dist/internal/react-mastery-bar/index.d.ts +26 -0
- package/dist/internal/react-mini-map/index.d.ts +35 -0
- package/dist/internal/react-numbered-steps/index.d.ts +24 -0
- package/dist/internal/react-pre-call-lobby/index.d.ts +47 -0
- package/dist/internal/react-pricing-card/index.d.ts +40 -0
- package/dist/internal/react-radial-gauge/index.d.ts +43 -0
- package/dist/internal/react-rating-scale/index.d.ts +38 -0
- package/dist/internal/react-section-head/index.d.ts +27 -0
- package/dist/internal/react-stat-grid/index.d.ts +29 -0
- package/dist/internal/react-sticky-note/index.d.ts +39 -0
- package/dist/internal/react-terminal/index.d.ts +39 -0
- package/dist/internal/react-test-results/index.d.ts +21 -0
- package/dist/internal/react-timeline/index.d.ts +35 -0
- package/dist/internal/react-video-grid/index.d.ts +33 -0
- package/dist/internal/react-video-tile/index.d.ts +41 -0
- package/dist/internal/react-wizard/index.d.ts +59 -0
- package/dist/internal/section-head/index.d.ts +36 -0
- package/dist/internal/stat-grid/index.d.ts +45 -0
- package/dist/internal/sticky-note/index.d.ts +49 -0
- package/dist/internal/terminal/index.d.ts +65 -0
- package/dist/internal/test-results/index.d.ts +97 -0
- package/dist/internal/timeline/index.d.ts +111 -0
- package/dist/internal/video-grid/index.d.ts +83 -0
- package/dist/internal/video-tile/index.d.ts +88 -0
- package/dist/internal/wizard/index.d.ts +148 -0
- package/package.json +33 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { FloatingReaction } from '../floating-reactions/index.js';
|
|
4
|
+
export { FloatingReaction } from '../floating-reactions/index.js';
|
|
5
|
+
|
|
6
|
+
interface FloatingReactionsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color' | 'content'> {
|
|
7
|
+
/**
|
|
8
|
+
* Controlled list of reactions currently visible in the overlay. The parent
|
|
9
|
+
* is responsible for adding items and removing them after REACTION_LIFETIME_MS
|
|
10
|
+
* (or use the useFloatingReactions hook which handles this automatically).
|
|
11
|
+
*/
|
|
12
|
+
reactions: FloatingReaction[];
|
|
13
|
+
/**
|
|
14
|
+
* Total number of horizontal lane buckets used to spread reactions.
|
|
15
|
+
* @default 5
|
|
16
|
+
*/
|
|
17
|
+
lanes?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* FloatingReactions — a controlled overlay that renders transient emoji
|
|
21
|
+
* reactions floating upward. Intended to be positioned absolutely over a
|
|
22
|
+
* meeting/video surface.
|
|
23
|
+
*
|
|
24
|
+
* - Reactions animate upward and fade via `animate-[float-up_3s_ease-out_forwards]`.
|
|
25
|
+
* Consumers must supply the `@keyframes float-up` rule (see
|
|
26
|
+
* `floatingReactionItemClass` in the core styles for the recommended keyframe).
|
|
27
|
+
* - The overlay is `pointer-events-none` so it never blocks interaction.
|
|
28
|
+
* - role="status" aria-live="polite" announces new reactions to screen readers.
|
|
29
|
+
*/
|
|
30
|
+
declare const FloatingReactions: React.ForwardRefExoticComponent<FloatingReactionsProps & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
interface ReactionBurstProps {
|
|
32
|
+
emoji: string;
|
|
33
|
+
lane?: number;
|
|
34
|
+
lanes?: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* ReactionBurst renders a single emoji at the specified lane offset — useful
|
|
38
|
+
* for static demos or Storybook stories showing a specific burst position.
|
|
39
|
+
*/
|
|
40
|
+
declare function ReactionBurst({ emoji, lane, lanes }: ReactionBurstProps): react_jsx_runtime.JSX.Element;
|
|
41
|
+
interface UseFloatingReactionsResult {
|
|
42
|
+
reactions: FloatingReaction[];
|
|
43
|
+
/**
|
|
44
|
+
* Add an emoji reaction. An auto-incrementing id (not Math.random) is
|
|
45
|
+
* generated internally unless you pass one explicitly.
|
|
46
|
+
*/
|
|
47
|
+
emit: (emoji: string, options?: {
|
|
48
|
+
id?: string;
|
|
49
|
+
lane?: number;
|
|
50
|
+
}) => void;
|
|
51
|
+
/** Remove all current reactions immediately. */
|
|
52
|
+
clear: () => void;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Manages a list of FloatingReaction items with automatic expiry after
|
|
56
|
+
* REACTION_LIFETIME_MS. IDs use an incrementing ref counter — no Math.random.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* const { reactions, emit } = useFloatingReactions()
|
|
60
|
+
* // <FloatingReactions reactions={reactions} />
|
|
61
|
+
* // <button onClick={() => emit('👋')}>Wave</button>
|
|
62
|
+
*/
|
|
63
|
+
declare function useFloatingReactions(): UseFloatingReactionsResult;
|
|
64
|
+
|
|
65
|
+
export { FloatingReactions, type FloatingReactionsProps, ReactionBurst, type ReactionBurstProps, type UseFloatingReactionsResult, useFloatingReactions };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { FlowNode, FlowEdge } from '../flow-editor/index.js';
|
|
3
|
+
export { FlowEdge, FlowNode } from '../flow-editor/index.js';
|
|
4
|
+
|
|
5
|
+
interface FlowEditorProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect' | 'results' | 'color' | 'content'> {
|
|
6
|
+
/** The nodes to render on the canvas. */
|
|
7
|
+
nodes: FlowNode[];
|
|
8
|
+
/** The directed edges connecting nodes. */
|
|
9
|
+
edges: FlowEdge[];
|
|
10
|
+
/** Called when a node is clicked; receives the node's id. */
|
|
11
|
+
onNodeClick?: (id: string) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Called when a node has been dragged to a new position.
|
|
14
|
+
* Receives the node id and the new (x, y) canvas coordinates.
|
|
15
|
+
*/
|
|
16
|
+
onNodeMove?: (id: string, x: number, y: number) => void;
|
|
17
|
+
/** Override the rendering of individual node boxes. */
|
|
18
|
+
renderNode?: (node: FlowNode) => React.ReactNode;
|
|
19
|
+
/** Id of the currently selected node (controlled). */
|
|
20
|
+
selectedId?: string;
|
|
21
|
+
/** Whether to show the pan/zoom grid. */
|
|
22
|
+
showGrid?: boolean;
|
|
23
|
+
/** Whether to show zoom/pan controls. */
|
|
24
|
+
showControls?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* FlowEditor — a node-and-edge diagram editor.
|
|
28
|
+
*
|
|
29
|
+
* Renders inside `<InfiniteCanvas>` so the whole graph is pan/zoomable.
|
|
30
|
+
* Edges are drawn as SVG cubic bezier paths behind the node boxes.
|
|
31
|
+
* Node drag is kept deliberately simple (pointer events, no external dep).
|
|
32
|
+
*/
|
|
33
|
+
declare const FlowEditor: React.ForwardRefExoticComponent<FlowEditorProps & React.RefAttributes<HTMLDivElement>>;
|
|
34
|
+
|
|
35
|
+
export { FlowEditor, type FlowEditorProps };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { GraphNode, GraphEdge } from '../graph-view/index.js';
|
|
3
|
+
export { GraphEdge, GraphNode, GraphNodeState } from '../graph-view/index.js';
|
|
4
|
+
|
|
5
|
+
interface GraphViewProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect' | 'color' | 'content' | 'results'> {
|
|
6
|
+
/** Nodes to render. */
|
|
7
|
+
nodes: GraphNode[];
|
|
8
|
+
/** Directed edges connecting nodes. */
|
|
9
|
+
edges: GraphEdge[];
|
|
10
|
+
/** Called when a node chip is clicked (read-only — no selection state). */
|
|
11
|
+
onNodeClick?: (node: GraphNode) => void;
|
|
12
|
+
/** Show a legend summarising mastery-state counts. */
|
|
13
|
+
showLegend?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* GraphView — a read-only knowledge / dependency graph rendered inside an
|
|
17
|
+
* InfiniteCanvas (pan + zoom). Concept nodes are coloured by mastery state;
|
|
18
|
+
* edges are SVG curves. An optional legend shows per-state node counts.
|
|
19
|
+
*
|
|
20
|
+
* The component is intentionally read-only: clicking a node fires `onNodeClick`
|
|
21
|
+
* but never mutates the `nodes` array — the caller owns the data.
|
|
22
|
+
*/
|
|
23
|
+
declare const GraphView: React.ForwardRefExoticComponent<GraphViewProps & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
|
|
25
|
+
export { GraphView, type GraphViewProps };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { CanvasTransform, Bounds } from '../infinite-canvas/index.js';
|
|
3
|
+
export { Bounds, CanvasTransform } from '../infinite-canvas/index.js';
|
|
4
|
+
|
|
5
|
+
interface InfiniteCanvasProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color' | 'content'> {
|
|
6
|
+
/** Controlled zoom level. */
|
|
7
|
+
zoom?: number;
|
|
8
|
+
/** Controlled pan offset (x). */
|
|
9
|
+
x?: number;
|
|
10
|
+
/** Controlled pan offset (y). */
|
|
11
|
+
y?: number;
|
|
12
|
+
/** Whether pointer-drag-to-pan is enabled (uncontrolled mode). */
|
|
13
|
+
pan?: boolean;
|
|
14
|
+
/** Minimum zoom level (default 0.25). */
|
|
15
|
+
minZoom?: number;
|
|
16
|
+
/** Maximum zoom level (default 4). */
|
|
17
|
+
maxZoom?: number;
|
|
18
|
+
/** Show a dot-grid background. */
|
|
19
|
+
showGrid?: boolean;
|
|
20
|
+
/** Show the zoom-controls overlay (+, −, fit). */
|
|
21
|
+
showControls?: boolean;
|
|
22
|
+
/** Called when the transform changes (wheel or drag in uncontrolled mode). */
|
|
23
|
+
onTransformChange?: (transform: CanvasTransform) => void;
|
|
24
|
+
/** Content bounds used by the fit/reset control. */
|
|
25
|
+
contentBounds?: Bounds;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* InfiniteCanvas — a pan/zoom viewport foundation.
|
|
29
|
+
*
|
|
30
|
+
* Renders a `role="group"` container that clips children and applies a CSS
|
|
31
|
+
* transform to a content layer, enabling infinite-canvas interactions
|
|
32
|
+
* (whiteboard, system-design diagram, goal-graph).
|
|
33
|
+
*
|
|
34
|
+
* Supports controlled (`zoom`/`x`/`y`) and uncontrolled usage. Wheel-to-zoom
|
|
35
|
+
* and pointer-drag-to-pan are enabled by default in uncontrolled mode. All
|
|
36
|
+
* pointer handlers are registered after mount so they are SSR-safe.
|
|
37
|
+
*/
|
|
38
|
+
declare const InfiniteCanvas: React.ForwardRefExoticComponent<InfiniteCanvasProps & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
+
|
|
40
|
+
export { InfiniteCanvas, type InfiniteCanvasProps };
|
|
@@ -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,33 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface MarqueeStripProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color' | 'content'> {
|
|
4
|
+
/** Eyebrow label shown before the items. */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** List of text items to display. */
|
|
7
|
+
items: string[];
|
|
8
|
+
/**
|
|
9
|
+
* When `true` the items scroll continuously using a CSS `marquee` keyframe.
|
|
10
|
+
* The keyframe must be defined in the consuming app's global CSS:
|
|
11
|
+
*
|
|
12
|
+
* ```css
|
|
13
|
+
* @keyframes marquee {
|
|
14
|
+
* from { transform: translateX(0); }
|
|
15
|
+
* to { transform: translateX(-50%); }
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
scroll?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* MarqueeStrip — a full-width label + tag strip, optionally scrolling.
|
|
25
|
+
*
|
|
26
|
+
* Static mode (`scroll={false}`, default): items flex-wrap in a row after the
|
|
27
|
+
* label. Scroll mode: items loop continuously via a CSS marquee animation;
|
|
28
|
+
* items are duplicated once internally for a seamless loop. Logic and
|
|
29
|
+
* data attributes come from the headless `@refraction-ui/marquee-strip` core.
|
|
30
|
+
*/
|
|
31
|
+
declare const MarqueeStrip: React.ForwardRefExoticComponent<MarqueeStripProps & React.RefAttributes<HTMLDivElement>>;
|
|
32
|
+
|
|
33
|
+
export { MarqueeStrip, type MarqueeStripProps };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { MasteryBarSize } from '../mastery-bar/index.js';
|
|
3
|
+
export { MasteryBarSize } from '../mastery-bar/index.js';
|
|
4
|
+
|
|
5
|
+
interface MasteryBarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color' | 'content' | 'results'> {
|
|
6
|
+
/** Progress value (0–100). Values outside this range are clamped. */
|
|
7
|
+
value: number;
|
|
8
|
+
/** Label shown on the right side of the header row. */
|
|
9
|
+
label?: string;
|
|
10
|
+
/** Label shown on the left side of the header row. */
|
|
11
|
+
leadingLabel?: string;
|
|
12
|
+
/** Visual size of the track. */
|
|
13
|
+
size?: MasteryBarSize;
|
|
14
|
+
/** Renders the fill at reduced opacity to indicate a muted/secondary state. */
|
|
15
|
+
muted?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* MasteryBar — a labelled linear progress bar for skill/concept mastery.
|
|
19
|
+
*
|
|
20
|
+
* Renders `role="progressbar"` with aria-valuenow/min/max. Optionally renders
|
|
21
|
+
* a header row with a leading label (left) and a trailing label (right). Logic
|
|
22
|
+
* and styles come from the headless `@refraction-ui/mastery-bar` core.
|
|
23
|
+
*/
|
|
24
|
+
declare const MasteryBar: React.ForwardRefExoticComponent<MasteryBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
|
|
26
|
+
export { MasteryBar, type MasteryBarProps };
|
|
@@ -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,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { NumberedStepItem } from '../numbered-steps/index.js';
|
|
3
|
+
export { NumberedStepItem } from '../numbered-steps/index.js';
|
|
4
|
+
|
|
5
|
+
interface NumberedStepsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color' | 'content'> {
|
|
6
|
+
/** The step items to display (3–5 recommended). */
|
|
7
|
+
items: NumberedStepItem[];
|
|
8
|
+
/**
|
|
9
|
+
* Override the number of grid columns. Defaults to clamping item count to
|
|
10
|
+
* 2–5 via `stepColumns`.
|
|
11
|
+
*/
|
|
12
|
+
columns?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* NumberedSteps — a static how-it-works step grid.
|
|
16
|
+
*
|
|
17
|
+
* Renders a CSS grid of step cards, each with a zero-padded ordinal badge
|
|
18
|
+
* (01, 02…), a title, and body copy. Not a stateful stepper — use the `Steps`
|
|
19
|
+
* component for that. Exposes `role="list"` semantics with each card as
|
|
20
|
+
* `role="listitem"`.
|
|
21
|
+
*/
|
|
22
|
+
declare const NumberedSteps: React.ForwardRefExoticComponent<NumberedStepsProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
|
|
24
|
+
export { NumberedSteps, type NumberedStepsProps };
|
|
@@ -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,40 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PricingCtaVariant } from '../pricing-card/index.js';
|
|
3
|
+
export { PricingCtaVariant } from '../pricing-card/index.js';
|
|
4
|
+
|
|
5
|
+
interface PricingCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'content'> {
|
|
6
|
+
/** Optional badge label shown above the plan name (e.g. "Most popular"). */
|
|
7
|
+
badge?: string;
|
|
8
|
+
/** Plan name (e.g. "Pro", "Starter"). */
|
|
9
|
+
name: string;
|
|
10
|
+
/** Price string (e.g. "$29", "Free"). */
|
|
11
|
+
price: string;
|
|
12
|
+
/** Billing period or qualifier (e.g. "/ month"). */
|
|
13
|
+
period?: string;
|
|
14
|
+
/** Short marketing description. */
|
|
15
|
+
description?: string;
|
|
16
|
+
/** List of included features to render as a checklist. */
|
|
17
|
+
features: string[];
|
|
18
|
+
/** CTA button/link label. */
|
|
19
|
+
cta: string;
|
|
20
|
+
/** Visual variant for the CTA. */
|
|
21
|
+
ctaVariant?: PricingCtaVariant;
|
|
22
|
+
/** When provided, the CTA renders as an `<a>` tag. */
|
|
23
|
+
ctaHref?: string;
|
|
24
|
+
/** Click handler for the CTA button (ignored when `ctaHref` is provided). */
|
|
25
|
+
onCtaClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
26
|
+
/** Highlights the card with a primary ring. */
|
|
27
|
+
featured?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* PricingCard — a self-contained pricing plan card.
|
|
31
|
+
*
|
|
32
|
+
* Renders an optional badge, the plan name, price + optional period, optional
|
|
33
|
+
* description, a feature checklist, and a full-width CTA (anchor when
|
|
34
|
+
* `ctaHref` is set, button otherwise). The `featured` prop adds a primary-
|
|
35
|
+
* colour ring to highlight the recommended plan. Logic and styles come from
|
|
36
|
+
* the headless `@refraction-ui/pricing-card` core.
|
|
37
|
+
*/
|
|
38
|
+
declare const PricingCard: React.ForwardRefExoticComponent<PricingCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
+
|
|
40
|
+
export { PricingCard, type PricingCardProps };
|
|
@@ -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,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { SectionHeadAlign } from '../section-head/index.js';
|
|
3
|
+
export { SectionHeadAlign } from '../section-head/index.js';
|
|
4
|
+
|
|
5
|
+
interface SectionHeadProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
6
|
+
/** Optional eyebrow / kicker rendered above the title. */
|
|
7
|
+
kicker?: React.ReactNode;
|
|
8
|
+
/** Primary heading content (required). */
|
|
9
|
+
title: React.ReactNode;
|
|
10
|
+
/** Optional lede paragraph rendered below the title. */
|
|
11
|
+
lede?: React.ReactNode;
|
|
12
|
+
/** Horizontal alignment of the cluster. */
|
|
13
|
+
align?: SectionHeadAlign;
|
|
14
|
+
/** Override the heading element rendered for the title. Defaults to `h2`. */
|
|
15
|
+
as?: 'h1' | 'h2' | 'h3';
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* SectionHead — marketing section heading cluster.
|
|
19
|
+
*
|
|
20
|
+
* Renders an optional small-caps kicker above an `<h2>` title (configurable
|
|
21
|
+
* via `as`) with an optional lede paragraph below. Alignment is controlled via
|
|
22
|
+
* the `align` prop; layout classes come from the headless
|
|
23
|
+
* `@refraction-ui/section-head` core.
|
|
24
|
+
*/
|
|
25
|
+
declare const SectionHead: React.ForwardRefExoticComponent<SectionHeadProps & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
|
|
27
|
+
export { SectionHead, type SectionHeadProps };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export { StatItem, statColumns } from '../stat-grid/index.js';
|
|
3
|
+
|
|
4
|
+
interface StatGridItem {
|
|
5
|
+
/** The primary value displayed prominently. Allows rich content in React. */
|
|
6
|
+
value: React.ReactNode;
|
|
7
|
+
/** The descriptive label shown below the value. */
|
|
8
|
+
label: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
interface StatGridProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'content'> {
|
|
11
|
+
/** The stat items to display in the grid. */
|
|
12
|
+
items: StatGridItem[];
|
|
13
|
+
/**
|
|
14
|
+
* Number of columns. Defaults to `statColumns(items.length)`:
|
|
15
|
+
* 1 item → 1, 2 items → 2, 3+ items → 3.
|
|
16
|
+
*/
|
|
17
|
+
columns?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* StatGrid — a marketing-style grid of stat callouts.
|
|
21
|
+
*
|
|
22
|
+
* Each item shows a large bold value and a small muted label. The grid
|
|
23
|
+
* automatically computes the column count from the number of items, or you can
|
|
24
|
+
* override it with `columns`. Uses `role="list"` / `role="listitem"` for
|
|
25
|
+
* accessible enumeration.
|
|
26
|
+
*/
|
|
27
|
+
declare const StatGrid: React.ForwardRefExoticComponent<StatGridProps & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
|
|
29
|
+
export { StatGrid, type StatGridItem, type StatGridProps };
|
|
@@ -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 };
|