@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.
Files changed (176) hide show
  1. package/dist/Combination-CSgOhzm-.js +2198 -0
  2. package/dist/Combination-N-vN9BB-.js +823 -0
  3. package/dist/Table.module-DHI1mXN2.js +17 -0
  4. package/dist/assets/all_css.css +1 -0
  5. package/dist/assets/css/Checkbox.css +1 -1
  6. package/dist/assets/css/DataTable.css +1 -0
  7. package/dist/assets/css/Table.css +1 -1
  8. package/dist/assets/general/global.css +1 -1
  9. package/dist/cfxIcons-B9nzO6TW.js +98 -0
  10. package/dist/components/Accordion/Accordion.js +25 -26
  11. package/dist/components/Accordion/AccordionShowcase.js +1 -1
  12. package/dist/components/Avatar/Avatar.d.ts +2 -1
  13. package/dist/components/Avatar/Avatar.js +21 -20
  14. package/dist/components/Avatar/AvatarShowcase.js +1 -1
  15. package/dist/components/Badge/Badge.d.ts +2 -1
  16. package/dist/components/Badge/Badge.js +29 -29
  17. package/dist/components/Badge/BadgeShowcase.js +1 -1
  18. package/dist/components/BurgerMenu/BurgerMenu.js +2 -2
  19. package/dist/components/BurgerMenu/BurgerMenuButton.js +1 -1
  20. package/dist/components/BurgerMenu/BurgerMenuShowcase.js +1 -1
  21. package/dist/components/Button/Button.d.ts +5 -2
  22. package/dist/components/Button/Button.js +83 -81
  23. package/dist/components/Button/ButtonShowcase.js +2 -2
  24. package/dist/components/Button/LinkButton.d.ts +1 -1
  25. package/dist/components/Button/LinkButton.js +18 -17
  26. package/dist/components/Button/index.d.ts +1 -1
  27. package/dist/components/Button/index.js +7 -7
  28. package/dist/components/Checkbox/Checkbox.d.ts +1 -0
  29. package/dist/components/Checkbox/Checkbox.js +154 -242
  30. package/dist/components/ClipboardButton/ClipboardButton.js +7 -7
  31. package/dist/components/ControlBox/ControlBox.d.ts +3 -2
  32. package/dist/components/ControlBox/ControlBox.js +13 -10
  33. package/dist/components/CountryFlag/CountryFlag.d.ts +3 -2
  34. package/dist/components/CountryFlag/CountryFlag.js +14 -11
  35. package/dist/components/DataTable/DataTable.d.ts +40 -0
  36. package/dist/components/DataTable/DataTable.js +163 -0
  37. package/dist/components/DataTable/DataTableShowcase.d.ts +5 -0
  38. package/dist/components/DataTable/DataTableShowcase.js +60 -0
  39. package/dist/components/DataTable/index.d.ts +2 -0
  40. package/dist/components/DataTable/index.js +6 -0
  41. package/dist/components/Decorate/Decorate.d.ts +3 -2
  42. package/dist/components/Decorate/Decorate.js +19 -15
  43. package/dist/components/Dot/Dot.d.ts +2 -1
  44. package/dist/components/Dot/Dot.js +15 -13
  45. package/dist/components/DropdownSelect/DropdownSelect.d.ts +2 -1
  46. package/dist/components/DropdownSelect/DropdownSelect.js +665 -1836
  47. package/dist/components/DropdownSelect/DropdownSelectShowcase.js +1 -1
  48. package/dist/components/Flyout/Flyout.d.ts +2 -1
  49. package/dist/components/Flyout/Flyout.js +22 -20
  50. package/dist/components/Icon/Icon.d.ts +2 -1
  51. package/dist/components/Icon/Icon.js +19 -17
  52. package/dist/components/IconBig/IconBig.d.ts +2 -1
  53. package/dist/components/IconBig/IconBig.js +16 -14
  54. package/dist/components/Icons/IconsShowcase.js +1 -1
  55. package/dist/components/Icons/cfx-icons/Radio.d.ts +5 -0
  56. package/dist/components/Icons/cfx-icons/Radio.js +36 -0
  57. package/dist/components/Icons/cfx-icons/Square.js +15 -9
  58. package/dist/components/Icons/cfxIcons.d.ts +1 -0
  59. package/dist/components/Icons/cfxIcons.js +62 -60
  60. package/dist/components/Icons/index.js +1 -1
  61. package/dist/components/Indicator/Indicator.js +9 -10
  62. package/dist/components/InfoPanel/InfoPanelShowcase.js +1 -1
  63. package/dist/components/Input/Input.d.ts +4 -1
  64. package/dist/components/Input/Input.js +101 -88
  65. package/dist/components/Input/InputShowcase.js +1 -1
  66. package/dist/components/Input/RichInput.d.ts +2 -1
  67. package/dist/components/Input/RichInput.js +37 -34
  68. package/dist/components/InputDropzone/InputDropzone.d.ts +1 -1
  69. package/dist/components/InputDropzone/InputDropzone.js +1723 -625
  70. package/dist/components/Interactive/Interactive.d.ts +2 -1
  71. package/dist/components/Interactive/Interactive.js +14 -12
  72. package/dist/components/Island/Island.d.ts +2 -1
  73. package/dist/components/Island/Island.js +24 -24
  74. package/dist/components/Layout/Box/Box.d.ts +8 -2
  75. package/dist/components/Layout/Box/Box.js +53 -51
  76. package/dist/components/Layout/Box/Box.types.d.ts +22 -0
  77. package/dist/components/Layout/Box/Box.types.js +4 -0
  78. package/dist/components/Layout/Box/index.d.ts +1 -1
  79. package/dist/components/Layout/Box/index.js +3 -3
  80. package/dist/components/Layout/Center/Center.d.ts +2 -1
  81. package/dist/components/Layout/Center/Center.js +19 -18
  82. package/dist/components/Layout/Flex/Flex.d.ts +6 -10
  83. package/dist/components/Layout/Flex/Flex.js +53 -64
  84. package/dist/components/Layout/Flex/FlexRestricter.d.ts +2 -1
  85. package/dist/components/Layout/Flex/FlexRestricter.js +13 -12
  86. package/dist/components/Layout/Flex/FlexShowcase.js +1 -1
  87. package/dist/components/Layout/Flex/index.d.ts +2 -2
  88. package/dist/components/Layout/Flex/index.js +8 -8
  89. package/dist/components/Layout/Page/Page.js +11 -12
  90. package/dist/components/Layout/Scrollable/Rail.d.ts +1 -1
  91. package/dist/components/Layout/Scrollable/Scrollable.d.ts +2 -1
  92. package/dist/components/Layout/Scrollable/Scrollable.js +40 -38
  93. package/dist/components/Layout/Scrollable/ScrollableShowcase.js +1 -1
  94. package/dist/components/Layout/Scrollable/VirtualScrollable.js +98 -98
  95. package/dist/components/Link/LinkShowcase.js +1 -1
  96. package/dist/components/Loaf/Loaf.d.ts +2 -1
  97. package/dist/components/Loaf/Loaf.js +17 -16
  98. package/dist/components/Logos/LogosShowcase.js +1 -1
  99. package/dist/components/Modal/Modal.js +16 -17
  100. package/dist/components/Modal/ModalShowcase.js +14 -11
  101. package/dist/components/NavList/NavList.d.ts +2 -1
  102. package/dist/components/NavList/NavList.js +19 -18
  103. package/dist/components/OnScreenSensor.js +1 -1
  104. package/dist/components/Overlay/Overlay.d.ts +4 -2
  105. package/dist/components/Overlay/Overlay.js +31 -23
  106. package/dist/components/Popover/Popover.d.ts +3 -2
  107. package/dist/components/Popover/Popover.js +31 -30
  108. package/dist/components/Popover/PopoverShowcase.js +4 -4
  109. package/dist/components/PremiumBadge/PremiumBadge.d.ts +2 -1
  110. package/dist/components/PremiumBadge/PremiumBadge.js +12 -11
  111. package/dist/components/Select/Select.d.ts +1 -1
  112. package/dist/components/Select/Select.js +666 -1617
  113. package/dist/components/Select/SelectShowcase.js +1 -1
  114. package/dist/components/Shroud/Shroud.d.ts +2 -1
  115. package/dist/components/Shroud/Shroud.js +16 -14
  116. package/dist/components/Skeleton/Skeleton.d.ts +1 -1
  117. package/dist/components/Skeleton/Skeleton.js +26 -27
  118. package/dist/components/Skeleton/SkeletonShowcase.js +4 -4
  119. package/dist/components/Slider/Slider.d.ts +2 -1
  120. package/dist/components/Slider/Slider.js +326 -377
  121. package/dist/components/Slider/SliderShowcase.js +1 -1
  122. package/dist/components/Switch/Switch.js +109 -155
  123. package/dist/components/Table/TableBody.d.ts +8 -0
  124. package/dist/components/Table/TableBody.js +14 -0
  125. package/dist/components/Table/TableCell.d.ts +11 -0
  126. package/dist/components/Table/TableCell.js +54 -0
  127. package/dist/components/Table/TableCellCheckbox.d.ts +11 -0
  128. package/dist/components/Table/TableCellCheckbox.js +20 -0
  129. package/dist/components/Table/TableHeader.d.ts +9 -0
  130. package/dist/components/Table/TableHeader.js +24 -0
  131. package/dist/components/Table/TableIconButton.d.ts +6 -0
  132. package/dist/components/Table/TableIconButton.js +16 -0
  133. package/dist/components/Table/TableRoot.d.ts +8 -0
  134. package/dist/components/Table/TableRoot.js +23 -0
  135. package/dist/components/Table/TableRow.d.ts +13 -0
  136. package/dist/components/Table/TableRow.js +46 -0
  137. package/dist/components/Table/TableShowcase.js +56 -57
  138. package/dist/components/Table/index.d.ts +20 -2
  139. package/dist/components/Table/index.js +17 -5
  140. package/dist/components/Tabular/TabularShowcase.js +1 -1
  141. package/dist/components/Text/Text.d.ts +6 -3
  142. package/dist/components/Text/Text.js +67 -63
  143. package/dist/components/Text/TextShowcase.js +40 -33
  144. package/dist/components/Title/Title.d.ts +3 -1
  145. package/dist/components/Title/TitleShowcase.js +1 -1
  146. package/dist/components/ToggleGroup/ToggleGroupShowcase.js +1 -1
  147. package/dist/index-BHuChyf5.js +238 -0
  148. package/dist/index-Cl_RnsqN.js +386 -0
  149. package/dist/index-DZEAOJqB.js +53 -0
  150. package/dist/index-HDl8nGsm.js +70 -0
  151. package/dist/main.d.ts +6 -4
  152. package/dist/main.js +66 -65
  153. package/dist/{medium-BA3EQDZW.js → medium-Bq5NvyU7.js} +1 -1
  154. package/dist/styles-scss/global.scss +1 -0
  155. package/dist/tslib.es6-CtHwNPxX.js +72 -0
  156. package/dist/utils/hooks/useClipboardComponent.d.ts +1 -1
  157. package/dist/utils/hooks/useOutlet.js +1 -1
  158. package/dist/utils/hooks/usePopoverController.d.ts +1 -1
  159. package/dist/utils/links.js +1 -1
  160. package/dist/utils/mergeRefs.d.ts +1 -1
  161. package/dist/utils/mergeRefs.js +1 -1
  162. package/dist/utils/ui/ui.d.ts +1 -0
  163. package/dist/utils/ui/ui.js +45 -36
  164. package/dist/utils/ui/ui.types.d.ts +4 -0
  165. package/package.json +6 -5
  166. package/dist/Combination-Cbiw1XRb.js +0 -792
  167. package/dist/cfxIcons-BNd1WgpX.js +0 -96
  168. package/dist/components/Table/Table.d.ts +0 -42
  169. package/dist/components/Table/Table.js +0 -170
  170. package/dist/index-2hJuj4UN.js +0 -19069
  171. package/dist/index-AweK2ufS.js +0 -171
  172. package/dist/index-BlbvKsmN.js +0 -82
  173. package/dist/index-ByaXH_ih.js +0 -10
  174. package/dist/index-Bz27DCHt.js +0 -1342
  175. package/dist/index-Cf5Yu9oD.js +0 -67
  176. package/dist/tslib.es6-CBKHJX9H.js +0 -151
