@opencxh/ui-kit 3.176.0 → 3.177.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 +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1876 -1728
- package/dist/index.js.map +1 -1
- package/dist/src/feedback/StatusDot.d.ts +1 -2
- package/dist/src/feedback/StepIndicator.d.ts +1 -2
- package/dist/src/index.d.ts +1 -0
- package/dist/src/input/MentionComposer.d.ts +42 -0
- package/dist/src/meeting/VideoSurface.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
export interface StatusDotProps {
|
|
3
2
|
/**
|
|
4
3
|
* Meaning, not colour. `neutral` is the off/idle state; `accent` marks
|
|
@@ -19,4 +18,4 @@ export interface StatusDotProps {
|
|
|
19
18
|
className?: string;
|
|
20
19
|
}
|
|
21
20
|
/** Small state marker: presence, session state, unread, live recording. */
|
|
22
|
-
export declare function StatusDot({ tone, shape, pulse, label, className, }: StatusDotProps):
|
|
21
|
+
export declare function StatusDot({ tone, shape, pulse, label, className, }: StatusDotProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
export interface StepIndicatorProps {
|
|
3
2
|
/** Step ids in order. Only the position matters; the ids identify `current`. */
|
|
4
3
|
steps: string[];
|
|
@@ -18,4 +17,4 @@ export interface StepIndicatorProps {
|
|
|
18
17
|
className?: string;
|
|
19
18
|
}
|
|
20
19
|
/** Progress through a short, linear flow. */
|
|
21
|
-
export declare function StepIndicator({ steps, current, variant, label, className, }: StepIndicatorProps):
|
|
20
|
+
export declare function StepIndicator({ steps, current, variant, label, className, }: StepIndicatorProps): import("react").JSX.Element;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export { Checkbox, type CheckboxProps } from './input/Checkbox';
|
|
|
46
46
|
export { DatePicker, type DatePickerProps } from './input/DatePicker';
|
|
47
47
|
export { type FolderDestination, FolderSelect, type FolderSelectProps } from './input/FolderSelect';
|
|
48
48
|
export { ImageField, type ImageFieldProps } from './input/ImageField';
|
|
49
|
+
export { MentionComposer, type MentionComposerProps, type MentionComposerRef, type MentionPerson, } from './input/MentionComposer';
|
|
49
50
|
export { SearchableTextField, type SearchableTextFieldProps } from './input/SearchableTextField';
|
|
50
51
|
export { SearchField, type SearchFieldProps } from './input/SearchField';
|
|
51
52
|
export { Select, type SelectOption, type SelectProps } from './input/Select';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Someone who can be mentioned. Structural on purpose — a domain `User` is assignable, and so
|
|
4
|
+
* is anything else with a name and an id (a team, an agent), without ui-kit knowing what it is.
|
|
5
|
+
*/
|
|
6
|
+
export interface MentionPerson {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
}
|
|
10
|
+
export interface MentionComposerProps {
|
|
11
|
+
/** Seed HTML, sanitised before it lands. Mention chips survive if they carry `data-mention-id`. */
|
|
12
|
+
initialContent?: string;
|
|
13
|
+
/** Plain text plus the ids of the chips still standing in it. */
|
|
14
|
+
onChange: (plainText: string, mentionIds: string[]) => void;
|
|
15
|
+
people: MentionPerson[];
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
/** Cmd/Ctrl+Enter. Omitted means the shortcut does nothing. */
|
|
18
|
+
onSubmit?: () => void;
|
|
19
|
+
/**
|
|
20
|
+
* Focus on mount, desktop only. Off by default: a composer that is one tab of a detail
|
|
21
|
+
* page steals both the caret and the scroll position from whatever the reader was doing.
|
|
22
|
+
*/
|
|
23
|
+
autoFocus?: boolean;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface MentionComposerRef {
|
|
27
|
+
insertText: (text: string) => void;
|
|
28
|
+
clear: () => void;
|
|
29
|
+
focus: () => void;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A one-line-or-more composer where `@` completes a person.
|
|
33
|
+
*
|
|
34
|
+
* Mentions are chips (`data-mention-id`), not text: they delete as one unit and survive being
|
|
35
|
+
* typed around, so the ids handed to `onChange` always match what the author still sees. That
|
|
36
|
+
* is why this is `contenteditable` and not a `<textarea>` — a textarea can only ever guess
|
|
37
|
+
* from the text whether a name is still a mention.
|
|
38
|
+
*
|
|
39
|
+
* Uncontrolled by design. The DOM holds the content; `onChange` reports it, and the ref is how
|
|
40
|
+
* a caller writes into it (a template, a draft) without a re-render fighting the caret.
|
|
41
|
+
*/
|
|
42
|
+
export declare const MentionComposer: React.ForwardRefExoticComponent<MentionComposerProps & React.RefAttributes<MentionComposerRef>>;
|
|
@@ -4,7 +4,7 @@ export interface VideoSurfaceProps {
|
|
|
4
4
|
* provider SDKs (Azure, Zoom, etc.) can attach their own video renderer.
|
|
5
5
|
* Return an optional cleanup function.
|
|
6
6
|
*/
|
|
7
|
-
attach: (el: HTMLDivElement) =>
|
|
7
|
+
attach: (el: HTMLDivElement) => undefined | (() => void);
|
|
8
8
|
active?: boolean;
|
|
9
9
|
mirrored?: boolean;
|
|
10
10
|
className?: string;
|