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.
Files changed (82) hide show
  1. package/dist/common/constants.d.ts +4 -0
  2. package/dist/common/constants.js +17 -0
  3. package/dist/common/hotkeys.js +48 -48
  4. package/dist/common/ui.d.ts +6 -0
  5. package/dist/common/ui.js +63 -59
  6. package/dist/components/AnimatedNumber.d.ts +1 -1
  7. package/dist/components/Button.d.ts +3 -3
  8. package/dist/components/Button.js +21 -22
  9. package/dist/components/Chart.d.ts +3 -15
  10. package/dist/components/Chart.js +68 -86
  11. package/dist/components/ColorBox.js +3 -3
  12. package/dist/components/Dialog.d.ts +16 -0
  13. package/dist/components/Dialog.js +5 -5
  14. package/dist/components/DmIcon.d.ts +1 -1
  15. package/dist/components/DraggableControl.d.ts +56 -0
  16. package/dist/components/DraggableControl.js +126 -176
  17. package/dist/components/Dropdown.d.ts +8 -6
  18. package/dist/components/Dropdown.js +137 -129
  19. package/dist/components/FitText.d.ts +1 -1
  20. package/dist/components/Floating.d.ts +75 -0
  21. package/dist/components/Floating.js +2235 -0
  22. package/dist/components/ImageButton.d.ts +2 -3
  23. package/dist/components/ImageButton.js +88 -98
  24. package/dist/components/InfinitePlane.d.ts +35 -32
  25. package/dist/components/InfinitePlane.js +123 -133
  26. package/dist/components/Knob.d.ts +22 -6
  27. package/dist/components/Knob.js +45 -46
  28. package/dist/components/MenuBar.js +81 -97
  29. package/dist/components/Modal.js +12 -12
  30. package/dist/components/NumberInput.d.ts +1 -1
  31. package/dist/components/Popper.d.ts +5 -1
  32. package/dist/components/Popper.js +1026 -121
  33. package/dist/components/ProgressBar.js +3 -3
  34. package/dist/components/RoundGauge.js +30 -30
  35. package/dist/components/Section.js +7 -7
  36. package/dist/components/Slider.d.ts +22 -6
  37. package/dist/components/Slider.js +55 -56
  38. package/dist/components/Stack.js +3 -3
  39. package/dist/components/Table.js +7 -7
  40. package/dist/components/Tabs.js +7 -7
  41. package/dist/components/TextArea.d.ts +17 -0
  42. package/dist/components/TextArea.js +35 -33
  43. package/dist/components/Tooltip.d.ts +3 -34
  44. package/dist/components/Tooltip.js +14 -77
  45. package/dist/components/TrackOutsideClicks.d.ts +1 -1
  46. package/dist/components/index.d.ts +1 -0
  47. package/dist/components/index.js +64 -62
  48. package/package.json +26 -27
  49. package/styles/base.scss +13 -11
  50. package/styles/colors.scss +63 -67
  51. package/styles/components/BlockQuote.scss +5 -8
  52. package/styles/components/Button.scss +123 -99
  53. package/styles/components/Dialog.scss +23 -30
  54. package/styles/components/Dimmer.scss +3 -8
  55. package/styles/components/Divider.scss +6 -7
  56. package/styles/components/Dropdown.scss +103 -51
  57. package/styles/components/Flex.scss +0 -1
  58. package/styles/components/Floating.scss +60 -0
  59. package/styles/components/ImageButton.scss +136 -192
  60. package/styles/components/Input.scss +24 -26
  61. package/styles/components/Knob.scss +37 -41
  62. package/styles/components/LabeledList.scss +8 -6
  63. package/styles/components/MenuBar.scss +17 -21
  64. package/styles/components/Modal.scss +8 -7
  65. package/styles/components/NoticeBox.scss +22 -26
  66. package/styles/components/NumberInput.scss +30 -28
  67. package/styles/components/ProgressBar.scss +27 -19
  68. package/styles/components/RoundGauge.scss +46 -26
  69. package/styles/components/Section.scss +17 -32
  70. package/styles/components/Slider.scss +18 -15
  71. package/styles/components/Stack.scss +8 -48
  72. package/styles/components/Table.scss +2 -2
  73. package/styles/components/Tabs.scss +92 -66
  74. package/styles/components/TextArea.scss +32 -36
  75. package/styles/components/Tooltip.scss +10 -13
  76. package/styles/functions.scss +1 -62
  77. package/styles/main.scss +6 -1
  78. package/styles/reset.scss +7 -11
  79. package/styles/vars-colors.scss +108 -0
  80. package/styles/vars-components.scss +162 -0
  81. package/styles/vars-values.scss +110 -0
  82. package/dist/popper-CiqSDJTE.js +0 -906
