highsoft-ui 1.0.15 → 1.0.17
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 +40 -40
- package/dist/components/GPTInput/index.js +33 -33
- package/dist/components/Header/index.js +119 -119
- package/dist/components/Notification/index.js +1 -1
- package/dist/components/PrefPanel/index.js +241 -241
- package/dist/highsoft-ui.css +1 -1
- package/dist/index-xicPMd2c.js +67 -0
- package/dist/main.js +1 -1
- package/dist/scss/variables.scss +2 -1
- package/package.json +1 -1
- package/dist/index-CcO3hfIY.js +0 -60
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c
|
|
4
|
-
const
|
|
5
|
-
button:
|
|
6
|
-
neutral:
|
|
7
|
-
white:
|
|
8
|
-
transparent:
|
|
9
|
-
plain:
|
|
10
|
-
brand:
|
|
11
|
-
success:
|
|
12
|
-
attention:
|
|
13
|
-
danger:
|
|
14
|
-
"size-50": "_size-
|
|
15
|
-
"size-100": "_size-
|
|
16
|
-
"size-200": "_size-
|
|
17
|
-
"size-300": "_size-
|
|
18
|
-
"size-400": "_size-
|
|
19
|
-
"size-500": "_size-
|
|
20
|
-
full:
|
|
21
|
-
},
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as i } from "react";
|
|
3
|
+
import { c } from "../../clsx-OuTLNxxd.js";
|
|
4
|
+
const h = "_button_hf7ku_286", l = "_neutral_hf7ku_328", k = "_white_hf7ku_352", z = "_transparent_hf7ku_376", p = "_plain_hf7ku_400", b = "_brand_hf7ku_424", d = "_success_hf7ku_448", m = "_attention_hf7ku_472", w = "_danger_hf7ku_496", g = "_full_hf7ku_622", t = {
|
|
5
|
+
button: h,
|
|
6
|
+
neutral: l,
|
|
7
|
+
white: k,
|
|
8
|
+
transparent: z,
|
|
9
|
+
plain: p,
|
|
10
|
+
brand: b,
|
|
11
|
+
success: d,
|
|
12
|
+
attention: m,
|
|
13
|
+
danger: w,
|
|
14
|
+
"size-50": "_size-50_hf7ku_520",
|
|
15
|
+
"size-100": "_size-100_hf7ku_537",
|
|
16
|
+
"size-200": "_size-200_hf7ku_554",
|
|
17
|
+
"size-300": "_size-300_hf7ku_571",
|
|
18
|
+
"size-400": "_size-400_hf7ku_588",
|
|
19
|
+
"size-500": "_size-500_hf7ku_605",
|
|
20
|
+
full: g
|
|
21
|
+
}, B = i(
|
|
22
22
|
({
|
|
23
|
-
children:
|
|
24
|
-
variant:
|
|
25
|
-
size:
|
|
26
|
-
fullWidth:
|
|
27
|
-
as:
|
|
28
|
-
className:
|
|
29
|
-
...
|
|
30
|
-
},
|
|
31
|
-
|
|
23
|
+
children: _,
|
|
24
|
+
variant: s = "neutral",
|
|
25
|
+
size: n = 200,
|
|
26
|
+
fullWidth: e = !1,
|
|
27
|
+
as: u = "button",
|
|
28
|
+
className: o,
|
|
29
|
+
...a
|
|
30
|
+
}, r) => /* @__PURE__ */ f(
|
|
31
|
+
u,
|
|
32
32
|
{
|
|
33
|
-
className:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
s
|
|
37
|
-
|
|
33
|
+
className: c(
|
|
34
|
+
o,
|
|
35
|
+
t.button,
|
|
36
|
+
t[s],
|
|
37
|
+
t[`size-${n}`],
|
|
38
38
|
{
|
|
39
|
-
[
|
|
39
|
+
[t.full]: e
|
|
40
40
|
}
|
|
41
41
|
),
|
|
42
|
-
ref:
|
|
43
|
-
...
|
|
44
|
-
children:
|
|
42
|
+
ref: r,
|
|
43
|
+
...a,
|
|
44
|
+
children: _
|
|
45
45
|
}
|
|
46
46
|
)
|
|
47
47
|
);
|
|
48
48
|
export {
|
|
49
|
-
|
|
49
|
+
B as Button
|
|
50
50
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { c as
|
|
1
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as h, useState as b, useLayoutEffect as x } from "react";
|
|
3
|
+
import { c as d } from "../../clsx-OuTLNxxd.js";
|
|
4
4
|
import g from "../icons/Bubble.js";
|
|
5
5
|
import C from "../icons/Plane.js";
|
|
6
|
-
const v = "
|
|
6
|
+
const v = "_inputContainer_1ydpn_286", S = "_bottomFade_1ydpn_289", K = "_inputWrap_1ydpn_292", P = "_textarea_1ydpn_295", N = "_button_1ydpn_361", W = "_primary_1ydpn_396", k = "_secondary_1ydpn_405", D = "_disclaimer_1ydpn_411", r = {
|
|
7
7
|
inputContainer: v,
|
|
8
8
|
bottomFade: S,
|
|
9
9
|
inputWrap: K,
|
|
@@ -14,67 +14,67 @@ const v = "_inputContainer_h08to_285", S = "_bottomFade_h08to_288", K = "_inputW
|
|
|
14
14
|
disclaimer: D
|
|
15
15
|
};
|
|
16
16
|
function F({
|
|
17
|
-
variant:
|
|
17
|
+
variant: a = "primary",
|
|
18
18
|
className: s,
|
|
19
|
-
children:
|
|
20
|
-
...
|
|
19
|
+
children: n,
|
|
20
|
+
...o
|
|
21
21
|
}) {
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ e(
|
|
23
23
|
"button",
|
|
24
24
|
{
|
|
25
|
-
className:
|
|
26
|
-
...
|
|
27
|
-
children: /* @__PURE__ */
|
|
25
|
+
className: d(r.button, r[a], s),
|
|
26
|
+
...o,
|
|
27
|
+
children: /* @__PURE__ */ e("span", { children: n })
|
|
28
28
|
}
|
|
29
29
|
);
|
|
30
30
|
}
|
|
31
31
|
function I({
|
|
32
|
-
autoFocus:
|
|
32
|
+
autoFocus: a,
|
|
33
33
|
onSubmit: s
|
|
34
34
|
}) {
|
|
35
|
-
const
|
|
35
|
+
const n = h(null), [o, i] = b(""), c = o.trim(), p = !!c;
|
|
36
36
|
x(() => {
|
|
37
37
|
var t;
|
|
38
|
-
|
|
39
|
-
}, [
|
|
40
|
-
const
|
|
41
|
-
const t =
|
|
38
|
+
a && ((t = n.current) == null || t.focus());
|
|
39
|
+
}, [a]);
|
|
40
|
+
const u = () => {
|
|
41
|
+
const t = n.current;
|
|
42
42
|
t && (t.style.height = "64px", t.style.height = `${t.scrollHeight + 4}px`);
|
|
43
|
-
},
|
|
44
|
-
i(t.target.value),
|
|
43
|
+
}, y = (t) => {
|
|
44
|
+
i(t.target.value), u();
|
|
45
45
|
}, m = (t) => {
|
|
46
|
-
t.preventDefault(), s(c), i(""), requestAnimationFrame(
|
|
47
|
-
},
|
|
46
|
+
t.preventDefault(), s(c), i(""), requestAnimationFrame(u);
|
|
47
|
+
}, _ = (t) => {
|
|
48
48
|
t.key === "Enter" && !t.shiftKey && !t.ctrlKey && !t.metaKey && m(t);
|
|
49
49
|
}, f = () => {
|
|
50
50
|
var t;
|
|
51
|
-
(t =
|
|
51
|
+
(t = n.current) == null || t.focus();
|
|
52
52
|
};
|
|
53
53
|
return /* @__PURE__ */ l(
|
|
54
54
|
"form",
|
|
55
55
|
{
|
|
56
|
-
className:
|
|
57
|
-
onKeyDown:
|
|
56
|
+
className: d(r.inputWrap, { [r.active]: p }),
|
|
57
|
+
onKeyDown: _,
|
|
58
58
|
onSubmit: m,
|
|
59
59
|
children: [
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ e(g, {}),
|
|
61
|
+
/* @__PURE__ */ e(
|
|
62
62
|
"textarea",
|
|
63
63
|
{
|
|
64
|
-
className:
|
|
65
|
-
ref:
|
|
66
|
-
value:
|
|
67
|
-
onChange:
|
|
64
|
+
className: r.textarea,
|
|
65
|
+
ref: n,
|
|
66
|
+
value: o,
|
|
67
|
+
onChange: y
|
|
68
68
|
}
|
|
69
69
|
),
|
|
70
70
|
/* @__PURE__ */ l(
|
|
71
71
|
F,
|
|
72
72
|
{
|
|
73
|
-
variant:
|
|
73
|
+
variant: p ? "primary" : "secondary",
|
|
74
74
|
onClick: f,
|
|
75
75
|
children: [
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ e(C, {}),
|
|
77
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: "Send message" })
|
|
78
78
|
]
|
|
79
79
|
}
|
|
80
80
|
)
|