tgui-core 1.1.11 → 1.1.13
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/dist/ProgressBar.module-BkAFfFy0.js +29 -0
- package/dist/Section.module-CLVHJ4yA.js +15 -0
- package/dist/assets/BlockQuote.css +1 -0
- package/dist/assets/Button.css +1 -0
- package/dist/assets/ColorBox.css +1 -0
- package/dist/assets/Dialog.css +1 -0
- package/dist/assets/Dimmer.css +1 -0
- package/dist/assets/Divider.css +1 -0
- package/dist/assets/Flex.css +1 -0
- package/dist/assets/Icon.css +6 -0
- package/dist/assets/Input.css +1 -0
- package/dist/assets/Knob.css +1 -0
- package/dist/assets/LabeledList.css +1 -0
- package/dist/assets/MenuBar.css +1 -0
- package/dist/assets/Modal.css +1 -0
- package/dist/assets/NoticeBox.css +1 -0
- package/dist/assets/NumberInput.css +1 -0
- package/dist/assets/ProgressBar.css +1 -0
- package/dist/assets/RoundGauge.css +1 -0
- package/dist/assets/Section.css +1 -0
- package/dist/assets/Slider.css +1 -0
- package/dist/assets/Stack.css +1 -0
- package/dist/assets/Table.css +1 -0
- package/dist/assets/Tabs.css +1 -0
- package/dist/assets/TextArea.css +1 -0
- package/dist/assets/Tooltip.css +1 -0
- package/dist/common/assets.d.ts +4 -0
- package/dist/common/assets.js +25 -0
- package/dist/common/collections.d.ts +10 -0
- package/dist/common/collections.js +15 -0
- package/dist/common/color.d.ts +25 -0
- package/dist/common/color.js +69 -0
- package/dist/common/constants.d.ts +102 -0
- package/dist/common/constants.js +312 -0
- package/dist/common/events.d.ts +33 -0
- package/dist/common/events.js +147 -0
- package/{lib/common/exhaustive.ts → dist/common/exhaustive.d.ts} +1 -3
- package/dist/common/exhaustive.js +6 -0
- package/dist/common/format.d.ts +11 -0
- package/dist/common/format.js +114 -0
- package/{lib/common/fp.ts → dist/common/fp.d.ts} +2 -16
- package/dist/common/fp.js +9 -0
- package/dist/common/hotkeys.d.ts +25 -0
- package/dist/common/hotkeys.js +112 -0
- package/dist/common/http.d.ts +4 -0
- package/dist/common/http.js +10 -0
- package/dist/common/keycodes.d.ts +85 -0
- package/dist/common/keycodes.js +88 -0
- package/{lib/common/keys.ts → dist/common/keys.d.ts} +21 -24
- package/dist/common/keys.js +8 -0
- package/dist/common/math.d.ts +39 -0
- package/dist/common/math.js +41 -0
- package/dist/common/perf.d.ts +24 -0
- package/dist/common/perf.js +33 -0
- package/dist/common/random.d.ts +16 -0
- package/dist/common/random.js +18 -0
- package/dist/common/react.d.ts +23 -0
- package/dist/common/react.js +30 -0
- package/dist/common/redux.d.ts +64 -0
- package/dist/common/redux.js +72 -0
- package/dist/common/storage.d.ts +24 -0
- package/dist/common/storage.js +133 -0
- package/dist/common/string.d.ts +65 -0
- package/dist/common/string.js +83 -0
- package/dist/common/timer.d.ts +18 -0
- package/dist/common/timer.js +28 -0
- package/dist/common/type-utils.d.ts +9 -0
- package/dist/common/type-utils.js +25 -0
- package/dist/common/uuid.d.ts +9 -0
- package/dist/common/uuid.js +10 -0
- package/dist/components/AnimatedNumber.d.ts +60 -0
- package/dist/components/AnimatedNumber.js +76 -0
- package/dist/components/Autofocus.d.ts +4 -0
- package/dist/components/Autofocus.js +17 -0
- package/dist/components/Blink.d.ts +26 -0
- package/dist/components/Blink.js +56 -0
- package/dist/components/BlockQuote.d.ts +3 -0
- package/dist/components/BlockQuote.js +13 -0
- package/dist/components/BodyZoneSelector.d.ts +28 -0
- package/dist/components/BodyZoneSelector.js +115 -0
- package/dist/components/Box.d.ts +91 -0
- package/dist/components/Box.js +133 -0
- package/dist/components/Button.d.ts +93 -0
- package/dist/components/Button.js +298 -0
- package/dist/components/ByondUi.js +73 -0
- package/dist/components/Chart.d.ts +28 -0
- package/dist/components/Chart.js +95 -0
- package/dist/components/Collapsible.d.ts +15 -0
- package/dist/components/Collapsible.js +27 -0
- package/dist/components/ColorBox.d.ts +8 -0
- package/dist/components/ColorBox.js +24 -0
- package/dist/components/Dialog.d.ts +24 -0
- package/dist/components/Dialog.js +67 -0
- package/dist/components/Dimmer.d.ts +3 -0
- package/dist/components/Dimmer.js +13 -0
- package/dist/components/Divider.d.ts +6 -0
- package/dist/components/Divider.js +22 -0
- package/dist/components/DmIcon.d.ts +33 -0
- package/dist/components/DmIcon.js +29 -0
- package/dist/components/DraggableControl.js +176 -0
- package/dist/components/Dropdown.d.ts +48 -0
- package/dist/components/Dropdown.js +152 -0
- package/dist/components/FakeTerminal.js +38 -0
- package/dist/components/FitText.d.ts +22 -0
- package/dist/components/FitText.js +63 -0
- package/dist/components/Flex.d.ts +93 -0
- package/dist/components/Flex.js +72 -0
- package/dist/components/Icon.d.ts +30 -0
- package/dist/components/Icon.js +51 -0
- package/dist/components/Image.d.ts +14 -0
- package/dist/components/Image.js +35 -0
- package/dist/components/InfinitePlane.js +139 -0
- package/dist/components/Input.d.ts +61 -0
- package/dist/components/Input.js +89 -0
- package/dist/components/KeyListener.d.ts +15 -0
- package/dist/components/KeyListener.js +23 -0
- package/dist/components/Knob.d.ts +49 -0
- package/dist/components/Knob.js +162 -0
- package/dist/components/LabeledControls.d.ts +11 -0
- package/dist/components/LabeledControls.js +39 -0
- package/dist/components/LabeledList.d.ts +57 -0
- package/dist/components/LabeledList.js +94 -0
- package/dist/components/MenuBar.d.ts +28 -0
- package/dist/components/MenuBar.js +174 -0
- package/dist/components/Modal.d.ts +3 -0
- package/dist/components/Modal.js +25 -0
- package/dist/components/NoticeBox.d.ts +20 -0
- package/dist/components/NoticeBox.js +49 -0
- package/dist/components/NumberInput.d.ts +45 -0
- package/dist/components/NumberInput.js +221 -0
- package/dist/components/Popper.d.ts +27 -0
- package/dist/components/Popper.js +177 -0
- package/dist/components/ProgressBar.d.ts +46 -0
- package/dist/components/ProgressBar.js +37 -0
- package/dist/components/RestrictedInput.js +155 -0
- package/dist/components/RoundGauge.d.ts +53 -0
- package/dist/components/RoundGauge.js +147 -0
- package/dist/components/Section.d.ts +63 -0
- package/dist/components/Section.js +62 -0
- package/dist/components/Slider.d.ts +46 -0
- package/dist/components/Slider.js +124 -0
- package/dist/components/Stack.d.ts +27 -0
- package/dist/components/Stack.js +67 -0
- package/dist/components/StyleableSection.d.ts +11 -0
- package/dist/components/StyleableSection.js +16 -0
- package/dist/components/Table.d.ts +29 -0
- package/dist/components/Table.js +67 -0
- package/dist/components/Tabs.d.ts +23 -0
- package/dist/components/Tabs.js +89 -0
- package/dist/components/TextArea.d.ts +39 -0
- package/dist/components/TextArea.js +118 -0
- package/dist/components/TimeDisplay.js +34 -0
- package/dist/components/Tooltip.d.ts +29 -0
- package/dist/components/Tooltip.js +83 -0
- package/dist/components/TrackOutsideClicks.d.ts +13 -0
- package/dist/components/TrackOutsideClicks.js +24 -0
- package/dist/components/VirtualList.d.ts +8 -0
- package/dist/components/VirtualList.js +34 -0
- package/dist/components/index.js +92 -0
- package/dist/popper-CiqSDJTE.js +906 -0
- package/package.json +8 -10
- package/lib/common/assets.ts +0 -38
- package/lib/common/collections.ts +0 -27
- package/lib/common/color.ts +0 -88
- package/lib/common/constants.ts +0 -349
- package/lib/common/events.ts +0 -262
- package/lib/common/format.ts +0 -167
- package/lib/common/hotkeys.ts +0 -207
- package/lib/common/http.ts +0 -16
- package/lib/common/keycodes.ts +0 -86
- package/lib/common/math.ts +0 -76
- package/lib/common/perf.ts +0 -72
- package/lib/common/random.ts +0 -32
- package/lib/common/react.ts +0 -59
- package/lib/common/redux.ts +0 -187
- package/lib/common/storage.ts +0 -207
- package/lib/common/string.ts +0 -169
- package/lib/common/timer.ts +0 -63
- package/lib/common/type-utils.ts +0 -41
- package/lib/common/types.d.ts +0 -12
- package/lib/common/uuid.ts +0 -18
- package/lib/components/AnimatedNumber.tsx +0 -180
- package/lib/components/Autofocus.tsx +0 -23
- package/lib/components/Blink.tsx +0 -91
- package/lib/components/BlockQuote.tsx +0 -9
- package/lib/components/BodyZoneSelector.tsx +0 -149
- package/lib/components/Box.tsx +0 -252
- package/lib/components/Button.tsx +0 -425
- package/lib/components/ByondUi.jsx +0 -110
- package/lib/components/Chart.tsx +0 -155
- package/lib/components/Collapsible.tsx +0 -43
- package/lib/components/ColorBox.tsx +0 -29
- package/lib/components/Dialog.tsx +0 -81
- package/lib/components/Dimmer.tsx +0 -13
- package/lib/components/Divider.tsx +0 -20
- package/lib/components/DmIcon.tsx +0 -86
- package/lib/components/DraggableControl.jsx +0 -276
- package/lib/components/Dropdown.tsx +0 -246
- package/lib/components/FakeTerminal.jsx +0 -52
- package/lib/components/FitText.tsx +0 -99
- package/lib/components/Flex.tsx +0 -159
- package/lib/components/Icon.tsx +0 -95
- package/lib/components/Image.tsx +0 -54
- package/lib/components/InfinitePlane.jsx +0 -192
- package/lib/components/Input.tsx +0 -176
- package/lib/components/KeyListener.tsx +0 -40
- package/lib/components/Knob.tsx +0 -178
- package/lib/components/LabeledControls.tsx +0 -44
- package/lib/components/LabeledList.tsx +0 -154
- package/lib/components/MenuBar.tsx +0 -228
- package/lib/components/Modal.tsx +0 -23
- package/lib/components/NoticeBox.tsx +0 -45
- package/lib/components/NumberInput.tsx +0 -328
- package/lib/components/Popper.tsx +0 -100
- package/lib/components/ProgressBar.tsx +0 -105
- package/lib/components/RestrictedInput.jsx +0 -301
- package/lib/components/RoundGauge.tsx +0 -180
- package/lib/components/Section.tsx +0 -120
- package/lib/components/Slider.tsx +0 -169
- package/lib/components/Stack.tsx +0 -96
- package/lib/components/StyleableSection.tsx +0 -33
- package/lib/components/Table.tsx +0 -84
- package/lib/components/Tabs.tsx +0 -89
- package/lib/components/TextArea.tsx +0 -182
- package/lib/components/TimeDisplay.jsx +0 -64
- package/lib/components/Tooltip.tsx +0 -152
- package/lib/components/TrackOutsideClicks.tsx +0 -35
- package/lib/components/VirtualList.tsx +0 -69
- package/lib/styles/atomic/candystripe.scss +0 -8
- package/lib/styles/atomic/centered-image.scss +0 -7
- package/lib/styles/atomic/color.scss +0 -21
- package/lib/styles/atomic/debug-layout.scss +0 -17
- package/lib/styles/atomic/fit-text.scss +0 -14
- package/lib/styles/atomic/links.scss +0 -12
- package/lib/styles/atomic/outline.scss +0 -47
- package/lib/styles/atomic/text.scss +0 -44
- package/lib/styles/base.scss +0 -32
- package/lib/styles/colors.scss +0 -92
- package/lib/styles/components/BlockQuote.module.scss +0 -20
- package/lib/styles/components/BlockQuote.module.scss.d.ts +0 -4
- package/lib/styles/components/Button.module.scss +0 -157
- package/lib/styles/components/Button.module.scss.d.ts +0 -46
- package/lib/styles/components/ColorBox.module.scss +0 -12
- package/lib/styles/components/ColorBox.module.scss.d.ts +0 -4
- package/lib/styles/components/Dialog.module.scss +0 -60
- package/lib/styles/components/Dialog.module.scss.d.ts +0 -10
- package/lib/styles/components/Dimmer.module.scss +0 -22
- package/lib/styles/components/Dimmer.module.scss.d.ts +0 -4
- package/lib/styles/components/Divider.module.scss +0 -27
- package/lib/styles/components/Divider.module.scss.d.ts +0 -6
- package/lib/styles/components/Dropdown.scss +0 -72
- package/lib/styles/components/Flex.module.scss +0 -13
- package/lib/styles/components/Flex.module.scss.d.ts +0 -5
- package/lib/styles/components/Icon.module.scss +0 -25
- package/lib/styles/components/Icon.module.scss.d.ts +0 -5
- package/lib/styles/components/Input.module.scss +0 -64
- package/lib/styles/components/Input.module.scss.d.ts +0 -8
- package/lib/styles/components/Knob.module.scss +0 -131
- package/lib/styles/components/Knob.module.scss.d.ts +0 -33
- package/lib/styles/components/LabeledList.module.scss +0 -49
- package/lib/styles/components/LabeledList.module.scss.d.ts +0 -8
- package/lib/styles/components/MenuBar.module.scss +0 -75
- package/lib/styles/components/MenuBar.module.scss.d.ts +0 -14
- package/lib/styles/components/Modal.module.scss +0 -14
- package/lib/styles/components/Modal.module.scss.d.ts +0 -4
- package/lib/styles/components/NoticeBox.module.scss +0 -65
- package/lib/styles/components/NoticeBox.module.scss.d.ts +0 -27
- package/lib/styles/components/NumberInput.module.scss +0 -71
- package/lib/styles/components/NumberInput.module.scss.d.ts +0 -9
- package/lib/styles/components/ProgressBar.module.scss +0 -63
- package/lib/styles/components/ProgressBar.module.scss.d.ts +0 -27
- package/lib/styles/components/RoundGauge.module.scss +0 -85
- package/lib/styles/components/RoundGauge.module.scss.d.ts +0 -49
- package/lib/styles/components/Section.module.scss +0 -130
- package/lib/styles/components/Section.module.scss.d.ts +0 -13
- package/lib/styles/components/Slider.module.scss +0 -54
- package/lib/styles/components/Slider.module.scss.d.ts +0 -8
- package/lib/styles/components/Stack.module.scss +0 -60
- package/lib/styles/components/Stack.module.scss.d.ts +0 -12
- package/lib/styles/components/Table.module.scss +0 -44
- package/lib/styles/components/Table.module.scss.d.ts +0 -10
- package/lib/styles/components/Tabs.module.scss +0 -144
- package/lib/styles/components/Tabs.module.scss.d.ts +0 -35
- package/lib/styles/components/TextArea.module.scss +0 -86
- package/lib/styles/components/TextArea.module.scss.d.ts +0 -11
- package/lib/styles/components/Tooltip.module.scss +0 -24
- package/lib/styles/components/Tooltip.module.scss.d.ts +0 -4
- package/lib/styles/functions.scss +0 -79
- package/lib/styles/input.scss +0 -9
- package/lib/styles/main.scss +0 -20
- package/lib/styles/reset.scss +0 -68
- /package/{lib/components/index.ts → dist/components/index.d.ts} +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { classes as o } from "../common/react.js";
|
|
3
|
+
import { computeBoxClassName as _ } from "./Box.js";
|
|
4
|
+
import { computeFlexClassName as f, computeFlexProps as w, computeFlexItemProps as n } from "./Flex.js";
|
|
5
|
+
import '../assets/Stack.css';const h = "_fill_wrul1_9", p = "_horizontal_wrul1_13", z = "_item_wrul1_13", x = "_vertical_wrul1_20", N = "_reverse_wrul1_27", b = "_reverse__vertical_wrul1_35", S = "_zebra_wrul1_43", k = "_divider_wrul1_47", F = "_divider__hidden_wrul1_47", e = {
|
|
6
|
+
fill: h,
|
|
7
|
+
horizontal: p,
|
|
8
|
+
item: z,
|
|
9
|
+
vertical: x,
|
|
10
|
+
reverse: N,
|
|
11
|
+
reverse__vertical: b,
|
|
12
|
+
zebra: S,
|
|
13
|
+
divider: k,
|
|
14
|
+
divider__hidden: F
|
|
15
|
+
};
|
|
16
|
+
function a(t) {
|
|
17
|
+
const { className: s, vertical: r, fill: i, reverse: c, zebra: d, ...v } = t, m = r ? "column" : "row", u = c ? "-reverse" : "";
|
|
18
|
+
return /* @__PURE__ */ l(
|
|
19
|
+
"div",
|
|
20
|
+
{
|
|
21
|
+
className: o([
|
|
22
|
+
i && e.fill,
|
|
23
|
+
r ? e.vertical : e.horizontal,
|
|
24
|
+
d && e.zebra,
|
|
25
|
+
c && e[`reverse${r ? "__vertical" : ""}`],
|
|
26
|
+
s,
|
|
27
|
+
f(t)
|
|
28
|
+
]),
|
|
29
|
+
...w({
|
|
30
|
+
direction: `${m}${u}`,
|
|
31
|
+
...v
|
|
32
|
+
})
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
function I(t) {
|
|
37
|
+
const { className: s, innerRef: r, ...i } = t;
|
|
38
|
+
return /* @__PURE__ */ l(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
className: o([e.item, s, _(i)]),
|
|
42
|
+
ref: r,
|
|
43
|
+
...n(i)
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
a.Item = I;
|
|
48
|
+
function P(t) {
|
|
49
|
+
const { className: s, hidden: r, ...i } = t;
|
|
50
|
+
return /* @__PURE__ */ l(
|
|
51
|
+
"div",
|
|
52
|
+
{
|
|
53
|
+
className: o([
|
|
54
|
+
e.item,
|
|
55
|
+
e.divider,
|
|
56
|
+
r && e.divider__hidden,
|
|
57
|
+
s,
|
|
58
|
+
_(i)
|
|
59
|
+
]),
|
|
60
|
+
...n(i)
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
a.Divider = P;
|
|
65
|
+
export {
|
|
66
|
+
a as Stack
|
|
67
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type Props = Partial<{
|
|
4
|
+
style: Record<string, any>;
|
|
5
|
+
textStyle: Record<string, any>;
|
|
6
|
+
title: ReactNode;
|
|
7
|
+
titleStyle: Record<string, any>;
|
|
8
|
+
titleSubtext: string;
|
|
9
|
+
}> & PropsWithChildren;
|
|
10
|
+
export declare function StyleableSection(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsxs as s, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { s as t } from "../Section.module-CLVHJ4yA.js";
|
|
3
|
+
import { Box as e } from "./Box.js";
|
|
4
|
+
function h(i) {
|
|
5
|
+
const { children: r, titleStyle: c, titleSubtext: n, title: o, textStyle: a, style: m } = i;
|
|
6
|
+
return /* @__PURE__ */ s(e, { style: m, children: [
|
|
7
|
+
/* @__PURE__ */ s(e, { className: t.title, style: c, children: [
|
|
8
|
+
/* @__PURE__ */ l(e, { className: t.titleText, style: a, children: o }),
|
|
9
|
+
/* @__PURE__ */ l("div", { className: t.buttons, children: n })
|
|
10
|
+
] }),
|
|
11
|
+
/* @__PURE__ */ l(e, { className: t.rest, children: /* @__PURE__ */ l(e, { className: t.content, children: r }) })
|
|
12
|
+
] });
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
h as StyleableSection
|
|
16
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BoxProps } from './Box';
|
|
2
|
+
|
|
3
|
+
type Props = Partial<{
|
|
4
|
+
/** Collapses table to the smallest possible size. */
|
|
5
|
+
collapsing: boolean;
|
|
6
|
+
}> & BoxProps;
|
|
7
|
+
export declare function Table(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare namespace Table {
|
|
9
|
+
var Row: typeof TableRow;
|
|
10
|
+
var Cell: typeof TableCell;
|
|
11
|
+
}
|
|
12
|
+
type RowProps = Partial<{
|
|
13
|
+
/** Whether this is a header cell. */
|
|
14
|
+
header: boolean;
|
|
15
|
+
}> & BoxProps;
|
|
16
|
+
export declare function TableRow(props: RowProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
type CellProps = Partial<{
|
|
18
|
+
/** Additional columns for this cell to expand, assuming there is room. */
|
|
19
|
+
colSpan: number;
|
|
20
|
+
/** Collapses table cell to the smallest possible size,
|
|
21
|
+
and stops any text inside from wrapping. */
|
|
22
|
+
collapsing: boolean;
|
|
23
|
+
/** Whether this is a header cell. */
|
|
24
|
+
header: boolean;
|
|
25
|
+
/** Rows for this cell to expand, assuming there is room. */
|
|
26
|
+
rowSpan: number;
|
|
27
|
+
}> & BoxProps;
|
|
28
|
+
export declare function TableCell(props: CellProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { classes as t } from "../common/react.js";
|
|
3
|
+
import { computeBoxClassName as n, computeBoxProps as r } from "./Box.js";
|
|
4
|
+
import '../assets/Table.css';const m = "_table_1hctn_5", d = "_collapsing_1hctn_13", p = "_row_1hctn_17", g = "_cell_1hctn_21", w = "_row__header_1hctn_32", b = "_cell__header_1hctn_33", u = "_cell__collapsing_1hctn_38", e = {
|
|
5
|
+
table: m,
|
|
6
|
+
collapsing: d,
|
|
7
|
+
row: p,
|
|
8
|
+
cell: g,
|
|
9
|
+
row__header: w,
|
|
10
|
+
cell__header: b,
|
|
11
|
+
cell__collapsing: u
|
|
12
|
+
};
|
|
13
|
+
function h(l) {
|
|
14
|
+
const { className: c, collapsing: o, children: _, ...a } = l;
|
|
15
|
+
return /* @__PURE__ */ s(
|
|
16
|
+
"table",
|
|
17
|
+
{
|
|
18
|
+
className: t([
|
|
19
|
+
e.table,
|
|
20
|
+
o && e.collapsing,
|
|
21
|
+
c,
|
|
22
|
+
n(a)
|
|
23
|
+
]),
|
|
24
|
+
...r(a),
|
|
25
|
+
children: /* @__PURE__ */ s("tbody", { children: _ })
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
function N(l) {
|
|
30
|
+
const { className: c, header: o, ..._ } = l;
|
|
31
|
+
return /* @__PURE__ */ s(
|
|
32
|
+
"tr",
|
|
33
|
+
{
|
|
34
|
+
className: t([
|
|
35
|
+
e.row,
|
|
36
|
+
o && e.row__header,
|
|
37
|
+
c,
|
|
38
|
+
n(l)
|
|
39
|
+
]),
|
|
40
|
+
...r(_)
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
h.Row = N;
|
|
45
|
+
function f(l) {
|
|
46
|
+
const { className: c, collapsing: o, colSpan: _, header: a, ...i } = l;
|
|
47
|
+
return /* @__PURE__ */ s(
|
|
48
|
+
"td",
|
|
49
|
+
{
|
|
50
|
+
className: t([
|
|
51
|
+
e.cell,
|
|
52
|
+
o && e.cell__collapsing,
|
|
53
|
+
a && e.cell__header,
|
|
54
|
+
c,
|
|
55
|
+
n(l)
|
|
56
|
+
]),
|
|
57
|
+
colSpan: _,
|
|
58
|
+
...r(i)
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
h.Cell = f;
|
|
63
|
+
export {
|
|
64
|
+
h as Table,
|
|
65
|
+
f as TableCell,
|
|
66
|
+
N as TableRow
|
|
67
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
import { BoxProps } from './Box';
|
|
3
|
+
|
|
4
|
+
type Props = Partial<{
|
|
5
|
+
className: string;
|
|
6
|
+
fill: boolean;
|
|
7
|
+
fluid: boolean;
|
|
8
|
+
vertical: boolean;
|
|
9
|
+
}> & BoxProps & PropsWithChildren;
|
|
10
|
+
type TabProps = Partial<{
|
|
11
|
+
className: string;
|
|
12
|
+
color: string;
|
|
13
|
+
icon: string;
|
|
14
|
+
leftSlot: ReactNode;
|
|
15
|
+
onClick: (e?: any) => void;
|
|
16
|
+
rightSlot: ReactNode;
|
|
17
|
+
selected: boolean;
|
|
18
|
+
}> & BoxProps & PropsWithChildren;
|
|
19
|
+
export declare function Tabs(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare namespace Tabs {
|
|
21
|
+
var Tab: (props: TabProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { jsx as o, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import { classes as h, canRender as i } from "../common/react.js";
|
|
3
|
+
import { computeBoxClassName as b, computeBoxProps as d } from "./Box.js";
|
|
4
|
+
import { Icon as m } from "./Icon.js";
|
|
5
|
+
import '../assets/Tabs.css';const v = "_tabs_9h380_13", p = "_fill_9h380_20", u = "_vertical_9h380_35", w = "_horizontal_9h380_40", x = "_tabs__tab_9h380_48", y = "_fluid_9h380_52", N = "_tab_9h380_13", k = "_selected_9h380_66", z = "_tab__text_9h380_75", T = "_tab__left_9h380_80", j = "_tab__right_9h380_86", B = "_color__black_9h380_113", S = "_color__white_9h380_125", C = "_color__red_9h380_137", I = "_color__orange_9h380_149", P = "_color__yellow_9h380_161", R = "_color__olive_9h380_173", q = "_color__green_9h380_185", A = "_color__teal_9h380_197", D = "_color__blue_9h380_209", E = "_color__violet_9h380_221", F = "_color__purple_9h380_233", G = "_color__pink_9h380_245", H = "_color__brown_9h380_257", J = "_color__grey_9h380_269", K = "_color__good_9h380_293", L = "_color__average_9h380_305", M = "_color__bad_9h380_317", O = "_color__label_9h380_329", _ = {
|
|
6
|
+
tabs: v,
|
|
7
|
+
fill: p,
|
|
8
|
+
vertical: u,
|
|
9
|
+
horizontal: w,
|
|
10
|
+
tabs__tab: x,
|
|
11
|
+
fluid: y,
|
|
12
|
+
tab: N,
|
|
13
|
+
selected: k,
|
|
14
|
+
tab__text: z,
|
|
15
|
+
tab__left: T,
|
|
16
|
+
tab__right: j,
|
|
17
|
+
color__black: B,
|
|
18
|
+
color__white: S,
|
|
19
|
+
color__red: C,
|
|
20
|
+
color__orange: I,
|
|
21
|
+
color__yellow: P,
|
|
22
|
+
color__olive: R,
|
|
23
|
+
color__green: q,
|
|
24
|
+
color__teal: A,
|
|
25
|
+
color__blue: D,
|
|
26
|
+
color__violet: E,
|
|
27
|
+
color__purple: F,
|
|
28
|
+
color__pink: G,
|
|
29
|
+
color__brown: H,
|
|
30
|
+
color__grey: J,
|
|
31
|
+
"color__light-grey": "_color__light-grey_9h380_281",
|
|
32
|
+
color__good: K,
|
|
33
|
+
color__average: L,
|
|
34
|
+
color__bad: M,
|
|
35
|
+
color__label: O
|
|
36
|
+
};
|
|
37
|
+
function Q(r) {
|
|
38
|
+
const { className: e, vertical: a, fill: s, fluid: c, children: t, ...l } = r;
|
|
39
|
+
return /* @__PURE__ */ o(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
className: h([
|
|
43
|
+
_.tabs,
|
|
44
|
+
a ? _.vertical : _.horizontal,
|
|
45
|
+
s && _.fill,
|
|
46
|
+
c && _.fluid,
|
|
47
|
+
e,
|
|
48
|
+
b(l)
|
|
49
|
+
]),
|
|
50
|
+
...d(l),
|
|
51
|
+
children: t
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
function U(r) {
|
|
56
|
+
const {
|
|
57
|
+
className: e,
|
|
58
|
+
selected: a,
|
|
59
|
+
color: s,
|
|
60
|
+
icon: c,
|
|
61
|
+
leftSlot: t,
|
|
62
|
+
rightSlot: l,
|
|
63
|
+
children: g,
|
|
64
|
+
...n
|
|
65
|
+
} = r;
|
|
66
|
+
return /* @__PURE__ */ f(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
className: h([
|
|
70
|
+
_.tab,
|
|
71
|
+
_.tabs__tab,
|
|
72
|
+
_["color__" + s],
|
|
73
|
+
a && _.selected,
|
|
74
|
+
e,
|
|
75
|
+
b(n)
|
|
76
|
+
]),
|
|
77
|
+
...d(n),
|
|
78
|
+
children: [
|
|
79
|
+
i(t) && /* @__PURE__ */ o("div", { className: _.tab__left, children: t }) || !!c && /* @__PURE__ */ o("div", { className: _.tab__left, children: /* @__PURE__ */ o(m, { name: c }) }),
|
|
80
|
+
/* @__PURE__ */ o("div", { className: _.tab__text, children: g }),
|
|
81
|
+
i(l) && /* @__PURE__ */ o("div", { className: _.tab__right, children: l })
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
Q.Tab = U;
|
|
87
|
+
export {
|
|
88
|
+
Q as Tabs
|
|
89
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { SyntheticEvent } from 'react';
|
|
2
|
+
|
|
3
|
+
export declare const TextArea: import('react').ForwardRefExoticComponent<Partial<{
|
|
4
|
+
autoFocus: boolean;
|
|
5
|
+
autoSelect: boolean;
|
|
6
|
+
displayedValue: string;
|
|
7
|
+
dontUseTabForIndent: boolean;
|
|
8
|
+
fluid: boolean;
|
|
9
|
+
maxLength: number;
|
|
10
|
+
noborder: boolean;
|
|
11
|
+
/** Fires when user is 'done typing': Clicked out, blur, enter key (but not shift+enter) */
|
|
12
|
+
onChange: (event: SyntheticEvent<HTMLTextAreaElement>, value: string) => void;
|
|
13
|
+
/** Fires once the enter key is pressed */
|
|
14
|
+
onEnter: (event: SyntheticEvent<HTMLTextAreaElement>, value: string) => void;
|
|
15
|
+
/** Fires once the escape key is pressed */
|
|
16
|
+
onEscape: (event: SyntheticEvent<HTMLTextAreaElement>) => void;
|
|
17
|
+
/** Fires on each key press / value change. Used for searching */
|
|
18
|
+
onInput: (event: SyntheticEvent<HTMLTextAreaElement>, value: string) => void;
|
|
19
|
+
placeholder: string;
|
|
20
|
+
scrollbar: boolean;
|
|
21
|
+
selfClear: boolean;
|
|
22
|
+
value: string;
|
|
23
|
+
}> & Partial<{
|
|
24
|
+
as: string;
|
|
25
|
+
children: import('react').ReactNode;
|
|
26
|
+
className: string | import('../common/react').BooleanLike;
|
|
27
|
+
style: import('react').CSSProperties;
|
|
28
|
+
}> & Partial<Record<"bold" | "italic" | "nowrap" | "fillPositionedParent" | "inline" | "preserveWhitespace", boolean>> & Partial<Record<"fontWeight" | "textAlign" | "bottom" | "fontFamily" | "fontSize" | "height" | "left" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "overflow" | "overflowX" | "overflowY" | "position" | "right" | "top" | "verticalAlign" | "width" | "color" | "backgroundColor" | "align" | "lineHeight" | "m" | "mb" | "ml" | "mr" | "mt" | "mx" | "my" | "p" | "pb" | "pl" | "pr" | "pt" | "px" | "py" | "textColor", string | import('../common/react').BooleanLike>> & Partial<{
|
|
29
|
+
onClick: import('react').MouseEventHandler<HTMLDivElement>;
|
|
30
|
+
onContextMenu: import('react').MouseEventHandler<HTMLDivElement>;
|
|
31
|
+
onDoubleClick: import('react').MouseEventHandler<HTMLDivElement>;
|
|
32
|
+
onKeyDown: import('react').KeyboardEventHandler<HTMLDivElement>;
|
|
33
|
+
onKeyUp: import('react').KeyboardEventHandler<HTMLDivElement>;
|
|
34
|
+
onMouseDown: import('react').MouseEventHandler<HTMLDivElement>;
|
|
35
|
+
onMouseMove: import('react').MouseEventHandler<HTMLDivElement>;
|
|
36
|
+
onMouseOver: import('react').MouseEventHandler<HTMLDivElement>;
|
|
37
|
+
onMouseUp: import('react').MouseEventHandler<HTMLDivElement>;
|
|
38
|
+
onScroll: import('react').UIEventHandler<HTMLDivElement>;
|
|
39
|
+
}> & import('react').RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { jsxs as I, jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Y, useRef as C, useState as H, useImperativeHandle as L, useEffect as g } from "react";
|
|
3
|
+
import { KEY as p } from "../common/keys.js";
|
|
4
|
+
import { classes as d } from "../common/react.js";
|
|
5
|
+
import { Box as P } from "./Box.js";
|
|
6
|
+
import { toInputValue as T } from "./Input.js";
|
|
7
|
+
import '../assets/TextArea.css';const U = "_textArea_1bert_20", $ = "_fluid_1bert_33", q = "_noborder_1bert_39", z = "_inner_1bert_43", G = "_scrollable_1bert_43", J = "_custom_1bert_78", M = "_nowrap_1bert_83", O = "_wrapper_1bert_89", e = {
|
|
8
|
+
textArea: U,
|
|
9
|
+
fluid: $,
|
|
10
|
+
noborder: q,
|
|
11
|
+
inner: z,
|
|
12
|
+
scrollable: G,
|
|
13
|
+
custom: J,
|
|
14
|
+
nowrap: M,
|
|
15
|
+
wrapper: O
|
|
16
|
+
}, er = Y(
|
|
17
|
+
(x, w) => {
|
|
18
|
+
const {
|
|
19
|
+
autoFocus: m,
|
|
20
|
+
autoSelect: l,
|
|
21
|
+
displayedValue: a,
|
|
22
|
+
dontUseTabForIndent: y,
|
|
23
|
+
maxLength: h,
|
|
24
|
+
noborder: A,
|
|
25
|
+
onChange: s,
|
|
26
|
+
onEnter: n,
|
|
27
|
+
onEscape: u,
|
|
28
|
+
onInput: c,
|
|
29
|
+
placeholder: N,
|
|
30
|
+
scrollbar: S,
|
|
31
|
+
selfClear: b,
|
|
32
|
+
value: i,
|
|
33
|
+
...E
|
|
34
|
+
} = x, { className: K, fluid: k, nowrap: D, ...R } = E, t = C(null), [V, j] = H(0);
|
|
35
|
+
function B(r) {
|
|
36
|
+
if (r.key === p.Enter) {
|
|
37
|
+
if (r.shiftKey) {
|
|
38
|
+
r.currentTarget.focus();
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
n == null || n(r, r.currentTarget.value), b && (r.currentTarget.value = ""), r.currentTarget.blur();
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (r.key === p.Escape) {
|
|
45
|
+
u == null || u(r), b ? r.currentTarget.value = "" : (r.currentTarget.value = T(i), r.currentTarget.blur());
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (!y && r.key === p.Tab) {
|
|
49
|
+
r.preventDefault();
|
|
50
|
+
const { value: o, selectionStart: _, selectionEnd: F } = r.currentTarget;
|
|
51
|
+
r.currentTarget.value = o.substring(0, _) + " " + o.substring(F), r.currentTarget.selectionEnd = _ + 1;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return L(
|
|
55
|
+
w,
|
|
56
|
+
() => t.current
|
|
57
|
+
), g(() => {
|
|
58
|
+
if (!m && !l) return;
|
|
59
|
+
const r = t.current;
|
|
60
|
+
r && (m || l) && setTimeout(() => {
|
|
61
|
+
r.focus(), l && r.select();
|
|
62
|
+
}, 1);
|
|
63
|
+
}, []), g(() => {
|
|
64
|
+
const r = t.current;
|
|
65
|
+
if (!r) return;
|
|
66
|
+
const o = T(i);
|
|
67
|
+
r.value !== o && (r.value = o);
|
|
68
|
+
}, [i]), /* @__PURE__ */ I(
|
|
69
|
+
P,
|
|
70
|
+
{
|
|
71
|
+
className: d([
|
|
72
|
+
e.textArea,
|
|
73
|
+
k && e.fluid,
|
|
74
|
+
A && e.noborder,
|
|
75
|
+
K
|
|
76
|
+
]),
|
|
77
|
+
...R,
|
|
78
|
+
children: [
|
|
79
|
+
!!a && /* @__PURE__ */ f("div", { className: e.wrapper, children: /* @__PURE__ */ f(
|
|
80
|
+
"div",
|
|
81
|
+
{
|
|
82
|
+
className: d([e.inner, e.custom]),
|
|
83
|
+
style: {
|
|
84
|
+
transform: `translateY(-${V}px)`
|
|
85
|
+
},
|
|
86
|
+
children: a
|
|
87
|
+
}
|
|
88
|
+
) }),
|
|
89
|
+
/* @__PURE__ */ f(
|
|
90
|
+
"textarea",
|
|
91
|
+
{
|
|
92
|
+
className: d([
|
|
93
|
+
e.inner,
|
|
94
|
+
S && e.scrollable,
|
|
95
|
+
D && e.nowrap
|
|
96
|
+
]),
|
|
97
|
+
maxLength: h,
|
|
98
|
+
onBlur: (r) => s == null ? void 0 : s(r, r.target.value),
|
|
99
|
+
onChange: (r) => c == null ? void 0 : c(r, r.target.value),
|
|
100
|
+
onKeyDown: B,
|
|
101
|
+
onScroll: () => {
|
|
102
|
+
a && t.current && j(t.current.scrollTop);
|
|
103
|
+
},
|
|
104
|
+
placeholder: N,
|
|
105
|
+
ref: t,
|
|
106
|
+
style: {
|
|
107
|
+
color: a ? "rgba(0, 0, 0, 0)" : "inherit"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
export {
|
|
117
|
+
er as TextArea
|
|
118
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Component as r } from "react";
|
|
2
|
+
import { formatTime as u } from "../common/format.js";
|
|
3
|
+
function s(e) {
|
|
4
|
+
return typeof e == "number" && Number.isFinite(e) && !Number.isNaN(e);
|
|
5
|
+
}
|
|
6
|
+
class o extends r {
|
|
7
|
+
constructor(t) {
|
|
8
|
+
super(t), this.timer = null, this.last_seen_value = void 0, this.state = {
|
|
9
|
+
value: 0
|
|
10
|
+
}, s(t.value) && (this.state.value = Number(t.value), this.last_seen_value = Number(t.value));
|
|
11
|
+
}
|
|
12
|
+
componentDidUpdate() {
|
|
13
|
+
this.props.auto !== void 0 && (clearInterval(this.timer), this.timer = setInterval(() => this.tick(), 1e3));
|
|
14
|
+
}
|
|
15
|
+
tick() {
|
|
16
|
+
let t = Number(this.state.value);
|
|
17
|
+
this.props.value !== this.last_seen_value && (this.last_seen_value = this.props.value, t = this.props.value);
|
|
18
|
+
const i = this.props.auto === "up" ? 10 : -10, a = Math.max(0, t + i);
|
|
19
|
+
this.setState({ value: a });
|
|
20
|
+
}
|
|
21
|
+
componentDidMount() {
|
|
22
|
+
this.props.auto !== void 0 && (this.timer = setInterval(() => this.tick(), 1e3));
|
|
23
|
+
}
|
|
24
|
+
componentWillUnmount() {
|
|
25
|
+
clearInterval(this.timer);
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
const t = this.state.value;
|
|
29
|
+
return s(t) ? u(t) : this.state.value || null;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
o as TimeDisplay
|
|
34
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createPopper, Placement, VirtualElement } from '@popperjs/core';
|
|
2
|
+
import { Component, ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
type Props = {
|
|
5
|
+
/** The content to display in the tooltip */
|
|
6
|
+
content: ReactNode;
|
|
7
|
+
} & Partial<{
|
|
8
|
+
/** Hovering this element will show the tooltip */
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
/** Where to place the tooltip relative to the reference element */
|
|
11
|
+
position: Placement;
|
|
12
|
+
}>;
|
|
13
|
+
type State = {
|
|
14
|
+
hovered: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare class Tooltip extends Component<Props, State> {
|
|
17
|
+
static renderedTooltip: HTMLDivElement | undefined;
|
|
18
|
+
static singletonPopper: ReturnType<typeof createPopper> | undefined;
|
|
19
|
+
static currentHoveredElement: Element | undefined;
|
|
20
|
+
static virtualElement: VirtualElement;
|
|
21
|
+
getDOMNode(): Element;
|
|
22
|
+
componentDidMount(): void;
|
|
23
|
+
fadeOut(): void;
|
|
24
|
+
renderPopperContent(): void;
|
|
25
|
+
componentDidUpdate(): void;
|
|
26
|
+
componentWillUnmount(): void;
|
|
27
|
+
render(): ReactNode;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import '../assets/Tooltip.css';var s = Object.defineProperty;
|
|
2
|
+
var p = (o, e, n) => e in o ? s(o, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : o[e] = n;
|
|
3
|
+
var r = (o, e, n) => p(o, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
5
|
+
import { Component as c } from "react";
|
|
6
|
+
import { findDOMNode as m, render as a } from "react-dom";
|
|
7
|
+
import { c as u } from "../popper-CiqSDJTE.js";
|
|
8
|
+
const h = "_tooltip_1pib4_13", f = {
|
|
9
|
+
tooltip: h
|
|
10
|
+
}, i = {
|
|
11
|
+
modifiers: [
|
|
12
|
+
{
|
|
13
|
+
name: "eventListeners",
|
|
14
|
+
enabled: !1
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}, v = {
|
|
18
|
+
width: 0,
|
|
19
|
+
height: 0,
|
|
20
|
+
top: 0,
|
|
21
|
+
right: 0,
|
|
22
|
+
bottom: 0,
|
|
23
|
+
left: 0,
|
|
24
|
+
x: 0,
|
|
25
|
+
y: 0,
|
|
26
|
+
toJSON: () => null
|
|
27
|
+
}, t = class t extends c {
|
|
28
|
+
getDOMNode() {
|
|
29
|
+
return m(this);
|
|
30
|
+
}
|
|
31
|
+
componentDidMount() {
|
|
32
|
+
const e = this.getDOMNode();
|
|
33
|
+
e && (e.addEventListener("mouseenter", () => {
|
|
34
|
+
let n = t.renderedTooltip;
|
|
35
|
+
n === void 0 && (n = document.createElement("div"), n.className = f.tooltip, document.body.appendChild(n), t.renderedTooltip = n), t.currentHoveredElement = e, n.style.opacity = "1", this.renderPopperContent();
|
|
36
|
+
}), e.addEventListener("mouseleave", () => {
|
|
37
|
+
this.fadeOut();
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
40
|
+
fadeOut() {
|
|
41
|
+
t.currentHoveredElement === this.getDOMNode() && (t.currentHoveredElement = void 0, t.renderedTooltip.style.opacity = "0");
|
|
42
|
+
}
|
|
43
|
+
renderPopperContent() {
|
|
44
|
+
const e = t.renderedTooltip;
|
|
45
|
+
e && a(/* @__PURE__ */ l("span", { children: this.props.content }), e, () => {
|
|
46
|
+
let n = t.singletonPopper;
|
|
47
|
+
n === void 0 ? (n = u(
|
|
48
|
+
t.virtualElement,
|
|
49
|
+
e,
|
|
50
|
+
{
|
|
51
|
+
...i,
|
|
52
|
+
placement: this.props.position || "auto"
|
|
53
|
+
}
|
|
54
|
+
), t.singletonPopper = n) : (n.setOptions({
|
|
55
|
+
...i,
|
|
56
|
+
placement: this.props.position || "auto"
|
|
57
|
+
}), n.update());
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
componentDidUpdate() {
|
|
61
|
+
t.currentHoveredElement === this.getDOMNode() && this.renderPopperContent();
|
|
62
|
+
}
|
|
63
|
+
componentWillUnmount() {
|
|
64
|
+
this.fadeOut();
|
|
65
|
+
}
|
|
66
|
+
render() {
|
|
67
|
+
return this.props.children;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
// Mounting poppers is really laggy because popper.js is very slow.
|
|
71
|
+
// Thus, instead of using the Popper component, Tooltip creates ONE popper
|
|
72
|
+
// and stores every tooltip inside that.
|
|
73
|
+
// This means you can never have two tooltips at once, for instance.
|
|
74
|
+
r(t, "renderedTooltip"), r(t, "singletonPopper"), r(t, "currentHoveredElement"), r(t, "virtualElement", {
|
|
75
|
+
getBoundingClientRect: () => {
|
|
76
|
+
var e;
|
|
77
|
+
return ((e = t.currentHoveredElement) == null ? void 0 : e.getBoundingClientRect()) ?? v;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
let d = t;
|
|
81
|
+
export {
|
|
82
|
+
d as Tooltip
|
|
83
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Component, PropsWithChildren } from 'react';
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
onOutsideClick: () => void;
|
|
5
|
+
} & PropsWithChildren;
|
|
6
|
+
export declare class TrackOutsideClicks extends Component<Props> {
|
|
7
|
+
ref: import('react').RefObject<HTMLDivElement>;
|
|
8
|
+
constructor(props: any);
|
|
9
|
+
componentWillUnmount(): void;
|
|
10
|
+
handleOutsideClick(event: MouseEvent): void;
|
|
11
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var n = Object.defineProperty;
|
|
2
|
+
var s = (i, t, e) => t in i ? n(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
|
+
var r = (i, t, e) => s(i, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
5
|
+
import { Component as d, createRef as o } from "react";
|
|
6
|
+
class a extends d {
|
|
7
|
+
constructor(e) {
|
|
8
|
+
super(e);
|
|
9
|
+
r(this, "ref", o());
|
|
10
|
+
this.handleOutsideClick = this.handleOutsideClick.bind(this), document.addEventListener("click", this.handleOutsideClick);
|
|
11
|
+
}
|
|
12
|
+
componentWillUnmount() {
|
|
13
|
+
document.removeEventListener("click", this.handleOutsideClick);
|
|
14
|
+
}
|
|
15
|
+
handleOutsideClick(e) {
|
|
16
|
+
e.target instanceof Node && this.ref.current && !this.ref.current.contains(e.target) && this.props.onOutsideClick();
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
return /* @__PURE__ */ c("div", { ref: this.ref, children: this.props.children });
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
a as TrackOutsideClicks
|
|
24
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A vertical list that renders items to fill space up to the extents of the
|
|
5
|
+
* current window, and then defers rendering of other items until they come
|
|
6
|
+
* into view.
|
|
7
|
+
*/
|
|
8
|
+
export declare function VirtualList(props: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|