@cfx-dev/ui-components 4.3.1 → 4.3.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.
- package/dist/{Combination-CSgOhzm-.js → Combination-BGYCZNoJ.js} +375 -367
- package/dist/Rail-CHFAf3wJ.js +81 -0
- package/dist/Table.module-DffST69u.js +17 -0
- package/dist/assets/css/Accordion.css +1 -1
- package/dist/assets/css/Box.css +1 -1
- package/dist/assets/css/Button.css +1 -1
- package/dist/assets/css/DataTable.css +1 -1
- package/dist/assets/css/DropdownSelect.css +1 -1
- package/dist/assets/css/Flex.css +1 -1
- package/dist/assets/css/Flyout.css +1 -1
- package/dist/assets/css/Indicator.css +1 -1
- package/dist/assets/css/InfoPanel.css +1 -1
- package/dist/assets/css/Input.css +1 -1
- package/dist/assets/css/InputDropzone.css +1 -1
- package/dist/assets/css/Island.css +1 -1
- package/dist/assets/css/Link.css +1 -1
- package/dist/assets/css/Modal.css +1 -1
- package/dist/assets/css/Overlay.css +1 -1
- package/dist/assets/css/Pad.css +1 -1
- package/dist/assets/css/Popover.css +1 -1
- package/dist/assets/css/Radio.css +1 -1
- package/dist/assets/css/Rail.css +1 -1
- package/dist/assets/css/RichInput.css +1 -1
- package/dist/assets/css/Select.css +1 -1
- package/dist/assets/css/Separator.css +1 -1
- package/dist/assets/css/Switch.css +1 -1
- package/dist/assets/css/Table.css +1 -1
- package/dist/assets/css/Tabular.css +1 -1
- package/dist/assets/css/Text.css +1 -1
- package/dist/assets/css/Textarea.css +1 -1
- package/dist/assets/css/Title.css +1 -1
- package/dist/assets/css/ToggleGroup.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/assets/general/themes.css +1 -1
- package/dist/components/Accordion/Accordion.js +5 -5
- package/dist/components/Accordion/AccordionShowcase.js +1 -1
- package/dist/components/Avatar/AvatarShowcase.js +1 -1
- package/dist/components/Badge/BadgeShowcase.js +1 -1
- package/dist/components/Box/Box.d.ts +6 -0
- package/dist/components/Box/Box.js +23 -0
- package/dist/components/Box/index.d.ts +3 -0
- package/dist/components/Box/index.js +6 -0
- package/dist/components/BurgerMenu/BurgerMenu.js +7 -7
- package/dist/components/BurgerMenu/BurgerMenuButton.js +2 -2
- package/dist/components/BurgerMenu/BurgerMenuShowcase.js +1 -1
- package/dist/components/Button/ButtonShowcase.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +252 -157
- package/dist/components/DataTable/DataTable.js +2 -2
- package/dist/components/DataTable/DataTableShowcase.js +2 -2
- package/dist/components/DropdownSelect/DropdownSelect.js +13 -13
- package/dist/components/DropdownSelect/DropdownSelectShowcase.js +1 -1
- package/dist/components/Flex/Flex.d.ts +7 -0
- package/dist/components/Flex/Flex.js +23 -0
- package/dist/components/Flex/index.d.ts +6 -0
- package/dist/components/{Layout/Flex → Flex}/index.js +2 -2
- package/dist/components/Flyout/Flyout.js +6 -6
- package/dist/components/InfoPanel/InfoPanel.js +3 -3
- package/dist/components/InfoPanel/InfoPanelShowcase.js +1 -1
- package/dist/components/Input/Input.js +87 -87
- package/dist/components/Input/InputShowcase.js +1 -1
- package/dist/components/Input/RichInput.js +42 -42
- package/dist/components/Island/Island.js +27 -27
- package/dist/components/Layout/Pad/Pad.js +20 -20
- package/dist/components/Link/LinkShowcase.js +1 -1
- package/dist/components/Logos/LogosShowcase.js +1 -1
- package/dist/components/Modal/ModalShowcase.js +4 -4
- package/dist/components/OnScreenSensor.js +13 -13
- package/dist/components/Popover/Popover.js +5 -5
- package/dist/components/Popover/PopoverShowcase.js +1 -1
- package/dist/components/{Layout → RSC}/Box/Box.d.ts +3 -2
- package/dist/components/RSC/Box/Box.js +101 -0
- package/dist/components/RSC/Box/index.d.ts +2 -0
- package/dist/components/RSC/Box/index.js +7 -0
- package/dist/components/{Layout → RSC}/Flex/Flex.d.ts +4 -2
- package/dist/components/RSC/Flex/Flex.js +119 -0
- package/dist/components/{Layout → RSC}/Flex/index.d.ts +1 -1
- package/dist/components/RSC/Flex/index.js +15 -0
- package/dist/components/Scrollable/Rail.js +9 -0
- package/dist/components/Scrollable/Scrollable.js +88 -0
- package/dist/components/{Layout/Scrollable → Scrollable}/ScrollableShowcase.js +3 -3
- package/dist/components/{Layout/Scrollable → Scrollable}/VirtualScrollable.js +3 -3
- package/dist/components/{Layout/Scrollable → Scrollable}/index.js +1 -1
- package/dist/components/Select/Select.js +3 -3
- package/dist/components/Select/SelectShowcase.js +1 -1
- package/dist/components/Separator/Separator.js +3 -3
- package/dist/components/Shroud/Shroud.js +7 -7
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +5 -5
- package/dist/components/Skeleton/SkeletonShowcase.js +1 -1
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Slider/SliderShowcase.js +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Table/TableBody.js +1 -1
- package/dist/components/Table/TableCell.d.ts +1 -1
- package/dist/components/Table/TableCell.js +13 -12
- package/dist/components/Table/TableCellCheckbox.js +1 -1
- package/dist/components/Table/TableHeader.js +1 -1
- package/dist/components/Table/TableIconButton.js +1 -1
- package/dist/components/Table/TableRoot.js +1 -1
- package/dist/components/Table/TableRow.js +1 -1
- package/dist/components/Tabular/TabularShowcase.js +1 -1
- package/dist/components/Text/TextShowcase.js +2 -2
- package/dist/components/Textarea/Textarea.js +32 -34
- package/dist/components/Title/Title.js +62 -62
- package/dist/components/Title/TitleShowcase.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.js +7 -7
- package/dist/components/ToggleGroup/ToggleGroupShowcase.js +1 -1
- package/dist/index-ByKwkZKY.js +239 -0
- package/dist/{index-HDl8nGsm.js → index-CriGVLlo.js} +1 -1
- package/dist/{index-DZEAOJqB.js → index-DlJ4qUbZ.js} +1 -1
- package/dist/main.d.ts +6 -6
- package/dist/main.js +94 -93
- package/dist/rsc.d.ts +4 -0
- package/dist/rsc.js +16 -0
- package/dist/styles-scss/_colors.scss +41 -32
- package/dist/styles-scss/_typography.scss +5 -5
- package/dist/styles-scss/_ui.scss +36 -20
- package/dist/styles-scss/global.scss +24 -13
- package/dist/styles-scss/themes/theme_cfx.scss +3 -5
- package/dist/styles-scss/themes/theme_fivem.scss +5 -7
- package/dist/styles-scss/themes/theme_redm.scss +4 -6
- package/dist/styles-scss/themes/theme_wireframe.scss +5 -7
- package/dist/styles-scss/themes.scss +4 -4
- package/dist/styles-scss/tokens.scss +2 -56
- package/dist/utils/hooks/useGlobalKeyboardEvent.js +3 -3
- package/dist/utils/hooks/useWindowResize.js +5 -5
- package/dist/utils/string.d.ts +1 -0
- package/dist/utils/string.js +23 -19
- package/package.json +10 -5
- package/dist/Rail-DcVowhML.js +0 -81
- package/dist/Table.module-DHI1mXN2.js +0 -17
- package/dist/components/Layout/Box/Box.js +0 -72
- package/dist/components/Layout/Box/index.d.ts +0 -2
- package/dist/components/Layout/Box/index.js +0 -5
- package/dist/components/Layout/Flex/Flex.js +0 -84
- package/dist/components/Layout/Scrollable/Rail.js +0 -9
- package/dist/components/Layout/Scrollable/Scrollable.js +0 -91
- package/dist/index-BHuChyf5.js +0 -238
- /package/dist/components/{Layout/Flex → Flex}/FlexShowcase.d.ts +0 -0
- /package/dist/components/{Layout/Flex → Flex}/FlexShowcase.js +0 -0
- /package/dist/components/{Layout → RSC}/Box/Box.types.d.ts +0 -0
- /package/dist/components/{Layout → RSC}/Box/Box.types.js +0 -0
- /package/dist/components/{Layout → RSC}/Flex/Flex.types.d.ts +0 -0
- /package/dist/components/{Layout → RSC}/Flex/Flex.types.js +0 -0
- /package/dist/components/{Layout → RSC}/Flex/FlexRestricter.d.ts +0 -0
- /package/dist/components/{Layout → RSC}/Flex/FlexRestricter.js +0 -0
- /package/dist/components/{Layout/Scrollable → Scrollable}/Rail.d.ts +0 -0
- /package/dist/components/{Layout/Scrollable → Scrollable}/Scrollable.d.ts +0 -0
- /package/dist/components/{Layout/Scrollable → Scrollable}/ScrollableShowcase.d.ts +0 -0
- /package/dist/components/{Layout/Scrollable → Scrollable}/VirtualScrollable.d.ts +0 -0
- /package/dist/components/{Layout/Scrollable → Scrollable}/index.d.ts +0 -0
|
@@ -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-
|
|
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 "../
|
|
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 "../
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import { clsx as
|
|
4
|
-
const
|
|
5
|
-
root:
|
|
6
|
-
|
|
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
|
-
|
|
11
|
+
disabled: B,
|
|
12
|
+
error: C,
|
|
13
|
+
backdropBlur: N
|
|
16
14
|
};
|
|
17
|
-
function
|
|
15
|
+
function F(c) {
|
|
18
16
|
const {
|
|
19
17
|
value: i,
|
|
20
|
-
onChange:
|
|
21
|
-
label:
|
|
18
|
+
onChange: r,
|
|
19
|
+
label: a,
|
|
22
20
|
placeholder: n,
|
|
23
21
|
rows: d,
|
|
24
|
-
resize:
|
|
25
|
-
disabled:
|
|
26
|
-
autofocus:
|
|
27
|
-
className:
|
|
28
|
-
backdropBlur:
|
|
29
|
-
} = c, h =
|
|
30
|
-
(
|
|
31
|
-
|
|
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
|
-
[
|
|
34
|
-
),
|
|
31
|
+
[r]
|
|
32
|
+
), _ = l.useId(), t = /* @__PURE__ */ s(
|
|
35
33
|
"textarea",
|
|
36
34
|
{
|
|
37
|
-
autoFocus:
|
|
38
|
-
id:
|
|
39
|
-
className: e[`resize-${
|
|
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
|
-
),
|
|
47
|
-
[e.disabled]:
|
|
48
|
-
[e
|
|
44
|
+
), z = T(e.root, f, {
|
|
45
|
+
[e.disabled]: o,
|
|
46
|
+
[e.backdropBlur]: b
|
|
49
47
|
});
|
|
50
|
-
return /* @__PURE__ */
|
|
51
|
-
|
|
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
|
-
|
|
54
|
+
F as Textarea
|
|
57
55
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as h, jsxs as
|
|
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
|
|
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
|
|
8
|
-
const
|
|
9
|
-
wrapper:
|
|
10
|
-
appearance:
|
|
11
|
-
animated:
|
|
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:
|
|
20
|
-
shortcut:
|
|
21
|
-
},
|
|
22
|
-
function
|
|
23
|
-
const
|
|
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: `${
|
|
26
|
-
left: `${
|
|
27
|
-
maxWidth: `calc(100vw - ${
|
|
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
|
|
31
|
+
function G(l, f) {
|
|
32
32
|
const {
|
|
33
33
|
x: e,
|
|
34
|
-
y:
|
|
35
|
-
width:
|
|
36
|
-
height:
|
|
37
|
-
} =
|
|
38
|
-
let
|
|
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
|
-
|
|
41
|
+
i = e + r / 2, t = o - _;
|
|
42
42
|
break;
|
|
43
43
|
case "top-left":
|
|
44
|
-
|
|
44
|
+
i = e, t = o - _;
|
|
45
45
|
break;
|
|
46
46
|
case "bottom":
|
|
47
|
-
|
|
47
|
+
i = e + r / 2, t = o + n + _;
|
|
48
48
|
break;
|
|
49
49
|
case "bottom-left":
|
|
50
|
-
|
|
50
|
+
i = e, t = o + n + _;
|
|
51
51
|
break;
|
|
52
52
|
case "bottom-right":
|
|
53
|
-
|
|
53
|
+
i = e + r, t = o + n + _;
|
|
54
54
|
break;
|
|
55
55
|
case "left":
|
|
56
|
-
|
|
56
|
+
i = e - _, t = o + n / 2;
|
|
57
57
|
break;
|
|
58
58
|
case "right":
|
|
59
|
-
|
|
59
|
+
i = e + r + _, t = o + n / 2;
|
|
60
60
|
break;
|
|
61
61
|
}
|
|
62
|
-
return [
|
|
62
|
+
return [i, t];
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function H(l) {
|
|
65
65
|
const {
|
|
66
66
|
title: f,
|
|
67
67
|
children: e,
|
|
68
|
-
animated:
|
|
69
|
-
fixedOn:
|
|
70
|
-
delay:
|
|
71
|
-
className:
|
|
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
|
-
} =
|
|
76
|
-
|
|
77
|
-
const T = y(
|
|
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 (!
|
|
81
|
+
if (!a.current)
|
|
82
82
|
return;
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
},
|
|
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
|
-
},
|
|
88
|
-
|
|
87
|
+
}, w = (u) => {
|
|
88
|
+
m.current || (d.current = [u.clientX, u.clientY]);
|
|
89
89
|
};
|
|
90
|
-
return
|
|
91
|
-
|
|
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
|
|
94
|
+
const R = s.useMemo(() => {
|
|
95
95
|
if (!E || !f)
|
|
96
96
|
return null;
|
|
97
|
-
const
|
|
97
|
+
const c = O(
|
|
98
98
|
p.wrapper,
|
|
99
|
-
p[`fixed-on-${
|
|
99
|
+
p[`fixed-on-${r}`],
|
|
100
100
|
{
|
|
101
|
-
[p.animated]:
|
|
101
|
+
[p.animated]: o
|
|
102
102
|
},
|
|
103
|
-
|
|
103
|
+
i
|
|
104
104
|
);
|
|
105
|
-
return /* @__PURE__ */ h(T, { children: /* @__PURE__ */ h("div", { className:
|
|
106
|
-
}, [E, f,
|
|
107
|
-
() => typeof e == "function" ? e(
|
|
108
|
-
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,
|
|
110
|
+
[e, a]
|
|
111
111
|
);
|
|
112
|
-
return /* @__PURE__ */
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
return /* @__PURE__ */ C(M, { children: [
|
|
113
|
+
k,
|
|
114
|
+
R
|
|
115
115
|
] });
|
|
116
116
|
}
|
|
117
117
|
export {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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 "../
|
|
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 = "
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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 "../
|
|
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,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-
|
|
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
|
@@ -64,18 +64,18 @@ export { Interactive } from './components/Interactive';
|
|
|
64
64
|
export type { InteractiveProps } from './components/Interactive';
|
|
65
65
|
export { Island, IslandCorner } from './components/Island';
|
|
66
66
|
export type { IslandProps } from './components/Island';
|
|
67
|
-
export { Box, stringPropFormater } from './components/
|
|
68
|
-
export type { BoxProps } from './components/
|
|
67
|
+
export { Box, stringPropFormater } from './components/Box';
|
|
68
|
+
export type { BoxProps } from './components/Box';
|
|
69
69
|
export { Center } from './components/Layout/Center';
|
|
70
70
|
export type { CenterProps } from './components/Layout/Center';
|
|
71
|
-
export { Flex, FlexRestricter, FlexAlignItemsEnum, FlexDirectionEnum, FlexJustifyContentEnum, FlexWrapEnum, } from './components/
|
|
72
|
-
export type { FlexProps, FlexRestricterProps, FlexAlignItemsType, FlexDirectionType, FlexJustifyContentType, FlexWrapType, } from './components/
|
|
71
|
+
export { Flex, FlexRestricter, FlexAlignItemsEnum, FlexDirectionEnum, FlexJustifyContentEnum, FlexWrapEnum, } from './components/Flex';
|
|
72
|
+
export type { FlexProps, FlexRestricterProps, FlexAlignItemsType, FlexDirectionType, FlexJustifyContentType, FlexWrapType, } from './components/Flex';
|
|
73
73
|
export { Pad } from './components/Layout/Pad';
|
|
74
74
|
export type { PadProps } from './components/Layout/Pad';
|
|
75
75
|
export { Page } from './components/Layout/Page';
|
|
76
76
|
export type { PageProps } from './components/Layout/Page';
|
|
77
|
-
export { Scrollable, VirtualScrollable, Rail, } from './components/
|
|
78
|
-
export type { ScrollableProps, VirtualScrollableProps, RailProps, } from './components/
|
|
77
|
+
export { Scrollable, VirtualScrollable, Rail, } from './components/Scrollable';
|
|
78
|
+
export type { ScrollableProps, VirtualScrollableProps, RailProps, } from './components/Scrollable';
|
|
79
79
|
export { Loaf } from './components/Loaf';
|
|
80
80
|
export type { LoafProps, LoafSize, LoafColor, } from './components/Loaf';
|
|
81
81
|
export { Modal } from './components/Modal';
|