highsoft-ui 1.0.63 → 1.0.65

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,20 +1,20 @@
1
1
  import { jsx as n, jsxs as l } from "react/jsx-runtime";
2
- import { useRef as y, useState as g, useLayoutEffect as b } from "react";
3
- import { c as h } from "../../clsx-OuTLNxxd.js";
2
+ import { useRef as _, useState as K, useLayoutEffect as b } from "react";
3
+ import { c as d } from "../../clsx-OuTLNxxd.js";
4
4
  import x from "../icons/Bubble.js";
5
- import C from "../icons/Plane.js";
6
- const v = "_inputContainer_h398g_300", S = "_bottomFade_h398g_303", K = "_inputWrap_h398g_306", P = "_textarea_h398g_309", N = "_button_h398g_375", W = "_primary_h398g_410", k = "_secondary_h398g_419", D = "_disclaimer_h398g_425", r = {
5
+ import R from "../icons/Plane.js";
6
+ const L = "_1KLR0a_bottomFade", g = "_1KLR0a_button", C = "_1KLR0a_disclaimer", v = "_1KLR0a_inputContainer", S = "_1KLR0a_inputWrap", P = "_1KLR0a_primary", N = "_1KLR0a_secondary", W = "_1KLR0a_textarea", a = {
7
+ bottomFade: L,
8
+ button: g,
9
+ disclaimer: C,
7
10
  inputContainer: v,
8
- bottomFade: S,
9
- inputWrap: K,
10
- textarea: P,
11
- button: N,
12
- primary: W,
13
- secondary: k,
14
- disclaimer: D
11
+ inputWrap: S,
12
+ primary: P,
13
+ secondary: N,
14
+ textarea: W
15
15
  };
16
- function F({
17
- variant: a = "primary",
16
+ function k({
17
+ variant: r = "primary",
18
18
  className: s,
19
19
  children: e,
20
20
  ...o
@@ -22,56 +22,56 @@ function F({
22
22
  return /* @__PURE__ */ n(
23
23
  "button",
24
24
  {
25
- className: h(r.button, r[a], s),
25
+ className: d(a.button, a[r], s),
26
26
  ...o,
27
27
  children: /* @__PURE__ */ n("span", { children: e })
28
28
  }
29
29
  );
30
30
  }
31
- function I({
32
- autoFocus: a,
31
+ function E({
32
+ autoFocus: r,
33
33
  onSubmit: s
34
34
  }) {
35
- const e = y(null), [o, i] = g(""), c = o.trim(), u = !!c;
35
+ const e = _(null), [o, i] = K(""), c = o.trim(), u = !!c;
36
36
  b(() => {
37
- a && e.current?.focus();
38
- }, [a]);
37
+ r && e.current?.focus();
38
+ }, [r]);
39
39
  const p = () => {
40
40
  const t = e.current;
41
41
  t && (t.style.height = "64px", t.style.height = `${t.scrollHeight + 4}px`);
42
- }, _ = (t) => {
42
+ }, f = (t) => {
43
43
  i(t.target.value), p();
44
44
  }, m = (t) => {
45
45
  t.preventDefault(), s(c), i(""), requestAnimationFrame(p);
46
- }, d = (t) => {
46
+ }, y = (t) => {
47
47
  t.key === "Enter" && !t.shiftKey && !t.ctrlKey && !t.metaKey && m(t);
48
- }, f = () => {
48
+ }, h = () => {
49
49
  e.current?.focus();
50
50
  };
51
51
  return /* @__PURE__ */ l(
52
52
  "form",
53
53
  {
54
- className: h(r.inputWrap, { [r.active]: u }),
55
- onKeyDown: d,
54
+ className: d(a.inputWrap, { [a.active]: u }),
55
+ onKeyDown: y,
56
56
  onSubmit: m,
57
57
  children: [
58
58
  /* @__PURE__ */ n(x, {}),
59
59
  /* @__PURE__ */ n(
60
60
  "textarea",
61
61
  {
62
- className: r.textarea,
62
+ className: a.textarea,
63
63
  ref: e,
64
64
  value: o,
65
- onChange: _
65
+ onChange: f
66
66
  }
67
67
  ),
68
68
  /* @__PURE__ */ l(
69
- F,
69
+ k,
70
70
  {
71
71
  variant: u ? "primary" : "secondary",
72
- onClick: f,
72
+ onClick: h,
73
73
  children: [
74
- /* @__PURE__ */ n(C, {}),
74
+ /* @__PURE__ */ n(R, {}),
75
75
  /* @__PURE__ */ n("span", { className: "sr-only", children: "Send message" })
76
76
  ]
77
77
  }
@@ -81,6 +81,6 @@ function I({
81
81
  );
82
82
  }
83
83
  export {
84
- I as GPTInput,
85
- F as default
84
+ E as GPTInput,
85
+ k as default
86
86
  };