@cfx-dev/ui-components 2.1.9 → 2.1.11

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,72 +1,72 @@
1
- import { jsx as r, jsxs as W, Fragment as g } from "react/jsx-runtime";
1
+ import { jsx as r, jsxs as g, Fragment as B } from "react/jsx-runtime";
2
2
  import m from "react";
3
- import { Icon as B } from "../Icon/Icon.js";
4
- import { clsx as q } from "../../utils/clsx.js";
3
+ import { Icon as q } from "../Icon/Icon.js";
4
+ import { clsx as I } from "../../utils/clsx.js";
5
5
  import { noop as h } from "../../utils/functional.js";
6
- import '../../assets/Button.css';const I = "_root_1hwl6_1", M = "_fullWidth_1hwl6_35", j = "_primary_1hwl6_55", F = "_secondary_1hwl6_76", R = "_linked_1hwl6_118", v = "_quicklink_1hwl6_143", D = "_icon_1hwl6_150", L = "_icononly_1hwl6_175", U = "_decorator_1hwl6_180", o = {
7
- root: I,
8
- fullWidth: M,
9
- primary: j,
6
+ import '../../assets/Button.css';const M = "_root_1n01a_1", j = "_fullWidth_1n01a_33", w = "_primary_1n01a_53", F = "_secondary_1n01a_74", R = "_linked_1n01a_116", v = "_quicklink_1n01a_141", D = "_icon_1n01a_148", L = "_icononly_1n01a_173", U = "_decorator_1n01a_178", o = {
7
+ root: M,
8
+ fullWidth: j,
9
+ primary: w,
10
10
  secondary: F,
11
- "on-light": "_on-light_1hwl6_97",
11
+ "on-light": "_on-light_1n01a_95",
12
12
  linked: R,
13
13
  quicklink: v,
14
14
  icon: D,
15
15
  icononly: L,
16
16
  decorator: U
17
17
  };
18
- function z(c) {
18
+ function z(a) {
19
19
  const {
20
- text: t = null,
21
- icon: l,
22
- decorator: n = null
23
- } = c;
24
- return /* @__PURE__ */ W(g, { children: [
25
- t,
26
- !!l && /* @__PURE__ */ r(B, { name: l, className: o.icon }),
27
- !!n && /* @__PURE__ */ r("div", { className: o.decorator, children: n })
20
+ text: n = null,
21
+ icon: e,
22
+ decorator: t = null
23
+ } = a;
24
+ return /* @__PURE__ */ g(B, { children: [
25
+ n,
26
+ !!e && /* @__PURE__ */ r(q, { name: e, className: o.icon }),
27
+ !!t && /* @__PURE__ */ r("div", { className: o.decorator, children: t })
28
28
  ] });
29
29
  }
30
- function A(c) {
30
+ function A(a) {
31
31
  const {
32
- text: t = null,
33
- icon: l,
34
- theme: n = "default",
35
- disabled: a = !1,
32
+ text: n = null,
33
+ icon: e,
34
+ theme: t = "default",
35
+ disabled: c = !1,
36
36
  className: u = "",
37
37
  autofocus: d = !1,
38
38
  fullWidth: i = !1,
39
39
  tabIndex: s
40
- } = c;
41
- return q(o.root, o[n], u, {
42
- [o.disabled]: a,
43
- [o.icononly]: !!l && (t === null || typeof t > "u"),
44
- [o.text]: !!t,
40
+ } = a;
41
+ return I(o.root, o[t], u, {
42
+ [o.disabled]: c,
43
+ [o.icononly]: !!e && (n === null || typeof n > "u"),
44
+ [o.text]: !!n,
45
45
  [o.autofocus]: d || typeof s < "u",
46
46
  [o.fullWidth]: i
47
47
  });
48
48
  }
49
- const O = m.forwardRef(function(t, l) {
49
+ const O = m.forwardRef(function(n, e) {
50
50
  const {
51
- text: n = null,
52
- icon: a,
51
+ text: t = null,
52
+ icon: c,
53
53
  title: u = "",
54
54
  type: d = "button",
55
55
  className: i = "",
56
56
  theme: s = "default",
57
- disabled: e = !1,
57
+ disabled: l = !1,
58
58
  onClick: k = h,
59
59
  onMouseDown: p = h,
60
- onMouseUp: w = h,
60
+ onMouseUp: b = h,
61
61
  autofocus: f = !1,
62
62
  tabIndex: _,
63
63
  fullWidth: y = !1,
64
- ariaLabel: b = ""
65
- } = t, x = m.useMemo(() => A({
66
- text: n,
67
- icon: a,
64
+ ariaLabel: x = ""
65
+ } = n, C = m.useMemo(() => A({
66
+ text: t,
67
+ icon: c,
68
68
  theme: s,
69
- disabled: e,
69
+ disabled: l,
70
70
  className: i,
71
71
  autofocus: f,
72
72
  fullWidth: y,
@@ -75,29 +75,29 @@ const O = m.forwardRef(function(t, l) {
75
75
  f,
76
76
  i,
77
77
  y,
78
- e,
79
- a,
78
+ l,
79
+ c,
80
80
  _,
81
- n,
81
+ t,
82
82
  s
83
- ]), C = m.useCallback((N) => {
84
- e || k(N);
85
- }, [e, k]);
83
+ ]), N = m.useCallback((W) => {
84
+ l || k(W);
85
+ }, [l, k]);
86
86
  return /* @__PURE__ */ r(
87
87
  "button",
88
88
  {
89
- ref: l,
90
- disabled: e,
91
- className: x,
92
- onClick: C,
89
+ ref: e,
90
+ disabled: l,
91
+ className: C,
92
+ onClick: N,
93
93
  onMouseDown: p,
94
- onMouseUp: w,
94
+ onMouseUp: b,
95
95
  autoFocus: f,
96
96
  tabIndex: _,
97
97
  title: u,
98
98
  type: d,
99
- "aria-label": b,
100
- children: /* @__PURE__ */ r(z, { ...t })
99
+ "aria-label": x,
100
+ children: /* @__PURE__ */ r(z, { ...n })
101
101
  }
102
102
  );
103
103
  });
@@ -1,35 +1,35 @@
1
1
  import { jsxs as p, jsx as o } from "react/jsx-runtime";
2
- import b from "react";
3
- import { Icon as c } from "../Icon/Icon.js";
4
- import { clsx as h } from "../../utils/clsx.js";
5
- import '../../assets/InfoPanel.css';const k = "_rootUnset_1cbhk_1", u = "_root_1cbhk_1", v = "_interactive_1cbhk_19", y = "_interactiveIcon_1cbhk_22", f = "_icon_1cbhk_70", x = "_content_1cbhk_74", t = {
6
- rootUnset: k,
7
- root: u,
8
- interactive: v,
9
- interactiveIcon: y,
10
- "type-neutral": "_type-neutral_1cbhk_34",
11
- "type-error": "_type-error_1cbhk_41",
12
- "type-success": "_type-success_1cbhk_48",
13
- "type-warning": "_type-warning_1cbhk_55",
14
- "size-small": "_size-small_1cbhk_62",
15
- "size-large": "_size-large_1cbhk_66",
16
- icon: f,
17
- content: x
2
+ import u from "react";
3
+ import { Icon as r } from "../Icon/Icon.js";
4
+ import { clsx as v } from "../../utils/clsx.js";
5
+ import '../../assets/InfoPanel.css';const y = "_rootUnset_5rtl4_1", f = "_root_5rtl4_1", x = "_interactive_5rtl4_19", z = "_interactiveIcon_5rtl4_22", d = "_icon_5rtl4_70", I = "_content_5rtl4_74", t = {
6
+ rootUnset: y,
7
+ root: f,
8
+ interactive: x,
9
+ interactiveIcon: z,
10
+ "type-neutral": "_type-neutral_5rtl4_34",
11
+ "type-error": "_type-error_5rtl4_41",
12
+ "type-success": "_type-success_5rtl4_48",
13
+ "type-warning": "_type-warning_5rtl4_55",
14
+ "size-small": "_size-small_5rtl4_62",
15
+ "size-large": "_size-large_5rtl4_66",
16
+ icon: d,
17
+ content: I
18
18
  };
19
- function z(s) {
19
+ function N(s) {
20
20
  const {
21
- type: r = "neutral",
21
+ type: c = "neutral",
22
22
  size: a = "normal",
23
23
  className: i,
24
24
  onClick: e,
25
- ariaLabel: _,
25
+ ariaLabel: l,
26
26
  icon: n,
27
- children: l
28
- } = s, m = h(
27
+ children: _
28
+ } = s, m = v(
29
29
  t.rootUnset,
30
30
  t.root,
31
31
  i,
32
- t[`type-${r}`],
32
+ t[`type-${c}`],
33
33
  t[`size-${a}`],
34
34
  {
35
35
  [t.interactive]: !!e
@@ -41,16 +41,16 @@ function z(s) {
41
41
  type: e ? "button" : void 0,
42
42
  className: m,
43
43
  onClick: e,
44
- "aria-label": _,
44
+ "aria-label": l,
45
45
  children: [
46
- n && /* @__PURE__ */ o(c, { size: "xxsmall", name: n, className: t.icon }),
47
- /* @__PURE__ */ o("div", { className: t.content, children: l }),
48
- e && /* @__PURE__ */ o(c, { size: "xxsmall", name: "LeftArrow", className: t.interactiveIcon })
46
+ n && /* @__PURE__ */ o(r, { size: "xxsmall", name: n, className: t.icon }),
47
+ /* @__PURE__ */ o("div", { className: t.content, children: _ }),
48
+ e && /* @__PURE__ */ o(r, { size: "xxsmall", name: "LeftArrow", className: t.interactiveIcon })
49
49
  ]
50
50
  }
51
51
  );
52
52
  }
53
- const U = b.memo(z);
53
+ const R = u.memo(N);
54
54
  export {
55
- U as default
55
+ R as default
56
56
  };
@@ -1,12 +1,12 @@
1
1
  import { jsx as r, jsxs as u } from "react/jsx-runtime";
2
- import h, { createElement as v } from "react";
3
- import { Dot as C } from "../Dot/Dot.js";
4
- import { clsx as k } from "../../utils/clsx.js";
5
- import '../../assets/Tabular.css';const p = "_reset_cctkn_1", x = "_root_cctkn_5", I = "_item_cctkn_16", R = "_active_cctkn_37", g = "_hasNotification_cctkn_64", T = "_content_cctkn_67", a = {
6
- reset: p,
2
+ import f, { createElement as k } from "react";
3
+ import { Dot as v } from "../Dot/Dot.js";
4
+ import { clsx as h } from "../../utils/clsx.js";
5
+ import '../../assets/Tabular.css';const C = "_reset_17apb_1", x = "_root_17apb_5", I = "_item_17apb_16", R = "_active_17apb_37", g = "_hasNotification_17apb_64", T = "_content_17apb_67", e = {
6
+ reset: C,
7
7
  root: x,
8
- "theme-dark": "_theme-dark_cctkn_10",
9
- "theme-light": "_theme-light_cctkn_13",
8
+ "theme-dark": "_theme-dark_17apb_10",
9
+ "theme-light": "_theme-light_17apb_13",
10
10
  item: I,
11
11
  active: R,
12
12
  hasNotification: g,
@@ -14,77 +14,77 @@ import '../../assets/Tabular.css';const p = "_reset_cctkn_1", x = "_root_cctkn_5
14
14
  };
15
15
  function m(_) {
16
16
  const {
17
- items: i,
17
+ items: s,
18
18
  activeItem: o,
19
- onActivate: e,
20
- itemClassName: c,
21
- ...n
22
- } = _, s = h.useCallback((t) => {
23
- e && e(t);
24
- }, [e]);
25
- return /* @__PURE__ */ r(m.Root, { ...n, children: i.map((t) => /* @__PURE__ */ v(
19
+ onActivate: a,
20
+ itemClassName: i,
21
+ ...c
22
+ } = _, n = f.useCallback((t) => {
23
+ a && a(t);
24
+ }, [a]);
25
+ return /* @__PURE__ */ r(m.Root, { ...c, children: s.map((t) => /* @__PURE__ */ k(
26
26
  m.Item,
27
27
  {
28
28
  ...t,
29
- className: c,
29
+ className: i,
30
30
  key: t.id,
31
31
  active: t.id === o,
32
- onClick: s
32
+ onClick: n
33
33
  }
34
34
  )) });
35
35
  }
36
- m.Root = function(i) {
36
+ m.Root = function(s) {
37
37
  const {
38
38
  children: o,
39
- className: e,
40
- ariaLabel: c,
41
- tabIndex: n,
42
- theme: s = "dark",
39
+ className: a,
40
+ ariaLabel: i,
41
+ tabIndex: c,
42
+ theme: n = "dark",
43
43
  role: t = "tablist"
44
- } = i, l = k(a.root, a[`theme-${s}`], e);
44
+ } = s, l = h(e.root, e[`theme-${n}`], a);
45
45
  return /* @__PURE__ */ r(
46
46
  "div",
47
47
  {
48
48
  role: t,
49
- "aria-label": c,
50
- tabIndex: n,
49
+ "aria-label": i,
50
+ tabIndex: c,
51
51
  className: l,
52
52
  children: o
53
53
  }
54
54
  );
55
55
  };
56
- m.Item = function(i) {
56
+ m.Item = function(s) {
57
57
  const {
58
58
  id: o,
59
- label: e,
60
- onClick: c,
61
- ariaLabel: n,
62
- ariaControls: s,
59
+ label: a,
60
+ onClick: i,
61
+ ariaLabel: c,
62
+ ariaControls: n,
63
63
  className: t,
64
64
  active: l = !1,
65
- disabled: d = !1,
66
- hasNotification: f = !1
67
- } = i, b = h.useCallback(() => {
68
- d || c(o);
69
- }, [d, c, o]), N = k(a.reset, a.item, t, {
70
- [a.active]: l,
71
- [a.hasNotification]: f
65
+ disabled: b = !1,
66
+ hasNotification: d = !1
67
+ } = s, p = f.useCallback(() => {
68
+ b || i(o);
69
+ }, [b, i, o]), N = h(e.reset, e.item, t, {
70
+ [e.active]: l,
71
+ [e.hasNotification]: d
72
72
  });
73
73
  return /* @__PURE__ */ r(
74
74
  "button",
75
75
  {
76
- disabled: d,
76
+ disabled: b,
77
77
  type: "button",
78
78
  role: "tab",
79
79
  className: N,
80
- onClick: b,
81
- "aria-label": n,
82
- "aria-controls": s,
83
- "data-text": e,
80
+ onClick: p,
81
+ "aria-label": c,
82
+ "aria-controls": n,
83
+ "data-text": a,
84
84
  "aria-selected": l,
85
- children: /* @__PURE__ */ u("span", { className: a.content, children: [
86
- e,
87
- f && /* @__PURE__ */ r(C, { color: "green", className: a.notification })
85
+ children: /* @__PURE__ */ u("span", { className: e.content, children: [
86
+ a,
87
+ d && /* @__PURE__ */ r(v, { color: "green", className: e.notification })
88
88
  ] })
89
89
  }
90
90
  );
@@ -1,62 +1,62 @@
1
1
  import { jsxs as d, jsx as p } from "react/jsx-runtime";
2
- import a from "react";
3
- import { Interactive as x } from "../Interactive/Interactive.js";
2
+ import l from "react";
3
+ import { Interactive as D } from "../Interactive/Interactive.js";
4
4
  import { clsx as _ } from "../../utils/clsx.js";
5
- import '../../assets/ToggleGroup.css';const D = "_root_1ha4w_1", j = "_disabled_1ha4w_7", k = "_descripted_1ha4w_11", E = "_multiline_1ha4w_14", L = "_options_1ha4w_18", O = "_option_1ha4w_18", S = "_description_1ha4w_25", G = "_active_1ha4w_70", e = {
6
- root: D,
7
- disabled: j,
8
- descripted: k,
9
- multiline: E,
10
- options: L,
11
- option: O,
12
- description: S,
5
+ import '../../assets/ToggleGroup.css';const j = "_root_1500i_1", k = "_disabled_1500i_6", E = "_descripted_1500i_10", L = "_multiline_1500i_13", O = "_options_1500i_17", S = "_option_1500i_17", w = "_description_1500i_24", G = "_active_1500i_69", e = {
6
+ root: j,
7
+ disabled: k,
8
+ descripted: E,
9
+ multiline: L,
10
+ options: O,
11
+ option: S,
12
+ description: w,
13
13
  active: G
14
- }, m = (l, i) => {
14
+ }, m = (a, s) => {
15
15
  var o;
16
- return ((o = i.find((t) => t.value === l)) == null ? void 0 : o.description) || "";
17
- }, y = a.memo(function(i) {
16
+ return ((o = s.find((i) => i.value === a)) == null ? void 0 : o.description) || "";
17
+ }, y = l.memo(function(s) {
18
18
  const {
19
19
  value: o,
20
- options: t,
20
+ options: i,
21
21
  onChange: r,
22
22
  className: u = "",
23
- disabled: h = !1,
24
- multiline: v = !1
25
- } = i, [n, c] = a.useState(m(o, t)), f = a.useMemo(
26
- () => t.map((s, N) => {
27
- const b = () => {
28
- r(s.value);
29
- }, C = () => {
30
- c(s.description || "");
23
+ disabled: v = !1,
24
+ multiline: f = !1
25
+ } = s, [n, c] = l.useState(m(o, i)), h = l.useMemo(
26
+ () => i.map((t, b) => {
27
+ const C = () => {
28
+ r(t.value);
31
29
  }, M = () => {
32
- c(m(o, t));
33
- }, g = _(e.option, {
34
- [e.active]: s.value === o
30
+ c(t.description || "");
31
+ }, g = () => {
32
+ c(m(o, i));
33
+ }, x = _(e.option, {
34
+ [e.active]: t.value === o
35
35
  });
36
36
  return /* @__PURE__ */ d(
37
- x,
37
+ D,
38
38
  {
39
- className: g,
40
- tabIndex: N,
41
- onClick: b,
42
- onMouseEnter: C,
43
- onMouseLeave: M,
39
+ className: x,
40
+ tabIndex: b,
41
+ onClick: C,
42
+ onMouseEnter: M,
43
+ onMouseLeave: g,
44
44
  children: [
45
- s.icon || null,
46
- s.label
45
+ t.icon || null,
46
+ t.label
47
47
  ]
48
48
  },
49
- s.value
49
+ t.value
50
50
  );
51
51
  }),
52
- [o, t, r, c]
53
- ), w = _(e.root, u, {
54
- [e.disabled]: h,
52
+ [o, i, r, c]
53
+ ), N = _(e.root, u, {
54
+ [e.disabled]: v,
55
55
  [e.descripted]: n,
56
- [e.multiline]: v
56
+ [e.multiline]: f
57
57
  });
58
- return /* @__PURE__ */ d("div", { className: w, children: [
59
- /* @__PURE__ */ p("div", { className: e.options, children: f }),
58
+ return /* @__PURE__ */ d("div", { className: N, children: [
59
+ /* @__PURE__ */ p("div", { className: e.options, children: h }),
60
60
  n && /* @__PURE__ */ p("div", { className: e.description, children: n })
61
61
  ] });
62
62
  });
@@ -118,9 +118,13 @@ li::marker {
118
118
  .util-z-index-9000 {
119
119
  z-index: ui.zindex('max');
120
120
  }
121
+ .util-text-unselectable,
122
+ .util-text-unselectable * {
123
+ user-select: none !important;
124
+ }
121
125
  .util-text-selectable,
122
126
  .util-text-selectable * {
123
- user-select: text !important;
127
+ user-select: text;
124
128
  }
125
129
  .util-flex-grow {
126
130
  flex-grow: 1;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cfx-dev/ui-components",
3
3
  "private": false,
4
- "version": "2.1.9",
4
+ "version": "2.1.11",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "dist/main.js",