@cfx-dev/ui-components 4.2.24 → 4.3.0
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/Combination-CSgOhzm-.js +2198 -0
- package/dist/Combination-N-vN9BB-.js +823 -0
- package/dist/Table.module-DHI1mXN2.js +17 -0
- package/dist/assets/all_css.css +1 -0
- package/dist/assets/css/Checkbox.css +1 -1
- package/dist/assets/css/DataTable.css +1 -0
- package/dist/assets/css/Table.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/cfxIcons-B9nzO6TW.js +98 -0
- package/dist/components/Accordion/Accordion.js +25 -26
- package/dist/components/Accordion/AccordionShowcase.js +1 -1
- package/dist/components/Avatar/Avatar.d.ts +2 -1
- package/dist/components/Avatar/Avatar.js +21 -20
- package/dist/components/Avatar/AvatarShowcase.js +1 -1
- package/dist/components/Badge/Badge.d.ts +2 -1
- package/dist/components/Badge/Badge.js +29 -29
- package/dist/components/Badge/BadgeShowcase.js +1 -1
- package/dist/components/BurgerMenu/BurgerMenu.js +2 -2
- package/dist/components/BurgerMenu/BurgerMenuButton.js +1 -1
- package/dist/components/BurgerMenu/BurgerMenuShowcase.js +1 -1
- package/dist/components/Button/Button.d.ts +5 -2
- package/dist/components/Button/Button.js +83 -81
- package/dist/components/Button/ButtonShowcase.js +2 -2
- package/dist/components/Button/LinkButton.d.ts +1 -1
- package/dist/components/Button/LinkButton.js +18 -17
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/index.js +7 -7
- package/dist/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.js +154 -242
- package/dist/components/ClipboardButton/ClipboardButton.js +7 -7
- package/dist/components/ControlBox/ControlBox.d.ts +3 -2
- package/dist/components/ControlBox/ControlBox.js +13 -10
- package/dist/components/CountryFlag/CountryFlag.d.ts +3 -2
- package/dist/components/CountryFlag/CountryFlag.js +14 -11
- package/dist/components/DataTable/DataTable.d.ts +40 -0
- package/dist/components/DataTable/DataTable.js +163 -0
- package/dist/components/DataTable/DataTableShowcase.d.ts +5 -0
- package/dist/components/DataTable/DataTableShowcase.js +60 -0
- package/dist/components/DataTable/index.d.ts +2 -0
- package/dist/components/DataTable/index.js +6 -0
- package/dist/components/Decorate/Decorate.d.ts +3 -2
- package/dist/components/Decorate/Decorate.js +19 -15
- package/dist/components/Dot/Dot.d.ts +2 -1
- package/dist/components/Dot/Dot.js +15 -13
- package/dist/components/DropdownSelect/DropdownSelect.d.ts +2 -1
- package/dist/components/DropdownSelect/DropdownSelect.js +665 -1836
- package/dist/components/DropdownSelect/DropdownSelectShowcase.js +1 -1
- package/dist/components/Flyout/Flyout.d.ts +2 -1
- package/dist/components/Flyout/Flyout.js +22 -20
- package/dist/components/Icon/Icon.d.ts +2 -1
- package/dist/components/Icon/Icon.js +19 -17
- package/dist/components/IconBig/IconBig.d.ts +2 -1
- package/dist/components/IconBig/IconBig.js +16 -14
- package/dist/components/Icons/IconsShowcase.js +1 -1
- package/dist/components/Icons/cfx-icons/Radio.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/Radio.js +36 -0
- package/dist/components/Icons/cfx-icons/Square.js +15 -9
- package/dist/components/Icons/cfxIcons.d.ts +1 -0
- package/dist/components/Icons/cfxIcons.js +62 -60
- package/dist/components/Icons/index.js +1 -1
- package/dist/components/Indicator/Indicator.js +9 -10
- package/dist/components/InfoPanel/InfoPanelShowcase.js +1 -1
- package/dist/components/Input/Input.d.ts +4 -1
- package/dist/components/Input/Input.js +101 -88
- package/dist/components/Input/InputShowcase.js +1 -1
- package/dist/components/Input/RichInput.d.ts +2 -1
- package/dist/components/Input/RichInput.js +37 -34
- package/dist/components/InputDropzone/InputDropzone.d.ts +1 -1
- package/dist/components/InputDropzone/InputDropzone.js +1723 -625
- package/dist/components/Interactive/Interactive.d.ts +2 -1
- package/dist/components/Interactive/Interactive.js +14 -12
- package/dist/components/Island/Island.d.ts +2 -1
- package/dist/components/Island/Island.js +24 -24
- package/dist/components/Layout/Box/Box.d.ts +8 -2
- package/dist/components/Layout/Box/Box.js +53 -51
- package/dist/components/Layout/Box/Box.types.d.ts +22 -0
- package/dist/components/Layout/Box/Box.types.js +4 -0
- package/dist/components/Layout/Box/index.d.ts +1 -1
- package/dist/components/Layout/Box/index.js +3 -3
- package/dist/components/Layout/Center/Center.d.ts +2 -1
- package/dist/components/Layout/Center/Center.js +19 -18
- package/dist/components/Layout/Flex/Flex.d.ts +6 -10
- package/dist/components/Layout/Flex/Flex.js +53 -64
- package/dist/components/Layout/Flex/FlexRestricter.d.ts +2 -1
- package/dist/components/Layout/Flex/FlexRestricter.js +13 -12
- package/dist/components/Layout/Flex/FlexShowcase.js +1 -1
- package/dist/components/Layout/Flex/index.d.ts +2 -2
- package/dist/components/Layout/Flex/index.js +8 -8
- package/dist/components/Layout/Page/Page.js +11 -12
- package/dist/components/Layout/Scrollable/Rail.d.ts +1 -1
- package/dist/components/Layout/Scrollable/Scrollable.d.ts +2 -1
- package/dist/components/Layout/Scrollable/Scrollable.js +40 -38
- package/dist/components/Layout/Scrollable/ScrollableShowcase.js +1 -1
- package/dist/components/Layout/Scrollable/VirtualScrollable.js +98 -98
- package/dist/components/Link/LinkShowcase.js +1 -1
- package/dist/components/Loaf/Loaf.d.ts +2 -1
- package/dist/components/Loaf/Loaf.js +17 -16
- package/dist/components/Logos/LogosShowcase.js +1 -1
- package/dist/components/Modal/Modal.js +16 -17
- package/dist/components/Modal/ModalShowcase.js +14 -11
- package/dist/components/NavList/NavList.d.ts +2 -1
- package/dist/components/NavList/NavList.js +19 -18
- package/dist/components/OnScreenSensor.js +1 -1
- package/dist/components/Overlay/Overlay.d.ts +4 -2
- package/dist/components/Overlay/Overlay.js +31 -23
- package/dist/components/Popover/Popover.d.ts +3 -2
- package/dist/components/Popover/Popover.js +31 -30
- package/dist/components/Popover/PopoverShowcase.js +4 -4
- package/dist/components/PremiumBadge/PremiumBadge.d.ts +2 -1
- package/dist/components/PremiumBadge/PremiumBadge.js +12 -11
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.js +666 -1617
- package/dist/components/Select/SelectShowcase.js +1 -1
- package/dist/components/Shroud/Shroud.d.ts +2 -1
- package/dist/components/Shroud/Shroud.js +16 -14
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +26 -27
- package/dist/components/Skeleton/SkeletonShowcase.js +4 -4
- package/dist/components/Slider/Slider.d.ts +2 -1
- package/dist/components/Slider/Slider.js +326 -377
- package/dist/components/Slider/SliderShowcase.js +1 -1
- package/dist/components/Switch/Switch.js +109 -155
- package/dist/components/Table/TableBody.d.ts +8 -0
- package/dist/components/Table/TableBody.js +14 -0
- package/dist/components/Table/TableCell.d.ts +11 -0
- package/dist/components/Table/TableCell.js +54 -0
- package/dist/components/Table/TableCellCheckbox.d.ts +11 -0
- package/dist/components/Table/TableCellCheckbox.js +20 -0
- package/dist/components/Table/TableHeader.d.ts +9 -0
- package/dist/components/Table/TableHeader.js +24 -0
- package/dist/components/Table/TableIconButton.d.ts +6 -0
- package/dist/components/Table/TableIconButton.js +16 -0
- package/dist/components/Table/TableRoot.d.ts +8 -0
- package/dist/components/Table/TableRoot.js +23 -0
- package/dist/components/Table/TableRow.d.ts +13 -0
- package/dist/components/Table/TableRow.js +46 -0
- package/dist/components/Table/TableShowcase.js +56 -57
- package/dist/components/Table/index.d.ts +20 -2
- package/dist/components/Table/index.js +17 -5
- package/dist/components/Tabular/TabularShowcase.js +1 -1
- package/dist/components/Text/Text.d.ts +6 -3
- package/dist/components/Text/Text.js +67 -63
- package/dist/components/Text/TextShowcase.js +40 -33
- package/dist/components/Title/Title.d.ts +3 -1
- package/dist/components/Title/TitleShowcase.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroupShowcase.js +1 -1
- package/dist/index-BHuChyf5.js +238 -0
- package/dist/index-Cl_RnsqN.js +386 -0
- package/dist/index-DZEAOJqB.js +53 -0
- package/dist/index-HDl8nGsm.js +70 -0
- package/dist/main.d.ts +6 -4
- package/dist/main.js +66 -65
- package/dist/{medium-BA3EQDZW.js → medium-Bq5NvyU7.js} +1 -1
- package/dist/styles-scss/global.scss +1 -0
- package/dist/tslib.es6-CtHwNPxX.js +72 -0
- package/dist/utils/hooks/useClipboardComponent.d.ts +1 -1
- package/dist/utils/hooks/useOutlet.js +1 -1
- package/dist/utils/hooks/usePopoverController.d.ts +1 -1
- package/dist/utils/links.js +1 -1
- package/dist/utils/mergeRefs.d.ts +1 -1
- package/dist/utils/mergeRefs.js +1 -1
- package/dist/utils/ui/ui.d.ts +1 -0
- package/dist/utils/ui/ui.js +45 -36
- package/dist/utils/ui/ui.types.d.ts +4 -0
- package/package.json +6 -5
- package/dist/Combination-Cbiw1XRb.js +0 -792
- package/dist/cfxIcons-BNd1WgpX.js +0 -96
- package/dist/components/Table/Table.d.ts +0 -42
- package/dist/components/Table/Table.js +0 -170
- package/dist/index-2hJuj4UN.js +0 -19069
- package/dist/index-AweK2ufS.js +0 -171
- package/dist/index-BlbvKsmN.js +0 -82
- package/dist/index-ByaXH_ih.js +0 -10
- package/dist/index-Bz27DCHt.js +0 -1342
- package/dist/index-Cf5Yu9oD.js +0 -67
- package/dist/tslib.es6-CBKHJX9H.js +0 -151
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs as z, jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import * as c from "react";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { u as
|
|
6
|
-
import {
|
|
7
|
-
import { P as E } from "../../index-BlbvKsmN.js";
|
|
3
|
+
import A from "react";
|
|
4
|
+
import { u as w, d as L, c as O, P as E, e as S, f as j } from "../../index-BHuChyf5.js";
|
|
5
|
+
import { u as H } from "../../index-BZPx6jYI.js";
|
|
6
|
+
import { P as K } from "../../index-HDl8nGsm.js";
|
|
8
7
|
import "../Icons/cfx-icons/Close.js";
|
|
9
8
|
import "../Icons/cfx-icons/Controller.js";
|
|
10
9
|
import "../Icons/cfx-icons/Copy.js";
|
|
@@ -26,15 +25,16 @@ import "../Icons/cfx-icons/MoreInfo.js";
|
|
|
26
25
|
import "../Icons/cfx-icons/Pencil.js";
|
|
27
26
|
import "../Icons/cfx-icons/Play.js";
|
|
28
27
|
import "../Icons/cfx-icons/Plus.js";
|
|
28
|
+
import g from "../Icons/cfx-icons/Radio.js";
|
|
29
29
|
import "../Icons/cfx-icons/Refresh.js";
|
|
30
30
|
import "../Icons/cfx-icons/RightArrow.js";
|
|
31
31
|
import "../Icons/cfx-icons/RightChevron.js";
|
|
32
32
|
import "../Icons/cfx-icons/Search.js";
|
|
33
33
|
import "../Icons/cfx-icons/Sort.js";
|
|
34
|
-
import "../Icons/cfx-icons/Square.js";
|
|
34
|
+
import $ from "../Icons/cfx-icons/Square.js";
|
|
35
35
|
import "../Icons/cfx-icons/SquareCheck.js";
|
|
36
36
|
import "../Icons/cfx-icons/Stop.js";
|
|
37
|
-
import
|
|
37
|
+
import X from "../Icons/cfx-icons/Tick.js";
|
|
38
38
|
import "../Icons/cfx-icons/Transfer.js";
|
|
39
39
|
import "../Icons/cfx-icons/Trash.js";
|
|
40
40
|
import "../Icons/cfx-icons/Undo.js";
|
|
@@ -55,279 +55,191 @@ import "../Icons/cfx-icons-big/Subscriptions.js";
|
|
|
55
55
|
import "../Icons/cfx-icons-big/Upload.js";
|
|
56
56
|
import "../Icons/cfx-icons-big/Warning.js";
|
|
57
57
|
import "../Icons/cfx-icons-big/Confirm.js";
|
|
58
|
-
import { clsx as
|
|
59
|
-
import { getColor as
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
function X(...e) {
|
|
64
|
-
return (t) => e.forEach((o) => q(o, t));
|
|
65
|
-
}
|
|
66
|
-
function F(...e) {
|
|
67
|
-
return c.useCallback(X(...e), e);
|
|
68
|
-
}
|
|
69
|
-
function G(e, t = []) {
|
|
70
|
-
let o = [];
|
|
71
|
-
function n(u, p) {
|
|
72
|
-
const m = c.createContext(p), s = o.length;
|
|
73
|
-
o = [...o, p];
|
|
74
|
-
function i(a) {
|
|
75
|
-
const { scope: f, children: h, ...C } = a, N = (f == null ? void 0 : f[e][s]) || m, x = c.useMemo(() => C, Object.values(C));
|
|
76
|
-
return /* @__PURE__ */ _(N.Provider, { value: x, children: h });
|
|
77
|
-
}
|
|
78
|
-
function d(a, f) {
|
|
79
|
-
const h = (f == null ? void 0 : f[e][s]) || m, C = c.useContext(h);
|
|
80
|
-
if (C) return C;
|
|
81
|
-
if (p !== void 0) return p;
|
|
82
|
-
throw new Error(`\`${a}\` must be used within \`${u}\``);
|
|
83
|
-
}
|
|
84
|
-
return i.displayName = u + "Provider", [i, d];
|
|
85
|
-
}
|
|
86
|
-
const r = () => {
|
|
87
|
-
const u = o.map((p) => c.createContext(p));
|
|
88
|
-
return function(m) {
|
|
89
|
-
const s = (m == null ? void 0 : m[e]) || u;
|
|
90
|
-
return c.useMemo(
|
|
91
|
-
() => ({ [`__scope${e}`]: { ...m, [e]: s } }),
|
|
92
|
-
[m, s]
|
|
93
|
-
);
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
return r.scopeName = e, [n, J(r, ...t)];
|
|
97
|
-
}
|
|
98
|
-
function J(...e) {
|
|
99
|
-
const t = e[0];
|
|
100
|
-
if (e.length === 1) return t;
|
|
101
|
-
const o = () => {
|
|
102
|
-
const n = e.map((r) => ({
|
|
103
|
-
useScope: r(),
|
|
104
|
-
scopeName: r.scopeName
|
|
105
|
-
}));
|
|
106
|
-
return function(u) {
|
|
107
|
-
const p = n.reduce((m, { useScope: s, scopeName: i }) => {
|
|
108
|
-
const a = s(u)[`__scope${i}`];
|
|
109
|
-
return { ...m, ...a };
|
|
110
|
-
}, {});
|
|
111
|
-
return c.useMemo(() => ({ [`__scope${t.scopeName}`]: p }), [p]);
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
return o.scopeName = t.scopeName, o;
|
|
115
|
-
}
|
|
116
|
-
function A(e, t, { checkForDefaultPrevented: o = !0 } = {}) {
|
|
117
|
-
return function(r) {
|
|
118
|
-
if (e == null || e(r), o === !1 || !r.defaultPrevented)
|
|
119
|
-
return t == null ? void 0 : t(r);
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
function Q(e, t) {
|
|
123
|
-
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
124
|
-
}
|
|
125
|
-
function V(...e) {
|
|
126
|
-
return (t) => e.forEach((o) => Q(o, t));
|
|
127
|
-
}
|
|
128
|
-
function Y(...e) {
|
|
129
|
-
return c.useCallback(V(...e), e);
|
|
130
|
-
}
|
|
131
|
-
function Z(e, t) {
|
|
132
|
-
return c.useReducer((o, n) => t[o][n] ?? o, e);
|
|
133
|
-
}
|
|
134
|
-
var O = (e) => {
|
|
135
|
-
const { present: t, children: o } = e, n = H(t), r = typeof o == "function" ? o({ present: n.isPresent }) : c.Children.only(o), u = Y(n.ref, ee(r));
|
|
136
|
-
return typeof o == "function" || n.isPresent ? c.cloneElement(r, { ref: u }) : null;
|
|
137
|
-
};
|
|
138
|
-
O.displayName = "Presence";
|
|
139
|
-
function H(e) {
|
|
140
|
-
const [t, o] = c.useState(), n = c.useRef({}), r = c.useRef(e), u = c.useRef("none"), p = e ? "mounted" : "unmounted", [m, s] = Z(p, {
|
|
141
|
-
mounted: {
|
|
142
|
-
UNMOUNT: "unmounted",
|
|
143
|
-
ANIMATION_OUT: "unmountSuspended"
|
|
144
|
-
},
|
|
145
|
-
unmountSuspended: {
|
|
146
|
-
MOUNT: "mounted",
|
|
147
|
-
ANIMATION_END: "unmounted"
|
|
148
|
-
},
|
|
149
|
-
unmounted: {
|
|
150
|
-
MOUNT: "mounted"
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
return c.useEffect(() => {
|
|
154
|
-
const i = v(n.current);
|
|
155
|
-
u.current = m === "mounted" ? i : "none";
|
|
156
|
-
}, [m]), y(() => {
|
|
157
|
-
const i = n.current, d = r.current;
|
|
158
|
-
if (d !== e) {
|
|
159
|
-
const f = u.current, h = v(i);
|
|
160
|
-
e ? s("MOUNT") : h === "none" || (i == null ? void 0 : i.display) === "none" ? s("UNMOUNT") : s(d && f !== h ? "ANIMATION_OUT" : "UNMOUNT"), r.current = e;
|
|
161
|
-
}
|
|
162
|
-
}, [e, s]), y(() => {
|
|
163
|
-
if (t) {
|
|
164
|
-
const i = (a) => {
|
|
165
|
-
const h = v(n.current).includes(a.animationName);
|
|
166
|
-
a.target === t && h && B.flushSync(() => s("ANIMATION_END"));
|
|
167
|
-
}, d = (a) => {
|
|
168
|
-
a.target === t && (u.current = v(n.current));
|
|
169
|
-
};
|
|
170
|
-
return t.addEventListener("animationstart", d), t.addEventListener("animationcancel", i), t.addEventListener("animationend", i), () => {
|
|
171
|
-
t.removeEventListener("animationstart", d), t.removeEventListener("animationcancel", i), t.removeEventListener("animationend", i);
|
|
172
|
-
};
|
|
173
|
-
} else
|
|
174
|
-
s("ANIMATION_END");
|
|
175
|
-
}, [t, s]), {
|
|
176
|
-
isPresent: ["mounted", "unmountSuspended"].includes(m),
|
|
177
|
-
ref: c.useCallback((i) => {
|
|
178
|
-
i && (n.current = getComputedStyle(i)), o(i);
|
|
179
|
-
}, [])
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
function v(e) {
|
|
183
|
-
return (e == null ? void 0 : e.animationName) || "none";
|
|
184
|
-
}
|
|
185
|
-
function ee(e) {
|
|
186
|
-
var n, r;
|
|
187
|
-
let t = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, o = t && "isReactWarning" in t && t.isReactWarning;
|
|
188
|
-
return o ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, o = t && "isReactWarning" in t && t.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
|
|
189
|
-
}
|
|
190
|
-
var S = "Checkbox", [te, ht] = G(S), [oe, ne] = te(S), M = c.forwardRef(
|
|
191
|
-
(e, t) => {
|
|
58
|
+
import { clsx as P } from "../../utils/clsx.js";
|
|
59
|
+
import { getColor as F } from "../../utils/color.js";
|
|
60
|
+
var y = "Checkbox", [G, lo] = O(y), [J, Q] = G(y), q = c.forwardRef(
|
|
61
|
+
(e, l) => {
|
|
192
62
|
const {
|
|
193
63
|
__scopeCheckbox: o,
|
|
194
64
|
name: n,
|
|
195
|
-
checked:
|
|
196
|
-
defaultChecked:
|
|
197
|
-
required:
|
|
198
|
-
disabled:
|
|
199
|
-
value:
|
|
200
|
-
onCheckedChange:
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
65
|
+
checked: u,
|
|
66
|
+
defaultChecked: r,
|
|
67
|
+
required: k,
|
|
68
|
+
disabled: s,
|
|
69
|
+
value: h = "on",
|
|
70
|
+
onCheckedChange: a,
|
|
71
|
+
form: f,
|
|
72
|
+
...x
|
|
73
|
+
} = e, [t, b] = c.useState(null), N = w(l, (i) => b(i)), _ = c.useRef(!1), I = t ? f || !!t.closest("form") : !0, [C, R] = L({
|
|
74
|
+
prop: u,
|
|
75
|
+
defaultProp: r ?? !1,
|
|
76
|
+
onChange: a,
|
|
77
|
+
caller: y
|
|
78
|
+
}), T = c.useRef(C);
|
|
207
79
|
return c.useEffect(() => {
|
|
208
|
-
const
|
|
209
|
-
if (
|
|
210
|
-
const
|
|
211
|
-
return
|
|
80
|
+
const i = t == null ? void 0 : t.form;
|
|
81
|
+
if (i) {
|
|
82
|
+
const v = () => R(T.current);
|
|
83
|
+
return i.addEventListener("reset", v), () => i.removeEventListener("reset", v);
|
|
212
84
|
}
|
|
213
|
-
}, [
|
|
214
|
-
/* @__PURE__ */
|
|
85
|
+
}, [t, R]), /* @__PURE__ */ z(J, { scope: o, state: C, disabled: s, children: [
|
|
86
|
+
/* @__PURE__ */ p(
|
|
215
87
|
E.button,
|
|
216
88
|
{
|
|
217
89
|
type: "button",
|
|
218
90
|
role: "checkbox",
|
|
219
|
-
"aria-checked":
|
|
220
|
-
"aria-required":
|
|
221
|
-
"data-state":
|
|
222
|
-
"data-disabled":
|
|
223
|
-
disabled:
|
|
224
|
-
value:
|
|
225
|
-
...
|
|
226
|
-
ref:
|
|
227
|
-
onKeyDown:
|
|
228
|
-
|
|
91
|
+
"aria-checked": d(C) ? "mixed" : C,
|
|
92
|
+
"aria-required": k,
|
|
93
|
+
"data-state": M(C),
|
|
94
|
+
"data-disabled": s ? "" : void 0,
|
|
95
|
+
disabled: s,
|
|
96
|
+
value: h,
|
|
97
|
+
...x,
|
|
98
|
+
ref: N,
|
|
99
|
+
onKeyDown: S(e.onKeyDown, (i) => {
|
|
100
|
+
i.key === "Enter" && i.preventDefault();
|
|
229
101
|
}),
|
|
230
|
-
onClick:
|
|
231
|
-
R((
|
|
102
|
+
onClick: S(e.onClick, (i) => {
|
|
103
|
+
R((v) => d(v) ? !0 : !v), I && (_.current = i.isPropagationStopped(), _.current || i.stopPropagation());
|
|
232
104
|
})
|
|
233
105
|
}
|
|
234
106
|
),
|
|
235
|
-
|
|
236
|
-
|
|
107
|
+
I && /* @__PURE__ */ p(
|
|
108
|
+
D,
|
|
237
109
|
{
|
|
238
|
-
control:
|
|
239
|
-
bubbles: !
|
|
110
|
+
control: t,
|
|
111
|
+
bubbles: !_.current,
|
|
240
112
|
name: n,
|
|
241
|
-
value:
|
|
242
|
-
checked:
|
|
243
|
-
required:
|
|
244
|
-
disabled:
|
|
245
|
-
|
|
113
|
+
value: h,
|
|
114
|
+
checked: C,
|
|
115
|
+
required: k,
|
|
116
|
+
disabled: s,
|
|
117
|
+
form: f,
|
|
118
|
+
style: { transform: "translateX(-100%)" },
|
|
119
|
+
defaultChecked: d(r) ? !1 : r
|
|
246
120
|
}
|
|
247
121
|
)
|
|
248
122
|
] });
|
|
249
123
|
}
|
|
250
124
|
);
|
|
251
|
-
|
|
252
|
-
var
|
|
253
|
-
(e,
|
|
254
|
-
const { __scopeCheckbox: o, forceMount: n, ...
|
|
255
|
-
return /* @__PURE__ */
|
|
125
|
+
q.displayName = y;
|
|
126
|
+
var B = "CheckboxIndicator", U = c.forwardRef(
|
|
127
|
+
(e, l) => {
|
|
128
|
+
const { __scopeCheckbox: o, forceMount: n, ...u } = e, r = Q(B, o);
|
|
129
|
+
return /* @__PURE__ */ p(K, { present: n || d(r.state) || r.state === !0, children: /* @__PURE__ */ p(
|
|
256
130
|
E.span,
|
|
257
131
|
{
|
|
258
|
-
"data-state":
|
|
259
|
-
"data-disabled":
|
|
260
|
-
...
|
|
261
|
-
ref:
|
|
132
|
+
"data-state": M(r.state),
|
|
133
|
+
"data-disabled": r.disabled ? "" : void 0,
|
|
134
|
+
...u,
|
|
135
|
+
ref: l,
|
|
262
136
|
style: { pointerEvents: "none", ...e.style }
|
|
263
137
|
}
|
|
264
138
|
) });
|
|
265
139
|
}
|
|
266
140
|
);
|
|
267
|
-
|
|
268
|
-
var
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
},
|
|
277
|
-
|
|
278
|
-
{
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
position: "absolute",
|
|
289
|
-
pointerEvents: "none",
|
|
290
|
-
opacity: 0,
|
|
291
|
-
margin: 0
|
|
141
|
+
U.displayName = B;
|
|
142
|
+
var V = "CheckboxBubbleInput", D = c.forwardRef(
|
|
143
|
+
({
|
|
144
|
+
__scopeCheckbox: e,
|
|
145
|
+
control: l,
|
|
146
|
+
checked: o,
|
|
147
|
+
bubbles: n = !0,
|
|
148
|
+
defaultChecked: u,
|
|
149
|
+
...r
|
|
150
|
+
}, k) => {
|
|
151
|
+
const s = c.useRef(null), h = w(s, k), a = H(o), f = j(l);
|
|
152
|
+
c.useEffect(() => {
|
|
153
|
+
const t = s.current;
|
|
154
|
+
if (!t) return;
|
|
155
|
+
const b = window.HTMLInputElement.prototype, _ = Object.getOwnPropertyDescriptor(
|
|
156
|
+
b,
|
|
157
|
+
"checked"
|
|
158
|
+
).set;
|
|
159
|
+
if (a !== o && _) {
|
|
160
|
+
const I = new Event("click", { bubbles: n });
|
|
161
|
+
t.indeterminate = d(o), _.call(t, d(o) ? !1 : o), t.dispatchEvent(I);
|
|
292
162
|
}
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
163
|
+
}, [a, o, n]);
|
|
164
|
+
const x = c.useRef(d(o) ? !1 : o);
|
|
165
|
+
return /* @__PURE__ */ p(
|
|
166
|
+
E.input,
|
|
167
|
+
{
|
|
168
|
+
type: "checkbox",
|
|
169
|
+
"aria-hidden": !0,
|
|
170
|
+
defaultChecked: u ?? x.current,
|
|
171
|
+
...r,
|
|
172
|
+
tabIndex: -1,
|
|
173
|
+
ref: h,
|
|
174
|
+
style: {
|
|
175
|
+
...r.style,
|
|
176
|
+
...f,
|
|
177
|
+
position: "absolute",
|
|
178
|
+
pointerEvents: "none",
|
|
179
|
+
opacity: 0,
|
|
180
|
+
margin: 0
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
);
|
|
186
|
+
D.displayName = V;
|
|
187
|
+
function d(e) {
|
|
297
188
|
return e === "indeterminate";
|
|
298
189
|
}
|
|
299
|
-
function
|
|
300
|
-
return
|
|
190
|
+
function M(e) {
|
|
191
|
+
return d(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
301
192
|
}
|
|
302
|
-
var
|
|
303
|
-
const
|
|
304
|
-
rootUnset:
|
|
305
|
-
root:
|
|
306
|
-
|
|
193
|
+
var W = q, Y = U;
|
|
194
|
+
const Z = "cfxui__Checkbox__rootUnset__cbb57", ee = "cfxui__Checkbox__root__865aa", oe = "cfxui__Checkbox__square__029aa", te = "cfxui__Checkbox__indicator__2afc0", re = "cfxui__Checkbox__checked__b4081", ie = "cfxui__Checkbox__radioIcon__719e7", ce = "cfxui__Checkbox__tickIcon__a7f19", m = {
|
|
195
|
+
rootUnset: Z,
|
|
196
|
+
root: ee,
|
|
197
|
+
square: oe,
|
|
198
|
+
indicator: te,
|
|
199
|
+
checked: re,
|
|
307
200
|
"size-small": "cfxui__Checkbox__size-small__02440",
|
|
201
|
+
radioIcon: ie,
|
|
202
|
+
tickIcon: ce,
|
|
308
203
|
"size-normal": "cfxui__Checkbox__size-normal__700f4",
|
|
309
204
|
"size-large": "cfxui__Checkbox__size-large__28529"
|
|
310
205
|
};
|
|
311
|
-
function
|
|
206
|
+
function ne(e) {
|
|
312
207
|
const {
|
|
313
|
-
id:
|
|
208
|
+
id: l,
|
|
314
209
|
size: o = "normal",
|
|
315
210
|
rootClassName: n,
|
|
316
|
-
indicatorClassName:
|
|
317
|
-
colorToken:
|
|
318
|
-
color:
|
|
319
|
-
opacity:
|
|
320
|
-
luminance:
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
211
|
+
indicatorClassName: u,
|
|
212
|
+
colorToken: r,
|
|
213
|
+
color: k,
|
|
214
|
+
opacity: s,
|
|
215
|
+
luminance: h,
|
|
216
|
+
iconIndicator: a = g,
|
|
217
|
+
...f
|
|
218
|
+
} = e, x = P(
|
|
219
|
+
m.root,
|
|
220
|
+
m.rootUnset,
|
|
221
|
+
m[`size-${o}`],
|
|
326
222
|
n
|
|
327
|
-
),
|
|
328
|
-
|
|
223
|
+
), t = F(e), b = P(
|
|
224
|
+
m.checked,
|
|
225
|
+
a === X && m.tickIcon,
|
|
226
|
+
a === g && m.radioIcon
|
|
227
|
+
);
|
|
228
|
+
return /* @__PURE__ */ z(
|
|
229
|
+
W,
|
|
230
|
+
{
|
|
231
|
+
...f,
|
|
232
|
+
id: l,
|
|
233
|
+
style: { color: t },
|
|
234
|
+
className: x,
|
|
235
|
+
children: [
|
|
236
|
+
/* @__PURE__ */ p($, { className: m.square }),
|
|
237
|
+
/* @__PURE__ */ p(Y, { className: P(m.indicator, u), children: /* @__PURE__ */ p(a, { className: b }) })
|
|
238
|
+
]
|
|
239
|
+
}
|
|
240
|
+
);
|
|
329
241
|
}
|
|
330
|
-
const
|
|
242
|
+
const uo = A.memo(ne);
|
|
331
243
|
export {
|
|
332
|
-
|
|
244
|
+
uo as default
|
|
333
245
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import c from "react";
|
|
3
|
-
import
|
|
3
|
+
import C from "../Button/Button.js";
|
|
4
4
|
import { clsx as _ } from "../../utils/clsx.js";
|
|
5
|
-
import "
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
5
|
+
import { noop as f } from "../../utils/functional.js";
|
|
6
|
+
import "../../utils/links.js";
|
|
7
|
+
import { Title as u } from "../Title/Title.js";
|
|
8
8
|
import "../../utils/hooks/useGlobalKeyboardEvent.js";
|
|
9
9
|
import "../../utils/hooks/useKeyboardClose.js";
|
|
10
|
-
import "../../index-
|
|
10
|
+
import "../../index-Cl_RnsqN.js";
|
|
11
11
|
import { useClipboardComponent as b } from "../../utils/hooks/useClipboardComponent.js";
|
|
12
12
|
const x = "cfxui__ClipboardButton__root__e8251", k = "cfxui__ClipboardButton__copied__6e0b9", e = {
|
|
13
13
|
root: x,
|
|
@@ -19,7 +19,7 @@ function h(o) {
|
|
|
19
19
|
copiedTitle: T,
|
|
20
20
|
textToCopy: j,
|
|
21
21
|
fixedOn: n,
|
|
22
|
-
onClick: t =
|
|
22
|
+
onClick: t = f,
|
|
23
23
|
...p
|
|
24
24
|
} = o, {
|
|
25
25
|
copied: l,
|
|
@@ -29,7 +29,7 @@ function h(o) {
|
|
|
29
29
|
t(s), i();
|
|
30
30
|
}, [i, t]), a = _(e.root, { [e.copied]: l });
|
|
31
31
|
return /* @__PURE__ */ r(
|
|
32
|
-
|
|
32
|
+
u,
|
|
33
33
|
{
|
|
34
34
|
title: m,
|
|
35
35
|
fixedOn: n,
|
|
@@ -5,7 +5,8 @@ export interface ControlBoxProps {
|
|
|
5
5
|
size?: ControlBoxSize;
|
|
6
6
|
className?: string;
|
|
7
7
|
children: React.ReactNode;
|
|
8
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
8
9
|
}
|
|
9
|
-
export declare
|
|
10
|
-
declare const _default: React.MemoExoticComponent<
|
|
10
|
+
export declare function ControlBox(props: ControlBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const _default: React.MemoExoticComponent<typeof ControlBox>;
|
|
11
12
|
export default _default;
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import c from "react";
|
|
3
3
|
import { clsx as m } from "../../utils/clsx.js";
|
|
4
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
6
|
small: x,
|
|
7
7
|
normal: f,
|
|
8
8
|
large: i
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
|
+
function u(r) {
|
|
10
11
|
const {
|
|
11
|
-
size:
|
|
12
|
-
className:
|
|
13
|
-
children:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
size: t = "normal",
|
|
13
|
+
className: l,
|
|
14
|
+
children: _,
|
|
15
|
+
ref: a
|
|
16
|
+
} = r, n = m(o.root, l, o[t]);
|
|
17
|
+
return /* @__PURE__ */ s("div", { ref: a, className: n, children: _ });
|
|
18
|
+
}
|
|
19
|
+
const p = c.memo(u);
|
|
17
20
|
export {
|
|
18
21
|
u as ControlBox,
|
|
19
|
-
|
|
22
|
+
p as default
|
|
20
23
|
};
|
|
@@ -5,7 +5,8 @@ export interface CountryFlagProps {
|
|
|
5
5
|
title: string;
|
|
6
6
|
className?: string;
|
|
7
7
|
forceShow?: boolean;
|
|
8
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
8
9
|
}
|
|
9
|
-
export declare
|
|
10
|
-
declare const _default: React.MemoExoticComponent<
|
|
10
|
+
export declare function CountryFlag(props: CountryFlagProps): import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
declare const _default: React.MemoExoticComponent<typeof CountryFlag>;
|
|
11
12
|
export default _default;
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import c from "react";
|
|
3
3
|
import { Title as f } from "../Title/Title.js";
|
|
4
4
|
import { clsx as m } from "../../utils/clsx.js";
|
|
5
5
|
const i = "cfxui__CountryFlag__root__95489", u = {
|
|
6
6
|
root: i
|
|
7
|
-
}
|
|
7
|
+
};
|
|
8
|
+
function _(r) {
|
|
8
9
|
const {
|
|
9
10
|
country: o,
|
|
10
|
-
className:
|
|
11
|
-
title:
|
|
12
|
-
forceShow:
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
className: e,
|
|
12
|
+
title: s,
|
|
13
|
+
forceShow: a = !1,
|
|
14
|
+
ref: l
|
|
15
|
+
} = r;
|
|
16
|
+
if (!a && (o === "001" || o === "AQ" || o === "aq"))
|
|
15
17
|
return null;
|
|
16
|
-
const
|
|
17
|
-
return /* @__PURE__ */ t(f, { title:
|
|
18
|
-
}
|
|
18
|
+
const n = m(u.root, e, `fi-${o.toLowerCase()}`);
|
|
19
|
+
return /* @__PURE__ */ t(f, { title: s, children: /* @__PURE__ */ t("div", { ref: l, className: n }) });
|
|
20
|
+
}
|
|
21
|
+
const y = c.memo(_);
|
|
19
22
|
export {
|
|
20
23
|
_ as CountryFlag,
|
|
21
|
-
|
|
24
|
+
y as default
|
|
22
25
|
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface DataTableHeaderType {
|
|
4
|
+
text: string;
|
|
5
|
+
sortable?: boolean;
|
|
6
|
+
sortKey?: string;
|
|
7
|
+
}
|
|
8
|
+
export type DataTableRowType = Array<string | number | Date | React.ReactNode>;
|
|
9
|
+
export type DataTableContainerType = React.FC<{
|
|
10
|
+
item: string | number | Date | React.ReactNode;
|
|
11
|
+
}>;
|
|
12
|
+
export interface DataTableHeaderItemProps {
|
|
13
|
+
item: DataTableHeaderType;
|
|
14
|
+
onSortClick?: (sortKey: string) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function DataTableHeaderItem(props: DataTableHeaderItemProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export interface DataTableRowProps {
|
|
18
|
+
index: number;
|
|
19
|
+
item: DataTableRowType;
|
|
20
|
+
onSelectChange: (rowIndex: number | null) => void;
|
|
21
|
+
includeRadio?: boolean;
|
|
22
|
+
loading?: boolean;
|
|
23
|
+
selectedRow?: number | null;
|
|
24
|
+
dataContainer?: DataTableContainerType;
|
|
25
|
+
}
|
|
26
|
+
export declare function DataTableRow(props: DataTableRowProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export interface DataTableProps {
|
|
28
|
+
headers: DataTableHeaderType[];
|
|
29
|
+
data: DataTableRowType[];
|
|
30
|
+
includeRadio?: boolean;
|
|
31
|
+
loading?: boolean;
|
|
32
|
+
onSelectChange?: (rowIndex: number | null) => void;
|
|
33
|
+
dataContainer?: DataTableContainerType;
|
|
34
|
+
selectedRow?: number | null;
|
|
35
|
+
sortBy?: string;
|
|
36
|
+
sortOrder?: 'asc' | 'desc';
|
|
37
|
+
onSortChange?: (sortBy: string, sortOrder: 'asc' | 'desc') => void;
|
|
38
|
+
className?: string;
|
|
39
|
+
}
|
|
40
|
+
export declare function DataTable({ headers, data, includeRadio, loading, onSelectChange, dataContainer, selectedRow: outerSelectedRow, sortBy: outerSortBy, sortOrder: outerSortOrder, onSortChange, className, }: DataTableProps): import("react/jsx-runtime").JSX.Element;
|