inconel 0.1.41 → 0.1.42

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.
@@ -1,73 +1,77 @@
1
1
  import { jsxs as c, jsx as n } from "react/jsx-runtime";
2
- import { useId as re, useRef as w, useState as y, useEffect as oe, useCallback as se } from "react";
3
- import ce from "../FieldFeedback/FieldFeedback.js";
2
+ import { useId as ye, useRef as O, useState as p, useEffect as ge, useCallback as _e } from "react";
3
+ import Ce from "../FieldFeedback/FieldFeedback.js";
4
4
  /* empty css */
5
5
  /* empty css */
6
- import { icons as l } from "./icons.js";
7
- import { sanitizeHtml as b } from "./sanitize.js";
8
- const ue = [
6
+ import { icons as a } from "./icons.js";
7
+ import { sanitizeHtml as v } from "./sanitize.js";
8
+ const ke = [
9
9
  { tag: "p", label: "Paragraf" },
10
10
  { tag: "h1", label: "Başlık 1" },
11
11
  { tag: "h2", label: "Başlık 2" },
12
12
  { tag: "h3", label: "Başlık 3" },
13
13
  { tag: "blockquote", label: "Alıntı" }
14
- ], de = [12, 14, 16, 18, 24, 32], me = (r) => new Promise((m, _) => {
15
- const a = new FileReader();
16
- a.onload = () => m(String(a.result)), a.onerror = () => _(a.error), a.readAsDataURL(r);
14
+ ], ve = [12, 14, 16, 18, 24, 32], Ne = /* @__PURE__ */ new Set(["justifyLeft", "justifyCenter", "justifyRight", "justifyFull"]), Se = (m) => new Promise((h, S) => {
15
+ const o = new FileReader();
16
+ o.onload = () => h(String(o.result)), o.onerror = () => S(o.error), o.readAsDataURL(m);
17
17
  });
18
- function N({ label: r, onClick: m, disabled: _, active: a, children: L }) {
18
+ function N({ label: m, onClick: h, disabled: S, active: o, children: j }) {
19
19
  return /* @__PURE__ */ n(
20
20
  "button",
21
21
  {
22
22
  type: "button",
23
- className: `inconel-rte__btn${a ? " inconel-is-active" : ""}`,
24
- "aria-label": r,
25
- title: r,
26
- "aria-pressed": a,
27
- disabled: _,
28
- onMouseDown: (x) => x.preventDefault(),
29
- onClick: m,
30
- children: L
23
+ className: `inconel-rte__btn${o ? " inconel-is-active" : ""}`,
24
+ "aria-label": m,
25
+ title: m,
26
+ "aria-pressed": o,
27
+ disabled: S,
28
+ onMouseDown: (R) => R.preventDefault(),
29
+ onClick: h,
30
+ children: j
31
31
  }
32
32
  );
33
33
  }
34
- function ke({
35
- value: r = "",
36
- onChange: m,
37
- onBlur: _,
38
- label: a,
39
- placeholder: L,
40
- id: x,
41
- disabled: p = !1,
42
- required: D,
43
- fullWidth: $ = !0,
44
- className: K,
45
- minHeight: j = 200,
46
- onImageUpload: E,
47
- onRequestMedia: z,
48
- hint: H,
49
- errorMessage: k
34
+ function Re({
35
+ value: m = "",
36
+ onChange: h,
37
+ onBlur: S,
38
+ label: o,
39
+ placeholder: j,
40
+ id: R,
41
+ disabled: y = !1,
42
+ required: U,
43
+ fullWidth: ne = !0,
44
+ className: le,
45
+ minHeight: A = 200,
46
+ onImageUpload: G,
47
+ onRequestMedia: P,
48
+ hint: $,
49
+ errorMessage: w
50
50
  }) {
51
- const Y = re(), C = x ?? `inconel-rte-${Y.replace(/:/g, "")}`, M = `${C}-hint`, I = `${C}-error`, o = w(null), F = w(null), v = w(null), [f, J] = y(!1), [U, G] = y(""), [u, B] = y(null), [O, P] = y(""), [Z, Q] = y({}), [V, R] = y(!r);
52
- oe(() => {
53
- const e = o.current;
54
- if (!e || r === v.current) return;
55
- const t = b(r);
56
- e.innerHTML !== t && (e.innerHTML = t), v.current = r, R(!e.textContent && !e.querySelector("img"));
57
- }, [r, f]);
58
- const h = se(() => {
59
- const e = o.current;
51
+ const ae = ye(), T = R ?? `inconel-rte-${ae.replace(/:/g, "")}`, q = `${T}-hint`, W = `${T}-error`, u = O(null), M = O(null), L = O(null), [f, re] = p(!1), [K, Y] = p(""), [s, x] = p(null), [J, Z] = p(""), [ie, oe] = p({}), [se, F] = p(!m), [ce, Q] = p(!1), [C, V] = p({ rows: 3, cols: 3 });
52
+ ge(() => {
53
+ const e = u.current;
54
+ if (!e || m === L.current) return;
55
+ const t = v(m);
56
+ e.innerHTML !== t && (e.innerHTML = t), L.current = m, F(!e.textContent && !e.querySelector("img"));
57
+ }, [m, f]);
58
+ const g = _e(() => {
59
+ const e = u.current;
60
60
  if (!e) return;
61
- const t = !!e.textContent || !!e.querySelector("img"), s = t ? b(e.innerHTML) : "";
62
- R(!t), v.current = s, m?.(s);
63
- }, [m]), d = () => {
64
- const e = window.getSelection(), t = o.current;
65
- e && e.rangeCount > 0 && t?.contains(e.getRangeAt(0).commonAncestorContainer) && (F.current = e.getRangeAt(0).cloneRange());
66
- }, T = () => {
67
- o.current?.focus();
61
+ const t = !!e.textContent || !!e.querySelector("img"), l = t ? v(e.innerHTML) : "";
62
+ F(!t), L.current = l, h?.(l);
63
+ }, [h]), b = () => {
64
+ const e = window.getSelection(), t = u.current;
65
+ e && e.rangeCount > 0 && t?.contains(e.getRangeAt(0).commonAncestorContainer) && (M.current = e.getRangeAt(0).cloneRange());
66
+ }, B = () => {
67
+ u.current?.focus();
68
68
  const e = window.getSelection();
69
- e && F.current && (e.removeAllRanges(), e.addRange(F.current));
70
- }, A = () => {
69
+ e && M.current && (e.removeAllRanges(), e.addRange(M.current));
70
+ }, X = () => {
71
+ const e = window.getSelection()?.anchorNode, l = (e instanceof Element ? e : e?.parentElement)?.closest("td, th") ?? null;
72
+ return l && u.current?.contains(l) ? l : null;
73
+ }, D = () => {
74
+ Q(!!X());
71
75
  const e = (t) => {
72
76
  try {
73
77
  return document.queryCommandState(t);
@@ -75,7 +79,7 @@ function ke({
75
79
  return !1;
76
80
  }
77
81
  };
78
- Q({
82
+ oe({
79
83
  bold: e("bold"),
80
84
  italic: e("italic"),
81
85
  underline: e("underline"),
@@ -87,45 +91,67 @@ function ke({
87
91
  insertUnorderedList: e("insertUnorderedList"),
88
92
  insertOrderedList: e("insertOrderedList")
89
93
  });
90
- }, S = (e, t) => {
91
- T(), document.execCommand("styleWithCSS", !1, "true"), document.execCommand(e, !1, t), d(), A(), h();
92
- }, X = (e) => {
93
- T(), document.execCommand("styleWithCSS", !1, "false"), document.execCommand("fontSize", !1, "7"), o.current?.querySelectorAll('font[size="7"]').forEach((t) => {
94
- const s = document.createElement("span");
95
- s.style.fontSize = `${e}px`, s.append(...Array.from(t.childNodes)), t.replaceWith(s);
96
- }), d(), h();
94
+ }, E = (e, t) => {
95
+ B(), document.execCommand("styleWithCSS", !1, Ne.has(e) ? "true" : "false"), document.execCommand(e, !1, t), b(), D(), g();
96
+ }, de = (e) => {
97
+ B(), document.execCommand("styleWithCSS", !1, "false"), document.execCommand("fontSize", !1, "7"), u.current?.querySelectorAll('font[size="7"]').forEach((t) => {
98
+ const l = document.createElement("span");
99
+ l.style.fontSize = `${e}px`, l.append(...Array.from(t.childNodes)), t.replaceWith(l);
100
+ }), b(), g();
101
+ }, ue = (e) => {
102
+ B();
103
+ const t = X(), l = t?.parentElement, i = t?.closest("table");
104
+ if (!t || !l || !i) return;
105
+ const I = t.cellIndex, te = (d) => {
106
+ const k = document.createElement(d.tagName);
107
+ return k.innerHTML = "<br>", k;
108
+ };
109
+ if (e === "addRow") {
110
+ const d = document.createElement("tr");
111
+ Array.from(l.cells).forEach((k) => d.append(te(k.tagName === "TH" ? document.createElement("td") : k))), l.parentElement?.tagName === "THEAD" ? (i.tBodies[0] ?? i.appendChild(document.createElement("tbody"))).prepend(d) : l.after(d);
112
+ } else e === "delRow" ? (l.remove(), i.rows.length || i.remove()) : e === "addCol" ? Array.from(i.rows).forEach((d) => d.cells[I]?.after(te(d.cells[I]))) : e === "delCol" ? (Array.from(i.rows).forEach((d) => d.cells[I]?.remove()), Array.from(i.rows).some((d) => d.cells.length) || i.remove()) : i.remove();
113
+ Q(!1), g();
114
+ }, me = () => {
115
+ const e = Math.min(Math.max(C.rows, 1), 20), t = Math.min(Math.max(C.cols, 1), 10), i = `<tr>${"<td><br></td>".repeat(t)}</tr>`.repeat(e);
116
+ ee(
117
+ `<table border="1" width="100%" cellspacing="0" cellpadding="6"><tbody>${i}</tbody></table><p><br></p>`
118
+ ), x(null);
97
119
  }, ee = (e) => {
98
- T(), document.execCommand("insertHTML", !1, b(e)), d(), h();
99
- }, q = (e) => {
100
- d(), P(""), B(u === e ? null : e);
101
- }, W = () => {
102
- const e = O.trim();
103
- e && (u === "link" ? (S("createLink", e), o.current?.querySelectorAll("a").forEach((t) => {
120
+ B(), document.execCommand("insertHTML", !1, v(e)), b(), g();
121
+ }, H = (e) => {
122
+ b(), Z(""), x(s === e ? null : e);
123
+ }, z = () => {
124
+ if (s === "table") {
125
+ me();
126
+ return;
127
+ }
128
+ const e = J.trim();
129
+ e && (s === "link" ? (E("createLink", e), u.current?.querySelectorAll("a").forEach((t) => {
104
130
  /^https?:/i.test(t.getAttribute("href") ?? "") && (t.setAttribute("target", "_blank"), t.setAttribute("rel", "noopener noreferrer"));
105
- }), h()) : u === "image" && S("insertImage", e), B(null));
106
- }, te = async (e) => {
131
+ }), g()) : s === "image" && E("insertImage", e), x(null));
132
+ }, fe = async (e) => {
107
133
  const t = e.target.files?.[0];
108
134
  if (e.target.value = "", !t || !t.type.startsWith("image/")) return;
109
- const s = E ? await E(t) : await me(t);
110
- S("insertImage", s), B(null);
111
- }, ne = (e) => {
135
+ const l = G ? await G(t) : await Se(t);
136
+ E("insertImage", l), x(null);
137
+ }, be = (e) => {
112
138
  const t = e.clipboardData.getData("text/html");
113
- t && (e.preventDefault(), document.execCommand("insertHTML", !1, b(t)), h());
114
- }, le = () => {
139
+ t && (e.preventDefault(), document.execCommand("insertHTML", !1, v(t)), g());
140
+ }, pe = () => {
115
141
  if (f) {
116
- const e = b(U);
117
- v.current = null, o.current && (o.current.innerHTML = e), v.current = e, R(!e), m?.(e);
142
+ const e = v(K);
143
+ L.current = null, u.current && (u.current.innerHTML = e), L.current = e, F(!e), h?.(e);
118
144
  } else
119
- G(b(o.current?.innerHTML ?? ""));
120
- B(null), J(!f);
121
- }, ie = [H && !k ? M : void 0, k ? I : void 0].filter(Boolean).join(" ") || void 0, g = p || f, i = (e, t, s, ae) => /* @__PURE__ */ n(
145
+ Y(v(u.current?.innerHTML ?? ""));
146
+ x(null), re(!f);
147
+ }, he = [$ && !w ? q : void 0, w ? W : void 0].filter(Boolean).join(" ") || void 0, _ = y || f, r = (e, t, l, i) => /* @__PURE__ */ n(
122
148
  N,
123
149
  {
124
150
  label: t,
125
- active: Z[e],
126
- disabled: g,
127
- onClick: () => S(e, ae),
128
- children: s
151
+ active: ie[e],
152
+ disabled: _,
153
+ onClick: () => E(e, i),
154
+ children: l
129
155
  }
130
156
  );
131
157
  return /* @__PURE__ */ c(
@@ -133,42 +159,42 @@ function ke({
133
159
  {
134
160
  className: [
135
161
  "inconel-field",
136
- $ ? "inconel-field--full-width" : "",
137
- K ?? ""
162
+ ne ? "inconel-field--full-width" : "",
163
+ le ?? ""
138
164
  ].join(" "),
139
165
  children: [
140
- a && /* @__PURE__ */ c("label", { className: "inconel-field__label", htmlFor: C, children: [
141
- a,
142
- D && /* @__PURE__ */ n("span", { "aria-hidden": "true", children: " *" })
166
+ o && /* @__PURE__ */ c("label", { className: "inconel-field__label", htmlFor: T, children: [
167
+ o,
168
+ U && /* @__PURE__ */ n("span", { "aria-hidden": "true", children: " *" })
143
169
  ] }),
144
170
  /* @__PURE__ */ c(
145
171
  "div",
146
172
  {
147
173
  className: [
148
174
  "inconel-rte",
149
- k ? "inconel-is-invalid" : "",
150
- p ? "inconel-is-disabled" : ""
175
+ w ? "inconel-is-invalid" : "",
176
+ y ? "inconel-is-disabled" : ""
151
177
  ].join(" "),
152
178
  children: [
153
179
  /* @__PURE__ */ c("div", { className: "inconel-rte__toolbar", role: "toolbar", "aria-label": "Biçimlendirme", children: [
154
- i("bold", "Kalın", l.bold),
155
- i("italic", "İtalik", l.italic),
156
- i("underline", "Altı çizili", l.underline),
157
- i("strikeThrough", "Üstü çizili", l.strike),
180
+ r("bold", "Kalın", a.bold),
181
+ r("italic", "İtalik", a.italic),
182
+ r("underline", "Altı çizili", a.underline),
183
+ r("strikeThrough", "Üstü çizili", a.strike),
158
184
  /* @__PURE__ */ n("span", { className: "inconel-rte__sep" }),
159
185
  /* @__PURE__ */ c(
160
186
  "select",
161
187
  {
162
188
  className: "inconel-rte__select",
163
189
  "aria-label": "Biçim",
164
- disabled: g,
190
+ disabled: _,
165
191
  value: "",
166
192
  onChange: (e) => {
167
- e.target.value && S("formatBlock", e.target.value);
193
+ e.target.value && E("formatBlock", e.target.value);
168
194
  },
169
195
  children: [
170
196
  /* @__PURE__ */ n("option", { value: "", children: "Biçim" }),
171
- ue.map((e) => /* @__PURE__ */ n("option", { value: e.tag, children: e.label }, e.tag))
197
+ ke.map((e) => /* @__PURE__ */ n("option", { value: e.tag, children: e.label }, e.tag))
172
198
  ]
173
199
  }
174
200
  ),
@@ -177,14 +203,14 @@ function ke({
177
203
  {
178
204
  className: "inconel-rte__select",
179
205
  "aria-label": "Yazı boyutu",
180
- disabled: g,
206
+ disabled: _,
181
207
  value: "",
182
208
  onChange: (e) => {
183
- e.target.value && X(Number(e.target.value));
209
+ e.target.value && de(Number(e.target.value));
184
210
  },
185
211
  children: [
186
212
  /* @__PURE__ */ n("option", { value: "", children: "Boyut" }),
187
- de.map((e) => /* @__PURE__ */ c("option", { value: e, children: [
213
+ ve.map((e) => /* @__PURE__ */ c("option", { value: e, children: [
188
214
  e,
189
215
  "px"
190
216
  ] }, e))
@@ -192,80 +218,138 @@ function ke({
192
218
  }
193
219
  ),
194
220
  /* @__PURE__ */ n("span", { className: "inconel-rte__sep" }),
195
- i("justifyLeft", "Sola hizala", l.alignLeft),
196
- i("justifyCenter", "Ortala", l.alignCenter),
197
- i("justifyRight", "Sağa hizala", l.alignRight),
198
- i("justifyFull", "İki yana yasla", l.alignJustify),
221
+ r("justifyLeft", "Sola hizala", a.alignLeft),
222
+ r("justifyCenter", "Ortala", a.alignCenter),
223
+ r("justifyRight", "Sağa hizala", a.alignRight),
224
+ r("justifyFull", "İki yana yasla", a.alignJustify),
199
225
  /* @__PURE__ */ n("span", { className: "inconel-rte__sep" }),
200
- i("insertUnorderedList", "Madde işaretli liste", l.listUl),
201
- i("insertOrderedList", "Numaralı liste", l.listOl),
202
- i("outdent", "Girintiyi azalt", l.outdent),
203
- i("indent", "Girintiyi artır", l.indent),
204
- i("removeFormat", "Biçimi temizle", l.clearFormat),
226
+ r("insertUnorderedList", "Madde işaretli liste", a.listUl),
227
+ r("insertOrderedList", "Numaralı liste", a.listOl),
228
+ r("outdent", "Girintiyi azalt", a.outdent),
229
+ r("indent", "Girintiyi artır", a.indent),
230
+ r("removeFormat", "Biçimi temizle", a.clearFormat),
205
231
  /* @__PURE__ */ n("span", { className: "inconel-rte__sep" }),
206
232
  /* @__PURE__ */ n(
207
233
  N,
208
234
  {
209
235
  label: "Bağlantı ekle",
210
- disabled: g,
211
- active: u === "link",
212
- onClick: () => q("link"),
213
- children: l.link
236
+ disabled: _,
237
+ active: s === "link",
238
+ onClick: () => H("link"),
239
+ children: a.link
240
+ }
241
+ ),
242
+ /* @__PURE__ */ n(
243
+ N,
244
+ {
245
+ label: "Tablo ekle",
246
+ disabled: _,
247
+ active: s === "table",
248
+ onClick: () => H("table"),
249
+ children: a.table
214
250
  }
215
251
  ),
216
252
  /* @__PURE__ */ n(
217
253
  N,
218
254
  {
219
255
  label: "Görsel ekle",
220
- disabled: g,
221
- active: u === "image",
222
- onClick: () => q("image"),
223
- children: l.image
256
+ disabled: _,
257
+ active: s === "image",
258
+ onClick: () => H("image"),
259
+ children: a.image
224
260
  }
225
261
  ),
226
- z && /* @__PURE__ */ n(
262
+ P && /* @__PURE__ */ n(
227
263
  N,
228
264
  {
229
265
  label: "Medya galerisi",
230
- disabled: g,
266
+ disabled: _,
231
267
  onClick: () => {
232
- d(), z(ee);
268
+ b(), P(ee);
233
269
  },
234
- children: l.gallery
270
+ children: a.gallery
235
271
  }
236
272
  ),
237
273
  /* @__PURE__ */ n("span", { className: "inconel-rte__sep" }),
238
- i("undo", "Geri al", l.undo),
239
- i("redo", "Yinele", l.redo),
274
+ r("undo", "Geri al", a.undo),
275
+ r("redo", "Yinele", a.redo),
240
276
  /* @__PURE__ */ n(
241
277
  N,
242
278
  {
243
279
  label: "HTML kaynağı",
244
- disabled: p,
280
+ disabled: y,
245
281
  active: f,
246
- onClick: le,
247
- children: l.code
282
+ onClick: pe,
283
+ children: a.code
248
284
  }
249
285
  )
250
286
  ] }),
251
- u && !f && /* @__PURE__ */ c("div", { className: "inconel-rte__panel", children: [
287
+ s === "table" && !f && /* @__PURE__ */ c("div", { className: "inconel-rte__panel", children: [
288
+ /* @__PURE__ */ c("label", { className: "inconel-rte__field", children: [
289
+ "Satır",
290
+ /* @__PURE__ */ n(
291
+ "input",
292
+ {
293
+ type: "number",
294
+ min: 1,
295
+ max: 20,
296
+ className: "inconel-rte__input inconel-rte__input--num",
297
+ value: C.rows,
298
+ onChange: (e) => V({ ...C, rows: Number(e.target.value) })
299
+ }
300
+ )
301
+ ] }),
302
+ /* @__PURE__ */ c("label", { className: "inconel-rte__field", children: [
303
+ "Sütun",
304
+ /* @__PURE__ */ n(
305
+ "input",
306
+ {
307
+ type: "number",
308
+ min: 1,
309
+ max: 10,
310
+ className: "inconel-rte__input inconel-rte__input--num",
311
+ value: C.cols,
312
+ onChange: (e) => V({ ...C, cols: Number(e.target.value) })
313
+ }
314
+ )
315
+ ] }),
316
+ /* @__PURE__ */ n("button", { type: "button", className: "inconel-rte__action", onClick: z, children: "Tablo ekle" })
317
+ ] }),
318
+ ce && !f && !y && /* @__PURE__ */ n("div", { className: "inconel-rte__panel", role: "toolbar", "aria-label": "Tablo", children: [
319
+ ["addRow", "Satır ekle"],
320
+ ["delRow", "Satırı sil"],
321
+ ["addCol", "Sütun ekle"],
322
+ ["delCol", "Sütunu sil"],
323
+ ["delTable", "Tabloyu sil"]
324
+ ].map(([e, t]) => /* @__PURE__ */ n(
325
+ "button",
326
+ {
327
+ type: "button",
328
+ className: "inconel-rte__action",
329
+ onMouseDown: (l) => l.preventDefault(),
330
+ onClick: () => ue(e),
331
+ children: t
332
+ },
333
+ e
334
+ )) }),
335
+ s && s !== "table" && !f && /* @__PURE__ */ c("div", { className: "inconel-rte__panel", children: [
252
336
  /* @__PURE__ */ n(
253
337
  "input",
254
338
  {
255
339
  type: "url",
256
340
  className: "inconel-rte__input",
257
- "aria-label": u === "link" ? "Bağlantı adresi" : "Görsel adresi",
258
- placeholder: u === "link" ? "https://…" : "Görsel URL (https://…)",
259
- value: O,
341
+ "aria-label": s === "link" ? "Bağlantı adresi" : "Görsel adresi",
342
+ placeholder: s === "link" ? "https://…" : "Görsel URL (https://…)",
343
+ value: J,
260
344
  autoFocus: !0,
261
- onChange: (e) => P(e.target.value),
345
+ onChange: (e) => Z(e.target.value),
262
346
  onKeyDown: (e) => {
263
- e.key === "Enter" && (e.preventDefault(), W());
347
+ e.key === "Enter" && (e.preventDefault(), z());
264
348
  }
265
349
  }
266
350
  ),
267
- /* @__PURE__ */ n("button", { type: "button", className: "inconel-rte__action", onClick: W, children: "Ekle" }),
268
- u === "image" && /* @__PURE__ */ c("label", { className: "inconel-rte__action", children: [
351
+ /* @__PURE__ */ n("button", { type: "button", className: "inconel-rte__action", onClick: z, children: "Ekle" }),
352
+ s === "image" && /* @__PURE__ */ c("label", { className: "inconel-rte__action", children: [
269
353
  "Dosya seç",
270
354
  /* @__PURE__ */ n(
271
355
  "input",
@@ -274,7 +358,7 @@ function ke({
274
358
  accept: "image/*",
275
359
  hidden: !0,
276
360
  "aria-label": "Görsel dosyası",
277
- onChange: te
361
+ onChange: fe
278
362
  }
279
363
  )
280
364
  ] })
@@ -282,43 +366,43 @@ function ke({
282
366
  f ? /* @__PURE__ */ n(
283
367
  "textarea",
284
368
  {
285
- id: C,
369
+ id: T,
286
370
  className: "inconel-rte__source",
287
- style: { minHeight: j },
288
- "aria-label": a ?? "HTML kaynağı",
289
- value: U,
290
- disabled: p,
371
+ style: { minHeight: A },
372
+ "aria-label": o ?? "HTML kaynağı",
373
+ value: K,
374
+ disabled: y,
291
375
  spellCheck: !1,
292
- onChange: (e) => G(e.target.value)
376
+ onChange: (e) => Y(e.target.value)
293
377
  }
294
- ) : /* @__PURE__ */ c("div", { className: "inconel-rte__surface", style: { minHeight: j }, children: [
295
- V && L && /* @__PURE__ */ n("span", { className: "inconel-rte__placeholder", "aria-hidden": "true", children: L }),
378
+ ) : /* @__PURE__ */ c("div", { className: "inconel-rte__surface", style: { minHeight: A }, children: [
379
+ se && j && /* @__PURE__ */ n("span", { className: "inconel-rte__placeholder", "aria-hidden": "true", children: j }),
296
380
  /* @__PURE__ */ n(
297
381
  "div",
298
382
  {
299
- ref: o,
300
- id: C,
383
+ ref: u,
384
+ id: T,
301
385
  className: "inconel-rte__content",
302
386
  role: "textbox",
303
387
  "aria-multiline": "true",
304
- "aria-label": a,
305
- "aria-required": D,
306
- "aria-invalid": !!k,
307
- "aria-describedby": ie,
308
- "aria-disabled": p,
309
- contentEditable: !p,
388
+ "aria-label": o,
389
+ "aria-required": U,
390
+ "aria-invalid": !!w,
391
+ "aria-describedby": he,
392
+ "aria-disabled": y,
393
+ contentEditable: !y,
310
394
  suppressContentEditableWarning: !0,
311
- style: { minHeight: j },
312
- onInput: h,
313
- onPaste: ne,
395
+ style: { minHeight: A },
396
+ onInput: g,
397
+ onPaste: be,
314
398
  onKeyUp: () => {
315
- d(), A();
399
+ b(), D();
316
400
  },
317
401
  onMouseUp: () => {
318
- d(), A();
402
+ b(), D();
319
403
  },
320
404
  onBlur: () => {
321
- d(), _?.();
405
+ b(), S?.();
322
406
  }
323
407
  }
324
408
  )
@@ -326,12 +410,12 @@ function ke({
326
410
  ]
327
411
  }
328
412
  ),
329
- /* @__PURE__ */ n(ce, { hint: H, errorMessage: k, hintId: M, errorId: I })
413
+ /* @__PURE__ */ n(Ce, { hint: $, errorMessage: w, hintId: q, errorId: W })
330
414
  ]
331
415
  }
332
416
  );
333
417
  }
334
418
  export {
335
- ke as default
419
+ Re as default
336
420
  };
337
421
  //# sourceMappingURL=RichTextEditor.js.map