tgui-core 1.2.0 → 1.3.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/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 +87 -170
- 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 +25 -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/Input.js
CHANGED
|
@@ -1,88 +1,81 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { KEY as
|
|
4
|
-
import { classes as
|
|
5
|
-
import { debounce as
|
|
6
|
-
import { Box as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
fluid: L,
|
|
10
|
-
baseline: Y,
|
|
11
|
-
inner: q,
|
|
12
|
-
monospace: v
|
|
13
|
-
};
|
|
14
|
-
function a(r) {
|
|
15
|
-
return typeof r != "number" && typeof r != "string" ? "" : String(r);
|
|
1
|
+
import { jsxs as E, jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as K, useEffect as m } from "react";
|
|
3
|
+
import { KEY as V, isEscape as j } from "../common/keys.js";
|
|
4
|
+
import { classes as k } from "../common/react.js";
|
|
5
|
+
import { debounce as B } from "../common/timer.js";
|
|
6
|
+
import { Box as R } from "./Box.js";
|
|
7
|
+
function l(u) {
|
|
8
|
+
return typeof u != "number" && typeof u != "string" ? "" : String(u);
|
|
16
9
|
}
|
|
17
|
-
const
|
|
18
|
-
function
|
|
10
|
+
const S = B((u) => u(), 250);
|
|
11
|
+
function A(u) {
|
|
19
12
|
const {
|
|
20
|
-
autoFocus:
|
|
21
|
-
autoSelect:
|
|
22
|
-
className:
|
|
23
|
-
disabled:
|
|
13
|
+
autoFocus: d,
|
|
14
|
+
autoSelect: s,
|
|
15
|
+
className: g,
|
|
16
|
+
disabled: I,
|
|
24
17
|
expensive: T,
|
|
25
|
-
fluid:
|
|
18
|
+
fluid: b,
|
|
26
19
|
maxLength: x,
|
|
27
|
-
monospace:
|
|
20
|
+
monospace: y,
|
|
28
21
|
onChange: t,
|
|
29
|
-
onEnter:
|
|
22
|
+
onEnter: n,
|
|
30
23
|
onEscape: o,
|
|
31
|
-
onInput:
|
|
32
|
-
placeholder:
|
|
33
|
-
selfClear:
|
|
34
|
-
value:
|
|
24
|
+
onInput: i,
|
|
25
|
+
placeholder: h,
|
|
26
|
+
selfClear: w,
|
|
27
|
+
value: a,
|
|
35
28
|
...N
|
|
36
|
-
} =
|
|
37
|
-
function
|
|
38
|
-
var
|
|
39
|
-
if (!
|
|
40
|
-
const
|
|
41
|
-
T ?
|
|
29
|
+
} = u, c = K(null);
|
|
30
|
+
function _(e) {
|
|
31
|
+
var f;
|
|
32
|
+
if (!i) return;
|
|
33
|
+
const r = (f = e.currentTarget) == null ? void 0 : f.value;
|
|
34
|
+
T ? S(() => i(e, r)) : i(e, r);
|
|
42
35
|
}
|
|
43
|
-
function
|
|
44
|
-
if (e.key ===
|
|
45
|
-
|
|
36
|
+
function D(e) {
|
|
37
|
+
if (e.key === V.Enter) {
|
|
38
|
+
n == null || n(e, e.currentTarget.value), w ? e.currentTarget.value = "" : (e.currentTarget.blur(), t == null || t(e, e.currentTarget.value));
|
|
46
39
|
return;
|
|
47
40
|
}
|
|
48
|
-
|
|
41
|
+
j(e.key) && (o == null || o(e), e.currentTarget.value = l(a), e.currentTarget.blur());
|
|
49
42
|
}
|
|
50
|
-
return
|
|
51
|
-
const e =
|
|
43
|
+
return m(() => {
|
|
44
|
+
const e = c.current;
|
|
52
45
|
if (!e) return;
|
|
53
|
-
const
|
|
54
|
-
e.value !==
|
|
55
|
-
e.focus(),
|
|
46
|
+
const r = l(a);
|
|
47
|
+
e.value !== r && (e.value = r), !(!d && !s) && setTimeout(() => {
|
|
48
|
+
e.focus(), s && e.select();
|
|
56
49
|
}, 1);
|
|
57
|
-
}, []),
|
|
58
|
-
const e =
|
|
50
|
+
}, []), m(() => {
|
|
51
|
+
const e = c.current;
|
|
59
52
|
if (!e || document.activeElement === e)
|
|
60
53
|
return;
|
|
61
|
-
const
|
|
62
|
-
e.value !==
|
|
63
|
-
}), /* @__PURE__ */
|
|
64
|
-
|
|
54
|
+
const r = l(a);
|
|
55
|
+
e.value !== r && (e.value = r);
|
|
56
|
+
}), /* @__PURE__ */ E(
|
|
57
|
+
R,
|
|
65
58
|
{
|
|
66
|
-
className:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
59
|
+
className: k([
|
|
60
|
+
"Input",
|
|
61
|
+
b && "Input--fluid",
|
|
62
|
+
y && "Input--monospace",
|
|
63
|
+
g
|
|
71
64
|
]),
|
|
72
65
|
...N,
|
|
73
66
|
children: [
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ p("div", { className: "Input__baseline", children: "." }),
|
|
68
|
+
/* @__PURE__ */ p(
|
|
76
69
|
"input",
|
|
77
70
|
{
|
|
78
|
-
className:
|
|
79
|
-
disabled:
|
|
71
|
+
className: "Input__input",
|
|
72
|
+
disabled: I,
|
|
80
73
|
maxLength: x,
|
|
81
74
|
onBlur: (e) => t == null ? void 0 : t(e, e.target.value),
|
|
82
|
-
onChange:
|
|
83
|
-
onKeyDown:
|
|
84
|
-
placeholder:
|
|
85
|
-
ref:
|
|
75
|
+
onChange: _,
|
|
76
|
+
onKeyDown: D,
|
|
77
|
+
placeholder: h,
|
|
78
|
+
ref: c
|
|
86
79
|
}
|
|
87
80
|
)
|
|
88
81
|
]
|
|
@@ -90,6 +83,6 @@ function P(r) {
|
|
|
90
83
|
);
|
|
91
84
|
}
|
|
92
85
|
export {
|
|
93
|
-
|
|
94
|
-
|
|
86
|
+
A as Input,
|
|
87
|
+
l as toInputValue
|
|
95
88
|
};
|
package/dist/components/Knob.js
CHANGED
|
@@ -1,155 +1,129 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { keyOfMatchingRange as
|
|
3
|
-
import { classes as
|
|
4
|
-
import { computeBoxClassName as
|
|
5
|
-
import { DraggableControl as
|
|
6
|
-
|
|
7
|
-
knob: R,
|
|
8
|
-
circle: $,
|
|
9
|
-
cursorBox: A,
|
|
10
|
-
cursor: G,
|
|
11
|
-
popupValue: H,
|
|
12
|
-
ring: J,
|
|
13
|
-
ringTrackPivot: L,
|
|
14
|
-
ringTrack: Q,
|
|
15
|
-
ringFillPivot: U,
|
|
16
|
-
bipolar: W,
|
|
17
|
-
ringFill: X,
|
|
18
|
-
color__black: Y,
|
|
19
|
-
color__white: Z,
|
|
20
|
-
color__red: oo,
|
|
21
|
-
color__orange: _o,
|
|
22
|
-
color__yellow: ro,
|
|
23
|
-
color__olive: lo,
|
|
24
|
-
color__green: eo,
|
|
25
|
-
color__teal: co,
|
|
26
|
-
color__blue: no,
|
|
27
|
-
color__violet: ao,
|
|
28
|
-
color__purple: io,
|
|
29
|
-
color__pink: so,
|
|
30
|
-
color__brown: to,
|
|
31
|
-
color__grey: go,
|
|
32
|
-
"color__light-grey": "_color__light-grey_69dqe_169",
|
|
33
|
-
color__good: po,
|
|
34
|
-
color__average: uo,
|
|
35
|
-
color__bad: mo,
|
|
36
|
-
color__label: qo
|
|
37
|
-
};
|
|
38
|
-
function xo(t) {
|
|
1
|
+
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { keyOfMatchingRange as $, scale as t } from "../common/math.js";
|
|
3
|
+
import { classes as j } from "../common/react.js";
|
|
4
|
+
import { computeBoxClassName as E, computeBoxProps as T } from "./Box.js";
|
|
5
|
+
import { DraggableControl as I } from "./DraggableControl.js";
|
|
6
|
+
function H(c) {
|
|
39
7
|
const {
|
|
40
8
|
// Draggable props (passthrough)
|
|
41
|
-
animated:
|
|
42
|
-
format:
|
|
43
|
-
maxValue:
|
|
9
|
+
animated: m,
|
|
10
|
+
format: d,
|
|
11
|
+
maxValue: a,
|
|
44
12
|
minValue: l,
|
|
45
|
-
onChange:
|
|
46
|
-
onDrag:
|
|
47
|
-
step:
|
|
48
|
-
stepPixelSize:
|
|
49
|
-
suppressFlicker:
|
|
50
|
-
unclamped:
|
|
51
|
-
unit:
|
|
52
|
-
value:
|
|
13
|
+
onChange: u,
|
|
14
|
+
onDrag: p,
|
|
15
|
+
step: g,
|
|
16
|
+
stepPixelSize: _,
|
|
17
|
+
suppressFlicker: b,
|
|
18
|
+
unclamped: f,
|
|
19
|
+
unit: h,
|
|
20
|
+
value: v,
|
|
53
21
|
// Own props
|
|
54
|
-
bipolar:
|
|
55
|
-
className:
|
|
56
|
-
color:
|
|
57
|
-
fillValue:
|
|
58
|
-
ranges:
|
|
59
|
-
size:
|
|
60
|
-
style:
|
|
61
|
-
...
|
|
62
|
-
} =
|
|
63
|
-
return /* @__PURE__ */
|
|
64
|
-
|
|
22
|
+
bipolar: r,
|
|
23
|
+
className: x,
|
|
24
|
+
color: K,
|
|
25
|
+
fillValue: s,
|
|
26
|
+
ranges: N = {},
|
|
27
|
+
size: y = 1,
|
|
28
|
+
style: V,
|
|
29
|
+
...n
|
|
30
|
+
} = c;
|
|
31
|
+
return /* @__PURE__ */ e(
|
|
32
|
+
I,
|
|
65
33
|
{
|
|
66
34
|
dragMatrix: [0, -1],
|
|
67
|
-
animated:
|
|
68
|
-
format:
|
|
69
|
-
maxValue:
|
|
35
|
+
animated: m,
|
|
36
|
+
format: d,
|
|
37
|
+
maxValue: a,
|
|
70
38
|
minValue: l,
|
|
71
|
-
onChange:
|
|
72
|
-
onDrag:
|
|
73
|
-
step:
|
|
74
|
-
stepPixelSize:
|
|
75
|
-
suppressFlicker:
|
|
76
|
-
unclamped:
|
|
77
|
-
unit:
|
|
78
|
-
value:
|
|
79
|
-
children: (
|
|
39
|
+
onChange: u,
|
|
40
|
+
onDrag: p,
|
|
41
|
+
step: g,
|
|
42
|
+
stepPixelSize: _,
|
|
43
|
+
suppressFlicker: b,
|
|
44
|
+
unclamped: f,
|
|
45
|
+
unit: h,
|
|
46
|
+
value: v,
|
|
47
|
+
children: (k) => {
|
|
80
48
|
const {
|
|
81
|
-
displayElement:
|
|
49
|
+
displayElement: D,
|
|
82
50
|
displayValue: i,
|
|
83
|
-
dragging:
|
|
51
|
+
dragging: M,
|
|
84
52
|
handleDragStart: B,
|
|
85
|
-
inputElement:
|
|
86
|
-
value:
|
|
87
|
-
} =
|
|
88
|
-
|
|
53
|
+
inputElement: P,
|
|
54
|
+
value: C
|
|
55
|
+
} = k, F = t(
|
|
56
|
+
s ?? i,
|
|
89
57
|
l,
|
|
90
|
-
|
|
91
|
-
),
|
|
92
|
-
return /* @__PURE__ */
|
|
58
|
+
a
|
|
59
|
+
), w = t(i, l, a), z = K || $(s ?? C, N) || "default", S = Math.min((w - 0.5) * 270, 225);
|
|
60
|
+
return /* @__PURE__ */ o(
|
|
93
61
|
"div",
|
|
94
62
|
{
|
|
95
|
-
className:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
63
|
+
className: j([
|
|
64
|
+
"Knob",
|
|
65
|
+
`Knob--color--${z}`,
|
|
66
|
+
r && "Knob--bipolar",
|
|
67
|
+
x,
|
|
68
|
+
E(n)
|
|
101
69
|
]),
|
|
102
|
-
...
|
|
70
|
+
...T({
|
|
103
71
|
style: {
|
|
104
|
-
fontSize:
|
|
105
|
-
...
|
|
72
|
+
fontSize: `${y}em`,
|
|
73
|
+
...V
|
|
106
74
|
},
|
|
107
|
-
...
|
|
75
|
+
...n
|
|
108
76
|
}),
|
|
109
77
|
onMouseDown: B,
|
|
110
78
|
children: [
|
|
111
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ e("div", { className: "Knob__circle", children: /* @__PURE__ */ e(
|
|
112
80
|
"div",
|
|
113
81
|
{
|
|
114
|
-
className:
|
|
82
|
+
className: "Knob__cursorBox",
|
|
115
83
|
style: {
|
|
116
84
|
transform: `rotate(${S}deg)`
|
|
117
85
|
},
|
|
118
|
-
children: /* @__PURE__ */
|
|
86
|
+
children: /* @__PURE__ */ e("div", { className: "Knob__cursor" })
|
|
119
87
|
}
|
|
120
88
|
) }),
|
|
121
|
-
|
|
122
|
-
/* @__PURE__ */
|
|
89
|
+
M && /* @__PURE__ */ e("div", { className: "Knob__popupValue", children: D }),
|
|
90
|
+
/* @__PURE__ */ o(
|
|
123
91
|
"svg",
|
|
124
92
|
{
|
|
125
|
-
className:
|
|
93
|
+
className: "Knob__ring Knob__ringTrackPivot",
|
|
126
94
|
viewBox: "0 0 100 100",
|
|
127
|
-
children:
|
|
95
|
+
children: [
|
|
96
|
+
/* @__PURE__ */ e("circle", { className: "Knob__ringTrack", cx: "50", cy: "50", r: "50" }),
|
|
97
|
+
/* @__PURE__ */ e("title", { children: "track" })
|
|
98
|
+
]
|
|
128
99
|
}
|
|
129
100
|
),
|
|
130
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ o(
|
|
131
102
|
"svg",
|
|
132
103
|
{
|
|
133
|
-
className:
|
|
104
|
+
className: "Knob__ring Knob__ringFillPivot",
|
|
134
105
|
viewBox: "0 0 100 100",
|
|
135
|
-
children:
|
|
136
|
-
"
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
106
|
+
children: [
|
|
107
|
+
/* @__PURE__ */ e("title", { children: "fill" }),
|
|
108
|
+
/* @__PURE__ */ e(
|
|
109
|
+
"circle",
|
|
110
|
+
{
|
|
111
|
+
className: "Knob__ringFill",
|
|
112
|
+
style: {
|
|
113
|
+
strokeDashoffset: Math.max(
|
|
114
|
+
((r ? 2.75 : 2) - F * 1.5) * Math.PI * 50,
|
|
115
|
+
0
|
|
116
|
+
)
|
|
117
|
+
},
|
|
118
|
+
cx: "50",
|
|
119
|
+
cy: "50",
|
|
120
|
+
r: "50"
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
]
|
|
150
124
|
}
|
|
151
125
|
),
|
|
152
|
-
|
|
126
|
+
P
|
|
153
127
|
]
|
|
154
128
|
}
|
|
155
129
|
);
|
|
@@ -158,5 +132,5 @@ function xo(t) {
|
|
|
158
132
|
);
|
|
159
133
|
}
|
|
160
134
|
export {
|
|
161
|
-
|
|
135
|
+
H as Knob
|
|
162
136
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
import { BooleanLike } from '../common/react';
|
|
3
|
-
|
|
4
3
|
export declare function LabeledList(props: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
5
4
|
export declare namespace LabeledList {
|
|
6
5
|
var Item: typeof LabeledListItem;
|
|
@@ -1,82 +1,75 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { classes as
|
|
3
|
-
import { Box as
|
|
1
|
+
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { classes as c } from "../common/react.js";
|
|
3
|
+
import { Box as s, unit as g } from "./Box.js";
|
|
4
4
|
import { Divider as x } from "./Divider.js";
|
|
5
5
|
import { Tooltip as N } from "./Tooltip.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
cell: B,
|
|
10
|
-
label__nowrap: D,
|
|
11
|
-
buttons: j
|
|
12
|
-
};
|
|
13
|
-
function p(e) {
|
|
14
|
-
const { children: t } = e;
|
|
15
|
-
return /* @__PURE__ */ l("table", { className: "LabeledList", children: /* @__PURE__ */ l("tbody", { children: t }) });
|
|
6
|
+
function b(l) {
|
|
7
|
+
const { children: t } = l;
|
|
8
|
+
return /* @__PURE__ */ e("table", { className: "LabeledList", children: /* @__PURE__ */ e("tbody", { children: t }) });
|
|
16
9
|
}
|
|
17
|
-
function
|
|
10
|
+
function v(l) {
|
|
18
11
|
const {
|
|
19
12
|
className: t,
|
|
20
|
-
label:
|
|
21
|
-
labelColor:
|
|
13
|
+
label: a,
|
|
14
|
+
labelColor: L = "label",
|
|
22
15
|
labelWrap: m,
|
|
23
|
-
color:
|
|
24
|
-
textAlign:
|
|
25
|
-
buttons:
|
|
26
|
-
content:
|
|
27
|
-
children:
|
|
28
|
-
verticalAlign:
|
|
29
|
-
tooltip:
|
|
30
|
-
} =
|
|
31
|
-
let
|
|
32
|
-
|
|
33
|
-
|
|
16
|
+
color: p,
|
|
17
|
+
textAlign: _,
|
|
18
|
+
buttons: o,
|
|
19
|
+
content: h,
|
|
20
|
+
children: f,
|
|
21
|
+
verticalAlign: r = "baseline",
|
|
22
|
+
tooltip: n
|
|
23
|
+
} = l;
|
|
24
|
+
let i;
|
|
25
|
+
a && (i = a, typeof a == "string" && (i += ":")), n !== void 0 && (i = /* @__PURE__ */ e(N, { content: n, children: /* @__PURE__ */ e(
|
|
26
|
+
s,
|
|
34
27
|
{
|
|
35
28
|
as: "span",
|
|
36
29
|
style: {
|
|
37
30
|
borderBottom: "2px dotted rgba(255, 255, 255, 0.8)"
|
|
38
31
|
},
|
|
39
|
-
children:
|
|
32
|
+
children: i
|
|
40
33
|
}
|
|
41
34
|
) }));
|
|
42
|
-
const
|
|
43
|
-
|
|
35
|
+
const u = /* @__PURE__ */ e(
|
|
36
|
+
s,
|
|
44
37
|
{
|
|
45
38
|
as: "td",
|
|
46
|
-
color:
|
|
47
|
-
className:
|
|
48
|
-
|
|
39
|
+
color: L,
|
|
40
|
+
className: c([
|
|
41
|
+
"LabeledList__cell",
|
|
49
42
|
// Kinda flipped because we want nowrap as default. Cleaner CSS this way though.
|
|
50
|
-
!m &&
|
|
43
|
+
!m && "LabeledList__label--nowrap"
|
|
51
44
|
]),
|
|
52
|
-
verticalAlign:
|
|
53
|
-
children:
|
|
45
|
+
verticalAlign: r,
|
|
46
|
+
children: i
|
|
54
47
|
}
|
|
55
48
|
);
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
-
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
|
|
49
|
+
return /* @__PURE__ */ d("tr", { className: c(["LabeledList__row", t]), children: [
|
|
50
|
+
u,
|
|
51
|
+
/* @__PURE__ */ d(
|
|
52
|
+
s,
|
|
60
53
|
{
|
|
61
54
|
as: "td",
|
|
62
|
-
color:
|
|
63
|
-
textAlign:
|
|
64
|
-
className:
|
|
65
|
-
colSpan:
|
|
66
|
-
verticalAlign:
|
|
55
|
+
color: p,
|
|
56
|
+
textAlign: _,
|
|
57
|
+
className: "LabeledList__cell",
|
|
58
|
+
colSpan: o ? void 0 : 2,
|
|
59
|
+
verticalAlign: r,
|
|
67
60
|
children: [
|
|
68
|
-
|
|
69
|
-
|
|
61
|
+
h,
|
|
62
|
+
f
|
|
70
63
|
]
|
|
71
64
|
}
|
|
72
65
|
),
|
|
73
|
-
|
|
66
|
+
o && /* @__PURE__ */ e("td", { className: "LabeledList__cell LabeledList__buttons", children: o })
|
|
74
67
|
] });
|
|
75
68
|
}
|
|
76
|
-
|
|
77
|
-
function
|
|
78
|
-
const t =
|
|
79
|
-
return /* @__PURE__ */
|
|
69
|
+
b.Item = v;
|
|
70
|
+
function y(l) {
|
|
71
|
+
const t = l.size ? g(Math.max(0, l.size - 1)) : 0;
|
|
72
|
+
return /* @__PURE__ */ e("tr", { className: "LabeledList__row", children: /* @__PURE__ */ e(
|
|
80
73
|
"td",
|
|
81
74
|
{
|
|
82
75
|
colSpan: 3,
|
|
@@ -84,11 +77,11 @@ function A(e) {
|
|
|
84
77
|
paddingTop: t,
|
|
85
78
|
paddingBottom: t
|
|
86
79
|
},
|
|
87
|
-
children: /* @__PURE__ */
|
|
80
|
+
children: /* @__PURE__ */ e(x, {})
|
|
88
81
|
}
|
|
89
82
|
) });
|
|
90
83
|
}
|
|
91
|
-
|
|
84
|
+
b.Divider = y;
|
|
92
85
|
export {
|
|
93
|
-
|
|
86
|
+
b as LabeledList
|
|
94
87
|
};
|