@cfx-dev/ui-components 4.3.2 → 4.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/dist/{Combination-CSgOhzm-.js → Combination-BGYCZNoJ.js} +375 -367
  2. package/dist/Rail-CHFAf3wJ.js +81 -0
  3. package/dist/Table.module-DffST69u.js +17 -0
  4. package/dist/assets/css/Accordion.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/DropdownSelect.css +1 -1
  8. package/dist/assets/css/Flex.css +1 -1
  9. package/dist/assets/css/Flyout.css +1 -1
  10. package/dist/assets/css/Indicator.css +1 -1
  11. package/dist/assets/css/InfoPanel.css +1 -1
  12. package/dist/assets/css/Input.css +1 -1
  13. package/dist/assets/css/InputDropzone.css +1 -1
  14. package/dist/assets/css/Island.css +1 -1
  15. package/dist/assets/css/Link.css +1 -1
  16. package/dist/assets/css/Modal.css +1 -1
  17. package/dist/assets/css/Overlay.css +1 -1
  18. package/dist/assets/css/Pad.css +1 -1
  19. package/dist/assets/css/Popover.css +1 -1
  20. package/dist/assets/css/Radio.css +1 -1
  21. package/dist/assets/css/Rail.css +1 -1
  22. package/dist/assets/css/RichInput.css +1 -1
  23. package/dist/assets/css/Select.css +1 -1
  24. package/dist/assets/css/Separator.css +1 -1
  25. package/dist/assets/css/Switch.css +1 -1
  26. package/dist/assets/css/Table.css +1 -1
  27. package/dist/assets/css/Tabular.css +1 -1
  28. package/dist/assets/css/Text.css +1 -1
  29. package/dist/assets/css/Textarea.css +1 -1
  30. package/dist/assets/css/Title.css +1 -1
  31. package/dist/assets/css/ToggleGroup.css +1 -1
  32. package/dist/assets/general/global.css +1 -1
  33. package/dist/assets/general/themes.css +1 -1
  34. package/dist/components/Accordion/Accordion.js +5 -5
  35. package/dist/components/Accordion/AccordionShowcase.js +1 -1
  36. package/dist/components/Avatar/AvatarShowcase.js +1 -1
  37. package/dist/components/Badge/BadgeShowcase.js +1 -1
  38. package/dist/components/Box/Box.d.ts +6 -0
  39. package/dist/components/Box/Box.js +23 -0
  40. package/dist/components/Box/index.d.ts +3 -0
  41. package/dist/components/Box/index.js +6 -0
  42. package/dist/components/BurgerMenu/BurgerMenu.js +7 -7
  43. package/dist/components/BurgerMenu/BurgerMenuButton.js +2 -2
  44. package/dist/components/BurgerMenu/BurgerMenuShowcase.js +1 -1
  45. package/dist/components/Button/ButtonShowcase.js +1 -1
  46. package/dist/components/Checkbox/Checkbox.js +252 -157
  47. package/dist/components/DataTable/DataTable.js +2 -2
  48. package/dist/components/DataTable/DataTableShowcase.js +2 -2
  49. package/dist/components/DropdownSelect/DropdownSelect.js +13 -13
  50. package/dist/components/DropdownSelect/DropdownSelectShowcase.js +1 -1
  51. package/dist/components/Flex/Flex.d.ts +7 -0
  52. package/dist/components/Flex/Flex.js +23 -0
  53. package/dist/components/Flex/index.d.ts +6 -0
  54. package/dist/components/{Layout/Flex → Flex}/index.js +2 -2
  55. package/dist/components/Flyout/Flyout.js +6 -6
  56. package/dist/components/InfoPanel/InfoPanel.js +3 -3
  57. package/dist/components/InfoPanel/InfoPanelShowcase.js +1 -1
  58. package/dist/components/Input/Input.js +87 -87
  59. package/dist/components/Input/InputShowcase.js +1 -1
  60. package/dist/components/Input/RichInput.js +42 -42
  61. package/dist/components/Island/Island.js +27 -27
  62. package/dist/components/Layout/Pad/Pad.js +20 -20
  63. package/dist/components/Link/LinkShowcase.js +1 -1
  64. package/dist/components/Logos/LogosShowcase.js +1 -1
  65. package/dist/components/Modal/ModalShowcase.js +4 -4
  66. package/dist/components/OnScreenSensor.js +13 -13
  67. package/dist/components/Popover/Popover.js +5 -5
  68. package/dist/components/Popover/PopoverShowcase.js +1 -1
  69. package/dist/components/{Layout → RSC}/Box/Box.d.ts +3 -2
  70. package/dist/components/RSC/Box/Box.js +101 -0
  71. package/dist/components/RSC/Box/index.d.ts +2 -0
  72. package/dist/components/RSC/Box/index.js +7 -0
  73. package/dist/components/{Layout → RSC}/Flex/Flex.d.ts +4 -2
  74. package/dist/components/RSC/Flex/Flex.js +119 -0
  75. package/dist/components/{Layout → RSC}/Flex/index.d.ts +1 -1
  76. package/dist/components/RSC/Flex/index.js +15 -0
  77. package/dist/components/Scrollable/Rail.js +9 -0
  78. package/dist/components/Scrollable/Scrollable.js +88 -0
  79. package/dist/components/{Layout/Scrollable → Scrollable}/ScrollableShowcase.js +3 -3
  80. package/dist/components/{Layout/Scrollable → Scrollable}/VirtualScrollable.js +3 -3
  81. package/dist/components/{Layout/Scrollable → Scrollable}/index.js +1 -1
  82. package/dist/components/Select/Select.js +3 -3
  83. package/dist/components/Select/SelectShowcase.js +1 -1
  84. package/dist/components/Separator/Separator.js +3 -3
  85. package/dist/components/Shroud/Shroud.js +7 -7
  86. package/dist/components/Skeleton/Skeleton.d.ts +1 -1
  87. package/dist/components/Skeleton/Skeleton.js +5 -5
  88. package/dist/components/Skeleton/SkeletonShowcase.js +1 -1
  89. package/dist/components/Slider/Slider.js +2 -2
  90. package/dist/components/Slider/SliderShowcase.js +1 -1
  91. package/dist/components/Switch/Switch.js +1 -1
  92. package/dist/components/Table/TableBody.js +1 -1
  93. package/dist/components/Table/TableCell.d.ts +1 -1
  94. package/dist/components/Table/TableCell.js +13 -12
  95. package/dist/components/Table/TableCellCheckbox.js +1 -1
  96. package/dist/components/Table/TableHeader.js +1 -1
  97. package/dist/components/Table/TableIconButton.js +1 -1
  98. package/dist/components/Table/TableRoot.js +1 -1
  99. package/dist/components/Table/TableRow.js +1 -1
  100. package/dist/components/Tabular/TabularShowcase.js +1 -1
  101. package/dist/components/Text/TextShowcase.js +2 -2
  102. package/dist/components/Textarea/Textarea.js +32 -34
  103. package/dist/components/Title/Title.js +62 -62
  104. package/dist/components/Title/TitleShowcase.js +1 -1
  105. package/dist/components/ToggleGroup/ToggleGroup.js +7 -7
  106. package/dist/components/ToggleGroup/ToggleGroupShowcase.js +1 -1
  107. package/dist/index-ByKwkZKY.js +239 -0
  108. package/dist/{index-HDl8nGsm.js → index-CriGVLlo.js} +1 -1
  109. package/dist/{index-DZEAOJqB.js → index-DlJ4qUbZ.js} +1 -1
  110. package/dist/main.d.ts +8 -6
  111. package/dist/main.js +212 -207
  112. package/dist/rsc.d.ts +4 -0
  113. package/dist/rsc.js +16 -0
  114. package/dist/styles-scss/_colors.scss +41 -32
  115. package/dist/styles-scss/_typography.scss +5 -5
  116. package/dist/styles-scss/_ui.scss +36 -20
  117. package/dist/styles-scss/global.scss +24 -13
  118. package/dist/styles-scss/themes/theme_cfx.scss +3 -5
  119. package/dist/styles-scss/themes/theme_fivem.scss +5 -7
  120. package/dist/styles-scss/themes/theme_redm.scss +4 -6
  121. package/dist/styles-scss/themes/theme_wireframe.scss +5 -7
  122. package/dist/styles-scss/themes.scss +4 -4
  123. package/dist/styles-scss/tokens.scss +2 -56
  124. package/dist/utils/formatCurrency.d.ts +5 -0
  125. package/dist/utils/formatCurrency.js +35 -0
  126. package/dist/utils/formatDate.d.ts +1 -0
  127. package/dist/utils/formatDate.js +13 -0
  128. package/dist/utils/hooks/useGlobalKeyboardEvent.js +3 -3
  129. package/dist/utils/hooks/useWindowResize.js +5 -5
  130. package/dist/utils/string.d.ts +1 -0
  131. package/dist/utils/string.js +23 -19
  132. package/package.json +10 -5
  133. package/dist/Rail-DcVowhML.js +0 -81
  134. package/dist/Table.module-DHI1mXN2.js +0 -17
  135. package/dist/components/Layout/Box/Box.js +0 -72
  136. package/dist/components/Layout/Box/index.d.ts +0 -2
  137. package/dist/components/Layout/Box/index.js +0 -5
  138. package/dist/components/Layout/Flex/Flex.js +0 -84
  139. package/dist/components/Layout/Scrollable/Rail.js +0 -9
  140. package/dist/components/Layout/Scrollable/Scrollable.js +0 -91
  141. package/dist/index-BHuChyf5.js +0 -238
  142. /package/dist/components/{Layout/Flex → Flex}/FlexShowcase.d.ts +0 -0
  143. /package/dist/components/{Layout/Flex → Flex}/FlexShowcase.js +0 -0
  144. /package/dist/components/{Layout → RSC}/Box/Box.types.d.ts +0 -0
  145. /package/dist/components/{Layout → RSC}/Box/Box.types.js +0 -0
  146. /package/dist/components/{Layout → RSC}/Flex/Flex.types.d.ts +0 -0
  147. /package/dist/components/{Layout → RSC}/Flex/Flex.types.js +0 -0
  148. /package/dist/components/{Layout → RSC}/Flex/FlexRestricter.d.ts +0 -0
  149. /package/dist/components/{Layout → RSC}/Flex/FlexRestricter.js +0 -0
  150. /package/dist/components/{Layout/Scrollable → Scrollable}/Rail.d.ts +0 -0
  151. /package/dist/components/{Layout/Scrollable → Scrollable}/Scrollable.d.ts +0 -0
  152. /package/dist/components/{Layout/Scrollable → Scrollable}/ScrollableShowcase.d.ts +0 -0
  153. /package/dist/components/{Layout/Scrollable → Scrollable}/VirtualScrollable.d.ts +0 -0
  154. /package/dist/components/{Layout/Scrollable → Scrollable}/index.d.ts +0 -0
