tgui-core 1.8.3 → 1.8.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.
- package/dist/components/Flex.js +24 -26
- package/package.json +1 -1
package/dist/components/Flex.js
CHANGED
|
@@ -1,72 +1,70 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { classes as
|
|
2
|
+
import { classes as r } from "../common/react.js";
|
|
3
3
|
import { computeBoxClassName as m, computeBoxProps as a, unit as f } from "../common/ui.js";
|
|
4
|
-
function
|
|
5
|
-
return
|
|
4
|
+
function p(e) {
|
|
5
|
+
return r([
|
|
6
6
|
"Flex",
|
|
7
7
|
e.inlineFlex && "Flex--inline",
|
|
8
8
|
m(e)
|
|
9
9
|
]);
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
const { direction:
|
|
11
|
+
function d(e) {
|
|
12
|
+
const { direction: s, wrap: t, align: i, justify: n, ...o } = e;
|
|
13
13
|
return a({
|
|
14
14
|
style: {
|
|
15
|
-
...
|
|
16
|
-
flexDirection:
|
|
15
|
+
...o.style,
|
|
16
|
+
flexDirection: s,
|
|
17
17
|
flexWrap: t === !0 ? "wrap" : t,
|
|
18
|
-
alignItems:
|
|
19
|
-
justifyContent:
|
|
18
|
+
alignItems: i,
|
|
19
|
+
justifyContent: n
|
|
20
20
|
},
|
|
21
|
-
...
|
|
21
|
+
...o
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
function F(e) {
|
|
25
|
-
const { className:
|
|
25
|
+
const { className: s, ...t } = e;
|
|
26
26
|
return /* @__PURE__ */ l(
|
|
27
27
|
"div",
|
|
28
28
|
{
|
|
29
|
-
className:
|
|
30
|
-
...
|
|
29
|
+
className: r([s, p(t)]),
|
|
30
|
+
...d(t)
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
33
|
}
|
|
34
|
-
const N = (e) =>
|
|
34
|
+
const N = (e) => r(["Flex__item", m(e)]);
|
|
35
35
|
function v(e) {
|
|
36
|
-
const { style:
|
|
36
|
+
const { style: s, grow: t, order: i, shrink: n, basis: o, align: c, ...u } = e, x = o ?? // IE11: Set basis to specified width if it's known, which fixes certain
|
|
37
37
|
// bugs when rendering tables inside the flex.
|
|
38
38
|
e.width ?? // If grow is used, basis should be set to 0 to be consistent with
|
|
39
39
|
// flex css shorthand `flex: 1`.
|
|
40
40
|
(t !== void 0 ? 0 : void 0);
|
|
41
41
|
return a({
|
|
42
42
|
style: {
|
|
43
|
-
...
|
|
44
|
-
minWidth: t !== void 0 && 0,
|
|
45
|
-
minHeight: t !== void 0 && 0,
|
|
43
|
+
...s,
|
|
46
44
|
flexGrow: t !== void 0 && Number(t),
|
|
47
|
-
flexShrink:
|
|
45
|
+
flexShrink: n !== void 0 && Number(n),
|
|
48
46
|
flexBasis: f(x),
|
|
49
|
-
order:
|
|
47
|
+
order: i,
|
|
50
48
|
alignSelf: c
|
|
51
49
|
},
|
|
52
50
|
...u
|
|
53
51
|
});
|
|
54
52
|
}
|
|
55
|
-
function
|
|
56
|
-
const { className:
|
|
53
|
+
function y(e) {
|
|
54
|
+
const { className: s, ...t } = e;
|
|
57
55
|
return /* @__PURE__ */ l(
|
|
58
56
|
"div",
|
|
59
57
|
{
|
|
60
|
-
className:
|
|
58
|
+
className: r([s, N(e)]),
|
|
61
59
|
...v(t)
|
|
62
60
|
}
|
|
63
61
|
);
|
|
64
62
|
}
|
|
65
|
-
F.Item =
|
|
63
|
+
F.Item = y;
|
|
66
64
|
export {
|
|
67
65
|
F as Flex,
|
|
68
|
-
|
|
66
|
+
p as computeFlexClassName,
|
|
69
67
|
N as computeFlexItemClassName,
|
|
70
68
|
v as computeFlexItemProps,
|
|
71
|
-
|
|
69
|
+
d as computeFlexProps
|
|
72
70
|
};
|