@@ -1,6 +1,6 @@
1
1
  import { jsxs as B, jsx as i } from "react/jsx-runtime";
2
2
  import { CSS_COLORS as C } from "../common/constants.js";
3
- import { keyOfMatchingRange as P, toFixed as h, scale as x, clamp01 as _ } from "../common/math.js";
3
+ import { keyOfMatchingRange as P, toFixed as h, clamp01 as x, scale as _ } from "../common/math.js";
4
4
  import { classes as v } from "../common/react.js";
5
5
  import { computeBoxProps as y, computeBoxClassName as N } from "../common/ui.js";
6
6
  function j(n) {
@@ -13,8 +13,8 @@ function j(n) {
13
13
  ranges: p = {},
14
14
  children: r,
15
15
  ...l
16
- } = n, a = x(o, d, f), g = r !== void 0, s = u || P(o, p) || "default", e = y(l), t = ["ProgressBar", m, N(l)], c = {
17
- width: `${_(a) * 100}%`
16
+ } = n, a = _(o, d, f), g = r !== void 0, s = u || P(o, p) || "default", e = y(l), t = ["ProgressBar", m, N(l)], c = {
17
+ width: `${x(a) * 100}%`
18
18
  };
19
19
  return C.includes(s) || s === "default" ? t.push(`ProgressBar--color--${s}`) : (e.style = { ...e.style, borderColor: s }, c.backgroundColor = s), /* @__PURE__ */ B("div", { className: v(t), ...e, children: [
20
20
  /* @__PURE__ */ i(
@@ -1,47 +1,47 @@
1
1
  import { jsxs as m, jsx as e } from "react/jsx-runtime";
2
- import { scale as d, keyOfMatchingRange as M, clamp01 as k } from "../common/math.js";
2
+ import { scale as d, keyOfMatchingRange as M, clamp01 as v } from "../common/math.js";
3
3
  import { classes as p } from "../common/react.js";
4
- import { computeBoxClassName as v, computeBoxProps as B } from "../common/ui.js";
5
- import { AnimatedNumber as $ } from "./AnimatedNumber.js";
6
- import { Box as j } from "./Box.js";
7
- function z(h) {
4
+ import { computeBoxProps as k, computeBoxClassName as $ } from "../common/ui.js";
5
+ import { AnimatedNumber as B } from "./AnimatedNumber.js";
6
+ function b(_) {
8
7
  const {
9
8
  alertAfter: a,
10
9
  alertBefore: t,
11
- className: _,
10
+ className: h,
12
11
  format: R,
13
12
  maxValue: c = 1,
14
- minValue: i = 1,
13
+ minValue: u = 1,
15
14
  ranges: n,
16
15
  size: y = 1,
17
- style: x,
16
+ style: G,
18
17
  value: r,
19
18
  ...g
20
- } = h, G = d(r, i, c), f = k(G), l = n ? {} : { primary: [0, 1] };
21
- n && Object.keys(n).forEach((o) => {
22
- const s = n[o];
23
- l[o] = [
24
- d(s[0], i, c),
25
- d(s[1], i, c)
26
- ];
27
- });
28
- function N() {
19
+ } = _, N = d(r, u, c), f = v(N), s = n ? {} : { primary: [0, 1] };
20
+ if (n)
21
+ for (const o in n) {
22
+ const l = n[o];
23
+ s[o] = [
24
+ d(l[0], u, c),
25
+ d(l[1], u, c)
26
+ ];
27
+ }
28
+ function x() {
29
29
  return !!(a && t && r > a && r < t || a && r > a || t && r < t);
30
30
  }
31
- const C = N() && M(f, l);
32
- return /* @__PURE__ */ m(j, { inline: !0, children: [
31
+ const C = x() && M(f, s);
32
+ return /* @__PURE__ */ m("div", { className: "RoundGauge__wrapper", children: [
33
33
  /* @__PURE__ */ e(
34
34
  "div",
35
35
  {
36
36
  className: p([
37
37
  "RoundGauge",
38
- _,
39
- v(g)
38
+ h,
39
+ $(g)
40
40
  ]),
41
- ...B({
41
+ ...k({
42
42
  style: {
43
43
  fontSize: `${y}em`,
44
- ...x
44
+ ...G
45
45
  },
46
46
  ...g
47
47
  }),
@@ -57,24 +57,24 @@ function z(h) {
57
57
  }
58
58
  ),
59
59
  /* @__PURE__ */ e("g", { children: /* @__PURE__ */ e("circle", { className: "RoundGauge__ringTrack", cx: "50", cy: "50", r: "45" }) }),
60
- /* @__PURE__ */ e("g", { children: Object.keys(l).map((o, s) => {
61
- const u = l[o];
60
+ /* @__PURE__ */ e("g", { children: Object.keys(s).map((o, l) => {
61
+ const i = s[o];
62
62
  return /* @__PURE__ */ e(
63
63
  "circle",
64
64
  {
65
65
  className: `RoundGauge__ringFill RoundGauge--color--${o}`,
66
66
  style: {
67
67
  strokeDashoffset: Math.max(
68
- (2 - (u[1] - u[0])) * Math.PI * 50,
68
+ (2 - (i[1] - i[0])) * Math.PI * 50,
69
69
  0
70
70
  )
71
71
  },
72
- transform: `rotate(${180 + 180 * u[0]} 50 50)`,
72
+ transform: `rotate(${180 + 180 * i[0]} 50 50)`,
73
73
  cx: "50",
74
74
  cy: "50",
75
75
  r: "45"
76
76
  },
77
- s
77
+ l
78
78
  );
79
79
  }) }),
80
80
  /* @__PURE__ */ m(
@@ -106,9 +106,9 @@ function z(h) {
106
106
  ] })
107
107
  }
108
108
  ),
109
- /* @__PURE__ */ e($, { value: r, format: R })
109
+ /* @__PURE__ */ e(B, { value: r, format: R })
110
110
  ] });
111
111
  }
112
112
  export {
113
- z as RoundGauge
113
+ b as RoundGauge
114
114
  };
@@ -1,8 +1,8 @@
1
1
  import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
2
  import { forwardRef as C, useRef as P, useEffect as g } from "react";
3
3
  import { addScrollableNode as j, removeScrollableNode as w } from "../common/events.js";
4
- import { classes as s, canRender as a } from "../common/react.js";
5
- import { computeBoxClassName as z, computeBoxProps as B } from "../common/ui.js";
4
+ import { canRender as s, classes as a } from "../common/react.js";
5
+ import { computeBoxProps as z, computeBoxClassName as B } from "../common/ui.js";
6
6
  const q = C(
7
7
  (d, m) => {
8
8
  const {
@@ -20,14 +20,14 @@ const q = C(
20
20
  stretchContents: x,
21
21
  title: r,
22
22
  ...l
23
- } = d, v = P(null), e = m || v, T = a(r) || a(o);
23
+ } = d, v = P(null), e = m || v, T = s(r) || s(o);
24
24
  return g(() => (e != null && e.current && (n || c) && j(e.current), () => {
25
25
  e != null && e.current && w(e.current);
26
26
  }), []), /* @__PURE__ */ i(
27
27
  "div",
28
28
  {
29
29
  id: _,
30
- className: s([
30
+ className: a([
31
31
  "Section",
32
32
  u && "Section--fill",
33
33
  p && "Section--fitted",
@@ -35,9 +35,9 @@ const q = C(
35
35
  c && "Section--scrollableHorizontal",
36
36
  N && "Section--flex",
37
37
  S,
38
- z(l)
38
+ B(l)
39
39
  ]),
40
- ...B(l),
40
+ ...z(l),
41
41
  children: [
42
42
  T && /* @__PURE__ */ i("div", { className: "Section__title", children: [
43
43
  /* @__PURE__ */ t("span", { className: "Section__titleText", children: r }),
@@ -46,7 +46,7 @@ const q = C(
46
46
  /* @__PURE__ */ t("div", { className: "Section__rest", children: /* @__PURE__ */ t(
47
47
  "div",
48
48
  {
49
- className: s([
49
+ className: a([
50
50
  "Section__content",
51
51
  x && "Section__content--stretchContents",
52
52
  h && "Section__content--noTopPadding"
@@ -16,22 +16,38 @@ type Props = {
16
16
  color: string;
17
17
  /** Disables the slider. */
18
18
  disabled: boolean;
19
- /** If set, this value will be used to set the fill percentage of the progress bar filler independently of the main value. */
19
+ /**
20
+ * If set, this value will be used to set the fill percentage of the
21
+ * progress bar filler independently of the main value.
22
+ */
20
23
  fillValue: number;
21
24
  /** Format value using this function before displaying it. */
22
25
  format: (value: number) => string;
23
26
  /** Adjust value by this amount when dragging the input. */
24
27
  onChange: (event: Event, value: number) => void;
25
- /** An event, which fires when you release the input, or successfully enter a number. */
28
+ /**
29
+ * An event which fires when you release the input or successfully enter
30
+ * a number.
31
+ */
26
32
  onDrag: (event: Event, value: number) => void;
27
- /** Applies a `color` to the slider based on whether the value lands in the range between `from` and `to`. */
33
+ /**
34
+ * Applies a `color` to the slider based on whether the value lands in the
35
+ * range between `from` and `to`.
36
+ */
28
37
  ranges: Record<string, [number, number]>;
29
38
  /** Screen distance mouse needs to travel to adjust value by one `step`. */
30
39
  step: number;
31
- /** A number in milliseconds, for which the input will hold off from updating while events propagate through the backend. Default is about 250ms, increase it if you still see flickering. */
40
+ /**
41
+ * The sensitivity of the slider. Adjust this if it feels too slow/fast
42
+ * while dragging. Use higher for larger sliders. Default is 1.
43
+ */
32
44
  stepPixelSize: number;
33
- /** Adjust value by this amount when dragging the input. */
34
- suppressFlicker: boolean;
45
+ /**
46
+ * A number in milliseconds, for which the input will hold off from updating
47
+ * while events propagate through the backend. Default is about 250ms,
48
+ * increase it if you still see flickering.
49
+ */
50
+ suppressFlicker: number;
35
51
  /** Unit to display to the right of value. */
36
52
  unit: string;
37
53
  }> & BoxProps & PropsWithChildren;
@@ -1,80 +1,79 @@
1
- import { jsx as e, jsxs as m } from "react/jsx-runtime";
2
- import { keyOfMatchingRange as O, clamp01 as r, scale as u } from "../common/math.js";
3
- import { classes as p } from "../common/react.js";
4
- import { computeBoxClassName as b, computeBoxProps as z } from "../common/ui.js";
5
- import { DraggableControl as R } from "./DraggableControl.js";
6
- function J(g) {
1
+ import { jsx as e, jsxs as p } from "react/jsx-runtime";
2
+ import { keyOfMatchingRange as E, clamp01 as r, scale as u } from "../common/math.js";
3
+ import { classes as g } from "../common/react.js";
4
+ import { computeBoxProps as O, computeBoxClassName as b } from "../common/ui.js";
5
+ import { DraggableControl as z } from "./DraggableControl.js";
6
+ function I(f) {
7
7
  const {
8
8
  // Draggable props (passthrough)
9
- animated: f,
10
- format: _,
11
- maxValue: l,
12
- minValue: s,
13
- onChange: h,
14
- onDrag: v,
15
- step: N,
16
- stepPixelSize: x,
17
- suppressFlicker: y,
18
- unit: B,
19
- value: P,
9
+ animated: _,
10
+ format: h,
11
+ maxValue: a,
12
+ minValue: l,
13
+ onChange: v,
14
+ onDrag: N,
15
+ step: x,
16
+ stepPixelSize: y,
17
+ suppressFlicker: B,
18
+ unit: P,
19
+ value: i,
20
20
  // Own props
21
21
  className: S,
22
- fillValue: a,
22
+ fillValue: s,
23
23
  color: V,
24
24
  ranges: C = {},
25
- children: i,
26
- ...o
27
- } = g, D = i !== void 0;
25
+ children: o,
26
+ ...t
27
+ } = f, D = o !== void 0;
28
28
  return /* @__PURE__ */ e(
29
- R,
29
+ z,
30
30
  {
31
31
  dragMatrix: [1, 0],
32
- animated: f,
33
- format: _,
34
- maxValue: l,
35
- minValue: s,
36
- onChange: h,
37
- onDrag: v,
38
- step: N,
39
- stepPixelSize: x,
40
- suppressFlicker: y,
41
- unit: B,
42
- value: P,
32
+ animated: _,
33
+ format: h,
34
+ maxValue: a,
35
+ minValue: l,
36
+ onChange: v,
37
+ onDrag: N,
38
+ step: x,
39
+ stepPixelSize: y,
40
+ suppressFlicker: B,
41
+ unit: P,
42
+ value: i,
43
43
  children: (w) => {
44
44
  const {
45
- displayElement: t,
46
- displayValue: n,
45
+ displayElement: n,
46
+ displayValue: c,
47
47
  dragging: M,
48
48
  handleDragStart: $,
49
- inputElement: F,
50
- value: j
51
- } = w, k = a != null, c = u(
52
- a ?? n,
53
- s,
54
- l
55
- ), d = u(n, s, l), E = V || O(a ?? j, C) || "default";
56
- return /* @__PURE__ */ m(
49
+ inputElement: F
50
+ } = w, j = s != null, d = u(
51
+ s ?? c,
52
+ l,
53
+ a
54
+ ), m = u(c, l, a), k = V || E(s ?? i, C) || "default";
55
+ return /* @__PURE__ */ p(
57
56
  "div",
58
57
  {
59
- className: p([
58
+ className: g([
60
59
  "Slider",
61
60
  "ProgressBar",
62
- `ProgressBar--color--${E}`,
61
+ `ProgressBar--color--${k}`,
63
62
  S,
64
- b(o)
63
+ b(t)
65
64
  ]),
66
- ...z(o),
65
+ ...O(t),
67
66
  onMouseDown: $,
68
67
  children: [
69
68
  /* @__PURE__ */ e(
70
69
  "div",
71
70
  {
72
- className: p([
71
+ className: g([
73
72
  "ProgressBar__fill",
74
- k && "ProgressBar__fill--animated"
73
+ j && "ProgressBar__fill--animated"
75
74
  ]),
76
75
  style: {
77
- width: `${r(c) * 100}%`,
76
+ width: `${r(d) * 100}%`,
78
77
  opacity: 0.4
79
78
  }
80
79
  }
@@ -84,25 +83,25 @@ function J(g) {
84
83
  {
85
84
  className: "ProgressBar__fill",
86
85
  style: {
87
- width: `${r(Math.min(c, d)) * 100}%`
86
+ width: `${r(Math.min(d, m)) * 100}%`
88
87
  }
89
88
  }
90
89
  ),
91
- /* @__PURE__ */ m(
90
+ /* @__PURE__ */ p(
92
91
  "div",
93
92
  {
94
93
  className: "Slider__cursorOffset",
95
94
  style: {
96
- width: `${r(d) * 100}%`
95
+ width: `${r(m) * 100}%`
97
96
  },
98
97
  children: [
99
98
  /* @__PURE__ */ e("div", { className: "Slider__cursor" }),
100
99
  /* @__PURE__ */ e("div", { className: "Slider__pointer" }),
101
- M && /* @__PURE__ */ e("div", { className: "Slider__popupValue", children: t })
100
+ M && /* @__PURE__ */ e("div", { className: "Slider__popupValue", children: n })
102
101
  ]
103
102
  }
104
103
  ),
105
- /* @__PURE__ */ e("div", { className: "ProgressBar__content", children: D ? i : t }),
104
+ /* @__PURE__ */ e("div", { className: "ProgressBar__content", children: D ? o : n }),
106
105
  F
107
106
  ]
108
107
  }
@@ -112,5 +111,5 @@ function J(g) {
112
111
  );
113
112
  }
114
113
  export {
115
- J as Slider
114
+ I as Slider
116
115
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import { classes as a } from "../common/react.js";
3
3
  import { computeBoxClassName as o } from "../common/ui.js";
4
- import { computeFlexClassName as k, computeFlexProps as v, computeFlexItemProps as m } from "./Flex.js";
4
+ import { computeFlexProps as k, computeFlexClassName as v, computeFlexItemProps as m } from "./Flex.js";
5
5
  function n(r) {
6
6
  const { className: c, vertical: e, fill: t, reverse: s, zebra: l, ...d } = r, f = e ? "column" : "row", S = s ? "-reverse" : "";
7
7
  return /* @__PURE__ */ i(
@@ -14,9 +14,9 @@ function n(r) {
14
14
  l && "Stack--zebra",
15
15
  s && `Stack--reverse${e ? "--vertical" : ""}`,
16
16
  c,
17
- k(r)
17
+ v(r)
18
18
  ]),
19
- ...v({
19
+ ...k({
20
20
  direction: `${f}${S}`,
21
21
  ...d
22
22
  })
@@ -1,6 +1,6 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
2
  import { classes as r } from "../common/react.js";
3
- import { computeBoxClassName as t, computeBoxProps as n } from "../common/ui.js";
3
+ import { computeBoxProps as t, computeBoxClassName as n } from "../common/ui.js";
4
4
  function m(e) {
5
5
  const { className: l, collapsing: a, children: s, ...o } = e;
6
6
  return /* @__PURE__ */ c(
@@ -10,9 +10,9 @@ function m(e) {
10
10
  "Table",
11
11
  a && "Table--collapsing",
12
12
  l,
13
- t(o)
13
+ n(o)
14
14
  ]),
15
- ...n(o),
15
+ ...t(o),
16
16
  children: /* @__PURE__ */ c("tbody", { children: s })
17
17
  }
18
18
  );
@@ -26,9 +26,9 @@ function b(e) {
26
26
  "Table__row",
27
27
  a && "Table__row--header",
28
28
  l,
29
- t(e)
29
+ n(e)
30
30
  ]),
31
- ...n(s)
31
+ ...t(s)
32
32
  }
33
33
  );
34
34
  }
@@ -42,10 +42,10 @@ function _(e) {
42
42
  a && "Table__cell--collapsing",
43
43
  o && "Table__cell--header",
44
44
  l,
45
- t(e)
45
+ n(e)
46
46
  ]),
47
47
  colSpan: s,
48
- ...n(i)
48
+ ...t(i)
49
49
  }
50
50
  );
51
51
  }
@@ -1,6 +1,6 @@
1
- import { jsx as a, jsxs as N } from "react/jsx-runtime";
2
- import { classes as f, canRender as d } from "../common/react.js";
3
- import { computeBoxClassName as h, computeBoxProps as p } from "../common/ui.js";
1
+ import { jsxs as N, jsx as a } from "react/jsx-runtime";
2
+ import { canRender as d, classes as f } from "../common/react.js";
3
+ import { computeBoxProps as h, computeBoxClassName as p } from "../common/ui.js";
4
4
  import { Icon as v } from "./Icon.js";
5
5
  function T(e) {
6
6
  const { className: i, vertical: c, fill: o, fluid: s, children: r, ...l } = e;
@@ -13,9 +13,9 @@ function T(e) {
13
13
  o && "Tabs--fill",
14
14
  s && "Tabs--fluid",
15
15
  i,
16
- h(l)
16
+ p(l)
17
17
  ]),
18
- ...p(l),
18
+ ...h(l),
19
19
  children: r
20
20
  }
21
21
  );
@@ -45,10 +45,10 @@ function x(e) {
45
45
  `Tab--color--${o}`,
46
46
  c && "Tab--selected",
47
47
  i,
48
- h(m)
48
+ p(m)
49
49
  ]),
50
50
  onClick: _,
51
- ...p(m),
51
+ ...h(m),
52
52
  children: [
53
53
  d(l) && /* @__PURE__ */ a("div", { className: "Tab__left", children: l }) || !!s && /* @__PURE__ */ a("div", { className: "Tab__left", children: /* @__PURE__ */ a(v, { name: s, spin: r }) }),
54
54
  /* @__PURE__ */ a("div", { className: "Tab__text", children: u }),
@@ -1,11 +1,24 @@
1
1
  import { SyntheticEvent } from 'react';
2
+ /**
3
+ * ## Textarea
4
+ *
5
+ * An input for larger amounts of text. Use this when you want inputs larger
6
+ * than one row.
7
+ */
2
8
  export declare const TextArea: import('react').ForwardRefExoticComponent<Partial<{
9
+ /** Automatically focus the textarea on mount */
3
10
  autoFocus: boolean;
11
+ /** Selects all text on mount */
4
12
  autoSelect: boolean;
13
+ /** The value to display in the textarea */
5
14
  displayedValue: string;
15
+ /** Don't use tab for indent */
6
16
  dontUseTabForIndent: boolean;
17
+ /** Sets width to 100% */
7
18
  fluid: boolean;
19
+ /** Maximum length of the textarea */
8
20
  maxLength: number;
21
+ /** Removes the border. */
9
22
  noborder: boolean;
10
23
  /** Fires when user is 'done typing': Clicked out, blur, enter key (but not shift+enter) */
11
24
  onChange: (event: SyntheticEvent<HTMLTextAreaElement>, value: string) => void;
@@ -15,11 +28,15 @@ export declare const TextArea: import('react').ForwardRefExoticComponent<Partial
15
28
  onEscape: (event: SyntheticEvent<HTMLTextAreaElement>) => void;
16
29
  /** Fires on each key press / value change. Used for searching */
17
30
  onInput: (event: SyntheticEvent<HTMLTextAreaElement>, value: string) => void;
31
+ /** Dummy text inside the textarea when it's empty */
18
32
  placeholder: string;
33
+ /** Whether the textarea is scrollable when it has more content than height */
19
34
  scrollbar: boolean;
35
+ /** Clears the textarea when the enter key is pressed */
20
36
  selfClear: boolean;
21
37
  /** Provides a Record with key: markupChar entries which can be used for ctrl + key combinations to surround a selected text with the markup character */
22
38
  userMarkup: Record<string, string>;
39
+ /** The value of the textarea */
23
40
  value: string;
24
41
  }> & Partial<{
25
42
  as: string;