@edux-design/comments 0.1.4 → 0.3.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/CHANGELOG.md +24 -0
- package/README.md +20 -0
- package/dist/index.d.mts +163 -48
- package/dist/index.d.ts +163 -48
- package/dist/index.js +424 -156
- package/dist/index.mjs +425 -149
- package/docs/composer.md +65 -0
- package/docs/mention-portals.md +105 -0
- package/package.json +11 -24
- package/src/demos/Comment.stories.jsx +0 -593
- package/src/demos/CommentComposer.stories.jsx +0 -66
- package/src/elements/Comment.jsx +0 -240
- package/src/elements/Comment.test.jsx +0 -151
- package/src/elements/CommentComposer.jsx +0 -184
- package/src/elements/CommentComposer.test.jsx +0 -125
- package/src/elements/CommentMention.jsx +0 -232
- package/src/elements/CommentMention.test.jsx +0 -150
- package/src/elements/CommentMentionExtension.jsx +0 -56
- package/src/index.js +0 -3
- package/tsconfig.json +0 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @edux-design/comments
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Resolve mention menus into their containing dialog by default, with a typed portalContainer override and lifecycle-safe observation of reparenting and disconnected containers. Preserve composer values, mentions, external submission and imperative APIs. Require Menus ^1.1.0 for the checked-item and native Tab contract.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @edux-design/menus@1.1.0
|
|
13
|
+
|
|
14
|
+
## 0.2.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- Add mention-aware rich value snapshots, typed composer focus/value/submit controls and external-submit support while preserving the legacy editor element ref and callbacks. Align development with the supported Tiptap 3 peer API.
|
|
19
|
+
|
|
20
|
+
Correct controlled-value echo synchronization so rapid typing retains every character. Keep legacy mention fallbacks and model-visible serialization distinct; type existing Comment compound components and provide structural avatar props without relying on an unpublished dependency type.
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
- @edux-design/buttons@0.3.0
|
|
26
|
+
|
|
3
27
|
## 0.1.4
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
Structured comment block for discussion threads, with avatar, metadata, actions, and nested replies.
|
|
4
4
|
|
|
5
|
+
## Token contract
|
|
6
|
+
|
|
7
|
+
Comments use the shared numeric and semantic tokens for reusable spacing and
|
|
8
|
+
colour contracts, including `gap-12`, `p-12`, `py-12`, and the existing focus
|
|
9
|
+
and text tokens. The composer keeps a 120px editor height, 20px editor inset,
|
|
10
|
+
40px reply offset, and 220px mention-menu minimum width as explicit
|
|
11
|
+
component-owned geometry because the current theme has no matching declared
|
|
12
|
+
tokens; these values are documented one-offs rather than new semantic tokens.
|
|
13
|
+
|
|
14
|
+
The 12px composer padding uses the declared `py-12` token, and the 20px/40px
|
|
15
|
+
values are written explicitly (`pl-[20px]` and `mt-[40px]`) so they do not
|
|
16
|
+
depend on Tailwind's undeclared numeric fallback scale. Consumers should import
|
|
17
|
+
`@edux-design/tokens/theme` so shared utilities resolve consistently.
|
|
18
|
+
|
|
5
19
|
## Install
|
|
6
20
|
|
|
7
21
|
```bash
|
|
@@ -101,3 +115,9 @@ override the label if needed.
|
|
|
101
115
|
</Comment.Actions>
|
|
102
116
|
</Comment>
|
|
103
117
|
```
|
|
118
|
+
|
|
119
|
+
## Additional components
|
|
120
|
+
|
|
121
|
+
[Composer values, focus and external submission](./docs/composer.md).
|
|
122
|
+
|
|
123
|
+
[Mention menu ownership in Drawers and Modals](./docs/mention-portals.md).
|
package/dist/index.d.mts
CHANGED
|
@@ -1,53 +1,168 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import * as _tiptap_core from '@tiptap/core';
|
|
3
4
|
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* onResolve?: (event: React.MouseEvent<HTMLButtonElement>) => void,
|
|
16
|
-
* editable?: boolean,
|
|
17
|
-
* children?: React.ReactNode,
|
|
18
|
-
* }} CommentProps
|
|
19
|
-
*/
|
|
20
|
-
/**
|
|
21
|
-
* Flexible comment surface with optional avatar, metadata, actions, and replies.
|
|
22
|
-
*/
|
|
23
|
-
declare const Comment: react.ForwardRefExoticComponent<react.RefAttributes<any>>;
|
|
5
|
+
/** Avatar fields accepted by the comments package's existing Avatar slots. */
|
|
6
|
+
type CommentAvatarProps$1 = React.HTMLAttributes<HTMLSpanElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
7
|
+
name?: string;
|
|
8
|
+
initials?: string;
|
|
9
|
+
src?: string;
|
|
10
|
+
alt?: string;
|
|
11
|
+
size?: "small" | "medium" | "large";
|
|
12
|
+
online?: boolean;
|
|
13
|
+
backgroundColor?: string;
|
|
14
|
+
asButton?: boolean;
|
|
15
|
+
};
|
|
24
16
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
* avatarProps?: import("@edux-design/avatars").AvatarProps,
|
|
39
|
-
* actions?: React.ReactNode,
|
|
40
|
-
* children?: React.ReactNode,
|
|
41
|
-
* }} CommentComposerProps
|
|
42
|
-
*/
|
|
43
|
-
/**
|
|
44
|
-
* Comment composer with avatar, textarea, and action buttons.
|
|
45
|
-
*/
|
|
46
|
-
declare const CommentComposer: react.ForwardRefExoticComponent<react.RefAttributes<any>>;
|
|
17
|
+
declare function CommentMention({ peopleList, onQueryChange, portalContainer, }: CommentMentionProps$1): react_jsx_runtime.JSX.Element;
|
|
18
|
+
type CommentMentionPerson$1 = {
|
|
19
|
+
id: string | number;
|
|
20
|
+
name: string;
|
|
21
|
+
handle: string;
|
|
22
|
+
avatarProps?: CommentAvatarProps$1;
|
|
23
|
+
};
|
|
24
|
+
type CommentMentionProps$1 = {
|
|
25
|
+
peopleList?: CommentMentionPerson$1[];
|
|
26
|
+
onQueryChange?: (query: string) => void;
|
|
27
|
+
placeholder?: string;
|
|
28
|
+
portalContainer?: HTMLElement | null;
|
|
29
|
+
};
|
|
47
30
|
|
|
48
|
-
declare
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
31
|
+
declare const CommentComposer: React.ForwardRefExoticComponent<Omit<React.FormHTMLAttributes<HTMLFormElement>, "onChange" | "onSubmit"> & {
|
|
32
|
+
value?: string;
|
|
33
|
+
valueFormat?: "html" | "text";
|
|
34
|
+
richValue?: _tiptap_core.JSONContent;
|
|
35
|
+
onChange?: (event: {
|
|
36
|
+
target: {
|
|
37
|
+
value: string;
|
|
38
|
+
};
|
|
39
|
+
}) => void;
|
|
40
|
+
onValueChange?: (value: CommentComposerValue$1) => void;
|
|
41
|
+
onSubmit?: (event: React.FormEvent<HTMLFormElement>) => void;
|
|
42
|
+
onCancel?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
43
|
+
composerRef?: React.Ref<CommentComposerHandle$1>;
|
|
44
|
+
editorLabel?: string;
|
|
45
|
+
editorAttributes?: Pick<React.HTMLAttributes<HTMLDivElement>, "id" | "aria-describedby" | "aria-invalid" | "aria-required">;
|
|
46
|
+
autoFocus?: boolean;
|
|
47
|
+
externalSubmit?: boolean;
|
|
48
|
+
submitOnModEnter?: boolean;
|
|
49
|
+
placeholder?: string;
|
|
50
|
+
rows?: number;
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
isSubmitting?: boolean;
|
|
53
|
+
submitLabel?: string;
|
|
54
|
+
submittingLabel?: string;
|
|
55
|
+
cancelLabel?: string;
|
|
56
|
+
avatar?: React.ReactNode;
|
|
57
|
+
avatarProps?: CommentAvatarProps$1;
|
|
58
|
+
actions?: React.ReactNode;
|
|
59
|
+
children?: React.ReactNode;
|
|
60
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
61
|
+
type CommentComposerMentionValue$1 = {
|
|
62
|
+
id: string | number | null;
|
|
63
|
+
handle: string;
|
|
64
|
+
label: string;
|
|
65
|
+
};
|
|
66
|
+
type CommentComposerValue$1 = {
|
|
67
|
+
text: string;
|
|
68
|
+
legacyText: string;
|
|
69
|
+
html: string;
|
|
70
|
+
json: _tiptap_core.JSONContent;
|
|
71
|
+
mentions: CommentComposerMentionValue$1[];
|
|
72
|
+
isEmpty: boolean;
|
|
73
|
+
};
|
|
74
|
+
type CommentComposerHandle$1 = {
|
|
75
|
+
focus: (position?: "start" | "end" | "all" | number) => boolean;
|
|
76
|
+
clear: () => boolean;
|
|
77
|
+
getValue: () => CommentComposerValue$1 | null;
|
|
78
|
+
submit: () => void;
|
|
79
|
+
};
|
|
80
|
+
type CommentComposerProps$1 = Omit<React.FormHTMLAttributes<HTMLFormElement>, "onChange" | "onSubmit"> & {
|
|
81
|
+
value?: string;
|
|
82
|
+
valueFormat?: "html" | "text";
|
|
83
|
+
richValue?: _tiptap_core.JSONContent;
|
|
84
|
+
onChange?: (event: {
|
|
85
|
+
target: {
|
|
86
|
+
value: string;
|
|
87
|
+
};
|
|
88
|
+
}) => void;
|
|
89
|
+
onValueChange?: (value: CommentComposerValue$1) => void;
|
|
90
|
+
onSubmit?: (event: React.FormEvent<HTMLFormElement>) => void;
|
|
91
|
+
onCancel?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
92
|
+
composerRef?: React.Ref<CommentComposerHandle$1>;
|
|
93
|
+
editorLabel?: string;
|
|
94
|
+
editorAttributes?: Pick<React.HTMLAttributes<HTMLDivElement>, "id" | "aria-describedby" | "aria-invalid" | "aria-required">;
|
|
95
|
+
autoFocus?: boolean;
|
|
96
|
+
externalSubmit?: boolean;
|
|
97
|
+
submitOnModEnter?: boolean;
|
|
98
|
+
placeholder?: string;
|
|
99
|
+
rows?: number;
|
|
100
|
+
disabled?: boolean;
|
|
101
|
+
isSubmitting?: boolean;
|
|
102
|
+
submitLabel?: string;
|
|
103
|
+
submittingLabel?: string;
|
|
104
|
+
cancelLabel?: string;
|
|
105
|
+
avatar?: React.ReactNode;
|
|
106
|
+
avatarProps?: CommentAvatarProps$1;
|
|
107
|
+
actions?: React.ReactNode;
|
|
108
|
+
children?: React.ReactNode;
|
|
109
|
+
};
|
|
52
110
|
|
|
53
|
-
|
|
111
|
+
declare const Comment: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
112
|
+
author?: React.ReactNode;
|
|
113
|
+
timestamp?: React.ReactNode;
|
|
114
|
+
avatar?: React.ReactNode;
|
|
115
|
+
avatarName?: string;
|
|
116
|
+
avatarProps?: CommentAvatarProps$1;
|
|
117
|
+
body?: React.ReactNode;
|
|
118
|
+
replies?: React.ReactNode;
|
|
119
|
+
variant?: "default" | "resolved";
|
|
120
|
+
resolved?: boolean;
|
|
121
|
+
onResolve?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
122
|
+
editable?: boolean;
|
|
123
|
+
children?: React.ReactNode;
|
|
124
|
+
} & React.RefAttributes<HTMLDivElement>> & {
|
|
125
|
+
Actions: {
|
|
126
|
+
({ children, className, ...props }: React.ComponentPropsWithRef<"div">): react_jsx_runtime.JSX.Element;
|
|
127
|
+
displayName: string;
|
|
128
|
+
};
|
|
129
|
+
Reply: {
|
|
130
|
+
({ className, ...props }: React.ComponentPropsWithRef<"button">): react_jsx_runtime.JSX.Element;
|
|
131
|
+
displayName: string;
|
|
132
|
+
};
|
|
133
|
+
Edit: {
|
|
134
|
+
({ className, ...props }: React.ComponentPropsWithRef<"button">): react_jsx_runtime.JSX.Element;
|
|
135
|
+
displayName: string;
|
|
136
|
+
};
|
|
137
|
+
Resolve: {
|
|
138
|
+
({ className, disabled, onClick, label, ...props }: React.ComponentPropsWithRef<"button"> & {
|
|
139
|
+
label?: React.ReactNode;
|
|
140
|
+
}): react_jsx_runtime.JSX.Element;
|
|
141
|
+
displayName: string;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
type CommentProps$1 = React.HTMLAttributes<HTMLDivElement> & {
|
|
145
|
+
author?: React.ReactNode;
|
|
146
|
+
timestamp?: React.ReactNode;
|
|
147
|
+
avatar?: React.ReactNode;
|
|
148
|
+
avatarName?: string;
|
|
149
|
+
avatarProps?: CommentAvatarProps$1;
|
|
150
|
+
body?: React.ReactNode;
|
|
151
|
+
replies?: React.ReactNode;
|
|
152
|
+
variant?: "default" | "resolved";
|
|
153
|
+
resolved?: boolean;
|
|
154
|
+
onResolve?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
155
|
+
editable?: boolean;
|
|
156
|
+
children?: React.ReactNode;
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
type CommentProps = CommentProps$1;
|
|
160
|
+
type CommentComposerProps = CommentComposerProps$1;
|
|
161
|
+
type CommentComposerHandle = CommentComposerHandle$1;
|
|
162
|
+
type CommentComposerValue = CommentComposerValue$1;
|
|
163
|
+
type CommentComposerMentionValue = CommentComposerMentionValue$1;
|
|
164
|
+
type CommentMentionProps = CommentMentionProps$1;
|
|
165
|
+
type CommentMentionPerson = CommentMentionPerson$1;
|
|
166
|
+
type CommentAvatarProps = CommentAvatarProps$1;
|
|
167
|
+
|
|
168
|
+
export { Comment, type CommentAvatarProps, CommentComposer, type CommentComposerHandle, type CommentComposerMentionValue, type CommentComposerProps, type CommentComposerValue, CommentMention, type CommentMentionPerson, type CommentMentionProps, type CommentProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,53 +1,168 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import * as _tiptap_core from '@tiptap/core';
|
|
3
4
|
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* onResolve?: (event: React.MouseEvent<HTMLButtonElement>) => void,
|
|
16
|
-
* editable?: boolean,
|
|
17
|
-
* children?: React.ReactNode,
|
|
18
|
-
* }} CommentProps
|
|
19
|
-
*/
|
|
20
|
-
/**
|
|
21
|
-
* Flexible comment surface with optional avatar, metadata, actions, and replies.
|
|
22
|
-
*/
|
|
23
|
-
declare const Comment: react.ForwardRefExoticComponent<react.RefAttributes<any>>;
|
|
5
|
+
/** Avatar fields accepted by the comments package's existing Avatar slots. */
|
|
6
|
+
type CommentAvatarProps$1 = React.HTMLAttributes<HTMLSpanElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
7
|
+
name?: string;
|
|
8
|
+
initials?: string;
|
|
9
|
+
src?: string;
|
|
10
|
+
alt?: string;
|
|
11
|
+
size?: "small" | "medium" | "large";
|
|
12
|
+
online?: boolean;
|
|
13
|
+
backgroundColor?: string;
|
|
14
|
+
asButton?: boolean;
|
|
15
|
+
};
|
|
24
16
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
* avatarProps?: import("@edux-design/avatars").AvatarProps,
|
|
39
|
-
* actions?: React.ReactNode,
|
|
40
|
-
* children?: React.ReactNode,
|
|
41
|
-
* }} CommentComposerProps
|
|
42
|
-
*/
|
|
43
|
-
/**
|
|
44
|
-
* Comment composer with avatar, textarea, and action buttons.
|
|
45
|
-
*/
|
|
46
|
-
declare const CommentComposer: react.ForwardRefExoticComponent<react.RefAttributes<any>>;
|
|
17
|
+
declare function CommentMention({ peopleList, onQueryChange, portalContainer, }: CommentMentionProps$1): react_jsx_runtime.JSX.Element;
|
|
18
|
+
type CommentMentionPerson$1 = {
|
|
19
|
+
id: string | number;
|
|
20
|
+
name: string;
|
|
21
|
+
handle: string;
|
|
22
|
+
avatarProps?: CommentAvatarProps$1;
|
|
23
|
+
};
|
|
24
|
+
type CommentMentionProps$1 = {
|
|
25
|
+
peopleList?: CommentMentionPerson$1[];
|
|
26
|
+
onQueryChange?: (query: string) => void;
|
|
27
|
+
placeholder?: string;
|
|
28
|
+
portalContainer?: HTMLElement | null;
|
|
29
|
+
};
|
|
47
30
|
|
|
48
|
-
declare
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
31
|
+
declare const CommentComposer: React.ForwardRefExoticComponent<Omit<React.FormHTMLAttributes<HTMLFormElement>, "onChange" | "onSubmit"> & {
|
|
32
|
+
value?: string;
|
|
33
|
+
valueFormat?: "html" | "text";
|
|
34
|
+
richValue?: _tiptap_core.JSONContent;
|
|
35
|
+
onChange?: (event: {
|
|
36
|
+
target: {
|
|
37
|
+
value: string;
|
|
38
|
+
};
|
|
39
|
+
}) => void;
|
|
40
|
+
onValueChange?: (value: CommentComposerValue$1) => void;
|
|
41
|
+
onSubmit?: (event: React.FormEvent<HTMLFormElement>) => void;
|
|
42
|
+
onCancel?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
43
|
+
composerRef?: React.Ref<CommentComposerHandle$1>;
|
|
44
|
+
editorLabel?: string;
|
|
45
|
+
editorAttributes?: Pick<React.HTMLAttributes<HTMLDivElement>, "id" | "aria-describedby" | "aria-invalid" | "aria-required">;
|
|
46
|
+
autoFocus?: boolean;
|
|
47
|
+
externalSubmit?: boolean;
|
|
48
|
+
submitOnModEnter?: boolean;
|
|
49
|
+
placeholder?: string;
|
|
50
|
+
rows?: number;
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
isSubmitting?: boolean;
|
|
53
|
+
submitLabel?: string;
|
|
54
|
+
submittingLabel?: string;
|
|
55
|
+
cancelLabel?: string;
|
|
56
|
+
avatar?: React.ReactNode;
|
|
57
|
+
avatarProps?: CommentAvatarProps$1;
|
|
58
|
+
actions?: React.ReactNode;
|
|
59
|
+
children?: React.ReactNode;
|
|
60
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
61
|
+
type CommentComposerMentionValue$1 = {
|
|
62
|
+
id: string | number | null;
|
|
63
|
+
handle: string;
|
|
64
|
+
label: string;
|
|
65
|
+
};
|
|
66
|
+
type CommentComposerValue$1 = {
|
|
67
|
+
text: string;
|
|
68
|
+
legacyText: string;
|
|
69
|
+
html: string;
|
|
70
|
+
json: _tiptap_core.JSONContent;
|
|
71
|
+
mentions: CommentComposerMentionValue$1[];
|
|
72
|
+
isEmpty: boolean;
|
|
73
|
+
};
|
|
74
|
+
type CommentComposerHandle$1 = {
|
|
75
|
+
focus: (position?: "start" | "end" | "all" | number) => boolean;
|
|
76
|
+
clear: () => boolean;
|
|
77
|
+
getValue: () => CommentComposerValue$1 | null;
|
|
78
|
+
submit: () => void;
|
|
79
|
+
};
|
|
80
|
+
type CommentComposerProps$1 = Omit<React.FormHTMLAttributes<HTMLFormElement>, "onChange" | "onSubmit"> & {
|
|
81
|
+
value?: string;
|
|
82
|
+
valueFormat?: "html" | "text";
|
|
83
|
+
richValue?: _tiptap_core.JSONContent;
|
|
84
|
+
onChange?: (event: {
|
|
85
|
+
target: {
|
|
86
|
+
value: string;
|
|
87
|
+
};
|
|
88
|
+
}) => void;
|
|
89
|
+
onValueChange?: (value: CommentComposerValue$1) => void;
|
|
90
|
+
onSubmit?: (event: React.FormEvent<HTMLFormElement>) => void;
|
|
91
|
+
onCancel?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
92
|
+
composerRef?: React.Ref<CommentComposerHandle$1>;
|
|
93
|
+
editorLabel?: string;
|
|
94
|
+
editorAttributes?: Pick<React.HTMLAttributes<HTMLDivElement>, "id" | "aria-describedby" | "aria-invalid" | "aria-required">;
|
|
95
|
+
autoFocus?: boolean;
|
|
96
|
+
externalSubmit?: boolean;
|
|
97
|
+
submitOnModEnter?: boolean;
|
|
98
|
+
placeholder?: string;
|
|
99
|
+
rows?: number;
|
|
100
|
+
disabled?: boolean;
|
|
101
|
+
isSubmitting?: boolean;
|
|
102
|
+
submitLabel?: string;
|
|
103
|
+
submittingLabel?: string;
|
|
104
|
+
cancelLabel?: string;
|
|
105
|
+
avatar?: React.ReactNode;
|
|
106
|
+
avatarProps?: CommentAvatarProps$1;
|
|
107
|
+
actions?: React.ReactNode;
|
|
108
|
+
children?: React.ReactNode;
|
|
109
|
+
};
|
|
52
110
|
|
|
53
|
-
|
|
111
|
+
declare const Comment: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
112
|
+
author?: React.ReactNode;
|
|
113
|
+
timestamp?: React.ReactNode;
|
|
114
|
+
avatar?: React.ReactNode;
|
|
115
|
+
avatarName?: string;
|
|
116
|
+
avatarProps?: CommentAvatarProps$1;
|
|
117
|
+
body?: React.ReactNode;
|
|
118
|
+
replies?: React.ReactNode;
|
|
119
|
+
variant?: "default" | "resolved";
|
|
120
|
+
resolved?: boolean;
|
|
121
|
+
onResolve?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
122
|
+
editable?: boolean;
|
|
123
|
+
children?: React.ReactNode;
|
|
124
|
+
} & React.RefAttributes<HTMLDivElement>> & {
|
|
125
|
+
Actions: {
|
|
126
|
+
({ children, className, ...props }: React.ComponentPropsWithRef<"div">): react_jsx_runtime.JSX.Element;
|
|
127
|
+
displayName: string;
|
|
128
|
+
};
|
|
129
|
+
Reply: {
|
|
130
|
+
({ className, ...props }: React.ComponentPropsWithRef<"button">): react_jsx_runtime.JSX.Element;
|
|
131
|
+
displayName: string;
|
|
132
|
+
};
|
|
133
|
+
Edit: {
|
|
134
|
+
({ className, ...props }: React.ComponentPropsWithRef<"button">): react_jsx_runtime.JSX.Element;
|
|
135
|
+
displayName: string;
|
|
136
|
+
};
|
|
137
|
+
Resolve: {
|
|
138
|
+
({ className, disabled, onClick, label, ...props }: React.ComponentPropsWithRef<"button"> & {
|
|
139
|
+
label?: React.ReactNode;
|
|
140
|
+
}): react_jsx_runtime.JSX.Element;
|
|
141
|
+
displayName: string;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
type CommentProps$1 = React.HTMLAttributes<HTMLDivElement> & {
|
|
145
|
+
author?: React.ReactNode;
|
|
146
|
+
timestamp?: React.ReactNode;
|
|
147
|
+
avatar?: React.ReactNode;
|
|
148
|
+
avatarName?: string;
|
|
149
|
+
avatarProps?: CommentAvatarProps$1;
|
|
150
|
+
body?: React.ReactNode;
|
|
151
|
+
replies?: React.ReactNode;
|
|
152
|
+
variant?: "default" | "resolved";
|
|
153
|
+
resolved?: boolean;
|
|
154
|
+
onResolve?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
155
|
+
editable?: boolean;
|
|
156
|
+
children?: React.ReactNode;
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
type CommentProps = CommentProps$1;
|
|
160
|
+
type CommentComposerProps = CommentComposerProps$1;
|
|
161
|
+
type CommentComposerHandle = CommentComposerHandle$1;
|
|
162
|
+
type CommentComposerValue = CommentComposerValue$1;
|
|
163
|
+
type CommentComposerMentionValue = CommentComposerMentionValue$1;
|
|
164
|
+
type CommentMentionProps = CommentMentionProps$1;
|
|
165
|
+
type CommentMentionPerson = CommentMentionPerson$1;
|
|
166
|
+
type CommentAvatarProps = CommentAvatarProps$1;
|
|
167
|
+
|
|
168
|
+
export { Comment, type CommentAvatarProps, CommentComposer, type CommentComposerHandle, type CommentComposerMentionValue, type CommentComposerProps, type CommentComposerValue, CommentMention, type CommentMentionPerson, type CommentMentionProps, type CommentProps };
|