@cfx-dev/ui-components 2.0.4 → 2.0.5

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,19 +1,19 @@
1
1
  import { default as React } from 'react';
2
2
  import { IconName } from '../Icon';
3
3
 
4
- export type ButtonTheme = 'primary' | 'secondary' | 'on-light' | 'default';
4
+ export type ButtonTheme = 'primary' | 'secondary' | 'on-light' | 'default' | 'quicklink';
5
5
  export interface ButtonProps {
6
6
  text?: React.ReactNode;
7
7
  title?: string;
8
8
  type?: HTMLButtonElement['type'];
9
9
  icon?: IconName;
10
10
  theme?: ButtonTheme;
11
- disabled?: boolean;
12
- autofocus?: boolean;
13
11
  tabIndex?: number;
14
12
  className?: string;
15
13
  ariaLabel?: string;
16
14
  fullWidth?: boolean;
15
+ disabled?: boolean;
16
+ autofocus?: boolean;
17
17
  onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
18
18
  onMouseDown?: (event: React.MouseEvent<HTMLButtonElement>) => void;
19
19
  onMouseUp?: (event: React.MouseEvent<HTMLButtonElement>) => void;
@@ -1,105 +1,107 @@
1
- import { jsx as i, jsxs as k, Fragment as B } from "react/jsx-runtime";
2
- import _ from "react";
3
- import { Icon as I } from "../Icon/Icon.js";
4
- import { clsx as M } from "../../utils/clsx.js";
5
- import { noop as h } from "../../utils/functional.js";
6
- import '../../assets/Button.css';const j = "_root_1a4gc_1", w = "_fullWidth_1a4gc_32", F = "_primary_1a4gc_52", R = "_secondary_1a4gc_73", v = "_icon_1a4gc_115", D = "_decorator_1a4gc_120", t = {
7
- root: j,
8
- fullWidth: w,
9
- primary: F,
10
- secondary: R,
11
- "on-light": "_on-light_1a4gc_94",
1
+ import { jsx as r, jsxs as W, Fragment as g } from "react/jsx-runtime";
2
+ import m from "react";
3
+ import { Icon as B } from "../Icon/Icon.js";
4
+ import { clsx as I } from "../../utils/clsx.js";
5
+ import { noop as q } from "../../utils/functional.js";
6
+ import '../../assets/Button.css';const M = "_root_1qqs9_1", j = "_fullWidth_1qqs9_35", w = "_primary_1qqs9_55", F = "_secondary_1qqs9_76", R = "_quicklink_1qqs9_118", v = "_icon_1qqs9_125", D = "_icononly_1qqs9_150", L = "_decorator_1qqs9_155", o = {
7
+ root: M,
8
+ fullWidth: j,
9
+ primary: w,
10
+ secondary: F,
11
+ "on-light": "_on-light_1qqs9_97",
12
+ quicklink: R,
12
13
  icon: v,
13
- decorator: D
14
+ icononly: D,
15
+ decorator: L
14
16
  };
15
- function L(c) {
17
+ function U(s) {
16
18
  const {
17
- text: o = null,
19
+ text: t = null,
18
20
  icon: e,
19
21
  decorator: n = null
20
- } = c;
21
- return /* @__PURE__ */ k(B, { children: [
22
- o,
23
- !!e && /* @__PURE__ */ i(I, { name: e }),
24
- !!n && /* @__PURE__ */ i("div", { className: t.decorator, children: n })
22
+ } = s;
23
+ return /* @__PURE__ */ W(g, { children: [
24
+ t,
25
+ !!e && /* @__PURE__ */ r(B, { name: e, className: o.icon }),
26
+ !!n && /* @__PURE__ */ r("div", { className: o.decorator, children: n })
25
27
  ] });
26
28
  }
27
- function U(c) {
29
+ function z(s) {
28
30
  const {
29
- text: o = null,
31
+ text: t = null,
30
32
  icon: e,
31
33
  theme: n = "default",
32
- disabled: l = !1,
34
+ disabled: c = !1,
33
35
  className: u = "",
34
36
  autofocus: d = !1,
35
- fullWidth: r = !1,
36
- tabIndex: s
37
- } = c;
38
- return M(t.root, t[n], u, {
39
- [t.disabled]: l,
40
- [t.icon]: !!e && (o === null || typeof o > "u"),
41
- [t.text]: !!o,
42
- [t.autofocus]: d || typeof s < "u",
43
- [t.fullWidth]: r
37
+ fullWidth: a = !1,
38
+ tabIndex: i
39
+ } = s;
40
+ return I(o.root, o[n], u, {
41
+ [o.disabled]: c,
42
+ [o.icononly]: !!e && (t === null || typeof t > "u"),
43
+ [o.text]: !!t,
44
+ [o.autofocus]: d || typeof i < "u",
45
+ [o.fullWidth]: a
44
46
  });
45
47
  }
46
- const H = _.forwardRef(function(o, e) {
48
+ const K = m.forwardRef(function(t, e) {
47
49
  const {
48
50
  text: n = null,
49
- icon: l,
51
+ icon: c,
50
52
  title: u = "",
51
53
  type: d = "button",
52
- className: r = "",
53
- theme: s = "default",
54
- disabled: a = !1,
55
- onClick: p = h,
56
- onMouseDown: b = h,
57
- onMouseUp: x = h,
54
+ className: a = "",
55
+ theme: i = "default",
56
+ disabled: l = !1,
57
+ onClick: h = q,
58
+ onMouseDown: p = q,
59
+ onMouseUp: b = q,
58
60
  autofocus: f = !1,
59
- tabIndex: m,
60
- fullWidth: g = !1,
61
- ariaLabel: y = ""
62
- } = o, C = _.useMemo(() => U({
61
+ tabIndex: _,
62
+ fullWidth: y = !1,
63
+ ariaLabel: k = ""
64
+ } = t, x = m.useMemo(() => z({
63
65
  text: n,
64
- icon: l,
65
- theme: s,
66
- disabled: a,
67
- className: r,
66
+ icon: c,
67
+ theme: i,
68
+ disabled: l,
69
+ className: a,
68
70
  autofocus: f,
69
- fullWidth: g,
70
- tabIndex: m
71
+ fullWidth: y,
72
+ tabIndex: _
71
73
  }), [
72
74
  f,
73
- r,
74
- g,
75
75
  a,
76
+ y,
76
77
  l,
77
- m,
78
+ c,
79
+ _,
78
80
  n,
79
- s
80
- ]), N = _.useCallback((W) => {
81
- a || p(W);
82
- }, [a, p]);
83
- return /* @__PURE__ */ i(
81
+ i
82
+ ]), C = m.useCallback((N) => {
83
+ l || h(N);
84
+ }, [l, h]);
85
+ return /* @__PURE__ */ r(
84
86
  "button",
85
87
  {
86
88
  ref: e,
87
- disabled: a,
88
- className: C,
89
- onClick: N,
90
- onMouseDown: b,
91
- onMouseUp: x,
89
+ disabled: l,
90
+ className: x,
91
+ onClick: C,
92
+ onMouseDown: p,
93
+ onMouseUp: b,
92
94
  autoFocus: f,
93
- tabIndex: m,
95
+ tabIndex: _,
94
96
  title: u,
95
97
  type: d,
96
- "aria-label": y,
97
- children: /* @__PURE__ */ i(L, { ...o })
98
+ "aria-label": k,
99
+ children: /* @__PURE__ */ r(U, { ...t })
98
100
  }
99
101
  );
100
102
  });
101
103
  export {
102
- H as Button,
103
- L as ButtonContent,
104
- U as getButtonClassName
104
+ K as Button,
105
+ U as ButtonContent,
106
+ z as getButtonClassName
105
107
  };
@@ -1,15 +1,15 @@
1
- import { jsxs as t, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
2
  import l from "react";
3
3
  import { Flex as i } from "../Layout/Flex/Flex.js";
4
4
  import { Text as n } from "../Text/Text.js";
5
- import { Button as r } from "./Button.js";
5
+ import { Button as t } from "./Button.js";
6
6
  import { ButtonBar as c } from "./ButtonBar.js";
7
7
  function o() {
8
- return /* @__PURE__ */ t(i, { gap: "large", vertical: !0, children: [
9
- /* @__PURE__ */ t(i, { gap: "normal", vertical: !0, children: [
8
+ return /* @__PURE__ */ r(i, { gap: "large", vertical: !0, children: [
9
+ /* @__PURE__ */ r(i, { gap: "normal", vertical: !0, children: [
10
10
  /* @__PURE__ */ e(n, { children: "Default" }),
11
11
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
12
- r,
12
+ t,
13
13
  {
14
14
  text: "Sign In",
15
15
  theme: "default",
@@ -17,10 +17,10 @@ function o() {
17
17
  }
18
18
  ) })
19
19
  ] }),
20
- /* @__PURE__ */ t(i, { gap: "normal", vertical: !0, children: [
20
+ /* @__PURE__ */ r(i, { gap: "normal", vertical: !0, children: [
21
21
  /* @__PURE__ */ e(n, { children: "Primary" }),
22
22
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
23
- r,
23
+ t,
24
24
  {
25
25
  text: "Sign In",
26
26
  theme: "primary",
@@ -28,10 +28,10 @@ function o() {
28
28
  }
29
29
  ) })
30
30
  ] }),
31
- /* @__PURE__ */ t(i, { gap: "normal", vertical: !0, children: [
31
+ /* @__PURE__ */ r(i, { gap: "normal", vertical: !0, children: [
32
32
  /* @__PURE__ */ e(n, { children: "Secondary" }),
33
33
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
34
- r,
34
+ t,
35
35
  {
36
36
  text: "Sign In",
37
37
  theme: "secondary",
@@ -39,10 +39,10 @@ function o() {
39
39
  }
40
40
  ) })
41
41
  ] }),
42
- /* @__PURE__ */ t(i, { gap: "normal", vertical: !0, children: [
42
+ /* @__PURE__ */ r(i, { gap: "normal", vertical: !0, children: [
43
43
  /* @__PURE__ */ e(n, { children: "On Light" }),
44
44
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
45
- r,
45
+ t,
46
46
  {
47
47
  text: "Sign In",
48
48
  theme: "on-light",
@@ -50,20 +50,31 @@ function o() {
50
50
  }
51
51
  ) })
52
52
  ] }),
53
- /* @__PURE__ */ t(i, { gap: "normal", vertical: !0, children: [
53
+ /* @__PURE__ */ r(i, { gap: "normal", vertical: !0, children: [
54
+ /* @__PURE__ */ e(n, { children: "Quick Link" }),
55
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
56
+ t,
57
+ {
58
+ text: "Sign In",
59
+ theme: "quicklink",
60
+ icon: "LeftArrow"
61
+ }
62
+ ) })
63
+ ] }),
64
+ /* @__PURE__ */ r(i, { gap: "normal", vertical: !0, children: [
54
65
  /* @__PURE__ */ e(n, { children: "No Icon" }),
55
66
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
56
- r,
67
+ t,
57
68
  {
58
69
  text: "Sign In",
59
70
  theme: "default"
60
71
  }
61
72
  ) })
62
73
  ] }),
63
- /* @__PURE__ */ t(i, { gap: "normal", vertical: !0, children: [
74
+ /* @__PURE__ */ r(i, { gap: "normal", vertical: !0, children: [
64
75
  /* @__PURE__ */ e(n, { children: "Full Width" }),
65
76
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
66
- r,
77
+ t,
67
78
  {
68
79
  text: "Sign In",
69
80
  theme: "default",
@@ -72,14 +83,25 @@ function o() {
72
83
  }
73
84
  ) })
74
85
  ] }),
75
- /* @__PURE__ */ t(i, { gap: "normal", vertical: !0, children: [
86
+ /* @__PURE__ */ r(i, { gap: "normal", vertical: !0, children: [
76
87
  /* @__PURE__ */ e(n, { children: "Button Bar" }),
77
- /* @__PURE__ */ e("div", { children: /* @__PURE__ */ t(c, { children: [
78
- /* @__PURE__ */ e(r, { text: "Sign In", theme: "primary", icon: "Users" }),
79
- /* @__PURE__ */ e(r, { text: "Register", theme: "secondary", icon: "Users" }),
80
- /* @__PURE__ */ e(r, { text: "Sign Out", theme: "on-light", icon: "Users" }),
81
- /* @__PURE__ */ e(r, { text: "Create Account", theme: "default", icon: "Users" })
88
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ r(c, { children: [
89
+ /* @__PURE__ */ e(t, { text: "Sign In", theme: "primary", icon: "Users" }),
90
+ /* @__PURE__ */ e(t, { text: "Register", theme: "secondary", icon: "Users" }),
91
+ /* @__PURE__ */ e(t, { text: "Sign Out", theme: "on-light", icon: "Users" }),
92
+ /* @__PURE__ */ e(t, { text: "Create Account", theme: "default", icon: "Users" })
82
93
  ] }) })
94
+ ] }),
95
+ /* @__PURE__ */ r(i, { gap: "normal", vertical: !0, children: [
96
+ /* @__PURE__ */ e(n, { children: "Long text" }),
97
+ /* @__PURE__ */ e("div", { style: { maxWidth: "300px" }, children: /* @__PURE__ */ e(
98
+ t,
99
+ {
100
+ text: "Long text that should wrap around",
101
+ theme: "default",
102
+ icon: "Users"
103
+ }
104
+ ) })
83
105
  ] })
84
106
  ] });
85
107
  }
@@ -1,36 +1,36 @@
1
1
  import { jsxs as p, jsx as o } from "react/jsx-runtime";
2
- import u from "react";
3
- import { Icon as l } from "../Icon/Icon.js";
4
- import { clsx as v } from "../../utils/clsx.js";
5
- import '../../assets/InfoPanel.css';const y = "_rootUnset_10ll9_1", f = "_root_10ll9_1", x = "_interactive_10ll9_19", z = "_interactiveIcon_10ll9_22", d = "_icon_10ll9_69", I = "_content_10ll9_73", t = {
6
- rootUnset: y,
7
- root: f,
8
- interactive: x,
9
- interactiveIcon: z,
10
- "type-neutral": "_type-neutral_10ll9_34",
11
- "type-error": "_type-error_10ll9_41",
12
- "type-success": "_type-success_10ll9_48",
13
- "type-warning": "_type-warning_10ll9_55",
14
- "size-small": "_size-small_10ll9_62",
15
- "size-large": "_size-large_10ll9_65",
16
- icon: d,
17
- content: I
2
+ import h from "react";
3
+ import { Icon as s } from "../Icon/Icon.js";
4
+ import { clsx as k } from "../../utils/clsx.js";
5
+ import '../../assets/InfoPanel.css';const u = "_rootUnset_1kt7h_1", v = "_root_1kt7h_1", y = "_interactive_1kt7h_19", f = "_interactiveIcon_1kt7h_22", x = "_icon_1kt7h_69", z = "_content_1kt7h_73", t = {
6
+ rootUnset: u,
7
+ root: v,
8
+ interactive: y,
9
+ interactiveIcon: f,
10
+ "type-neutral": "_type-neutral_1kt7h_34",
11
+ "type-error": "_type-error_1kt7h_41",
12
+ "type-success": "_type-success_1kt7h_48",
13
+ "type-warning": "_type-warning_1kt7h_55",
14
+ "size-small": "_size-small_1kt7h_62",
15
+ "size-large": "_size-large_1kt7h_65",
16
+ icon: x,
17
+ content: z
18
18
  };
19
- function N(s) {
19
+ function d(c) {
20
20
  const {
21
- type: c = "neutral",
22
- size: r = "normal",
23
- className: a,
21
+ type: r = "neutral",
22
+ size: a = "normal",
23
+ className: i,
24
24
  onClick: e,
25
- ariaLabel: i,
25
+ ariaLabel: _,
26
26
  icon: n,
27
- children: _
28
- } = s, m = v(
27
+ children: l
28
+ } = c, m = k(
29
29
  t.rootUnset,
30
30
  t.root,
31
- a,
32
- t[`type-${c}`],
33
- t[`size-${r}`],
31
+ i,
32
+ t[`type-${r}`],
33
+ t[`size-${a}`],
34
34
  {
35
35
  [t.interactive]: !!e
36
36
  }
@@ -41,16 +41,16 @@ function N(s) {
41
41
  type: e ? "button" : void 0,
42
42
  className: m,
43
43
  onClick: e,
44
- "aria-label": i,
44
+ "aria-label": _,
45
45
  children: [
46
- n && /* @__PURE__ */ o(l, { size: "xxsmall", name: n, className: t.icon }),
47
- /* @__PURE__ */ o("div", { className: t.content, children: _ }),
48
- e && /* @__PURE__ */ o(l, { size: "xxsmall", name: "LeftArrow", className: t.interactiveIcon })
46
+ n && /* @__PURE__ */ o(s, { size: "xxsmall", name: n, className: t.icon }),
47
+ /* @__PURE__ */ o("div", { className: t.content, children: l }),
48
+ e && /* @__PURE__ */ o(s, { size: "xxsmall", name: "LeftArrow", className: t.interactiveIcon })
49
49
  ]
50
50
  }
51
51
  );
52
52
  }
53
- const R = u.memo(N);
53
+ const U = h.memo(d);
54
54
  export {
55
- R as default
55
+ U as default
56
56
  };
@@ -1,88 +1,88 @@
1
- import { jsxs as h, jsx as f } from "react/jsx-runtime";
2
- import t from "react";
1
+ import { jsxs as b, jsx as p } from "react/jsx-runtime";
2
+ import o from "react";
3
3
  import { Icon as j } from "../Icon/Icon.js";
4
4
  import { Indicator as G } from "../Indicator/Indicator.js";
5
5
  import { clsx as T } from "../../utils/clsx.js";
6
- import { getValue as z } from "../../utils/getValue.js";
7
- import '../../assets/Input.css';const B = "_root_osypq_1", W = "_input_osypq_1", X = "_small_osypq_5", $ = "_large_osypq_9", H = "_placeholderIcon_osypq_75", J = "_empty_osypq_151", L = "_decorator_osypq_156", e = {
8
- root: B,
9
- input: W,
10
- small: X,
11
- large: $,
6
+ import { getValue as B } from "../../utils/getValue.js";
7
+ import '../../assets/Input.css';const W = "_root_1truz_1", X = "_input_1truz_1", $ = "_small_1truz_5", q = "_large_1truz_9", H = "_placeholderIcon_1truz_75", J = "_empty_1truz_151", L = "_decorator_1truz_156", e = {
8
+ root: W,
9
+ input: X,
10
+ small: $,
11
+ large: q,
12
12
  placeholderIcon: H,
13
- "full-width": "_full-width_osypq_145",
13
+ "full-width": "_full-width_1truz_145",
14
14
  empty: J,
15
15
  decorator: L,
16
- "backdrop-blur": "_backdrop-blur_osypq_173"
17
- }, oe = t.forwardRef(function(a, b) {
16
+ "backdrop-blur": "_backdrop-blur_1truz_173"
17
+ }, te = o.forwardRef(function(a, y) {
18
18
  const {
19
19
  id: I,
20
20
  fullWidth: N = !1,
21
- value: l,
22
- onChange: s,
23
- onSubmit: c,
24
- onKeyDown: u,
21
+ value: r,
22
+ onChange: c,
23
+ onSubmit: u,
24
+ onKeyDown: s,
25
25
  pattern: d,
26
- tabIndex: g,
27
- loading: y = !1,
28
- spellCheck: k = !0,
29
- autofocus: q = !1,
26
+ tabIndex: z,
27
+ loading: h = !1,
28
+ spellCheck: g = !0,
29
+ autofocus: k = !1,
30
30
  disabled: w = !1,
31
31
  className: x = "",
32
- placeholder: n = "",
33
- placeholderIcon: r,
32
+ placeholder: l = "",
33
+ placeholderIcon: n,
34
34
  type: C = "text",
35
35
  size: E = "normal",
36
36
  decorator: i,
37
37
  backdropBlur: v = !1
38
- } = a, [m, R] = t.useState(l), V = typeof m < "u" && m !== "" && m !== null || typeof l < "u" && l !== "" && l !== null, S = a.type === "number" && (a.min ?? Number.MIN_SAFE_INTEGER) || void 0, A = a.type === "number" && (a.max ?? Number.MAX_SAFE_INTEGER) || void 0, p = t.useCallback((o) => {
39
- R(o), s && s(o);
40
- }, [s]), D = t.useCallback(
41
- (o) => {
38
+ } = a, [m, R] = o.useState(r), V = typeof m < "u" && m !== "" && m !== null || typeof r < "u" && r !== "" && r !== null, S = a.type === "number" && (a.min ?? Number.MIN_SAFE_INTEGER) || void 0, A = a.type === "number" && (a.max ?? Number.MAX_SAFE_INTEGER) || void 0, _ = o.useCallback((t) => {
39
+ R(t), c && c(t);
40
+ }, [c]), D = o.useCallback(
41
+ (t) => {
42
42
  const {
43
- value: _
44
- } = o.target;
43
+ value: f
44
+ } = t.target;
45
45
  if (d) {
46
- d.test(_) && p(_);
46
+ d.test(f) && _(f);
47
47
  return;
48
48
  }
49
- p(_);
49
+ _(f);
50
50
  },
51
- [p, d]
52
- ), F = t.useCallback((o) => {
53
- u && u(o), c && o.key === "Enter" && c();
54
- }, [u, c]), K = T(e.root, e[E], x, {
51
+ [_, d]
52
+ ), F = o.useCallback((t) => {
53
+ s && s(t), u && t.key === "Enter" && u();
54
+ }, [s, u]), K = T(e.root, e[E], x, {
55
55
  [e["full-width"]]: N,
56
56
  [e["backdrop-blur"]]: v,
57
57
  [e.empty]: !V
58
- }), M = t.useMemo(() => n ? r ? ` ${n.trim()}` : n.trim() : "", [n, r]);
59
- return /* @__PURE__ */ h("div", { className: K, children: [
60
- /* @__PURE__ */ f(
58
+ }), M = o.useMemo(() => l ? n ? ` ${l.trim()}` : l.trim() : "", [l, n]);
59
+ return /* @__PURE__ */ b("div", { className: K, children: [
60
+ /* @__PURE__ */ p(
61
61
  "input",
62
62
  {
63
63
  id: I,
64
- ref: b,
64
+ ref: y,
65
65
  type: C,
66
- tabIndex: g,
67
- autoFocus: q,
66
+ tabIndex: z,
67
+ autoFocus: k,
68
68
  className: e.input,
69
- value: l,
69
+ value: r,
70
70
  placeholder: M,
71
71
  disabled: w,
72
72
  onChange: D,
73
73
  onKeyDown: F,
74
- spellCheck: k,
74
+ spellCheck: g,
75
75
  min: S,
76
76
  max: A
77
77
  }
78
78
  ),
79
- r && /* @__PURE__ */ f(j, { name: r, className: e.placeholderIcon }),
80
- (y || !!i) && /* @__PURE__ */ h("div", { className: e.decorator, children: [
81
- !!y && /* @__PURE__ */ f(G, {}),
82
- !!i && z(i)
79
+ n && /* @__PURE__ */ p(j, { name: n, className: e.placeholderIcon }),
80
+ (h || !!i) && /* @__PURE__ */ b("div", { className: e.decorator, children: [
81
+ !!h && /* @__PURE__ */ p(G, {}),
82
+ !!i && B(i)
83
83
  ] })
84
84
  ] });
85
85
  });
86
86
  export {
87
- oe as default
87
+ te as default
88
88
  };
@@ -1,18 +1,18 @@
1
- import { jsxs as D, jsx as n } from "react/jsx-runtime";
2
- import t from "react";
3
- import { Button as F } from "../Button/Button.js";
4
- import { clsx as I } from "../../utils/clsx.js";
1
+ import { jsxs as B, jsx as o } from "react/jsx-runtime";
2
+ import r from "react";
3
+ import { Button as D } from "../Button/Button.js";
4
+ import { clsx as F } from "../../utils/clsx.js";
5
5
  import { useDynamicRef as i } from "../../utils/hooks/useDynamicRef.js";
6
6
  import "../../utils/hooks/useGlobalKeyboardEvent.js";
7
7
  import "../../utils/hooks/useKeyboardClose.js";
8
8
  import "../../index-2hJuj4UN.js";
9
- import '../../assets/RichInput.css';const L = "_root_ttyw6_1", T = "_renderer_ttyw6_1", j = "_small_ttyw6_5", E = "_large_ttyw6_10", z = "_clear_ttyw6_144", o = {
10
- root: L,
11
- renderer: T,
12
- small: j,
9
+ import '../../assets/RichInput.css';const I = "_root_1w3oj_1", L = "_renderer_1w3oj_1", T = "_small_1w3oj_5", E = "_large_1w3oj_10", z = "_clear_1w3oj_144", n = {
10
+ root: I,
11
+ renderer: L,
12
+ small: T,
13
13
  large: E,
14
14
  clear: z
15
- }, P = t.forwardRef(function(f, m) {
15
+ }, P = r.forwardRef(function(f, m) {
16
16
  const {
17
17
  size: d = "normal",
18
18
  value: c,
@@ -23,24 +23,24 @@ import '../../assets/RichInput.css';const L = "_root_ttyw6_1", T = "_renderer_tt
23
23
  onKeyDown: g,
24
24
  className: R,
25
25
  rendered: w,
26
- placeholder: y,
26
+ placeholder: j,
27
27
  autoFocus: S,
28
28
  withClearButton: k = !1
29
- } = f, s = t.useRef(null), r = t.useRef(null), a = i(p), u = i(C), x = t.useCallback((e) => {
29
+ } = f, s = r.useRef(null), t = r.useRef(null), a = i(p), u = i(C), x = r.useCallback((e) => {
30
30
  a.current(e.target.value);
31
- }, []), N = t.useCallback(() => {
31
+ }, []), N = r.useCallback(() => {
32
32
  var e;
33
33
  a.current(""), (e = s.current) == null || e.focus();
34
- }, []), b = t.useCallback((e) => {
34
+ }, []), b = r.useCallback((e) => {
35
35
  if (!u.current || !(e.target instanceof HTMLInputElement))
36
36
  return;
37
37
  const l = e.target;
38
38
  u.current(l.selectionStart, l.selectionEnd, l.selectionDirection);
39
- }, []), v = t.useCallback((e) => {
40
- r.current && (r.current.scrollTop = e.target.scrollTop, r.current.scrollLeft = e.target.scrollLeft);
41
- }, []), B = I(o.root, R, o[d]);
42
- return /* @__PURE__ */ D("div", { ref: m, className: B, children: [
43
- /* @__PURE__ */ n(
39
+ }, []), v = r.useCallback((e) => {
40
+ t.current && (t.current.scrollTop = e.target.scrollTop, t.current.scrollLeft = e.target.scrollLeft);
41
+ }, []), y = F(n.root, R, n[d]);
42
+ return /* @__PURE__ */ B("div", { ref: m, className: y, children: [
43
+ /* @__PURE__ */ o(
44
44
  "input",
45
45
  {
46
46
  ref: s,
@@ -48,7 +48,7 @@ import '../../assets/RichInput.css';const L = "_root_ttyw6_1", T = "_renderer_tt
48
48
  type: "text",
49
49
  value: c,
50
50
  onChange: x,
51
- placeholder: y,
51
+ placeholder: j,
52
52
  onBlur: h,
53
53
  onFocus: _,
54
54
  onScroll: v,
@@ -56,8 +56,8 @@ import '../../assets/RichInput.css';const L = "_root_ttyw6_1", T = "_renderer_tt
56
56
  onKeyDown: g
57
57
  }
58
58
  ),
59
- /* @__PURE__ */ n("div", { ref: r, className: o.renderer, children: w }),
60
- k && c && /* @__PURE__ */ n("div", { className: o.clear, children: /* @__PURE__ */ n(F, { icon: "Close", onClick: N }) })
59
+ /* @__PURE__ */ o("div", { ref: t, className: n.renderer, children: w }),
60
+ k && c && /* @__PURE__ */ o("div", { className: n.clear, children: /* @__PURE__ */ o(D, { icon: "Close", onClick: N }) })
61
61
  ] });
62
62
  });
63
63
  export {
@@ -1023,7 +1023,7 @@ function bt(e, r) {
1023
1023
  }
1024
1024
  function rr() {
1025
1025
  }
1026
- const ht = "_dropzone_ir264_1", Dt = "_text_ir264_19", At = "_disabled_ir264_25", wt = "_focused_ir264_39", Ot = "_dragActive_ir264_39", F = {
1026
+ const ht = "_dropzone_6f6kw_1", Dt = "_text_6f6kw_19", At = "_disabled_6f6kw_25", wt = "_focused_6f6kw_39", Ot = "_dragActive_6f6kw_39", F = {
1027
1027
  dropzone: ht,
1028
1028
  text: Dt,
1029
1029
  disabled: At,