tgui-core 1.5.7 → 1.6.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { BoxProps } from './Box';
|
|
3
3
|
type Props = Partial<{
|
|
4
4
|
/** Buttons or other content to render inline with the button */
|
|
@@ -11,6 +11,8 @@ type Props = Partial<{
|
|
|
11
11
|
open: boolean;
|
|
12
12
|
/** Text to display on the button for collapsing */
|
|
13
13
|
title: ReactNode;
|
|
14
|
+
/** Custom styles for the child nodes */
|
|
15
|
+
childStyles: CSSProperties;
|
|
14
16
|
}> & BoxProps;
|
|
15
17
|
/**
|
|
16
18
|
* ## Collapsible
|
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Box as
|
|
4
|
-
import { Button as
|
|
5
|
-
function
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as b } from "react";
|
|
3
|
+
import { Box as n } from "./Box.js";
|
|
4
|
+
import { Button as u } from "./Button.js";
|
|
5
|
+
function T(o) {
|
|
6
6
|
const {
|
|
7
7
|
children: r,
|
|
8
8
|
child_mt: s = 1,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
childStyles: m,
|
|
10
|
+
color: a,
|
|
11
|
+
title: d,
|
|
12
|
+
buttons: t,
|
|
13
|
+
icon: c,
|
|
14
|
+
...h
|
|
15
|
+
} = o, [l, p] = b(o.open);
|
|
16
|
+
return /* @__PURE__ */ i(n, { mb: 1, children: [
|
|
17
|
+
/* @__PURE__ */ i("div", { className: "Table", children: [
|
|
17
18
|
/* @__PURE__ */ e("div", { className: "Table__cell", children: /* @__PURE__ */ e(
|
|
18
|
-
|
|
19
|
+
u,
|
|
19
20
|
{
|
|
20
21
|
fluid: !0,
|
|
21
|
-
color:
|
|
22
|
-
icon:
|
|
23
|
-
onClick: () =>
|
|
24
|
-
...
|
|
25
|
-
children:
|
|
22
|
+
color: a,
|
|
23
|
+
icon: c || (l ? "chevron-down" : "chevron-right"),
|
|
24
|
+
onClick: () => p(!l),
|
|
25
|
+
...h,
|
|
26
|
+
children: d
|
|
26
27
|
}
|
|
27
28
|
) }),
|
|
28
|
-
|
|
29
|
+
t && /* @__PURE__ */ e("div", { className: "Table__cell Table__cell--collapsing", children: t })
|
|
29
30
|
] }),
|
|
30
|
-
l && /* @__PURE__ */ e(
|
|
31
|
+
l && /* @__PURE__ */ e(n, { mt: s, style: m, children: r })
|
|
31
32
|
] });
|
|
32
33
|
}
|
|
33
34
|
export {
|
|
34
|
-
|
|
35
|
+
T as Collapsible
|
|
35
36
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tgui-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "TGUI core component library",
|
|
5
5
|
"keywords": ["TGUI", "library", "typescript"],
|
|
6
6
|
"files": ["dist"],
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"sass": "./lib/styles/main.scss"
|
|
19
19
|
},
|
|
20
20
|
"./styles/components/*": {
|
|
21
|
-
"sass": "./lib/styles/components
|
|
21
|
+
"sass": "./lib/styles/components/*.scss"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|