@zeniai/web-components 4.4.70 → 4.4.71-betaAK1

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.
Files changed (30) hide show
  1. package/dist/Editor-D13LiK8V.cjs +269 -0
  2. package/dist/Editor-KtRfSJyD.js +919 -0
  3. package/dist/{SessionTimeoutPopup-D12fxo7a.cjs → SessionTimeoutPopup-JoJimbHb.cjs} +16408 -16947
  4. package/dist/{SessionTimeoutPopup-BKNhya21.js → SessionTimeoutPopup-aNJh0VqE.js} +73179 -74943
  5. package/dist/TaskDescriptionEditor-C_mttT9G.js +700 -0
  6. package/dist/TaskDescriptionEditor-DLuXATNl.cjs +197 -0
  7. package/dist/cockpit.cjs.js +254 -254
  8. package/dist/cockpit.esm.js +1449 -1449
  9. package/dist/index.cjs.js +1 -1
  10. package/dist/index.esm.js +112 -112
  11. package/dist/underline-C1X4r0Bi.js +223 -0
  12. package/dist/underline-CtPZKkkA.cjs +76 -0
  13. package/dist/vendor-@stripe-stripe-js-Bg6HyFI3.cjs +8 -0
  14. package/dist/vendor-@stripe-stripe-js-BmvP0myE.js +108 -0
  15. package/package.json +1 -1
  16. package/dist/assets/illustrative/ai-cfo.svg +0 -13
  17. package/dist/assets/illustrative/rewardsEmailTemplate/business-banking-icon.svg +0 -21
  18. package/dist/assets/illustrative/rewardsEmailTemplate/cards-icon.svg +0 -11
  19. package/dist/assets/interface/ai-icon-color-selected-filled-small.svg +0 -27
  20. package/dist/assets/interface/ai-icon-color-selected-small.svg +0 -20
  21. package/dist/assets/interface/ai-icon-selected-filled-plain.svg +0 -5
  22. package/dist/assets/interface/arrow-2-left.svg +0 -4
  23. package/dist/assets/interface/autofill-3.svg +0 -3
  24. package/dist/assets/interface/graph-trend.svg +0 -11
  25. package/dist/assets/interface/growth-round.svg +0 -5
  26. package/dist/assets/interface/saving-money-egg.svg +0 -15
  27. package/dist/assets/interface/treasury-thumbnail.png +0 -0
  28. package/dist/assets/logos/gmail-logo.svg +0 -20
  29. package/dist/assets/logos/microsoft365-logo.svg +0 -25
  30. package/dist/assets/oldicons/promoPages/usp-line.svg +0 -3
