@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
|
@@ -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
|
};
|