tgui-core 1.8.4 → 2.0.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/common/constants.d.ts +4 -0
- package/dist/common/constants.js +17 -0
- package/dist/common/hotkeys.js +48 -48
- package/dist/common/ui.d.ts +6 -0
- package/dist/common/ui.js +63 -59
- package/dist/components/AnimatedNumber.d.ts +1 -1
- package/dist/components/Button.d.ts +3 -3
- package/dist/components/Button.js +21 -22
- package/dist/components/Chart.d.ts +3 -15
- package/dist/components/Chart.js +68 -86
- package/dist/components/ColorBox.js +3 -3
- package/dist/components/Dialog.d.ts +16 -0
- package/dist/components/Dialog.js +5 -5
- package/dist/components/DmIcon.d.ts +1 -1
- package/dist/components/DraggableControl.d.ts +56 -0
- package/dist/components/DraggableControl.js +126 -176
- package/dist/components/Dropdown.d.ts +8 -6
- package/dist/components/Dropdown.js +137 -129
- package/dist/components/FitText.d.ts +1 -1
- package/dist/components/Floating.d.ts +75 -0
- package/dist/components/Floating.js +2235 -0
- package/dist/components/ImageButton.d.ts +2 -3
- package/dist/components/ImageButton.js +88 -98
- package/dist/components/InfinitePlane.d.ts +35 -32
- package/dist/components/InfinitePlane.js +123 -133
- package/dist/components/Knob.d.ts +22 -6
- package/dist/components/Knob.js +45 -46
- package/dist/components/MenuBar.js +81 -97
- package/dist/components/Modal.js +12 -12
- package/dist/components/NumberInput.d.ts +1 -1
- package/dist/components/Popper.d.ts +5 -1
- package/dist/components/Popper.js +1026 -121
- package/dist/components/ProgressBar.js +3 -3
- package/dist/components/RoundGauge.js +30 -30
- package/dist/components/Section.js +7 -7
- package/dist/components/Slider.d.ts +22 -6
- package/dist/components/Slider.js +55 -56
- package/dist/components/Stack.js +3 -3
- package/dist/components/Table.js +7 -7
- package/dist/components/Tabs.js +7 -7
- package/dist/components/TextArea.d.ts +17 -0
- package/dist/components/TextArea.js +35 -33
- package/dist/components/Tooltip.d.ts +3 -34
- package/dist/components/Tooltip.js +14 -77
- package/dist/components/TrackOutsideClicks.d.ts +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +64 -62
- package/package.json +26 -27
- package/styles/base.scss +13 -11
- package/styles/colors.scss +63 -67
- package/styles/components/BlockQuote.scss +5 -8
- package/styles/components/Button.scss +123 -99
- package/styles/components/Dialog.scss +23 -30
- package/styles/components/Dimmer.scss +3 -8
- package/styles/components/Divider.scss +6 -7
- package/styles/components/Dropdown.scss +103 -51
- package/styles/components/Flex.scss +0 -1
- package/styles/components/Floating.scss +60 -0
- package/styles/components/ImageButton.scss +136 -192
- package/styles/components/Input.scss +24 -26
- package/styles/components/Knob.scss +37 -41
- package/styles/components/LabeledList.scss +8 -6
- package/styles/components/MenuBar.scss +17 -21
- package/styles/components/Modal.scss +8 -7
- package/styles/components/NoticeBox.scss +22 -26
- package/styles/components/NumberInput.scss +30 -28
- package/styles/components/ProgressBar.scss +27 -19
- package/styles/components/RoundGauge.scss +46 -26
- package/styles/components/Section.scss +17 -32
- package/styles/components/Slider.scss +18 -15
- package/styles/components/Stack.scss +8 -48
- package/styles/components/Table.scss +2 -2
- package/styles/components/Tabs.scss +92 -66
- package/styles/components/TextArea.scss +32 -36
- package/styles/components/Tooltip.scss +10 -13
- package/styles/functions.scss +1 -62
- package/styles/main.scss +6 -1
- package/styles/reset.scss +7 -11
- package/styles/vars-colors.scss +108 -0
- package/styles/vars-components.scss +162 -0
- package/styles/vars-values.scss +110 -0
- package/dist/popper-CiqSDJTE.js +0 -906
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsxs as F, jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as I, useRef as M, useState as Y, useImperativeHandle as H, useEffect as y } from "react";
|
|
3
3
|
import { KEY as A, isEscape as L } from "../common/keys.js";
|
|
4
|
-
import { classes as
|
|
4
|
+
import { classes as x } from "../common/react.js";
|
|
5
5
|
import { Box as U } from "./Box.js";
|
|
6
6
|
import { toInputValue as _ } from "./Input.js";
|
|
7
|
-
function q(u,
|
|
8
|
-
return `${u.substring(0, l)}${
|
|
7
|
+
function q(u, o, l, t) {
|
|
8
|
+
return `${u.substring(0, l)}${o}${u.substring(l, t)}${o}${u.substring(t)}`;
|
|
9
9
|
}
|
|
10
|
-
const X =
|
|
11
|
-
(u,
|
|
10
|
+
const X = I(
|
|
11
|
+
(u, o) => {
|
|
12
12
|
const {
|
|
13
13
|
autoFocus: l,
|
|
14
14
|
autoSelect: t,
|
|
15
|
-
displayedValue:
|
|
16
|
-
dontUseTabForIndent:
|
|
17
|
-
maxLength:
|
|
18
|
-
noborder:
|
|
15
|
+
displayedValue: s,
|
|
16
|
+
dontUseTabForIndent: k,
|
|
17
|
+
maxLength: w,
|
|
18
|
+
noborder: S,
|
|
19
19
|
onChange: i,
|
|
20
20
|
onEnter: f,
|
|
21
21
|
onEscape: g,
|
|
22
22
|
onInput: d,
|
|
23
|
-
placeholder:
|
|
23
|
+
placeholder: $,
|
|
24
24
|
scrollbar: E,
|
|
25
25
|
selfClear: b,
|
|
26
26
|
userMarkup: m,
|
|
27
27
|
value: T,
|
|
28
28
|
...K
|
|
29
|
-
} = u, { className: D, fluid: N, nowrap:
|
|
30
|
-
function
|
|
29
|
+
} = u, { className: D, fluid: N, nowrap: C, ...R } = K, a = M(null), [V, j] = Y(0);
|
|
30
|
+
function B(r) {
|
|
31
31
|
if (r.key === A.Enter) {
|
|
32
32
|
if (r.shiftKey) {
|
|
33
33
|
r.currentTarget.focus();
|
|
@@ -40,7 +40,7 @@ const X = M(
|
|
|
40
40
|
g == null || g(r), b ? r.currentTarget.value = "" : (r.currentTarget.value = _(T), r.currentTarget.blur());
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
|
-
if (!
|
|
43
|
+
if (!k && r.key === A.Tab) {
|
|
44
44
|
r.preventDefault();
|
|
45
45
|
const { value: e, selectionStart: c, selectionEnd: n } = r.currentTarget;
|
|
46
46
|
r.currentTarget.value = `${e.substring(0, c)} ${e.substring(n)}`, r.currentTarget.selectionEnd = c + 1;
|
|
@@ -57,7 +57,7 @@ const X = M(
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
return H(
|
|
60
|
-
|
|
60
|
+
o,
|
|
61
61
|
() => a.current
|
|
62
62
|
), y(() => {
|
|
63
63
|
if (!l && !t) return;
|
|
@@ -70,18 +70,18 @@ const X = M(
|
|
|
70
70
|
if (!r) return;
|
|
71
71
|
const e = _(T);
|
|
72
72
|
r.value !== e && (r.value = e);
|
|
73
|
-
}, [T]), /* @__PURE__ */
|
|
73
|
+
}, [T]), /* @__PURE__ */ F(
|
|
74
74
|
U,
|
|
75
75
|
{
|
|
76
|
-
className:
|
|
76
|
+
className: x([
|
|
77
77
|
"TextArea",
|
|
78
78
|
N && "TextArea--fluid",
|
|
79
|
-
|
|
79
|
+
S && "TextArea--noborder",
|
|
80
80
|
D
|
|
81
81
|
]),
|
|
82
|
-
...
|
|
82
|
+
...R,
|
|
83
83
|
children: [
|
|
84
|
-
!!
|
|
84
|
+
!!s && /* @__PURE__ */ p(
|
|
85
85
|
"div",
|
|
86
86
|
{
|
|
87
87
|
style: {
|
|
@@ -90,40 +90,42 @@ const X = M(
|
|
|
90
90
|
position: "absolute",
|
|
91
91
|
width: "100%"
|
|
92
92
|
},
|
|
93
|
-
children: /* @__PURE__ */
|
|
93
|
+
children: /* @__PURE__ */ p(
|
|
94
94
|
"div",
|
|
95
95
|
{
|
|
96
|
-
className:
|
|
96
|
+
className: x([
|
|
97
97
|
"TextArea__textarea",
|
|
98
98
|
"TextArea__textarea_custom"
|
|
99
99
|
]),
|
|
100
100
|
style: {
|
|
101
|
-
transform: `translateY(-${
|
|
101
|
+
transform: `translateY(-${V}px)`
|
|
102
102
|
},
|
|
103
|
-
children:
|
|
103
|
+
children: s
|
|
104
104
|
}
|
|
105
105
|
)
|
|
106
106
|
}
|
|
107
107
|
),
|
|
108
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ p(
|
|
109
109
|
"textarea",
|
|
110
110
|
{
|
|
111
|
-
|
|
111
|
+
autoComplete: "off",
|
|
112
|
+
className: x([
|
|
112
113
|
"TextArea__textarea",
|
|
113
114
|
E && "TextArea__textarea--scrollable",
|
|
114
|
-
|
|
115
|
+
C && "TextArea__nowrap"
|
|
115
116
|
]),
|
|
116
|
-
maxLength:
|
|
117
|
+
maxLength: w,
|
|
117
118
|
onBlur: (r) => i == null ? void 0 : i(r, r.target.value),
|
|
118
119
|
onChange: (r) => d == null ? void 0 : d(r, r.target.value),
|
|
119
|
-
onKeyDown:
|
|
120
|
+
onKeyDown: B,
|
|
120
121
|
onScroll: () => {
|
|
121
|
-
|
|
122
|
+
s && a.current && j(a.current.scrollTop);
|
|
122
123
|
},
|
|
123
|
-
placeholder:
|
|
124
|
+
placeholder: $,
|
|
124
125
|
ref: a,
|
|
126
|
+
spellCheck: !1,
|
|
125
127
|
style: {
|
|
126
|
-
color:
|
|
128
|
+
color: s ? "rgba(0, 0, 0, 0)" : "inherit"
|
|
127
129
|
}
|
|
128
130
|
}
|
|
129
131
|
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Placement
|
|
2
|
-
import {
|
|
1
|
+
import { Placement } from '@floating-ui/react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
3
|
type Props = {
|
|
4
4
|
/** The content to display in the tooltip */
|
|
5
5
|
content: ReactNode;
|
|
@@ -9,36 +9,5 @@ type Props = {
|
|
|
9
9
|
/** Where to place the tooltip relative to the reference element */
|
|
10
10
|
position: Placement;
|
|
11
11
|
}>;
|
|
12
|
-
|
|
13
|
-
hovered: boolean;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* ## Tooltip
|
|
17
|
-
* A boxy tooltip from tgui 1. It is very hacky in its current state, and
|
|
18
|
-
* requires setting `position: relative` on the container.
|
|
19
|
-
*
|
|
20
|
-
* Please note that
|
|
21
|
-
* [Button](https://github.com/tgstation/tgui-core/tree/main/lib/components/Button.tsx)
|
|
22
|
-
* component has a `tooltip` prop and it is recommended to use that prop instead.
|
|
23
|
-
*
|
|
24
|
-
* Usage:
|
|
25
|
-
* ```tsx
|
|
26
|
-
* <Tooltip position="bottom" content="Box tooltip">
|
|
27
|
-
* <Box position="relative">Sample text.</Box>
|
|
28
|
-
* </Tooltip>
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
export declare class Tooltip extends Component<Props, State> {
|
|
32
|
-
static renderedTooltip: HTMLDivElement | undefined;
|
|
33
|
-
static singletonPopper: ReturnType<typeof createPopper> | undefined;
|
|
34
|
-
static currentHoveredElement: Element | undefined;
|
|
35
|
-
static virtualElement: VirtualElement;
|
|
36
|
-
getDOMNode(): Element;
|
|
37
|
-
componentDidMount(): void;
|
|
38
|
-
fadeOut(): void;
|
|
39
|
-
renderPopperContent(): void;
|
|
40
|
-
componentDidUpdate(): void;
|
|
41
|
-
componentWillUnmount(): void;
|
|
42
|
-
render(): ReactNode;
|
|
43
|
-
}
|
|
12
|
+
export declare function Tooltip(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
44
13
|
export {};
|
|
@@ -1,81 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { c as u } from "../popper-CiqSDJTE.js";
|
|
8
|
-
const i = {
|
|
9
|
-
modifiers: [
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Floating as i } from "./Floating.js";
|
|
3
|
+
function l(o) {
|
|
4
|
+
const { content: t, children: n, position: e } = o;
|
|
5
|
+
return /* @__PURE__ */ r(
|
|
6
|
+
i,
|
|
10
7
|
{
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
hoverOpen: !0,
|
|
9
|
+
content: t,
|
|
10
|
+
contentClasses: "Tooltip",
|
|
11
|
+
placement: e,
|
|
12
|
+
children: n
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
width: 0,
|
|
17
|
-
height: 0,
|
|
18
|
-
top: 0,
|
|
19
|
-
right: 0,
|
|
20
|
-
bottom: 0,
|
|
21
|
-
left: 0,
|
|
22
|
-
x: 0,
|
|
23
|
-
y: 0,
|
|
24
|
-
toJSON: () => null
|
|
25
|
-
}, t = class t extends c {
|
|
26
|
-
getDOMNode() {
|
|
27
|
-
return m(this);
|
|
28
|
-
}
|
|
29
|
-
componentDidMount() {
|
|
30
|
-
const e = this.getDOMNode();
|
|
31
|
-
e && (e.addEventListener("mouseenter", () => {
|
|
32
|
-
let n = t.renderedTooltip;
|
|
33
|
-
n === void 0 && (n = document.createElement("div"), n.className = "Tooltip", document.body.appendChild(n), t.renderedTooltip = n), t.currentHoveredElement = e, n.style.opacity = "1", this.renderPopperContent();
|
|
34
|
-
}), e.addEventListener("mouseleave", () => {
|
|
35
|
-
this.fadeOut();
|
|
36
|
-
}));
|
|
37
|
-
}
|
|
38
|
-
fadeOut() {
|
|
39
|
-
t.currentHoveredElement === this.getDOMNode() && (t.currentHoveredElement = void 0, t.renderedTooltip.style.opacity = "0");
|
|
40
|
-
}
|
|
41
|
-
renderPopperContent() {
|
|
42
|
-
const e = t.renderedTooltip;
|
|
43
|
-
e && a(/* @__PURE__ */ l("span", { children: this.props.content }), e, () => {
|
|
44
|
-
let n = t.singletonPopper;
|
|
45
|
-
n === void 0 ? (n = u(
|
|
46
|
-
t.virtualElement,
|
|
47
|
-
e,
|
|
48
|
-
{
|
|
49
|
-
...i,
|
|
50
|
-
placement: this.props.position || "auto"
|
|
51
|
-
}
|
|
52
|
-
), t.singletonPopper = n) : (n.setOptions({
|
|
53
|
-
...i,
|
|
54
|
-
placement: this.props.position || "auto"
|
|
55
|
-
}), n.update());
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
componentDidUpdate() {
|
|
59
|
-
t.currentHoveredElement === this.getDOMNode() && this.renderPopperContent();
|
|
60
|
-
}
|
|
61
|
-
componentWillUnmount() {
|
|
62
|
-
this.fadeOut();
|
|
63
|
-
}
|
|
64
|
-
render() {
|
|
65
|
-
return this.props.children;
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
// Mounting poppers is really laggy because popper.js is very slow.
|
|
69
|
-
// Thus, instead of using the Popper component, Tooltip creates ONE popper
|
|
70
|
-
// and stores every tooltip inside that.
|
|
71
|
-
// This means you can never have two tooltips at once, for instance.
|
|
72
|
-
o(t, "renderedTooltip"), o(t, "singletonPopper"), o(t, "currentHoveredElement"), o(t, "virtualElement", {
|
|
73
|
-
getBoundingClientRect: () => {
|
|
74
|
-
var e;
|
|
75
|
-
return ((e = t.currentHoveredElement) == null ? void 0 : e.getBoundingClientRect()) ?? h;
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
let d = t;
|
|
14
|
+
);
|
|
15
|
+
}
|
|
79
16
|
export {
|
|
80
|
-
|
|
17
|
+
l as Tooltip
|
|
81
18
|
};
|
|
@@ -3,7 +3,7 @@ type Props = {
|
|
|
3
3
|
onOutsideClick: () => void;
|
|
4
4
|
} & PropsWithChildren;
|
|
5
5
|
export declare class TrackOutsideClicks extends Component<Props> {
|
|
6
|
-
ref: import('react').RefObject<HTMLDivElement>;
|
|
6
|
+
ref: import('react').RefObject<HTMLDivElement | null>;
|
|
7
7
|
constructor(props: any);
|
|
8
8
|
componentWillUnmount(): void;
|
|
9
9
|
handleOutsideClick(event: MouseEvent): void;
|
|
@@ -16,6 +16,7 @@ export { DraggableControl } from './DraggableControl';
|
|
|
16
16
|
export { Dropdown } from './Dropdown';
|
|
17
17
|
export { FitText } from './FitText';
|
|
18
18
|
export { Flex } from './Flex';
|
|
19
|
+
export { Floating } from './Floating';
|
|
19
20
|
export { Icon } from './Icon';
|
|
20
21
|
export { Image } from './Image';
|
|
21
22
|
export { ImageButton } from './ImageButton';
|
package/dist/components/index.js
CHANGED
|
@@ -6,44 +6,45 @@ import { Box as l } from "./Box.js";
|
|
|
6
6
|
import { Button as u } from "./Button.js";
|
|
7
7
|
import { ByondUi as c } from "./ByondUi.js";
|
|
8
8
|
import { Chart as b } from "./Chart.js";
|
|
9
|
-
import { Collapsible as
|
|
9
|
+
import { Collapsible as g } from "./Collapsible.js";
|
|
10
10
|
import { ColorBox as D } from "./ColorBox.js";
|
|
11
11
|
import { Dialog as C } from "./Dialog.js";
|
|
12
12
|
import { Dimmer as L } from "./Dimmer.js";
|
|
13
13
|
import { Divider as y } from "./Divider.js";
|
|
14
|
-
import { DmIcon as
|
|
15
|
-
import { DraggableControl as
|
|
14
|
+
import { DmIcon as F } from "./DmIcon.js";
|
|
15
|
+
import { DraggableControl as P } from "./DraggableControl.js";
|
|
16
16
|
import { Dropdown as M } from "./Dropdown.js";
|
|
17
17
|
import { FitText as h } from "./FitText.js";
|
|
18
18
|
import { Flex as w } from "./Flex.js";
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
19
|
+
import { Floating as O } from "./Floating.js";
|
|
20
|
+
import { Icon as U } from "./Icon.js";
|
|
21
|
+
import { Image as j } from "./Image.js";
|
|
22
|
+
import { ImageButton as z } from "./ImageButton.js";
|
|
23
|
+
import { InfinitePlane as H } from "./InfinitePlane.js";
|
|
24
|
+
import { Input as W } from "./Input.js";
|
|
25
|
+
import { KeyListener as Y } from "./KeyListener.js";
|
|
26
|
+
import { Knob as _ } from "./Knob.js";
|
|
27
|
+
import { LabeledControls as oo } from "./LabeledControls.js";
|
|
28
|
+
import { LabeledList as eo } from "./LabeledList.js";
|
|
29
|
+
import { MenuBar as mo } from "./MenuBar.js";
|
|
30
|
+
import { Modal as xo } from "./Modal.js";
|
|
31
|
+
import { NoticeBox as io } from "./NoticeBox.js";
|
|
32
|
+
import { NumberInput as lo } from "./NumberInput.js";
|
|
33
|
+
import { Popper as uo } from "./Popper.js";
|
|
34
|
+
import { ProgressBar as co } from "./ProgressBar.js";
|
|
35
|
+
import { RestrictedInput as Bo } from "./RestrictedInput.js";
|
|
36
|
+
import { RoundGauge as Io } from "./RoundGauge.js";
|
|
37
|
+
import { Section as To } from "./Section.js";
|
|
38
|
+
import { Slider as ko } from "./Slider.js";
|
|
39
|
+
import { Stack as So } from "./Stack.js";
|
|
40
|
+
import { StyleableSection as Ao } from "./StyleableSection.js";
|
|
41
|
+
import { Table as No } from "./Table.js";
|
|
42
|
+
import { Tabs as Ko } from "./Tabs.js";
|
|
43
|
+
import { TextArea as Ro } from "./TextArea.js";
|
|
44
|
+
import { TimeDisplay as vo } from "./TimeDisplay.js";
|
|
45
|
+
import { Tooltip as Go } from "./Tooltip.js";
|
|
46
|
+
import { TrackOutsideClicks as Qo } from "./TrackOutsideClicks.js";
|
|
47
|
+
import { VirtualList as Vo } from "./VirtualList.js";
|
|
47
48
|
export {
|
|
48
49
|
e as AnimatedNumber,
|
|
49
50
|
m as Autofocus,
|
|
@@ -53,42 +54,43 @@ export {
|
|
|
53
54
|
u as Button,
|
|
54
55
|
c as ByondUi,
|
|
55
56
|
b as Chart,
|
|
56
|
-
|
|
57
|
+
g as Collapsible,
|
|
57
58
|
D as ColorBox,
|
|
58
59
|
C as Dialog,
|
|
59
60
|
L as Dimmer,
|
|
60
61
|
y as Divider,
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
F as DmIcon,
|
|
63
|
+
P as DraggableControl,
|
|
63
64
|
M as Dropdown,
|
|
64
65
|
h as FitText,
|
|
65
66
|
w as Flex,
|
|
66
|
-
O as
|
|
67
|
-
U as
|
|
68
|
-
j as
|
|
69
|
-
z as
|
|
70
|
-
H as
|
|
71
|
-
W as
|
|
72
|
-
Y as
|
|
73
|
-
_ as
|
|
74
|
-
oo as
|
|
75
|
-
eo as
|
|
76
|
-
mo as
|
|
77
|
-
xo as
|
|
78
|
-
io as
|
|
79
|
-
lo as
|
|
80
|
-
uo as
|
|
81
|
-
co as
|
|
82
|
-
Bo as
|
|
83
|
-
|
|
84
|
-
To as
|
|
85
|
-
ko as
|
|
86
|
-
So as
|
|
87
|
-
Ao as
|
|
88
|
-
|
|
89
|
-
Ko as
|
|
90
|
-
Ro as
|
|
91
|
-
vo as
|
|
92
|
-
Go as
|
|
93
|
-
Qo as
|
|
67
|
+
O as Floating,
|
|
68
|
+
U as Icon,
|
|
69
|
+
j as Image,
|
|
70
|
+
z as ImageButton,
|
|
71
|
+
H as InfinitePlane,
|
|
72
|
+
W as Input,
|
|
73
|
+
Y as KeyListener,
|
|
74
|
+
_ as Knob,
|
|
75
|
+
oo as LabeledControls,
|
|
76
|
+
eo as LabeledList,
|
|
77
|
+
mo as MenuBar,
|
|
78
|
+
xo as Modal,
|
|
79
|
+
io as NoticeBox,
|
|
80
|
+
lo as NumberInput,
|
|
81
|
+
uo as Popper,
|
|
82
|
+
co as ProgressBar,
|
|
83
|
+
Bo as RestrictedInput,
|
|
84
|
+
Io as RoundGauge,
|
|
85
|
+
To as Section,
|
|
86
|
+
ko as Slider,
|
|
87
|
+
So as Stack,
|
|
88
|
+
Ao as StyleableSection,
|
|
89
|
+
No as Table,
|
|
90
|
+
Ko as Tabs,
|
|
91
|
+
Ro as TextArea,
|
|
92
|
+
vo as TimeDisplay,
|
|
93
|
+
Go as Tooltip,
|
|
94
|
+
Qo as TrackOutsideClicks,
|
|
95
|
+
Vo as VirtualList
|
|
94
96
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tgui-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "TGUI core component library",
|
|
5
5
|
"keywords": ["TGUI", "library", "typescript"],
|
|
6
6
|
"files": ["dist", "styles"],
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"require": "./dist/components/index.cjs"
|
|
11
11
|
},
|
|
12
12
|
"./styles": {
|
|
13
|
-
"
|
|
14
|
-
"
|
|
13
|
+
"sass": "./styles/main.scss",
|
|
14
|
+
"default": "./styles/main.scss"
|
|
15
15
|
},
|
|
16
16
|
"./styles/components/*": {
|
|
17
17
|
"sass": "./styles/components/*"
|
|
@@ -39,36 +39,35 @@
|
|
|
39
39
|
"type": "module",
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@biomejs/biome": "1.9.4",
|
|
42
|
-
"@
|
|
42
|
+
"@floating-ui/react": "^0.27.6",
|
|
43
43
|
"@popperjs/core": "^2.11.8",
|
|
44
44
|
"@storybook/addon-console": "^3.0.0",
|
|
45
|
-
"@storybook/addon-essentials": "^8.
|
|
46
|
-
"@storybook/addon-interactions": "^8.
|
|
47
|
-
"@storybook/addon-onboarding": "^8.
|
|
48
|
-
"@storybook/blocks": "^8.
|
|
49
|
-
"@storybook/react": "^8.
|
|
50
|
-
"@storybook/react-vite": "^8.
|
|
51
|
-
"@storybook/test": "^8.
|
|
52
|
-
"@storybook/theming": "^8.
|
|
53
|
-
"@types/node": "^22.
|
|
54
|
-
"@types/react": "^
|
|
55
|
-
"@types/react-dom": "^
|
|
56
|
-
"@types/webpack-env": "^1.18.
|
|
57
|
-
"@vitejs/plugin-react-swc": "^3.
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"prettier": "^3.3.3",
|
|
45
|
+
"@storybook/addon-essentials": "^8.6.12",
|
|
46
|
+
"@storybook/addon-interactions": "^8.6.12",
|
|
47
|
+
"@storybook/addon-onboarding": "^8.6.12",
|
|
48
|
+
"@storybook/blocks": "^8.6.12",
|
|
49
|
+
"@storybook/react": "^8.6.12",
|
|
50
|
+
"@storybook/react-vite": "^8.6.12",
|
|
51
|
+
"@storybook/test": "^8.6.12",
|
|
52
|
+
"@storybook/theming": "^8.6.12",
|
|
53
|
+
"@types/node": "^22.14.0",
|
|
54
|
+
"@types/react": "^19.1.0",
|
|
55
|
+
"@types/react-dom": "^19.1.1",
|
|
56
|
+
"@types/webpack-env": "^1.18.8",
|
|
57
|
+
"@vitejs/plugin-react-swc": "^3.8.1",
|
|
58
|
+
"glob": "^11.0.1",
|
|
59
|
+
"prettier": "^3.5.3",
|
|
61
60
|
"react-popper": "^2.3.0",
|
|
62
61
|
"sass": "^1.81.0",
|
|
63
|
-
"storybook": "^8.
|
|
62
|
+
"storybook": "^8.6.12",
|
|
64
63
|
"storybook-addon-sass-postcss": "^0.3.2",
|
|
65
|
-
"typescript": "^5.
|
|
66
|
-
"vite": "^
|
|
67
|
-
"vite-plugin-dts": "^4.3
|
|
64
|
+
"typescript": "^5.8.3",
|
|
65
|
+
"vite": "^6.2.5",
|
|
66
|
+
"vite-plugin-dts": "^4.5.3"
|
|
68
67
|
},
|
|
69
68
|
"peerDependencies": {
|
|
70
|
-
"react": "^
|
|
71
|
-
"react-dom": "^
|
|
69
|
+
"react": "^19.1.0",
|
|
70
|
+
"react-dom": "^19.1.0"
|
|
72
71
|
},
|
|
73
|
-
"packageManager": "pnpm@
|
|
72
|
+
"packageManager": "pnpm@10.7.0"
|
|
74
73
|
}
|
package/styles/base.scss
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Use css-variables
|
|
3
|
+
*/
|
|
4
|
+
|
|
1
5
|
@use "sass:color";
|
|
2
6
|
@use "sass:math";
|
|
3
7
|
|
|
4
8
|
$color-fg: hsl(0, 0%, 100%) !default;
|
|
5
|
-
$color-bg:
|
|
6
|
-
$color-bg-section:
|
|
7
|
-
$color-bg-grad-spread:
|
|
8
|
-
$color-bg-start: color
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
) !default;
|
|
12
|
-
$
|
|
13
|
-
|
|
14
|
-
$lightness: -$color-bg-grad-spread
|
|
15
|
-
) !default;
|
|
9
|
+
$color-bg: var(--color-base) !default;
|
|
10
|
+
$color-bg-section: var(--color-section) !default;
|
|
11
|
+
$color-bg-grad-spread: var(--base-gradient-spread) !default;
|
|
12
|
+
$color-bg-start: var(--color-base-start) !default;
|
|
13
|
+
$color-bg-end: var(--color-base-end) !default;
|
|
14
|
+
|
|
15
|
+
$cursor-default: var(--cursor-default) !default;
|
|
16
|
+
$cursor-hover: var(--cursor-pointer) !default;
|
|
17
|
+
$cursor-disabled: var(--cursor-default) !default;
|
|
16
18
|
|
|
17
19
|
$unit: 12px;
|
|
18
20
|
$font-size: 1 * $unit !default;
|