@@ -1,6 +1,6 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
2
  import { clsx as s } from "../../utils/clsx.js";
3
- import { s as l } from "../../Table.module-DHI1mXN2.js";
3
+ import { s as l } from "../../Table.module-DffST69u.js";
4
4
  function f(r) {
5
5
  const {
6
6
  className: o,
@@ -1,7 +1,7 @@
1
1
  import { jsx as p } from "react/jsx-runtime";
2
2
  import { clsx as d } from "../../utils/clsx.js";
3
3
  import { getColor as r } from "../../utils/color.js";
4
- import { s as o } from "../../Table.module-DHI1mXN2.js";
4
+ import { s as o } from "../../Table.module-DffST69u.js";
5
5
  function u(l) {
6
6
  const {
7
7
  size: s = "normal",
@@ -1,6 +1,6 @@
1
1
  import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
2
  import o from "react";
3
- import i from "../Layout/Flex/Flex.js";
3
+ import i from "../Flex/Flex.js";
4
4
  import { Text as l } from "../Text/Text.js";
5
5
  import "../../utils/ui/ui.js";
6
6
  import { Tabular as m } from "./Tabular.js";
@@ -1,8 +1,8 @@
1
1
  import { jsx as o, jsxs as t, Fragment as a } from "react/jsx-runtime";
2
2
  import s from "react";
3
- import m from "../Layout/Flex/Flex.js";
4
- import { Text as c } from "./Text.js";
3
+ import m from "../Flex/Flex.js";
5
4
  import { Separator as l } from "../Separator/Separator.js";
5
+ import { Text as c } from "./Text.js";
6
6
  const _ = "cfxui__TextShowcase__root__a3632", f = {
7
7
  root: _
8
8
  }, u = "The quick brown fox jumps over the lazy dog.", T = "How vexingly quick daft zebras jump.";
@@ -1,57 +1,55 @@
1
- import { jsx as l, jsxs as T } from "react/jsx-runtime";
2
- import s from "react";
3
- import { clsx as p } from "../../utils/clsx.js";
4
- const g = "cfxui__Textarea__root__688b1", k = "cfxui__Textarea__small__e7551", v = "cfxui__Textarea__large__09eeb", C = "cfxui__Textarea__error__932cb", N = "cfxui__Textarea__disabled__5d783", e = {
5
- root: g,
6
- "full-width": "cfxui__Textarea__full-width__975d6",
7
- small: k,
8
- large: v,
9
- error: C,
10
- disabled: N,
1
+ import { jsx as s, jsxs as p } from "react/jsx-runtime";
2
+ import l from "react";
3
+ import { clsx as T } from "../../utils/clsx.js";
4
+ const k = "cfxui__Textarea__root__688b1", v = "cfxui__Textarea__fullWidth__2e853", B = "cfxui__Textarea__disabled__5d783", C = "cfxui__Textarea__error__932cb", N = "cfxui__Textarea__backdropBlur__15cb2", e = {
5
+ root: k,
6
+ fullWidth: v,
11
7
  "resize-none": "cfxui__Textarea__resize-none__1130d",
12
8
  "resize-vertical": "cfxui__Textarea__resize-vertical__f856e",
13
9
  "resize-horizontal": "cfxui__Textarea__resize-horizontal__b4b8f",
14
10
  "resize-both": "cfxui__Textarea__resize-both__004b8",
15
- "backdrop-blur": "cfxui__Textarea__backdrop-blur__45372"
11
+ disabled: B,
12
+ error: C,
13
+ backdropBlur: N
16
14
  };
17
- function I(c) {
15
+ function F(c) {
18
16
  const {
19
17
  value: i,
20
- onChange: a,
21
- label: r,
18
+ onChange: r,
19
+ label: a,
22
20
  placeholder: n,
23
21
  rows: d,
24
- resize: x = "none",
25
- disabled: _ = !1,
26
- autofocus: u,
27
- className: b,
28
- backdropBlur: f = !1
29
- } = c, h = s.useCallback(
30
- (z) => {
31
- a(z.target.value);
22
+ resize: u = "none",
23
+ disabled: o = !1,
24
+ autofocus: x,
25
+ className: f,
26
+ backdropBlur: b = !1
27
+ } = c, h = l.useCallback(
28
+ (m) => {
29
+ r(m.target.value);
32
30
  },
33
- [a]
34
- ), o = s.useId(), t = /* @__PURE__ */ l(
31
+ [r]
32
+ ), _ = l.useId(), t = /* @__PURE__ */ s(
35
33
  "textarea",
36
34
  {
37
- autoFocus: u,
38
- id: o,
39
- className: e[`resize-${x}`],
35
+ autoFocus: x,
36
+ id: _,
37
+ className: e[`resize-${u}`],
40
38
  rows: d,
41
39
  value: i,
42
- disabled: _,
40
+ disabled: o,
43
41
  onChange: h,
44
42
  placeholder: n
45
43
  }
46
- ), m = p(e.root, b, {
47
- [e.disabled]: _,
48
- [e["backdrop-blur"]]: f
44
+ ), z = T(e.root, f, {
45
+ [e.disabled]: o,
46
+ [e.backdropBlur]: b
49
47
  });
50
- return /* @__PURE__ */ l("div", { className: m, children: r ? /* @__PURE__ */ T("label", { htmlFor: o, children: [
51
- r,
48
+ return /* @__PURE__ */ s("div", { className: z, children: a ? /* @__PURE__ */ p("label", { htmlFor: _, children: [
49
+ a,
52
50
  t
53
51
  ] }) : t });
54
52
  }
55
53
  export {
56
- I as Textarea
54
+ F as Textarea
57
55
  };
@@ -1,14 +1,14 @@
1
- import { jsx as h, jsxs as k, Fragment as M } from "react/jsx-runtime";
1
+ import { jsx as h, jsxs as C, Fragment as M } from "react/jsx-runtime";
2
2
  import s from "react";
3
- import { clsx as w } from "../../utils/clsx.js";
3
+ import { clsx as O } from "../../utils/clsx.js";
4
4
  import "../../utils/hooks/useGlobalKeyboardEvent.js";
5
5
  import "../../utils/hooks/useKeyboardClose.js";
6
6
  import { useOutlet as y } from "../../utils/hooks/useOutlet.js";
7
- import { mergeRefs as C } from "../../utils/mergeRefs.js";
8
- const N = "cfxui__Title__wrapper__ec63b", $ = "cfxui__Title__appearance__9b5a4", A = "cfxui__Title__animated__151a8", F = "cfxui__Title__root__0f286", I = "cfxui__Title__shortcut__85352", p = {
9
- wrapper: N,
10
- appearance: $,
11
- animated: A,
7
+ import { mergeRefs as N } from "../../utils/mergeRefs.js";
8
+ const $ = "cfxui__Title__wrapper__ec63b", A = "cfxui__Title__appearance__9b5a4", F = "cfxui__Title__animated__151a8", I = "cfxui__Title__root__0f286", S = "cfxui__Title__shortcut__85352", p = {
9
+ wrapper: $,
10
+ appearance: A,
11
+ animated: F,
12
12
  "fixed-on-top": "cfxui__Title__fixed-on-top__100f6",
13
13
  "fixed-on-top-left": "cfxui__Title__fixed-on-top-left__ec383",
14
14
  "fixed-on-bottom": "cfxui__Title__fixed-on-bottom__a00c2",
@@ -16,107 +16,107 @@ const N = "cfxui__Title__wrapper__ec63b", $ = "cfxui__Title__appearance__9b5a4",
16
16
  "fixed-on-bottom-right": "cfxui__Title__fixed-on-bottom-right__58fb5",
17
17
  "fixed-on-left": "cfxui__Title__fixed-on-left__01d9d",
18
18
  "fixed-on-right": "cfxui__Title__fixed-on-right__2c799",
19
- root: F,
20
- shortcut: I
21
- }, a = 10, S = "title-outlet";
22
- function j(u, f, [e, r]) {
23
- const n = u ? r : r - 20, i = u ? e : e + 16;
19
+ root: I,
20
+ shortcut: S
21
+ }, _ = 10, j = "title-outlet";
22
+ function D(l, f, [e, o]) {
23
+ const r = l ? o : o - 20, n = l ? e : e + 16;
24
24
  return {
25
- top: `${n}px`,
26
- left: `${i}px`,
27
- maxWidth: `calc(100vw - ${i}px - 10px)`,
25
+ top: `${r}px`,
26
+ left: `${n}px`,
27
+ maxWidth: `calc(100vw - ${n}px - 10px)`,
28
28
  animationDelay: `${f}ms`
29
29
  };
30
30
  }
31
- function D(u, f) {
31
+ function G(l, f) {
32
32
  const {
33
33
  x: e,
34
- y: r,
35
- width: n,
36
- height: i
37
- } = u.getBoundingClientRect();
38
- let c = 0, t = 0;
34
+ y: o,
35
+ width: r,
36
+ height: n
37
+ } = l.getBoundingClientRect();
38
+ let i = 0, t = 0;
39
39
  switch (f) {
40
40
  case "top":
41
- c = e + n / 2, t = r - a;
41
+ i = e + r / 2, t = o - _;
42
42
  break;
43
43
  case "top-left":
44
- c = e, t = r - a;
44
+ i = e, t = o - _;
45
45
  break;
46
46
  case "bottom":
47
- c = e + n / 2, t = r + i + a;
47
+ i = e + r / 2, t = o + n + _;
48
48
  break;
49
49
  case "bottom-left":
50
- c = e, t = r + i + a;
50
+ i = e, t = o + n + _;
51
51
  break;
52
52
  case "bottom-right":
53
- c = e + n, t = r + i + a;
53
+ i = e + r, t = o + n + _;
54
54
  break;
55
55
  case "left":
56
- c = e - a, t = r + i / 2;
56
+ i = e - _, t = o + n / 2;
57
57
  break;
58
58
  case "right":
59
- c = e + n + a, t = r + i / 2;
59
+ i = e + r + _, t = o + n / 2;
60
60
  break;
61
61
  }
62
- return [c, t];
62
+ return [i, t];
63
63
  }
64
- function z(u) {
64
+ function H(l) {
65
65
  const {
66
66
  title: f,
67
67
  children: e,
68
- animated: r = !0,
69
- fixedOn: n = "bottom",
70
- delay: i = 0,
71
- className: c = "",
68
+ animated: o = !0,
69
+ fixedOn: r = "bottom",
70
+ delay: n = 0,
71
+ className: i = "",
72
72
  suppressMouseActivation: t = !1,
73
73
  active: b = !1,
74
74
  rootClassName: v = ""
75
- } = u, l = s.useRef(n), m = s.useRef([0, 0]);
76
- l.current = n;
77
- const T = y(S), o = s.useRef(null), [E, x] = s.useState(!1);
75
+ } = l, m = s.useRef(r), d = s.useRef([0, 0]);
76
+ m.current = r;
77
+ const T = y(j), a = s.useRef(null), [E, x] = s.useState(!1);
78
78
  s.useEffect(() => {
79
79
  t && x(b);
80
80
  }, [b, t]), s.useEffect(() => {
81
- if (!o.current)
81
+ if (!a.current)
82
82
  return;
83
- const d = (_) => {
84
- l.current && o.current ? m.current = D(o.current, l.current) : m.current = [_.clientX, _.clientY], t || x(!0);
85
- }, g = () => {
83
+ const c = a.current, g = (u) => {
84
+ m.current && a.current ? d.current = G(a.current, m.current) : d.current = [u.clientX, u.clientY], t || x(!0);
85
+ }, L = () => {
86
86
  t || x(!1);
87
- }, L = (_) => {
88
- l.current || (m.current = [_.clientX, _.clientY]);
87
+ }, w = (u) => {
88
+ m.current || (d.current = [u.clientX, u.clientY]);
89
89
  };
90
- return o.current.addEventListener("mouseenter", d), o.current.addEventListener("mouseleave", g), o.current.addEventListener("mousemove", L), () => {
91
- o.current && (o.current.removeEventListener("mouseenter", d), o.current.removeEventListener("mouseleave", g), o.current.removeEventListener("mousemove", L));
90
+ return c.addEventListener("mouseenter", g), c.addEventListener("mouseleave", L), c.addEventListener("mousemove", w), () => {
91
+ c && (c.removeEventListener("mouseenter", g), c.removeEventListener("mouseleave", L), c.removeEventListener("mousemove", w));
92
92
  };
93
93
  }, [t]);
94
- const O = s.useMemo(() => {
94
+ const R = s.useMemo(() => {
95
95
  if (!E || !f)
96
96
  return null;
97
- const d = w(
97
+ const c = O(
98
98
  p.wrapper,
99
- p[`fixed-on-${n}`],
99
+ p[`fixed-on-${r}`],
100
100
  {
101
- [p.animated]: r
101
+ [p.animated]: o
102
102
  },
103
- c
103
+ i
104
104
  );
105
- return /* @__PURE__ */ h(T, { children: /* @__PURE__ */ h("div", { className: d, style: j(!!n, i, m.current), children: /* @__PURE__ */ h("div", { className: w(p.root, v), children: f }) }) });
106
- }, [E, f, n, r, T, i, c, v]), R = s.useMemo(
107
- () => typeof e == "function" ? e(o) : s.cloneElement(e, {
108
- ref: C(o, e.props.ref)
105
+ return /* @__PURE__ */ h(T, { children: /* @__PURE__ */ h("div", { className: c, style: D(!!r, n, d.current), children: /* @__PURE__ */ h("div", { className: O(p.root, v), children: f }) }) });
106
+ }, [E, f, r, o, T, n, i, v]), k = s.useMemo(
107
+ () => typeof e == "function" ? e(a) : s.cloneElement(e, {
108
+ ref: N(a, e.props.ref)
109
109
  }),
110
- [e, o]
110
+ [e, a]
111
111
  );
112
- return /* @__PURE__ */ k(M, { children: [
113
- R,
114
- O
112
+ return /* @__PURE__ */ C(M, { children: [
113
+ k,
114
+ R
115
115
  ] });
116
116
  }
117
117
  export {
118
- S as TITLE_OUTLET_ID,
119
- z as Title,
120
- D as titleGetCoords,
121
- j as titleGetCssStyle
118
+ j as TITLE_OUTLET_ID,
119
+ H as Title,
120
+ G as titleGetCoords,
121
+ D as titleGetCssStyle
122
122
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
2
  import i from "react";
3
- import r from "../Layout/Flex/Flex.js";
3
+ import r from "../Flex/Flex.js";
4
4
  import { Text as o } from "../Text/Text.js";
5
5
  import "../../utils/ui/ui.js";
6
6
  import { Title as l } from "./Title.js";
@@ -2,16 +2,16 @@ import { jsxs as d, jsx as p } from "react/jsx-runtime";
2
2
  import n from "react";
3
3
  import { Interactive as C } from "../Interactive/Interactive.js";
4
4
  import { clsx as _ } from "../../utils/clsx.js";
5
- const M = "cfxui__ToggleGroup__root__fb460", D = "cfxui__ToggleGroup__disabled__75462", j = "cfxui__ToggleGroup__descripted__8e168", k = "cfxui__ToggleGroup__multiline__6b784", E = "cfxui__ToggleGroup__options__7bc0c", L = "cfxui__ToggleGroup__option__8436c", O = "cfxui__ToggleGroup__fullWidth__0c589", S = "cfxui__ToggleGroup__description__9429c", w = "cfxui__ToggleGroup__active__84da0", o = {
5
+ const M = "cfxui__ToggleGroup__root__fb460", D = "cfxui__ToggleGroup__disabled__75462", j = "cfxui__ToggleGroup__descripted__8e168", k = "cfxui__ToggleGroup__fullWidth__0c589", E = "cfxui__ToggleGroup__description__9429c", L = "cfxui__ToggleGroup__options__7bc0c", O = "cfxui__ToggleGroup__option__8436c", S = "cfxui__ToggleGroup__active__84da0", w = "cfxui__ToggleGroup__multiline__6b784", o = {
6
6
  root: M,
7
7
  disabled: D,
8
8
  descripted: j,
9
- multiline: k,
10
- options: E,
11
- option: L,
12
- fullWidth: O,
13
- description: S,
14
- active: w
9
+ fullWidth: k,
10
+ description: E,
11
+ options: L,
12
+ option: O,
13
+ active: S,
14
+ multiline: w
15
15
  }, f = (r, s) => {
16
16
  var e;
17
17
  return ((e = s.find((i) => i.value === r)) == null ? void 0 : e.description) || "";
@@ -1,6 +1,6 @@
1
1
  import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
2
  import u from "react";
3
- import r from "../Layout/Flex/Flex.js";
3
+ import r from "../Flex/Flex.js";
4
4
  import { Text as a } from "../Text/Text.js";
5
5
  import "../../utils/ui/ui.js";
6
6
  import { ToggleGroup as i } from "./ToggleGroup.js";
@@ -0,0 +1,239 @@
1
+ import * as i from "react";
2
+ import { jsx as y } from "react/jsx-runtime";
3
+ import { r as w } from "./index-Cl_RnsqN.js";
4
+ function b(e, n) {
5
+ if (typeof e == "function")
6
+ return e(n);
7
+ e != null && (e.current = n);
8
+ }
9
+ function g(...e) {
10
+ return (n) => {
11
+ let o = !1;
12
+ const s = e.map((t) => {
13
+ const r = b(t, n);
14
+ return !o && typeof r == "function" && (o = !0), r;
15
+ });
16
+ if (o)
17
+ return () => {
18
+ for (let t = 0; t < s.length; t++) {
19
+ const r = s[t];
20
+ typeof r == "function" ? r() : b(e[t], null);
21
+ }
22
+ };
23
+ };
24
+ }
25
+ function E(...e) {
26
+ return i.useCallback(g(...e), e);
27
+ }
28
+ function B(e, n = []) {
29
+ let o = [];
30
+ function s(r, u) {
31
+ const c = i.createContext(u), l = o.length;
32
+ o = [...o, u];
33
+ const f = (a) => {
34
+ var v;
35
+ const { scope: p, children: h, ...m } = a, S = ((v = p == null ? void 0 : p[e]) == null ? void 0 : v[l]) || c, x = i.useMemo(() => m, Object.values(m));
36
+ return /* @__PURE__ */ y(S.Provider, { value: x, children: h });
37
+ };
38
+ f.displayName = r + "Provider";
39
+ function d(a, p) {
40
+ var S;
41
+ const h = ((S = p == null ? void 0 : p[e]) == null ? void 0 : S[l]) || c, m = i.useContext(h);
42
+ if (m) return m;
43
+ if (u !== void 0) return u;
44
+ throw new Error(`\`${a}\` must be used within \`${r}\``);
45
+ }
46
+ return [f, d];
47
+ }
48
+ const t = () => {
49
+ const r = o.map((u) => i.createContext(u));
50
+ return function(c) {
51
+ const l = (c == null ? void 0 : c[e]) || r;
52
+ return i.useMemo(
53
+ () => ({ [`__scope${e}`]: { ...c, [e]: l } }),
54
+ [c, l]
55
+ );
56
+ };
57
+ };
58
+ return t.scopeName = e, [s, P(t, ...n)];
59
+ }
60
+ function P(...e) {
61
+ const n = e[0];
62
+ if (e.length === 1) return n;
63
+ const o = () => {
64
+ const s = e.map((t) => ({
65
+ useScope: t(),
66
+ scopeName: t.scopeName
67
+ }));
68
+ return function(r) {
69
+ const u = s.reduce((c, { useScope: l, scopeName: f }) => {
70
+ const a = l(r)[`__scope${f}`];
71
+ return { ...c, ...a };
72
+ }, {});
73
+ return i.useMemo(() => ({ [`__scope${n.scopeName}`]: u }), [u]);
74
+ };
75
+ };
76
+ return o.scopeName = n.scopeName, o;
77
+ }
78
+ function k(e, n, { checkForDefaultPrevented: o = !0 } = {}) {
79
+ return function(t) {
80
+ if (e == null || e(t), o === !1 || !t.defaultPrevented)
81
+ return n == null ? void 0 : n(t);
82
+ };
83
+ }
84
+ var C = globalThis != null && globalThis.document ? i.useLayoutEffect : () => {
85
+ }, R = i[" useInsertionEffect ".trim().toString()] || C;
86
+ function L({
87
+ prop: e,
88
+ defaultProp: n,
89
+ onChange: o = () => {
90
+ },
91
+ caller: s
92
+ }) {
93
+ const [t, r, u] = $({
94
+ defaultProp: n,
95
+ onChange: o
96
+ }), c = e !== void 0, l = c ? e : t;
97
+ {
98
+ const d = i.useRef(e !== void 0);
99
+ i.useEffect(() => {
100
+ const a = d.current;
101
+ a !== c && console.warn(
102
+ `${s} is changing from ${a ? "controlled" : "uncontrolled"} to ${c ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
103
+ ), d.current = c;
104
+ }, [c, s]);
105
+ }
106
+ const f = i.useCallback(
107
+ (d) => {
108
+ var a;
109
+ if (c) {
110
+ const p = z(d) ? d(e) : d;
111
+ p !== e && ((a = u.current) == null || a.call(u, p));
112
+ } else
113
+ r(d);
114
+ },
115
+ [c, e, r, u]
116
+ );
117
+ return [l, f];
118
+ }
119
+ function $({
120
+ defaultProp: e,
121
+ onChange: n
122
+ }) {
123
+ const [o, s] = i.useState(e), t = i.useRef(o), r = i.useRef(n);
124
+ return R(() => {
125
+ r.current = n;
126
+ }, [n]), i.useEffect(() => {
127
+ var u;
128
+ t.current !== o && ((u = r.current) == null || u.call(r, o), t.current = o);
129
+ }, [o, t]), [o, s, r];
130
+ }
131
+ function z(e) {
132
+ return typeof e == "function";
133
+ }
134
+ function T(e) {
135
+ const [n, o] = i.useState(void 0);
136
+ return C(() => {
137
+ if (e) {
138
+ o({ width: e.offsetWidth, height: e.offsetHeight });
139
+ const s = new ResizeObserver((t) => {
140
+ if (!Array.isArray(t) || !t.length)
141
+ return;
142
+ const r = t[0];
143
+ let u, c;
144
+ if ("borderBoxSize" in r) {
145
+ const l = r.borderBoxSize, f = Array.isArray(l) ? l[0] : l;
146
+ u = f.inlineSize, c = f.blockSize;
147
+ } else
148
+ u = e.offsetWidth, c = e.offsetHeight;
149
+ o({ width: u, height: c });
150
+ });
151
+ return s.observe(e, { box: "border-box" }), () => s.unobserve(e);
152
+ } else
153
+ o(void 0);
154
+ }, [e]), n;
155
+ }
156
+ // @__NO_SIDE_EFFECTS__
157
+ function _(e) {
158
+ const n = /* @__PURE__ */ O(e), o = i.forwardRef((s, t) => {
159
+ const { children: r, ...u } = s, c = i.Children.toArray(r), l = c.find(N);
160
+ if (l) {
161
+ const f = l.props.children, d = c.map((a) => a === l ? i.Children.count(f) > 1 ? i.Children.only(null) : i.isValidElement(f) ? f.props.children : null : a);
162
+ return /* @__PURE__ */ y(n, { ...u, ref: t, children: i.isValidElement(f) ? i.cloneElement(f, void 0, d) : null });
163
+ }
164
+ return /* @__PURE__ */ y(n, { ...u, ref: t, children: r });
165
+ });
166
+ return o.displayName = `${e}.Slot`, o;
167
+ }
168
+ // @__NO_SIDE_EFFECTS__
169
+ function O(e) {
170
+ const n = i.forwardRef((o, s) => {
171
+ const { children: t, ...r } = o, u = i.isValidElement(t) ? I(t) : void 0, c = E(u, s);
172
+ if (i.isValidElement(t)) {
173
+ const l = D(r, t.props);
174
+ return t.type !== i.Fragment && (l.ref = c), i.cloneElement(t, l);
175
+ }
176
+ return i.Children.count(t) > 1 ? i.Children.only(null) : null;
177
+ });
178
+ return n.displayName = `${e}.SlotClone`, n;
179
+ }
180
+ var A = Symbol("radix.slottable");
181
+ function N(e) {
182
+ return i.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === A;
183
+ }
184
+ function D(e, n) {
185
+ const o = { ...n };
186
+ for (const s in n) {
187
+ const t = e[s], r = n[s];
188
+ /^on[A-Z]/.test(s) ? t && r ? o[s] = (...c) => {
189
+ const l = r(...c);
190
+ return t(...c), l;
191
+ } : t && (o[s] = t) : s === "style" ? o[s] = { ...t, ...r } : s === "className" && (o[s] = [t, r].filter(Boolean).join(" "));
192
+ }
193
+ return { ...e, ...o };
194
+ }
195
+ function I(e) {
196
+ var s, t;
197
+ let n = (s = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : s.get, o = n && "isReactWarning" in n && n.isReactWarning;
198
+ return o ? e.ref : (n = (t = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : t.get, o = n && "isReactWarning" in n && n.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
199
+ }
200
+ var V = [
201
+ "a",
202
+ "button",
203
+ "div",
204
+ "form",
205
+ "h2",
206
+ "h3",
207
+ "img",
208
+ "input",
209
+ "label",
210
+ "li",
211
+ "nav",
212
+ "ol",
213
+ "p",
214
+ "select",
215
+ "span",
216
+ "svg",
217
+ "ul"
218
+ ], F = V.reduce((e, n) => {
219
+ const o = /* @__PURE__ */ _(`Primitive.${n}`), s = i.forwardRef((t, r) => {
220
+ const { asChild: u, ...c } = t, l = u ? o : n;
221
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ y(l, { ...c, ref: r });
222
+ });
223
+ return s.displayName = `Primitive.${n}`, { ...e, [n]: s };
224
+ }, {});
225
+ function M(e, n) {
226
+ e && w.flushSync(() => e.dispatchEvent(n));
227
+ }
228
+ export {
229
+ F as P,
230
+ C as a,
231
+ _ as b,
232
+ B as c,
233
+ L as d,
234
+ k as e,
235
+ T as f,
236
+ M as g,
237
+ g as h,
238
+ E as u
239
+ };
@@ -1,5 +1,5 @@
1
1
  import * as a from "react";
2
- import { u as T, a as A } from "./index-BHuChyf5.js";
2
+ import { u as T, a as A } from "./index-ByKwkZKY.js";
3
3
  function E(n, e) {
4
4
  return a.useReducer((r, t) => e[r][t] ?? r, n);
5
5
  }
@@ -1,6 +1,6 @@
1
1
  import * as A from "react";
2
2
  import r from "react";
3
- import { c as D, u as S, b as M } from "./index-BHuChyf5.js";
3
+ import { c as D, u as S, b as M } from "./index-ByKwkZKY.js";
4
4
  import { jsx as d } from "react/jsx-runtime";
5
5
  function g(l) {
6
6
  const i = l + "CollectionProvider", [N, _] = D(i), [v, f] = N(
package/dist/main.d.ts CHANGED
@@ -4,6 +4,8 @@ export { getValue } from './utils/getValue';
4
4
  export type { ValueOrGetter } from './utils/getValue';
5
5
  export { useInstance, useDynamicRef, useGlobalKeyboardEvent, useKeyboardClose, useWindowResize, useOutlet, usePopoverController, useClipboardComponent, CLIPBOARD_TITLE_APPEARANCE, } from './utils/hooks';
6
6
  export type { OutletPosition, UseClipboardProps, } from './utils/hooks';
7
+ export { formatDate } from './utils/formatDate';
8
+ export { formatCurrency } from './utils/formatCurrency';
7
9
  export { noop, returnTrue, returnFalse, identity, invoke, } from './utils/functional';
8
10
  export { isExternalUrl, matchLinks, matchLinkNodes, defaultLinkReplacerx, defaultLinkReplacer, linkifyx, linkify, Linkify, } from './utils/links';
9
11
  export type { ILinkSubstitute, ILinkMatch, LinkifyProps, } from './utils/links';
@@ -64,18 +66,18 @@ export { Interactive } from './components/Interactive';
64
66
  export type { InteractiveProps } from './components/Interactive';
65
67
  export { Island, IslandCorner } from './components/Island';
66
68
  export type { IslandProps } from './components/Island';
67
- export { Box, stringPropFormater } from './components/Layout/Box';
68
- export type { BoxProps } from './components/Layout/Box';
69
+ export { Box, stringPropFormater } from './components/Box';
70
+ export type { BoxProps } from './components/Box';
69
71
  export { Center } from './components/Layout/Center';
70
72
  export type { CenterProps } from './components/Layout/Center';
71
- export { Flex, FlexRestricter, FlexAlignItemsEnum, FlexDirectionEnum, FlexJustifyContentEnum, FlexWrapEnum, } from './components/Layout/Flex';
72
- export type { FlexProps, FlexRestricterProps, FlexAlignItemsType, FlexDirectionType, FlexJustifyContentType, FlexWrapType, } from './components/Layout/Flex';
73
+ export { Flex, FlexRestricter, FlexAlignItemsEnum, FlexDirectionEnum, FlexJustifyContentEnum, FlexWrapEnum, } from './components/Flex';
74
+ export type { FlexProps, FlexRestricterProps, FlexAlignItemsType, FlexDirectionType, FlexJustifyContentType, FlexWrapType, } from './components/Flex';
73
75
  export { Pad } from './components/Layout/Pad';
74
76
  export type { PadProps } from './components/Layout/Pad';
75
77
  export { Page } from './components/Layout/Page';
76
78
  export type { PageProps } from './components/Layout/Page';
77
- export { Scrollable, VirtualScrollable, Rail, } from './components/Layout/Scrollable';
78
- export type { ScrollableProps, VirtualScrollableProps, RailProps, } from './components/Layout/Scrollable';
79
+ export { Scrollable, VirtualScrollable, Rail, } from './components/Scrollable';
80
+ export type { ScrollableProps, VirtualScrollableProps, RailProps, } from './components/Scrollable';
79
81
  export { Loaf } from './components/Loaf';
80
82
  export type { LoafProps, LoafSize, LoafColor, } from './components/Loaf';
81
83
  export { Modal } from './components/Modal';