@@ -0,0 +1,700 @@
1
+ import { j as e } from "./vendor-react-DRsGZW4u.js";
2
+ import { useRef as $, useCallback as I, useState as f, useEffect as A } from "react";
3
+ import x from "@emotion/styled";
4
+ import { $generateHtmlFromNodes as gt, $generateNodesFromDOM as bt } from "@lexical/html";
5
+ import { AutoLinkNode as ft, LinkNode as ht, $isLinkNode as P, TOGGLE_LINK_COMMAND as H } from "@lexical/link";
6
+ import { ListNode as nt, ListItemNode as xt, $isListNode as Nt, INSERT_UNORDERED_LIST_COMMAND as Et, REMOVE_LIST_COMMAND as kt } from "@lexical/list";
7
+ import { LexicalComposer as yt } from "@lexical/react/LexicalComposer";
8
+ import { useLexicalComposerContext as st } from "@lexical/react/LexicalComposerContext";
9
+ import { ContentEditable as Ct } from "@lexical/react/LexicalContentEditable";
10
+ import jt from "@lexical/react/LexicalErrorBoundary";
11
+ import { HistoryPlugin as Tt } from "@lexical/react/LexicalHistoryPlugin";
12
+ import { LinkPlugin as vt } from "@lexical/react/LexicalLinkPlugin";
13
+ import { ListPlugin as Lt } from "@lexical/react/LexicalListPlugin";
14
+ import { RichTextPlugin as $t } from "@lexical/react/LexicalRichTextPlugin";
15
+ import { HeadingNode as At, QuoteNode as Rt, $isHeadingNode as St } from "@lexical/rich-text";
16
+ import { $isParentElementRTL as Dt, $isAtNodeEnd as z } from "@lexical/selection";
17
+ import { $getNearestNodeOfType as Ot, mergeRegister as rt } from "@lexical/utils";
18
+ import { useTheme as Mt } from "@mui/material/styles";
19
+ import { $getSelection as at, $isRangeSelection as lt, SELECTION_CHANGE_COMMAND as ct, CAN_UNDO_COMMAND as _t, CAN_REDO_COMMAND as wt, FORMAT_TEXT_COMMAND as B, FORMAT_ELEMENT_COMMAND as M, INDENT_CONTENT_COMMAND as It, OUTDENT_CONTENT_COMMAND as Pt, UNDO_COMMAND as Bt, REDO_COMMAND as Ht, $getRoot as K, $createParagraphNode as Ut } from "lexical";
20
+ import { createPortal as Ft } from "react-dom";
21
+ import { cc as Wt, ce as zt, cd as Kt, af as Gt, fr as r, i_ as U, fA as Vt, gE as p, gp as Xt, dC as Qt, hy as Yt, g3 as Jt, aP as qt } from "./SessionTimeoutPopup-aNJh0VqE.js";
22
+ import { t as Zt, E as te, C as ee, a as oe, P as ie, L as ne, S as se, d as re, l as ae, g as le, h as ce, f as de, b as me, k as pe, e as ue, c as ge, i as be, j as fe } from "./underline-C1X4r0Bi.js";
23
+ const he = (t) => t.replace(Wt, "&").replace(zt, "<").replace(Kt, ">"), xe = /* @__PURE__ */ new Set([
24
+ "ADDRESS",
25
+ "ARTICLE",
26
+ "ASIDE",
27
+ "BLOCKQUOTE",
28
+ "DD",
29
+ "DIV",
30
+ "DL",
31
+ "DT",
32
+ "FIGURE",
33
+ "FOOTER",
34
+ "H1",
35
+ "H2",
36
+ "H3",
37
+ "H4",
38
+ "H5",
39
+ "H6",
40
+ "HEADER",
41
+ "LI",
42
+ "MAIN",
43
+ "NAV",
44
+ "OL",
45
+ "P",
46
+ "PRE",
47
+ "SECTION",
48
+ "TABLE",
49
+ "TBODY",
50
+ "TD",
51
+ "TFOOT",
52
+ "TH",
53
+ "THEAD",
54
+ "TR",
55
+ "UL"
56
+ ]), _ = (t) => t != null && t.nodeType === Node.ELEMENT_NODE && xe.has(t.tagName), Ne = (t) => {
57
+ const { previousSibling: o, nextSibling: i } = t, s = o == null || _(o), n = i == null || _(i);
58
+ return s && n && (_(o) || _(i));
59
+ }, Ee = (t) => {
60
+ const o = t.createTreeWalker(t.body, NodeFilter.SHOW_TEXT), i = [];
61
+ let s = o.nextNode();
62
+ for (; s != null; )
63
+ i.push(s), s = o.nextNode();
64
+ i.forEach((n) => {
65
+ if (n.parentNode == null || n.textContent == null)
66
+ return;
67
+ const a = n.textContent.replace(Gt, `
68
+ `);
69
+ if (!a.includes(`
70
+ `) || a.trim() === "" && Ne(n))
71
+ return;
72
+ const c = t.createDocumentFragment();
73
+ a.split(`
74
+ `).forEach((d, g) => {
75
+ g > 0 && c.appendChild(t.createElement("br")), d !== "" && c.appendChild(t.createTextNode(d));
76
+ }), n.parentNode.replaceChild(c, n);
77
+ });
78
+ }, ke = 200, ye = (t, o) => {
79
+ if (t.delete(o), t.add(o), t.size > ke) {
80
+ const i = t.values().next().value;
81
+ i != null && t.delete(i);
82
+ }
83
+ }, Ce = (t, o, i) => t !== o && !i.has(t), w = 1, {
84
+ taskManagement: {
85
+ taskDetail: { descriptionEditorTooltip: k }
86
+ },
87
+ common: {
88
+ texts: {
89
+ bold: G,
90
+ italic: V,
91
+ underline: X,
92
+ link: Q,
93
+ bulletList: Y,
94
+ indent: J,
95
+ outdent: q,
96
+ undo: Z,
97
+ redo: tt
98
+ }
99
+ }
100
+ } = Yt.getLocalizedStrings();
101
+ function et(t, o) {
102
+ o === null ? (t.style.opacity = "0", t.style.top = "-1000px", t.style.left = "-1000px") : (t.style.opacity = "1", t.style.top = `${o.top + o.height + window.pageYOffset + 10}px`, t.style.left = `${o.left + window.pageXOffset - t.offsetWidth / 2 + o.width / 2}px`);
103
+ }
104
+ function dt(t) {
105
+ const o = t.anchor, i = t.focus, s = t.anchor.getNode(), n = t.focus.getNode();
106
+ return s === n ? s : t?.isBackward() ? z(i) ? s : n : z(o) ? n : s;
107
+ }
108
+ function je({ editor: t }) {
109
+ const o = Mt(), i = $(null), s = $(null), n = $(!1), [a, c] = f(""), [d, g] = f(!1), [j, N] = f(null), b = I(() => {
110
+ const l = at();
111
+ if (lt(l)) {
112
+ const C = dt(l), h = C.getParent();
113
+ P(h) ? c(h.getURL()) : P(C) ? c(C.getURL()) : c("");
114
+ }
115
+ const R = i.current, y = window.getSelection(), S = document.activeElement;
116
+ if (R === null)
117
+ return;
118
+ const T = t.getRootElement();
119
+ if (l !== null && y != null && !y.isCollapsed && T !== null && T.contains(y.anchorNode)) {
120
+ const C = y.getRangeAt(0);
121
+ let h;
122
+ if (y.anchorNode === T) {
123
+ let v = T;
124
+ for (; v.firstElementChild != null; )
125
+ v = v.firstElementChild;
126
+ h = v.getBoundingClientRect();
127
+ } else
128
+ h = C.getBoundingClientRect();
129
+ n.current || et(R, h), N(l);
130
+ } else (!S || S.className !== "link-input") && (et(R, null), N(null), g(!1), c(""));
131
+ return !0;
132
+ }, [t]);
133
+ return A(() => rt(
134
+ t.registerUpdateListener(({ editorState: l }) => {
135
+ l.read(() => {
136
+ b();
137
+ });
138
+ }),
139
+ t.registerCommand(
140
+ ct,
141
+ () => (b(), !0),
142
+ w
143
+ )
144
+ ), [t, b]), A(() => {
145
+ t.getEditorState().read(() => {
146
+ b();
147
+ });
148
+ }, [t, b]), A(() => {
149
+ d && s.current != null && s.current?.focus();
150
+ }, [d]), /* @__PURE__ */ e.jsx(De, { ref: i, children: d ? /* @__PURE__ */ e.jsx(
151
+ "input",
152
+ {
153
+ ref: s,
154
+ className: "link-input",
155
+ value: a,
156
+ onChange: (l) => {
157
+ c(l.target.value);
158
+ },
159
+ onKeyDown: (l) => {
160
+ l.key === "Enter" ? (l.preventDefault(), j !== null && (a !== "" && t.dispatchCommand(H, a), g(!1))) : l.key === "Escape" && (l.preventDefault(), g(!1));
161
+ }
162
+ }
163
+ ) : /* @__PURE__ */ e.jsxs(Oe, { className: "link-input", children: [
164
+ /* @__PURE__ */ e.jsx(Me, { href: a, target: "_blank", rel: "noopener noreferrer", children: a }),
165
+ /* @__PURE__ */ e.jsx(
166
+ _e,
167
+ {
168
+ className: "link-edit",
169
+ type: "button",
170
+ tabIndex: 0,
171
+ onMouseDown: (l) => l.preventDefault(),
172
+ onClick: () => {
173
+ g(!0);
174
+ },
175
+ children: /* @__PURE__ */ e.jsx(
176
+ Jt,
177
+ {
178
+ style: {
179
+ width: r.sp3,
180
+ height: r.sp3,
181
+ color: o.colors.primary
182
+ }
183
+ }
184
+ )
185
+ }
186
+ )
187
+ ] }) });
188
+ }
189
+ function Te({ onChange: t }) {
190
+ const [o] = st(), i = $(null), [s, n] = f(!1), [a, c] = f(!1), [d, g] = f("paragraph"), [, j] = f(!1), [N, b] = f(!1), [l, R] = f(!1), [y, S] = f(!1), [T, C] = f(!1), h = I(() => {
191
+ const m = at();
192
+ if (lt(m)) {
193
+ const L = m.anchor.getNode(), E = L.getKey() === "root" ? L : L.getTopLevelElementOrThrow(), D = E.getKey();
194
+ if (o.getElementByKey(D) !== null)
195
+ if (Nt(E)) {
196
+ const O = Ot(L, nt), ut = O ? O.getTag() : E.getTag();
197
+ g(ut);
198
+ } else {
199
+ const O = St(E) ? E.getTag() : E.getType();
200
+ g(O);
201
+ }
202
+ C(m.hasFormat("bold")), R(m.hasFormat("italic")), S(m.hasFormat("underline")), j(Dt(m));
203
+ const W = dt(m), pt = W.getParent();
204
+ P(pt) || P(W) ? b(!0) : b(!1);
205
+ }
206
+ }, [o]);
207
+ A(() => rt(
208
+ o.registerUpdateListener(({ editorState: m }) => {
209
+ m.read(() => {
210
+ h();
211
+ });
212
+ }),
213
+ o.registerCommand(
214
+ ct,
215
+ () => (h(), !1),
216
+ w
217
+ ),
218
+ o.registerCommand(
219
+ _t,
220
+ (m) => (n(m), !1),
221
+ w
222
+ ),
223
+ o.registerCommand(
224
+ wt,
225
+ (m) => (c(m), !1),
226
+ w
227
+ )
228
+ ), [o, h]), A(() => o.registerUpdateListener(
229
+ ({ dirtyElements: m, dirtyLeaves: L, editorState: E, tags: D }) => {
230
+ D.has("history-merge") || D.has("initial-content") || m.size === 0 && L.size === 0 || E.read(() => {
231
+ const F = gt(o, null);
232
+ t(F);
233
+ });
234
+ }
235
+ ), [o, t]);
236
+ const v = I(() => {
237
+ N ? o.dispatchCommand(H, null) : o.dispatchCommand(H, "https://");
238
+ }, [o, N]), mt = () => {
239
+ d !== "ul" ? o.dispatchCommand(Et, void 0) : o.dispatchCommand(kt, void 0);
240
+ };
241
+ return /* @__PURE__ */ e.jsxs(Se, { className: "toolbar", ref: i, children: [
242
+ /* @__PURE__ */ e.jsxs(ot, { children: [
243
+ /* @__PURE__ */ e.jsx(p, { placement: "bottom", title: G, children: /* @__PURE__ */ e.jsx(
244
+ u,
245
+ {
246
+ type: "button",
247
+ onClick: () => o.dispatchCommand(B, "bold"),
248
+ className: "toolbar-item spaced " + (T ? "active" : ""),
249
+ "data-testid": "task-description-editor-toolbar-bold",
250
+ "aria-label": G,
251
+ children: /* @__PURE__ */ e.jsx(se, { className: "format" })
252
+ }
253
+ ) }),
254
+ /* @__PURE__ */ e.jsx(p, { placement: "bottom", title: V, children: /* @__PURE__ */ e.jsx(
255
+ u,
256
+ {
257
+ type: "button",
258
+ onClick: () => o.dispatchCommand(B, "italic"),
259
+ className: "toolbar-item spaced " + (l ? "active" : ""),
260
+ "data-testid": "task-description-editor-toolbar-italic",
261
+ "aria-label": V,
262
+ children: /* @__PURE__ */ e.jsx(re, { className: "format" })
263
+ }
264
+ ) }),
265
+ /* @__PURE__ */ e.jsx(p, { placement: "bottom", title: X, children: /* @__PURE__ */ e.jsx(
266
+ u,
267
+ {
268
+ type: "button",
269
+ onClick: () => o.dispatchCommand(B, "underline"),
270
+ className: "toolbar-item spaced " + (y ? "active" : ""),
271
+ "data-testid": "task-description-editor-toolbar-underline",
272
+ "aria-label": X,
273
+ children: /* @__PURE__ */ e.jsx(ae, { className: "format" })
274
+ }
275
+ ) }),
276
+ /* @__PURE__ */ e.jsx(p, { placement: "bottom", title: Q, children: /* @__PURE__ */ e.jsx(
277
+ u,
278
+ {
279
+ type: "button",
280
+ onClick: v,
281
+ className: "toolbar-item spaced " + (N ? "active" : ""),
282
+ "data-testid": "task-description-editor-toolbar-link",
283
+ "aria-label": Q,
284
+ children: /* @__PURE__ */ e.jsx(le, { className: "format" })
285
+ }
286
+ ) }),
287
+ N && Ft(/* @__PURE__ */ e.jsx(je, { editor: o }), document.body),
288
+ /* @__PURE__ */ e.jsx(it, {}),
289
+ /* @__PURE__ */ e.jsx(p, { placement: "bottom", title: Y, children: /* @__PURE__ */ e.jsx(
290
+ u,
291
+ {
292
+ type: "button",
293
+ onClick: mt,
294
+ className: "toolbar-item spaced " + (d === "ul" ? "active" : ""),
295
+ "data-testid": "task-description-editor-toolbar-bulletList",
296
+ "aria-label": Y,
297
+ children: /* @__PURE__ */ e.jsx(ce, { className: "format" })
298
+ }
299
+ ) }),
300
+ /* @__PURE__ */ e.jsx(it, {}),
301
+ /* @__PURE__ */ e.jsx(p, { placement: "bottom", title: k.leftAlign, children: /* @__PURE__ */ e.jsx(
302
+ u,
303
+ {
304
+ type: "button",
305
+ onClick: () => o.dispatchCommand(M, "left"),
306
+ className: "toolbar-item spaced",
307
+ "data-testid": "task-description-editor-toolbar-leftAlign",
308
+ "aria-label": k.leftAlign,
309
+ children: /* @__PURE__ */ e.jsx(de, { className: "format" })
310
+ }
311
+ ) }),
312
+ /* @__PURE__ */ e.jsx(
313
+ p,
314
+ {
315
+ placement: "bottom",
316
+ title: k.centerAlign,
317
+ children: /* @__PURE__ */ e.jsx(
318
+ u,
319
+ {
320
+ type: "button",
321
+ onClick: () => o.dispatchCommand(M, "center"),
322
+ className: "toolbar-item spaced",
323
+ "data-testid": "task-description-editor-toolbar-centerAlign",
324
+ "aria-label": k.centerAlign,
325
+ children: /* @__PURE__ */ e.jsx(me, { className: "format" })
326
+ }
327
+ )
328
+ }
329
+ ),
330
+ /* @__PURE__ */ e.jsx(p, { placement: "bottom", title: k.rightAlign, children: /* @__PURE__ */ e.jsx(
331
+ u,
332
+ {
333
+ type: "button",
334
+ onClick: () => o.dispatchCommand(M, "right"),
335
+ className: "toolbar-item spaced",
336
+ "data-testid": "task-description-editor-toolbar-rightAlign",
337
+ "aria-label": k.rightAlign,
338
+ children: /* @__PURE__ */ e.jsx(pe, { className: "format" })
339
+ }
340
+ ) }),
341
+ /* @__PURE__ */ e.jsx(
342
+ p,
343
+ {
344
+ placement: "bottom",
345
+ title: k.justifyAlign,
346
+ children: /* @__PURE__ */ e.jsx(
347
+ u,
348
+ {
349
+ type: "button",
350
+ onClick: () => o.dispatchCommand(M, "justify"),
351
+ className: "toolbar-item",
352
+ "data-testid": "task-description-editor-toolbar-justifyAlign",
353
+ "aria-label": k.justifyAlign,
354
+ children: /* @__PURE__ */ e.jsx(ue, { className: "format" })
355
+ }
356
+ )
357
+ }
358
+ ),
359
+ /* @__PURE__ */ e.jsx(p, { placement: "bottom", title: J, children: /* @__PURE__ */ e.jsx(
360
+ u,
361
+ {
362
+ type: "button",
363
+ onClick: () => o.dispatchCommand(It, void 0),
364
+ className: "toolbar-item",
365
+ "data-testid": "task-description-editor-toolbar-indent",
366
+ "aria-label": J,
367
+ children: /* @__PURE__ */ e.jsx(ge, { className: "format" })
368
+ }
369
+ ) }),
370
+ /* @__PURE__ */ e.jsx(p, { placement: "bottom", title: q, children: /* @__PURE__ */ e.jsx(
371
+ u,
372
+ {
373
+ type: "button",
374
+ onClick: () => o.dispatchCommand(Pt, void 0),
375
+ className: "toolbar-item",
376
+ "data-testid": "task-description-editor-toolbar-outdent",
377
+ "aria-label": q,
378
+ children: /* @__PURE__ */ e.jsx(be, { className: "format" })
379
+ }
380
+ ) })
381
+ ] }),
382
+ /* @__PURE__ */ e.jsxs(ot, { children: [
383
+ /* @__PURE__ */ e.jsx(p, { placement: "bottom", title: Z, children: /* @__PURE__ */ e.jsx(
384
+ u,
385
+ {
386
+ type: "button",
387
+ disabled: !s,
388
+ onClick: () => o.dispatchCommand(Bt, void 0),
389
+ className: "toolbar-item spaced",
390
+ "data-testid": "task-description-editor-toolbar-undo",
391
+ "aria-label": Z,
392
+ children: /* @__PURE__ */ e.jsx(Xt, { className: "format" })
393
+ }
394
+ ) }),
395
+ /* @__PURE__ */ e.jsx(p, { placement: "bottom", title: tt, children: /* @__PURE__ */ e.jsx(
396
+ u,
397
+ {
398
+ type: "button",
399
+ disabled: !a,
400
+ onClick: () => o.dispatchCommand(Ht, void 0),
401
+ className: "toolbar-item",
402
+ "data-testid": "task-description-editor-toolbar-redo",
403
+ "aria-label": tt,
404
+ children: /* @__PURE__ */ e.jsx(fe, { className: "format" })
405
+ }
406
+ ) })
407
+ ] })
408
+ ] });
409
+ }
410
+ function ve({
411
+ emittedHtml: t,
412
+ initialValue: o
413
+ }) {
414
+ const [i] = st(), s = $(void 0);
415
+ return A(() => {
416
+ const n = o ?? "";
417
+ if (!Ce(
418
+ n,
419
+ s.current,
420
+ t
421
+ )) {
422
+ s.current = n;
423
+ return;
424
+ }
425
+ const a = s.current == null;
426
+ if (s.current = n, n.trim() === "") {
427
+ a || i.update(
428
+ () => {
429
+ const c = K();
430
+ c.clear(), c.append(Ut());
431
+ },
432
+ { tag: "initial-content" }
433
+ );
434
+ return;
435
+ }
436
+ i.update(
437
+ () => {
438
+ const c = new DOMParser(), d = n.trim(), g = d.startsWith("<p") || d.startsWith("<div") || d.startsWith("<ul") || d.startsWith("<ol") || d.startsWith("<h") ? n : `<p>${he(n)}</p>`, j = c.parseFromString(g, "text/html");
439
+ Ee(j);
440
+ const N = bt(i, j), b = K();
441
+ b.clear(), b.append(...N);
442
+ },
443
+ { tag: "initial-content" }
444
+ );
445
+ }, [i, o, t]), null;
446
+ }
447
+ const Le = {
448
+ namespace: "TaskDescriptionEditor",
449
+ onError(t) {
450
+ throw t;
451
+ },
452
+ nodes: [
453
+ At,
454
+ nt,
455
+ xt,
456
+ Rt,
457
+ ft,
458
+ ht
459
+ ],
460
+ theme: Zt
461
+ };
462
+ function no({
463
+ initialValue: t,
464
+ placeholder: o,
465
+ onChange: i
466
+ }) {
467
+ const s = $(/* @__PURE__ */ new Set()).current, n = I(
468
+ (a) => {
469
+ ye(s, a), i(a);
470
+ },
471
+ [s, i]
472
+ );
473
+ return /* @__PURE__ */ e.jsxs(yt, { initialConfig: Le, children: [
474
+ /* @__PURE__ */ e.jsx(te, {}),
475
+ /* @__PURE__ */ e.jsxs($e, { children: [
476
+ /* @__PURE__ */ e.jsx(Te, { onChange: n }),
477
+ /* @__PURE__ */ e.jsxs(Ae, { children: [
478
+ /* @__PURE__ */ e.jsx(
479
+ $t,
480
+ {
481
+ contentEditable: /* @__PURE__ */ e.jsx(Ct, { className: "task-editor-input" }),
482
+ placeholder: o != null && o !== "" ? /* @__PURE__ */ e.jsx(Re, { children: o }) : null,
483
+ ErrorBoundary: jt
484
+ }
485
+ ),
486
+ /* @__PURE__ */ e.jsx(
487
+ ve,
488
+ {
489
+ emittedHtml: s,
490
+ initialValue: t
491
+ }
492
+ ),
493
+ /* @__PURE__ */ e.jsx(ee, {}),
494
+ /* @__PURE__ */ e.jsx(oe, {}),
495
+ /* @__PURE__ */ e.jsx(Tt, {}),
496
+ /* @__PURE__ */ e.jsx(Lt, {}),
497
+ /* @__PURE__ */ e.jsx(vt, {}),
498
+ /* @__PURE__ */ e.jsx(ie, {}),
499
+ /* @__PURE__ */ e.jsx(ne, { maxDepth: 7 })
500
+ ] })
501
+ ] })
502
+ ] });
503
+ }
504
+ const $e = x(Vt)`
505
+ position: relative;
506
+ margin: ${r.sp0};
507
+ border-radius: ${r.sp2};
508
+ color: ${(t) => t.theme.colors.primary};
509
+ text-align: left;
510
+ border: 1px solid ${(t) => t.theme.colors.grey3};
511
+ overflow: hidden;
512
+ margin-bottom: ${r.sp3};
513
+
514
+ &:hover {
515
+ border: 1px solid ${(t) => t.theme.colors.primary};
516
+
517
+ .toolbar {
518
+ border-bottom: 1px solid ${(t) => t.theme.colors.primary};
519
+ }
520
+ }
521
+
522
+ &:focus-within {
523
+ border: 1px solid ${(t) => t.theme.colors.primary};
524
+
525
+ .toolbar {
526
+ border-bottom: 1px solid ${(t) => t.theme.colors.primary};
527
+ }
528
+ }
529
+
530
+ .task-editor-input {
531
+ min-height: 80px;
532
+ max-height: 240px;
533
+ overflow: auto;
534
+ resize: none;
535
+ ${U.largeRegular.css};
536
+ color: ${(t) => t.theme.colors.primary};
537
+ position: relative;
538
+ tab-size: 1;
539
+ outline: 0;
540
+ padding: ${r.sp3} 12px;
541
+
542
+ .editor__link {
543
+ color: ${(t) => t.theme.colors.link};
544
+ text-decoration: none;
545
+ }
546
+ .editor__link:hover {
547
+ text-decoration: underline;
548
+ cursor: pointer;
549
+ }
550
+ }
551
+
552
+ .task-editor-input p {
553
+ margin: 0;
554
+ }
555
+
556
+ .toolbar {
557
+ display: flex;
558
+ margin-bottom: 1px;
559
+ background: ${(t) => t.theme.colors.grey5};
560
+ padding: ${r.sp1};
561
+ border-top-left-radius: 10px;
562
+ border-top-right-radius: 10px;
563
+ vertical-align: middle;
564
+ border-bottom: 1px solid ${(t) => t.theme.colors.grey3};
565
+ justify-content: space-between;
566
+ }
567
+
568
+ .toolbar button.toolbar-item {
569
+ border: 0;
570
+ display: flex;
571
+ background: none;
572
+ border-radius: ${r.sp2};
573
+ padding: ${r.sp1};
574
+ cursor: pointer;
575
+ vertical-align: middle;
576
+ }
577
+
578
+ .toolbar button.toolbar-item:disabled {
579
+ cursor: not-allowed;
580
+ }
581
+
582
+ .toolbar button.toolbar-item.spaced {
583
+ margin-right: 2px;
584
+ }
585
+
586
+ .toolbar button.toolbar-item svg.format {
587
+ background-size: contain;
588
+ display: inline-block;
589
+ height: ${r.sp3};
590
+ width: ${r.sp3};
591
+ vertical-align: -0.25em;
592
+ display: flex;
593
+ color: ${(t) => t.theme.colors.grey1};
594
+ }
595
+
596
+ .toolbar button.toolbar-item:disabled svg.format {
597
+ opacity: 0.2;
598
+ }
599
+
600
+ .toolbar button.toolbar-item.active {
601
+ svg.format {
602
+ color: ${(t) => t.theme.colors.primary};
603
+ }
604
+ }
605
+
606
+ .toolbar .toolbar-item:hover:not([disabled]) {
607
+ svg.format {
608
+ color: ${(t) => t.theme.colors.primary};
609
+ }
610
+ }
611
+
612
+ .toolbar .divider {
613
+ width: 1px;
614
+ background-color: ${(t) => t.theme.colors.background};
615
+ margin: ${r.sp0} ${r.sp1};
616
+ }
617
+ `, Ae = x.div`
618
+ background-color: transparent;
619
+ position: relative;
620
+ `, Re = x(Qt)`
621
+ color: ${(t) => t.theme.colors.grey2};
622
+ overflow: hidden;
623
+ position: absolute;
624
+ text-overflow: ellipsis;
625
+ top: ${r.sp3};
626
+ left: 12px;
627
+ user-select: none;
628
+ display: inline-block;
629
+ pointer-events: none;
630
+ `, Se = x.div``, ot = x.div`
631
+ display: flex;
632
+ align-items: center;
633
+ gap: ${r.sp1};
634
+ `, u = x.button``, it = () => /* @__PURE__ */ e.jsx("div", { className: "divider" }), De = x.div`
635
+ position: absolute;
636
+ z-index: 10000;
637
+ top: -10000px;
638
+ left: -10000px;
639
+ margin-top: -6px;
640
+ max-width: 300px;
641
+ width: 100%;
642
+ opacity: 0;
643
+ border: 1px solid ${(t) => t.theme.colors.grey3};
644
+ background-color: ${(t) => t.theme.colors.grey5};
645
+ box-shadow: ${r.sp0} 5px 10px ${qt.overlayLight};
646
+ border-radius: ${r.sp2};
647
+ transition: opacity 0.5s;
648
+
649
+ .link-input {
650
+ display: block;
651
+ box-sizing: border-box;
652
+ padding: ${r.sp3};
653
+ border-radius: ${r.sp3};
654
+ background-color: ${(t) => t.theme.colors.grey5};
655
+ ${U.standardRegular.css};
656
+ color: ${(t) => t.theme.colors.primary};
657
+ border: 0;
658
+ outline: 0;
659
+ position: relative;
660
+ }
661
+
662
+ button.link-edit {
663
+ display: flex;
664
+ align-items: center;
665
+ width: 35px;
666
+ position: absolute;
667
+ right: ${r.sp0};
668
+ top: ${r.sp0};
669
+ bottom: ${r.sp0};
670
+ cursor: pointer;
671
+ background: none;
672
+ border: none;
673
+ padding: 0;
674
+ margin: 0;
675
+
676
+ &:focus {
677
+ outline: none;
678
+ }
679
+ }
680
+ `, Oe = x.div`
681
+ display: flex;
682
+ align-items: center;
683
+ justify-content: space-between;
684
+ `, Me = x.a`
685
+ color: ${(t) => t.theme.colors.link};
686
+ text-decoration: none;
687
+ display: block;
688
+ white-space: nowrap;
689
+ overflow: hidden;
690
+ text-overflow: ellipsis;
691
+ margin-right: 30px;
692
+ ${U.standardRegular.css};
693
+
694
+ &:hover {
695
+ text-decoration: underline;
696
+ }
697
+ `, _e = x.button``;
698
+ export {
699
+ no as default
700
+ };