@cfx-dev/ui-components 4.0.2 → 4.1.1
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-BRUj3CHE.js → Combination-Cbiw1XRb.js} +1 -1
- package/dist/assets/css/DropdownSelect.css +1 -1
- package/dist/assets/css/Flex.css +1 -1
- package/dist/assets/css/Input.css +1 -1
- package/dist/assets/css/RichInput.css +1 -1
- package/dist/assets/css/Select.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/components/Accordion/Accordion.js +18 -17
- package/dist/components/Accordion/AccordionShowcase.js +3 -2
- package/dist/components/Avatar/AvatarShowcase.js +3 -2
- package/dist/components/Badge/BadgeShowcase.js +5 -4
- package/dist/components/Button/ButtonShowcase.js +3 -2
- package/dist/components/Checkbox/Checkbox.js +6 -5
- package/dist/components/DropdownSelect/DropdownSelect.d.ts +4 -1
- package/dist/components/DropdownSelect/DropdownSelect.js +739 -715
- package/dist/components/DropdownSelect/DropdownSelectShowcase.js +11 -10
- package/dist/components/Flyout/Flyout.js +1 -1
- package/dist/components/Icon/Icon.d.ts +4 -3
- package/dist/components/Icon/Icon.js +27 -25
- package/dist/components/IconBig/IconBig.js +3 -2
- package/dist/components/InfoPanel/InfoPanelShowcase.js +11 -10
- package/dist/components/Input/Input.d.ts +2 -1
- package/dist/components/Input/Input.js +96 -75
- package/dist/components/Input/InputShowcase.js +6 -5
- package/dist/components/Input/RichInput.d.ts +2 -1
- package/dist/components/Input/RichInput.js +60 -43
- package/dist/components/Layout/Box/Box.d.ts +4 -11
- package/dist/components/Layout/Box/Box.js +58 -96
- package/dist/components/Layout/Flex/Flex.d.ts +7 -3
- package/dist/components/Layout/Flex/Flex.js +70 -62
- package/dist/components/Layout/Flex/Flex.types.d.ts +42 -0
- package/dist/components/Layout/Flex/Flex.types.js +7 -0
- package/dist/components/Layout/Scrollable/ScrollableShowcase.js +1 -0
- package/dist/components/Link/LinkShowcase.js +1 -0
- package/dist/components/Logos/LogosShowcase.js +3 -2
- package/dist/components/Modal/Modal.js +1 -0
- package/dist/components/Overlay/Overlay.js +1 -1
- package/dist/components/Select/Select.d.ts +2 -3
- package/dist/components/Select/Select.js +1922 -7
- package/dist/components/Select/SelectShowcase.js +4 -3
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Select/index.js +2 -3
- package/dist/components/Separator/Separator.d.ts +2 -2
- package/dist/components/Separator/Separator.js +35 -25
- package/dist/components/Skeleton/Skeleton.d.ts +7 -6
- package/dist/components/Skeleton/Skeleton.js +35 -22
- package/dist/components/Skeleton/SkeletonShowcase.js +14 -13
- package/dist/components/Slider/Slider.js +11 -9
- package/dist/components/Slider/SliderShowcase.js +10 -9
- package/dist/components/Spacer/Spacer.d.ts +1 -1
- package/dist/components/Switch/Switch.js +6 -5
- package/dist/components/Table/Table.js +3 -2
- package/dist/components/Table/TableShowcase.js +7 -6
- package/dist/components/Tabular/TabularShowcase.js +3 -2
- package/dist/components/Text/Text.d.ts +3 -1
- package/dist/components/Text/Text.js +61 -52
- package/dist/components/Text/Text.types.d.ts +4 -13
- package/dist/components/Text/Text.types.js +1 -4
- package/dist/components/Text/index.d.ts +3 -2
- package/dist/components/Text/index.js +9 -6
- package/dist/components/Title/TitleShowcase.js +4 -3
- package/dist/components/ui.d.ts +37 -12
- package/dist/components/ui.js +61 -57
- package/dist/index-BZPx6jYI.js +8 -0
- package/dist/index-ByaXH_ih.js +10 -0
- package/dist/index-Cf5Yu9oD.js +67 -0
- package/dist/index-DBus3GoO.js +1342 -0
- package/dist/index-rKs9bXHr.js +6 -0
- package/dist/main.d.ts +1 -1
- package/dist/main.js +14 -14
- package/dist/{medium-JVtzoF2c.js → medium-BA3EQDZW.js} +2 -2
- package/dist/styles-scss/_ui.scss +10 -1
- package/dist/styles-scss/global.scss +39 -26
- package/dist/styles-scss/themes/theme_cfx.scss +2 -0
- package/dist/styles-scss/themes/theme_fivem.scss +2 -0
- package/dist/styles-scss/themes/theme_redm.scss +2 -0
- package/dist/styles-scss/themes/theme_wireframe.scss +2 -0
- package/dist/styles-scss/themes.scss +4 -4
- package/dist/styles-scss/tokens.scss +22 -15
- package/package.json +1 -1
- package/dist/Select-Ds-fm4CN.js +0 -3245
- package/dist/index-BCnz73Lm.js +0 -72
- package/dist/index-BW3WdIgK.js +0 -14
- package/dist/types/Offset.d.ts +0 -1
- package/dist/types/Offset.js +0 -1
package/dist/index-BCnz73Lm.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import * as s from "react";
|
|
2
|
-
function l(e) {
|
|
3
|
-
const t = s.useRef(e);
|
|
4
|
-
return s.useEffect(() => {
|
|
5
|
-
t.current = e;
|
|
6
|
-
}), s.useMemo(() => (...o) => {
|
|
7
|
-
var r;
|
|
8
|
-
return (r = t.current) == null ? void 0 : r.call(t, ...o);
|
|
9
|
-
}, []);
|
|
10
|
-
}
|
|
11
|
-
function S({
|
|
12
|
-
prop: e,
|
|
13
|
-
defaultProp: t,
|
|
14
|
-
onChange: o = () => {
|
|
15
|
-
}
|
|
16
|
-
}) {
|
|
17
|
-
const [r, n] = b({ defaultProp: t, onChange: o }), u = e !== void 0, f = u ? e : r, c = l(o), a = s.useCallback(
|
|
18
|
-
(i) => {
|
|
19
|
-
if (u) {
|
|
20
|
-
const d = typeof i == "function" ? i(e) : i;
|
|
21
|
-
d !== e && c(d);
|
|
22
|
-
} else
|
|
23
|
-
n(i);
|
|
24
|
-
},
|
|
25
|
-
[u, e, n, c]
|
|
26
|
-
);
|
|
27
|
-
return [f, a];
|
|
28
|
-
}
|
|
29
|
-
function b({
|
|
30
|
-
defaultProp: e,
|
|
31
|
-
onChange: t
|
|
32
|
-
}) {
|
|
33
|
-
const o = s.useState(e), [r] = o, n = s.useRef(r), u = l(t);
|
|
34
|
-
return s.useEffect(() => {
|
|
35
|
-
n.current !== r && (u(r), n.current = r);
|
|
36
|
-
}, [r, n, u]), o;
|
|
37
|
-
}
|
|
38
|
-
function z(e) {
|
|
39
|
-
const t = s.useRef({ value: e, previous: e });
|
|
40
|
-
return s.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
41
|
-
}
|
|
42
|
-
var h = globalThis != null && globalThis.document ? s.useLayoutEffect : () => {
|
|
43
|
-
};
|
|
44
|
-
function y(e) {
|
|
45
|
-
const [t, o] = s.useState(void 0);
|
|
46
|
-
return h(() => {
|
|
47
|
-
if (e) {
|
|
48
|
-
o({ width: e.offsetWidth, height: e.offsetHeight });
|
|
49
|
-
const r = new ResizeObserver((n) => {
|
|
50
|
-
if (!Array.isArray(n) || !n.length)
|
|
51
|
-
return;
|
|
52
|
-
const u = n[0];
|
|
53
|
-
let f, c;
|
|
54
|
-
if ("borderBoxSize" in u) {
|
|
55
|
-
const a = u.borderBoxSize, i = Array.isArray(a) ? a[0] : a;
|
|
56
|
-
f = i.inlineSize, c = i.blockSize;
|
|
57
|
-
} else
|
|
58
|
-
f = e.offsetWidth, c = e.offsetHeight;
|
|
59
|
-
o({ width: f, height: c });
|
|
60
|
-
});
|
|
61
|
-
return r.observe(e, { box: "border-box" }), () => r.unobserve(e);
|
|
62
|
-
} else
|
|
63
|
-
o(void 0);
|
|
64
|
-
}, [e]), t;
|
|
65
|
-
}
|
|
66
|
-
export {
|
|
67
|
-
z as a,
|
|
68
|
-
y as b,
|
|
69
|
-
h as c,
|
|
70
|
-
l as d,
|
|
71
|
-
S as u
|
|
72
|
-
};
|
package/dist/index-BW3WdIgK.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as r from "react";
|
|
2
|
-
import "react/jsx-runtime";
|
|
3
|
-
function i(t, [o, e]) {
|
|
4
|
-
return Math.min(e, Math.max(o, t));
|
|
5
|
-
}
|
|
6
|
-
var n = r.createContext(void 0);
|
|
7
|
-
function c(t) {
|
|
8
|
-
const o = r.useContext(n);
|
|
9
|
-
return t || o || "ltr";
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
i as c,
|
|
13
|
-
c as u
|
|
14
|
-
};
|
package/dist/types/Offset.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type OffsetType = 'none' | 'hairthin' | 'thin' | 'xxsmall' | 'xsmall' | 'small' | 'normal' | 'large' | 'xlarge' | 'safezone';
|
package/dist/types/Offset.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|