tgui-core 1.2.0 → 1.3.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 +3 -3
- package/dist/common/color.js +31 -30
- package/dist/common/events.js +5 -5
- package/dist/common/format.js +27 -27
- package/dist/common/hotkeys.d.ts +0 -1
- package/dist/common/hotkeys.js +2 -2
- package/dist/common/math.d.ts +4 -0
- package/dist/common/math.js +29 -25
- package/dist/common/random.js +14 -13
- package/dist/common/react.js +1 -1
- package/dist/common/string.js +9 -9
- package/dist/common/type-utils.d.ts +1 -1
- package/dist/components/AnimatedNumber.d.ts +6 -6
- package/dist/components/AnimatedNumber.js +14 -17
- package/dist/components/Autofocus.d.ts +0 -1
- package/dist/components/Blink.d.ts +0 -1
- package/dist/components/BlockQuote.d.ts +0 -1
- package/dist/components/BlockQuote.js +4 -7
- package/dist/components/Box.d.ts +0 -1
- package/dist/components/Box.js +4 -4
- package/dist/components/Button.d.ts +0 -1
- package/dist/components/Button.js +173 -211
- package/dist/components/ByondUi.js +3 -3
- package/dist/components/Chart.d.ts +0 -1
- package/dist/components/Chart.js +25 -22
- package/dist/components/Collapsible.d.ts +0 -1
- package/dist/components/ColorBox.d.ts +0 -1
- package/dist/components/ColorBox.js +7 -14
- package/dist/components/Dialog.js +31 -40
- package/dist/components/Dimmer.d.ts +0 -1
- package/dist/components/Dimmer.js +6 -9
- package/dist/components/Divider.js +10 -14
- package/dist/components/DmIcon.d.ts +0 -1
- package/dist/components/DraggableControl.js +57 -49
- package/dist/components/Dropdown.d.ts +0 -1
- package/dist/components/Dropdown.js +73 -67
- package/dist/components/FitText.d.ts +0 -1
- package/dist/components/Flex.d.ts +1 -1
- package/dist/components/Flex.js +39 -41
- package/dist/components/Icon.d.ts +0 -1
- package/dist/components/Icon.js +27 -34
- package/dist/components/Image.d.ts +0 -1
- package/dist/components/Image.js +7 -6
- package/dist/components/ImageButton.d.ts +0 -1
- package/dist/components/ImageButton.js +84 -171
- package/dist/components/InfinitePlane.js +1 -1
- package/dist/components/Input.d.ts +0 -1
- package/dist/components/Input.js +57 -64
- package/dist/components/KeyListener.d.ts +0 -1
- package/dist/components/Knob.d.ts +0 -1
- package/dist/components/Knob.js +91 -117
- package/dist/components/LabeledControls.d.ts +0 -1
- package/dist/components/LabeledList.d.ts +0 -1
- package/dist/components/LabeledList.js +48 -55
- package/dist/components/MenuBar.d.ts +0 -1
- package/dist/components/MenuBar.js +93 -102
- package/dist/components/Modal.d.ts +0 -1
- package/dist/components/Modal.js +11 -18
- package/dist/components/NoticeBox.d.ts +0 -1
- package/dist/components/NoticeBox.js +16 -43
- package/dist/components/NumberInput.d.ts +0 -2
- package/dist/components/NumberInput.js +99 -107
- package/dist/components/Popper.d.ts +0 -1
- package/dist/components/ProgressBar.d.ts +0 -1
- package/dist/components/ProgressBar.js +22 -27
- package/dist/components/RestrictedInput.js +64 -58
- package/dist/components/RoundGauge.d.ts +0 -1
- package/dist/components/RoundGauge.js +70 -104
- package/dist/components/Section.d.ts +1 -2
- package/dist/components/Section.js +50 -51
- package/dist/components/Slider.d.ts +0 -1
- package/dist/components/Slider.js +72 -80
- package/dist/components/Stack.d.ts +0 -1
- package/dist/components/Stack.js +37 -47
- package/dist/components/StyleableSection.d.ts +0 -1
- package/dist/components/StyleableSection.js +11 -11
- package/dist/components/Table.d.ts +0 -1
- package/dist/components/Table.js +38 -47
- package/dist/components/Tabs.d.ts +0 -1
- package/dist/components/Tabs.js +43 -75
- package/dist/components/TextArea.d.ts +0 -1
- package/dist/components/TextArea.js +74 -69
- package/dist/components/TimeDisplay.d.ts +7 -6
- package/dist/components/TimeDisplay.js +17 -17
- package/dist/components/Tooltip.d.ts +1 -2
- package/dist/components/Tooltip.js +8 -10
- package/dist/components/TrackOutsideClicks.d.ts +0 -1
- package/dist/components/VirtualList.d.ts +0 -1
- package/package.json +11 -25
- package/dist/ProgressBar.module-Jzqlebbx.js +0 -29
- package/dist/Section.module-qhQWhlUX.js +0 -18
- package/dist/assets/BlockQuote.css +0 -1
- package/dist/assets/Button.css +0 -1
- package/dist/assets/ColorBox.css +0 -1
- package/dist/assets/Dialog.css +0 -1
- package/dist/assets/Dimmer.css +0 -1
- package/dist/assets/Divider.css +0 -1
- package/dist/assets/Flex.css +0 -1
- package/dist/assets/Icon.css +0 -6
- package/dist/assets/ImageButton.css +0 -5
- package/dist/assets/Input.css +0 -1
- package/dist/assets/Knob.css +0 -1
- package/dist/assets/LabeledList.css +0 -1
- package/dist/assets/MenuBar.css +0 -1
- package/dist/assets/Modal.css +0 -1
- package/dist/assets/NoticeBox.css +0 -1
- package/dist/assets/NumberInput.css +0 -1
- package/dist/assets/ProgressBar.css +0 -1
- package/dist/assets/RoundGauge.css +0 -1
- package/dist/assets/Section.css +0 -1
- package/dist/assets/Slider.css +0 -1
- package/dist/assets/Stack.css +0 -1
- package/dist/assets/Table.css +0 -1
- package/dist/assets/Tabs.css +0 -1
- package/dist/assets/TextArea.css +0 -1
- package/dist/assets/Tooltip.css +0 -1
package/dist/components/Flex.js
CHANGED
|
@@ -1,72 +1,70 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { classes as
|
|
3
|
-
import { computeBoxClassName as m, computeBoxProps as a, unit as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
function y(e) {
|
|
9
|
-
return l([
|
|
10
|
-
r.flex,
|
|
11
|
-
e.inline && r.inline,
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { classes as r } from "../common/react.js";
|
|
3
|
+
import { computeBoxClassName as m, computeBoxProps as a, unit as f } from "./Box.js";
|
|
4
|
+
function p(e) {
|
|
5
|
+
return r([
|
|
6
|
+
"Flex",
|
|
7
|
+
e.inline && "Flex--inline",
|
|
12
8
|
m(e)
|
|
13
9
|
]);
|
|
14
10
|
}
|
|
15
|
-
function
|
|
16
|
-
const { direction:
|
|
11
|
+
function d(e) {
|
|
12
|
+
const { direction: s, wrap: t, align: i, justify: n, ...o } = e;
|
|
17
13
|
return a({
|
|
18
14
|
style: {
|
|
19
|
-
...
|
|
20
|
-
flexDirection:
|
|
15
|
+
...o.style,
|
|
16
|
+
flexDirection: s,
|
|
21
17
|
flexWrap: t === !0 ? "wrap" : t,
|
|
22
|
-
alignItems:
|
|
23
|
-
justifyContent:
|
|
18
|
+
alignItems: i,
|
|
19
|
+
justifyContent: n
|
|
24
20
|
},
|
|
25
|
-
...
|
|
21
|
+
...o
|
|
26
22
|
});
|
|
27
23
|
}
|
|
28
|
-
function
|
|
29
|
-
const { className:
|
|
30
|
-
return /* @__PURE__ */
|
|
24
|
+
function F(e) {
|
|
25
|
+
const { className: s, ...t } = e;
|
|
26
|
+
return /* @__PURE__ */ l(
|
|
31
27
|
"div",
|
|
32
28
|
{
|
|
33
|
-
className:
|
|
34
|
-
...
|
|
29
|
+
className: r([s, p(t)]),
|
|
30
|
+
...d(t)
|
|
35
31
|
}
|
|
36
32
|
);
|
|
37
33
|
}
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
const N = (e) => r(["Flex__item", m(e)]);
|
|
35
|
+
function v(e) {
|
|
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
|
|
40
37
|
// bugs when rendering tables inside the flex.
|
|
41
38
|
e.width ?? // If grow is used, basis should be set to 0 to be consistent with
|
|
42
39
|
// flex css shorthand `flex: 1`.
|
|
43
40
|
(t !== void 0 ? 0 : void 0);
|
|
44
41
|
return a({
|
|
45
42
|
style: {
|
|
46
|
-
...
|
|
43
|
+
...s,
|
|
47
44
|
flexGrow: t !== void 0 && Number(t),
|
|
48
|
-
flexShrink:
|
|
49
|
-
flexBasis:
|
|
50
|
-
order:
|
|
51
|
-
alignSelf:
|
|
45
|
+
flexShrink: n !== void 0 && Number(n),
|
|
46
|
+
flexBasis: f(x),
|
|
47
|
+
order: i,
|
|
48
|
+
alignSelf: c
|
|
52
49
|
},
|
|
53
|
-
...
|
|
50
|
+
...u
|
|
54
51
|
});
|
|
55
52
|
}
|
|
56
|
-
function
|
|
57
|
-
const { className:
|
|
58
|
-
return /* @__PURE__ */
|
|
53
|
+
function y(e) {
|
|
54
|
+
const { className: s, ...t } = e;
|
|
55
|
+
return /* @__PURE__ */ l(
|
|
59
56
|
"div",
|
|
60
57
|
{
|
|
61
|
-
className:
|
|
62
|
-
...
|
|
58
|
+
className: r([s, N(e)]),
|
|
59
|
+
...v(t)
|
|
63
60
|
}
|
|
64
61
|
);
|
|
65
62
|
}
|
|
66
|
-
|
|
63
|
+
F.Item = y;
|
|
67
64
|
export {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
v as
|
|
65
|
+
F as Flex,
|
|
66
|
+
p as computeFlexClassName,
|
|
67
|
+
N as computeFlexItemClassName,
|
|
68
|
+
v as computeFlexItemProps,
|
|
69
|
+
d as computeFlexProps
|
|
72
70
|
};
|
package/dist/components/Icon.js
CHANGED
|
@@ -1,51 +1,44 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { classes as
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { classes as l } from "../common/react.js";
|
|
3
3
|
import { computeBoxProps as p, computeBoxClassName as u } from "./Box.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
let s = "";
|
|
13
|
-
if (t.startsWith("tg-"))
|
|
14
|
-
s = t;
|
|
4
|
+
const f = /-o$/;
|
|
5
|
+
function d(c) {
|
|
6
|
+
const { name: s, size: o, spin: a, className: N, rotation: r, ...e } = c, n = e.style || {};
|
|
7
|
+
o && (n.fontSize = `${o * 100}%`), r && (n.transform = `rotate(${r}deg)`), e.style = n;
|
|
8
|
+
const x = p(e);
|
|
9
|
+
let t = "";
|
|
10
|
+
if (s.startsWith("tg-"))
|
|
11
|
+
t = s;
|
|
15
12
|
else {
|
|
16
|
-
const
|
|
17
|
-
|
|
13
|
+
const I = f.test(s), i = s.replace(f, ""), S = !i.startsWith("fa-");
|
|
14
|
+
t = I ? "far " : "fas ", S && (t += "fa-"), t += i, a && (t += " fa-spin");
|
|
18
15
|
}
|
|
19
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ m(
|
|
20
17
|
"i",
|
|
21
18
|
{
|
|
22
|
-
className:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
u(
|
|
19
|
+
className: l([
|
|
20
|
+
"Icon",
|
|
21
|
+
t,
|
|
22
|
+
N,
|
|
23
|
+
u(e)
|
|
27
24
|
]),
|
|
28
|
-
...
|
|
25
|
+
...x
|
|
29
26
|
}
|
|
30
27
|
);
|
|
31
28
|
}
|
|
32
|
-
function
|
|
33
|
-
const { className:
|
|
34
|
-
return /* @__PURE__ */
|
|
29
|
+
function g(c) {
|
|
30
|
+
const { className: s, children: o, ...a } = c;
|
|
31
|
+
return /* @__PURE__ */ m(
|
|
35
32
|
"span",
|
|
36
33
|
{
|
|
37
|
-
className:
|
|
38
|
-
|
|
39
|
-
t,
|
|
40
|
-
u(c)
|
|
41
|
-
]),
|
|
42
|
-
...p(c),
|
|
34
|
+
className: l(["IconStack", s, u(a)]),
|
|
35
|
+
...p(a),
|
|
43
36
|
children: o
|
|
44
37
|
}
|
|
45
38
|
);
|
|
46
39
|
}
|
|
47
|
-
|
|
40
|
+
d.Stack = g;
|
|
48
41
|
export {
|
|
49
|
-
|
|
50
|
-
|
|
42
|
+
d as Icon,
|
|
43
|
+
g as IconStack
|
|
51
44
|
};
|
package/dist/components/Image.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { computeBoxProps as
|
|
2
|
+
import { useRef as a } from "react";
|
|
3
|
+
import { computeBoxProps as f } from "./Box.js";
|
|
4
4
|
const l = 5;
|
|
5
|
-
function
|
|
5
|
+
function E(o) {
|
|
6
6
|
const {
|
|
7
7
|
fixBlur: s = !0,
|
|
8
8
|
fixErrors: m = !1,
|
|
9
9
|
objectFit: n = "fill",
|
|
10
10
|
src: e,
|
|
11
11
|
...c
|
|
12
|
-
} = o, t =
|
|
12
|
+
} = o, t = a(0), r = f(c);
|
|
13
13
|
return r.style = {
|
|
14
14
|
...r.style,
|
|
15
15
|
"-ms-interpolation-mode": s ? "nearest-neighbor" : "auto",
|
|
@@ -26,10 +26,11 @@ function b(o) {
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
src: e,
|
|
29
|
-
...r
|
|
29
|
+
...r,
|
|
30
|
+
alt: "dm icon"
|
|
30
31
|
}
|
|
31
32
|
);
|
|
32
33
|
}
|
|
33
34
|
export {
|
|
34
|
-
|
|
35
|
+
E as Image
|
|
35
36
|
};
|
|
@@ -2,7 +2,6 @@ import { Placement } from '@popperjs/core';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { BooleanLike } from '../common/react';
|
|
4
4
|
import { BoxProps } from './Box';
|
|
5
|
-
|
|
6
5
|
type Props = Partial<{
|
|
7
6
|
/** Asset cache. Example: `asset={['assetname32x32', thing.key]}` */
|
|
8
7
|
asset: string[];
|
|
@@ -1,212 +1,125 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { classes as
|
|
3
|
-
import { computeBoxProps as
|
|
4
|
-
import { DmIcon as
|
|
5
|
-
import { Icon as
|
|
1
|
+
import { jsxs as f, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { classes as l } from "../common/react.js";
|
|
3
|
+
import { computeBoxProps as B } from "./Box.js";
|
|
4
|
+
import { DmIcon as D } from "./DmIcon.js";
|
|
5
|
+
import { Icon as F } from "./Icon.js";
|
|
6
6
|
import { Image as j } from "./Image.js";
|
|
7
7
|
import { Stack as I } from "./Stack.js";
|
|
8
8
|
import { Tooltip as z } from "./Tooltip.js";
|
|
9
|
-
|
|
10
|
-
color__black: P,
|
|
11
|
-
contentColor__black: q,
|
|
12
|
-
buttonsContainerColor__black: M,
|
|
13
|
-
color__white: R,
|
|
14
|
-
contentColor__white: T,
|
|
15
|
-
buttonsContainerColor__white: G,
|
|
16
|
-
color__red: H,
|
|
17
|
-
contentColor__red: J,
|
|
18
|
-
buttonsContainerColor__red: K,
|
|
19
|
-
color__orange: L,
|
|
20
|
-
contentColor__orange: O,
|
|
21
|
-
buttonsContainerColor__orange: Q,
|
|
22
|
-
color__yellow: U,
|
|
23
|
-
contentColor__yellow: V,
|
|
24
|
-
buttonsContainerColor__yellow: W,
|
|
25
|
-
color__olive: X,
|
|
26
|
-
contentColor__olive: Y,
|
|
27
|
-
buttonsContainerColor__olive: Z,
|
|
28
|
-
color__green: oo,
|
|
29
|
-
contentColor__green: to,
|
|
30
|
-
buttonsContainerColor__green: _o,
|
|
31
|
-
color__teal: no,
|
|
32
|
-
contentColor__teal: eo,
|
|
33
|
-
buttonsContainerColor__teal: ro,
|
|
34
|
-
color__blue: lo,
|
|
35
|
-
contentColor__blue: ao,
|
|
36
|
-
buttonsContainerColor__blue: co,
|
|
37
|
-
color__violet: so,
|
|
38
|
-
contentColor__violet: io,
|
|
39
|
-
buttonsContainerColor__violet: uo,
|
|
40
|
-
color__purple: Co,
|
|
41
|
-
contentColor__purple: go,
|
|
42
|
-
buttonsContainerColor__purple: bo,
|
|
43
|
-
color__pink: po,
|
|
44
|
-
contentColor__pink: mo,
|
|
45
|
-
buttonsContainerColor__pink: fo,
|
|
46
|
-
color__brown: ho,
|
|
47
|
-
contentColor__brown: vo,
|
|
48
|
-
buttonsContainerColor__brown: yo,
|
|
49
|
-
color__grey: wo,
|
|
50
|
-
contentColor__grey: ko,
|
|
51
|
-
buttonsContainerColor__grey: xo,
|
|
52
|
-
"color__light-grey": "_color__light-grey_7gau9_396",
|
|
53
|
-
"contentColor__light-grey": "_contentColor__light-grey_7gau9_407",
|
|
54
|
-
"buttonsContainerColor__light-grey": "_buttonsContainerColor__light-grey_7gau9_415",
|
|
55
|
-
color__good: Io,
|
|
56
|
-
contentColor__good: $o,
|
|
57
|
-
buttonsContainerColor__good: Ao,
|
|
58
|
-
color__average: Bo,
|
|
59
|
-
contentColor__average: No,
|
|
60
|
-
buttonsContainerColor__average: So,
|
|
61
|
-
color__bad: Do,
|
|
62
|
-
contentColor__bad: Fo,
|
|
63
|
-
buttonsContainerColor__bad: Eo,
|
|
64
|
-
color__label: jo,
|
|
65
|
-
contentColor__label: zo,
|
|
66
|
-
buttonsContainerColor__label: Po,
|
|
67
|
-
color__default: qo,
|
|
68
|
-
disabled: Mo,
|
|
69
|
-
selected: Ro,
|
|
70
|
-
contentColor__default: To,
|
|
71
|
-
contentDisabled: Go,
|
|
72
|
-
contentSelected: Ho,
|
|
73
|
-
buttonsContainerColor__default: Jo,
|
|
74
|
-
ImageButton: Ko,
|
|
75
|
-
noAction: Lo,
|
|
76
|
-
container: Oo,
|
|
77
|
-
image: Qo,
|
|
78
|
-
buttonsContainer: Uo,
|
|
79
|
-
buttonsAltContainer: Vo,
|
|
80
|
-
buttonsEmpty: Wo,
|
|
81
|
-
content: Xo,
|
|
82
|
-
fluid: Yo,
|
|
83
|
-
info: Zo,
|
|
84
|
-
title: ot,
|
|
85
|
-
divider: tt,
|
|
86
|
-
contentFluid: _t,
|
|
87
|
-
hasButtons: nt
|
|
88
|
-
};
|
|
89
|
-
function Ct($) {
|
|
9
|
+
function H(k) {
|
|
90
10
|
const {
|
|
91
|
-
asset:
|
|
92
|
-
base64:
|
|
93
|
-
buttons:
|
|
94
|
-
buttonsAlt:
|
|
95
|
-
children:
|
|
96
|
-
className:
|
|
97
|
-
color:
|
|
11
|
+
asset: h,
|
|
12
|
+
base64: r,
|
|
13
|
+
buttons: m,
|
|
14
|
+
buttonsAlt: g,
|
|
15
|
+
children: i,
|
|
16
|
+
className: w,
|
|
17
|
+
color: e,
|
|
98
18
|
disabled: a,
|
|
99
|
-
dmFallback:
|
|
100
|
-
dmIcon:
|
|
101
|
-
dmIconState:
|
|
19
|
+
dmFallback: b,
|
|
20
|
+
dmIcon: x,
|
|
21
|
+
dmIconState: C,
|
|
102
22
|
fluid: c,
|
|
103
|
-
imageSize:
|
|
104
|
-
imageSrc:
|
|
105
|
-
onClick:
|
|
106
|
-
onRightClick:
|
|
107
|
-
selected:
|
|
108
|
-
title:
|
|
109
|
-
tooltip:
|
|
110
|
-
tooltipPosition:
|
|
111
|
-
...
|
|
112
|
-
} =
|
|
113
|
-
function
|
|
114
|
-
return /* @__PURE__ */ t(I, { height: `${
|
|
115
|
-
|
|
23
|
+
imageSize: o = 64,
|
|
24
|
+
imageSrc: d,
|
|
25
|
+
onClick: s,
|
|
26
|
+
onRightClick: p,
|
|
27
|
+
selected: _,
|
|
28
|
+
title: $,
|
|
29
|
+
tooltip: y,
|
|
30
|
+
tooltipPosition: v,
|
|
31
|
+
...S
|
|
32
|
+
} = k;
|
|
33
|
+
function N(n, A) {
|
|
34
|
+
return /* @__PURE__ */ t(I, { height: `${o}px`, width: `${o}px`, children: /* @__PURE__ */ t(I.Item, { grow: !0, textAlign: "center", align: "center", children: /* @__PURE__ */ t(
|
|
35
|
+
F,
|
|
116
36
|
{
|
|
117
|
-
spin:
|
|
118
|
-
name:
|
|
37
|
+
spin: A,
|
|
38
|
+
name: n,
|
|
119
39
|
color: "gray",
|
|
120
|
-
style: { fontSize: `calc(${
|
|
40
|
+
style: { fontSize: `calc(${o}px * 0.75)` }
|
|
121
41
|
}
|
|
122
42
|
) }) });
|
|
123
43
|
}
|
|
124
|
-
let
|
|
44
|
+
let u = /* @__PURE__ */ f(
|
|
125
45
|
"div",
|
|
126
46
|
{
|
|
127
|
-
className:
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
!
|
|
131
|
-
|
|
132
|
-
a &&
|
|
133
|
-
|
|
47
|
+
className: l([
|
|
48
|
+
"container",
|
|
49
|
+
m && "hasButtons",
|
|
50
|
+
!s && !p && "noAction",
|
|
51
|
+
_ && "selected",
|
|
52
|
+
a && "disabled",
|
|
53
|
+
e && typeof e == "string" ? `color__${e}` : "color__default"
|
|
134
54
|
]),
|
|
135
55
|
tabIndex: a ? void 0 : 0,
|
|
136
|
-
onClick: (
|
|
137
|
-
!a &&
|
|
56
|
+
onClick: (n) => {
|
|
57
|
+
!a && s && s(n);
|
|
58
|
+
},
|
|
59
|
+
onKeyDown: (n) => {
|
|
60
|
+
n.key === "Enter" && !a && s && s(n);
|
|
138
61
|
},
|
|
139
|
-
onContextMenu: (
|
|
140
|
-
|
|
62
|
+
onContextMenu: (n) => {
|
|
63
|
+
n.preventDefault(), !a && p && p(n);
|
|
141
64
|
},
|
|
142
|
-
style: { width: c ? "auto" : `calc(${
|
|
65
|
+
style: { width: c ? "auto" : `calc(${o}px + 0.5em + 2px)` },
|
|
143
66
|
children: [
|
|
144
|
-
/* @__PURE__ */ t("div", { className:
|
|
67
|
+
/* @__PURE__ */ t("div", { className: "image", children: r || h || d ? /* @__PURE__ */ t(
|
|
145
68
|
j,
|
|
146
69
|
{
|
|
147
|
-
className:
|
|
148
|
-
src:
|
|
149
|
-
height: `${
|
|
150
|
-
width: `${
|
|
70
|
+
className: l(!r && !d && h || []),
|
|
71
|
+
src: r ? `data:image/png;base64,${r}` : d,
|
|
72
|
+
height: `${o}px`,
|
|
73
|
+
width: `${o}px`
|
|
151
74
|
}
|
|
152
|
-
) :
|
|
153
|
-
|
|
75
|
+
) : x && C ? /* @__PURE__ */ t(
|
|
76
|
+
D,
|
|
154
77
|
{
|
|
155
|
-
icon:
|
|
156
|
-
icon_state:
|
|
157
|
-
fallback:
|
|
158
|
-
height: `${
|
|
159
|
-
width: `${
|
|
78
|
+
icon: x,
|
|
79
|
+
icon_state: C,
|
|
80
|
+
fallback: b || N("spinner", !0),
|
|
81
|
+
height: `${o}px`,
|
|
82
|
+
width: `${o}px`
|
|
160
83
|
}
|
|
161
|
-
) :
|
|
162
|
-
c ? /* @__PURE__ */
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
className: e([o.title, r && o.divider]),
|
|
167
|
-
children: w
|
|
168
|
-
}
|
|
169
|
-
),
|
|
170
|
-
r && /* @__PURE__ */ t("span", { className: e([o.contentFluid]), children: r })
|
|
171
|
-
] }) : r && /* @__PURE__ */ t(
|
|
84
|
+
) : N("question", !1) }),
|
|
85
|
+
c ? /* @__PURE__ */ f("div", { className: "info", children: [
|
|
86
|
+
$ && /* @__PURE__ */ t("span", { className: l(["title", i && "divider"]), children: $ }),
|
|
87
|
+
i && /* @__PURE__ */ t("span", { className: "contentFluid", children: i })
|
|
88
|
+
] }) : i && /* @__PURE__ */ t(
|
|
172
89
|
"span",
|
|
173
90
|
{
|
|
174
|
-
className:
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
a &&
|
|
178
|
-
|
|
91
|
+
className: l([
|
|
92
|
+
"content",
|
|
93
|
+
_ && "contentSelected",
|
|
94
|
+
a && "contentDisabled",
|
|
95
|
+
e && typeof e == "string" ? `contentColor__${e}` : "contentColor__default"
|
|
179
96
|
]),
|
|
180
|
-
children:
|
|
97
|
+
children: i
|
|
181
98
|
}
|
|
182
99
|
)
|
|
183
100
|
]
|
|
184
101
|
}
|
|
185
102
|
);
|
|
186
|
-
return
|
|
103
|
+
return y && (u = /* @__PURE__ */ t(z, { content: y, position: v, children: u })), /* @__PURE__ */ f(
|
|
187
104
|
"div",
|
|
188
105
|
{
|
|
189
|
-
className:
|
|
190
|
-
|
|
191
|
-
c && o.fluid,
|
|
192
|
-
A
|
|
193
|
-
]),
|
|
194
|
-
...D(N),
|
|
106
|
+
className: l(["ImageButton", c && "fluid", w]),
|
|
107
|
+
...B(S),
|
|
195
108
|
children: [
|
|
196
|
-
|
|
197
|
-
|
|
109
|
+
u,
|
|
110
|
+
m && /* @__PURE__ */ t(
|
|
198
111
|
"div",
|
|
199
112
|
{
|
|
200
|
-
className:
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
!
|
|
204
|
-
c &&
|
|
113
|
+
className: l([
|
|
114
|
+
"buttonsContainer",
|
|
115
|
+
g && "buttonsAltContainer",
|
|
116
|
+
!i && "buttonsEmpty",
|
|
117
|
+
c && e && typeof e == "string" ? `buttonsContainerColor__${e}` : c && "buttonsContainerColor__default"
|
|
205
118
|
]),
|
|
206
119
|
style: {
|
|
207
|
-
width:
|
|
120
|
+
width: g ? `calc(${o}px + 0.5em)` : "auto"
|
|
208
121
|
},
|
|
209
|
-
children:
|
|
122
|
+
children: m
|
|
210
123
|
}
|
|
211
124
|
)
|
|
212
125
|
]
|
|
@@ -214,5 +127,5 @@ function Ct($) {
|
|
|
214
127
|
);
|
|
215
128
|
}
|
|
216
129
|
export {
|
|
217
|
-
|
|
130
|
+
H as ImageButton
|
|
218
131
|
};
|
|
@@ -24,7 +24,7 @@ class k extends v {
|
|
|
24
24
|
}
|
|
25
25
|
doOffsetMouse(e) {
|
|
26
26
|
const { zoom: o } = this.state;
|
|
27
|
-
e.screenZoomX = e.screenX *
|
|
27
|
+
e.screenZoomX = e.screenX * o ** -1, e.screenZoomY = e.screenY * o ** -1;
|
|
28
28
|
}
|
|
29
29
|
handleMouseDown(e) {
|
|
30
30
|
this.setState((o) => ({
|