@@ -1,10 +1,9 @@
1
- import { jsx as _, jsxs as D } from "react/jsx-runtime";
1
+ import { jsxs as z, jsx as p } from "react/jsx-runtime";
2
2
  import * as c from "react";
3
- import $ from "react";
4
- import { b as y, u as z, a as L } from "../../index-Cf5Yu9oD.js";
5
- import { u as j } from "../../index-BZPx6jYI.js";
6
- import { r as B } from "../../index-2hJuj4UN.js";
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 W from "../Icons/cfx-icons/Tick.js";
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 g } from "../../utils/clsx.js";
59
- import { getColor as K } from "../../utils/color.js";
60
- function q(e, t) {
61
- typeof e == "function" ? e(t) : e != null && (e.current = t);
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: r,
196
- defaultChecked: u,
197
- required: p,
198
- disabled: m,
199
- value: s = "on",
200
- onCheckedChange: i,
201
- ...d
202
- } = e, [a, f] = c.useState(null), h = F(t, (l) => f(l)), C = c.useRef(!1), N = a ? !!a.closest("form") : !0, [x = !1, R] = z({
203
- prop: r,
204
- defaultProp: u,
205
- onChange: i
206
- }), w = c.useRef(x);
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 l = a == null ? void 0 : a.form;
209
- if (l) {
210
- const k = () => R(w.current);
211
- return l.addEventListener("reset", k), () => l.removeEventListener("reset", k);
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
- }, [a, R]), /* @__PURE__ */ D(oe, { scope: o, state: x, disabled: m, children: [
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": b(x) ? "mixed" : x,
220
- "aria-required": p,
221
- "data-state": U(x),
222
- "data-disabled": m ? "" : void 0,
223
- disabled: m,
224
- value: s,
225
- ...d,
226
- ref: h,
227
- onKeyDown: A(e.onKeyDown, (l) => {
228
- l.key === "Enter" && l.preventDefault();
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: A(e.onClick, (l) => {
231
- R((k) => b(k) ? !0 : !k), N && (C.current = l.isPropagationStopped(), C.current || l.stopPropagation());
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
- N && /* @__PURE__ */ _(
236
- re,
107
+ I && /* @__PURE__ */ p(
108
+ D,
237
109
  {
238
- control: a,
239
- bubbles: !C.current,
110
+ control: t,
111
+ bubbles: !_.current,
240
112
  name: n,
241
- value: s,
242
- checked: x,
243
- required: p,
244
- disabled: m,
245
- style: { transform: "translateX(-100%)" }
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
- M.displayName = S;
252
- var I = "CheckboxIndicator", T = c.forwardRef(
253
- (e, t) => {
254
- const { __scopeCheckbox: o, forceMount: n, ...r } = e, u = ne(I, o);
255
- return /* @__PURE__ */ _(O, { present: n || b(u.state) || u.state === !0, children: /* @__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": U(u.state),
259
- "data-disabled": u.disabled ? "" : void 0,
260
- ...r,
261
- ref: t,
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
- T.displayName = I;
268
- var re = (e) => {
269
- const { control: t, checked: o, bubbles: n = !0, ...r } = e, u = c.useRef(null), p = j(o), m = L(t);
270
- return c.useEffect(() => {
271
- const s = u.current, i = window.HTMLInputElement.prototype, a = Object.getOwnPropertyDescriptor(i, "checked").set;
272
- if (p !== o && a) {
273
- const f = new Event("click", { bubbles: n });
274
- s.indeterminate = b(o), a.call(s, b(o) ? !1 : o), s.dispatchEvent(f);
275
- }
276
- }, [p, o, n]), /* @__PURE__ */ _(
277
- "input",
278
- {
279
- type: "checkbox",
280
- "aria-hidden": !0,
281
- defaultChecked: b(o) ? !1 : o,
282
- ...r,
283
- tabIndex: -1,
284
- ref: u,
285
- style: {
286
- ...e.style,
287
- ...m,
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
- function b(e) {
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 U(e) {
300
- return b(e) ? "indeterminate" : e ? "checked" : "unchecked";
190
+ function M(e) {
191
+ return d(e) ? "indeterminate" : e ? "checked" : "unchecked";
301
192
  }
302
- var ie = M, ce = T;
303
- const se = "cfxui__Checkbox__rootUnset__cbb57", ae = "cfxui__Checkbox__root__865aa", ue = "cfxui__Checkbox__indicator__2afc0", P = {
304
- rootUnset: se,
305
- root: ae,
306
- indicator: ue,
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 me(e) {
206
+ function ne(e) {
312
207
  const {
313
- id: t,
208
+ id: l,
314
209
  size: o = "normal",
315
210
  rootClassName: n,
316
- indicatorClassName: r,
317
- colorToken: u,
318
- color: p,
319
- opacity: m,
320
- luminance: s,
321
- ...i
322
- } = e, d = g(
323
- P.root,
324
- P.rootUnset,
325
- P[`size-${o}`],
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
- ), a = K(e);
328
- return /* @__PURE__ */ _(ie, { ...i, id: t, style: { color: a }, className: d, children: /* @__PURE__ */ _(ce, { className: g(P.indicator, r), children: /* @__PURE__ */ _(W, {}) }) });
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 Ct = $.memo(me);
242
+ const uo = A.memo(ne);
331
243
  export {
332
- Ct as default
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 { Button as C } from "../Button/Button.js";
3
+ import C from "../Button/Button.js";
4
4
  import { clsx as _ } from "../../utils/clsx.js";
5
- import "../Button/LinkButton.js";
6
- import { Title as f } from "../Title/Title.js";
7
- import { noop as u } from "../../utils/functional.js";
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-2hJuj4UN.js";
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 = u,
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
- f,
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 const ControlBox: React.ForwardRefExoticComponent<ControlBoxProps & React.RefAttributes<HTMLDivElement>>;
10
- declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<ControlBoxProps & React.RefAttributes<HTMLDivElement>>>;
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 c } from "react/jsx-runtime";
2
- import r from "react";
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
- }, u = r.forwardRef(function(t, l) {
9
+ };
10
+ function u(r) {
10
11
  const {
11
- size: _ = "normal",
12
- className: a,
13
- children: n
14
- } = t, s = m(o.root, a, o[_]);
15
- return /* @__PURE__ */ c("div", { ref: l, className: s, children: n });
16
- }), g = r.memo(u);
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
- g as default
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 const CountryFlag: React.ForwardRefExoticComponent<CountryFlagProps & React.RefAttributes<HTMLDivElement>>;
10
- declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<CountryFlagProps & React.RefAttributes<HTMLDivElement>>>;
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 r from "react";
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
- }, _ = r.forwardRef(function(a, e) {
7
+ };
8
+ function _(r) {
8
9
  const {
9
10
  country: o,
10
- className: s,
11
- title: n,
12
- forceShow: l = !1
13
- } = a;
14
- if (!l && (o === "001" || o === "AQ" || o === "aq"))
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 c = m(u.root, s, `fi-${o.toLowerCase()}`);
17
- return /* @__PURE__ */ t(f, { title: n, children: /* @__PURE__ */ t("div", { ref: e, className: c }) });
18
- }), x = r.memo(_);
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
- x as default
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;