@cfx-dev/ui-components 4.2.23 → 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 +7 -5
  152. package/dist/main.js +181 -179
  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,3 +1,3 @@
1
1
  import { default as React } from 'react';
2
2
 
3
- export declare function mergeRefs<T = any>(...refs: (React.MutableRefObject<T> | React.LegacyRef<T> | undefined)[]): React.RefCallback<T>;
3
+ export declare function mergeRefs<T = unknown>(...refs: (React.RefCallback<T> | React.RefObject<T> | undefined | null)[]): React.RefCallback<T>;
@@ -1,7 +1,7 @@
1
1
  function o(...e) {
2
2
  return (t) => {
3
3
  e.forEach((n) => {
4
- typeof n == "function" ? n(t) : n != null && (n.current = t);
4
+ typeof n == "function" ? n(t) : n && (n.current = t);
5
5
  });
6
6
  };
7
7
  }
@@ -35,6 +35,7 @@ export declare namespace ui {
35
35
  export const getOffsetStyles: (name: string, value?: ResponsiveValueType<OffsetType | number>) => import("react").CSSProperties;
36
36
  type CallbackType<T> = (name: string, value: ResponsiveOffsetType) => T;
37
37
  export function callAllMPProps<T extends object>(props: Partial<MPProps>, callback: CallbackType<T>): T;
38
+ export const optimizeMPProps: (props: Partial<MPProps>) => Partial<MPProps>;
38
39
  export const getAllMPStyles: (props: Partial<MPProps>) => React.CSSProperties;
39
40
  export const getAllMPClassnames: (props: Partial<MPProps>) => string;
40
41
  export {};
@@ -1,68 +1,77 @@
1
- import { clsx as d } from "../clsx.js";
2
- var g;
1
+ import { clsx as m } from "../clsx.js";
2
+ var d;
3
3
  ((t) => {
4
- function i(e = 1) {
4
+ function f(e = 1) {
5
5
  return `calc(var(--quant) * ${e})`;
6
6
  }
7
- t.q = i;
8
- function u(e) {
7
+ t.q = f;
8
+ function p(e) {
9
9
  return `var(--offset-${e})`;
10
10
  }
11
- t.offset = u;
11
+ t.offset = p;
12
12
  function b(e = "normal") {
13
13
  return `var(--font-size-${e})`;
14
14
  }
15
15
  t.fontSize = b;
16
- function m(e = "first") {
16
+ function y(e = "first") {
17
17
  return `var(--zindex-${e})`;
18
18
  }
19
- t.zindex = m;
20
- function y(e = "normal") {
19
+ t.zindex = y;
20
+ function g(e = "normal") {
21
21
  return `var(--line-height-${e})`;
22
22
  }
23
- t.lineHeight = y;
24
- function h(e = "normal") {
23
+ t.lineHeight = g;
24
+ function x(e = "normal") {
25
25
  return `var(--border-radius-${e})`;
26
26
  }
27
- t.borderRadius = h;
28
- function x(e, r, o = 1) {
27
+ t.borderRadius = x;
28
+ function h(e, r, o = 1) {
29
29
  let n = r;
30
30
  return n === "pure" && (n = ""), typeof n == "number" && (n = `${n}`), `rgba(var(--color-${e}${n ? `-${n}` : ""}), ${o})`;
31
31
  }
32
- t.color = x, ((e) => {
32
+ t.color = h, ((e) => {
33
33
  e.fullWidth = "util-full-width", e.fullHeight = "util-full-height", e.flexGrow = "util-flex-grow", e.flexNoShrink = "util-flex-no-shrink", e.userSelectableText = "util-text-selectable", e.zIndex9000 = "util-z-index-9000";
34
34
  })(t.cls || (t.cls = {})), t.pc = (e) => `${e}%`, t.px = (e) => `${e}px`, t.ch = (e) => `${e}ch`, t.em = (e) => `${e}em`, t.rem = (e) => `${e}rem`, t.vh = (e) => `${e}vh`, t.vw = (e) => `${e}vw`, t.url = (e) => `url(${e})`;
35
- function f(e) {
36
- return e == null ? "" : typeof e == "number" ? i(e) : e.toString();
35
+ function l(e) {
36
+ return e == null ? "" : typeof e == "number" ? f(e) : e.toString();
37
37
  }
38
- t.defaultResponsiveValueFormatter = f;
39
- function $(e, r, o = f) {
40
- return r == null ? {} : typeof r == "object" && !Array.isArray(r) ? Object.entries(r).reduce((n, [s, l]) => (n[`--${e}-${s}`] = o(l), n), {}) : {
38
+ t.defaultResponsiveValueFormatter = l;
39
+ function u(e, r, o = l) {
40
+ return r == null ? {} : typeof r == "object" && !Array.isArray(r) ? Object.entries(r).reduce((n, [i, s]) => (n[`--${e}-${i}`] = o(s), n), {}) : {
41
41
  [`--${e}-initial`]: o(r)
42
42
  };
43
43
  }
44
- t.getResponsiveStyles = $;
45
- function a(e, r) {
46
- return r == null ? "" : typeof r == "object" && !Array.isArray(r) ? d(Object.keys(r).map((o) => `ui-${e}-${o}`)) : `ui-${e}-initial`;
44
+ t.getResponsiveStyles = u;
45
+ function c(e, r) {
46
+ return r == null ? "" : typeof r == "object" && !Array.isArray(r) ? m(Object.keys(r).map((o) => `ui-${e}-${o}`)) : `ui-${e}-initial`;
47
47
  }
48
- t.getResponsiveClassnames = a;
49
- function R(e, r, o = f) {
50
- return r == null ? [] : typeof r == "object" && !Array.isArray(r) ? Object.entries(r).reduce((n, [s, l]) => (n.push(`${e}-${s}-${o(l)}`), n), []) : [`${e}-initial-${o(r)}`];
48
+ t.getResponsiveClassnames = c;
49
+ function P(e, r, o = l) {
50
+ return r == null ? [] : typeof r == "object" && !Array.isArray(r) ? Object.entries(r).reduce((n, [i, s]) => (n.push(`${e}-${i}-${o(s)}`), n), []) : [`${e}-initial-${o(r)}`];
51
51
  }
52
- t.getResponsiveFlatClassnames = R;
53
- function c(e) {
54
- return typeof e == "number" ? i(e) : u(e);
52
+ t.getResponsiveFlatClassnames = P;
53
+ function $(e) {
54
+ return typeof e == "number" ? f(e) : p(e);
55
55
  }
56
- t.offsetResponsiveValueFormatter = c, t.getOffsetStyles = (e, r) => $(e, r, c);
57
- function p(e, r) {
58
- return Object.entries(e).reduce((o, [n, s]) => (Object.assign(o, r(n, s)), o), {});
56
+ t.offsetResponsiveValueFormatter = $, t.getOffsetStyles = (e, r) => u(e, r, $);
57
+ function a(e, r) {
58
+ return Object.entries(e).reduce((o, [n, i]) => (Object.assign(o, r(n, i)), o), {});
59
59
  }
60
- t.callAllMPProps = p, t.getAllMPStyles = (e) => p(e, t.getOffsetStyles), t.getAllMPClassnames = (e) => d(
61
- Object.entries(e).map(
62
- ([r, o]) => a(r, o)
60
+ t.callAllMPProps = a, t.optimizeMPProps = (e) => {
61
+ const {
62
+ px: r,
63
+ py: o,
64
+ mx: n,
65
+ my: i,
66
+ ...s
67
+ } = e;
68
+ return r && (s.pr = r, s.pl = r), o && (s.pt = o, s.pb = o), n && (s.mr = n, s.ml = n), i && (s.mt = i, s.mb = i), s;
69
+ }, t.getAllMPStyles = (e) => a((0, t.optimizeMPProps)(e), t.getOffsetStyles), t.getAllMPClassnames = (e) => m(
70
+ Object.entries((0, t.optimizeMPProps)(e)).map(
71
+ ([r, o]) => c(r, o)
63
72
  )
64
73
  );
65
- })(g || (g = {}));
74
+ })(d || (d = {}));
66
75
  export {
67
- g as ui
76
+ d as ui
68
77
  };
@@ -78,9 +78,13 @@ export interface MPProps {
78
78
  mr?: ResponsiveOffsetType;
79
79
  mb?: ResponsiveOffsetType;
80
80
  ml?: ResponsiveOffsetType;
81
+ my?: ResponsiveOffsetType;
82
+ mx?: ResponsiveOffsetType;
81
83
  p?: ResponsiveOffsetType;
82
84
  pt?: ResponsiveOffsetType;
83
85
  pr?: ResponsiveOffsetType;
84
86
  pb?: ResponsiveOffsetType;
85
87
  pl?: ResponsiveOffsetType;
88
+ py?: ResponsiveOffsetType;
89
+ px?: ResponsiveOffsetType;
86
90
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cfx-dev/ui-components",
3
3
  "private": false,
4
- "version": "4.2.23",
4
+ "version": "4.3.0",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "dist/main.js",
@@ -31,8 +31,8 @@
31
31
  "@radix-ui/react-switch": "^1.1.0",
32
32
  "autolinker": "^3.14.3",
33
33
  "flag-icons": "^6.1.1",
34
- "react": "^18.3.0",
35
- "react-dom": "^18.3.0",
34
+ "react": "^19.0.0",
35
+ "react-dom": "^19.0.0",
36
36
  "react-dropzone": "^14.2.3",
37
37
  "react-focus-lock": "^2.9.1",
38
38
  "react-icons": "^4.4.0",
@@ -51,13 +51,14 @@
51
51
  "@storybook/react-vite": "^8.1.5",
52
52
  "@storybook/test": "^8.1.5",
53
53
  "@types/node": "^20.12.13",
54
- "@types/react": "^18.3.12",
55
- "@types/react-dom": "^18.3.1",
54
+ "@types/react": "^19.0.0",
55
+ "@types/react-dom": "^19.0.0",
56
56
  "@types/react-window": "^1.8.8",
57
57
  "@vitejs/plugin-react": "^4.2.1",
58
58
  "eslint": "^8.57.0",
59
59
  "eslint-plugin-storybook": "^0.8.0",
60
60
  "glob": "^10.4.1",
61
+ "remark-gfm": "^4.0.1",
61
62
  "sass": "^1.77.4",
62
63
  "storybook": "^8.1.5",
63
64
  "typescript": "^5.2.2",