@cfx-dev/ui-components 3.0.2 → 3.0.4
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/Rail-DcVowhML.js +81 -0
- package/dist/assets/css/Accordion.css +1 -1
- package/dist/assets/css/Avatar.css +1 -1
- package/dist/assets/css/Badge.css +1 -1
- package/dist/assets/css/Box.css +1 -1
- package/dist/assets/css/Button.css +1 -1
- package/dist/assets/css/ButtonBar.css +1 -1
- package/dist/assets/css/Center.css +1 -1
- package/dist/assets/css/Checkbox.css +1 -1
- package/dist/assets/css/ClipboardButton.css +1 -1
- package/dist/assets/css/ControlBox.css +1 -1
- package/dist/assets/css/CountryFlag.css +1 -1
- package/dist/assets/css/Decorate.css +1 -1
- package/dist/assets/css/Dot.css +1 -1
- package/dist/assets/css/Flex.css +1 -1
- package/dist/assets/css/FlexRestricter.css +1 -1
- package/dist/assets/css/FlexShowcase.css +1 -1
- package/dist/assets/css/Flyout.css +1 -1
- package/dist/assets/css/Icon.css +1 -1
- package/dist/assets/css/IconBig.css +1 -1
- package/dist/assets/css/IconButton.css +1 -1
- package/dist/assets/css/Indicator.css +1 -1
- package/dist/assets/css/InfoPanel.css +1 -1
- package/dist/assets/css/Input.css +1 -1
- package/dist/assets/css/InputDropzone.css +1 -1
- package/dist/assets/css/Interactive.css +1 -1
- package/dist/assets/css/Island.css +1 -1
- package/dist/assets/css/ItemPreview.css +1 -1
- package/dist/assets/css/Link.css +1 -1
- package/dist/assets/css/Loaf.css +1 -1
- package/dist/assets/css/Modal.css +1 -1
- package/dist/assets/css/NavList.css +1 -1
- package/dist/assets/css/Overlay.css +1 -1
- package/dist/assets/css/Pad.css +1 -1
- package/dist/assets/css/Page.css +1 -1
- package/dist/assets/css/Popover.css +1 -1
- package/dist/assets/css/PopoverShowcase.css +1 -1
- package/dist/assets/css/PremiumBadge.css +1 -1
- package/dist/assets/css/Prose.css +1 -1
- package/dist/assets/css/Radio.css +1 -1
- package/dist/assets/css/Rail.css +1 -1
- package/dist/assets/css/RichInput.css +1 -1
- package/dist/assets/css/Select.css +1 -1
- package/dist/assets/css/Separator.css +1 -1
- package/dist/assets/css/Shroud.css +1 -1
- package/dist/assets/css/Skeleton.css +1 -1
- package/dist/assets/css/Spacer.css +1 -1
- package/dist/assets/css/Switch.css +1 -1
- package/dist/assets/css/Table.css +1 -1
- package/dist/assets/css/Tabular.css +1 -1
- package/dist/assets/css/Text.css +1 -1
- package/dist/assets/css/TextShowcase.css +1 -1
- package/dist/assets/css/Textarea.css +1 -1
- package/dist/assets/css/Title.css +1 -1
- package/dist/assets/css/ToggleGroup.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/cfxIcons-BNd1WgpX.js +96 -0
- package/dist/components/Accordion/Accordion.js +69 -69
- package/dist/components/Avatar/Avatar.js +18 -18
- package/dist/components/Badge/Badge.js +23 -23
- package/dist/components/Button/Button.js +76 -76
- package/dist/components/Button/ButtonBar.js +6 -6
- package/dist/components/Checkbox/Checkbox.js +90 -85
- package/dist/components/ClipboardButton/ClipboardButton.js +17 -17
- package/dist/components/ControlBox/ControlBox.js +11 -11
- package/dist/components/CountryFlag/CountryFlag.js +9 -9
- package/dist/components/Decorate/Decorate.js +12 -12
- package/dist/components/Dot/Dot.js +17 -17
- package/dist/components/Flyout/Flyout.js +44 -44
- package/dist/components/Icon/Icon.js +14 -14
- package/dist/components/IconBig/IconBig.js +23 -18
- package/dist/components/IconButton/IconButton.js +25 -25
- package/dist/components/Icons/IconsShowcase.js +1 -1
- package/dist/components/Icons/cfx-icons/Cart.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/Cart.js +42 -0
- package/dist/components/Icons/cfx-icons/UpvotesBurst.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/UpvotesBurst.js +26 -0
- package/dist/components/Icons/cfx-icons/UpvotesRecurring.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/UpvotesRecurring.js +27 -0
- package/dist/components/Icons/cfx-icons/User.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/User.js +31 -0
- package/dist/components/Icons/cfx-icons/Verified.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/Verified.js +23 -0
- package/dist/components/Icons/cfxIcons.d.ts +5 -0
- package/dist/components/Icons/cfxIcons.js +52 -42
- package/dist/components/Icons/index.js +1 -1
- package/dist/components/Indicator/Indicator.js +11 -11
- package/dist/components/InfoPanel/InfoPanel.js +37 -37
- package/dist/components/Input/Input.js +59 -59
- package/dist/components/Input/RichInput.js +39 -39
- package/dist/components/InputDropzone/InputDropzone.js +87 -87
- package/dist/components/InputDropzone/ItemPreview.js +17 -17
- package/dist/components/Interactive/Interactive.js +6 -6
- package/dist/components/Island/Island.js +20 -20
- package/dist/components/Layout/Box/Box.js +81 -81
- package/dist/components/Layout/Center/Center.js +14 -14
- package/dist/components/Layout/Flex/Flex.js +67 -67
- package/dist/components/Layout/Flex/FlexRestricter.js +14 -14
- package/dist/components/Layout/Flex/FlexShowcase.js +4 -4
- package/dist/components/Layout/Pad/Pad.js +34 -34
- package/dist/components/Layout/Page/Page.js +11 -11
- package/dist/components/Layout/Scrollable/Rail.js +1 -1
- package/dist/components/Layout/Scrollable/Scrollable.js +1 -1
- package/dist/components/Layout/Scrollable/VirtualScrollable.js +1 -1
- package/dist/components/Layout/Scrollable/index.js +1 -1
- package/dist/components/Link/ButtonLink.js +7 -6
- package/dist/components/Link/Link.js +36 -27
- package/dist/components/Loaf/Loaf.js +20 -20
- package/dist/components/Modal/Modal.js +51 -51
- package/dist/components/NavList/NavList.js +23 -23
- package/dist/components/Overlay/Overlay.js +17 -17
- package/dist/components/Popover/Popover.js +29 -29
- package/dist/components/Popover/PopoverShowcase.js +9 -9
- package/dist/components/PremiumBadge/PremiumBadge.js +8 -8
- package/dist/components/Prose/Prose.js +6 -6
- package/dist/components/Radio/Radio.js +32 -32
- package/dist/components/Select/Select.js +157 -157
- package/dist/components/Separator/Separator.js +31 -31
- package/dist/components/Shroud/Shroud.js +14 -14
- package/dist/components/Skeleton/Skeleton.js +10 -10
- package/dist/components/Spacer/Spacer.js +25 -25
- package/dist/components/Switch/Switch.js +43 -43
- package/dist/components/Table/Table.js +82 -82
- package/dist/components/Tabular/Tabular.js +60 -60
- package/dist/components/Text/Text.js +26 -26
- package/dist/components/Text/TextShowcase.js +19 -19
- package/dist/components/Textarea/Textarea.js +36 -36
- package/dist/components/Title/Title.js +57 -57
- package/dist/components/ToggleGroup/ToggleGroup.js +40 -40
- package/dist/main.js +2 -2
- package/dist/styles-scss/_ui.scss +22 -0
- package/dist/styles-scss/global.scss +5 -0
- package/dist/styles-scss/tokens.scss +5 -25
- package/package.json +2 -2
- package/dist/Rail-XT5PwAlx.js +0 -81
- package/dist/cfxIcons-BlbKR-zU.js +0 -86
|
@@ -1,109 +1,109 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as a, jsxs as W, Fragment as g } from "react/jsx-runtime";
|
|
2
2
|
import m from "react";
|
|
3
3
|
import { Icon as A } from "../Icon/Icon.js";
|
|
4
|
-
import { clsx as
|
|
5
|
-
import { noop as
|
|
6
|
-
const
|
|
7
|
-
unsetAll:
|
|
8
|
-
root:
|
|
9
|
-
fullWidth:
|
|
10
|
-
primary:
|
|
11
|
-
secondary:
|
|
12
|
-
"on-light": "
|
|
13
|
-
linked:
|
|
14
|
-
quicklink:
|
|
15
|
-
icon:
|
|
16
|
-
icononly:
|
|
17
|
-
decorator:
|
|
4
|
+
import { clsx as q } from "../../utils/clsx.js";
|
|
5
|
+
import { noop as x } from "../../utils/functional.js";
|
|
6
|
+
const I = "cfxui__Button__unsetAll__44b96", M = "cfxui__Button__root__e2ace", j = "cfxui__Button__fullWidth__f61d9", w = "cfxui__Button__primary__1c59f", F = "cfxui__Button__secondary__b2b84", R = "cfxui__Button__linked__330cb", v = "cfxui__Button__quicklink__204ac", D = "cfxui__Button__icon__44e51", L = "cfxui__Button__icononly__4f786", U = "cfxui__Button__decorator__39a9b", t = {
|
|
7
|
+
unsetAll: I,
|
|
8
|
+
root: M,
|
|
9
|
+
fullWidth: j,
|
|
10
|
+
primary: w,
|
|
11
|
+
secondary: F,
|
|
12
|
+
"on-light": "cfxui__Button__on-light__ae69c",
|
|
13
|
+
linked: R,
|
|
14
|
+
quicklink: v,
|
|
15
|
+
icon: D,
|
|
16
|
+
icononly: L,
|
|
17
|
+
decorator: U
|
|
18
18
|
};
|
|
19
|
-
function
|
|
19
|
+
function z(l) {
|
|
20
20
|
const {
|
|
21
|
-
text:
|
|
22
|
-
icon:
|
|
21
|
+
text: o = null,
|
|
22
|
+
icon: e,
|
|
23
23
|
decorator: n = null
|
|
24
|
-
} =
|
|
24
|
+
} = l;
|
|
25
25
|
return /* @__PURE__ */ W(g, { children: [
|
|
26
|
-
|
|
27
|
-
!!
|
|
28
|
-
!!n && /* @__PURE__ */
|
|
26
|
+
o,
|
|
27
|
+
!!e && /* @__PURE__ */ a(A, { name: e, className: t.icon }),
|
|
28
|
+
!!n && /* @__PURE__ */ a("div", { className: t.decorator, children: n })
|
|
29
29
|
] });
|
|
30
30
|
}
|
|
31
|
-
function E(
|
|
31
|
+
function E(l) {
|
|
32
32
|
const {
|
|
33
|
-
text:
|
|
34
|
-
icon:
|
|
33
|
+
text: o = null,
|
|
34
|
+
icon: e,
|
|
35
35
|
theme: n = "default",
|
|
36
|
-
disabled:
|
|
37
|
-
className:
|
|
38
|
-
autofocus:
|
|
39
|
-
fullWidth:
|
|
36
|
+
disabled: u = !1,
|
|
37
|
+
className: s = "",
|
|
38
|
+
autofocus: r = !1,
|
|
39
|
+
fullWidth: _ = !1,
|
|
40
40
|
tabIndex: i
|
|
41
|
-
} =
|
|
42
|
-
return
|
|
43
|
-
[
|
|
44
|
-
[
|
|
45
|
-
[
|
|
46
|
-
[
|
|
47
|
-
[
|
|
41
|
+
} = l;
|
|
42
|
+
return q(t.unsetAll, t.root, t[n], s, {
|
|
43
|
+
[t.disabled]: u,
|
|
44
|
+
[t.icononly]: !!e && (o === null || typeof o > "u"),
|
|
45
|
+
[t.text]: !!o,
|
|
46
|
+
[t.autofocus]: r || typeof i < "u",
|
|
47
|
+
[t.fullWidth]: _
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
const P = m.forwardRef(function(
|
|
50
|
+
const P = m.forwardRef(function(o, e) {
|
|
51
51
|
const {
|
|
52
52
|
text: n = null,
|
|
53
|
-
icon:
|
|
54
|
-
title:
|
|
55
|
-
type:
|
|
56
|
-
className:
|
|
53
|
+
icon: u,
|
|
54
|
+
title: s = "",
|
|
55
|
+
type: r = "button",
|
|
56
|
+
className: _ = "",
|
|
57
57
|
theme: i = "default",
|
|
58
|
-
disabled:
|
|
59
|
-
onClick:
|
|
60
|
-
onMouseDown:
|
|
61
|
-
onMouseUp:
|
|
62
|
-
autofocus:
|
|
63
|
-
tabIndex:
|
|
64
|
-
fullWidth:
|
|
65
|
-
ariaLabel:
|
|
66
|
-
} =
|
|
58
|
+
disabled: c = !1,
|
|
59
|
+
onClick: b = x,
|
|
60
|
+
onMouseDown: h = x,
|
|
61
|
+
onMouseUp: k = x,
|
|
62
|
+
autofocus: f = !1,
|
|
63
|
+
tabIndex: d,
|
|
64
|
+
fullWidth: B = !1,
|
|
65
|
+
ariaLabel: y = ""
|
|
66
|
+
} = o, p = m.useMemo(() => E({
|
|
67
67
|
text: n,
|
|
68
|
-
icon:
|
|
68
|
+
icon: u,
|
|
69
69
|
theme: i,
|
|
70
|
-
disabled:
|
|
71
|
-
className:
|
|
72
|
-
autofocus:
|
|
73
|
-
fullWidth:
|
|
74
|
-
tabIndex:
|
|
70
|
+
disabled: c,
|
|
71
|
+
className: _,
|
|
72
|
+
autofocus: f,
|
|
73
|
+
fullWidth: B,
|
|
74
|
+
tabIndex: d
|
|
75
75
|
}), [
|
|
76
|
-
_,
|
|
77
|
-
a,
|
|
78
|
-
k,
|
|
79
|
-
e,
|
|
80
|
-
s,
|
|
81
76
|
f,
|
|
77
|
+
_,
|
|
78
|
+
B,
|
|
79
|
+
c,
|
|
80
|
+
u,
|
|
81
|
+
d,
|
|
82
82
|
n,
|
|
83
83
|
i
|
|
84
84
|
]), C = m.useCallback((N) => {
|
|
85
|
-
|
|
86
|
-
}, [
|
|
87
|
-
return /* @__PURE__ */
|
|
85
|
+
c || b(N);
|
|
86
|
+
}, [c, b]);
|
|
87
|
+
return /* @__PURE__ */ a(
|
|
88
88
|
"button",
|
|
89
89
|
{
|
|
90
|
-
ref:
|
|
91
|
-
disabled:
|
|
92
|
-
className:
|
|
90
|
+
ref: e,
|
|
91
|
+
disabled: c,
|
|
92
|
+
className: p,
|
|
93
93
|
onClick: C,
|
|
94
|
-
onMouseDown:
|
|
95
|
-
onMouseUp:
|
|
96
|
-
autoFocus:
|
|
97
|
-
tabIndex:
|
|
98
|
-
title:
|
|
99
|
-
type:
|
|
100
|
-
"aria-label":
|
|
101
|
-
children: /* @__PURE__ */
|
|
94
|
+
onMouseDown: h,
|
|
95
|
+
onMouseUp: k,
|
|
96
|
+
autoFocus: f,
|
|
97
|
+
tabIndex: d,
|
|
98
|
+
title: s,
|
|
99
|
+
type: r,
|
|
100
|
+
"aria-label": y,
|
|
101
|
+
children: /* @__PURE__ */ a(z, { ...o })
|
|
102
102
|
}
|
|
103
103
|
);
|
|
104
104
|
});
|
|
105
105
|
export {
|
|
106
106
|
P as Button,
|
|
107
|
-
|
|
107
|
+
z as ButtonContent,
|
|
108
108
|
E as getButtonClassName
|
|
109
109
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { clsx as o } from "../../utils/clsx.js";
|
|
3
|
-
const i = "
|
|
3
|
+
const i = "cfxui__ButtonBar__bar__cf894", f = {
|
|
4
4
|
bar: i
|
|
5
5
|
}, t = {
|
|
6
6
|
start: "flex-start",
|
|
@@ -12,15 +12,15 @@ function u(e) {
|
|
|
12
12
|
children: n,
|
|
13
13
|
className: r,
|
|
14
14
|
justify: s = "center",
|
|
15
|
-
align:
|
|
15
|
+
align: c = "center"
|
|
16
16
|
} = e;
|
|
17
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ a(
|
|
18
18
|
"div",
|
|
19
19
|
{
|
|
20
|
-
className: o(
|
|
20
|
+
className: o(f.bar, r),
|
|
21
21
|
style: {
|
|
22
22
|
justifyContent: t[s],
|
|
23
|
-
alignItems: t[
|
|
23
|
+
alignItems: t[c]
|
|
24
24
|
},
|
|
25
25
|
children: n
|
|
26
26
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsxs as z, jsx as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsxs as z, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import * as c from "react";
|
|
3
3
|
import L from "react";
|
|
4
4
|
import { u as S, f as y, c as j, a as W, P as O, b as A, d as B, e as H } from "../../index-CjWRnNpt.js";
|
|
5
5
|
import { r as K } from "../../index-2hJuj4UN.js";
|
|
@@ -43,6 +43,11 @@ import "../Icons/cfx-icons/Users.js";
|
|
|
43
43
|
import "../Icons/cfx-icons/Visibility.js";
|
|
44
44
|
import "../Icons/cfx-icons/VisibilityOff.js";
|
|
45
45
|
import "../Icons/cfx-icons/Warning.js";
|
|
46
|
+
import "../Icons/cfx-icons/Cart.js";
|
|
47
|
+
import "../Icons/cfx-icons/User.js";
|
|
48
|
+
import "../Icons/cfx-icons/Verified.js";
|
|
49
|
+
import "../Icons/cfx-icons/UpvotesBurst.js";
|
|
50
|
+
import "../Icons/cfx-icons/UpvotesRecurring.js";
|
|
46
51
|
import "../Icons/cfx-icons-big/Like.js";
|
|
47
52
|
import "../Icons/cfx-icons-big/Subscriptions.js";
|
|
48
53
|
import "../Icons/cfx-icons-big/Upload.js";
|
|
@@ -51,15 +56,15 @@ import "../Icons/cfx-icons-big/Confirm.js";
|
|
|
51
56
|
import { clsx as R } from "../../utils/clsx.js";
|
|
52
57
|
import { getColor as q } from "../../utils/color.js";
|
|
53
58
|
function X(e, t) {
|
|
54
|
-
return
|
|
59
|
+
return c.useReducer((o, n) => t[o][n] ?? o, e);
|
|
55
60
|
}
|
|
56
61
|
var I = (e) => {
|
|
57
|
-
const { present: t, children:
|
|
58
|
-
return typeof
|
|
62
|
+
const { present: t, children: o } = e, n = F(t), s = typeof o == "function" ? o({ present: n.isPresent }) : c.Children.only(o), a = S(n.ref, G(s));
|
|
63
|
+
return typeof o == "function" || n.isPresent ? c.cloneElement(s, { ref: a }) : null;
|
|
59
64
|
};
|
|
60
65
|
I.displayName = "Presence";
|
|
61
66
|
function F(e) {
|
|
62
|
-
const [t,
|
|
67
|
+
const [t, o] = c.useState(), n = c.useRef({}), s = c.useRef(e), a = c.useRef("none"), f = e ? "mounted" : "unmounted", [u, m] = X(f, {
|
|
63
68
|
mounted: {
|
|
64
69
|
UNMOUNT: "unmounted",
|
|
65
70
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -72,97 +77,97 @@ function F(e) {
|
|
|
72
77
|
MOUNT: "mounted"
|
|
73
78
|
}
|
|
74
79
|
});
|
|
75
|
-
return
|
|
76
|
-
const r =
|
|
77
|
-
|
|
80
|
+
return c.useEffect(() => {
|
|
81
|
+
const r = x(n.current);
|
|
82
|
+
a.current = u === "mounted" ? r : "none";
|
|
78
83
|
}, [u]), y(() => {
|
|
79
|
-
const r =
|
|
80
|
-
if (
|
|
81
|
-
const C =
|
|
82
|
-
e ? m("MOUNT") :
|
|
84
|
+
const r = n.current, d = s.current;
|
|
85
|
+
if (d !== e) {
|
|
86
|
+
const C = a.current, _ = x(r);
|
|
87
|
+
e ? m("MOUNT") : _ === "none" || (r == null ? void 0 : r.display) === "none" ? m("UNMOUNT") : m(d && C !== _ ? "ANIMATION_OUT" : "UNMOUNT"), s.current = e;
|
|
83
88
|
}
|
|
84
89
|
}, [e, m]), y(() => {
|
|
85
90
|
if (t) {
|
|
86
91
|
const r = (i) => {
|
|
87
|
-
const
|
|
88
|
-
i.target === t &&
|
|
89
|
-
},
|
|
90
|
-
i.target === t && (
|
|
92
|
+
const _ = x(n.current).includes(i.animationName);
|
|
93
|
+
i.target === t && _ && K.flushSync(() => m("ANIMATION_END"));
|
|
94
|
+
}, d = (i) => {
|
|
95
|
+
i.target === t && (a.current = x(n.current));
|
|
91
96
|
};
|
|
92
|
-
return t.addEventListener("animationstart",
|
|
93
|
-
t.removeEventListener("animationstart",
|
|
97
|
+
return t.addEventListener("animationstart", d), t.addEventListener("animationcancel", r), t.addEventListener("animationend", r), () => {
|
|
98
|
+
t.removeEventListener("animationstart", d), t.removeEventListener("animationcancel", r), t.removeEventListener("animationend", r);
|
|
94
99
|
};
|
|
95
100
|
} else
|
|
96
101
|
m("ANIMATION_END");
|
|
97
102
|
}, [t, m]), {
|
|
98
103
|
isPresent: ["mounted", "unmountSuspended"].includes(u),
|
|
99
|
-
ref:
|
|
100
|
-
r && (
|
|
104
|
+
ref: c.useCallback((r) => {
|
|
105
|
+
r && (n.current = getComputedStyle(r)), o(r);
|
|
101
106
|
}, [])
|
|
102
107
|
};
|
|
103
108
|
}
|
|
104
|
-
function
|
|
109
|
+
function x(e) {
|
|
105
110
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
106
111
|
}
|
|
107
112
|
function G(e) {
|
|
108
|
-
var
|
|
109
|
-
let t = (
|
|
110
|
-
return
|
|
113
|
+
var n, s;
|
|
114
|
+
let t = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, o = t && "isReactWarning" in t && t.isReactWarning;
|
|
115
|
+
return o ? e.ref : (t = (s = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : s.get, o = t && "isReactWarning" in t && t.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
|
|
111
116
|
}
|
|
112
|
-
var
|
|
117
|
+
var E = "Checkbox", [J, ct] = j(E), [Q, V] = J(E), M = c.forwardRef(
|
|
113
118
|
(e, t) => {
|
|
114
119
|
const {
|
|
115
|
-
__scopeCheckbox:
|
|
116
|
-
name:
|
|
120
|
+
__scopeCheckbox: o,
|
|
121
|
+
name: n,
|
|
117
122
|
checked: s,
|
|
118
|
-
defaultChecked:
|
|
119
|
-
required:
|
|
123
|
+
defaultChecked: a,
|
|
124
|
+
required: f,
|
|
120
125
|
disabled: u,
|
|
121
126
|
value: m = "on",
|
|
122
127
|
onCheckedChange: r,
|
|
123
|
-
...
|
|
124
|
-
} = e, [i, C] =
|
|
128
|
+
...d
|
|
129
|
+
} = e, [i, C] = c.useState(null), _ = S(t, (p) => C(p)), k = c.useRef(!1), P = i ? !!i.closest("form") : !0, [b = !1, g] = W({
|
|
125
130
|
prop: s,
|
|
126
|
-
defaultProp:
|
|
131
|
+
defaultProp: a,
|
|
127
132
|
onChange: r
|
|
128
|
-
}), D =
|
|
129
|
-
return
|
|
130
|
-
const
|
|
131
|
-
if (
|
|
132
|
-
const
|
|
133
|
-
return
|
|
133
|
+
}), D = c.useRef(b);
|
|
134
|
+
return c.useEffect(() => {
|
|
135
|
+
const p = i == null ? void 0 : i.form;
|
|
136
|
+
if (p) {
|
|
137
|
+
const N = () => g(D.current);
|
|
138
|
+
return p.addEventListener("reset", N), () => p.removeEventListener("reset", N);
|
|
134
139
|
}
|
|
135
|
-
}, [i,
|
|
136
|
-
/* @__PURE__ */
|
|
140
|
+
}, [i, g]), /* @__PURE__ */ z(Q, { scope: o, state: b, disabled: u, children: [
|
|
141
|
+
/* @__PURE__ */ l(
|
|
137
142
|
O.button,
|
|
138
143
|
{
|
|
139
144
|
type: "button",
|
|
140
145
|
role: "checkbox",
|
|
141
146
|
"aria-checked": h(b) ? "mixed" : b,
|
|
142
|
-
"aria-required":
|
|
147
|
+
"aria-required": f,
|
|
143
148
|
"data-state": w(b),
|
|
144
149
|
"data-disabled": u ? "" : void 0,
|
|
145
150
|
disabled: u,
|
|
146
151
|
value: m,
|
|
147
|
-
...
|
|
148
|
-
ref:
|
|
149
|
-
onKeyDown: A(e.onKeyDown, (
|
|
150
|
-
|
|
152
|
+
...d,
|
|
153
|
+
ref: _,
|
|
154
|
+
onKeyDown: A(e.onKeyDown, (p) => {
|
|
155
|
+
p.key === "Enter" && p.preventDefault();
|
|
151
156
|
}),
|
|
152
|
-
onClick: A(e.onClick, (
|
|
153
|
-
|
|
157
|
+
onClick: A(e.onClick, (p) => {
|
|
158
|
+
g((N) => h(N) ? !0 : !N), P && (k.current = p.isPropagationStopped(), k.current || p.stopPropagation());
|
|
154
159
|
})
|
|
155
160
|
}
|
|
156
161
|
),
|
|
157
|
-
P && /* @__PURE__ */
|
|
162
|
+
P && /* @__PURE__ */ l(
|
|
158
163
|
Y,
|
|
159
164
|
{
|
|
160
165
|
control: i,
|
|
161
|
-
bubbles: !
|
|
162
|
-
name:
|
|
166
|
+
bubbles: !k.current,
|
|
167
|
+
name: n,
|
|
163
168
|
value: m,
|
|
164
169
|
checked: b,
|
|
165
|
-
required:
|
|
170
|
+
required: f,
|
|
166
171
|
disabled: u,
|
|
167
172
|
style: { transform: "translateX(-100%)" }
|
|
168
173
|
}
|
|
@@ -170,15 +175,15 @@ var x = "Checkbox", [J, nt] = j(x), [Q, V] = J(x), M = a.forwardRef(
|
|
|
170
175
|
] });
|
|
171
176
|
}
|
|
172
177
|
);
|
|
173
|
-
M.displayName =
|
|
174
|
-
var T = "CheckboxIndicator", U =
|
|
178
|
+
M.displayName = E;
|
|
179
|
+
var T = "CheckboxIndicator", U = c.forwardRef(
|
|
175
180
|
(e, t) => {
|
|
176
|
-
const { __scopeCheckbox:
|
|
177
|
-
return /* @__PURE__ */
|
|
181
|
+
const { __scopeCheckbox: o, forceMount: n, ...s } = e, a = V(T, o);
|
|
182
|
+
return /* @__PURE__ */ l(I, { present: n || h(a.state) || a.state === !0, children: /* @__PURE__ */ l(
|
|
178
183
|
O.span,
|
|
179
184
|
{
|
|
180
|
-
"data-state": w(
|
|
181
|
-
"data-disabled":
|
|
185
|
+
"data-state": w(a.state),
|
|
186
|
+
"data-disabled": a.disabled ? "" : void 0,
|
|
182
187
|
...s,
|
|
183
188
|
ref: t,
|
|
184
189
|
style: { pointerEvents: "none", ...e.style }
|
|
@@ -188,22 +193,22 @@ var T = "CheckboxIndicator", U = a.forwardRef(
|
|
|
188
193
|
);
|
|
189
194
|
U.displayName = T;
|
|
190
195
|
var Y = (e) => {
|
|
191
|
-
const { control: t, checked:
|
|
192
|
-
return
|
|
193
|
-
const m =
|
|
194
|
-
if (
|
|
195
|
-
const C = new Event("click", { bubbles:
|
|
196
|
-
m.indeterminate = h(
|
|
196
|
+
const { control: t, checked: o, bubbles: n = !0, ...s } = e, a = c.useRef(null), f = B(o), u = H(t);
|
|
197
|
+
return c.useEffect(() => {
|
|
198
|
+
const m = a.current, r = window.HTMLInputElement.prototype, i = Object.getOwnPropertyDescriptor(r, "checked").set;
|
|
199
|
+
if (f !== o && i) {
|
|
200
|
+
const C = new Event("click", { bubbles: n });
|
|
201
|
+
m.indeterminate = h(o), i.call(m, h(o) ? !1 : o), m.dispatchEvent(C);
|
|
197
202
|
}
|
|
198
|
-
}, [
|
|
203
|
+
}, [f, o, n]), /* @__PURE__ */ l(
|
|
199
204
|
"input",
|
|
200
205
|
{
|
|
201
206
|
type: "checkbox",
|
|
202
207
|
"aria-hidden": !0,
|
|
203
|
-
defaultChecked: h(
|
|
208
|
+
defaultChecked: h(o) ? !1 : o,
|
|
204
209
|
...s,
|
|
205
210
|
tabIndex: -1,
|
|
206
|
-
ref:
|
|
211
|
+
ref: a,
|
|
207
212
|
style: {
|
|
208
213
|
...e.style,
|
|
209
214
|
...u,
|
|
@@ -222,34 +227,34 @@ function w(e) {
|
|
|
222
227
|
return h(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
223
228
|
}
|
|
224
229
|
var Z = M, ee = U;
|
|
225
|
-
const te = "
|
|
230
|
+
const te = "cfxui__Checkbox__rootUnset__cbb57", oe = "cfxui__Checkbox__root__865aa", ne = "cfxui__Checkbox__indicator__2afc0", v = {
|
|
226
231
|
rootUnset: te,
|
|
227
|
-
root:
|
|
228
|
-
indicator:
|
|
229
|
-
"size-small": "
|
|
230
|
-
"size-normal": "
|
|
231
|
-
"size-large": "
|
|
232
|
+
root: oe,
|
|
233
|
+
indicator: ne,
|
|
234
|
+
"size-small": "cfxui__Checkbox__size-small__02440",
|
|
235
|
+
"size-normal": "cfxui__Checkbox__size-normal__700f4",
|
|
236
|
+
"size-large": "cfxui__Checkbox__size-large__28529"
|
|
232
237
|
};
|
|
233
238
|
function re(e) {
|
|
234
239
|
const {
|
|
235
240
|
id: t,
|
|
236
|
-
size:
|
|
237
|
-
rootClassName:
|
|
241
|
+
size: o = "normal",
|
|
242
|
+
rootClassName: n,
|
|
238
243
|
indicatorClassName: s,
|
|
239
|
-
colorToken:
|
|
240
|
-
color:
|
|
244
|
+
colorToken: a,
|
|
245
|
+
color: f,
|
|
241
246
|
opacity: u,
|
|
242
247
|
luminance: m,
|
|
243
248
|
...r
|
|
244
|
-
} = e,
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
+
} = e, d = R(
|
|
250
|
+
v.root,
|
|
251
|
+
v.rootUnset,
|
|
252
|
+
v[`size-${o}`],
|
|
253
|
+
n
|
|
249
254
|
), i = q(e);
|
|
250
|
-
return /* @__PURE__ */
|
|
255
|
+
return /* @__PURE__ */ l(Z, { ...r, id: t, style: { color: i }, className: d, children: /* @__PURE__ */ l(ee, { className: R(v.indicator, s), children: /* @__PURE__ */ l($, {}) }) });
|
|
251
256
|
}
|
|
252
|
-
const
|
|
257
|
+
const at = L.memo(re);
|
|
253
258
|
export {
|
|
254
|
-
|
|
259
|
+
at as default
|
|
255
260
|
};
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import c from "react";
|
|
3
3
|
import { Button as C } from "../Button/Button.js";
|
|
4
|
-
import { Title as
|
|
5
|
-
import { clsx as
|
|
6
|
-
import { noop as
|
|
4
|
+
import { Title as _ } from "../Title/Title.js";
|
|
5
|
+
import { clsx as f } from "../../utils/clsx.js";
|
|
6
|
+
import { noop as u } from "../../utils/functional.js";
|
|
7
7
|
import "../../utils/hooks/useGlobalKeyboardEvent.js";
|
|
8
8
|
import "../../utils/hooks/useKeyboardClose.js";
|
|
9
9
|
import "../../index-2hJuj4UN.js";
|
|
10
|
-
import { useClipboardComponent as
|
|
11
|
-
const
|
|
12
|
-
root:
|
|
13
|
-
copied:
|
|
10
|
+
import { useClipboardComponent as b } from "../../utils/hooks/useClipboardComponent.js";
|
|
11
|
+
const x = "cfxui__ClipboardButton__root__e8251", k = "cfxui__ClipboardButton__copied__6e0b9", e = {
|
|
12
|
+
root: x,
|
|
13
|
+
copied: k
|
|
14
14
|
};
|
|
15
|
-
function
|
|
15
|
+
function h(o) {
|
|
16
16
|
const {
|
|
17
|
-
hoverTitle:
|
|
18
|
-
copiedTitle:
|
|
17
|
+
hoverTitle: B,
|
|
18
|
+
copiedTitle: T,
|
|
19
19
|
textToCopy: j,
|
|
20
20
|
fixedOn: n,
|
|
21
|
-
onClick: t =
|
|
21
|
+
onClick: t = u,
|
|
22
22
|
...l
|
|
23
23
|
} = o, {
|
|
24
24
|
copied: p,
|
|
25
25
|
handleClick: i,
|
|
26
26
|
title: m
|
|
27
|
-
} =
|
|
28
|
-
t(
|
|
29
|
-
}, [i, t]),
|
|
27
|
+
} = b(o), d = c.useCallback((s) => {
|
|
28
|
+
t(s), i();
|
|
29
|
+
}, [i, t]), a = f(e.root, { [e.copied]: p });
|
|
30
30
|
return /* @__PURE__ */ r(
|
|
31
|
-
|
|
31
|
+
_,
|
|
32
32
|
{
|
|
33
33
|
title: m,
|
|
34
34
|
fixedOn: n,
|
|
35
|
-
rootClassName:
|
|
35
|
+
rootClassName: a,
|
|
36
36
|
children: /* @__PURE__ */ r(C, { ...l, onClick: d })
|
|
37
37
|
}
|
|
38
38
|
);
|
|
39
39
|
}
|
|
40
|
-
const z = c.memo(
|
|
40
|
+
const z = c.memo(h);
|
|
41
41
|
export {
|
|
42
42
|
z as default
|
|
43
43
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import c from "react";
|
|
3
|
-
import { clsx as
|
|
4
|
-
const e = "
|
|
3
|
+
import { clsx as m } from "../../utils/clsx.js";
|
|
4
|
+
const e = "cfxui__ControlBox__root__6a08c", x = "cfxui__ControlBox__small__8beb2", f = "cfxui__ControlBox__normal__e3aa5", i = "cfxui__ControlBox__large__1039d", o = {
|
|
5
5
|
root: e,
|
|
6
|
-
small:
|
|
7
|
-
normal:
|
|
6
|
+
small: x,
|
|
7
|
+
normal: f,
|
|
8
8
|
large: i
|
|
9
|
-
},
|
|
9
|
+
}, p = c.forwardRef(function(r, t) {
|
|
10
10
|
const {
|
|
11
|
-
size:
|
|
11
|
+
size: _ = "normal",
|
|
12
12
|
className: l,
|
|
13
|
-
children:
|
|
14
|
-
} = r, n =
|
|
15
|
-
return /* @__PURE__ */
|
|
13
|
+
children: a
|
|
14
|
+
} = r, n = m(o.root, l, o[_]);
|
|
15
|
+
return /* @__PURE__ */ s("div", { ref: t, className: n, children: a });
|
|
16
16
|
});
|
|
17
17
|
export {
|
|
18
|
-
|
|
18
|
+
p as ControlBox
|
|
19
19
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { Title as
|
|
2
|
+
import l from "react";
|
|
3
|
+
import { Title as f } from "../Title/Title.js";
|
|
4
4
|
import { clsx as i } from "../../utils/clsx.js";
|
|
5
|
-
const m = "
|
|
5
|
+
const m = "cfxui__CountryFlag__root__95489", u = {
|
|
6
6
|
root: m
|
|
7
|
-
},
|
|
7
|
+
}, y = l.forwardRef(function(r, e) {
|
|
8
8
|
const {
|
|
9
9
|
country: o,
|
|
10
10
|
className: s,
|
|
11
|
-
title:
|
|
12
|
-
forceShow:
|
|
11
|
+
title: a,
|
|
12
|
+
forceShow: n = !1
|
|
13
13
|
} = r;
|
|
14
|
-
if (!
|
|
14
|
+
if (!n && (o === "001" || o === "AQ" || o === "aq"))
|
|
15
15
|
return null;
|
|
16
16
|
const c = i(u.root, s, `fi-${o.toLowerCase()}`);
|
|
17
|
-
return /* @__PURE__ */ t(
|
|
17
|
+
return /* @__PURE__ */ t(f, { title: a, children: /* @__PURE__ */ t("div", { ref: e, className: c }) });
|
|
18
18
|
});
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
y as CountryFlag
|
|
21
21
|
};
|