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.
- package/dist/components/Button/index.js +50 -50
- package/dist/components/Container/index.js +1 -1
- package/dist/components/Footer/index.js +237 -237
- package/dist/components/GPTInput/index.js +31 -31
- package/dist/components/Header/index.js +130 -130
- package/dist/components/NewTag/index.js +15 -15
- package/dist/components/Notification/index.js +1 -1
- package/dist/components/PrefPanel/index.js +227 -227
- package/dist/highsoft-ui.css +1 -1
- package/dist/index-pnL-sAld.js +68 -0
- package/dist/main.js +1 -1
- package/package.json +2 -1
- package/dist/index-DvBbx2s8.js +0 -68
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as n, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { c as
|
|
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
|
|
6
|
-
const
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
|
17
|
-
variant:
|
|
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:
|
|
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
|
|
32
|
-
autoFocus:
|
|
31
|
+
function E({
|
|
32
|
+
autoFocus: r,
|
|
33
33
|
onSubmit: s
|
|
34
34
|
}) {
|
|
35
|
-
const e =
|
|
35
|
+
const e = _(null), [o, i] = K(""), c = o.trim(), u = !!c;
|
|
36
36
|
b(() => {
|
|
37
|
-
|
|
38
|
-
}, [
|
|
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
|
-
},
|
|
42
|
+
}, f = (t) => {
|
|
43
43
|
i(t.target.value), p();
|
|
44
44
|
}, m = (t) => {
|
|
45
45
|
t.preventDefault(), s(c), i(""), requestAnimationFrame(p);
|
|
46
|
-
},
|
|
46
|
+
}, y = (t) => {
|
|
47
47
|
t.key === "Enter" && !t.shiftKey && !t.ctrlKey && !t.metaKey && m(t);
|
|
48
|
-
},
|
|
48
|
+
}, h = () => {
|
|
49
49
|
e.current?.focus();
|
|
50
50
|
};
|
|
51
51
|
return /* @__PURE__ */ l(
|
|
52
52
|
"form",
|
|
53
53
|
{
|
|
54
|
-
className:
|
|
55
|
-
onKeyDown:
|
|
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:
|
|
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
|
-
|
|
69
|
+
k,
|
|
70
70
|
{
|
|
71
71
|
variant: u ? "primary" : "secondary",
|
|
72
|
-
onClick:
|
|
72
|
+
onClick: h,
|
|
73
73
|
children: [
|
|
74
|
-
/* @__PURE__ */ n(
|
|
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
|
-
|
|
85
|
-
|
|
84
|
+
E as GPTInput,
|
|
85
|
+
k as default
|
|
86
86
|
};
|