tgui-core 1.5.7 → 1.7.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/README.md CHANGED
@@ -41,7 +41,7 @@ You have two options for importing styles:
41
41
  To import all styles at once, add the following line to your main Sass file:
42
42
 
43
43
  ```scss
44
- @use "pkg:tgui-core/styles";
44
+ @use "~tgui-core/styles";
45
45
  ```
46
46
 
47
47
  ### 2. Importing Individual Styles
@@ -49,9 +49,9 @@ To import all styles at once, add the following line to your main Sass file:
49
49
  To import individual styles, add any of the exported styles to your main Sass file:
50
50
 
51
51
  ```scss
52
- @use "pkg:tgui-core/styles/components/Button";
53
- @use "pkg:tgui-core/styles/components/Dialog";
54
- @use "pkg:tgui-core/styles/components/NoticeBox";
52
+ @use "~tgui-core/styles/components/Button.scss";
53
+ @use "~tgui-core/styles/components/Dialog.scss";
54
+ @use "~tgui-core/styles/components/NoticeBox.scss";
55
55
  ```
56
56
 
57
57
  ## License
@@ -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 n, jsx as e } from "react/jsx-runtime";
2
- import { useState as p } from "react";
3
- import { Box as t } from "./Box.js";
4
- import { Button as b } from "./Button.js";
5
- function x(o) {
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
- color: m,
10
- title: a,
11
- buttons: c,
12
- icon: i,
13
- ...d
14
- } = o, [l, h] = p(o.open);
15
- return /* @__PURE__ */ n(t, { mb: 1, children: [
16
- /* @__PURE__ */ n("div", { className: "Table", children: [
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
- b,
19
+ u,
19
20
  {
20
21
  fluid: !0,
21
- color: m,
22
- icon: i || (l ? "chevron-down" : "chevron-right"),
23
- onClick: () => h(!l),
24
- ...d,
25
- children: a
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
- c && /* @__PURE__ */ e("div", { className: "Table__cell Table__cell--collapsing", children: c })
29
+ t && /* @__PURE__ */ e("div", { className: "Table__cell Table__cell--collapsing", children: t })
29
30
  ] }),
30
- l && /* @__PURE__ */ e(t, { mt: s, children: r })
31
+ l && /* @__PURE__ */ e(n, { mt: s, style: m, children: r })
31
32
  ] });
32
33
  }
33
34
  export {
34
- x as Collapsible
35
+ T as Collapsible
35
36
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tgui-core",
3
- "version": "1.5.7",
3
+ "version": "1.7.0",
4
4
  "description": "TGUI core component library",
5
5
  "keywords": ["TGUI", "library", "typescript"],
6
6
  "files": ["dist"],
@@ -17,8 +17,8 @@
17
17
  "default": "./lib/styles/main.scss",
18
18
  "sass": "./lib/styles/main.scss"
19
19
  },
20
- "./styles/components/*": {
21
- "sass": "./lib/styles/components/*"
20
+ "./styles/components/*.scss": {
21
+ "sass": "./lib/styles/components/*.scss"
22
22
  }
23
23
  },
24
24
  "repository": {