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.
@@ -1,50 +1,50 @@
1
- import { jsx as c } from "react/jsx-runtime";
2
- import { forwardRef as w } from "react";
3
- import { c as l } from "../../clsx-OuTLNxxd.js";
4
- const u = "_button_1we8s_285", z = "_neutral_1we8s_327", f = "_white_1we8s_351", p = "_transparent_1we8s_375", b = "_plain_1we8s_399", d = "_brand_1we8s_423", m = "_success_1we8s_447", g = "_attention_1we8s_471", h = "_danger_1we8s_495", x = "_full_1we8s_621", s = {
5
- button: u,
6
- neutral: z,
7
- white: f,
8
- transparent: p,
9
- plain: b,
10
- brand: d,
11
- success: m,
12
- attention: g,
13
- danger: h,
14
- "size-50": "_size-50_1we8s_519",
15
- "size-100": "_size-100_1we8s_536",
16
- "size-200": "_size-200_1we8s_553",
17
- "size-300": "_size-300_1we8s_570",
18
- "size-400": "_size-400_1we8s_587",
19
- "size-500": "_size-500_1we8s_604",
20
- full: x
21
- }, N = w(
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: e,
24
- variant: t = "neutral",
25
- size: _ = 200,
26
- fullWidth: n = !1,
27
- as: o = "button",
28
- className: a,
29
- ...r
30
- }, i) => /* @__PURE__ */ c(
31
- o,
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: l(
34
- a,
35
- s.button,
36
- s[t],
37
- s[`size-${_}`],
33
+ className: c(
34
+ o,
35
+ t.button,
36
+ t[s],
37
+ t[`size-${n}`],
38
38
  {
39
- [s.full]: n
39
+ [t.full]: e
40
40
  }
41
41
  ),
42
- ref: i,
43
- ...r,
44
- children: e
42
+ ref: r,
43
+ ...a,
44
+ children: _
45
45
  }
46
46
  )
47
47
  );
48
48
  export {
49
- N as Button
49
+ B as Button
50
50
  };
@@ -1,9 +1,9 @@
1
- import { jsx as n, jsxs as l } from "react/jsx-runtime";
2
- import { useRef as y, useState as b, useLayoutEffect as x } from "react";
3
- import { c as h } from "../../clsx-OuTLNxxd.js";
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 = "_inputContainer_h08to_285", S = "_bottomFade_h08to_288", K = "_inputWrap_h08to_291", P = "_textarea_h08to_294", N = "_button_h08to_360", W = "_primary_h08to_395", k = "_secondary_h08to_404", D = "_disclaimer_h08to_410", o = {
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: r = "primary",
17
+ variant: a = "primary",
18
18
  className: s,
19
- children: e,
20
- ...a
19
+ children: n,
20
+ ...o
21
21
  }) {
22
- return /* @__PURE__ */ n(
22
+ return /* @__PURE__ */ e(
23
23
  "button",
24
24
  {
25
- className: h(o.button, o[r], s),
26
- ...a,
27
- children: /* @__PURE__ */ n("span", { children: e })
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: r,
32
+ autoFocus: a,
33
33
  onSubmit: s
34
34
  }) {
35
- const e = y(null), [a, i] = b(""), c = a.trim(), u = !!c;
35
+ const n = h(null), [o, i] = b(""), c = o.trim(), p = !!c;
36
36
  x(() => {
37
37
  var t;
38
- r && ((t = e.current) == null || t.focus());
39
- }, [r]);
40
- const p = () => {
41
- const t = e.current;
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
- }, _ = (t) => {
44
- i(t.target.value), p();
43
+ }, y = (t) => {
44
+ i(t.target.value), u();
45
45
  }, m = (t) => {
46
- t.preventDefault(), s(c), i(""), requestAnimationFrame(p);
47
- }, d = (t) => {
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 = e.current) == null || t.focus();
51
+ (t = n.current) == null || t.focus();
52
52
  };
53
53
  return /* @__PURE__ */ l(
54
54
  "form",
55
55
  {
56
- className: h(o.inputWrap, { [o.active]: u }),
57
- onKeyDown: d,
56
+ className: d(r.inputWrap, { [r.active]: p }),
57
+ onKeyDown: _,
58
58
  onSubmit: m,
59
59
  children: [
60
- /* @__PURE__ */ n(g, {}),
61
- /* @__PURE__ */ n(
60
+ /* @__PURE__ */ e(g, {}),
61
+ /* @__PURE__ */ e(
62
62
  "textarea",
63
63
  {
64
- className: o.textarea,
65
- ref: e,
66
- value: a,
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: u ? "primary" : "secondary",
73
+ variant: p ? "primary" : "secondary",
74
74
  onClick: f,
75
75
  children: [
76
- /* @__PURE__ */ n(C, {}),
77
- /* @__PURE__ */ n("span", { className: "sr-only", children: "Send message" })
76
+ /* @__PURE__ */ e(C, {}),
77
+ /* @__PURE__ */ e("span", { className: "sr-only", children: "Send message" })
78
78
  ]
79
79
  }
80
80
  )