@thebuoyant-tsdev/mui-ts-library 3.22.0 → 3.25.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/README.de.md +30 -0
- package/README.md +30 -0
- package/dist/components/color-picker/ColorPicker.d.ts +1 -1
- package/dist/components/color-picker/ColorPicker.js +282 -266
- package/dist/components/color-picker/ColorPicker.types.d.ts +3 -1
- package/dist/components/color-picker/colorPickerClasses.d.ts +35 -0
- package/dist/components/color-picker/colorPickerClasses.js +15 -0
- package/dist/components/gantt-chart/GanttTaskPanel.js +187 -160
- package/dist/components/json-editor/JsonEditor.d.ts +1 -1
- package/dist/components/json-editor/JsonEditor.js +32 -31
- package/dist/components/json-editor/JsonEditor.types.d.ts +5 -0
- package/dist/components/json-editor/JsonEditor.types.js +3 -0
- package/dist/components/json-editor/JsonEditorToolbar.d.ts +2 -1
- package/dist/components/json-editor/JsonEditorToolbar.js +78 -61
- package/dist/components/password-strength-meter/PasswordStrengthBar.d.ts +2 -1
- package/dist/components/password-strength-meter/PasswordStrengthBar.js +3 -1
- package/dist/components/password-strength-meter/PasswordStrengthMeter.js +258 -237
- package/dist/components/password-strength-meter/passwordStrengthMeterClasses.d.ts +40 -0
- package/dist/components/password-strength-meter/passwordStrengthMeterClasses.js +16 -0
- package/dist/components/rich-text-editor/RichTextEditorToolbar.js +115 -111
- package/dist/components/tag-selection/TagSelection.js +82 -79
- package/dist/components/tag-selection/TagSelectionAutocomplete.js +102 -98
- package/dist/components/tag-selection/TagSelectionChip.js +24 -21
- package/dist/components/tag-selection/TagSelectionSelectedTags.js +44 -38
- package/dist/components/tag-selection/tagSelectionClasses.d.ts +34 -0
- package/dist/components/tag-selection/tagSelectionClasses.js +15 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +31 -27
- package/dist/utils/muiTsClasses.d.ts +7 -0
- package/dist/utils/muiTsClasses.js +9 -0
- package/package.json +2 -1
|
@@ -3,38 +3,38 @@ import { RichTextEditorLinkDialog as t } from "./RichTextEditorLinkDialog.js";
|
|
|
3
3
|
import { RichTextEditorColorPicker as n } from "./RichTextEditorColorPicker.js";
|
|
4
4
|
import { RichTextEditorTableMenu as r } from "./RichTextEditorTableMenu.js";
|
|
5
5
|
import { RichTextEditorImageDialog as i } from "./RichTextEditorImageDialog.js";
|
|
6
|
-
import { RichTextEditorEmojiPicker as
|
|
7
|
-
import { RichTextEditorMarkdownDialog as
|
|
8
|
-
import { useState as
|
|
9
|
-
import { Box as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import
|
|
6
|
+
import { RichTextEditorEmojiPicker as a } from "./RichTextEditorEmojiPicker.js";
|
|
7
|
+
import { RichTextEditorMarkdownDialog as ee } from "./RichTextEditorMarkdownDialog.js";
|
|
8
|
+
import { useState as o } from "react";
|
|
9
|
+
import { Box as s, Divider as te, IconButton as c, Tooltip as l } from "@mui/material";
|
|
10
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
11
|
+
import ne from "@mui/icons-material/Undo";
|
|
12
12
|
import re from "@mui/icons-material/Redo";
|
|
13
13
|
import ie from "@mui/icons-material/Fullscreen";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
14
|
+
import p from "@mui/icons-material/FullscreenExit";
|
|
15
|
+
import ae from "@mui/icons-material/Image";
|
|
16
|
+
import oe from "@mui/icons-material/EmojiEmotions";
|
|
17
|
+
import se from "@mui/icons-material/FormatBold";
|
|
18
|
+
import ce from "@mui/icons-material/FormatItalic";
|
|
19
|
+
import le from "@mui/icons-material/FormatUnderlined";
|
|
20
|
+
import ue from "@mui/icons-material/StrikethroughS";
|
|
21
|
+
import de from "@mui/icons-material/FormatListBulleted";
|
|
22
22
|
import m from "@mui/icons-material/FormatListNumbered";
|
|
23
23
|
import fe from "@mui/icons-material/FormatQuote";
|
|
24
24
|
import pe from "@mui/icons-material/Code";
|
|
25
25
|
import me from "@mui/icons-material/InsertLink";
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
26
|
+
import h from "@mui/icons-material/HorizontalRule";
|
|
27
|
+
import g from "@mui/icons-material/FormatColorText";
|
|
28
|
+
import _ from "@mui/icons-material/BorderColor";
|
|
29
|
+
import v from "@mui/icons-material/FormatClear";
|
|
30
|
+
import he from "@mui/icons-material/ContentPaste";
|
|
31
|
+
import ge from "@mui/icons-material/ContentPasteOff";
|
|
32
32
|
//#region src/components/rich-text-editor/RichTextEditorToolbar.tsx
|
|
33
|
-
function
|
|
34
|
-
return /* @__PURE__ */
|
|
33
|
+
function y({ label: e, icon: t, activeColor: n, disabled: r, onClick: i }) {
|
|
34
|
+
return /* @__PURE__ */ d(l, {
|
|
35
35
|
title: e,
|
|
36
36
|
arrow: !0,
|
|
37
|
-
children: /* @__PURE__ */
|
|
37
|
+
children: /* @__PURE__ */ d("span", { children: /* @__PURE__ */ f(c, {
|
|
38
38
|
size: "small",
|
|
39
39
|
onMouseDown: (e) => e.preventDefault(),
|
|
40
40
|
onClick: i,
|
|
@@ -46,13 +46,13 @@ function b({ label: e, icon: t, activeColor: n, disabled: r, onClick: i }) {
|
|
|
46
46
|
pb: .25
|
|
47
47
|
},
|
|
48
48
|
"aria-label": e,
|
|
49
|
-
children: [/* @__PURE__ */
|
|
49
|
+
children: [/* @__PURE__ */ d(s, {
|
|
50
50
|
sx: {
|
|
51
51
|
display: "flex",
|
|
52
52
|
alignItems: "center"
|
|
53
53
|
},
|
|
54
54
|
children: t
|
|
55
|
-
}), /* @__PURE__ */
|
|
55
|
+
}), /* @__PURE__ */ d(s, { sx: {
|
|
56
56
|
width: "80%",
|
|
57
57
|
height: 3,
|
|
58
58
|
bgcolor: n ?? "text.primary",
|
|
@@ -62,19 +62,31 @@ function b({ label: e, icon: t, activeColor: n, disabled: r, onClick: i }) {
|
|
|
62
62
|
}) })
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
return /* @__PURE__ */ d(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
65
|
+
function b({ text: e }) {
|
|
66
|
+
return /* @__PURE__ */ d("svg", {
|
|
67
|
+
width: "20",
|
|
68
|
+
height: "20",
|
|
69
|
+
viewBox: "0 0 20 20",
|
|
70
|
+
"aria-hidden": "true",
|
|
71
|
+
style: { display: "block" },
|
|
72
|
+
children: /* @__PURE__ */ d("text", {
|
|
73
|
+
x: "10",
|
|
74
|
+
y: "10",
|
|
75
|
+
dominantBaseline: "central",
|
|
76
|
+
textAnchor: "middle",
|
|
77
|
+
fontSize: "10",
|
|
78
|
+
fontWeight: "500",
|
|
79
|
+
fontFamily: "inherit",
|
|
80
|
+
fill: "currentColor",
|
|
81
|
+
children: e
|
|
82
|
+
})
|
|
74
83
|
});
|
|
75
84
|
}
|
|
85
|
+
function x({ level: e }) {
|
|
86
|
+
return /* @__PURE__ */ d(b, { text: `H${e}` });
|
|
87
|
+
}
|
|
76
88
|
function S({ editor: S, toolbarConfig: C, translation: w, disabled: T, isFullscreen: E, onToggleFullscreen: D, pasteAsPlainText: O, onTogglePasteAsPlainText: k }) {
|
|
77
|
-
let [A, j] =
|
|
89
|
+
let [A, j] = o(!1), [M, N] = o(!1), [P, F] = o(!1), [I, L] = o(null), [R, z] = o(null), [B, V] = o(null), H = T || !S, U = S?.getAttributes("textStyle")?.color, W = S?.getAttributes("highlight")?.color, G = C.showBold || C.showItalic || C.showUnderline || C.showStrike, K = C.showHeading1 || C.showHeading2 || C.showHeading3, q = C.showBulletList || C.showOrderedList, J = C.showBlockquote || C.showCodeBlock || C.showLink || C.showHorizontalRule, Y = C.showTextColor || C.showHighlight, X = C.showUndoRedo || C.showClearFormat, Z = C.showTableButton || C.showImageButton || C.showEmojiButton, Q = [
|
|
78
90
|
G,
|
|
79
91
|
K,
|
|
80
92
|
q,
|
|
@@ -82,16 +94,16 @@ function S({ editor: S, toolbarConfig: C, translation: w, disabled: T, isFullscr
|
|
|
82
94
|
Y,
|
|
83
95
|
X,
|
|
84
96
|
Z
|
|
85
|
-
],
|
|
97
|
+
], _e = Q.filter(Boolean).length;
|
|
86
98
|
function $(e, t) {
|
|
87
|
-
return !e || Q.slice(t + 1).findIndex(Boolean) === -1 ? null : /* @__PURE__ */
|
|
99
|
+
return !e || Q.slice(t + 1).findIndex(Boolean) === -1 ? null : /* @__PURE__ */ d(te, {
|
|
88
100
|
orientation: "vertical",
|
|
89
101
|
flexItem: !0,
|
|
90
102
|
sx: { mx: .5 }
|
|
91
103
|
}, `div-${t}`);
|
|
92
104
|
}
|
|
93
|
-
return /* @__PURE__ */
|
|
94
|
-
/* @__PURE__ */
|
|
105
|
+
return /* @__PURE__ */ f(u, { children: [
|
|
106
|
+
/* @__PURE__ */ f(s, {
|
|
95
107
|
sx: {
|
|
96
108
|
display: "flex",
|
|
97
109
|
flexWrap: "wrap",
|
|
@@ -103,36 +115,36 @@ function S({ editor: S, toolbarConfig: C, translation: w, disabled: T, isFullscr
|
|
|
103
115
|
role: "toolbar",
|
|
104
116
|
"aria-label": "Text formatting",
|
|
105
117
|
children: [
|
|
106
|
-
G && /* @__PURE__ */
|
|
118
|
+
G && /* @__PURE__ */ f(s, {
|
|
107
119
|
sx: {
|
|
108
120
|
display: "flex",
|
|
109
121
|
gap: .25
|
|
110
122
|
},
|
|
111
123
|
children: [
|
|
112
|
-
C.showBold && /* @__PURE__ */
|
|
124
|
+
C.showBold && /* @__PURE__ */ d(e, {
|
|
113
125
|
label: w.bold,
|
|
114
|
-
icon: /* @__PURE__ */
|
|
126
|
+
icon: /* @__PURE__ */ d(se, { fontSize: "small" }),
|
|
115
127
|
onClick: () => S?.chain().focus().toggleBold().run(),
|
|
116
128
|
active: S?.isActive("bold"),
|
|
117
129
|
disabled: H
|
|
118
130
|
}),
|
|
119
|
-
C.showItalic && /* @__PURE__ */
|
|
131
|
+
C.showItalic && /* @__PURE__ */ d(e, {
|
|
120
132
|
label: w.italic,
|
|
121
|
-
icon: /* @__PURE__ */
|
|
133
|
+
icon: /* @__PURE__ */ d(ce, { fontSize: "small" }),
|
|
122
134
|
onClick: () => S?.chain().focus().toggleItalic().run(),
|
|
123
135
|
active: S?.isActive("italic"),
|
|
124
136
|
disabled: H
|
|
125
137
|
}),
|
|
126
|
-
C.showUnderline && /* @__PURE__ */
|
|
138
|
+
C.showUnderline && /* @__PURE__ */ d(e, {
|
|
127
139
|
label: w.underline,
|
|
128
|
-
icon: /* @__PURE__ */
|
|
140
|
+
icon: /* @__PURE__ */ d(le, { fontSize: "small" }),
|
|
129
141
|
onClick: () => S?.chain().focus().toggleUnderline().run(),
|
|
130
142
|
active: S?.isActive("underline"),
|
|
131
143
|
disabled: H
|
|
132
144
|
}),
|
|
133
|
-
C.showStrike && /* @__PURE__ */
|
|
145
|
+
C.showStrike && /* @__PURE__ */ d(e, {
|
|
134
146
|
label: w.strike,
|
|
135
|
-
icon: /* @__PURE__ */
|
|
147
|
+
icon: /* @__PURE__ */ d(ue, { fontSize: "small" }),
|
|
136
148
|
onClick: () => S?.chain().focus().toggleStrike().run(),
|
|
137
149
|
active: S?.isActive("strike"),
|
|
138
150
|
disabled: H
|
|
@@ -140,29 +152,29 @@ function S({ editor: S, toolbarConfig: C, translation: w, disabled: T, isFullscr
|
|
|
140
152
|
]
|
|
141
153
|
}),
|
|
142
154
|
$(G, 0),
|
|
143
|
-
K && /* @__PURE__ */
|
|
155
|
+
K && /* @__PURE__ */ f(s, {
|
|
144
156
|
sx: {
|
|
145
157
|
display: "flex",
|
|
146
158
|
gap: .25
|
|
147
159
|
},
|
|
148
160
|
children: [
|
|
149
|
-
C.showHeading1 && /* @__PURE__ */
|
|
161
|
+
C.showHeading1 && /* @__PURE__ */ d(e, {
|
|
150
162
|
label: w.heading1,
|
|
151
|
-
icon: /* @__PURE__ */
|
|
163
|
+
icon: /* @__PURE__ */ d(x, { level: 1 }),
|
|
152
164
|
onClick: () => S?.chain().focus().toggleHeading({ level: 1 }).run(),
|
|
153
165
|
active: S?.isActive("heading", { level: 1 }),
|
|
154
166
|
disabled: H
|
|
155
167
|
}),
|
|
156
|
-
C.showHeading2 && /* @__PURE__ */
|
|
168
|
+
C.showHeading2 && /* @__PURE__ */ d(e, {
|
|
157
169
|
label: w.heading2,
|
|
158
|
-
icon: /* @__PURE__ */
|
|
170
|
+
icon: /* @__PURE__ */ d(x, { level: 2 }),
|
|
159
171
|
onClick: () => S?.chain().focus().toggleHeading({ level: 2 }).run(),
|
|
160
172
|
active: S?.isActive("heading", { level: 2 }),
|
|
161
173
|
disabled: H
|
|
162
174
|
}),
|
|
163
|
-
C.showHeading3 && /* @__PURE__ */
|
|
175
|
+
C.showHeading3 && /* @__PURE__ */ d(e, {
|
|
164
176
|
label: w.heading3,
|
|
165
|
-
icon: /* @__PURE__ */
|
|
177
|
+
icon: /* @__PURE__ */ d(x, { level: 3 }),
|
|
166
178
|
onClick: () => S?.chain().focus().toggleHeading({ level: 3 }).run(),
|
|
167
179
|
active: S?.isActive("heading", { level: 3 }),
|
|
168
180
|
disabled: H
|
|
@@ -170,190 +182,182 @@ function S({ editor: S, toolbarConfig: C, translation: w, disabled: T, isFullscr
|
|
|
170
182
|
]
|
|
171
183
|
}),
|
|
172
184
|
$(K, 1),
|
|
173
|
-
q && /* @__PURE__ */
|
|
185
|
+
q && /* @__PURE__ */ f(s, {
|
|
174
186
|
sx: {
|
|
175
187
|
display: "flex",
|
|
176
188
|
gap: .25
|
|
177
189
|
},
|
|
178
|
-
children: [C.showBulletList && /* @__PURE__ */
|
|
190
|
+
children: [C.showBulletList && /* @__PURE__ */ d(e, {
|
|
179
191
|
label: w.bulletList,
|
|
180
|
-
icon: /* @__PURE__ */
|
|
192
|
+
icon: /* @__PURE__ */ d(de, { fontSize: "small" }),
|
|
181
193
|
onClick: () => S?.chain().focus().toggleBulletList().run(),
|
|
182
194
|
active: S?.isActive("bulletList"),
|
|
183
195
|
disabled: H
|
|
184
|
-
}), C.showOrderedList && /* @__PURE__ */
|
|
196
|
+
}), C.showOrderedList && /* @__PURE__ */ d(e, {
|
|
185
197
|
label: w.orderedList,
|
|
186
|
-
icon: /* @__PURE__ */
|
|
198
|
+
icon: /* @__PURE__ */ d(m, { fontSize: "small" }),
|
|
187
199
|
onClick: () => S?.chain().focus().toggleOrderedList().run(),
|
|
188
200
|
active: S?.isActive("orderedList"),
|
|
189
201
|
disabled: H
|
|
190
202
|
})]
|
|
191
203
|
}),
|
|
192
204
|
$(q, 2),
|
|
193
|
-
J && /* @__PURE__ */
|
|
205
|
+
J && /* @__PURE__ */ f(s, {
|
|
194
206
|
sx: {
|
|
195
207
|
display: "flex",
|
|
196
208
|
gap: .25
|
|
197
209
|
},
|
|
198
210
|
children: [
|
|
199
|
-
C.showBlockquote && /* @__PURE__ */
|
|
211
|
+
C.showBlockquote && /* @__PURE__ */ d(e, {
|
|
200
212
|
label: w.blockquote,
|
|
201
|
-
icon: /* @__PURE__ */
|
|
213
|
+
icon: /* @__PURE__ */ d(fe, { fontSize: "small" }),
|
|
202
214
|
onClick: () => S?.chain().focus().toggleBlockquote().run(),
|
|
203
215
|
active: S?.isActive("blockquote"),
|
|
204
216
|
disabled: H
|
|
205
217
|
}),
|
|
206
|
-
C.showCodeBlock && /* @__PURE__ */
|
|
218
|
+
C.showCodeBlock && /* @__PURE__ */ d(e, {
|
|
207
219
|
label: w.codeBlock,
|
|
208
|
-
icon: /* @__PURE__ */
|
|
220
|
+
icon: /* @__PURE__ */ d(pe, { fontSize: "small" }),
|
|
209
221
|
onClick: () => S?.chain().focus().toggleCodeBlock().run(),
|
|
210
222
|
active: S?.isActive("codeBlock"),
|
|
211
223
|
disabled: H
|
|
212
224
|
}),
|
|
213
|
-
C.showLink && /* @__PURE__ */
|
|
225
|
+
C.showLink && /* @__PURE__ */ d(e, {
|
|
214
226
|
label: w.link,
|
|
215
|
-
icon: /* @__PURE__ */
|
|
227
|
+
icon: /* @__PURE__ */ d(me, { fontSize: "small" }),
|
|
216
228
|
onClick: () => j(!0),
|
|
217
229
|
active: S?.isActive("link"),
|
|
218
230
|
disabled: H
|
|
219
231
|
}),
|
|
220
|
-
C.showHorizontalRule && /* @__PURE__ */
|
|
232
|
+
C.showHorizontalRule && /* @__PURE__ */ d(e, {
|
|
221
233
|
label: w.horizontalRule,
|
|
222
|
-
icon: /* @__PURE__ */
|
|
234
|
+
icon: /* @__PURE__ */ d(h, { fontSize: "small" }),
|
|
223
235
|
onClick: () => S?.chain().focus().setHorizontalRule().run(),
|
|
224
236
|
disabled: H
|
|
225
237
|
})
|
|
226
238
|
]
|
|
227
239
|
}),
|
|
228
240
|
$(J, 3),
|
|
229
|
-
Y && /* @__PURE__ */
|
|
241
|
+
Y && /* @__PURE__ */ f(s, {
|
|
230
242
|
sx: {
|
|
231
243
|
display: "flex",
|
|
232
244
|
gap: .25
|
|
233
245
|
},
|
|
234
|
-
children: [C.showTextColor && /* @__PURE__ */
|
|
246
|
+
children: [C.showTextColor && /* @__PURE__ */ d(y, {
|
|
235
247
|
label: w.textColor,
|
|
236
|
-
icon: /* @__PURE__ */
|
|
248
|
+
icon: /* @__PURE__ */ d(g, { fontSize: "small" }),
|
|
237
249
|
activeColor: U,
|
|
238
250
|
disabled: H,
|
|
239
251
|
onClick: (e) => z(e.currentTarget)
|
|
240
|
-
}), C.showHighlight && /* @__PURE__ */
|
|
252
|
+
}), C.showHighlight && /* @__PURE__ */ d(y, {
|
|
241
253
|
label: w.highlight,
|
|
242
|
-
icon: /* @__PURE__ */
|
|
254
|
+
icon: /* @__PURE__ */ d(_, { fontSize: "small" }),
|
|
243
255
|
activeColor: W,
|
|
244
256
|
disabled: H,
|
|
245
257
|
onClick: (e) => V(e.currentTarget)
|
|
246
258
|
})]
|
|
247
259
|
}),
|
|
248
260
|
$(Y, 4),
|
|
249
|
-
X && /* @__PURE__ */
|
|
261
|
+
X && /* @__PURE__ */ f(s, {
|
|
250
262
|
sx: {
|
|
251
263
|
display: "flex",
|
|
252
264
|
gap: .25
|
|
253
265
|
},
|
|
254
|
-
children: [C.showUndoRedo && /* @__PURE__ */
|
|
266
|
+
children: [C.showUndoRedo && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(e, {
|
|
255
267
|
label: w.undo,
|
|
256
|
-
icon: /* @__PURE__ */
|
|
268
|
+
icon: /* @__PURE__ */ d(ne, { fontSize: "small" }),
|
|
257
269
|
onClick: () => S?.chain().focus().undo().run(),
|
|
258
270
|
disabled: H || !S?.can().undo()
|
|
259
|
-
}), /* @__PURE__ */
|
|
271
|
+
}), /* @__PURE__ */ d(e, {
|
|
260
272
|
label: w.redo,
|
|
261
|
-
icon: /* @__PURE__ */
|
|
273
|
+
icon: /* @__PURE__ */ d(re, { fontSize: "small" }),
|
|
262
274
|
onClick: () => S?.chain().focus().redo().run(),
|
|
263
275
|
disabled: H || !S?.can().redo()
|
|
264
|
-
})] }), C.showClearFormat && /* @__PURE__ */
|
|
276
|
+
})] }), C.showClearFormat && /* @__PURE__ */ d(e, {
|
|
265
277
|
label: w.clearFormat,
|
|
266
|
-
icon: /* @__PURE__ */
|
|
278
|
+
icon: /* @__PURE__ */ d(v, { fontSize: "small" }),
|
|
267
279
|
onClick: () => S?.chain().focus().clearNodes().unsetAllMarks().run(),
|
|
268
280
|
disabled: H
|
|
269
281
|
})]
|
|
270
282
|
}),
|
|
271
283
|
$(X, 5),
|
|
272
|
-
Z && /* @__PURE__ */
|
|
284
|
+
Z && /* @__PURE__ */ f(s, {
|
|
273
285
|
sx: {
|
|
274
286
|
display: "flex",
|
|
275
287
|
gap: .25
|
|
276
288
|
},
|
|
277
289
|
children: [
|
|
278
|
-
C.showTableButton && /* @__PURE__ */
|
|
290
|
+
C.showTableButton && /* @__PURE__ */ d(r, {
|
|
279
291
|
editor: S,
|
|
280
292
|
translation: w,
|
|
281
293
|
disabled: H
|
|
282
294
|
}),
|
|
283
|
-
C.showImageButton && /* @__PURE__ */
|
|
295
|
+
C.showImageButton && /* @__PURE__ */ d(e, {
|
|
284
296
|
label: w.image,
|
|
285
|
-
icon: /* @__PURE__ */
|
|
297
|
+
icon: /* @__PURE__ */ d(ae, { fontSize: "small" }),
|
|
286
298
|
onClick: () => N(!0),
|
|
287
299
|
disabled: H
|
|
288
300
|
}),
|
|
289
|
-
C.showEmojiButton && /* @__PURE__ */
|
|
301
|
+
C.showEmojiButton && /* @__PURE__ */ d(l, {
|
|
290
302
|
title: w.emoji,
|
|
291
303
|
arrow: !0,
|
|
292
|
-
children: /* @__PURE__ */
|
|
304
|
+
children: /* @__PURE__ */ d("span", { children: /* @__PURE__ */ d(c, {
|
|
293
305
|
size: "small",
|
|
294
306
|
onMouseDown: (e) => e.preventDefault(),
|
|
295
307
|
onClick: (e) => L(e.currentTarget),
|
|
296
308
|
disabled: H,
|
|
297
309
|
sx: { borderRadius: 1 },
|
|
298
310
|
"aria-label": w.emoji,
|
|
299
|
-
children: /* @__PURE__ */
|
|
311
|
+
children: /* @__PURE__ */ d(oe, { fontSize: "small" })
|
|
300
312
|
}) })
|
|
301
313
|
})
|
|
302
314
|
]
|
|
303
315
|
}),
|
|
304
|
-
|
|
305
|
-
(C.showPasteAsPlainTextButton || C.showMarkdownButton || C.showFullscreenButton) && /* @__PURE__ */
|
|
316
|
+
_e === 0 && /* @__PURE__ */ d(s, { sx: { height: 32 } }),
|
|
317
|
+
(C.showPasteAsPlainTextButton || C.showMarkdownButton || C.showFullscreenButton) && /* @__PURE__ */ f(s, {
|
|
306
318
|
sx: {
|
|
307
319
|
ml: "auto",
|
|
308
320
|
display: "flex",
|
|
309
321
|
gap: .25
|
|
310
322
|
},
|
|
311
323
|
children: [
|
|
312
|
-
C.showPasteAsPlainTextButton && /* @__PURE__ */
|
|
324
|
+
C.showPasteAsPlainTextButton && /* @__PURE__ */ d(e, {
|
|
313
325
|
label: O ? w.pasteAsHtml : w.pasteAsPlainText,
|
|
314
|
-
icon:
|
|
326
|
+
icon: d(O ? ge : he, { fontSize: "small" }),
|
|
315
327
|
onClick: k,
|
|
316
328
|
active: O,
|
|
317
329
|
disabled: T || !S
|
|
318
330
|
}),
|
|
319
|
-
C.showMarkdownButton && /* @__PURE__ */
|
|
331
|
+
C.showMarkdownButton && /* @__PURE__ */ d(e, {
|
|
320
332
|
label: w.markdown,
|
|
321
|
-
icon: /* @__PURE__ */
|
|
322
|
-
component: "span",
|
|
323
|
-
sx: {
|
|
324
|
-
fontWeight: "bold",
|
|
325
|
-
fontSize: "0.7rem",
|
|
326
|
-
lineHeight: 1
|
|
327
|
-
},
|
|
328
|
-
children: "MD"
|
|
329
|
-
}),
|
|
333
|
+
icon: /* @__PURE__ */ d(b, { text: "MD" }),
|
|
330
334
|
onClick: () => F(!0),
|
|
331
335
|
disabled: T || !S
|
|
332
336
|
}),
|
|
333
|
-
C.showFullscreenButton && /* @__PURE__ */
|
|
337
|
+
C.showFullscreenButton && /* @__PURE__ */ d(l, {
|
|
334
338
|
title: E ? w.exitFullscreen : w.fullscreen,
|
|
335
339
|
arrow: !0,
|
|
336
|
-
children: /* @__PURE__ */
|
|
340
|
+
children: /* @__PURE__ */ d("span", { children: /* @__PURE__ */ d(c, {
|
|
337
341
|
size: "small",
|
|
338
342
|
onMouseDown: (e) => e.preventDefault(),
|
|
339
343
|
onClick: D,
|
|
340
344
|
disabled: T || !S,
|
|
341
345
|
sx: { borderRadius: 1 },
|
|
342
346
|
"aria-label": E ? w.exitFullscreen : w.fullscreen,
|
|
343
|
-
children:
|
|
347
|
+
children: d(E ? p : ie, { fontSize: "small" })
|
|
344
348
|
}) })
|
|
345
349
|
})
|
|
346
350
|
]
|
|
347
351
|
})
|
|
348
352
|
]
|
|
349
353
|
}),
|
|
350
|
-
C.showLink && S && /* @__PURE__ */
|
|
354
|
+
C.showLink && S && /* @__PURE__ */ d(t, {
|
|
351
355
|
open: A,
|
|
352
356
|
onClose: () => j(!1),
|
|
353
357
|
editor: S,
|
|
354
358
|
translation: w
|
|
355
359
|
}),
|
|
356
|
-
C.showTextColor && /* @__PURE__ */
|
|
360
|
+
C.showTextColor && /* @__PURE__ */ d(n, {
|
|
357
361
|
anchorEl: R,
|
|
358
362
|
open: !!R,
|
|
359
363
|
onClose: () => z(null),
|
|
@@ -363,7 +367,7 @@ function S({ editor: S, toolbarConfig: C, translation: w, disabled: T, isFullscr
|
|
|
363
367
|
onRemoveColor: () => S?.chain().focus().unsetColor().run(),
|
|
364
368
|
removeLabel: w.removeTextColor
|
|
365
369
|
}),
|
|
366
|
-
C.showHighlight && /* @__PURE__ */
|
|
370
|
+
C.showHighlight && /* @__PURE__ */ d(n, {
|
|
367
371
|
anchorEl: B,
|
|
368
372
|
open: !!B,
|
|
369
373
|
onClose: () => V(null),
|
|
@@ -373,19 +377,19 @@ function S({ editor: S, toolbarConfig: C, translation: w, disabled: T, isFullscr
|
|
|
373
377
|
onRemoveColor: () => S?.chain().focus().unsetHighlight().run(),
|
|
374
378
|
removeLabel: w.removeHighlight
|
|
375
379
|
}),
|
|
376
|
-
C.showImageButton && S && /* @__PURE__ */
|
|
380
|
+
C.showImageButton && S && /* @__PURE__ */ d(i, {
|
|
377
381
|
open: M,
|
|
378
382
|
onClose: () => N(!1),
|
|
379
383
|
editor: S,
|
|
380
384
|
translation: w
|
|
381
385
|
}),
|
|
382
|
-
C.showMarkdownButton && S && /* @__PURE__ */
|
|
386
|
+
C.showMarkdownButton && S && /* @__PURE__ */ d(ee, {
|
|
383
387
|
open: P,
|
|
384
388
|
onClose: () => F(!1),
|
|
385
389
|
editor: S,
|
|
386
390
|
translation: w
|
|
387
391
|
}),
|
|
388
|
-
C.showEmojiButton && /* @__PURE__ */
|
|
392
|
+
C.showEmojiButton && /* @__PURE__ */ d(a, {
|
|
389
393
|
anchorEl: I,
|
|
390
394
|
open: !!I,
|
|
391
395
|
onClose: () => L(null),
|