tgui-core 4.1.0 → 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/components/Box.d.ts
CHANGED
|
@@ -29,21 +29,20 @@ type InternalProps = Partial<{
|
|
|
29
29
|
/** The inline style of the component. */
|
|
30
30
|
style: CSSProperties;
|
|
31
31
|
/**
|
|
32
|
-
* ### tw
|
|
33
32
|
* A shorthand classname syntax based loosely on tailwind.
|
|
34
33
|
*
|
|
35
34
|
* This takes all Box style props with a dash separator for params, e.g.'mb-4' or the prop name alone e.g. 'bold'.
|
|
36
35
|
*
|
|
37
36
|
* It's compatible with regular Box props, even on the same component, but it will take precedence.
|
|
38
37
|
*
|
|
39
|
-
*
|
|
38
|
+
* Example:
|
|
40
39
|
* ```tsx
|
|
41
40
|
* <Box tw="mb-2 bold fontSize-16px">
|
|
42
41
|
* // Is equivalent to
|
|
43
42
|
* <Box mb={2} bold fontSize="16px">
|
|
44
43
|
* ```
|
|
45
44
|
*
|
|
46
|
-
*
|
|
45
|
+
* Caveats:
|
|
47
46
|
* 1. You can't use this for custom props from other components.
|
|
48
47
|
*
|
|
49
48
|
* 2. There is no type info or safety for this method. Like the old days, it simply won't work if you use it incorrectly.
|
|
@@ -44,7 +44,8 @@ export type TextInputProps<TElement = HTMLInputElement> = Partial<{
|
|
|
44
44
|
* Use this if you want to hold the value in the parent for external
|
|
45
45
|
* manipulation. For instance:
|
|
46
46
|
*
|
|
47
|
-
*
|
|
47
|
+
* Clearing the input
|
|
48
|
+
*
|
|
48
49
|
* ```tsx
|
|
49
50
|
* const [value, setValue] = useState('');
|
|
50
51
|
*
|
|
@@ -63,7 +64,8 @@ export type TextInputProps<TElement = HTMLInputElement> = Partial<{
|
|
|
63
64
|
* )
|
|
64
65
|
* ```
|
|
65
66
|
*
|
|
66
|
-
*
|
|
67
|
+
* Updating the value from the backend
|
|
68
|
+
*
|
|
67
69
|
* ```tsx
|
|
68
70
|
* const { data } = useBackend<Data>();
|
|
69
71
|
* const { valveSetting } = data;
|
|
@@ -22,7 +22,8 @@ type Props = Partial<{
|
|
|
22
22
|
* Use this if you want to hold the value in the parent for external
|
|
23
23
|
* manipulation. For instance:
|
|
24
24
|
*
|
|
25
|
-
*
|
|
25
|
+
* Clearing the input
|
|
26
|
+
*
|
|
26
27
|
* ```tsx
|
|
27
28
|
* const [value, setValue] = useState(1);
|
|
28
29
|
*
|
|
@@ -41,7 +42,8 @@ type Props = Partial<{
|
|
|
41
42
|
* )
|
|
42
43
|
* ```
|
|
43
44
|
*
|
|
44
|
-
*
|
|
45
|
+
* Updating the value from the backend
|
|
46
|
+
*
|
|
45
47
|
* ```tsx
|
|
46
48
|
* const { data } = useBackend<Data>();
|
|
47
49
|
* const { valveSetting } = data;
|
package/package.json
CHANGED
|
@@ -24,19 +24,19 @@
|
|
|
24
24
|
},
|
|
25
25
|
"exports": {
|
|
26
26
|
"./*": {
|
|
27
|
-
"import": "./dist/common/*.js"
|
|
28
|
-
"require": "./dist/common/*.cjs"
|
|
27
|
+
"import": "./dist/common/*.js"
|
|
29
28
|
},
|
|
30
29
|
"./components": {
|
|
31
|
-
"import": "./dist/components/index.js"
|
|
32
|
-
"require": "./dist/components/index.cjs"
|
|
30
|
+
"import": "./dist/components/index.js"
|
|
33
31
|
},
|
|
34
32
|
"./styles": {
|
|
35
|
-
"sass": "./styles/main.scss",
|
|
36
33
|
"default": "./styles/main.scss"
|
|
37
34
|
},
|
|
35
|
+
"./styles/*": {
|
|
36
|
+
"default": "./styles/*"
|
|
37
|
+
},
|
|
38
38
|
"./styles/components/*": {
|
|
39
|
-
"
|
|
39
|
+
"default": "./styles/components/*"
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"files": [
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"test": "bun test"
|
|
69
69
|
},
|
|
70
70
|
"type": "module",
|
|
71
|
-
"version": "4.1.
|
|
71
|
+
"version": "4.1.1"
|
|
72
72
|
}
|