tgui-core 1.1.7 → 1.1.9
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/lib/common/assets.ts +38 -0
- package/lib/common/collections.ts +27 -0
- package/lib/common/color.ts +88 -0
- package/lib/common/constants.ts +349 -0
- package/lib/common/events.ts +262 -0
- package/{dist/common/exhaustive.d.ts → lib/common/exhaustive.ts} +3 -1
- package/lib/common/format.ts +167 -0
- package/{dist/common/fp.d.ts → lib/common/fp.ts} +16 -2
- package/lib/common/hotkeys.ts +207 -0
- package/lib/common/http.ts +16 -0
- package/lib/common/keycodes.ts +86 -0
- package/{dist/common/keys.d.ts → lib/common/keys.ts} +24 -21
- package/lib/common/math.ts +76 -0
- package/lib/common/perf.ts +72 -0
- package/lib/common/random.ts +32 -0
- package/lib/common/react.ts +59 -0
- package/lib/common/redux.ts +187 -0
- package/lib/common/storage.ts +207 -0
- package/lib/common/string.ts +169 -0
- package/lib/common/timer.ts +63 -0
- package/lib/common/type-utils.ts +41 -0
- package/lib/common/types.d.ts +12 -0
- package/lib/common/uuid.ts +18 -0
- package/lib/components/AnimatedNumber.tsx +180 -0
- package/lib/components/Autofocus.tsx +23 -0
- package/lib/components/Blink.tsx +91 -0
- package/lib/components/BlockQuote.tsx +9 -0
- package/lib/components/BodyZoneSelector.tsx +149 -0
- package/lib/components/Box.tsx +252 -0
- package/lib/components/Button.tsx +425 -0
- package/lib/components/ByondUi.jsx +110 -0
- package/lib/components/Chart.tsx +155 -0
- package/lib/components/Collapsible.tsx +43 -0
- package/lib/components/ColorBox.tsx +29 -0
- package/lib/components/Dialog.tsx +81 -0
- package/lib/components/Dimmer.tsx +13 -0
- package/lib/components/Divider.tsx +20 -0
- package/lib/components/DmIcon.tsx +86 -0
- package/lib/components/DraggableControl.jsx +276 -0
- package/lib/components/Dropdown.tsx +246 -0
- package/lib/components/FakeTerminal.jsx +52 -0
- package/lib/components/FitText.tsx +99 -0
- package/lib/components/Flex.tsx +159 -0
- package/lib/components/Icon.tsx +95 -0
- package/lib/components/Image.tsx +54 -0
- package/lib/components/InfinitePlane.jsx +192 -0
- package/lib/components/Input.tsx +176 -0
- package/lib/components/KeyListener.tsx +40 -0
- package/lib/components/Knob.tsx +178 -0
- package/lib/components/LabeledControls.tsx +44 -0
- package/lib/components/LabeledList.tsx +154 -0
- package/lib/components/MenuBar.tsx +228 -0
- package/lib/components/Modal.tsx +23 -0
- package/lib/components/NoticeBox.tsx +45 -0
- package/lib/components/NumberInput.tsx +328 -0
- package/lib/components/Popper.tsx +100 -0
- package/lib/components/ProgressBar.tsx +105 -0
- package/lib/components/RestrictedInput.jsx +301 -0
- package/lib/components/RoundGauge.tsx +180 -0
- package/lib/components/Section.tsx +120 -0
- package/lib/components/Slider.tsx +169 -0
- package/lib/components/Stack.tsx +96 -0
- package/lib/components/StyleableSection.tsx +33 -0
- package/lib/components/Table.tsx +84 -0
- package/lib/components/Tabs.tsx +89 -0
- package/lib/components/TextArea.tsx +182 -0
- package/lib/components/TimeDisplay.jsx +64 -0
- package/lib/components/Tooltip.tsx +152 -0
- package/lib/components/TrackOutsideClicks.tsx +35 -0
- package/lib/components/VirtualList.tsx +69 -0
- package/lib/styles/atomic/candystripe.scss +8 -0
- package/lib/styles/atomic/centered-image.scss +7 -0
- package/lib/styles/atomic/color.scss +21 -0
- package/lib/styles/atomic/debug-layout.scss +17 -0
- package/lib/styles/atomic/fit-text.scss +14 -0
- package/lib/styles/atomic/links.scss +12 -0
- package/lib/styles/atomic/outline.scss +47 -0
- package/lib/styles/atomic/text.scss +44 -0
- package/lib/styles/base.scss +32 -0
- package/lib/styles/colors.scss +92 -0
- package/lib/styles/components/BlockQuote.module.scss +20 -0
- package/lib/styles/components/BlockQuote.module.scss.d.ts +4 -0
- package/lib/styles/components/Button.module.scss +157 -0
- package/lib/styles/components/Button.module.scss.d.ts +46 -0
- package/lib/styles/components/ColorBox.module.scss +12 -0
- package/lib/styles/components/ColorBox.module.scss.d.ts +4 -0
- package/lib/styles/components/Dialog.module.scss +60 -0
- package/lib/styles/components/Dialog.module.scss.d.ts +10 -0
- package/lib/styles/components/Dimmer.module.scss +22 -0
- package/lib/styles/components/Dimmer.module.scss.d.ts +4 -0
- package/lib/styles/components/Divider.module.scss +27 -0
- package/lib/styles/components/Divider.module.scss.d.ts +6 -0
- package/lib/styles/components/Dropdown.scss +72 -0
- package/lib/styles/components/Flex.module.scss +13 -0
- package/lib/styles/components/Flex.module.scss.d.ts +5 -0
- package/lib/styles/components/Icon.module.scss +25 -0
- package/lib/styles/components/Icon.module.scss.d.ts +5 -0
- package/lib/styles/components/Input.module.scss +64 -0
- package/lib/styles/components/Input.module.scss.d.ts +8 -0
- package/lib/styles/components/Knob.module.scss +131 -0
- package/lib/styles/components/Knob.module.scss.d.ts +33 -0
- package/lib/styles/components/LabeledList.module.scss +49 -0
- package/lib/styles/components/LabeledList.module.scss.d.ts +8 -0
- package/lib/styles/components/MenuBar.module.scss +75 -0
- package/lib/styles/components/MenuBar.module.scss.d.ts +14 -0
- package/lib/styles/components/Modal.module.scss +14 -0
- package/lib/styles/components/Modal.module.scss.d.ts +4 -0
- package/lib/styles/components/NoticeBox.module.scss +65 -0
- package/lib/styles/components/NoticeBox.module.scss.d.ts +27 -0
- package/lib/styles/components/NumberInput.module.scss +71 -0
- package/lib/styles/components/NumberInput.module.scss.d.ts +9 -0
- package/lib/styles/components/ProgressBar.module.scss +63 -0
- package/lib/styles/components/ProgressBar.module.scss.d.ts +27 -0
- package/lib/styles/components/RoundGauge.module.scss +85 -0
- package/lib/styles/components/RoundGauge.module.scss.d.ts +49 -0
- package/lib/styles/components/Section.module.scss +130 -0
- package/lib/styles/components/Section.module.scss.d.ts +13 -0
- package/lib/styles/components/Slider.module.scss +54 -0
- package/lib/styles/components/Slider.module.scss.d.ts +8 -0
- package/lib/styles/components/Stack.module.scss +60 -0
- package/lib/styles/components/Stack.module.scss.d.ts +12 -0
- package/lib/styles/components/Table.module.scss +44 -0
- package/lib/styles/components/Table.module.scss.d.ts +10 -0
- package/lib/styles/components/Tabs.module.scss +144 -0
- package/lib/styles/components/Tabs.module.scss.d.ts +35 -0
- package/lib/styles/components/TextArea.module.scss +86 -0
- package/lib/styles/components/TextArea.module.scss.d.ts +11 -0
- package/lib/styles/components/Tooltip.module.scss +24 -0
- package/lib/styles/components/Tooltip.module.scss.d.ts +4 -0
- package/lib/styles/functions.scss +79 -0
- package/lib/styles/input.scss +9 -0
- package/lib/styles/main.scss +20 -0
- package/lib/styles/reset.scss +68 -0
- package/package.json +6 -6
- package/dist/ProgressBar.module-BkAFfFy0.js +0 -29
- package/dist/Section.module-CLVHJ4yA.js +0 -15
- package/dist/assets/BlockQuote.css +0 -1
- package/dist/assets/Button.css +0 -1
- package/dist/assets/ColorBox.css +0 -1
- package/dist/assets/Dialog.css +0 -1
- package/dist/assets/Dimmer.css +0 -1
- package/dist/assets/Divider.css +0 -1
- package/dist/assets/Flex.css +0 -1
- package/dist/assets/Icon.css +0 -6
- package/dist/assets/Input.css +0 -1
- package/dist/assets/Knob.css +0 -1
- package/dist/assets/LabeledList.css +0 -1
- package/dist/assets/MenuBar.css +0 -1
- package/dist/assets/Modal.css +0 -1
- package/dist/assets/NoticeBox.css +0 -1
- package/dist/assets/NumberInput.css +0 -1
- package/dist/assets/ProgressBar.css +0 -1
- package/dist/assets/RoundGauge.css +0 -1
- package/dist/assets/Section.css +0 -1
- package/dist/assets/Slider.css +0 -1
- package/dist/assets/Stack.css +0 -1
- package/dist/assets/Table.css +0 -1
- package/dist/assets/Tabs.css +0 -1
- package/dist/assets/TextArea.css +0 -1
- package/dist/assets/Tooltip.css +0 -1
- package/dist/common/assets.d.ts +0 -4
- package/dist/common/assets.js +0 -21
- package/dist/common/collections.d.ts +0 -10
- package/dist/common/collections.js +0 -15
- package/dist/common/color.d.ts +0 -25
- package/dist/common/color.js +0 -69
- package/dist/common/constants.d.ts +0 -102
- package/dist/common/constants.js +0 -312
- package/dist/common/events.d.ts +0 -33
- package/dist/common/events.js +0 -147
- package/dist/common/exhaustive.js +0 -6
- package/dist/common/format.d.ts +0 -11
- package/dist/common/format.js +0 -114
- package/dist/common/fp.js +0 -9
- package/dist/common/hotkeys.d.ts +0 -25
- package/dist/common/hotkeys.js +0 -112
- package/dist/common/http.d.ts +0 -4
- package/dist/common/http.js +0 -10
- package/dist/common/keycodes.d.ts +0 -85
- package/dist/common/keycodes.js +0 -88
- package/dist/common/keys.js +0 -8
- package/dist/common/math.d.ts +0 -39
- package/dist/common/math.js +0 -41
- package/dist/common/perf.d.ts +0 -24
- package/dist/common/perf.js +0 -33
- package/dist/common/random.d.ts +0 -16
- package/dist/common/random.js +0 -18
- package/dist/common/react.d.ts +0 -23
- package/dist/common/react.js +0 -30
- package/dist/common/redux.d.ts +0 -64
- package/dist/common/redux.js +0 -72
- package/dist/common/storage.js +0 -124
- package/dist/common/string.d.ts +0 -65
- package/dist/common/string.js +0 -83
- package/dist/common/timer.d.ts +0 -18
- package/dist/common/timer.js +0 -28
- package/dist/common/type-utils.d.ts +0 -9
- package/dist/common/type-utils.js +0 -25
- package/dist/common/uuid.d.ts +0 -9
- package/dist/common/uuid.js +0 -10
- package/dist/components/AnimatedNumber.d.ts +0 -60
- package/dist/components/AnimatedNumber.js +0 -76
- package/dist/components/Autofocus.d.ts +0 -4
- package/dist/components/Autofocus.js +0 -17
- package/dist/components/Blink.d.ts +0 -26
- package/dist/components/Blink.js +0 -56
- package/dist/components/BlockQuote.d.ts +0 -3
- package/dist/components/BlockQuote.js +0 -13
- package/dist/components/BodyZoneSelector.d.ts +0 -28
- package/dist/components/BodyZoneSelector.js +0 -115
- package/dist/components/Box.d.ts +0 -91
- package/dist/components/Box.js +0 -133
- package/dist/components/Button.d.ts +0 -93
- package/dist/components/Button.js +0 -298
- package/dist/components/ByondUi.js +0 -73
- package/dist/components/Chart.d.ts +0 -28
- package/dist/components/Chart.js +0 -95
- package/dist/components/Collapsible.d.ts +0 -15
- package/dist/components/Collapsible.js +0 -27
- package/dist/components/ColorBox.d.ts +0 -8
- package/dist/components/ColorBox.js +0 -24
- package/dist/components/Dialog.d.ts +0 -24
- package/dist/components/Dialog.js +0 -67
- package/dist/components/Dimmer.d.ts +0 -3
- package/dist/components/Dimmer.js +0 -13
- package/dist/components/Divider.d.ts +0 -6
- package/dist/components/Divider.js +0 -22
- package/dist/components/DmIcon.d.ts +0 -31
- package/dist/components/DmIcon.js +0 -31
- package/dist/components/DraggableControl.js +0 -176
- package/dist/components/Dropdown.d.ts +0 -48
- package/dist/components/Dropdown.js +0 -152
- package/dist/components/FakeTerminal.js +0 -38
- package/dist/components/FitText.d.ts +0 -22
- package/dist/components/FitText.js +0 -63
- package/dist/components/Flex.d.ts +0 -93
- package/dist/components/Flex.js +0 -72
- package/dist/components/Icon.d.ts +0 -30
- package/dist/components/Icon.js +0 -51
- package/dist/components/Image.d.ts +0 -14
- package/dist/components/Image.js +0 -35
- package/dist/components/InfinitePlane.js +0 -139
- package/dist/components/Input.d.ts +0 -61
- package/dist/components/Input.js +0 -89
- package/dist/components/KeyListener.d.ts +0 -15
- package/dist/components/KeyListener.js +0 -23
- package/dist/components/Knob.d.ts +0 -49
- package/dist/components/Knob.js +0 -162
- package/dist/components/LabeledControls.d.ts +0 -11
- package/dist/components/LabeledControls.js +0 -39
- package/dist/components/LabeledList.d.ts +0 -57
- package/dist/components/LabeledList.js +0 -94
- package/dist/components/MenuBar.d.ts +0 -28
- package/dist/components/MenuBar.js +0 -174
- package/dist/components/Modal.d.ts +0 -3
- package/dist/components/Modal.js +0 -25
- package/dist/components/NoticeBox.d.ts +0 -20
- package/dist/components/NoticeBox.js +0 -49
- package/dist/components/NumberInput.d.ts +0 -45
- package/dist/components/NumberInput.js +0 -221
- package/dist/components/Popper.d.ts +0 -27
- package/dist/components/Popper.js +0 -177
- package/dist/components/ProgressBar.d.ts +0 -46
- package/dist/components/ProgressBar.js +0 -37
- package/dist/components/RestrictedInput.js +0 -155
- package/dist/components/RoundGauge.d.ts +0 -53
- package/dist/components/RoundGauge.js +0 -147
- package/dist/components/Section.d.ts +0 -63
- package/dist/components/Section.js +0 -62
- package/dist/components/Slider.d.ts +0 -46
- package/dist/components/Slider.js +0 -124
- package/dist/components/Stack.d.ts +0 -27
- package/dist/components/Stack.js +0 -67
- package/dist/components/StyleableSection.d.ts +0 -11
- package/dist/components/StyleableSection.js +0 -16
- package/dist/components/Table.d.ts +0 -29
- package/dist/components/Table.js +0 -67
- package/dist/components/Tabs.d.ts +0 -23
- package/dist/components/Tabs.js +0 -89
- package/dist/components/TextArea.d.ts +0 -39
- package/dist/components/TextArea.js +0 -118
- package/dist/components/TimeDisplay.js +0 -34
- package/dist/components/Tooltip.d.ts +0 -29
- package/dist/components/Tooltip.js +0 -83
- package/dist/components/TrackOutsideClicks.d.ts +0 -13
- package/dist/components/TrackOutsideClicks.js +0 -24
- package/dist/components/VirtualList.d.ts +0 -8
- package/dist/components/VirtualList.js +0 -34
- package/dist/components/index.js +0 -92
- package/dist/popper-CiqSDJTE.js +0 -906
- /package/{dist/components/index.d.ts → lib/components/index.ts} +0 -0
package/dist/components/Stack.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
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 {};
|
package/dist/components/Table.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
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 {};
|
package/dist/components/Tabs.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
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>>;
|
|
@@ -1,118 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,83 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
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;
|