@progress/kendo-react-conversational-ui 14.5.0-develop.8 → 15.0.0-develop.1

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 (40) hide show
  1. package/README.md +4 -4
  2. package/ai-prompt/AIPrompt.d.ts +6 -0
  3. package/ai-prompt/AIPrompt.js +1 -1
  4. package/ai-prompt/AIPrompt.mjs +40 -38
  5. package/ai-prompt/AIPromptContent.js +1 -1
  6. package/ai-prompt/AIPromptContent.mjs +5 -5
  7. package/ai-prompt/views/AIPromptOutputView.js +1 -1
  8. package/ai-prompt/views/AIPromptOutputView.mjs +6 -6
  9. package/chat/ChatPropsAndState.d.ts +17 -0
  10. package/chat/components/Chat.js +1 -1
  11. package/chat/components/Chat.mjs +222 -220
  12. package/chat/components/ChatMessage.js +1 -1
  13. package/chat/components/ChatMessage.mjs +133 -117
  14. package/chat/components/Header.js +1 -1
  15. package/chat/components/Header.mjs +1 -1
  16. package/chat/components/NewMessage.js +1 -1
  17. package/chat/components/NewMessage.mjs +49 -48
  18. package/chat/components/Notification.js +1 -1
  19. package/chat/components/Notification.mjs +1 -1
  20. package/chat/components/elements/FileBox.js +1 -1
  21. package/chat/components/elements/FileBox.mjs +10 -9
  22. package/chat/components/elements/PinnedMessage.js +1 -1
  23. package/chat/components/elements/PinnedMessage.mjs +14 -13
  24. package/chat/hooks/useEndlessScroll.js +1 -1
  25. package/chat/hooks/useEndlessScroll.mjs +103 -101
  26. package/dist/cdn/js/kendo-react-conversational-ui.js +1 -1
  27. package/inline-ai-prompt/InlineAIPrompt.js +1 -1
  28. package/inline-ai-prompt/InlineAIPrompt.mjs +10 -10
  29. package/inline-ai-prompt/InlineAIPromptInput.js +1 -1
  30. package/inline-ai-prompt/InlineAIPromptInput.mjs +1 -1
  31. package/messages/index.d.ts +5 -0
  32. package/messages/index.js +1 -1
  33. package/messages/index.mjs +12 -10
  34. package/package-metadata.js +1 -1
  35. package/package-metadata.mjs +2 -2
  36. package/package.json +17 -12
  37. package/prompt-box/FileBox.js +1 -1
  38. package/prompt-box/FileBox.mjs +21 -20
  39. package/prompt-box/PromptBox.js +1 -1
  40. package/prompt-box/PromptBox.mjs +148 -150
@@ -7,16 +7,16 @@
7
7
  */
8
8
  import * as t from "react";
9
9
  import o from "prop-types";
10
- import { validatePackage as Qe, getLicenseMessage as Ye, dispatchEvent as L, classNames as oe, WatermarkOverlay as et } from "@progress/kendo-react-common";
11
- import { stopSmIcon as tt, arrowUpOutlineIcon as nt, paperclipOutlineAltRightIcon as ot } from "@progress/kendo-svg-icons";
12
- import { PromptBoxActionButton as st } from "./PromptBoxActionButton.mjs";
13
- import { PromptBoxSpeechToTextButton as lt } from "./PromptBoxSpeechToTextButton.mjs";
14
- import { PromptBoxUploadButton as rt } from "./PromptBoxUploadButton.mjs";
15
- import { FileBox as it } from "./FileBox.mjs";
10
+ import { validatePackage as Je, getLicenseMessage as Qe, dispatchEvent as O, classNames as ne, WatermarkOverlay as Ye } from "@progress/kendo-react-common";
11
+ import { stopIcon as et, arrowUpIcon as tt, paperclipIcon as nt } from "@progress/kendo-svg-icons";
12
+ import { PromptBoxActionButton as ot } from "./PromptBoxActionButton.mjs";
13
+ import { PromptBoxSpeechToTextButton as st } from "./PromptBoxSpeechToTextButton.mjs";
14
+ import { PromptBoxUploadButton as lt } from "./PromptBoxUploadButton.mjs";
15
+ import { FileBox as rt } from "./FileBox.mjs";
16
16
  import { packageMetadata as ke } from "../package-metadata.mjs";
