@cfx-dev/ui-components 3.0.2 → 3.0.3

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 (136) hide show
  1. package/dist/Rail-DcVowhML.js +81 -0
  2. package/dist/assets/css/Accordion.css +1 -1
  3. package/dist/assets/css/Avatar.css +1 -1
  4. package/dist/assets/css/Badge.css +1 -1
  5. package/dist/assets/css/Box.css +1 -1
  6. package/dist/assets/css/Button.css +1 -1
  7. package/dist/assets/css/ButtonBar.css +1 -1
  8. package/dist/assets/css/Center.css +1 -1
  9. package/dist/assets/css/Checkbox.css +1 -1
  10. package/dist/assets/css/ClipboardButton.css +1 -1
  11. package/dist/assets/css/ControlBox.css +1 -1
  12. package/dist/assets/css/CountryFlag.css +1 -1
  13. package/dist/assets/css/Decorate.css +1 -1
  14. package/dist/assets/css/Dot.css +1 -1
  15. package/dist/assets/css/Flex.css +1 -1
  16. package/dist/assets/css/FlexRestricter.css +1 -1
  17. package/dist/assets/css/FlexShowcase.css +1 -1
  18. package/dist/assets/css/Flyout.css +1 -1
  19. package/dist/assets/css/Icon.css +1 -1
  20. package/dist/assets/css/IconBig.css +1 -1
  21. package/dist/assets/css/IconButton.css +1 -1
  22. package/dist/assets/css/Indicator.css +1 -1
  23. package/dist/assets/css/InfoPanel.css +1 -1
  24. package/dist/assets/css/Input.css +1 -1
  25. package/dist/assets/css/InputDropzone.css +1 -1
  26. package/dist/assets/css/Interactive.css +1 -1
  27. package/dist/assets/css/Island.css +1 -1
  28. package/dist/assets/css/ItemPreview.css +1 -1
  29. package/dist/assets/css/Link.css +1 -1
  30. package/dist/assets/css/Loaf.css +1 -1
  31. package/dist/assets/css/Modal.css +1 -1
  32. package/dist/assets/css/NavList.css +1 -1
  33. package/dist/assets/css/Overlay.css +1 -1
  34. package/dist/assets/css/Pad.css +1 -1
  35. package/dist/assets/css/Page.css +1 -1
  36. package/dist/assets/css/Popover.css +1 -1
  37. package/dist/assets/css/PopoverShowcase.css +1 -1
  38. package/dist/assets/css/PremiumBadge.css +1 -1
  39. package/dist/assets/css/Prose.css +1 -1
  40. package/dist/assets/css/Radio.css +1 -1
  41. package/dist/assets/css/Rail.css +1 -1
  42. package/dist/assets/css/RichInput.css +1 -1
  43. package/dist/assets/css/Select.css +1 -1
  44. package/dist/assets/css/Separator.css +1 -1
  45. package/dist/assets/css/Shroud.css +1 -1
  46. package/dist/assets/css/Skeleton.css +1 -1
  47. package/dist/assets/css/Spacer.css +1 -1
  48. package/dist/assets/css/Switch.css +1 -1
  49. package/dist/assets/css/Table.css +1 -1
  50. package/dist/assets/css/Tabular.css +1 -1
  51. package/dist/assets/css/Text.css +1 -1
  52. package/dist/assets/css/TextShowcase.css +1 -1
  53. package/dist/assets/css/Textarea.css +1 -1
  54. package/dist/assets/css/Title.css +1 -1
  55. package/dist/assets/css/ToggleGroup.css +1 -1
  56. package/dist/assets/general/global.css +1 -1
  57. package/dist/cfxIcons-BNd1WgpX.js +96 -0
  58. package/dist/components/Accordion/Accordion.js +69 -69
  59. package/dist/components/Avatar/Avatar.js +18 -18
  60. package/dist/components/Badge/Badge.js +23 -23
  61. package/dist/components/Button/Button.js +76 -76
  62. package/dist/components/Button/ButtonBar.js +6 -6
  63. package/dist/components/Checkbox/Checkbox.js +90 -85
  64. package/dist/components/ClipboardButton/ClipboardButton.js +17 -17
  65. package/dist/components/ControlBox/ControlBox.js +11 -11
  66. package/dist/components/CountryFlag/CountryFlag.js +9 -9
  67. package/dist/components/Decorate/Decorate.js +12 -12
  68. package/dist/components/Dot/Dot.js +17 -17
  69. package/dist/components/Flyout/Flyout.js +44 -44
  70. package/dist/components/Icon/Icon.js +14 -14
  71. package/dist/components/IconBig/IconBig.js +23 -18
  72. package/dist/components/IconButton/IconButton.js +25 -25
  73. package/dist/components/Icons/IconsShowcase.js +1 -1
  74. package/dist/components/Icons/cfx-icons/Cart.d.ts +5 -0
  75. package/dist/components/Icons/cfx-icons/Cart.js +42 -0
  76. package/dist/components/Icons/cfx-icons/UpvotesBurst.d.ts +5 -0
  77. package/dist/components/Icons/cfx-icons/UpvotesBurst.js +26 -0
  78. package/dist/components/Icons/cfx-icons/UpvotesRecurring.d.ts +5 -0
  79. package/dist/components/Icons/cfx-icons/UpvotesRecurring.js +26 -0
  80. package/dist/components/Icons/cfx-icons/User.d.ts +5 -0
  81. package/dist/components/Icons/cfx-icons/User.js +31 -0
  82. package/dist/components/Icons/cfx-icons/Verified.d.ts +5 -0
  83. package/dist/components/Icons/cfx-icons/Verified.js +23 -0
  84. package/dist/components/Icons/cfxIcons.d.ts +5 -0
  85. package/dist/components/Icons/cfxIcons.js +52 -42
  86. package/dist/components/Icons/index.js +1 -1
  87. package/dist/components/Indicator/Indicator.js +11 -11
  88. package/dist/components/InfoPanel/InfoPanel.js +37 -37
  89. package/dist/components/Input/Input.js +59 -59
  90. package/dist/components/Input/RichInput.js +39 -39
  91. package/dist/components/InputDropzone/InputDropzone.js +87 -87
  92. package/dist/components/InputDropzone/ItemPreview.js +17 -17
  93. package/dist/components/Interactive/Interactive.js +6 -6
  94. package/dist/components/Island/Island.js +20 -20
  95. package/dist/components/Layout/Box/Box.js +81 -81
  96. package/dist/components/Layout/Center/Center.js +14 -14
  97. package/dist/components/Layout/Flex/Flex.js +67 -67
  98. package/dist/components/Layout/Flex/FlexRestricter.js +14 -14
  99. package/dist/components/Layout/Flex/FlexShowcase.js +4 -4
  100. package/dist/components/Layout/Pad/Pad.js +34 -34
  101. package/dist/components/Layout/Page/Page.js +11 -11
  102. package/dist/components/Layout/Scrollable/Rail.js +1 -1
  103. package/dist/components/Layout/Scrollable/Scrollable.js +1 -1
  104. package/dist/components/Layout/Scrollable/VirtualScrollable.js +1 -1
  105. package/dist/components/Layout/Scrollable/index.js +1 -1
  106. package/dist/components/Link/ButtonLink.js +7 -6
  107. package/dist/components/Link/Link.js +36 -27
  108. package/dist/components/Loaf/Loaf.js +20 -20
  109. package/dist/components/Modal/Modal.js +51 -51
  110. package/dist/components/NavList/NavList.js +23 -23
  111. package/dist/components/Overlay/Overlay.js +17 -17
  112. package/dist/components/Popover/Popover.js +29 -29
  113. package/dist/components/Popover/PopoverShowcase.js +9 -9
  114. package/dist/components/PremiumBadge/PremiumBadge.js +8 -8
  115. package/dist/components/Prose/Prose.js +6 -6
  116. package/dist/components/Radio/Radio.js +32 -32
  117. package/dist/components/Select/Select.js +157 -157
  118. package/dist/components/Separator/Separator.js +31 -31
  119. package/dist/components/Shroud/Shroud.js +14 -14
  120. package/dist/components/Skeleton/Skeleton.js +10 -10
  121. package/dist/components/Spacer/Spacer.js +25 -25
  122. package/dist/components/Switch/Switch.js +43 -43
  123. package/dist/components/Table/Table.js +82 -82
  124. package/dist/components/Tabular/Tabular.js +60 -60
  125. package/dist/components/Text/Text.js +26 -26
  126. package/dist/components/Text/TextShowcase.js +19 -19
  127. package/dist/components/Textarea/Textarea.js +36 -36
  128. package/dist/components/Title/Title.js +57 -57
  129. package/dist/components/ToggleGroup/ToggleGroup.js +40 -40
  130. package/dist/main.js +2 -2
  131. package/dist/styles-scss/_ui.scss +22 -0
  132. package/dist/styles-scss/global.scss +5 -0
  133. package/dist/styles-scss/tokens.scss +5 -25
  134. package/package.json +2 -2
  135. package/dist/Rail-XT5PwAlx.js +0 -81
  136. package/dist/cfxIcons-BlbKR-zU.js +0 -86
