@cfx-dev/ui-components 2.0.3 → 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.
- 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/Table.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 +757 -703
- package/dist/components/Switch/Switch.js +21 -21
- package/dist/components/Table/Table.js +67 -48
- package/dist/components/Table/TableShowcase.d.ts +5 -0
- package/dist/components/Table/TableShowcase.js +55 -0
- 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 +10 -1
- package/dist/styles-scss/tokens.scss +38 -24
- package/package.json +1 -1
- package/dist/iconBase-C6DV9qqL.js +0 -60
|
@@ -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,60 +1,79 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"table-responsive": "_table-responsive_1jg2j_1",
|
|
12
|
-
selectedRow: z
|
|
1
|
+
import { jsx as o, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import f, { useState as m } from "react";
|
|
3
|
+
import O from "../Checkbox/Checkbox.js";
|
|
4
|
+
import j from "../IconButton/IconButton.js";
|
|
5
|
+
import '../../assets/Table.css';const x = "_pointer_19b0f_18", A = "_selectedRow_19b0f_22", E = "_headerContent_19b0f_40", z = "_sortButton_19b0f_47", l = {
|
|
6
|
+
"table-responsive": "_table-responsive_19b0f_1",
|
|
7
|
+
pointer: x,
|
|
8
|
+
selectedRow: A,
|
|
9
|
+
headerContent: E,
|
|
10
|
+
sortButton: z
|
|
13
11
|
};
|
|
14
|
-
function
|
|
15
|
-
headers:
|
|
16
|
-
data:
|
|
17
|
-
includeRadio:
|
|
18
|
-
onSelectChange:
|
|
19
|
-
dataContainer:
|
|
20
|
-
useSort:
|
|
21
|
-
sortBy:
|
|
22
|
-
sortOrder:
|
|
23
|
-
onSortChange:
|
|
12
|
+
function F({
|
|
13
|
+
headers: u = [],
|
|
14
|
+
data: B = [],
|
|
15
|
+
includeRadio: r = !1,
|
|
16
|
+
onSelectChange: c,
|
|
17
|
+
dataContainer: b,
|
|
18
|
+
useSort: n = !1,
|
|
19
|
+
sortBy: k,
|
|
20
|
+
sortOrder: v = "asc",
|
|
21
|
+
onSortChange: d
|
|
24
22
|
}) {
|
|
25
|
-
const [
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
23
|
+
const [p, y] = m(null), [R, w] = m(k), [$, N] = m(v), _ = (e) => {
|
|
24
|
+
const t = R === e && $ === "asc" ? "desc" : "asc";
|
|
25
|
+
w(e), N(t), d == null || d(e, t);
|
|
26
|
+
}, h = f.useCallback(
|
|
27
|
+
(e, s) => {
|
|
28
|
+
if (typeof e == "boolean") {
|
|
29
|
+
const t = e ? s : null;
|
|
30
|
+
y(t), t !== null && (c == null || c(t));
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
[c]
|
|
34
|
+
);
|
|
35
|
+
return /* @__PURE__ */ o("div", { className: l.tableResponsive, children: /* @__PURE__ */ i("table", { children: [
|
|
36
|
+
/* @__PURE__ */ o("thead", { children: /* @__PURE__ */ i("tr", { children: [
|
|
37
|
+
r && /* @__PURE__ */ o("th", { "aria-label": "Select Row" }),
|
|
38
|
+
u.map((e, s) => /* @__PURE__ */ o(
|
|
39
|
+
"th",
|
|
40
|
+
{
|
|
41
|
+
className: n ? l.pointer : "",
|
|
42
|
+
onClick: () => n && _(e),
|
|
43
|
+
children: /* @__PURE__ */ i("div", { className: l.headerContent, children: [
|
|
44
|
+
e,
|
|
45
|
+
n && /* @__PURE__ */ o(
|
|
46
|
+
j,
|
|
47
|
+
{
|
|
48
|
+
className: l.sortButton,
|
|
49
|
+
color: "secondary",
|
|
50
|
+
name: "Sort",
|
|
51
|
+
onClick: n ? () => _(e) : void 0
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
] })
|
|
55
|
+
},
|
|
56
|
+
`header-${s}`
|
|
57
|
+
))
|
|
38
58
|
] }) }),
|
|
39
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ o("tbody", { children: B.map((e, s) => /* @__PURE__ */ i(
|
|
40
60
|
"tr",
|
|
41
61
|
{
|
|
42
|
-
className:
|
|
62
|
+
className: `${p === s ? l.selectedRow : ""} ${r ? l.pointer : ""}`,
|
|
63
|
+
onClick: r ? () => h(!0, s) : void 0,
|
|
43
64
|
children: [
|
|
44
|
-
|
|
45
|
-
|
|
65
|
+
r && /* @__PURE__ */ o("td", { children: /* @__PURE__ */ o(
|
|
66
|
+
O,
|
|
46
67
|
{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
checked:
|
|
51
|
-
onChange: O,
|
|
52
|
-
"aria-label": `${s}`
|
|
68
|
+
size: "small",
|
|
69
|
+
onCheckedChange: (t) => h(t, s),
|
|
70
|
+
"aria-label": `${s}`,
|
|
71
|
+
checked: p === s
|
|
53
72
|
}
|
|
54
73
|
) }),
|
|
55
|
-
|
|
74
|
+
e.map((t, C) => {
|
|
56
75
|
let a;
|
|
57
|
-
return
|
|
76
|
+
return f.isValidElement(t) ? a = t : b ? a = f.createElement(b, { item: t }) : a = String(t), /* @__PURE__ */ o("td", { children: a }, `item-${C}`);
|
|
58
77
|
})
|
|
59
78
|
]
|
|
60
79
|
},
|
|
@@ -63,5 +82,5 @@ function G({
|
|
|
63
82
|
] }) });
|
|
64
83
|
}
|
|
65
84
|
export {
|
|
66
|
-
|
|
85
|
+
F as Table
|
|
67
86
|
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import d from "react";
|
|
3
|
+
import { Badge as l } from "../Badge/Badge.js";
|
|
4
|
+
import { Flex as a } from "../Layout/Flex/Flex.js";
|
|
5
|
+
import "../Interactive/Interactive.js";
|
|
6
|
+
import { Scrollable as c } from "../Layout/Scrollable/Scrollable.js";
|
|
7
|
+
import "../Layout/Scrollable/VirtualScrollable.js";
|
|
8
|
+
import { Text as r } from "../Text/Text.js";
|
|
9
|
+
import { Table as o } from "./Table.js";
|
|
10
|
+
const i = [
|
|
11
|
+
[
|
|
12
|
+
"Cell 1",
|
|
13
|
+
"Cell 2",
|
|
14
|
+
"Cell 3",
|
|
15
|
+
new Date(2023, 0, 1).toLocaleDateString(),
|
|
16
|
+
/* @__PURE__ */ e(l, { color: "error", children: "Error" }, "1")
|
|
17
|
+
],
|
|
18
|
+
["Cell 4", "Cell 5", "Cell 6", new Date(2023, 1, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "2")],
|
|
19
|
+
["Cell 7", "Cell 8", "Cell 9", new Date(2023, 2, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "3")],
|
|
20
|
+
["Cell 4", "Cell 5", "Cell 6", new Date(2023, 1, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "2")],
|
|
21
|
+
["Cell 7", "Cell 8", "Cell 9", new Date(2023, 2, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "3")],
|
|
22
|
+
["Cell 4", "Cell 5", "Cell 6", new Date(2023, 1, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "2")],
|
|
23
|
+
["Cell 7", "Cell 8", "Cell 9", new Date(2023, 2, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "3")],
|
|
24
|
+
["Cell 4", "Cell 5", "Cell 6", new Date(2023, 1, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "2")],
|
|
25
|
+
["Cell 7", "Cell 8", "Cell 9", new Date(2023, 2, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "3")],
|
|
26
|
+
["Cell 4", "Cell 5", "Cell 6", new Date(2023, 1, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "2")],
|
|
27
|
+
["Cell 7", "Cell 8", "Cell 9", new Date(2023, 2, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "3")],
|
|
28
|
+
["Cell 4", "Cell 5", "Cell 6", new Date(2023, 1, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "2")],
|
|
29
|
+
["Cell 7", "Cell 8", "Cell 9", new Date(2023, 2, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "3")]
|
|
30
|
+
], n = ["Header 1", "Header 2", "Header 3", "Date", "Item"];
|
|
31
|
+
function C() {
|
|
32
|
+
return /* @__PURE__ */ t(a, { gap: "large", vertical: !0, children: [
|
|
33
|
+
/* @__PURE__ */ t(a, { gap: "normal", vertical: !0, children: [
|
|
34
|
+
/* @__PURE__ */ e(r, { children: "Table" }),
|
|
35
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(o, { includeRadio: !0, headers: n, data: i }) })
|
|
36
|
+
] }),
|
|
37
|
+
/* @__PURE__ */ t(a, { fullWidth: !0, vertical: !0, children: [
|
|
38
|
+
/* @__PURE__ */ e(r, { children: "Table with scroll" }),
|
|
39
|
+
/* @__PURE__ */ e(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
style: {
|
|
43
|
+
height: "400px",
|
|
44
|
+
overflow: "hidden"
|
|
45
|
+
},
|
|
46
|
+
children: /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(o, { includeRadio: !0, headers: n, data: i }) })
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
] })
|
|
50
|
+
] });
|
|
51
|
+
}
|
|
52
|
+
const B = d.memo(C);
|
|
53
|
+
export {
|
|
54
|
+
B as default
|
|
55
|
+
};
|
|
@@ -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) {
|