@cfx-dev/ui-components 2.0.4 → 2.0.6
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/Input.css +1 -1
- package/dist/assets/InputDropzone.css +1 -1
- package/dist/assets/NavList.css +1 -1
- package/dist/assets/Radio.css +1 -1
- package/dist/assets/RichInput.css +1 -1
- package/dist/assets/Select.css +1 -1
- package/dist/assets/Switch.css +1 -1
- package/dist/assets/Tabular.css +1 -1
- package/dist/assets/Textarea.css +1 -1
- package/dist/assets/ToggleGroup.css +1 -1
- package/dist/assets/global.css +1 -1
- package/dist/components/Button/Button.d.ts +3 -3
- package/dist/components/Button/Button.js +70 -68
- package/dist/components/Button/ButtonShowcase.js +43 -21
- package/dist/components/InfoPanel/InfoPanel.js +32 -32
- package/dist/components/Input/Input.js +46 -46
- package/dist/components/Input/RichInput.js +21 -21
- package/dist/components/InputDropzone/InputDropzone.js +1 -1
- package/dist/components/NavList/NavList.js +14 -14
- package/dist/components/Radio/Radio.js +20 -20
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Switch/Switch.js +21 -21
- package/dist/components/Tabular/Tabular.js +44 -44
- package/dist/components/Textarea/Textarea.js +25 -25
- package/dist/components/ToggleGroup/ToggleGroup.js +28 -28
- package/dist/styles-scss/_ui.scss +33 -1
- package/dist/styles-scss/tokens.scss +38 -24
- package/package.json +1 -1
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { jsxs as l, jsx as
|
|
2
|
-
import
|
|
3
|
-
import { Interactive as
|
|
4
|
-
import { clsx as
|
|
1
|
+
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import v from "react";
|
|
3
|
+
import { Interactive as d } from "../Interactive/Interactive.js";
|
|
4
|
+
import { clsx as _ } from "../../utils/clsx.js";
|
|
5
5
|
import { noop as f } from "../../utils/functional.js";
|
|
6
|
-
import { getValue as
|
|
7
|
-
import '../../assets/NavList.css';const p = "
|
|
6
|
+
import { getValue as i } from "../../utils/getValue.js";
|
|
7
|
+
import '../../assets/NavList.css';const p = "_root_u7cv2_1", u = "_item_u7cv2_5", N = "_active_u7cv2_20", h = "_icon_u7cv2_30", c = {
|
|
8
8
|
root: p,
|
|
9
|
-
item:
|
|
9
|
+
item: u,
|
|
10
10
|
active: N,
|
|
11
11
|
icon: h
|
|
12
|
-
},
|
|
12
|
+
}, k = v.forwardRef(function(e, r) {
|
|
13
13
|
const {
|
|
14
14
|
items: n,
|
|
15
15
|
activeItemId: s,
|
|
16
16
|
onActivate: a = f
|
|
17
17
|
} = e, m = n.map((o) => /* @__PURE__ */ l(
|
|
18
|
-
|
|
18
|
+
d,
|
|
19
19
|
{
|
|
20
|
-
className:
|
|
20
|
+
className: _(c.item, { [c.active]: o.id === s }),
|
|
21
21
|
onClick: () => a(o.id),
|
|
22
22
|
children: [
|
|
23
|
-
!!o.icon && /* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */
|
|
23
|
+
!!o.icon && /* @__PURE__ */ t("div", { className: c.icon, children: i(o.icon) }),
|
|
24
|
+
/* @__PURE__ */ t("div", { className: c.label, children: i(o.label) })
|
|
25
25
|
]
|
|
26
26
|
},
|
|
27
27
|
o.id
|
|
28
28
|
));
|
|
29
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ t("div", { ref: r, className: c.root, children: m });
|
|
30
30
|
});
|
|
31
31
|
export {
|
|
32
|
-
|
|
32
|
+
k as NavList
|
|
33
33
|
};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as g, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import s from "react";
|
|
3
|
-
import { clsx as
|
|
4
|
-
import '../../assets/Radio.css';const
|
|
5
|
-
root:
|
|
6
|
-
"size-normal": "_size-
|
|
7
|
-
"size-large": "_size-
|
|
8
|
-
indicator:
|
|
9
|
-
disabled:
|
|
3
|
+
import { clsx as h } from "../../utils/clsx.js";
|
|
4
|
+
import '../../assets/Radio.css';const u = "_root_1yglr_1", p = "_indicator_1yglr_29", x = "_disabled_1yglr_44", e = {
|
|
5
|
+
root: u,
|
|
6
|
+
"size-normal": "_size-normal_1yglr_19",
|
|
7
|
+
"size-large": "_size-large_1yglr_22",
|
|
8
|
+
indicator: p,
|
|
9
|
+
disabled: x
|
|
10
10
|
};
|
|
11
|
-
let
|
|
12
|
-
function
|
|
11
|
+
let r = 1;
|
|
12
|
+
function C(n) {
|
|
13
13
|
const {
|
|
14
14
|
checked: a,
|
|
15
|
-
onChange:
|
|
15
|
+
onChange: i,
|
|
16
16
|
label: d,
|
|
17
17
|
size: c = "normal",
|
|
18
18
|
className: _,
|
|
19
19
|
disabled: t = !1
|
|
20
|
-
} =
|
|
20
|
+
} = n, m = s.useRef(r);
|
|
21
21
|
s.useEffect(() => {
|
|
22
|
-
|
|
22
|
+
r += 1;
|
|
23
23
|
}, []);
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
return /* @__PURE__ */
|
|
24
|
+
const b = () => {
|
|
25
|
+
i(!a);
|
|
26
|
+
}, l = s.useId(), f = h(e.root, _, e[`size-${c}`], { [e.disabled]: t });
|
|
27
|
+
return /* @__PURE__ */ g("label", { className: f, htmlFor: l, children: [
|
|
28
28
|
/* @__PURE__ */ o(
|
|
29
29
|
"input",
|
|
30
30
|
{
|
|
@@ -32,8 +32,8 @@ function I(l) {
|
|
|
32
32
|
tabIndex: m.current,
|
|
33
33
|
checked: a,
|
|
34
34
|
disabled: t,
|
|
35
|
-
onChange:
|
|
36
|
-
id:
|
|
35
|
+
onChange: b,
|
|
36
|
+
id: l
|
|
37
37
|
}
|
|
38
38
|
),
|
|
39
39
|
/* @__PURE__ */ o("div", { className: e.indicator }),
|
|
@@ -41,5 +41,5 @@ function I(l) {
|
|
|
41
41
|
] });
|
|
42
42
|
}
|
|
43
43
|
export {
|
|
44
|
-
|
|
44
|
+
C as Radio
|
|
45
45
|
};
|
|
@@ -3041,7 +3041,7 @@ function dn(e) {
|
|
|
3041
3041
|
function As(e) {
|
|
3042
3042
|
return Co({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z" } }] })(e);
|
|
3043
3043
|
}
|
|
3044
|
-
const Ts = "
|
|
3044
|
+
const Ts = "_content_1ksgn_1", Os = "_option_1ksgn_1", Ns = "_trigger_1ksgn_1", Is = "_small_1ksgn_5", _s = "_large_1ksgn_9", Ms = "_fullWidth_1ksgn_118", Ls = "_icon_1ksgn_122", Ds = "_app_1ksgn_1", ks = "_arrow_1ksgn_142", Q = {
|
|
3045
3045
|
content: Ts,
|
|
3046
3046
|
option: Os,
|
|
3047
3047
|
trigger: Ns,
|
|
@@ -11,16 +11,16 @@ import '../../assets/Switch.css';var S = "Switch", [z, Y] = B(S), [A, O] = z(S),
|
|
|
11
11
|
checked: c,
|
|
12
12
|
defaultChecked: d,
|
|
13
13
|
required: u,
|
|
14
|
-
disabled:
|
|
14
|
+
disabled: n,
|
|
15
15
|
value: h = "on",
|
|
16
16
|
onCheckedChange: m,
|
|
17
17
|
...v
|
|
18
|
-
} = t, [
|
|
18
|
+
} = t, [r, f] = a.useState(null), T = H(s, (p) => f(p)), w = a.useRef(!1), k = r ? !!r.closest("form") : !0, [l = !1, x] = I({
|
|
19
19
|
prop: c,
|
|
20
20
|
defaultProp: d,
|
|
21
21
|
onChange: m
|
|
22
22
|
});
|
|
23
|
-
return /* @__PURE__ */ N(A, { scope: e, checked: l, disabled:
|
|
23
|
+
return /* @__PURE__ */ N(A, { scope: e, checked: l, disabled: n, children: [
|
|
24
24
|
/* @__PURE__ */ i(
|
|
25
25
|
_.button,
|
|
26
26
|
{
|
|
@@ -28,27 +28,27 @@ import '../../assets/Switch.css';var S = "Switch", [z, Y] = B(S), [A, O] = z(S),
|
|
|
28
28
|
role: "switch",
|
|
29
29
|
"aria-checked": l,
|
|
30
30
|
"aria-required": u,
|
|
31
|
-
"data-state":
|
|
32
|
-
"data-disabled":
|
|
33
|
-
disabled:
|
|
31
|
+
"data-state": y(l),
|
|
32
|
+
"data-disabled": n ? "" : void 0,
|
|
33
|
+
disabled: n,
|
|
34
34
|
value: h,
|
|
35
35
|
...v,
|
|
36
|
-
ref:
|
|
36
|
+
ref: T,
|
|
37
37
|
onClick: M(t.onClick, (p) => {
|
|
38
|
-
|
|
38
|
+
x((E) => !E), k && (w.current = p.isPropagationStopped(), w.current || p.stopPropagation());
|
|
39
39
|
})
|
|
40
40
|
}
|
|
41
41
|
),
|
|
42
42
|
k && /* @__PURE__ */ i(
|
|
43
43
|
$,
|
|
44
44
|
{
|
|
45
|
-
control:
|
|
45
|
+
control: r,
|
|
46
46
|
bubbles: !w.current,
|
|
47
47
|
name: o,
|
|
48
48
|
value: h,
|
|
49
49
|
checked: l,
|
|
50
50
|
required: u,
|
|
51
|
-
disabled:
|
|
51
|
+
disabled: n,
|
|
52
52
|
style: { transform: "translateX(-100%)" }
|
|
53
53
|
}
|
|
54
54
|
)
|
|
@@ -56,13 +56,13 @@ import '../../assets/Switch.css';var S = "Switch", [z, Y] = B(S), [A, O] = z(S),
|
|
|
56
56
|
}
|
|
57
57
|
);
|
|
58
58
|
P.displayName = S;
|
|
59
|
-
var R = "SwitchThumb",
|
|
59
|
+
var R = "SwitchThumb", g = a.forwardRef(
|
|
60
60
|
(t, s) => {
|
|
61
61
|
const { __scopeSwitch: e, ...o } = t, c = O(R, e);
|
|
62
62
|
return /* @__PURE__ */ i(
|
|
63
63
|
_.span,
|
|
64
64
|
{
|
|
65
|
-
"data-state":
|
|
65
|
+
"data-state": y(c.checked),
|
|
66
66
|
"data-disabled": c.disabled ? "" : void 0,
|
|
67
67
|
...o,
|
|
68
68
|
ref: s
|
|
@@ -70,14 +70,14 @@ var R = "SwitchThumb", y = a.forwardRef(
|
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
72
|
);
|
|
73
|
-
|
|
73
|
+
g.displayName = R;
|
|
74
74
|
var $ = (t) => {
|
|
75
|
-
const { control: s, checked: e, bubbles: o = !0, ...c } = t, d = a.useRef(null), u = j(e),
|
|
75
|
+
const { control: s, checked: e, bubbles: o = !0, ...c } = t, d = a.useRef(null), u = j(e), n = q(s);
|
|
76
76
|
return a.useEffect(() => {
|
|
77
|
-
const h = d.current, m = window.HTMLInputElement.prototype,
|
|
78
|
-
if (u !== e &&
|
|
77
|
+
const h = d.current, m = window.HTMLInputElement.prototype, r = Object.getOwnPropertyDescriptor(m, "checked").set;
|
|
78
|
+
if (u !== e && r) {
|
|
79
79
|
const f = new Event("click", { bubbles: o });
|
|
80
|
-
|
|
80
|
+
r.call(h, e), h.dispatchEvent(f);
|
|
81
81
|
}
|
|
82
82
|
}, [u, e, o]), /* @__PURE__ */ i(
|
|
83
83
|
"input",
|
|
@@ -90,7 +90,7 @@ var $ = (t) => {
|
|
|
90
90
|
ref: d,
|
|
91
91
|
style: {
|
|
92
92
|
...t.style,
|
|
93
|
-
...
|
|
93
|
+
...n,
|
|
94
94
|
position: "absolute",
|
|
95
95
|
pointerEvents: "none",
|
|
96
96
|
opacity: 0,
|
|
@@ -99,11 +99,11 @@ var $ = (t) => {
|
|
|
99
99
|
}
|
|
100
100
|
);
|
|
101
101
|
};
|
|
102
|
-
function
|
|
102
|
+
function y(t) {
|
|
103
103
|
return t ? "checked" : "unchecked";
|
|
104
104
|
}
|
|
105
|
-
var D = P, F =
|
|
106
|
-
const L = "
|
|
105
|
+
var D = P, F = g;
|
|
106
|
+
const L = "_switchUnset_tpmng_1", W = "_switchRoot_tpmng_5", X = "_switchThumb_tpmng_30", b = {
|
|
107
107
|
switchUnset: L,
|
|
108
108
|
switchRoot: W,
|
|
109
109
|
switchThumb: X
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { Dot as
|
|
4
|
-
import { clsx as
|
|
5
|
-
import '../../assets/Tabular.css';const
|
|
6
|
-
reset:
|
|
7
|
-
root:
|
|
8
|
-
"theme-dark": "_theme-
|
|
9
|
-
"theme-light": "_theme-
|
|
10
|
-
item:
|
|
11
|
-
active:
|
|
12
|
-
hasNotification:
|
|
13
|
-
content:
|
|
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,
|
|
7
|
+
root: x,
|
|
8
|
+
"theme-dark": "_theme-dark_cctkn_10",
|
|
9
|
+
"theme-light": "_theme-light_cctkn_13",
|
|
10
|
+
item: I,
|
|
11
|
+
active: R,
|
|
12
|
+
hasNotification: g,
|
|
13
|
+
content: T
|
|
14
14
|
};
|
|
15
|
-
function m(
|
|
15
|
+
function m(_) {
|
|
16
16
|
const {
|
|
17
|
-
items:
|
|
17
|
+
items: i,
|
|
18
18
|
activeItem: o,
|
|
19
19
|
onActivate: e,
|
|
20
|
-
itemClassName:
|
|
21
|
-
...
|
|
22
|
-
} =
|
|
20
|
+
itemClassName: c,
|
|
21
|
+
...n
|
|
22
|
+
} = _, s = h.useCallback((t) => {
|
|
23
23
|
e && e(t);
|
|
24
24
|
}, [e]);
|
|
25
|
-
return /* @__PURE__ */ r(m.Root, { ...
|
|
25
|
+
return /* @__PURE__ */ r(m.Root, { ...n, children: i.map((t) => /* @__PURE__ */ v(
|
|
26
26
|
m.Item,
|
|
27
27
|
{
|
|
28
28
|
...t,
|
|
29
|
-
className:
|
|
29
|
+
className: c,
|
|
30
30
|
key: t.id,
|
|
31
31
|
active: t.id === o,
|
|
32
|
-
onClick:
|
|
32
|
+
onClick: s
|
|
33
33
|
}
|
|
34
34
|
)) });
|
|
35
35
|
}
|
|
36
|
-
m.Root = function(
|
|
36
|
+
m.Root = function(i) {
|
|
37
37
|
const {
|
|
38
38
|
children: o,
|
|
39
39
|
className: e,
|
|
40
|
-
ariaLabel:
|
|
41
|
-
tabIndex:
|
|
42
|
-
theme:
|
|
40
|
+
ariaLabel: c,
|
|
41
|
+
tabIndex: n,
|
|
42
|
+
theme: s = "dark",
|
|
43
43
|
role: t = "tablist"
|
|
44
|
-
} =
|
|
44
|
+
} = i, l = k(a.root, a[`theme-${s}`], e);
|
|
45
45
|
return /* @__PURE__ */ r(
|
|
46
46
|
"div",
|
|
47
47
|
{
|
|
48
48
|
role: t,
|
|
49
|
-
"aria-label":
|
|
50
|
-
tabIndex:
|
|
49
|
+
"aria-label": c,
|
|
50
|
+
tabIndex: n,
|
|
51
51
|
className: l,
|
|
52
52
|
children: o
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
55
|
};
|
|
56
|
-
m.Item = function(
|
|
56
|
+
m.Item = function(i) {
|
|
57
57
|
const {
|
|
58
58
|
id: o,
|
|
59
59
|
label: e,
|
|
60
|
-
onClick:
|
|
61
|
-
ariaLabel:
|
|
62
|
-
ariaControls:
|
|
60
|
+
onClick: c,
|
|
61
|
+
ariaLabel: n,
|
|
62
|
+
ariaControls: s,
|
|
63
63
|
className: t,
|
|
64
64
|
active: l = !1,
|
|
65
|
-
disabled:
|
|
66
|
-
hasNotification:
|
|
67
|
-
} =
|
|
68
|
-
|
|
69
|
-
}, [
|
|
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
70
|
[a.active]: l,
|
|
71
|
-
[a.hasNotification]:
|
|
71
|
+
[a.hasNotification]: f
|
|
72
72
|
});
|
|
73
73
|
return /* @__PURE__ */ r(
|
|
74
74
|
"button",
|
|
75
75
|
{
|
|
76
|
-
disabled:
|
|
76
|
+
disabled: d,
|
|
77
77
|
type: "button",
|
|
78
78
|
role: "tab",
|
|
79
|
-
className:
|
|
79
|
+
className: N,
|
|
80
80
|
onClick: b,
|
|
81
|
-
"aria-label":
|
|
82
|
-
"aria-controls":
|
|
81
|
+
"aria-label": n,
|
|
82
|
+
"aria-controls": s,
|
|
83
83
|
"data-text": e,
|
|
84
84
|
"aria-selected": l,
|
|
85
|
-
children: /* @__PURE__ */
|
|
85
|
+
children: /* @__PURE__ */ u("span", { className: a.content, children: [
|
|
86
86
|
e,
|
|
87
|
-
|
|
87
|
+
f && /* @__PURE__ */ r(C, { color: "green", className: a.notification })
|
|
88
88
|
] })
|
|
89
89
|
}
|
|
90
90
|
);
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as p } from "react/jsx-runtime";
|
|
2
2
|
import _ from "react";
|
|
3
|
-
import { clsx as
|
|
4
|
-
import '../../assets/Textarea.css';const
|
|
5
|
-
root:
|
|
6
|
-
"full-width": "_full-
|
|
7
|
-
small:
|
|
8
|
-
large:
|
|
9
|
-
error:
|
|
10
|
-
disabled:
|
|
11
|
-
"resize-none": "_resize-
|
|
12
|
-
"resize-vertical": "_resize-
|
|
13
|
-
"resize-horizontal": "_resize-
|
|
14
|
-
"resize-both": "_resize-
|
|
15
|
-
"backdrop-blur": "_backdrop-
|
|
3
|
+
import { clsx as g } from "../../utils/clsx.js";
|
|
4
|
+
import '../../assets/Textarea.css';const x = "_root_fya03_1", k = "_small_fya03_7", v = "_large_fya03_11", C = "_error_fya03_15", N = "_disabled_fya03_19", e = {
|
|
5
|
+
root: x,
|
|
6
|
+
"full-width": "_full-width_fya03_4",
|
|
7
|
+
small: k,
|
|
8
|
+
large: v,
|
|
9
|
+
error: C,
|
|
10
|
+
disabled: N,
|
|
11
|
+
"resize-none": "_resize-none_fya03_63",
|
|
12
|
+
"resize-vertical": "_resize-vertical_fya03_66",
|
|
13
|
+
"resize-horizontal": "_resize-horizontal_fya03_69",
|
|
14
|
+
"resize-both": "_resize-both_fya03_72",
|
|
15
|
+
"backdrop-blur": "_backdrop-blur_fya03_110"
|
|
16
16
|
};
|
|
17
17
|
function I(n) {
|
|
18
18
|
const {
|
|
@@ -21,12 +21,12 @@ function I(n) {
|
|
|
21
21
|
label: r,
|
|
22
22
|
placeholder: i,
|
|
23
23
|
rows: d,
|
|
24
|
-
resize:
|
|
24
|
+
resize: f = "none",
|
|
25
25
|
disabled: o = !1,
|
|
26
|
-
autofocus:
|
|
27
|
-
className:
|
|
28
|
-
backdropBlur:
|
|
29
|
-
} = n,
|
|
26
|
+
autofocus: b,
|
|
27
|
+
className: u,
|
|
28
|
+
backdropBlur: h = !1
|
|
29
|
+
} = n, m = _.useCallback(
|
|
30
30
|
(y) => {
|
|
31
31
|
a(y.target.value);
|
|
32
32
|
},
|
|
@@ -34,20 +34,20 @@ function I(n) {
|
|
|
34
34
|
), l = _.useId(), s = /* @__PURE__ */ t(
|
|
35
35
|
"textarea",
|
|
36
36
|
{
|
|
37
|
-
autoFocus:
|
|
37
|
+
autoFocus: b,
|
|
38
38
|
id: l,
|
|
39
|
-
className: e[`resize-${
|
|
39
|
+
className: e[`resize-${f}`],
|
|
40
40
|
rows: d,
|
|
41
41
|
value: c,
|
|
42
42
|
disabled: o,
|
|
43
|
-
onChange:
|
|
43
|
+
onChange: m,
|
|
44
44
|
placeholder: i
|
|
45
45
|
}
|
|
46
|
-
), z =
|
|
46
|
+
), z = g(e.root, u, {
|
|
47
47
|
[e.disabled]: o,
|
|
48
|
-
[e["backdrop-blur"]]:
|
|
48
|
+
[e["backdrop-blur"]]: h
|
|
49
49
|
});
|
|
50
|
-
return /* @__PURE__ */ t("div", { className: z, children: r ? /* @__PURE__ */
|
|
50
|
+
return /* @__PURE__ */ t("div", { className: z, children: r ? /* @__PURE__ */ p("label", { htmlFor: l, children: [
|
|
51
51
|
r,
|
|
52
52
|
s
|
|
53
53
|
] }) : s });
|
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
import { jsxs as d, jsx as p } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { Interactive as
|
|
2
|
+
import a from "react";
|
|
3
|
+
import { Interactive as x } 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:
|
|
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
9
|
multiline: E,
|
|
10
10
|
options: L,
|
|
11
11
|
option: O,
|
|
12
12
|
description: S,
|
|
13
13
|
active: G
|
|
14
|
-
}, m = (
|
|
14
|
+
}, m = (l, i) => {
|
|
15
15
|
var o;
|
|
16
|
-
return ((o = i.find((t) => t.value ===
|
|
17
|
-
}, y =
|
|
16
|
+
return ((o = i.find((t) => t.value === l)) == null ? void 0 : o.description) || "";
|
|
17
|
+
}, y = a.memo(function(i) {
|
|
18
18
|
const {
|
|
19
19
|
value: o,
|
|
20
20
|
options: t,
|
|
21
21
|
onChange: r,
|
|
22
22
|
className: u = "",
|
|
23
|
-
disabled:
|
|
24
|
-
multiline:
|
|
25
|
-
} = i, [n, c] =
|
|
26
|
-
() => t.map((s,
|
|
27
|
-
const
|
|
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
28
|
r(s.value);
|
|
29
|
-
}, b = () => {
|
|
30
|
-
c(s.description || "");
|
|
31
29
|
}, C = () => {
|
|
30
|
+
c(s.description || "");
|
|
31
|
+
}, M = () => {
|
|
32
32
|
c(m(o, t));
|
|
33
|
-
},
|
|
33
|
+
}, g = _(e.option, {
|
|
34
34
|
[e.active]: s.value === o
|
|
35
35
|
});
|
|
36
36
|
return /* @__PURE__ */ d(
|
|
37
|
-
|
|
37
|
+
x,
|
|
38
38
|
{
|
|
39
|
-
className:
|
|
40
|
-
tabIndex:
|
|
41
|
-
onClick:
|
|
42
|
-
onMouseEnter:
|
|
43
|
-
onMouseLeave:
|
|
39
|
+
className: g,
|
|
40
|
+
tabIndex: N,
|
|
41
|
+
onClick: b,
|
|
42
|
+
onMouseEnter: C,
|
|
43
|
+
onMouseLeave: M,
|
|
44
44
|
children: [
|
|
45
45
|
s.icon || null,
|
|
46
46
|
s.label
|
|
@@ -50,13 +50,13 @@ import '../../assets/ToggleGroup.css';const x = "_root_11k2w_1", D = "_disabled_
|
|
|
50
50
|
);
|
|
51
51
|
}),
|
|
52
52
|
[o, t, r, c]
|
|
53
|
-
),
|
|
54
|
-
[e.disabled]:
|
|
53
|
+
), w = _(e.root, u, {
|
|
54
|
+
[e.disabled]: h,
|
|
55
55
|
[e.descripted]: n,
|
|
56
|
-
[e.multiline]:
|
|
56
|
+
[e.multiline]: v
|
|
57
57
|
});
|
|
58
|
-
return /* @__PURE__ */ d("div", { className:
|
|
59
|
-
/* @__PURE__ */ p("div", { className: e.options, children:
|
|
58
|
+
return /* @__PURE__ */ d("div", { className: w, children: [
|
|
59
|
+
/* @__PURE__ */ p("div", { className: e.options, children: f }),
|
|
60
60
|
n && /* @__PURE__ */ p("div", { className: e.description, children: n })
|
|
61
61
|
] });
|
|
62
62
|
});
|
|
@@ -198,7 +198,7 @@ $cfxui-color-alpha: (
|
|
|
198
198
|
|
|
199
199
|
@mixin animated($props: 'all', $subClass: '&') {
|
|
200
200
|
#{$subClass} {
|
|
201
|
-
transition: #{$props} .
|
|
201
|
+
transition: #{$props} .25s ease,
|
|
202
202
|
outline-offset 0s,
|
|
203
203
|
outline 0s;
|
|
204
204
|
}
|
|
@@ -272,6 +272,12 @@ $cfxui-color-alpha: (
|
|
|
272
272
|
::-webkit-scrollbar {
|
|
273
273
|
width: use('scrollable-thumb-size');
|
|
274
274
|
}
|
|
275
|
+
::-webkit-scrollbar:horizontal {
|
|
276
|
+
height: use('scrollable-thumb-size');
|
|
277
|
+
}
|
|
278
|
+
::-webkit-scrollbar-track {
|
|
279
|
+
background-color: color-token('scrollbar-track-background');
|
|
280
|
+
}
|
|
275
281
|
::-webkit-scrollbar-thumb {
|
|
276
282
|
@include border-radius('pill');
|
|
277
283
|
|
|
@@ -284,6 +290,9 @@ $cfxui-color-alpha: (
|
|
|
284
290
|
background-color: color-token('scrollbar-active');
|
|
285
291
|
}
|
|
286
292
|
}
|
|
293
|
+
::-webkit-scrollbar-corner {
|
|
294
|
+
display: none;
|
|
295
|
+
}
|
|
287
296
|
}
|
|
288
297
|
|
|
289
298
|
@mixin placeholder-color($color) {
|
|
@@ -310,3 +319,26 @@ $zindexMap: (
|
|
|
310
319
|
@function zindex($index) {
|
|
311
320
|
@return map.get($zindexMap, $index);
|
|
312
321
|
}
|
|
322
|
+
|
|
323
|
+
$mediaMap: (
|
|
324
|
+
'xsmall': 360px,
|
|
325
|
+
'small': 768px,
|
|
326
|
+
'medium': 1024px,
|
|
327
|
+
'large': 1300px,
|
|
328
|
+
);
|
|
329
|
+
|
|
330
|
+
@mixin media-max($size: 'medium', $fix: 'empty') {
|
|
331
|
+
@if $fix == 'empty' {
|
|
332
|
+
@media (min-width: calc(map.get($mediaMap, $size) - 1px)) { @content; }
|
|
333
|
+
} @else {
|
|
334
|
+
@media (min-width: $fix) { @content; }
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
@mixin media-min($size: 'medium', $fix: 'empty') {
|
|
339
|
+
@if $fix == 'empty' {
|
|
340
|
+
@media (min-width: map.get($mediaMap, $size)) { @content; }
|
|
341
|
+
} @else {
|
|
342
|
+
@media (min-width: $fix) { @content; }
|
|
343
|
+
}
|
|
344
|
+
}
|