@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.
- package/dist/Combination-CSgOhzm-.js +2198 -0
- package/dist/Combination-N-vN9BB-.js +823 -0
- package/dist/Table.module-DHI1mXN2.js +17 -0
- package/dist/assets/all_css.css +1 -0
- package/dist/assets/css/Checkbox.css +1 -1
- package/dist/assets/css/DataTable.css +1 -0
- package/dist/assets/css/Table.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/cfxIcons-B9nzO6TW.js +98 -0
- package/dist/components/Accordion/Accordion.js +25 -26
- package/dist/components/Accordion/AccordionShowcase.js +1 -1
- package/dist/components/Avatar/Avatar.d.ts +2 -1
- package/dist/components/Avatar/Avatar.js +21 -20
- package/dist/components/Avatar/AvatarShowcase.js +1 -1
- package/dist/components/Badge/Badge.d.ts +2 -1
- package/dist/components/Badge/Badge.js +29 -29
- package/dist/components/Badge/BadgeShowcase.js +1 -1
- package/dist/components/BurgerMenu/BurgerMenu.js +2 -2
- package/dist/components/BurgerMenu/BurgerMenuButton.js +1 -1
- package/dist/components/BurgerMenu/BurgerMenuShowcase.js +1 -1
- package/dist/components/Button/Button.d.ts +5 -2
- package/dist/components/Button/Button.js +83 -81
- package/dist/components/Button/ButtonShowcase.js +2 -2
- package/dist/components/Button/LinkButton.d.ts +1 -1
- package/dist/components/Button/LinkButton.js +18 -17
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/index.js +7 -7
- package/dist/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.js +154 -242
- package/dist/components/ClipboardButton/ClipboardButton.js +7 -7
- package/dist/components/ControlBox/ControlBox.d.ts +3 -2
- package/dist/components/ControlBox/ControlBox.js +13 -10
- package/dist/components/CountryFlag/CountryFlag.d.ts +3 -2
- package/dist/components/CountryFlag/CountryFlag.js +14 -11
- package/dist/components/DataTable/DataTable.d.ts +40 -0
- package/dist/components/DataTable/DataTable.js +163 -0
- package/dist/components/DataTable/DataTableShowcase.d.ts +5 -0
- package/dist/components/DataTable/DataTableShowcase.js +60 -0
- package/dist/components/DataTable/index.d.ts +2 -0
- package/dist/components/DataTable/index.js +6 -0
- package/dist/components/Decorate/Decorate.d.ts +3 -2
- package/dist/components/Decorate/Decorate.js +19 -15
- package/dist/components/Dot/Dot.d.ts +2 -1
- package/dist/components/Dot/Dot.js +15 -13
- package/dist/components/DropdownSelect/DropdownSelect.d.ts +2 -1
- package/dist/components/DropdownSelect/DropdownSelect.js +665 -1836
- package/dist/components/DropdownSelect/DropdownSelectShowcase.js +1 -1
- package/dist/components/Flyout/Flyout.d.ts +2 -1
- package/dist/components/Flyout/Flyout.js +22 -20
- package/dist/components/Icon/Icon.d.ts +2 -1
- package/dist/components/Icon/Icon.js +19 -17
- package/dist/components/IconBig/IconBig.d.ts +2 -1
- package/dist/components/IconBig/IconBig.js +16 -14
- package/dist/components/Icons/IconsShowcase.js +1 -1
- package/dist/components/Icons/cfx-icons/Radio.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/Radio.js +36 -0
- package/dist/components/Icons/cfx-icons/Square.js +15 -9
- package/dist/components/Icons/cfxIcons.d.ts +1 -0
- package/dist/components/Icons/cfxIcons.js +62 -60
- package/dist/components/Icons/index.js +1 -1
- package/dist/components/Indicator/Indicator.js +9 -10
- package/dist/components/InfoPanel/InfoPanelShowcase.js +1 -1
- package/dist/components/Input/Input.d.ts +4 -1
- package/dist/components/Input/Input.js +101 -88
- package/dist/components/Input/InputShowcase.js +1 -1
- package/dist/components/Input/RichInput.d.ts +2 -1
- package/dist/components/Input/RichInput.js +37 -34
- package/dist/components/InputDropzone/InputDropzone.d.ts +1 -1
- package/dist/components/InputDropzone/InputDropzone.js +1723 -625
- package/dist/components/Interactive/Interactive.d.ts +2 -1
- package/dist/components/Interactive/Interactive.js +14 -12
- package/dist/components/Island/Island.d.ts +2 -1
- package/dist/components/Island/Island.js +24 -24
- package/dist/components/Layout/Box/Box.d.ts +8 -2
- package/dist/components/Layout/Box/Box.js +53 -51
- package/dist/components/Layout/Box/Box.types.d.ts +22 -0
- package/dist/components/Layout/Box/Box.types.js +4 -0
- package/dist/components/Layout/Box/index.d.ts +1 -1
- package/dist/components/Layout/Box/index.js +3 -3
- package/dist/components/Layout/Center/Center.d.ts +2 -1
- package/dist/components/Layout/Center/Center.js +19 -18
- package/dist/components/Layout/Flex/Flex.d.ts +6 -10
- package/dist/components/Layout/Flex/Flex.js +53 -64
- package/dist/components/Layout/Flex/FlexRestricter.d.ts +2 -1
- package/dist/components/Layout/Flex/FlexRestricter.js +13 -12
- package/dist/components/Layout/Flex/FlexShowcase.js +1 -1
- package/dist/components/Layout/Flex/index.d.ts +2 -2
- package/dist/components/Layout/Flex/index.js +8 -8
- package/dist/components/Layout/Page/Page.js +11 -12
- package/dist/components/Layout/Scrollable/Rail.d.ts +1 -1
- package/dist/components/Layout/Scrollable/Scrollable.d.ts +2 -1
- package/dist/components/Layout/Scrollable/Scrollable.js +40 -38
- package/dist/components/Layout/Scrollable/ScrollableShowcase.js +1 -1
- package/dist/components/Layout/Scrollable/VirtualScrollable.js +98 -98
- package/dist/components/Link/LinkShowcase.js +1 -1
- package/dist/components/Loaf/Loaf.d.ts +2 -1
- package/dist/components/Loaf/Loaf.js +17 -16
- package/dist/components/Logos/LogosShowcase.js +1 -1
- package/dist/components/Modal/Modal.js +16 -17
- package/dist/components/Modal/ModalShowcase.js +14 -11
- package/dist/components/NavList/NavList.d.ts +2 -1
- package/dist/components/NavList/NavList.js +19 -18
- package/dist/components/OnScreenSensor.js +1 -1
- package/dist/components/Overlay/Overlay.d.ts +4 -2
- package/dist/components/Overlay/Overlay.js +31 -23
- package/dist/components/Popover/Popover.d.ts +3 -2
- package/dist/components/Popover/Popover.js +31 -30
- package/dist/components/Popover/PopoverShowcase.js +4 -4
- package/dist/components/PremiumBadge/PremiumBadge.d.ts +2 -1
- package/dist/components/PremiumBadge/PremiumBadge.js +12 -11
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.js +666 -1617
- package/dist/components/Select/SelectShowcase.js +1 -1
- package/dist/components/Shroud/Shroud.d.ts +2 -1
- package/dist/components/Shroud/Shroud.js +16 -14
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +26 -27
- package/dist/components/Skeleton/SkeletonShowcase.js +4 -4
- package/dist/components/Slider/Slider.d.ts +2 -1
- package/dist/components/Slider/Slider.js +326 -377
- package/dist/components/Slider/SliderShowcase.js +1 -1
- package/dist/components/Switch/Switch.js +109 -155
- package/dist/components/Table/TableBody.d.ts +8 -0
- package/dist/components/Table/TableBody.js +14 -0
- package/dist/components/Table/TableCell.d.ts +11 -0
- package/dist/components/Table/TableCell.js +54 -0
- package/dist/components/Table/TableCellCheckbox.d.ts +11 -0
- package/dist/components/Table/TableCellCheckbox.js +20 -0
- package/dist/components/Table/TableHeader.d.ts +9 -0
- package/dist/components/Table/TableHeader.js +24 -0
- package/dist/components/Table/TableIconButton.d.ts +6 -0
- package/dist/components/Table/TableIconButton.js +16 -0
- package/dist/components/Table/TableRoot.d.ts +8 -0
- package/dist/components/Table/TableRoot.js +23 -0
- package/dist/components/Table/TableRow.d.ts +13 -0
- package/dist/components/Table/TableRow.js +46 -0
- package/dist/components/Table/TableShowcase.js +56 -57
- package/dist/components/Table/index.d.ts +20 -2
- package/dist/components/Table/index.js +17 -5
- package/dist/components/Tabular/TabularShowcase.js +1 -1
- package/dist/components/Text/Text.d.ts +6 -3
- package/dist/components/Text/Text.js +67 -63
- package/dist/components/Text/TextShowcase.js +40 -33
- package/dist/components/Title/Title.d.ts +3 -1
- package/dist/components/Title/TitleShowcase.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroupShowcase.js +1 -1
- package/dist/index-BHuChyf5.js +238 -0
- package/dist/index-Cl_RnsqN.js +386 -0
- package/dist/index-DZEAOJqB.js +53 -0
- package/dist/index-HDl8nGsm.js +70 -0
- package/dist/main.d.ts +7 -5
- package/dist/main.js +181 -179
- package/dist/{medium-BA3EQDZW.js → medium-Bq5NvyU7.js} +1 -1
- package/dist/styles-scss/global.scss +1 -0
- package/dist/tslib.es6-CtHwNPxX.js +72 -0
- package/dist/utils/hooks/useClipboardComponent.d.ts +1 -1
- package/dist/utils/hooks/useOutlet.js +1 -1
- package/dist/utils/hooks/usePopoverController.d.ts +1 -1
- package/dist/utils/links.js +1 -1
- package/dist/utils/mergeRefs.d.ts +1 -1
- package/dist/utils/mergeRefs.js +1 -1
- package/dist/utils/ui/ui.d.ts +1 -0
- package/dist/utils/ui/ui.js +45 -36
- package/dist/utils/ui/ui.types.d.ts +4 -0
- package/package.json +6 -5
- package/dist/Combination-Cbiw1XRb.js +0 -792
- package/dist/cfxIcons-BNd1WgpX.js +0 -96
- package/dist/components/Table/Table.d.ts +0 -42
- package/dist/components/Table/Table.js +0 -170
- package/dist/index-2hJuj4UN.js +0 -19069
- package/dist/index-AweK2ufS.js +0 -171
- package/dist/index-BlbvKsmN.js +0 -82
- package/dist/index-ByaXH_ih.js +0 -10
- package/dist/index-Bz27DCHt.js +0 -1342
- package/dist/index-Cf5Yu9oD.js +0 -67
- package/dist/tslib.es6-CBKHJX9H.js +0 -151
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
-
export declare function mergeRefs<T =
|
|
3
|
+
export declare function mergeRefs<T = unknown>(...refs: (React.RefCallback<T> | React.RefObject<T> | undefined | null)[]): React.RefCallback<T>;
|
package/dist/utils/mergeRefs.js
CHANGED
package/dist/utils/ui/ui.d.ts
CHANGED
|
@@ -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 {};
|
package/dist/utils/ui/ui.js
CHANGED
|
@@ -1,68 +1,77 @@
|
|
|
1
|
-
import { clsx as
|
|
2
|
-
var
|
|
1
|
+
import { clsx as m } from "../clsx.js";
|
|
2
|
+
var d;
|
|
3
3
|
((t) => {
|
|
4
|
-
function
|
|
4
|
+
function f(e = 1) {
|
|
5
5
|
return `calc(var(--quant) * ${e})`;
|
|
6
6
|
}
|
|
7
|
-
t.q =
|
|
8
|
-
function
|
|
7
|
+
t.q = f;
|
|
8
|
+
function p(e) {
|
|
9
9
|
return `var(--offset-${e})`;
|
|
10
10
|
}
|
|
11
|
-
t.offset =
|
|
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
|
|
16
|
+
function y(e = "first") {
|
|
17
17
|
return `var(--zindex-${e})`;
|
|
18
18
|
}
|
|
19
|
-
t.zindex =
|
|
20
|
-
function
|
|
19
|
+
t.zindex = y;
|
|
20
|
+
function g(e = "normal") {
|
|
21
21
|
return `var(--line-height-${e})`;
|
|
22
22
|
}
|
|
23
|
-
t.lineHeight =
|
|
24
|
-
function
|
|
23
|
+
t.lineHeight = g;
|
|
24
|
+
function x(e = "normal") {
|
|
25
25
|
return `var(--border-radius-${e})`;
|
|
26
26
|
}
|
|
27
|
-
t.borderRadius =
|
|
28
|
-
function
|
|
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 =
|
|
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
|
|
36
|
-
return e == null ? "" : typeof e == "number" ?
|
|
35
|
+
function l(e) {
|
|
36
|
+
return e == null ? "" : typeof e == "number" ? f(e) : e.toString();
|
|
37
37
|
}
|
|
38
|
-
t.defaultResponsiveValueFormatter =
|
|
39
|
-
function
|
|
40
|
-
return r == null ? {} : typeof r == "object" && !Array.isArray(r) ? Object.entries(r).reduce((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
|
|
46
|
-
return r == null ? "" : typeof r == "object" && !Array.isArray(r) ?
|
|
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 =
|
|
49
|
-
function
|
|
50
|
-
return r == null ? [] : typeof r == "object" && !Array.isArray(r) ? Object.entries(r).reduce((n, [
|
|
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 =
|
|
53
|
-
function
|
|
54
|
-
return typeof e == "number" ?
|
|
52
|
+
t.getResponsiveFlatClassnames = P;
|
|
53
|
+
function $(e) {
|
|
54
|
+
return typeof e == "number" ? f(e) : p(e);
|
|
55
55
|
}
|
|
56
|
-
t.offsetResponsiveValueFormatter =
|
|
57
|
-
function
|
|
58
|
-
return Object.entries(e).reduce((o, [n,
|
|
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 =
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
})(
|
|
74
|
+
})(d || (d = {}));
|
|
66
75
|
export {
|
|
67
|
-
|
|
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.
|
|
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": "^
|
|
35
|
-
"react-dom": "^
|
|
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": "^
|
|
55
|
-
"@types/react-dom": "^
|
|
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",
|