@@ -1,40 +1,40 @@
1
- import { jsxs as _, jsx as t } from "react/jsx-runtime";
2
- import { clsx as l } from "../../utils/clsx.js";
3
- const p = "_root_dsunb_1", i = "_separator_dsunb_4", c = "_content_dsunb_42", d = "_thin_dsunb_45", m = "_vertical_dsunb_51", u = "_text_dsunb_98", s = {
4
- root: p,
5
- "separator-offset-none": "_separator-offset-none_dsunb_4",
6
- "separator-offset-hairthin": "_separator-offset-hairthin_dsunb_7",
7
- "separator-offset-thin": "_separator-offset-thin_dsunb_10",
8
- "separator-offset-xxsmall": "_separator-offset-xxsmall_dsunb_13",
9
- "separator-offset-xsmall": "_separator-offset-xsmall_dsunb_16",
10
- "separator-offset-small": "_separator-offset-small_dsunb_19",
11
- "separator-offset-normal": "_separator-offset-normal_dsunb_22",
12
- "separator-offset-medium": "_separator-offset-medium_dsunb_25",
13
- "separator-offset-large": "_separator-offset-large_dsunb_28",
14
- "separator-offset-xlarge": "_separator-offset-xlarge_dsunb_31",
15
- "separator-offset-safezone": "_separator-offset-safezone_dsunb_34",
16
- separator: i,
17
- content: c,
18
- thin: d,
1
+ import { jsxs as p, jsx as r } from "react/jsx-runtime";
2
+ import { clsx as c } from "../../utils/clsx.js";
3
+ const i = "cfxui__Separator__root__3aea3", n = "cfxui__Separator__separator__5dbbd", l = "cfxui__Separator__content__7ade9", x = "cfxui__Separator__thin__628fd", m = "cfxui__Separator__vertical__8bd90", d = "cfxui__Separator__text__d02da", a = {
4
+ root: i,
5
+ "separator-offset-none": "cfxui__Separator__separator-offset-none__f2b70",
6
+ "separator-offset-hairthin": "cfxui__Separator__separator-offset-hairthin__56e9d",
7
+ "separator-offset-thin": "cfxui__Separator__separator-offset-thin__36d86",
8
+ "separator-offset-xxsmall": "cfxui__Separator__separator-offset-xxsmall__84364",
9
+ "separator-offset-xsmall": "cfxui__Separator__separator-offset-xsmall__6dba9",
10
+ "separator-offset-small": "cfxui__Separator__separator-offset-small__872f2",
11
+ "separator-offset-normal": "cfxui__Separator__separator-offset-normal__60e53",
12
+ "separator-offset-medium": "cfxui__Separator__separator-offset-medium__032b1",
13
+ "separator-offset-large": "cfxui__Separator__separator-offset-large__918a2",
14
+ "separator-offset-xlarge": "cfxui__Separator__separator-offset-xlarge__01c53",
15
+ "separator-offset-safezone": "cfxui__Separator__separator-offset-safezone__d28af",
16
+ separator: n,
17
+ content: l,
18
+ thin: x,
19
19
  vertical: m,
20
- text: u
20
+ text: d
21
21
  };
22
22
  function h(o) {
23
23
  const {
24
- content: a,
25
- thin: r = !1,
26
- vertical: n = !1,
24
+ content: t,
25
+ thin: _ = !1,
26
+ vertical: s = !1,
27
27
  offset: f = "none"
28
- } = o, e = l(s.root, s[`separator-offset-${f}`], {
29
- [s.text]: !!a,
30
- [s.thin]: r,
31
- [s.vertical]: n
28
+ } = o, e = c(a.root, a[`separator-offset-${f}`], {
29
+ [a.text]: !!t,
30
+ [a.thin]: _,
31
+ [a.vertical]: s
32
32
  });
33
- return a ? /* @__PURE__ */ _("div", { className: e, children: [
34
- /* @__PURE__ */ t("div", { className: s.separator }),
35
- /* @__PURE__ */ t("div", { className: s.content, children: a }),
36
- /* @__PURE__ */ t("div", { className: s.separator })
37
- ] }) : /* @__PURE__ */ t("div", { className: e, children: /* @__PURE__ */ t("div", { className: s.separator }) });
33
+ return t ? /* @__PURE__ */ p("div", { className: e, children: [
34
+ /* @__PURE__ */ r("div", { className: a.separator }),
35
+ /* @__PURE__ */ r("div", { className: a.content, children: t }),
36
+ /* @__PURE__ */ r("div", { className: a.separator })
37
+ ] }) : /* @__PURE__ */ r("div", { className: e, children: /* @__PURE__ */ r("div", { className: a.separator }) });
38
38
  }
39
39
  export {
40
40
  h as Separator
@@ -1,21 +1,21 @@
1
1
  import { jsx as t, jsxs as h } from "react/jsx-runtime";
2
2
  import r from "react";
3
- import { TITLE_OUTLET_ID as p } from "../Title/Title.js";
4
- import { ui as _ } from "../ui.js";
3
+ import { TITLE_OUTLET_ID as _ } from "../Title/Title.js";
4
+ import { ui as p } from "../ui.js";
5
5
  import "../../utils/hooks/useGlobalKeyboardEvent.js";
6
6
  import "../../utils/hooks/useKeyboardClose.js";
7
- import { useWindowResize as v } from "../../utils/hooks/useWindowResize.js";
7
+ import { useWindowResize as b } from "../../utils/hooks/useWindowResize.js";
8
8
  import { useOutlet as x } from "../../utils/hooks/useOutlet.js";
9
- const b = "_root_7v6x1_1", g = "_tile_7v6x1_6", e = {
10
- root: b,
11
- tile: g
12
- }, P = r.forwardRef(function(c, n) {
9
+ const g = "cfxui__Shroud__root__99944", v = "cfxui__Shroud__tile__db55f", e = {
10
+ root: g,
11
+ tile: v
12
+ }, P = r.forwardRef(function(l, n) {
13
13
  const {
14
14
  forRef: s
15
- } = c, [m, u] = r.useState({}), d = x(p, "before"), i = r.useCallback(() => {
15
+ } = l, [u, d] = r.useState({}), f = x(_, "before"), i = r.useCallback(() => {
16
16
  if (!s.current)
17
17
  return;
18
- const o = s.current.getBoundingClientRect(), f = {
18
+ const o = s.current.getBoundingClientRect(), m = {
19
19
  x: o.x,
20
20
  y: o.y,
21
21
  w: o.width,
@@ -23,16 +23,16 @@ const b = "_root_7v6x1_1", g = "_tile_7v6x1_6", e = {
23
23
  sw: globalThis.screen.availWidth,
24
24
  sh: globalThis.screen.availHeight
25
25
  };
26
- u(
26
+ d(
27
27
  Object.fromEntries(
28
- Object.entries(f).flatMap(([a, l]) => [
29
- [`--${a}`, _.px(l)],
30
- [`--${a}-raw`, l]
28
+ Object.entries(m).flatMap(([a, c]) => [
29
+ [`--${a}`, p.px(c)],
30
+ [`--${a}-raw`, c]
31
31
  ])
32
32
  )
33
33
  );
34
34
  }, []);
35
- return r.useEffect(i, []), v(i), /* @__PURE__ */ t(d, { children: /* @__PURE__ */ h("div", { ref: n, className: e.root, style: m, children: [
35
+ return r.useEffect(i, []), b(i), /* @__PURE__ */ t(f, { children: /* @__PURE__ */ h("div", { ref: n, className: e.root, style: u, children: [
36
36
  /* @__PURE__ */ t("div", { className: e.tile, "data-top": !0 }),
37
37
  /* @__PURE__ */ t("div", { className: e.tile, "data-left": !0 }),
38
38
  /* @__PURE__ */ t("div", { className: e.tile, "data-right": !0 }),
@@ -1,20 +1,20 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import n from "react";
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import m from "react";
3
3
  import { TextSizeEnum as l } from "../Text/Text.types.js";
4
- const r = "_skeleton_fx7ao_1", i = "_shimmer_fx7ao_1", f = {
5
- skeleton: r,
6
- shimmer: i
4
+ const i = "cfxui__Skeleton__skeleton__d700e", _ = "cfxui__Skeleton__shimmer__d72f5", r = {
5
+ skeleton: i,
6
+ shimmer: _
7
7
  };
8
- function a({
8
+ function f({
9
9
  width: o = "100%",
10
10
  height: e = "20px",
11
11
  borderRadius: s = "4px"
12
12
  }) {
13
13
  let t = e;
14
- return e in l && (t = `var(--font-size-${e})`), /* @__PURE__ */ m(
14
+ return e in l && (t = `var(--font-size-${e})`), /* @__PURE__ */ n(
15
15
  "div",
16
16
  {
17
- className: f.skeleton,
17
+ className: r.skeleton,
18
18
  style: {
19
19
  width: o,
20
20
  height: t,
@@ -23,7 +23,7 @@ function a({
23
23
  }
24
24
  );
25
25
  }
26
- const k = n.memo(a);
26
+ const u = m.memo(f);
27
27
  export {
28
- k as default
28
+ u as default
29
29
  };
@@ -1,31 +1,31 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { clsx as l } from "../../utils/clsx.js";
3
- const r = "_root_x8a9c_1", z = "_horizontal_x8a9c_1", c = "_vertical_x8a9c_37", e = {
4
- root: r,
5
- horizontal: z,
6
- "size-none": "_size-none_x8a9c_4",
7
- "size-hairthin": "_size-hairthin_x8a9c_7",
8
- "size-thin": "_size-thin_x8a9c_10",
9
- "size-xxsmall": "_size-xxsmall_x8a9c_13",
10
- "size-xsmall": "_size-xsmall_x8a9c_16",
11
- "size-small": "_size-small_x8a9c_19",
12
- "size-normal": "_size-normal_x8a9c_22",
13
- "size-medium": "_size-medium_x8a9c_25",
14
- "size-large": "_size-large_x8a9c_28",
15
- "size-xlarge": "_size-xlarge_x8a9c_31",
16
- "size-safezone": "_size-safezone_x8a9c_34",
17
- vertical: c
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { clsx as r } from "../../utils/clsx.js";
3
+ const o = "cfxui__Spacer__root__118fe", l = "cfxui__Spacer__horizontal__feb96", z = "cfxui__Spacer__vertical__5263f", _ = {
4
+ root: o,
5
+ horizontal: l,
6
+ "size-none": "cfxui__Spacer__size-none__64e4c",
7
+ "size-hairthin": "cfxui__Spacer__size-hairthin__9e4e3",
8
+ "size-thin": "cfxui__Spacer__size-thin__e1486",
9
+ "size-xxsmall": "cfxui__Spacer__size-xxsmall__703d4",
10
+ "size-xsmall": "cfxui__Spacer__size-xsmall__01aac",
11
+ "size-small": "cfxui__Spacer__size-small__6fa49",
12
+ "size-normal": "cfxui__Spacer__size-normal__5fe08",
13
+ "size-medium": "cfxui__Spacer__size-medium__be07e",
14
+ "size-large": "cfxui__Spacer__size-large__f8138",
15
+ "size-xlarge": "cfxui__Spacer__size-xlarge__88c98",
16
+ "size-safezone": "cfxui__Spacer__size-safezone__912d3",
17
+ vertical: z
18
18
  };
19
- function x(s) {
19
+ function n(i) {
20
20
  const {
21
- size: i = "normal",
22
- vertical: a = !1
23
- } = s, _ = l(e.root, e[`size-${i}`], {
24
- [e.horizontal]: !a,
25
- [e.vertical]: a
21
+ size: a = "normal",
22
+ vertical: e = !1
23
+ } = i, c = r(_.root, _[`size-${a}`], {
24
+ [_.horizontal]: !e,
25
+ [_.vertical]: e
26
26
  });
27
- return /* @__PURE__ */ o("div", { className: _ });
27
+ return /* @__PURE__ */ s("div", { className: c });
28
28
  }
29
29
  export {
30
- x as Spacer
30
+ n as Spacer
31
31
  };
@@ -1,54 +1,54 @@
1
1
  import { jsxs as N, jsx as i } from "react/jsx-runtime";
2
2
  import * as a from "react";
3
3
  import U from "react";
4
- import { c as B, u as H, a as I, P as _, b as M, d as j, e as q } from "../../index-CjWRnNpt.js";
5
- import { clsx as C } from "../../utils/clsx.js";
4
+ import { c as B, u as H, a as I, P as C, b as M, d as j, e as q } from "../../index-CjWRnNpt.js";
5
+ import { clsx as k } from "../../utils/clsx.js";
6
6
  var S = "Switch", [z, Y] = B(S), [A, O] = z(S), P = a.forwardRef(
7
- (t, s) => {
7
+ (t, o) => {
8
8
  const {
9
9
  __scopeSwitch: e,
10
- name: o,
11
- checked: c,
10
+ name: c,
11
+ checked: s,
12
12
  defaultChecked: d,
13
13
  required: u,
14
- disabled: n,
14
+ disabled: r,
15
15
  value: h = "on",
16
- onCheckedChange: m,
17
- ...v
18
- } = t, [r, f] = a.useState(null), T = H(s, (p) => f(p)), w = a.useRef(!1), k = r ? !!r.closest("form") : !0, [l = !1, x] = I({
19
- prop: c,
16
+ onCheckedChange: f,
17
+ ..._
18
+ } = t, [n, m] = a.useState(null), T = H(o, (p) => m(p)), w = a.useRef(!1), v = n ? !!n.closest("form") : !0, [l = !1, g] = I({
19
+ prop: s,
20
20
  defaultProp: d,
21
- onChange: m
21
+ onChange: f
22
22
  });
23
- return /* @__PURE__ */ N(A, { scope: e, checked: l, disabled: n, children: [
23
+ return /* @__PURE__ */ N(A, { scope: e, checked: l, disabled: r, children: [
24
24
  /* @__PURE__ */ i(
25
- _.button,
25
+ C.button,
26
26
  {
27
27
  type: "button",
28
28
  role: "switch",
29
29
  "aria-checked": l,
30
30
  "aria-required": u,
31
31
  "data-state": y(l),
32
- "data-disabled": n ? "" : void 0,
33
- disabled: n,
32
+ "data-disabled": r ? "" : void 0,
33
+ disabled: r,
34
34
  value: h,
35
- ...v,
35
+ ..._,
36
36
  ref: T,
37
37
  onClick: M(t.onClick, (p) => {
38
- x((E) => !E), k && (w.current = p.isPropagationStopped(), w.current || p.stopPropagation());
38
+ g((E) => !E), v && (w.current = p.isPropagationStopped(), w.current || p.stopPropagation());
39
39
  })
40
40
  }
41
41
  ),
42
- k && /* @__PURE__ */ i(
42
+ v && /* @__PURE__ */ i(
43
43
  $,
44
44
  {
45
- control: r,
45
+ control: n,
46
46
  bubbles: !w.current,
47
- name: o,
47
+ name: c,
48
48
  value: h,
49
49
  checked: l,
50
50
  required: u,
51
- disabled: n,
51
+ disabled: r,
52
52
  style: { transform: "translateX(-100%)" }
53
53
  }
54
54
  )
@@ -56,41 +56,41 @@ var S = "Switch", [z, Y] = B(S), [A, O] = z(S), P = a.forwardRef(
56
56
  }
57
57
  );
58
58
  P.displayName = S;
59
- var R = "SwitchThumb", g = a.forwardRef(
60
- (t, s) => {
61
- const { __scopeSwitch: e, ...o } = t, c = O(R, e);
59
+ var R = "SwitchThumb", x = a.forwardRef(
60
+ (t, o) => {
61
+ const { __scopeSwitch: e, ...c } = t, s = O(R, e);
62
62
  return /* @__PURE__ */ i(
63
- _.span,
63
+ C.span,
64
64
  {
65
- "data-state": y(c.checked),
66
- "data-disabled": c.disabled ? "" : void 0,
67
- ...o,
68
- ref: s
65
+ "data-state": y(s.checked),
66
+ "data-disabled": s.disabled ? "" : void 0,
67
+ ...c,
68
+ ref: o
69
69
  }
70
70
  );
71
71
  }
72
72
  );
73
- g.displayName = R;
73
+ x.displayName = R;
74
74
  var $ = (t) => {
75
- const { control: s, checked: e, bubbles: o = !0, ...c } = t, d = a.useRef(null), u = j(e), n = q(s);
75
+ const { control: o, checked: e, bubbles: c = !0, ...s } = t, d = a.useRef(null), u = j(e), r = q(o);
76
76
  return a.useEffect(() => {
77
- const h = d.current, m = window.HTMLInputElement.prototype, r = Object.getOwnPropertyDescriptor(m, "checked").set;
78
- if (u !== e && r) {
79
- const f = new Event("click", { bubbles: o });
80
- r.call(h, e), h.dispatchEvent(f);
77
+ const h = d.current, f = window.HTMLInputElement.prototype, n = Object.getOwnPropertyDescriptor(f, "checked").set;
78
+ if (u !== e && n) {
79
+ const m = new Event("click", { bubbles: c });
80
+ n.call(h, e), h.dispatchEvent(m);
81
81
  }
82
- }, [u, e, o]), /* @__PURE__ */ i(
82
+ }, [u, e, c]), /* @__PURE__ */ i(
83
83
  "input",
84
84
  {
85
85
  type: "checkbox",
86
86
  "aria-hidden": !0,
87
87
  defaultChecked: e,
88
- ...c,
88
+ ...s,
89
89
  tabIndex: -1,
90
90
  ref: d,
91
91
  style: {
92
92
  ...t.style,
93
- ...n,
93
+ ...r,
94
94
  position: "absolute",
95
95
  pointerEvents: "none",
96
96
  opacity: 0,
@@ -102,19 +102,19 @@ var $ = (t) => {
102
102
  function y(t) {
103
103
  return t ? "checked" : "unchecked";
104
104
  }
105
- var D = P, F = g;
106
- const L = "_switchUnset_tpmng_1", W = "_switchRoot_tpmng_5", X = "_switchThumb_tpmng_30", b = {
105
+ var D = P, F = x;
106
+ const L = "cfxui__Switch__switchUnset__c8b03", W = "cfxui__Switch__switchRoot__f2911", X = "cfxui__Switch__switchThumb__9cbf5", b = {
107
107
  switchUnset: L,
108
108
  switchRoot: W,
109
109
  switchThumb: X
110
110
  };
111
111
  function G(t) {
112
112
  const {
113
- classNameRoot: s,
113
+ classNameRoot: o,
114
114
  classNameThumb: e,
115
- ...o
115
+ ...c
116
116
  } = t;
117
- return /* @__PURE__ */ i(D, { ...o, className: C(b.switchRoot, b.switchUnset, s), children: /* @__PURE__ */ i(F, { className: C(b.switchThumb, e) }) });
117
+ return /* @__PURE__ */ i(D, { ...c, className: k(b.switchRoot, b.switchUnset, o), children: /* @__PURE__ */ i(F, { className: k(b.switchThumb, e) }) });
118
118
  }
119
119
  const Z = U.memo(G);
120
120
  export {
@@ -1,11 +1,11 @@
1
1
  import { jsx as t, jsxs as C } from "react/jsx-runtime";
2
- import s, { useState as k } from "react";
3
- import y from "../Checkbox/Checkbox.js";
4
- import I from "../IconButton/IconButton.js";
5
- import { Text as $ } from "../Text/Text.js";
6
- import { clsx as f } from "../../utils/clsx.js";
7
- const S = "_tableIcon_jm0lw_1", z = "_iconButton_jm0lw_1", A = "_root_jm0lw_21", E = "_radio_jm0lw_38", O = "_radioContent_jm0lw_42", g = "_pointer_jm0lw_49", F = "_selectedRow_jm0lw_52", H = "_headerText_jm0lw_56", V = "_headerContent_jm0lw_65", q = "_hidden_jm0lw_84", o = {
8
- tableIcon: S,
2
+ import l, { useState as k } from "react";
3
+ import I from "../Checkbox/Checkbox.js";
4
+ import $ from "../IconButton/IconButton.js";
5
+ import { Text as S } from "../Text/Text.js";
6
+ import { clsx as u } from "../../utils/clsx.js";
7
+ const j = "cfxui__Table__tableIcon__f8e96", z = "cfxui__Table__iconButton__ac6da", A = "cfxui__Table__root__591ed", E = "cfxui__Table__radio__70dd7", O = "cfxui__Table__radioContent__35cef", g = "cfxui__Table__pointer__7b6a4", F = "cfxui__Table__selectedRow__f7130", H = "cfxui__Table__headerText__02722", V = "cfxui__Table__headerContent__f0e66", q = "cfxui__Table__hidden__e4ac6", c = {
8
+ tableIcon: j,
9
9
  iconButton: z,
10
10
  root: A,
11
11
  radio: E,
@@ -16,33 +16,33 @@ const S = "_tableIcon_jm0lw_1", z = "_iconButton_jm0lw_1", A = "_root_jm0lw_21",
16
16
  headerContent: V,
17
17
  hidden: q
18
18
  };
19
- function D(r) {
19
+ function D(i) {
20
20
  const {
21
21
  className: e,
22
- color: n = "inherit"
23
- } = r, i = f(o.tableIcon, o.iconButton, e);
24
- return /* @__PURE__ */ t(I, { ...r, className: i, color: n });
22
+ color: o = "inherit"
23
+ } = i, r = u(c.tableIcon, c.iconButton, e);
24
+ return /* @__PURE__ */ t($, { ...i, className: r, color: o });
25
25
  }
26
- function G(r) {
26
+ function G(i) {
27
27
  const {
28
28
  item: e,
29
- onSortClick: n
30
- } = r, i = s.useCallback(() => {
31
- n && n(e.sortKey || e.text);
32
- }, [e.sortKey, e.text, n]), a = f(o.headerContent, {
33
- [o.sortable]: e.sortable,
34
- [o.empty]: !e.text
29
+ onSortClick: o
30
+ } = i, r = l.useCallback(() => {
31
+ o && o(e.sortKey || e.text);
32
+ }, [e.sortKey, e.text, o]), s = u(c.headerContent, {
33
+ [c.sortable]: e.sortable,
34
+ [c.empty]: !e.text
35
35
  });
36
36
  return /* @__PURE__ */ t(
37
37
  "th",
38
38
  {
39
- className: e.sortable ? o.pointer : void 0,
40
- onClick: e.sortable ? i : void 0,
41
- children: /* @__PURE__ */ C("div", { className: a, children: [
39
+ className: e.sortable ? c.pointer : void 0,
40
+ onClick: e.sortable ? r : void 0,
41
+ children: /* @__PURE__ */ C("div", { className: s, children: [
42
42
  /* @__PURE__ */ t(
43
- $,
43
+ S,
44
44
  {
45
- className: o.headerText,
45
+ className: c.headerText,
46
46
  color: "secondary",
47
47
  letterSpacing: "large",
48
48
  weight: "bold",
@@ -55,50 +55,50 @@ function G(r) {
55
55
  D,
56
56
  {
57
57
  name: "Sort",
58
- onClick: i
58
+ onClick: r
59
59
  }
60
60
  )
61
61
  ] })
62
62
  }
63
63
  );
64
64
  }
65
- function J(r) {
65
+ function J(i) {
66
66
  const {
67
67
  index: e,
68
- includeRadio: n = !1,
69
- loading: i,
70
- selectedRow: a,
71
- item: p,
72
- dataContainer: _,
68
+ includeRadio: o = !1,
69
+ loading: r,
70
+ selectedRow: s,
71
+ item: T,
72
+ dataContainer: m,
73
73
  onSelectChange: d
74
- } = r, u = s.useCallback((c) => {
74
+ } = i, h = l.useCallback((n) => {
75
75
  d(
76
- c ? e : null
76
+ n ? e : null
77
77
  );
78
- }, [d, e]), b = s.useCallback(() => {
78
+ }, [d, e]), b = l.useCallback(() => {
79
79
  d(e);
80
- }, [d, e]), x = f({
81
- [o.selectedRow]: a === e,
82
- [o.pointer]: n
80
+ }, [d, e]), p = u({
81
+ [c.selectedRow]: s === e,
82
+ [c.pointer]: o
83
83
  });
84
84
  return /* @__PURE__ */ C(
85
85
  "tr",
86
86
  {
87
- className: x,
88
- onClick: n ? b : void 0,
87
+ className: p,
88
+ onClick: o ? b : void 0,
89
89
  children: [
90
- n && /* @__PURE__ */ t("td", { className: f(o.radio, { [o.hidden]: i }), children: /* @__PURE__ */ t("div", { className: o.radioContent, children: /* @__PURE__ */ t(
91
- y,
90
+ o && /* @__PURE__ */ t("td", { className: u(c.radio, { [c.hidden]: r }), children: /* @__PURE__ */ t("div", { className: c.radioContent, children: /* @__PURE__ */ t(
91
+ I,
92
92
  {
93
93
  size: "small",
94
- onCheckedChange: u,
94
+ onCheckedChange: h,
95
95
  "aria-label": `${e}`,
96
- checked: a === e
96
+ checked: s === e
97
97
  }
98
98
  ) }) }),
99
- p.map((c, w) => {
100
- let h;
101
- return s.isValidElement(c) ? h = c : _ ? h = s.createElement(_, { item: c }) : h = String(c), /* @__PURE__ */ t("td", { children: h }, `item-${w}`);
99
+ T.map((n, x) => {
100
+ let f;
101
+ return l.isValidElement(n) ? f = n : m ? f = l.createElement(m, { item: n }) : f = String(n), /* @__PURE__ */ t("td", { children: f }, `item-${x}`);
102
102
  })
103
103
  ]
104
104
  },
@@ -106,58 +106,58 @@ function J(r) {
106
106
  );
107
107
  }
108
108
  function W({
109
- headers: r = [],
109
+ headers: i = [],
110
110
  data: e = [],
111
- includeRadio: n = !1,
112
- loading: i = !1,
113
- onSelectChange: a,
114
- dataContainer: p,
115
- selectedRow: _ = null,
111
+ includeRadio: o = !1,
112
+ loading: r = !1,
113
+ onSelectChange: s,
114
+ dataContainer: T,
115
+ selectedRow: m = null,
116
116
  sortBy: d,
117
- sortOrder: u = "asc",
117
+ sortOrder: h = "asc",
118
118
  onSortChange: b,
119
- className: x
119
+ className: p
120
120
  }) {
121
- const [c, w] = k(_), [h, j] = k(d), [N, R] = k(u), B = s.useCallback((l) => {
122
- const T = h === l && N === "asc" ? "desc" : "asc";
123
- j(l), R(T), b == null || b(l, T);
124
- }, [b, h, N]), v = s.useCallback(
125
- (l) => {
126
- const m = l === c ? null : l;
127
- w(m), a == null || a(m);
121
+ const [n, x] = k(m), [f, w] = k(d), [N, R] = k(h), v = l.useCallback((a) => {
122
+ const B = f === a && N === "asc" ? "desc" : "asc";
123
+ w(a), R(B), b == null || b(a, B);
124
+ }, [b, f, N]), y = l.useCallback(
125
+ (a) => {
126
+ const _ = a === n ? null : a;
127
+ x(_), s == null || s(_);
128
128
  },
129
- [a, c]
129
+ [s, n]
130
130
  );
131
- return s.useEffect(() => {
132
- w(_);
133
- }, [_]), s.useEffect(() => {
134
- j(d);
135
- }, [d]), s.useEffect(() => {
136
- R(u);
137
- }, [u]), /* @__PURE__ */ t("div", { className: f(o.root, x), children: /* @__PURE__ */ C("table", { children: [
131
+ return l.useEffect(() => {
132
+ x(m);
133
+ }, [m]), l.useEffect(() => {
134
+ w(d);
135
+ }, [d]), l.useEffect(() => {
136
+ R(h);
137
+ }, [h]), /* @__PURE__ */ t("div", { className: u(c.root, p), children: /* @__PURE__ */ C("table", { children: [
138
138
  /* @__PURE__ */ t("thead", { children: /* @__PURE__ */ C("tr", { children: [
139
- n && /* @__PURE__ */ t("th", { "aria-label": "Select Row" }),
140
- r.map((l, m) => /* @__PURE__ */ t(
139
+ o && /* @__PURE__ */ t("th", { "aria-label": "Select Row" }),
140
+ i.map((a, _) => /* @__PURE__ */ t(
141
141
  G,
142
142
  {
143
- item: l,
144
- onSortClick: B
143
+ item: a,
144
+ onSortClick: v
145
145
  },
146
- `header-${m}`
146
+ `header-${_}`
147
147
  ))
148
148
  ] }) }),
149
- /* @__PURE__ */ t("tbody", { children: e.map((l, m) => /* @__PURE__ */ t(
149
+ /* @__PURE__ */ t("tbody", { children: e.map((a, _) => /* @__PURE__ */ t(
150
150
  J,
151
151
  {
152
- index: m,
153
- item: l,
154
- includeRadio: n,
155
- loading: i,
156
- selectedRow: c,
157
- onSelectChange: v,
158
- dataContainer: p
152
+ index: _,
153
+ item: a,
154
+ includeRadio: o,
155
+ loading: r,
156
+ selectedRow: n,
157
+ onSelectChange: y,
158
+ dataContainer: T
159
159
  },
160
- `row-${m}`
160
+ `row-${_}`
161
161
  )) })
162
162
  ] }) });
163
163
  }