@cfx-dev/ui-components 2.1.10 → 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.
- package/dist/assets/Button.css +1 -1
- package/dist/assets/InfoPanel.css +1 -1
- package/dist/assets/ToggleGroup.css +1 -1
- package/dist/assets/global.css +1 -1
- package/dist/components/Button/Button.js +50 -50
- package/dist/components/InfoPanel/InfoPanel.js +28 -28
- package/dist/components/ToggleGroup/ToggleGroup.js +40 -40
- package/dist/styles-scss/global.scss +5 -1
- package/package.json +1 -1
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
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
|
|
4
|
-
import { clsx as
|
|
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
|
|
7
|
-
root:
|
|
8
|
-
fullWidth:
|
|
9
|
-
primary:
|
|
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-
|
|
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(
|
|
18
|
+
function z(a) {
|
|
19
19
|
const {
|
|
20
|
-
text:
|
|
21
|
-
icon:
|
|
22
|
-
decorator:
|
|
23
|
-
} =
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
|
|
26
|
-
!!
|
|
27
|
-
!!
|
|
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(
|
|
30
|
+
function A(a) {
|
|
31
31
|
const {
|
|
32
|
-
text:
|
|
33
|
-
icon:
|
|
34
|
-
theme:
|
|
35
|
-
disabled:
|
|
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
|
-
} =
|
|
41
|
-
return
|
|
42
|
-
[o.disabled]:
|
|
43
|
-
[o.icononly]: !!
|
|
44
|
-
[o.text]: !!
|
|
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(
|
|
49
|
+
const O = m.forwardRef(function(n, e) {
|
|
50
50
|
const {
|
|
51
|
-
text:
|
|
52
|
-
icon:
|
|
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:
|
|
57
|
+
disabled: l = !1,
|
|
58
58
|
onClick: k = h,
|
|
59
59
|
onMouseDown: p = h,
|
|
60
|
-
onMouseUp:
|
|
60
|
+
onMouseUp: b = h,
|
|
61
61
|
autofocus: f = !1,
|
|
62
62
|
tabIndex: _,
|
|
63
63
|
fullWidth: y = !1,
|
|
64
|
-
ariaLabel:
|
|
65
|
-
} =
|
|
66
|
-
text:
|
|
67
|
-
icon:
|
|
64
|
+
ariaLabel: x = ""
|
|
65
|
+
} = n, C = m.useMemo(() => A({
|
|
66
|
+
text: t,
|
|
67
|
+
icon: c,
|
|
68
68
|
theme: s,
|
|
69
|
-
disabled:
|
|
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
|
-
|
|
79
|
-
|
|
78
|
+
l,
|
|
79
|
+
c,
|
|
80
80
|
_,
|
|
81
|
-
|
|
81
|
+
t,
|
|
82
82
|
s
|
|
83
|
-
]),
|
|
84
|
-
|
|
85
|
-
}, [
|
|
83
|
+
]), N = m.useCallback((W) => {
|
|
84
|
+
l || k(W);
|
|
85
|
+
}, [l, k]);
|
|
86
86
|
return /* @__PURE__ */ r(
|
|
87
87
|
"button",
|
|
88
88
|
{
|
|
89
|
-
ref:
|
|
90
|
-
disabled:
|
|
91
|
-
className:
|
|
92
|
-
onClick:
|
|
89
|
+
ref: e,
|
|
90
|
+
disabled: l,
|
|
91
|
+
className: C,
|
|
92
|
+
onClick: N,
|
|
93
93
|
onMouseDown: p,
|
|
94
|
-
onMouseUp:
|
|
94
|
+
onMouseUp: b,
|
|
95
95
|
autoFocus: f,
|
|
96
96
|
tabIndex: _,
|
|
97
97
|
title: u,
|
|
98
98
|
type: d,
|
|
99
|
-
"aria-label":
|
|
100
|
-
children: /* @__PURE__ */ r(z, { ...
|
|
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
|
|
3
|
-
import { Icon as
|
|
4
|
-
import { clsx as
|
|
5
|
-
import '../../assets/InfoPanel.css';const
|
|
6
|
-
rootUnset:
|
|
7
|
-
root:
|
|
8
|
-
interactive:
|
|
9
|
-
interactiveIcon:
|
|
10
|
-
"type-neutral": "_type-
|
|
11
|
-
"type-error": "_type-
|
|
12
|
-
"type-success": "_type-
|
|
13
|
-
"type-warning": "_type-
|
|
14
|
-
"size-small": "_size-
|
|
15
|
-
"size-large": "_size-
|
|
16
|
-
icon:
|
|
17
|
-
content:
|
|
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
|
|
19
|
+
function N(s) {
|
|
20
20
|
const {
|
|
21
|
-
type:
|
|
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:
|
|
28
|
-
} = s, m =
|
|
27
|
+
children: _
|
|
28
|
+
} = s, m = v(
|
|
29
29
|
t.rootUnset,
|
|
30
30
|
t.root,
|
|
31
31
|
i,
|
|
32
|
-
t[`type-${
|
|
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(
|
|
47
|
-
/* @__PURE__ */ o("div", { className: t.content, children:
|
|
48
|
-
e && /* @__PURE__ */ o(
|
|
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
|
|
53
|
+
const R = u.memo(N);
|
|
54
54
|
export {
|
|
55
|
-
|
|
55
|
+
R as default
|
|
56
56
|
};
|
|
@@ -1,62 +1,62 @@
|
|
|
1
1
|
import { jsxs as d, jsx as p } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { Interactive as
|
|
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
|
|
6
|
-
root:
|
|
7
|
-
disabled:
|
|
8
|
-
descripted:
|
|
9
|
-
multiline:
|
|
10
|
-
options:
|
|
11
|
-
option:
|
|
12
|
-
description:
|
|
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 = (
|
|
14
|
+
}, m = (a, s) => {
|
|
15
15
|
var o;
|
|
16
|
-
return ((o =
|
|
17
|
-
}, y =
|
|
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:
|
|
20
|
+
options: i,
|
|
21
21
|
onChange: r,
|
|
22
22
|
className: u = "",
|
|
23
|
-
disabled:
|
|
24
|
-
multiline:
|
|
25
|
-
} =
|
|
26
|
-
() =>
|
|
27
|
-
const
|
|
28
|
-
r(
|
|
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(
|
|
33
|
-
}, g =
|
|
34
|
-
|
|
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
|
-
|
|
37
|
+
D,
|
|
38
38
|
{
|
|
39
|
-
className:
|
|
40
|
-
tabIndex:
|
|
41
|
-
onClick:
|
|
42
|
-
onMouseEnter:
|
|
43
|
-
onMouseLeave:
|
|
39
|
+
className: x,
|
|
40
|
+
tabIndex: b,
|
|
41
|
+
onClick: C,
|
|
42
|
+
onMouseEnter: M,
|
|
43
|
+
onMouseLeave: g,
|
|
44
44
|
children: [
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
t.icon || null,
|
|
46
|
+
t.label
|
|
47
47
|
]
|
|
48
48
|
},
|
|
49
|
-
|
|
49
|
+
t.value
|
|
50
50
|
);
|
|
51
51
|
}),
|
|
52
|
-
[o,
|
|
53
|
-
),
|
|
54
|
-
[e.disabled]:
|
|
52
|
+
[o, i, r, c]
|
|
53
|
+
), N = _(e.root, u, {
|
|
54
|
+
[e.disabled]: v,
|
|
55
55
|
[e.descripted]: n,
|
|
56
|
-
[e.multiline]:
|
|
56
|
+
[e.multiline]: f
|
|
57
57
|
});
|
|
58
|
-
return /* @__PURE__ */ d("div", { className:
|
|
59
|
-
/* @__PURE__ */ p("div", { className: e.options, children:
|
|
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
|
|
127
|
+
user-select: text;
|
|
124
128
|
}
|
|
125
129
|
.util-flex-grow {
|
|
126
130
|
flex-grow: 1;
|