17
- import { useLocalization as at } from "@progress/kendo-react-intl";
18
- import { promptBoxInput as Ee, messages as k, promptBoxStopGenerating as K, promptBoxSendButton as q, promptBoxAttachFile as G, promptBoxAriaLabel as xe } from "../messages/index.mjs";
19
- const p = "k-prompt-box", ct = 20, ut = 50, b = {
17
+ import { useLocalization as it } from "@progress/kendo-react-intl";
18
+ import { promptBoxInput as Ee, messages as A, promptBoxStopGenerating as K, promptBoxSendButton as q, promptBoxAttachFile as G } from "../messages/index.mjs";
19
+ const p = "k-prompt-box", at = 20, ct = 50, b = {
20
20
  mode: "auto",
21
21
  rows: 1,
22
22
  defaultValue: "",
@@ -26,64 +26,64 @@ const p = "k-prompt-box", ct = 20, ut = 50, b = {
26
26
  uploadButtonConfig: !1,
27
27
  speechToTextButtonConfig: !0,
28
28
  actionButtonConfig: !0
29
- }, Te = t.forwardRef((Ae, Re) => {
30
- const we = !Qe(ke, { component: "PromptBox" }), Se = Ye(ke), y = at(), Fe = { ...b, ...Ae }, {
29
+ }, Te = t.forwardRef((xe, Ae) => {
30
+ const Re = !Je(ke, { component: "PromptBox" }), we = Qe(ke), v = it(), Fe = { ...b, ...xe }, {
31
31
  mode: s = b.mode,
32
- fillMode: se,
33
- rows: F = b.rows,
32
+ fillMode: oe,
33
+ rows: S = b.rows,
34
34
  maxTextAreaHeight: c,
35
- value: le,
36
- defaultValue: Pe = b.defaultValue,
35
+ value: se,
36
+ defaultValue: Se = b.defaultValue,
37
37
  disabled: f = b.disabled,
38
- readOnly: Ne = b.readOnly,
39
- placeholder: He,
40
- title: Oe,
41
- maxLength: Le,
42
- inputAttributes: Me,
43
- topAffix: re,
44
- startAffix: C,
45
- endAffix: v,
46
- header: Ie,
38
+ readOnly: Pe = b.readOnly,
39
+ placeholder: Ne,
40
+ title: He,
41
+ maxLength: Oe,
42
+ inputAttributes: Le,
43
+ topAffix: le,
44
+ startAffix: B,
45
+ endAffix: y,
46
+ header: Me,
47
47
  onChange: R,
48
48
  onFocus: X,
49
49
  onBlur: Z,
50
50
  onPromptAction: J,
51
- attachments: ie,
52
- loading: B = b.loading,
51
+ attachments: re,
52
+ loading: C = b.loading,
53
53
  uploadButtonConfig: d = b.uploadButtonConfig,
54
- speechToTextButtonConfig: M = b.speechToTextButtonConfig,
55
- actionButtonConfig: I = b.actionButtonConfig,
56
- className: $e,
57
- style: ze,
58
- ...je
59
- } = Fe, l = t.useRef(null), [De, $] = t.useState(Pe), [_e, Q] = t.useState([]), [a, ae] = t.useState(!1), ce = t.useRef(null), z = t.useRef(null), P = t.useRef(0), ue = t.useRef(0), N = t.useRef(!1), fe = t.useRef(0), j = t.useRef(0), E = t.useCallback(
54
+ speechToTextButtonConfig: L = b.speechToTextButtonConfig,
55
+ actionButtonConfig: M = b.actionButtonConfig,
56
+ className: Ie,
57
+ style: $e,
58
+ ...ze
59
+ } = Fe, l = t.useRef(null), [je, I] = t.useState(Se), [De, Q] = t.useState([]), [a, ie] = t.useState(!1), ae = t.useRef(null), $ = t.useRef(null), P = t.useRef(0), ce = t.useRef(0), N = t.useRef(!1), ue = t.useRef(0), z = t.useRef(0), k = t.useCallback(
60
60
  (e, n) => e ? typeof e == "function" ? e(n) : e : null,
61
61
  []
62
- ), x = le !== void 0, u = x ? le : De, T = ie !== void 0, A = T ? ie : _e, H = t.useMemo(
63
- () => !!(u != null && u.trim() || A.length > 0),
64
- [u, A.length]
62
+ ), E = se !== void 0, u = E ? se : je, T = re !== void 0, x = T ? re : De, j = t.useMemo(
63
+ () => !!(u != null && u.trim() || x.length > 0),
64
+ [u, x.length]
65
65
  ), w = t.useCallback(() => {
66
66
  if (!l.current || s === "single")
67
67
  return;
68
- const e = l.current, n = globalThis.getComputedStyle(e), r = Number.parseFloat(n.lineHeight) || ct, i = Number.parseFloat(n.paddingTop) || 0, h = Number.parseFloat(n.paddingBottom) || 0;
69
- P.current = e.offsetHeight || r + i + h, ue.current = r * F + i + h, s === "auto" && !a && (j.current = e.offsetWidth);
70
- }, [s, F, a]), We = t.useCallback(() => s === "auto" ? 1 : F, [s, F]), me = t.useCallback(
68
+ const e = l.current, n = globalThis.getComputedStyle(e), r = Number.parseFloat(n.lineHeight) || at, i = Number.parseFloat(n.paddingTop) || 0, h = Number.parseFloat(n.paddingBottom) || 0;
69
+ P.current = e.offsetHeight || r + i + h, ce.current = r * S + i + h, s === "auto" && !a && (z.current = e.offsetWidth);
70
+ }, [s, S, a]), _e = t.useCallback(() => s === "auto" ? 1 : S, [s, S]), fe = t.useCallback(
71
71
  (e) => {
72
72
  if (c) {
73
73
  const n = Number.parseInt(c, 10);
74
74
  if (e > n)
75
75
  return n;
76
76
  }
77
- return Math.max(ue.current, e);
77
+ return Math.max(ce.current, e);
78
78
  },
79
79
  [c]
80
80
  ), D = t.useCallback(
81
81
  (e) => {
82
82
  e.style.overflow = "hidden", e.style.height = `${P.current}px`;
83
- const n = e.scrollHeight, r = me(n);
83
+ const n = e.scrollHeight, r = fe(n);
84
84
  e.style.height = `${r}px`, c && n > Number.parseInt(c, 10) && (e.style.overflow = "");
85
85
  },
86
- [me, c]
86
+ [fe, c]
87
87
  ), _ = t.useCallback(
88
88
  (e) => {
89
89
  e.style.overflow = "hidden", e.style.height = `${P.current}px`;
@@ -91,29 +91,29 @@ const p = "k-prompt-box", ct = 20, ut = 50, b = {
91
91
  e.style.height = `${r}px`, c && n > Number.parseInt(c, 10) && (e.style.overflow = "");
92
92
  },
93
93
  [c]
94
- ), pe = t.useCallback((e) => {
95
- if (j.current <= 0)
94
+ ), me = t.useCallback((e) => {
95
+ if (z.current <= 0)
96
96
  return !1;
97
97
  const n = e.style.height, r = e.style.width;
98
- e.style.overflow = "hidden", e.style.width = `${j.current}px`, e.style.height = `${P.current}px`;
99
- const i = e.scrollWidth <= j.current && e.scrollHeight <= P.current;
98
+ e.style.overflow = "hidden", e.style.width = `${z.current}px`, e.style.height = `${P.current}px`;
99
+ const i = e.scrollWidth <= z.current && e.scrollHeight <= P.current;
100
100
  return e.style.overflow = "", r ? e.style.width = r : e.style.width = "", n ? e.style.height = n : e.style.height = "", i;
101
101
  }, []), W = t.useCallback(
102
102
  (e, n) => {
103
103
  if (N.current)
104
104
  return;
105
105
  if ((e.scrollWidth > e.clientWidth || e.scrollHeight > e.clientHeight) && !a) {
106
- N.current = !0, ae(!0);
106
+ N.current = !0, ie(!0);
107
107
  return;
108
108
  }
109
109
  if (a) {
110
110
  _(e);
111
- const i = fe.current;
112
- n < i && pe(e) && (e.style.height = "", N.current = !0, ae(!1));
111
+ const i = ue.current;
112
+ n < i && me(e) && (e.style.height = "", N.current = !0, ie(!1));
113
113
  }
114
114
  },
115
- [a, _, pe]
116
- ), S = t.useCallback(() => {
115
+ [a, _, me]
116
+ ), F = t.useCallback(() => {
117
117
  var r;
118
118
  if (s === "single" || !l.current)
119
119
  return;
@@ -123,14 +123,14 @@ const p = "k-prompt-box", ct = 20, ut = 50, b = {
123
123
  t.useEffect(() => {
124
124
  s !== "single" && l.current && w();
125
125
  }, [s, w]), t.useEffect(() => {
126
- s !== "single" && l.current && (w(), S());
127
- }, [F, s, w, S]), t.useEffect(() => {
126
+ s !== "single" && l.current && (w(), F());
127
+ }, [S, s, w, F]), t.useEffect(() => {
128
128
  if (s !== "single" && l.current) {
129
129
  const e = (u == null ? void 0 : u.length) || 0;
130
130
  requestAnimationFrame(() => {
131
131
  if (l.current) {
132
132
  const n = l.current;
133
- s === "multi" ? D(n) : s === "auto" && W(n, e), fe.current = e;
133
+ s === "multi" ? D(n) : s === "auto" && W(n, e), ue.current = e;
134
134
  }
135
135
  });
136
136
  }
@@ -153,13 +153,13 @@ const p = "k-prompt-box", ct = 20, ut = 50, b = {
153
153
  let n;
154
154
  const r = () => {
155
155
  clearTimeout(n), n = setTimeout(() => {
156
- l.current && (s === "auto" && !a && w(), S());
157
- }, ut);
156
+ l.current && (s === "auto" && !a && w(), F());
157
+ }, ct);
158
158
  }, i = new ResizeObserver(r);
159
159
  return i.observe(e), () => {
160
160
  i.disconnect(), clearTimeout(n);
161
161
  };
162
- }, [s, a, w, S]);
162
+ }, [s, a, w, F]);
163
163
  const m = t.useCallback(() => ({
164
164
  focus: () => {
165
165
  var e;
@@ -174,11 +174,11 @@ const p = "k-prompt-box", ct = 20, ut = 50, b = {
174
174
  return u;
175
175
  }
176
176
  }), [u]);
177
- t.useImperativeHandle(Re, m);
178
- const Ue = t.useCallback(
177
+ t.useImperativeHandle(Ae, m);
178
+ const We = t.useCallback(
179
179
  (e) => {
180
180
  const n = e.target.value;
181
- !x && !f && $(n), R && !f && L(
181
+ !E && !f && I(n), R && !f && O(
182
182
  R,
183
183
  e,
184
184
  {
@@ -186,35 +186,35 @@ const p = "k-prompt-box", ct = 20, ut = 50, b = {
186
186
  value: n
187
187
  },
188
188
  { value: n }
189
- ), s !== "single" && S();
189
+ ), s !== "single" && F();
190
190
  },
191
- [$, R, f, x, m, s, S]
192
- ), Ve = t.useCallback(
191
+ [I, R, f, E, m, s, F]
192
+ ), Ue = t.useCallback(
193
193
  (e) => {
194
- X && !f && L(X, e, m(), void 0);
194
+ X && !f && O(X, e, m(), void 0);
195
195
  },
196
196
  [X, f, m]
197
- ), Ke = t.useCallback(
197
+ ), Ve = t.useCallback(
198
198
  (e) => {
199
- Z && !f && L(Z, e, m(), void 0);
199
+ Z && !f && O(Z, e, m(), void 0);
200
200
  },
201
201
  [Z, f, m]
202
- ), de = t.useCallback((e) => {
202
+ ), pe = t.useCallback((e) => {
203
203
  e.preventDefault();
204
204
  }, []), U = t.useCallback(
205
205
  (e) => {
206
- J && L(
206
+ J && O(
207
207
  J,
208
208
  e,
209
209
  m(),
210
210
  {
211
211
  value: u,
212
- attachments: A
212
+ attachments: x
213
213
  }
214
- ), x || $(""), T || Q([]);
214
+ ), E || I(""), T || Q([]);
215
215
  },
216
- [J, m, u, A, x, T]
217
- ), qe = t.useCallback(
216
+ [J, m, u, x, E, T]
217
+ ), Ke = t.useCallback(
218
218
  (e) => {
219
219
  if (!(e.key === "Enter" && e.shiftKey)) {
220
220
  if (e.key === "ArrowUp" || e.key === "ArrowDown") {
@@ -222,60 +222,60 @@ const p = "k-prompt-box", ct = 20, ut = 50, b = {
222
222
  return;
223
223
  }
224
224
  if (e.key === "Enter") {
225
- if (e.preventDefault(), B)
225
+ if (e.preventDefault(), C)
226
226
  return;
227
- H && U(e);
227
+ j && U(e);
228
228
  }
229
229
  }
230
230
  },
231
- [U, B, H]
232
- ), ge = {
231
+ [U, C, j]
232
+ ), de = {
233
233
  disabled: f,
234
- readOnly: Ne,
235
- placeholder: He,
236
- title: Oe,
237
- maxLength: Le,
238
- "aria-label": y.toLanguageString(Ee, k[Ee]),
234
+ readOnly: Pe,
235
+ placeholder: Ne,
236
+ title: He,
237
+ maxLength: Oe,
238
+ "aria-label": v.toLanguageString(Ee, A[Ee]),
239
239
  value: u,
240
240
  // let them rewrite kb navigation if needed
241
- onKeyDown: qe,
242
- ...Me,
243
- onChange: Ue,
244
- onFocus: Ve,
245
- onBlur: Ke,
241
+ onKeyDown: Ke,
242
+ ...Le,
243
+ onChange: We,
244
+ onFocus: Ue,
245
+ onBlur: Ve,
246
246
  ref: l
247
- }, he = t.useCallback(
247
+ }, ge = t.useCallback(
248
248
  (e) => {
249
249
  var i, h;
250
250
  const { isFinal: n, alternatives: r } = e;
251
251
  if (r.length > 0) {
252
- const te = r[0];
252
+ const ee = r[0];
253
253
  if (n) {
254
- const V = ((i = l.current) == null ? void 0 : i.value) || "", O = (V ? `${V} ` : "") + te.transcript;
255
- if (x || $(O), R && !f) {
254
+ const V = ((i = l.current) == null ? void 0 : i.value) || "", H = (V ? `${V} ` : "") + ee.transcript;
255
+ if (E || I(H), R && !f) {
256
256
  const Ce = {
257
257
  target: l.current,
258
258
  currentTarget: l.current
259
259
  };
260
- L(
260
+ O(
261
261
  R,
262
262
  Ce,
263
263
  {
264
264
  ...m(),
265
- value: O
265
+ value: H
266
266
  },
267
- { value: O }
267
+ { value: H }
268
268
  );
269
269
  }
270
270
  }
271
271
  }
272
272
  (h = l.current) == null || h.focus();
273
273
  },
274
- [x, R, f, m]
275
- ), be = t.useCallback(() => {
274
+ [E, R, f, m]
275
+ ), he = t.useCallback(() => {
276
276
  var e, n;
277
- (n = (e = ce.current) == null ? void 0 : e.actionElement) == null || n.click();
278
- }, []), ye = t.useCallback(
277
+ (n = (e = ae.current) == null ? void 0 : e.actionElement) == null || n.click();
278
+ }, []), be = t.useCallback(
279
279
  (e) => {
280
280
  var i;
281
281
  const n = Array.from(e.affectedFiles), r = typeof d == "object" && d.onSelectAttachments;
@@ -288,107 +288,105 @@ const p = "k-prompt-box", ct = 20, ut = 50, b = {
288
288
  ), g = t.useMemo(() => ({
289
289
  uploadButtonProps: {
290
290
  fillMode: "flat",
291
- svgIcon: ot,
291
+ svgIcon: nt,
292
292
  size: "small",
293
293
  rounded: "full",
294
- onClick: be,
295
- onFilesAdd: ye,
296
- files: A,
297
- uploadRef: ce,
298
- "aria-label": y.toLanguageString(G, k[G]),
299
- title: y.toLanguageString(G, k[G]),
294
+ onClick: he,
295
+ onFilesAdd: be,
296
+ files: x,
297
+ uploadRef: ae,
298
+ "aria-label": v.toLanguageString(G, A[G]),
299
+ title: v.toLanguageString(G, A[G]),
300
300
  // Hidden prop to register callback overrides
301
301
  _registerRemoveCallback: (e) => {
302
- z.current = e;
302
+ $.current = e;
303
303
  }
304
304
  },
305
305
  speechToTextButtonProps: {
306
306
  fillMode: "flat",
307
307
  size: "small",
308
308
  rounded: "full",
309
- onResult: he
309
+ onResult: ge
310
310
  },
311
311
  actionButtonProps: {
312
312
  rounded: "full",
313
313
  size: "small",
314
- svgIcon: B ? tt : nt,
315
- className: B ? "k-generating" : "",
314
+ svgIcon: C ? et : tt,
315
+ className: C ? "k-generating" : "",
316
316
  onClick: U,
317
- onMouseDown: de,
318
- disabled: !B && !H,
319
- "aria-disabled": !B && !H,
320
- "aria-label": B ? y.toLanguageString(K, k[K]) : y.toLanguageString(q, k[q]),
321
- title: B ? y.toLanguageString(K, k[K]) : y.toLanguageString(q, k[q]),
317
+ onMouseDown: pe,
318
+ disabled: !C && !j,
319
+ "aria-label": C ? v.toLanguageString(K, A[K]) : v.toLanguageString(q, A[q]),
320
+ title: C ? v.toLanguageString(K, A[K]) : v.toLanguageString(q, A[q]),
322
321
  "aria-live": "polite"
323
322
  }
324
323
  }), [
325
- he,
326
- ye,
327
- A,
328
- U,
329
- de,
330
- B,
324
+ ge,
331
325
  be,
332
- y,
333
- H
334
- ]), Ge = t.useCallback(
326
+ x,
327
+ U,
328
+ pe,
329
+ C,
330
+ he,
331
+ v,
332
+ j
333
+ ]), qe = t.useCallback(
335
334
  (e) => {
336
335
  T || Q((r) => r.filter((i) => i.name !== e));
337
336
  const n = typeof d == "object" && d.onRemoveAttachment;
338
- n && (z.current = n), z.current && z.current(e);
337
+ n && ($.current = n), $.current && $.current(e);
339
338
  },
340
339
  [d, T]
341
340
  ), Y = () => {
342
- const e = M !== !1, n = I !== !1, r = d !== !1, i = typeof M == "object" ? M : void 0, h = typeof d == "object" ? d : {}, {
343
- restrictions: te,
341
+ const e = L !== !1, n = M !== !1, r = d !== !1, i = typeof L == "object" ? L : void 0, h = typeof d == "object" ? d : {}, {
342
+ restrictions: ee,
344
343
  multiple: V = !0,
345
- accept: O,
344
+ accept: H,
346
345
  onSelectAttachments: Ce,
347
- onRemoveAttachment: ft,
348
- ...Ze
349
- } = h, ne = { restrictions: te, multiple: V, accept: O }, Je = typeof I == "object" ? I : void 0;
346
+ onRemoveAttachment: ut,
347
+ ...Xe
348
+ } = h, te = { restrictions: ee, multiple: V, accept: H }, Ze = typeof M == "object" ? M : void 0;
350
349
  return /* @__PURE__ */ t.createElement(t.Fragment, null, r && /* @__PURE__ */ t.createElement(
351
- rt,
350
+ lt,
352
351
  {
353
352
  ...g.uploadButtonProps,
354
- restrictions: ne.restrictions,
355
- multiple: ne.multiple,
356
- accept: ne.accept,
357
- ...Ze
353
+ restrictions: te.restrictions,
354
+ multiple: te.multiple,
355
+ accept: te.accept,
356
+ ...Xe
358
357
  }
359
358
  ), e && /* @__PURE__ */ t.createElement(
360
- lt,
359
+ st,
361
360
  {
362
361
  ...g.speechToTextButtonProps,
363
362
  ...i
364
363
  }
365
- ), n && /* @__PURE__ */ t.createElement(st, { ...g.actionButtonProps, ...Je }));
366
- }, ee = s === "multi" || s === "auto" && a, ve = d !== !1 || M !== !1 || I !== !1, Be = v || ve, Xe = C || v || ve;
364
+ ), n && /* @__PURE__ */ t.createElement(ot, { ...g.actionButtonProps, ...Ze }));
365
+ }, ye = s === "multi" || s === "auto" && a, ve = d !== !1 || L !== !1 || M !== !1, Be = y || ve, Ge = B || y || ve;
367
366
  return /* @__PURE__ */ t.createElement(
368
367
  "div",
369
368
  {
370
- "aria-label": y.toLanguageString(xe, k[xe]),
371
- ...je,
372
- className: oe($e, "k-input", p, {
373
- [`k-input-${se}`]: se,
369
+ ...ze,
370
+ className: ne(Ie, "k-input", p, {
371
+ [`k-input-${oe}`]: oe,
374
372
  "k-disabled": f,
375
373
  "k-prompt-box-singleline": s === "single",
376
- "k-prompt-box-multiline": ee
374
+ "k-prompt-box-multiline": ye
377
375
  }),
378
- style: ze
376
+ style: $e
379
377
  },
380
- /* @__PURE__ */ t.createElement(it, { files: A, onRemoveFile: Ge, header: Ie }),
381
- s === "single" ? /* @__PURE__ */ t.createElement("div", { className: `${p}-content` }, C && /* @__PURE__ */ t.createElement("div", { className: `${p}-affix` }, E(C, g)), /* @__PURE__ */ t.createElement("input", { ...ge, className: oe("k-input-inner", `${p}-input`) }), Be ? /* @__PURE__ */ t.createElement("div", { className: `${p}-affix` }, v && E(v, g), Y()) : null) : /* @__PURE__ */ t.createElement("div", { className: `${p}-content` }, s === "multi" && re && /* @__PURE__ */ t.createElement("div", { className: `${p}-affix` }, E(re, g)), s === "auto" && !a && C && /* @__PURE__ */ t.createElement("div", { className: `${p}-affix` }, E(C, g)), /* @__PURE__ */ t.createElement(
378
+ /* @__PURE__ */ t.createElement(rt, { files: x, onRemoveFile: qe, header: Me }),
379
+ s === "single" ? /* @__PURE__ */ t.createElement("div", { className: `${p}-content` }, B && /* @__PURE__ */ t.createElement("div", { className: `${p}-affix` }, k(B, g)), /* @__PURE__ */ t.createElement("input", { ...de, className: ne("k-input-inner", `${p}-input`) }), Be ? /* @__PURE__ */ t.createElement("div", { className: `${p}-affix` }, y && k(y, g), Y()) : null) : /* @__PURE__ */ t.createElement("div", { className: `${p}-content` }, s === "multi" && le && /* @__PURE__ */ t.createElement("div", { className: `${p}-affix` }, k(le, g)), s === "auto" && !a && B && /* @__PURE__ */ t.createElement("div", { className: `${p}-affix` }, k(B, g)), /* @__PURE__ */ t.createElement(
382
380
  "textarea",
383
381
  {
384
- ...ge,
385
- className: oe("k-input-inner", `${p}-textarea`),
386
- rows: We(),
382
+ ...de,
383
+ className: ne("k-input-inner", `${p}-textarea`),
384
+ rows: _e(),
387
385
  style: c ? { maxHeight: c } : {},
388
- ...ee && { "aria-multiline": "true" }
386
+ "aria-multiline": "true"
389
387
  }
390
- ), s === "auto" && !a && Be ? /* @__PURE__ */ t.createElement("div", { className: `${p}-affix` }, v && E(v, g), Y()) : null, ee && Xe ? /* @__PURE__ */ t.createElement("div", { className: `${p}-affix` }, C && E(C, g), (C || v) && /* @__PURE__ */ t.createElement("div", { className: "k-spacer" }), v && E(v, g), Y()) : null),
391
- we && /* @__PURE__ */ t.createElement(et, { message: Se })
388
+ ), s === "auto" && !a && Be ? /* @__PURE__ */ t.createElement("div", { className: `${p}-affix` }, y && k(y, g), Y()) : null, ye && Ge ? /* @__PURE__ */ t.createElement("div", { className: `${p}-affix` }, B && k(B, g), (B || y) && /* @__PURE__ */ t.createElement("div", { className: "k-spacer" }), y && k(y, g), Y()) : null),
389
+ Re && /* @__PURE__ */ t.createElement(Ye, { message: we })
392
390
  );
393
391
  });
394
392
  Te.propTypes = {