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.
Files changed (116) hide show
  1. package/README.md +3 -3
  2. package/dist/common/color.js +31 -30
  3. package/dist/common/events.js +5 -5
  4. package/dist/common/format.js +27 -27
  5. package/dist/common/hotkeys.d.ts +0 -1
  6. package/dist/common/hotkeys.js +2 -2
  7. package/dist/common/math.d.ts +4 -0
  8. package/dist/common/math.js +29 -25
  9. package/dist/common/random.js +14 -13
  10. package/dist/common/react.js +1 -1
  11. package/dist/common/string.js +9 -9
  12. package/dist/common/type-utils.d.ts +1 -1
  13. package/dist/components/AnimatedNumber.d.ts +6 -6
  14. package/dist/components/AnimatedNumber.js +14 -17
  15. package/dist/components/Autofocus.d.ts +0 -1
  16. package/dist/components/Blink.d.ts +0 -1
  17. package/dist/components/BlockQuote.d.ts +0 -1
  18. package/dist/components/BlockQuote.js +4 -7
  19. package/dist/components/Box.d.ts +0 -1
  20. package/dist/components/Box.js +4 -4
  21. package/dist/components/Button.d.ts +0 -1
  22. package/dist/components/Button.js +173 -211
  23. package/dist/components/ByondUi.js +3 -3
  24. package/dist/components/Chart.d.ts +0 -1
  25. package/dist/components/Chart.js +25 -22
  26. package/dist/components/Collapsible.d.ts +0 -1
  27. package/dist/components/ColorBox.d.ts +0 -1
  28. package/dist/components/ColorBox.js +7 -14
  29. package/dist/components/Dialog.js +31 -40
  30. package/dist/components/Dimmer.d.ts +0 -1
  31. package/dist/components/Dimmer.js +6 -9
  32. package/dist/components/Divider.js +10 -14
  33. package/dist/components/DmIcon.d.ts +0 -1
  34. package/dist/components/DraggableControl.js +57 -49
  35. package/dist/components/Dropdown.d.ts +0 -1
  36. package/dist/components/Dropdown.js +73 -67
  37. package/dist/components/FitText.d.ts +0 -1
  38. package/dist/components/Flex.d.ts +1 -1
  39. package/dist/components/Flex.js +39 -41
  40. package/dist/components/Icon.d.ts +0 -1
  41. package/dist/components/Icon.js +27 -34
  42. package/dist/components/Image.d.ts +0 -1
  43. package/dist/components/Image.js +7 -6
  44. package/dist/components/ImageButton.d.ts +0 -1
  45. package/dist/components/ImageButton.js +84 -171
  46. package/dist/components/InfinitePlane.js +1 -1
  47. package/dist/components/Input.d.ts +0 -1
  48. package/dist/components/Input.js +57 -64
  49. package/dist/components/KeyListener.d.ts +0 -1
  50. package/dist/components/Knob.d.ts +0 -1
  51. package/dist/components/Knob.js +91 -117
  52. package/dist/components/LabeledControls.d.ts +0 -1
  53. package/dist/components/LabeledList.d.ts +0 -1
  54. package/dist/components/LabeledList.js +48 -55
  55. package/dist/components/MenuBar.d.ts +0 -1
  56. package/dist/components/MenuBar.js +93 -102
  57. package/dist/components/Modal.d.ts +0 -1
  58. package/dist/components/Modal.js +11 -18
  59. package/dist/components/NoticeBox.d.ts +0 -1
  60. package/dist/components/NoticeBox.js +16 -43
  61. package/dist/components/NumberInput.d.ts +0 -2
  62. package/dist/components/NumberInput.js +99 -107
  63. package/dist/components/Popper.d.ts +0 -1
  64. package/dist/components/ProgressBar.d.ts +0 -1
  65. package/dist/components/ProgressBar.js +22 -27
  66. package/dist/components/RestrictedInput.js +64 -58
  67. package/dist/components/RoundGauge.d.ts +0 -1
  68. package/dist/components/RoundGauge.js +70 -104
  69. package/dist/components/Section.d.ts +1 -2
  70. package/dist/components/Section.js +50 -51
  71. package/dist/components/Slider.d.ts +0 -1
  72. package/dist/components/Slider.js +72 -80
  73. package/dist/components/Stack.d.ts +0 -1
  74. package/dist/components/Stack.js +37 -47
  75. package/dist/components/StyleableSection.d.ts +0 -1
  76. package/dist/components/StyleableSection.js +11 -11
  77. package/dist/components/Table.d.ts +0 -1
  78. package/dist/components/Table.js +38 -47
  79. package/dist/components/Tabs.d.ts +0 -1
  80. package/dist/components/Tabs.js +43 -75
  81. package/dist/components/TextArea.d.ts +0 -1
  82. package/dist/components/TextArea.js +74 -69
  83. package/dist/components/TimeDisplay.d.ts +7 -6
  84. package/dist/components/TimeDisplay.js +17 -17
  85. package/dist/components/Tooltip.d.ts +1 -2
  86. package/dist/components/Tooltip.js +8 -10
  87. package/dist/components/TrackOutsideClicks.d.ts +0 -1
  88. package/dist/components/VirtualList.d.ts +0 -1
  89. package/package.json +11 -25
  90. package/dist/ProgressBar.module-Jzqlebbx.js +0 -29
  91. package/dist/Section.module-qhQWhlUX.js +0 -18
  92. package/dist/assets/BlockQuote.css +0 -1
  93. package/dist/assets/Button.css +0 -1
  94. package/dist/assets/ColorBox.css +0 -1
  95. package/dist/assets/Dialog.css +0 -1
  96. package/dist/assets/Dimmer.css +0 -1
  97. package/dist/assets/Divider.css +0 -1
  98. package/dist/assets/Flex.css +0 -1
  99. package/dist/assets/Icon.css +0 -6
  100. package/dist/assets/ImageButton.css +0 -5
  101. package/dist/assets/Input.css +0 -1
  102. package/dist/assets/Knob.css +0 -1
  103. package/dist/assets/LabeledList.css +0 -1
  104. package/dist/assets/MenuBar.css +0 -1
  105. package/dist/assets/Modal.css +0 -1
  106. package/dist/assets/NoticeBox.css +0 -1
  107. package/dist/assets/NumberInput.css +0 -1
  108. package/dist/assets/ProgressBar.css +0 -1
  109. package/dist/assets/RoundGauge.css +0 -1
  110. package/dist/assets/Section.css +0 -1
  111. package/dist/assets/Slider.css +0 -1
  112. package/dist/assets/Stack.css +0 -1
  113. package/dist/assets/Table.css +0 -1
  114. package/dist/assets/Tabs.css +0 -1
  115. package/dist/assets/TextArea.css +0 -1
  116. package/dist/assets/Tooltip.css +0 -1
