@beyondwork/docx-react-component 1.0.30 → 1.0.31
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/package.json +1 -1
- package/src/ui-tailwind/chrome/responsive-chrome.ts +46 -0
- package/src/ui-tailwind/chrome/tw-image-context-toolbar.tsx +4 -4
- package/src/ui-tailwind/chrome/tw-object-context-toolbar.tsx +5 -5
- package/src/ui-tailwind/chrome/tw-selection-tool-blocked.tsx +3 -3
- package/src/ui-tailwind/chrome/tw-selection-tool-comment.tsx +4 -4
- package/src/ui-tailwind/chrome/tw-selection-tool-host.tsx +14 -9
- package/src/ui-tailwind/chrome/tw-selection-tool-structure.tsx +3 -3
- package/src/ui-tailwind/chrome/tw-selection-tool-workflow.tsx +5 -5
- package/src/ui-tailwind/chrome/tw-selection-toolbar.tsx +6 -6
- package/src/ui-tailwind/chrome/tw-suggestion-card.tsx +9 -9
- package/src/ui-tailwind/chrome/tw-table-context-toolbar.tsx +172 -122
- package/src/ui-tailwind/editor-surface/pm-state-from-snapshot.ts +1 -1
- package/src/ui-tailwind/editor-surface/surface-build-keys.ts +1 -3
- package/src/ui-tailwind/review/tw-review-rail.tsx +9 -1
- package/src/ui-tailwind/toolbar/toolbar-layout.ts +47 -0
- package/src/ui-tailwind/toolbar/tw-toolbar.tsx +367 -22
- package/src/ui-tailwind/tw-review-workspace.tsx +131 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beyondwork/docx-react-component",
|
|
3
3
|
"publisher": "beyondwork",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.31",
|
|
5
5
|
"description": "Embeddable React Word (docx) editor with review, comments, tracked changes, and round-trip OOXML fidelity.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": [
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export const NARROW_CHROME_MAX_WIDTH = 1023;
|
|
2
|
+
|
|
3
|
+
export interface ResponsiveChromeStateInput {
|
|
4
|
+
viewportWidth?: number;
|
|
5
|
+
reviewRailAvailable: boolean;
|
|
6
|
+
reviewRailOpen: boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface ResponsiveChromeState {
|
|
10
|
+
isNarrow: boolean;
|
|
11
|
+
showSidebarToggle: boolean;
|
|
12
|
+
showDockedReviewRail: boolean;
|
|
13
|
+
showDrawerReviewRail: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function isNarrowChromeViewport(viewportWidth?: number): boolean {
|
|
17
|
+
return typeof viewportWidth === "number" && viewportWidth <= NARROW_CHROME_MAX_WIDTH;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function getInitialReviewRailOpen(input: {
|
|
21
|
+
viewportWidth?: number;
|
|
22
|
+
reviewRailAvailable: boolean;
|
|
23
|
+
}): boolean {
|
|
24
|
+
return input.reviewRailAvailable && !isNarrowChromeViewport(input.viewportWidth);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function resolveResponsiveChromeState(
|
|
28
|
+
input: ResponsiveChromeStateInput,
|
|
29
|
+
): ResponsiveChromeState {
|
|
30
|
+
const isNarrow = isNarrowChromeViewport(input.viewportWidth);
|
|
31
|
+
if (!input.reviewRailAvailable) {
|
|
32
|
+
return {
|
|
33
|
+
isNarrow,
|
|
34
|
+
showSidebarToggle: false,
|
|
35
|
+
showDockedReviewRail: false,
|
|
36
|
+
showDrawerReviewRail: false,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return {
|
|
41
|
+
isNarrow,
|
|
42
|
+
showSidebarToggle: true,
|
|
43
|
+
showDockedReviewRail: !isNarrow && input.reviewRailOpen,
|
|
44
|
+
showDrawerReviewRail: isNarrow && input.reviewRailOpen,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -30,12 +30,12 @@ export function TwImageContextToolbar(props: TwImageContextToolbarProps) {
|
|
|
30
30
|
return (
|
|
31
31
|
<div
|
|
32
32
|
data-testid="image-context-toolbar"
|
|
33
|
-
className="flex flex-wrap items-center gap-
|
|
33
|
+
className="flex flex-wrap items-center gap-1.5 rounded-lg border border-border bg-canvas px-2.5 py-1.5 shadow-sm"
|
|
34
34
|
>
|
|
35
|
-
<span className="text-[
|
|
35
|
+
<span className="text-[9px] font-semibold uppercase tracking-[0.12em] text-tertiary">
|
|
36
36
|
Image
|
|
37
37
|
</span>
|
|
38
|
-
<span className="rounded-full bg-surface px-
|
|
38
|
+
<span className="rounded-full bg-surface px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-[0.1em] text-secondary">
|
|
39
39
|
{activeImage.display}
|
|
40
40
|
</span>
|
|
41
41
|
{IMAGE_SIZE_PRESETS.map((preset) => (
|
|
@@ -113,7 +113,7 @@ function ToolbarButton(props: {
|
|
|
113
113
|
disabled={props.disabled}
|
|
114
114
|
onMouseDown={preserveEditorSelectionMouseDown}
|
|
115
115
|
onClick={props.onClick}
|
|
116
|
-
className="inline-flex h-
|
|
116
|
+
className="inline-flex h-7 items-center rounded-md px-2 text-[11px] font-medium text-primary transition-colors hover:bg-surface disabled:cursor-not-allowed disabled:opacity-40"
|
|
117
117
|
>
|
|
118
118
|
{props.children}
|
|
119
119
|
</button>
|
|
@@ -11,18 +11,18 @@ export function TwObjectContextToolbar(props: TwObjectContextToolbarProps) {
|
|
|
11
11
|
return (
|
|
12
12
|
<div
|
|
13
13
|
data-testid="object-context-toolbar"
|
|
14
|
-
className="flex flex-wrap items-center gap-
|
|
14
|
+
className="flex flex-wrap items-center gap-1.5 rounded-lg border border-border bg-canvas px-2.5 py-1.5 shadow-sm"
|
|
15
15
|
>
|
|
16
|
-
<span className="text-[
|
|
16
|
+
<span className="text-[9px] font-semibold uppercase tracking-[0.12em] text-tertiary">
|
|
17
17
|
Object
|
|
18
18
|
</span>
|
|
19
|
-
<span className="rounded-full bg-surface px-
|
|
19
|
+
<span className="rounded-full bg-surface px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-[0.1em] text-secondary">
|
|
20
20
|
{label}
|
|
21
21
|
</span>
|
|
22
|
-
<span className="rounded-full bg-surface px-
|
|
22
|
+
<span className="rounded-full bg-surface px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-[0.1em] text-secondary">
|
|
23
23
|
{props.activeObject.display}
|
|
24
24
|
</span>
|
|
25
|
-
<span className="text-
|
|
25
|
+
<span className="text-[11px] text-secondary">
|
|
26
26
|
Object selection is active.
|
|
27
27
|
</span>
|
|
28
28
|
</div>
|
|
@@ -10,14 +10,14 @@ export function TwSelectionToolBlocked(props: TwSelectionToolBlockedProps) {
|
|
|
10
10
|
return (
|
|
11
11
|
<div
|
|
12
12
|
data-testid="blocked-selection-tool"
|
|
13
|
-
className="max-w-[min(
|
|
13
|
+
className="max-w-[min(20rem,calc(100vw-1.5rem))] rounded-lg border border-border bg-canvas px-2.5 py-1.5 shadow-md"
|
|
14
14
|
role="status"
|
|
15
15
|
aria-live="polite"
|
|
16
16
|
>
|
|
17
|
-
<div className="text-[
|
|
17
|
+
<div className="text-[9px] font-semibold uppercase tracking-[0.12em] text-tertiary">
|
|
18
18
|
Unavailable here
|
|
19
19
|
</div>
|
|
20
|
-
<div className="mt-
|
|
20
|
+
<div className="mt-0.5 text-[13px] text-primary">{props.model.disabledReason}</div>
|
|
21
21
|
</div>
|
|
22
22
|
);
|
|
23
23
|
}
|
|
@@ -12,12 +12,12 @@ export function TwSelectionToolComment(props: TwSelectionToolCommentProps) {
|
|
|
12
12
|
return (
|
|
13
13
|
<div
|
|
14
14
|
data-testid="comment-thread-selection-tool"
|
|
15
|
-
className="max-w-[min(
|
|
15
|
+
className="max-w-[min(20rem,calc(100vw-1.5rem))] rounded-lg border border-border bg-canvas px-2.5 py-1.5 shadow-md"
|
|
16
16
|
>
|
|
17
|
-
<div className="text-[
|
|
17
|
+
<div className="text-[9px] font-semibold uppercase tracking-[0.12em] text-tertiary">
|
|
18
18
|
Comment
|
|
19
19
|
</div>
|
|
20
|
-
<div className="mt-
|
|
20
|
+
<div className="mt-0.5 truncate text-[13px] text-primary">
|
|
21
21
|
{props.model.previewText ?? "Comment thread"}
|
|
22
22
|
</div>
|
|
23
23
|
<button
|
|
@@ -26,7 +26,7 @@ export function TwSelectionToolComment(props: TwSelectionToolCommentProps) {
|
|
|
26
26
|
disabled={!props.model.canAddComment || !props.onAddComment}
|
|
27
27
|
onMouseDown={preserveEditorSelectionMouseDown}
|
|
28
28
|
onClick={props.onAddComment}
|
|
29
|
-
className="mt-
|
|
29
|
+
className="mt-1.5 inline-flex h-7 items-center rounded-md border border-border px-2 text-[11px] font-medium text-secondary transition-colors hover:bg-surface disabled:cursor-not-allowed disabled:opacity-40"
|
|
30
30
|
>
|
|
31
31
|
Comment
|
|
32
32
|
</button>
|
|
@@ -112,7 +112,7 @@ export function TwSelectionToolHost(props: TwSelectionToolHostProps) {
|
|
|
112
112
|
ref={props.rootRef}
|
|
113
113
|
onFocusCapture={props.onFocusCapture}
|
|
114
114
|
onBlurCapture={props.onBlurCapture}
|
|
115
|
-
className="flex flex-col gap-
|
|
115
|
+
className="flex flex-col gap-1.5"
|
|
116
116
|
>
|
|
117
117
|
{props.contextAnalytics ? (
|
|
118
118
|
<TwContextAnalyticsSummary
|
|
@@ -125,13 +125,13 @@ export function TwSelectionToolHost(props: TwSelectionToolHostProps) {
|
|
|
125
125
|
</div>
|
|
126
126
|
) : null;
|
|
127
127
|
const wrappedContent = content && supportsTopMenuControls ? (
|
|
128
|
-
<div className="flex flex-col gap-1
|
|
129
|
-
<div className="inline-flex items-center gap-
|
|
128
|
+
<div className="flex flex-col gap-1">
|
|
129
|
+
<div className="inline-flex items-center gap-1.5 self-center rounded-lg border border-border/70 bg-canvas/94 px-1.5 py-1 shadow-[0_8px_20px_-18px_var(--color-shadow-strong)]">
|
|
130
130
|
<button
|
|
131
131
|
type="button"
|
|
132
|
-
aria-label="Drag
|
|
132
|
+
aria-label={isDetached ? "Drag floating menu" : "Drag to float menu"}
|
|
133
133
|
data-testid="selection-tool-drag-handle"
|
|
134
|
-
className="inline-flex h-
|
|
134
|
+
className="inline-flex h-6 items-center justify-center rounded-md border border-transparent px-1.5 text-tertiary transition-colors hover:border-border/60 hover:bg-surface hover:text-primary"
|
|
135
135
|
onMouseDown={(event) => {
|
|
136
136
|
preserveEditorSelectionMouseDown(event);
|
|
137
137
|
setIsDetached(true);
|
|
@@ -143,21 +143,26 @@ export function TwSelectionToolHost(props: TwSelectionToolHostProps) {
|
|
|
143
143
|
};
|
|
144
144
|
}}
|
|
145
145
|
>
|
|
146
|
-
<GripHorizontal className="h-3
|
|
146
|
+
<GripHorizontal className="h-3 w-3" />
|
|
147
147
|
</button>
|
|
148
|
-
<span className="text-[
|
|
148
|
+
<span className="text-[9px] font-semibold uppercase tracking-[0.12em] text-tertiary">
|
|
149
149
|
{getTopMenuLabel(props.tool.kind)}
|
|
150
150
|
</span>
|
|
151
|
+
<span className="rounded-full bg-surface px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-[0.08em] text-secondary">
|
|
152
|
+
{isDetached ? "Floating" : "Docked"}
|
|
153
|
+
</span>
|
|
151
154
|
<button
|
|
152
155
|
type="button"
|
|
156
|
+
aria-label={isDetached ? "Dock menu" : "Float menu"}
|
|
157
|
+
aria-pressed={isDetached}
|
|
153
158
|
data-testid="selection-tool-attach-toggle"
|
|
154
|
-
className="inline-flex h-
|
|
159
|
+
className="inline-flex h-6 items-center rounded-md border border-border/60 px-2 text-[10px] font-medium text-secondary transition-colors hover:bg-surface hover:text-primary"
|
|
155
160
|
onMouseDown={preserveEditorSelectionMouseDown}
|
|
156
161
|
onClick={() => {
|
|
157
162
|
setIsDetached((current) => !current);
|
|
158
163
|
}}
|
|
159
164
|
>
|
|
160
|
-
{isDetached ? "
|
|
165
|
+
{isDetached ? "Dock menu" : "Float menu"}
|
|
161
166
|
</button>
|
|
162
167
|
</div>
|
|
163
168
|
{content}
|
|
@@ -71,9 +71,9 @@ export function TwSelectionToolStructure(props: TwSelectionToolStructureProps) {
|
|
|
71
71
|
return (
|
|
72
72
|
<div
|
|
73
73
|
data-testid="list-context-toolbar"
|
|
74
|
-
className="flex flex-wrap items-center gap-
|
|
74
|
+
className="flex flex-wrap items-center gap-1.5 rounded-lg border border-border bg-canvas px-2.5 py-1.5 shadow-sm"
|
|
75
75
|
>
|
|
76
|
-
<span className="text-[
|
|
76
|
+
<span className="text-[9px] font-semibold uppercase tracking-[0.12em] text-tertiary">
|
|
77
77
|
List
|
|
78
78
|
</span>
|
|
79
79
|
<ToolbarButton
|
|
@@ -108,7 +108,7 @@ function ToolbarButton(props: {
|
|
|
108
108
|
disabled={props.disabled}
|
|
109
109
|
onMouseDown={preserveEditorSelectionMouseDown}
|
|
110
110
|
onClick={props.onClick}
|
|
111
|
-
className="inline-flex h-
|
|
111
|
+
className="inline-flex h-7 items-center rounded-md border border-border px-2 text-[11px] font-medium text-secondary transition-colors hover:bg-surface disabled:cursor-not-allowed disabled:opacity-40"
|
|
112
112
|
>
|
|
113
113
|
{props.children}
|
|
114
114
|
</button>
|
|
@@ -10,17 +10,17 @@ export function TwSelectionToolWorkflow(props: TwSelectionToolWorkflowProps) {
|
|
|
10
10
|
return (
|
|
11
11
|
<div
|
|
12
12
|
data-testid="workflow-task-selection-tool"
|
|
13
|
-
className="max-w-[min(
|
|
13
|
+
className="max-w-[min(20rem,calc(100vw-1.5rem))] rounded-lg border border-border bg-canvas px-2.5 py-1.5 shadow-md"
|
|
14
14
|
>
|
|
15
|
-
<div className="text-[
|
|
15
|
+
<div className="text-[9px] font-semibold uppercase tracking-[0.12em] text-tertiary">
|
|
16
16
|
Workflow task
|
|
17
17
|
</div>
|
|
18
|
-
<div className="mt-
|
|
18
|
+
<div className="mt-0.5 text-[13px] text-primary">{props.model.workflowTitle ?? "Scoped task"}</div>
|
|
19
19
|
{props.model.workflowDetail ? (
|
|
20
|
-
<div className="mt-
|
|
20
|
+
<div className="mt-0.5 text-[11px] text-secondary">{props.model.workflowDetail}</div>
|
|
21
21
|
) : null}
|
|
22
22
|
{props.model.disabledReason ? (
|
|
23
|
-
<div className="mt-
|
|
23
|
+
<div className="mt-1 text-[11px] text-tertiary">{props.model.disabledReason}</div>
|
|
24
24
|
) : null}
|
|
25
25
|
</div>
|
|
26
26
|
);
|
|
@@ -35,7 +35,7 @@ export const TwSelectionToolbar = forwardRef<HTMLDivElement, TwSelectionToolbarP
|
|
|
35
35
|
<div
|
|
36
36
|
ref={ref}
|
|
37
37
|
data-testid="selection-toolbar"
|
|
38
|
-
className="inline-flex max-w-[min(
|
|
38
|
+
className="inline-flex max-w-[min(22rem,calc(100vw-1.5rem))] items-center gap-1 rounded-lg border border-border/80 bg-canvas px-1 py-1 shadow-md ring-1 ring-border/70"
|
|
39
39
|
role="toolbar"
|
|
40
40
|
aria-label="Selection actions"
|
|
41
41
|
onFocusCapture={props.onFocusCapture}
|
|
@@ -87,9 +87,9 @@ export const TwSelectionToolbar = forwardRef<HTMLDivElement, TwSelectionToolbarP
|
|
|
87
87
|
disabled={addCommentDisabled}
|
|
88
88
|
onMouseDown={preserveEditorSelectionMouseDown}
|
|
89
89
|
onClick={props.onAddComment}
|
|
90
|
-
className={`inline-flex h-
|
|
90
|
+
className={`inline-flex h-6 w-6 items-center justify-center rounded-md transition-colors text-accent hover:bg-surface disabled:cursor-not-allowed disabled:opacity-30 ${focusRingClass}`}
|
|
91
91
|
>
|
|
92
|
-
<MessageSquare className="h-3
|
|
92
|
+
<MessageSquare className="h-3 w-3" />
|
|
93
93
|
</button>
|
|
94
94
|
</Tooltip.Trigger>
|
|
95
95
|
<Tooltip.Portal>
|
|
@@ -105,7 +105,7 @@ export const TwSelectionToolbar = forwardRef<HTMLDivElement, TwSelectionToolbarP
|
|
|
105
105
|
{model.previewText ? (
|
|
106
106
|
<>
|
|
107
107
|
<div className="mx-0.5 h-4 w-px bg-border" />
|
|
108
|
-
<span className="max-w-[
|
|
108
|
+
<span className="max-w-[7rem] truncate text-[10px] text-secondary">
|
|
109
109
|
{model.previewText}
|
|
110
110
|
</span>
|
|
111
111
|
</>
|
|
@@ -115,7 +115,7 @@ export const TwSelectionToolbar = forwardRef<HTMLDivElement, TwSelectionToolbarP
|
|
|
115
115
|
<>
|
|
116
116
|
{!model.previewText ? <div className="mx-0.5 h-4 w-px bg-border" /> : null}
|
|
117
117
|
<span
|
|
118
|
-
className={`min-w-0 max-w-[
|
|
118
|
+
className={`min-w-0 max-w-[9rem] truncate rounded-full px-1.5 py-0.5 text-[9px] font-medium tracking-[0.08em] ${
|
|
119
119
|
model.badges.some((badge) => badge.tone === "accent")
|
|
120
120
|
? "bg-canvas text-accent ring-1 ring-accent/25"
|
|
121
121
|
: "bg-surface text-tertiary"
|
|
@@ -164,7 +164,7 @@ function ToolbarActionButton(props: ToolbarActionButtonProps) {
|
|
|
164
164
|
disabled={props.disabled}
|
|
165
165
|
onMouseDown={preserveEditorSelectionMouseDown}
|
|
166
166
|
onClick={props.onClick}
|
|
167
|
-
className={`inline-flex h-
|
|
167
|
+
className={`inline-flex h-6 w-6 items-center justify-center rounded-md transition-colors disabled:cursor-not-allowed disabled:opacity-30 ${
|
|
168
168
|
props.pressed
|
|
169
169
|
? "bg-canvas text-accent ring-1 ring-accent/30 shadow-sm"
|
|
170
170
|
: "text-secondary hover:bg-surface"
|
|
@@ -29,29 +29,29 @@ export function TwSuggestionCard(props: TwSuggestionCardProps) {
|
|
|
29
29
|
return (
|
|
30
30
|
<div
|
|
31
31
|
data-testid="suggestion-card"
|
|
32
|
-
className="inline-flex max-w-[min(
|
|
32
|
+
className="inline-flex max-w-[min(24rem,calc(100vw-1.5rem))] flex-col gap-1.5 rounded-xl border border-border/80 bg-canvas px-2.5 py-1.5 shadow-lg ring-1 ring-border/75"
|
|
33
33
|
onFocusCapture={props.onFocusCapture}
|
|
34
34
|
onBlurCapture={props.onBlurCapture}
|
|
35
35
|
role="group"
|
|
36
36
|
aria-label="Suggestion actions"
|
|
37
37
|
>
|
|
38
|
-
<div className="flex items-start justify-between gap-
|
|
38
|
+
<div className="flex items-start justify-between gap-2">
|
|
39
39
|
<div className="min-w-0">
|
|
40
|
-
<div className="text-[
|
|
40
|
+
<div className="text-[10px] font-semibold uppercase tracking-[0.12em] text-warning">
|
|
41
41
|
{props.model.kindLabel}
|
|
42
42
|
</div>
|
|
43
|
-
<div className="mt-
|
|
43
|
+
<div className="mt-0.5 max-w-[14rem] truncate text-[13px] text-primary">
|
|
44
44
|
{props.model.previewText}
|
|
45
45
|
</div>
|
|
46
46
|
</div>
|
|
47
47
|
{contextLabel ? (
|
|
48
|
-
<div className="shrink-0 rounded-full bg-canvas px-
|
|
48
|
+
<div className="shrink-0 rounded-full bg-canvas px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-[0.08em] text-comment ring-1 ring-comment/20">
|
|
49
49
|
{contextLabel}
|
|
50
50
|
</div>
|
|
51
51
|
) : null}
|
|
52
52
|
</div>
|
|
53
53
|
|
|
54
|
-
<div className="flex flex-wrap items-center gap-1
|
|
54
|
+
<div className="flex flex-wrap items-center gap-1">
|
|
55
55
|
<SuggestionActionButton
|
|
56
56
|
icon={<Check className="h-3.5 w-3.5" />}
|
|
57
57
|
label="Accept suggestion"
|
|
@@ -81,9 +81,9 @@ export function TwSuggestionCard(props: TwSuggestionCardProps) {
|
|
|
81
81
|
disabled={commentDisabled}
|
|
82
82
|
onMouseDown={preserveEditorSelectionMouseDown}
|
|
83
83
|
onClick={props.onAddComment}
|
|
84
|
-
className={`inline-flex h-
|
|
84
|
+
className={`inline-flex h-7 items-center gap-1 rounded-md border border-border px-2 text-[11px] font-medium text-secondary transition-colors hover:bg-surface disabled:cursor-not-allowed disabled:opacity-40 ${focusRingClass}`}
|
|
85
85
|
>
|
|
86
|
-
<MessageSquare className="h-3
|
|
86
|
+
<MessageSquare className="h-3 w-3" />
|
|
87
87
|
Comment
|
|
88
88
|
</button>
|
|
89
89
|
</Tooltip.Trigger>
|
|
@@ -130,7 +130,7 @@ function SuggestionActionButton(props: {
|
|
|
130
130
|
disabled={props.disabled}
|
|
131
131
|
onMouseDown={preserveEditorSelectionMouseDown}
|
|
132
132
|
onClick={props.onClick}
|
|
133
|
-
className={`inline-flex h-
|
|
133
|
+
className={`inline-flex h-7 items-center gap-1 rounded-md border px-2 text-[11px] font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-40 ${toneClass} ${focusRingClass}`}
|
|
134
134
|
>
|
|
135
135
|
{props.icon}
|
|
136
136
|
{props.label.replace(" suggestion", "").replace(" on suggestion", "")}
|