tgui-core 1.1.23 → 1.1.24

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.
@@ -0,0 +1,18 @@
1
+ import './assets/Section.css';const t = "_section_10c68_17", _ = "_title_10c68_28", n = "_titleText_10c68_34", o = "_buttons_10c68_40", c = "_rest_10c68_47", e = "_content_10c68_51", s = "_fitted_10c68_55", l = "_fill_10c68_59", i = "_scrollable_10c68_73", r = "_scrollableHorizontal_10c68_90", a = "_section__flex_10c68_125", b = "_content__noTopPadding_10c68_135", d = "_content__stretchContents_10c68_139", f = {
2
+ section: t,
3
+ title: _,
4
+ titleText: n,
5
+ buttons: o,
6
+ rest: c,
7
+ content: e,
8
+ fitted: s,
9
+ fill: l,
10
+ scrollable: i,
11
+ scrollableHorizontal: r,
12
+ section__flex: a,
13
+ content__noTopPadding: b,
14
+ content__stretchContents: d
15
+ };
16
+ export {
17
+ f as s
18
+ };
@@ -1 +1 @@
1
- ._section_1awt0_17{position:relative;margin-bottom:.5em;background-color:#191919;background-color:#00000054;box-sizing:border-box}._section_1awt0_17:last-child{margin-bottom:0}._title_1awt0_28{position:relative;padding:.5em;border-bottom:.1666666667em solid #4972a1}._titleText_1awt0_34{font-size:1.1666666667em;font-weight:700;color:#fff}._buttons_1awt0_40{position:absolute;display:inline-block;right:.5em;margin-top:-.0833333333em}._rest_1awt0_47{position:relative}._content_1awt0_51{padding:.66em .5em}._fitted_1awt0_55>._rest_1awt0_47>._content_1awt0_51{padding:0}._fill_1awt0_59{display:flex;flex-direction:column;height:100%}._fill_1awt0_59>._rest_1awt0_47{flex-grow:1}._fill_1awt0_59>._rest_1awt0_47>._content_1awt0_51{height:100%}._fill_1awt0_59._scrollable_1awt0_73>._rest_1awt0_47>._content_1awt0_51{position:absolute;top:0;left:0;right:0;bottom:0}._scrollable_1awt0_73{overflow-x:hidden;overflow-y:hidden}._scrollable_1awt0_73>._rest_1awt0_47>._content_1awt0_51{overflow-y:scroll;overflow-x:hidden}._scrollableHorizontal_1awt0_90{overflow-x:hidden;overflow-y:hidden}._scrollableHorizontal_1awt0_90>._rest_1awt0_47>._content_1awt0_51{overflow-y:hidden;overflow-x:scroll}._scrollable_1awt0_73._scrollableHorizontal_1awt0_90{overflow-x:hidden;overflow-y:hidden}._scrollable_1awt0_73._scrollableHorizontal_1awt0_90>._rest_1awt0_47>._content_1awt0_51{overflow-y:scroll;overflow-x:scroll}._section_1awt0_17 ._section_1awt0_17{background-color:transparent;margin-left:-.5em;margin-right:-.5em}._section_1awt0_17 ._section_1awt0_17:first-child{margin-top:-.5em}._section_1awt0_17 ._section_1awt0_17 ._titleText_1awt0_34{font-size:1.0833333333em}._section_1awt0_17 ._section_1awt0_17 ._section_1awt0_17 ._titleText_1awt0_34{font-size:1em}
1
+ ._section_10c68_17{position:relative;margin-bottom:.5em;background-color:#191919;background-color:#00000054;box-sizing:border-box}._section_10c68_17:last-child{margin-bottom:0}._title_10c68_28{position:relative;padding:.5em;border-bottom:.1666666667em solid #4972a1}._titleText_10c68_34{font-size:1.1666666667em;font-weight:700;color:#fff}._buttons_10c68_40{position:absolute;display:inline-block;right:.5em;margin-top:-.0833333333em}._rest_10c68_47{position:relative}._content_10c68_51{padding:.66em .5em}._fitted_10c68_55>._rest_10c68_47>._content_10c68_51{padding:0}._fill_10c68_59{display:flex;flex-direction:column;height:100%}._fill_10c68_59>._rest_10c68_47{flex-grow:1}._fill_10c68_59>._rest_10c68_47>._content_10c68_51{height:100%}._fill_10c68_59._scrollable_10c68_73>._rest_10c68_47>._content_10c68_51{position:absolute;top:0;left:0;right:0;bottom:0}._scrollable_10c68_73{overflow-x:hidden;overflow-y:hidden}._scrollable_10c68_73>._rest_10c68_47>._content_10c68_51{overflow-y:scroll;overflow-x:hidden}._scrollableHorizontal_10c68_90{overflow-x:hidden;overflow-y:hidden}._scrollableHorizontal_10c68_90>._rest_10c68_47>._content_10c68_51{overflow-y:hidden;overflow-x:scroll}._scrollable_10c68_73._scrollableHorizontal_10c68_90{overflow-x:hidden;overflow-y:hidden}._scrollable_10c68_73._scrollableHorizontal_10c68_90>._rest_10c68_47>._content_10c68_51{overflow-y:scroll;overflow-x:scroll}._section_10c68_17 ._section_10c68_17{background-color:transparent;margin-left:-.5em;margin-right:-.5em}._section_10c68_17 ._section_10c68_17:first-child{margin-top:-.5em}._section_10c68_17 ._section_10c68_17 ._titleText_10c68_34{font-size:1.0833333333em}._section_10c68_17 ._section_10c68_17 ._section_10c68_17 ._titleText_10c68_34{font-size:1em}._section__flex_10c68_125{display:flex;flex-flow:column}._section__flex_10c68_125 ._content_10c68_51{overflow:auto;flex-grow:1}._content__noTopPadding_10c68_135{padding-top:0}._content__stretchContents_10c68_139{height:calc(100% - 3rem)}
@@ -40,6 +40,8 @@ type Props = Partial<{
40
40
  iconPosition: string;
41
41
  /** Icon rotation */
42
42
  iconRotation: number;
43
+ /** Icon size */
44
+ iconSize: number;
43
45
  /** Makes the icon spin */
44
46
  iconSpin: BooleanLike;
45
47
  /** Called when element is clicked */
@@ -1,267 +1,270 @@
1
- import { jsx as l, jsxs as E, Fragment as S } from "react/jsx-runtime";
2
- import { useState as F, createRef as K, useEffect as M, useRef as V } from "react";
3
- import { KEY as I } from "../common/keys.js";
4
- import { classes as R } from "../common/react.js";
5
- import { computeBoxClassName as j, computeBoxProps as q, Box as O } from "./Box.js";
6
- import { Icon as D } from "./Icon.js";
7
- import { Tooltip as P } from "./Tooltip.js";
8
- import '../assets/Button.css';const T = "_button_433yx_17", L = "_fa_433yx_34", Y = "_fas_433yx_35", z = "_far_433yx_36", G = "_dropdown_433yx_43", H = "_ellipsis_433yx_49", J = "_fluid_433yx_54", Q = "_circular_433yx_60", U = "_compact_433yx_64", W = "_color__black_433yx_69", X = "_color__white_433yx_82", Z = "_color__red_433yx_95", $ = "_color__orange_433yx_108", oo = "_color__yellow_433yx_121", to = "_color__olive_433yx_134", _o = "_color__green_433yx_147", no = "_color__teal_433yx_160", eo = "_color__blue_433yx_173", lo = "_color__violet_433yx_186", co = "_color__purple_433yx_199", ro = "_color__pink_433yx_212", io = "_color__brown_433yx_225", so = "_color__grey_433yx_238", ao = "_color__good_433yx_264", uo = "_color__average_433yx_277", fo = "_color__bad_433yx_290", po = "_color__label_433yx_303", yo = "_color__default_433yx_316", xo = "_color__caution_433yx_329", mo = "_color__danger_433yx_342", go = "_color__transparent_433yx_355", bo = "_disabled_433yx_370", ho = "_selected_433yx_374", Co = "_flex_433yx_387", ko = "_flex__fluid_433yx_392", vo = "_verticalAlignContent__top_433yx_396", wo = "_verticalAlignContent__middle_433yx_400", Ao = "_verticalAlignContent__bottom_433yx_404", Bo = "_content_433yx_408", Io = "_textMargin_433yx_413", _ = {
9
- button: T,
10
- fa: L,
11
- fas: Y,
12
- far: z,
13
- dropdown: G,
14
- ellipsis: H,
15
- fluid: J,
16
- circular: Q,
17
- compact: U,
18
- color__black: W,
19
- color__white: X,
20
- color__red: Z,
21
- color__orange: $,
22
- color__yellow: oo,
23
- color__olive: to,
24
- color__green: _o,
25
- color__teal: no,
26
- color__blue: eo,
27
- color__violet: lo,
28
- color__purple: co,
29
- color__pink: ro,
30
- color__brown: io,
31
- color__grey: so,
1
+ import { jsx as l, jsxs as P, Fragment as M } from "react/jsx-runtime";
2
+ import { useState as S, createRef as V, useEffect as z, useRef as j } from "react";
3
+ import { KEY as R, isEscape as E } from "../common/keys.js";
4
+ import { classes as D } from "../common/react.js";
5
+ import { computeBoxClassName as q, computeBoxProps as O, Box as T } from "./Box.js";
6
+ import { Icon as F } from "./Icon.js";
7
+ import { Tooltip as K } from "./Tooltip.js";
8
+ import '../assets/Button.css';const L = "_button_433yx_17", Y = "_fa_433yx_34", G = "_fas_433yx_35", H = "_far_433yx_36", J = "_dropdown_433yx_43", Q = "_ellipsis_433yx_49", U = "_fluid_433yx_54", W = "_circular_433yx_60", X = "_compact_433yx_64", Z = "_color__black_433yx_69", $ = "_color__white_433yx_82", oo = "_color__red_433yx_95", to = "_color__orange_433yx_108", _o = "_color__yellow_433yx_121", no = "_color__olive_433yx_134", eo = "_color__green_433yx_147", lo = "_color__teal_433yx_160", co = "_color__blue_433yx_173", ro = "_color__violet_433yx_186", io = "_color__purple_433yx_199", so = "_color__pink_433yx_212", ao = "_color__brown_433yx_225", uo = "_color__grey_433yx_238", fo = "_color__good_433yx_264", po = "_color__average_433yx_277", yo = "_color__bad_433yx_290", xo = "_color__label_433yx_303", mo = "_color__default_433yx_316", go = "_color__caution_433yx_329", bo = "_color__danger_433yx_342", ho = "_color__transparent_433yx_355", Co = "_disabled_433yx_370", ko = "_selected_433yx_374", vo = "_flex_433yx_387", wo = "_flex__fluid_433yx_392", Ao = "_verticalAlignContent__top_433yx_396", Bo = "_verticalAlignContent__middle_433yx_400", Io = "_verticalAlignContent__bottom_433yx_404", No = "_content_433yx_408", Ro = "_textMargin_433yx_413", _ = {
9
+ button: L,
10
+ fa: Y,
11
+ fas: G,
12
+ far: H,
13
+ dropdown: J,
14
+ ellipsis: Q,
15
+ fluid: U,
16
+ circular: W,
17
+ compact: X,
18
+ color__black: Z,
19
+ color__white: $,
20
+ color__red: oo,
21
+ color__orange: to,
22
+ color__yellow: _o,
23
+ color__olive: no,
24
+ color__green: eo,
25
+ color__teal: lo,
26
+ color__blue: co,
27
+ color__violet: ro,
28
+ color__purple: io,
29
+ color__pink: so,
30
+ color__brown: ao,
31
+ color__grey: uo,
32
32
  "color__light-grey": "_color__light-grey_433yx_251",
33
- color__good: ao,
34
- color__average: uo,
35
- color__bad: fo,
36
- color__label: po,
37
- color__default: yo,
38
- color__caution: xo,
39
- color__danger: mo,
40
- color__transparent: go,
41
- disabled: bo,
42
- selected: ho,
43
- flex: Co,
44
- flex__fluid: ko,
45
- verticalAlignContent__top: vo,
46
- verticalAlignContent__middle: wo,
47
- verticalAlignContent__bottom: Ao,
48
- content: Bo,
49
- textMargin: Io
33
+ color__good: fo,
34
+ color__average: po,
35
+ color__bad: yo,
36
+ color__label: xo,
37
+ color__default: mo,
38
+ color__caution: go,
39
+ color__danger: bo,
40
+ color__transparent: ho,
41
+ disabled: Co,
42
+ selected: ko,
43
+ flex: vo,
44
+ flex__fluid: wo,
45
+ verticalAlignContent__top: Ao,
46
+ verticalAlignContent__middle: Bo,
47
+ verticalAlignContent__bottom: Io,
48
+ content: No,
49
+ textMargin: Ro
50
50
  };
51
- function g(u) {
51
+ function b(a) {
52
52
  const {
53
- captureKeys: s = !0,
54
- children: a,
53
+ captureKeys: i = !0,
54
+ children: s,
55
55
  circular: y,
56
- className: f,
57
- color: i,
58
- compact: b,
56
+ className: p,
57
+ color: r,
58
+ compact: h,
59
59
  content: x,
60
60
  disabled: o,
61
61
  ellipsis: c,
62
62
  fluid: n,
63
63
  icon: e,
64
- iconColor: d,
65
- iconPosition: v,
66
- iconRotation: w,
67
- iconSpin: N,
68
- onClick: h,
64
+ iconColor: u,
65
+ iconPosition: w,
66
+ iconRotation: A,
67
+ iconSize: B,
68
+ iconSpin: I,
69
+ onClick: d,
69
70
  selected: C,
70
- tooltip: m,
71
- tooltipPosition: A,
72
- verticalAlignContent: k,
73
- ...B
74
- } = u, p = x || a;
75
- let t = /* @__PURE__ */ l(
71
+ tooltip: k,
72
+ tooltipPosition: N,
73
+ verticalAlignContent: m,
74
+ ...v
75
+ } = a, t = x || s;
76
+ let g = /* @__PURE__ */ l(
76
77
  "div",
77
78
  {
78
- className: R([
79
+ className: D([
79
80
  _.button,
80
81
  n && _.fluid,
81
82
  o && _.disabled,
82
83
  C && _.selected,
83
84
  y && _.circular,
84
- b && _.compact,
85
- k && _.flex,
86
- k && n && _.flex__fluid,
87
- k && _["verticalAlignContent__" + k],
88
- i && typeof i == "string" ? _["color__" + i] : _.color__default,
89
- f,
90
- j(B)
85
+ h && _.compact,
86
+ m && _.flex,
87
+ m && n && _.flex__fluid,
88
+ m && _["verticalAlignContent__" + m],
89
+ r && typeof r == "string" ? _["color__" + r] : _.color__default,
90
+ p,
91
+ q(v)
91
92
  ]),
92
93
  tabIndex: o ? void 0 : 0,
93
- onClick: (r) => {
94
- !o && h && h(r);
94
+ onClick: (f) => {
95
+ !o && d && d(f);
95
96
  },
96
- onKeyDown: (r) => {
97
- if (s) {
98
- if (r.key === I.Space || r.key === I.Enter) {
99
- r.preventDefault(), !o && h && h(r);
97
+ onKeyDown: (f) => {
98
+ if (i) {
99
+ if (f.key === R.Space || f.key === R.Enter) {
100
+ f.preventDefault(), !o && d && d(f);
100
101
  return;
101
102
  }
102
- r.key === I.Escape && r.preventDefault();
103
+ E(f.key) && f.preventDefault();
103
104
  }
104
105
  },
105
- ...q(B),
106
- children: /* @__PURE__ */ E("div", { className: _.content, children: [
107
- e && v !== "right" && /* @__PURE__ */ l(
108
- D,
106
+ ...O(v),
107
+ children: /* @__PURE__ */ P("div", { className: _.content, children: [
108
+ e && w !== "right" && /* @__PURE__ */ l(
109
+ F,
109
110
  {
110
- mr: p ? 1 : 0,
111
+ mr: t ? 1 : 0,
111
112
  name: e,
112
- color: d,
113
- rotation: w,
114
- spin: N
113
+ color: u,
114
+ rotation: A,
115
+ size: B,
116
+ spin: I
115
117
  }
116
118
  ),
117
119
  c ? /* @__PURE__ */ l(
118
120
  "span",
119
121
  {
120
- className: R([_.ellipsis, e && _.textMargin]),
121
- children: p
122
+ className: D([_.ellipsis, e && _.textMargin]),
123
+ children: t
122
124
  }
123
- ) : p,
124
- e && v === "right" && /* @__PURE__ */ l(
125
- D,
125
+ ) : t,
126
+ e && w === "right" && /* @__PURE__ */ l(
127
+ F,
126
128
  {
127
- ml: p ? 1 : 0,
129
+ ml: t ? 1 : 0,
128
130
  name: e,
129
- color: d,
130
- rotation: w,
131
- spin: N
131
+ color: u,
132
+ rotation: A,
133
+ size: B,
134
+ spin: I
132
135
  }
133
136
  )
134
137
  ] })
135
138
  }
136
139
  );
137
- return m && (t = /* @__PURE__ */ l(P, { content: m, position: A, children: t })), t;
140
+ return k && (g = /* @__PURE__ */ l(K, { content: k, position: N, children: g })), g;
138
141
  }
139
- function No(u) {
140
- const { checked: s, ...a } = u;
142
+ function Do(a) {
143
+ const { checked: i, ...s } = a;
141
144
  return /* @__PURE__ */ l(
142
- g,
145
+ b,
143
146
  {
144
147
  color: "transparent",
145
- icon: s ? "check-square-o" : "square-o",
146
- selected: s,
147
- ...a
148
+ icon: i ? "check-square-o" : "square-o",
149
+ selected: i,
150
+ ...s
148
151
  }
149
152
  );
150
153
  }
151
- g.Checkbox = No;
152
- function Ro(u) {
154
+ b.Checkbox = Do;
155
+ function Fo(a) {
153
156
  const {
154
- children: s,
155
- color: a,
157
+ children: i,
158
+ color: s,
156
159
  confirmColor: y = "bad",
157
- confirmContent: f = "Confirm?",
158
- confirmIcon: i,
159
- ellipsis: b = !0,
160
+ confirmContent: p = "Confirm?",
161
+ confirmIcon: r,
162
+ ellipsis: h = !0,
160
163
  icon: x,
161
164
  onClick: o,
162
165
  ...c
163
- } = u, [n, e] = F(!1);
164
- function d(v) {
166
+ } = a, [n, e] = S(!1);
167
+ function u(w) {
165
168
  if (!n) {
166
169
  e(!0);
167
170
  return;
168
171
  }
169
- o == null || o(v), e(!1);
172
+ o == null || o(w), e(!1);
170
173
  }
171
174
  return /* @__PURE__ */ l(
172
- g,
175
+ b,
173
176
  {
174
- icon: n ? i : x,
175
- color: n ? y : a,
176
- onClick: d,
177
+ icon: n ? r : x,
178
+ color: n ? y : s,
179
+ onClick: u,
177
180
  ...c,
178
- children: n ? f : s
181
+ children: n ? p : i
179
182
  }
180
183
  );
181
184
  }
182
- g.Confirm = Ro;
183
- function Do(u) {
185
+ b.Confirm = Fo;
186
+ function Po(a) {
184
187
  const {
185
- children: s,
186
- color: a = "default",
188
+ children: i,
189
+ color: s = "default",
187
190
  content: y,
188
- currentValue: f,
189
- defaultValue: i,
190
- disabled: b,
191
+ currentValue: p,
192
+ defaultValue: r,
193
+ disabled: h,
191
194
  fluid: x,
192
195
  icon: o,
193
196
  iconRotation: c,
194
197
  iconSpin: n,
195
198
  maxLength: e,
196
- onCommit: d = () => null,
197
- placeholder: v,
198
- tooltip: w,
199
- tooltipPosition: N,
200
- ...h
201
- } = u, [C, m] = F(!1), A = K(), k = y || s;
202
- function B(t) {
203
- const r = A.current;
204
- if (!r) return;
205
- r.value !== "" ? d(t, r.value) : i && d(t, i);
199
+ onCommit: u = () => null,
200
+ placeholder: w,
201
+ tooltip: A,
202
+ tooltipPosition: B,
203
+ ...I
204
+ } = a, [d, C] = S(!1), k = V(), N = y || i;
205
+ function m(t) {
206
+ const g = k.current;
207
+ if (!g) return;
208
+ g.value !== "" ? u(t, g.value) : r && u(t, r);
206
209
  }
207
- M(() => {
208
- const t = A.current;
209
- if (t && C) {
210
- t.value = f || "";
210
+ z(() => {
211
+ const t = k.current;
212
+ if (t && d) {
213
+ t.value = p || "";
211
214
  try {
212
215
  t.focus(), t.select();
213
216
  } catch {
214
217
  }
215
218
  }
216
- }, [C, f]);
217
- let p = /* @__PURE__ */ E(
218
- O,
219
+ }, [d, p]);
220
+ let v = /* @__PURE__ */ P(
221
+ T,
219
222
  {
220
- className: R([
223
+ className: D([
221
224
  _.button,
222
225
  x && _.fluid,
223
- _["color__" + a]
226
+ _["color__" + s]
224
227
  ]),
225
- ...h,
226
- onClick: () => m(!0),
228
+ ...I,
229
+ onClick: () => C(!0),
227
230
  children: [
228
- o && /* @__PURE__ */ l(D, { name: o, rotation: c, spin: n }),
229
- /* @__PURE__ */ l("div", { children: k }),
231
+ o && /* @__PURE__ */ l(F, { name: o, rotation: c, spin: n }),
232
+ /* @__PURE__ */ l("div", { children: N }),
230
233
  /* @__PURE__ */ l(
231
234
  "input",
232
235
  {
233
- disabled: !!b,
234
- ref: A,
236
+ disabled: !!h,
237
+ ref: k,
235
238
  className: "NumberInput__input",
236
239
  style: {
237
- display: C ? "" : "none",
240
+ display: d ? "" : "none",
238
241
  textAlign: "left"
239
242
  },
240
243
  onBlur: (t) => {
241
- C && (m(!1), B(t));
244
+ d && (C(!1), m(t));
242
245
  },
243
246
  onKeyDown: (t) => {
244
- if (t.key === I.Enter) {
245
- m(!1), B(t);
247
+ if (t.key === R.Enter) {
248
+ C(!1), m(t);
246
249
  return;
247
250
  }
248
- t.key === I.Escape && m(!1);
251
+ E(t.key) && C(!1);
249
252
  }
250
253
  }
251
254
  )
252
255
  ]
253
256
  }
254
257
  );
255
- return w && (p = /* @__PURE__ */ l(P, { content: w, position: N, children: p })), p;
258
+ return A && (v = /* @__PURE__ */ l(K, { content: A, position: B, children: v })), v;
256
259
  }
257
- g.Input = Do;
258
- function Eo(u) {
259
- const { accept: s, multiple: a, onSelectFiles: y, ...f } = u, i = V(null);
260
- async function b(o) {
260
+ b.Input = Po;
261
+ function So(a) {
262
+ const { accept: i, multiple: s, onSelectFiles: y, ...p } = a, r = j(null);
263
+ async function h(o) {
261
264
  const c = Array.from(o).map((n) => {
262
265
  const e = new FileReader();
263
- return new Promise((d) => {
264
- e.onload = () => d(e.result), e.readAsText(n);
266
+ return new Promise((u) => {
267
+ e.onload = () => u(e.result), e.readAsText(n);
265
268
  });
266
269
  });
267
270
  return await Promise.all(c);
@@ -269,30 +272,30 @@ function Eo(u) {
269
272
  async function x(o) {
270
273
  const c = o.target.files;
271
274
  if (c != null && c.length) {
272
- const n = await b(c);
273
- y(a ? n : n[0]);
275
+ const n = await h(c);
276
+ y(s ? n : n[0]);
274
277
  }
275
278
  }
276
- return /* @__PURE__ */ E(S, { children: [
277
- /* @__PURE__ */ l(g, { onClick: () => {
279
+ return /* @__PURE__ */ P(M, { children: [
280
+ /* @__PURE__ */ l(b, { onClick: () => {
278
281
  var o;
279
- return (o = i.current) == null ? void 0 : o.click();
280
- }, ...f }),
282
+ return (o = r.current) == null ? void 0 : o.click();
283
+ }, ...p }),
281
284
  /* @__PURE__ */ l(
282
285
  "input",
283
286
  {
284
287
  hidden: !0,
285
288
  type: "file",
286
- ref: i,
287
- accept: s,
288
- multiple: a,
289
+ ref: r,
290
+ accept: i,
291
+ multiple: s,
289
292
  onChange: x
290
293
  }
291
294
  )
292
295
  ] });
293
296
  }
294
- g.File = Eo;
297
+ b.File = So;
295
298
  export {
296
- g as Button,
297
- No as ButtonCheckbox
299
+ b as Button,
300
+ Do as ButtonCheckbox
298
301
  };
@@ -4,6 +4,8 @@ import { BoxProps } from './Box';
4
4
  type Props = Partial<{
5
5
  /** Buttons or other content to render inline with the button */
6
6
  buttons: ReactNode;
7
+ /** Top margin of the child nodes, defaulted to 1 */
8
+ child_mt: number;
7
9
  /** Icon to display with the collapsible */
8
10
  icon: string;
9
11
  /** Whether the collapsible is open */
@@ -1,27 +1,35 @@
1
- import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
- import { useState as h } from "react";
3
- import { Box as r } from "./Box.js";
4
- import { Button as p } from "./Button.js";
5
- function v(o) {
6
- const { children: t, color: s, title: a, buttons: n, icon: c, ...m } = o, [l, d] = h(o.open);
7
- return /* @__PURE__ */ i(r, { mb: 1, children: [
8
- /* @__PURE__ */ i("div", { className: "Table", children: [
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
+ import { useState as p } from "react";
3
+ import { Box as t } from "./Box.js";
4
+ import { Button as b } from "./Button.js";
5
+ function x(o) {
6
+ const {
7
+ children: r,
8
+ child_mt: s = 1,
9
+ color: m,
10
+ title: a,
11
+ buttons: c,
12
+ icon: i,
13
+ ...d
14
+ } = o, [l, h] = p(o.open);
15
+ return /* @__PURE__ */ n(t, { mb: 1, children: [
16
+ /* @__PURE__ */ n("div", { className: "Table", children: [
9
17
  /* @__PURE__ */ e("div", { className: "Table__cell", children: /* @__PURE__ */ e(
10
- p,
18
+ b,
11
19
  {
12
20
  fluid: !0,
13
- color: s,
14
- icon: c || (l ? "chevron-down" : "chevron-right"),
15
- onClick: () => d(!l),
16
- ...m,
21
+ color: m,
22
+ icon: i || (l ? "chevron-down" : "chevron-right"),
23
+ onClick: () => h(!l),
24
+ ...d,
17
25
  children: a
18
26
  }
19
27
  ) }),
20
- n && /* @__PURE__ */ e("div", { className: "Table__cell Table__cell--collapsing", children: n })
28
+ c && /* @__PURE__ */ e("div", { className: "Table__cell Table__cell--collapsing", children: c })
21
29
  ] }),
22
- l && /* @__PURE__ */ e(r, { mt: 1, children: t })
30
+ l && /* @__PURE__ */ e(t, { mt: s, children: r })
23
31
  ] });
24
32
  }
25
33
  export {
26
- v as Collapsible
34
+ x as Collapsible
27
35
  };