@@ -1,88 +1,81 @@
1
- import { jsxs as K, jsx as m } from "react/jsx-runtime";
2
- import { useRef as V, useEffect as d } from "react";
3
- import { KEY as j, isEscape as k } from "../common/keys.js";
4
- import { classes as B } from "../common/react.js";
5
- import { debounce as R } from "../common/timer.js";
6
- import { Box as S } from "./Box.js";
7
- import '../assets/Input.css';const F = "_input_17i79_20", L = "_fluid_17i79_35", Y = "_baseline_17i79_40", q = "_inner_17i79_45", v = "_monospace_17i79_71", u = {
8
- input: F,
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 z = R((r) => r(), 250);
18
- function P(r) {
10
+ const S = B((u) => u(), 250);
11
+ function A(u) {
19
12
  const {
20
- autoFocus: _,
21
- autoSelect: f,
22
- className: b,
23
- disabled: g,
13
+ autoFocus: d,
14
+ autoSelect: s,
15
+ className: g,
16
+ disabled: I,
24
17
  expensive: T,
25
- fluid: y,
18
+ fluid: b,
26
19
  maxLength: x,
27
- monospace: h,
20
+ monospace: y,
28
21
  onChange: t,
29
- onEnter: i,
22
+ onEnter: n,
30
23
  onEscape: o,
31
- onInput: s,
32
- placeholder: w,
33
- selfClear: I,
34
- value: c,
24
+ onInput: i,
25
+ placeholder: h,
26
+ selfClear: w,
27
+ value: a,
35
28
  ...N
36
- } = r, l = V(null);
37
- function D(e) {
38
- var p;
39
- if (!s) return;
40
- const n = (p = e.currentTarget) == null ? void 0 : p.value;
41
- T ? z(() => s(e, n)) : s(e, n);
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 E(e) {
44
- if (e.key === j.Enter) {
45
- i == null || i(e, e.currentTarget.value), I ? e.currentTarget.value = "" : (e.currentTarget.blur(), t == null || t(e, e.currentTarget.value));
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
- k(e.key) && (o == null || o(e), e.currentTarget.value = a(c), e.currentTarget.blur());
41
+ j(e.key) && (o == null || o(e), e.currentTarget.value = l(a), e.currentTarget.blur());
49
42
  }
50
- return d(() => {
51
- const e = l.current;
43
+ return m(() => {
44
+ const e = c.current;
52
45
  if (!e) return;
53
- const n = a(c);
54
- e.value !== n && (e.value = n), !(!_ && !f) && setTimeout(() => {
55
- e.focus(), f && e.select();
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
- }, []), d(() => {
58
- const e = l.current;
50
+ }, []), m(() => {
51
+ const e = c.current;
59
52
  if (!e || document.activeElement === e)
60
53
  return;
61
- const n = a(c);
62
- e.value !== n && (e.value = n);
63
- }), /* @__PURE__ */ K(
64
- S,
54
+ const r = l(a);
55
+ e.value !== r && (e.value = r);
56
+ }), /* @__PURE__ */ E(
57
+ R,
65
58
  {
66
- className: B([
67
- u.input,
68
- y && u.fluid,
69
- h && u.monospace,
70
- b
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__ */ m("div", { className: u.baseline, children: "." }),
75
- /* @__PURE__ */ m(
67
+ /* @__PURE__ */ p("div", { className: "Input__baseline", children: "." }),
68
+ /* @__PURE__ */ p(
76
69
  "input",
77
70
  {
78
- className: u.inner,
79
- disabled: g,
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: D,
83
- onKeyDown: E,
84
- placeholder: w,
85
- ref: l
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
- P as Input,
94
- a as toInputValue
86
+ A as Input,
87
+ l as toInputValue
95
88
  };
@@ -1,6 +1,5 @@
1
1
  import { Component } from 'react';
2
2
  import { KeyEvent } from '../common/events';
3
-
4
3
  type KeyListenerProps = Partial<{
5
4
  onKey: (key: KeyEvent) => void;
6
5
  onKeyDown: (key: KeyEvent) => void;
@@ -1,6 +1,5 @@
1
1
  import { BooleanLike } from '../common/react';
2
2
  import { BoxProps } from './Box';
3
-
4
3
  type Props = {
5
4
  /** Value itself, controls the position of the cursor. */
6
5
  value: number;
@@ -1,155 +1,129 @@
1
- import { jsx as _, jsxs as j } from "react/jsx-runtime";
2
- import { keyOfMatchingRange as E, scale as s } from "../common/math.js";
3
- import { classes as e } from "../common/react.js";
4
- import { computeBoxClassName as K, computeBoxProps as I } from "./Box.js";
5
- import { DraggableControl as O } from "./DraggableControl.js";
6
- import '../assets/Knob.css';const R = "_knob_69dqe_17", $ = "_circle_69dqe_32", A = "_cursorBox_69dqe_45", G = "_cursor_69dqe_45", H = "_popupValue_69dqe_62", J = "_ring_69dqe_75", L = "_ringTrackPivot_69dqe_84", Q = "_ringTrack_69dqe_84", U = "_ringFillPivot_69dqe_96", W = "_bipolar_69dqe_100", X = "_ringFill_69dqe_96", Y = "_color__black_69dqe_113", Z = "_color__white_69dqe_117", oo = "_color__red_69dqe_121", _o = "_color__orange_69dqe_125", ro = "_color__yellow_69dqe_129", lo = "_color__olive_69dqe_133", eo = "_color__green_69dqe_137", co = "_color__teal_69dqe_141", no = "_color__blue_69dqe_145", ao = "_color__violet_69dqe_149", io = "_color__purple_69dqe_153", so = "_color__pink_69dqe_157", to = "_color__brown_69dqe_161", go = "_color__grey_69dqe_165", po = "_color__good_69dqe_173", uo = "_color__average_69dqe_177", mo = "_color__bad_69dqe_181", qo = "_color__label_69dqe_185", o = {
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: d,
42
- format: g,
43
- maxValue: r,
9
+ animated: m,
10
+ format: d,
11
+ maxValue: a,
44
12
  minValue: l,
45
- onChange: p,
46
- onDrag: u,
47
- step: m,
48
- stepPixelSize: q,
49
- suppressFlicker: v,
50
- unclamped: b,
51
- unit: k,
52
- value: h,
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: c,
55
- className: y,
56
- color: x,
57
- fillValue: n,
58
- ranges: f = {},
59
- size: w = 1,
60
- style: N,
61
- ...a
62
- } = t;
63
- return /* @__PURE__ */ _(
64
- O,
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: d,
68
- format: g,
69
- maxValue: r,
35
+ animated: m,
36
+ format: d,
37
+ maxValue: a,
70
38
  minValue: l,
71
- onChange: p,
72
- onDrag: u,
73
- step: m,
74
- stepPixelSize: q,
75
- suppressFlicker: v,
76
- unclamped: b,
77
- unit: k,
78
- value: h,
79
- children: (P) => {
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: F,
49
+ displayElement: D,
82
50
  displayValue: i,
83
- dragging: V,
51
+ dragging: M,
84
52
  handleDragStart: B,
85
- inputElement: T,
86
- value: D
87
- } = P, M = s(
88
- n ?? i,
53
+ inputElement: P,
54
+ value: C
55
+ } = k, F = t(
56
+ s ?? i,
89
57
  l,
90
- r
91
- ), C = s(i, l, r), z = x || E(n ?? D, f) || "default", S = Math.min((C - 0.5) * 270, 225);
92
- return /* @__PURE__ */ j(
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: e([
96
- o.knob,
97
- o["color__" + z],
98
- c && o.bipolar,
99
- y,
100
- K(a)
63
+ className: j([
64
+ "Knob",
65
+ `Knob--color--${z}`,
66
+ r && "Knob--bipolar",
67
+ x,
68
+ E(n)
101
69
  ]),
102
- ...I({
70
+ ...T({
103
71
  style: {
104
- fontSize: w + "em",
105
- ...N
72
+ fontSize: `${y}em`,
73
+ ...V
106
74
  },
107
- ...a
75
+ ...n
108
76
  }),
109
77
  onMouseDown: B,
110
78
  children: [
111
- /* @__PURE__ */ _("div", { className: o.circle, children: /* @__PURE__ */ _(
79
+ /* @__PURE__ */ e("div", { className: "Knob__circle", children: /* @__PURE__ */ e(
112
80
  "div",
113
81
  {
114
- className: o.cursorBox,
82
+ className: "Knob__cursorBox",
115
83
  style: {
116
84
  transform: `rotate(${S}deg)`
117
85
  },
118
- children: /* @__PURE__ */ _("div", { className: o.cursor })
86
+ children: /* @__PURE__ */ e("div", { className: "Knob__cursor" })
119
87
  }
120
88
  ) }),
121
- V && /* @__PURE__ */ _("div", { className: o.popupValue, children: F }),
122
- /* @__PURE__ */ _(
89
+ M && /* @__PURE__ */ e("div", { className: "Knob__popupValue", children: D }),
90
+ /* @__PURE__ */ o(
123
91
  "svg",
124
92
  {
125
- className: e([o.ring, o.ringTrackPivot]),
93
+ className: "Knob__ring Knob__ringTrackPivot",
126
94
  viewBox: "0 0 100 100",
127
- children: /* @__PURE__ */ _("circle", { className: "Knob__ringTrack", cx: "50", cy: "50", r: "50" })
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: e([o.ring, o.ringFillPivot]),
104
+ className: "Knob__ring Knob__ringFillPivot",
134
105
  viewBox: "0 0 100 100",
135
- children: /* @__PURE__ */ _(
136
- "circle",
137
- {
138
- className: o.ringFill,
139
- style: {
140
- strokeDashoffset: Math.max(
141
- ((c ? 2.75 : 2) - M * 1.5) * Math.PI * 50,
142
- 0
143
- )
144
- },
145
- cx: "50",
146
- cy: "50",
147
- r: "50"
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
- T
126
+ P
153
127
  ]
154
128
  }
155
129
  );
@@ -158,5 +132,5 @@ function xo(t) {
158
132
  );
159
133
  }
160
134
  export {
161
- xo as Knob
135
+ H as Knob
162
136
  };
@@ -1,5 +1,4 @@
1
1
  import { FlexProps } from './Flex';
2
-
3
2
  export declare function LabeledControls(props: FlexProps): import("react/jsx-runtime").JSX.Element;
4
3
  export declare namespace LabeledControls {
5
4
  var Item: typeof LabeledControlsItem;
@@ -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 l, jsxs as b } from "react/jsx-runtime";
2
- import { classes as i } from "../common/react.js";
3
- import { Box as r, unit as g } from "./Box.js";
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
- import '../assets/LabeledList.css';const v = "_labeledList_pb6nb_9", y = "_row_pb6nb_20", B = "_cell_pb6nb_24", D = "_label__nowrap_pb6nb_36", j = "_buttons_pb6nb_42", o = {
7
- labeledList: v,
8
- row: y,
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 z(e) {
10
+ function v(l) {
18
11
  const {
19
12
  className: t,
20
- label: s,
21
- labelColor: _ = "label",
13
+ label: a,
14
+ labelColor: L = "label",
22
15
  labelWrap: m,
23
- color: L,
24
- textAlign: h,
25
- buttons: a,
26
- content: f,
27
- children: u,
28
- verticalAlign: c = "baseline",
29
- tooltip: d
30
- } = e;
31
- let n;
32
- s && (n = s, typeof s == "string" && (n += ":")), d !== void 0 && (n = /* @__PURE__ */ l(N, { content: d, children: /* @__PURE__ */ l(
33
- r,
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: n
32
+ children: i
40
33
  }
41
34
  ) }));
42
- const w = /* @__PURE__ */ l(
43
- r,
35
+ const u = /* @__PURE__ */ e(
36
+ s,
44
37
  {
45
38
  as: "td",
46
- color: _,
47
- className: i([
48
- o.cell,
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 && o.label__nowrap
43
+ !m && "LabeledList__label--nowrap"
51
44
  ]),
52
- verticalAlign: c,
53
- children: n
45
+ verticalAlign: r,
46
+ children: i
54
47
  }
55
48
  );
56
- return /* @__PURE__ */ b("tr", { className: i([o.row, t]), children: [
57
- w,
58
- /* @__PURE__ */ b(
59
- r,
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: L,
63
- textAlign: h,
64
- className: o.cell,
65
- colSpan: a ? void 0 : 2,
66
- verticalAlign: c,
55
+ color: p,
56
+ textAlign: _,
57
+ className: "LabeledList__cell",
58
+ colSpan: o ? void 0 : 2,
59
+ verticalAlign: r,
67
60
  children: [
68
- f,
69
- u
61
+ h,
62
+ f
70
63
  ]
71
64
  }
72
65
  ),
73
- a && /* @__PURE__ */ l("td", { className: i([o.cell, o.buttons]), children: a })
66
+ o && /* @__PURE__ */ e("td", { className: "LabeledList__cell LabeledList__buttons", children: o })
74
67
  ] });
75
68
  }
76
- p.Item = z;
77
- function A(e) {
78
- const t = e.size ? g(Math.max(0, e.size - 1)) : 0;
79
- return /* @__PURE__ */ l("tr", { className: "LabeledList__row", children: /* @__PURE__ */ l(
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__ */ l(x, {})
80
+ children: /* @__PURE__ */ e(x, {})
88
81
  }
89
82
  ) });
90
83
  }
91
- p.Divider = A;
84
+ b.Divider = y;
92
85
  export {
93
- p as LabeledList
86
+ b as LabeledList
94
87
  };
@@ -1,5 +1,4 @@
1
1
  import { ReactNode } from 'react';
2
-
3
2
  type MenuBarItemProps = {
4
3
  children: any;
5
4
  className?: string;