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
|
@@ -1,298 +0,0 @@
|
|
|
1
|
-
import { jsx as l, jsxs as E, Fragment as S } from "react/jsx-runtime";
|
|
2
|
-
import { useState as F, createRef as K, useEffect as M, useRef as V } from "react";
|
|
3
|
-
import { KEY as I } from "../common/keys.js";
|
|
4
|
-
import { classes as R } from "../common/react.js";
|
|
5
|
-
import { computeBoxClassName as j, computeBoxProps as q, Box as O } from "./Box.js";
|
|
6
|
-
import { Icon as D } from "./Icon.js";
|
|
7
|
-
import { Tooltip as P } from "./Tooltip.js";
|
|
8
|
-
import '../assets/Button.css';const T = "_button_433yx_17", L = "_fa_433yx_34", Y = "_fas_433yx_35", z = "_far_433yx_36", G = "_dropdown_433yx_43", H = "_ellipsis_433yx_49", J = "_fluid_433yx_54", Q = "_circular_433yx_60", U = "_compact_433yx_64", W = "_color__black_433yx_69", X = "_color__white_433yx_82", Z = "_color__red_433yx_95", $ = "_color__orange_433yx_108", oo = "_color__yellow_433yx_121", to = "_color__olive_433yx_134", _o = "_color__green_433yx_147", no = "_color__teal_433yx_160", eo = "_color__blue_433yx_173", lo = "_color__violet_433yx_186", co = "_color__purple_433yx_199", ro = "_color__pink_433yx_212", io = "_color__brown_433yx_225", so = "_color__grey_433yx_238", ao = "_color__good_433yx_264", uo = "_color__average_433yx_277", fo = "_color__bad_433yx_290", po = "_color__label_433yx_303", yo = "_color__default_433yx_316", xo = "_color__caution_433yx_329", mo = "_color__danger_433yx_342", go = "_color__transparent_433yx_355", bo = "_disabled_433yx_370", ho = "_selected_433yx_374", Co = "_flex_433yx_387", ko = "_flex__fluid_433yx_392", vo = "_verticalAlignContent__top_433yx_396", wo = "_verticalAlignContent__middle_433yx_400", Ao = "_verticalAlignContent__bottom_433yx_404", Bo = "_content_433yx_408", Io = "_textMargin_433yx_413", _ = {
|
|
9
|
-
button: T,
|
|
10
|
-
fa: L,
|
|
11
|
-
fas: Y,
|
|
12
|
-
far: z,
|
|
13
|
-
dropdown: G,
|
|
14
|
-
ellipsis: H,
|
|
15
|
-
fluid: J,
|
|
16
|
-
circular: Q,
|
|
17
|
-
compact: U,
|
|
18
|
-
color__black: W,
|
|
19
|
-
color__white: X,
|
|
20
|
-
color__red: Z,
|
|
21
|
-
color__orange: $,
|
|
22
|
-
color__yellow: oo,
|
|
23
|
-
color__olive: to,
|
|
24
|
-
color__green: _o,
|
|
25
|
-
color__teal: no,
|
|
26
|
-
color__blue: eo,
|
|
27
|
-
color__violet: lo,
|
|
28
|
-
color__purple: co,
|
|
29
|
-
color__pink: ro,
|
|
30
|
-
color__brown: io,
|
|
31
|
-
color__grey: so,
|
|
32
|
-
"color__light-grey": "_color__light-grey_433yx_251",
|
|
33
|
-
color__good: ao,
|
|
34
|
-
color__average: uo,
|
|
35
|
-
color__bad: fo,
|
|
36
|
-
color__label: po,
|
|
37
|
-
color__default: yo,
|
|
38
|
-
color__caution: xo,
|
|
39
|
-
color__danger: mo,
|
|
40
|
-
color__transparent: go,
|
|
41
|
-
disabled: bo,
|
|
42
|
-
selected: ho,
|
|
43
|
-
flex: Co,
|
|
44
|
-
flex__fluid: ko,
|
|
45
|
-
verticalAlignContent__top: vo,
|
|
46
|
-
verticalAlignContent__middle: wo,
|
|
47
|
-
verticalAlignContent__bottom: Ao,
|
|
48
|
-
content: Bo,
|
|
49
|
-
textMargin: Io
|
|
50
|
-
};
|
|
51
|
-
function m(u) {
|
|
52
|
-
const {
|
|
53
|
-
captureKeys: s = !0,
|
|
54
|
-
children: a,
|
|
55
|
-
circular: p,
|
|
56
|
-
className: f,
|
|
57
|
-
color: i,
|
|
58
|
-
compact: g,
|
|
59
|
-
content: y,
|
|
60
|
-
disabled: o,
|
|
61
|
-
ellipsis: c,
|
|
62
|
-
fluid: n,
|
|
63
|
-
icon: e,
|
|
64
|
-
iconColor: d,
|
|
65
|
-
iconPosition: v,
|
|
66
|
-
iconRotation: w,
|
|
67
|
-
iconSpin: N,
|
|
68
|
-
onClick: b,
|
|
69
|
-
selected: h,
|
|
70
|
-
tooltip: x,
|
|
71
|
-
tooltipPosition: A,
|
|
72
|
-
verticalAlignContent: C,
|
|
73
|
-
...B
|
|
74
|
-
} = u, k = y || a;
|
|
75
|
-
let t = /* @__PURE__ */ l(
|
|
76
|
-
"div",
|
|
77
|
-
{
|
|
78
|
-
className: R([
|
|
79
|
-
_.button,
|
|
80
|
-
n && _.fluid,
|
|
81
|
-
o && _.disabled,
|
|
82
|
-
h && _.selected,
|
|
83
|
-
p && _.circular,
|
|
84
|
-
g && _.compact,
|
|
85
|
-
C && _.flex,
|
|
86
|
-
C && n && _.flex__fluid,
|
|
87
|
-
C && _["verticalAlignContent__" + C],
|
|
88
|
-
i && typeof i == "string" ? _["color__" + i] : _.color__default,
|
|
89
|
-
f,
|
|
90
|
-
j(B)
|
|
91
|
-
]),
|
|
92
|
-
tabIndex: o ? void 0 : 0,
|
|
93
|
-
onClick: (r) => {
|
|
94
|
-
!o && b && b(r);
|
|
95
|
-
},
|
|
96
|
-
onKeyDown: (r) => {
|
|
97
|
-
if (s) {
|
|
98
|
-
if (r.key === I.Space || r.key === I.Enter) {
|
|
99
|
-
r.preventDefault(), !o && b && b(r);
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
r.key === I.Escape && r.preventDefault();
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
...q(B),
|
|
106
|
-
children: /* @__PURE__ */ E("div", { className: _.content, children: [
|
|
107
|
-
e && v !== "right" && /* @__PURE__ */ l(
|
|
108
|
-
D,
|
|
109
|
-
{
|
|
110
|
-
mr: 1,
|
|
111
|
-
name: e,
|
|
112
|
-
color: d,
|
|
113
|
-
rotation: w,
|
|
114
|
-
spin: N
|
|
115
|
-
}
|
|
116
|
-
),
|
|
117
|
-
c ? /* @__PURE__ */ l(
|
|
118
|
-
"span",
|
|
119
|
-
{
|
|
120
|
-
className: R([_.ellipsis, e && _.textMargin]),
|
|
121
|
-
children: k
|
|
122
|
-
}
|
|
123
|
-
) : k,
|
|
124
|
-
e && v === "right" && /* @__PURE__ */ l(
|
|
125
|
-
D,
|
|
126
|
-
{
|
|
127
|
-
ml: 1,
|
|
128
|
-
name: e,
|
|
129
|
-
color: d,
|
|
130
|
-
rotation: w,
|
|
131
|
-
spin: N
|
|
132
|
-
}
|
|
133
|
-
)
|
|
134
|
-
] })
|
|
135
|
-
}
|
|
136
|
-
);
|
|
137
|
-
return x && (t = /* @__PURE__ */ l(P, { content: x, position: A, children: t })), t;
|
|
138
|
-
}
|
|
139
|
-
function No(u) {
|
|
140
|
-
const { checked: s, ...a } = u;
|
|
141
|
-
return /* @__PURE__ */ l(
|
|
142
|
-
m,
|
|
143
|
-
{
|
|
144
|
-
color: "transparent",
|
|
145
|
-
icon: s ? "check-square-o" : "square-o",
|
|
146
|
-
selected: s,
|
|
147
|
-
...a
|
|
148
|
-
}
|
|
149
|
-
);
|
|
150
|
-
}
|
|
151
|
-
m.Checkbox = No;
|
|
152
|
-
function Ro(u) {
|
|
153
|
-
const {
|
|
154
|
-
children: s,
|
|
155
|
-
color: a,
|
|
156
|
-
confirmColor: p = "bad",
|
|
157
|
-
confirmContent: f = "Confirm?",
|
|
158
|
-
confirmIcon: i,
|
|
159
|
-
ellipsis: g = !0,
|
|
160
|
-
icon: y,
|
|
161
|
-
onClick: o,
|
|
162
|
-
...c
|
|
163
|
-
} = u, [n, e] = F(!1);
|
|
164
|
-
function d(v) {
|
|
165
|
-
if (!n) {
|
|
166
|
-
e(!0);
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
o == null || o(v), e(!1);
|
|
170
|
-
}
|
|
171
|
-
return /* @__PURE__ */ l(
|
|
172
|
-
m,
|
|
173
|
-
{
|
|
174
|
-
icon: n ? i : y,
|
|
175
|
-
color: n ? p : a,
|
|
176
|
-
onClick: d,
|
|
177
|
-
...c,
|
|
178
|
-
children: n ? f : s
|
|
179
|
-
}
|
|
180
|
-
);
|
|
181
|
-
}
|
|
182
|
-
m.Confirm = Ro;
|
|
183
|
-
function Do(u) {
|
|
184
|
-
const {
|
|
185
|
-
children: s,
|
|
186
|
-
color: a = "default",
|
|
187
|
-
content: p,
|
|
188
|
-
currentValue: f,
|
|
189
|
-
defaultValue: i,
|
|
190
|
-
disabled: g,
|
|
191
|
-
fluid: y,
|
|
192
|
-
icon: o,
|
|
193
|
-
iconRotation: c,
|
|
194
|
-
iconSpin: n,
|
|
195
|
-
maxLength: e,
|
|
196
|
-
onCommit: d = () => null,
|
|
197
|
-
placeholder: v,
|
|
198
|
-
tooltip: w,
|
|
199
|
-
tooltipPosition: N,
|
|
200
|
-
...b
|
|
201
|
-
} = u, [h, x] = F(!1), A = K(), C = p || s;
|
|
202
|
-
function B(t) {
|
|
203
|
-
const r = A.current;
|
|
204
|
-
if (!r) return;
|
|
205
|
-
r.value !== "" ? d(t, r.value) : i && d(t, i);
|
|
206
|
-
}
|
|
207
|
-
M(() => {
|
|
208
|
-
const t = A.current;
|
|
209
|
-
if (t && h) {
|
|
210
|
-
t.value = f || "";
|
|
211
|
-
try {
|
|
212
|
-
t.focus(), t.select();
|
|
213
|
-
} catch {
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}, [h, f]);
|
|
217
|
-
let k = /* @__PURE__ */ E(
|
|
218
|
-
O,
|
|
219
|
-
{
|
|
220
|
-
className: R([
|
|
221
|
-
_.button,
|
|
222
|
-
y && _.fluid,
|
|
223
|
-
_["color__" + a]
|
|
224
|
-
]),
|
|
225
|
-
...b,
|
|
226
|
-
onClick: () => x(!0),
|
|
227
|
-
children: [
|
|
228
|
-
o && /* @__PURE__ */ l(D, { name: o, rotation: c, spin: n }),
|
|
229
|
-
/* @__PURE__ */ l("div", { children: C }),
|
|
230
|
-
/* @__PURE__ */ l(
|
|
231
|
-
"input",
|
|
232
|
-
{
|
|
233
|
-
disabled: !!g,
|
|
234
|
-
ref: A,
|
|
235
|
-
className: "NumberInput__input",
|
|
236
|
-
style: {
|
|
237
|
-
display: h ? "" : "none",
|
|
238
|
-
textAlign: "left"
|
|
239
|
-
},
|
|
240
|
-
onBlur: (t) => {
|
|
241
|
-
h && (x(!1), B(t));
|
|
242
|
-
},
|
|
243
|
-
onKeyDown: (t) => {
|
|
244
|
-
if (t.key === I.Enter) {
|
|
245
|
-
x(!1), B(t);
|
|
246
|
-
return;
|
|
247
|
-
}
|
|
248
|
-
t.key === I.Escape && x(!1);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
)
|
|
252
|
-
]
|
|
253
|
-
}
|
|
254
|
-
);
|
|
255
|
-
return w && (k = /* @__PURE__ */ l(P, { content: w, position: N, children: k })), k;
|
|
256
|
-
}
|
|
257
|
-
m.Input = Do;
|
|
258
|
-
function Eo(u) {
|
|
259
|
-
const { accept: s, multiple: a, onSelectFiles: p, ...f } = u, i = V(null);
|
|
260
|
-
async function g(o) {
|
|
261
|
-
const c = Array.from(o).map((n) => {
|
|
262
|
-
const e = new FileReader();
|
|
263
|
-
return new Promise((d) => {
|
|
264
|
-
e.onload = () => d(e.result), e.readAsText(n);
|
|
265
|
-
});
|
|
266
|
-
});
|
|
267
|
-
return await Promise.all(c);
|
|
268
|
-
}
|
|
269
|
-
async function y(o) {
|
|
270
|
-
const c = o.target.files;
|
|
271
|
-
if (c != null && c.length) {
|
|
272
|
-
const n = await g(c);
|
|
273
|
-
p(a ? n : n[0]);
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
return /* @__PURE__ */ E(S, { children: [
|
|
277
|
-
/* @__PURE__ */ l(m, { onClick: () => {
|
|
278
|
-
var o;
|
|
279
|
-
return (o = i.current) == null ? void 0 : o.click();
|
|
280
|
-
}, ...f }),
|
|
281
|
-
/* @__PURE__ */ l(
|
|
282
|
-
"input",
|
|
283
|
-
{
|
|
284
|
-
hidden: !0,
|
|
285
|
-
type: "file",
|
|
286
|
-
ref: i,
|
|
287
|
-
accept: s,
|
|
288
|
-
multiple: a,
|
|
289
|
-
onChange: y
|
|
290
|
-
}
|
|
291
|
-
)
|
|
292
|
-
] });
|
|
293
|
-
}
|
|
294
|
-
m.File = Eo;
|
|
295
|
-
export {
|
|
296
|
-
m as Button,
|
|
297
|
-
No as ButtonCheckbox
|
|
298
|
-
};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { Component as a, createRef as c } from "react";
|
|
3
|
-
import { shallowDiffers as r } from "../common/react.js";
|
|
4
|
-
import { debounce as m } from "../common/timer.js";
|
|
5
|
-
import { computeBoxProps as l } from "./Box.js";
|
|
6
|
-
const o = [];
|
|
7
|
-
function h(t) {
|
|
8
|
-
const n = o.length;
|
|
9
|
-
o.push(null);
|
|
10
|
-
const e = t || "byondui_" + n;
|
|
11
|
-
return {
|
|
12
|
-
render: (i) => {
|
|
13
|
-
o[n] = e, Byond.winset(e, i);
|
|
14
|
-
},
|
|
15
|
-
unmount: () => {
|
|
16
|
-
o[n] = null, Byond.winset(e, {
|
|
17
|
-
parent: ""
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
window.addEventListener("beforeunload", () => {
|
|
23
|
-
for (let t = 0; t < o.length; t++) {
|
|
24
|
-
const n = o[t];
|
|
25
|
-
typeof n == "string" && (o[t] = null, Byond.winset(n, {
|
|
26
|
-
parent: ""
|
|
27
|
-
}));
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
function u(t) {
|
|
31
|
-
const n = window.devicePixelRatio ?? 1, e = t.getBoundingClientRect();
|
|
32
|
-
return {
|
|
33
|
-
pos: [e.left * n, e.top * n],
|
|
34
|
-
size: [
|
|
35
|
-
(e.right - e.left) * n,
|
|
36
|
-
(e.bottom - e.top) * n
|
|
37
|
-
]
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
class U extends a {
|
|
41
|
-
constructor(n) {
|
|
42
|
-
var e;
|
|
43
|
-
super(n), this.containerRef = c(), this.byondUiElement = h((e = n.params) == null ? void 0 : e.id), this.handleResize = m(() => {
|
|
44
|
-
this.forceUpdate();
|
|
45
|
-
}, 100);
|
|
46
|
-
}
|
|
47
|
-
shouldComponentUpdate(n) {
|
|
48
|
-
const { params: e = {}, ...i } = this.props, { params: d = {}, ...p } = n;
|
|
49
|
-
return r(e, d) || r(i, p);
|
|
50
|
-
}
|
|
51
|
-
componentDidMount() {
|
|
52
|
-
window.addEventListener("resize", this.handleResize), this.componentDidUpdate(), this.handleResize();
|
|
53
|
-
}
|
|
54
|
-
componentDidUpdate() {
|
|
55
|
-
const { params: n = {} } = this.props, e = u(this.containerRef.current);
|
|
56
|
-
this.byondUiElement.render({
|
|
57
|
-
parent: Byond.windowId,
|
|
58
|
-
...n,
|
|
59
|
-
pos: e.pos[0] + "," + e.pos[1],
|
|
60
|
-
size: e.size[0] + "x" + e.size[1]
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
componentWillUnmount() {
|
|
64
|
-
window.removeEventListener("resize", this.handleResize), this.byondUiElement.unmount();
|
|
65
|
-
}
|
|
66
|
-
render() {
|
|
67
|
-
const { params: n, ...e } = this.props;
|
|
68
|
-
return /* @__PURE__ */ s("div", { ref: this.containerRef, ...l(e), children: /* @__PURE__ */ s("div", { style: { minHeight: "22px" } }) });
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
export {
|
|
72
|
-
U as ByondUi
|
|
73
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Component, RefObject } from 'react';
|
|
2
|
-
import { BoxProps } from './Box';
|
|
3
|
-
|
|
4
|
-
type Props = {
|
|
5
|
-
data: number[][];
|
|
6
|
-
} & Partial<{
|
|
7
|
-
fillColor: string;
|
|
8
|
-
rangeX: [number, number];
|
|
9
|
-
rangeY: [number, number];
|
|
10
|
-
strokeColor: string;
|
|
11
|
-
strokeWidth: number;
|
|
12
|
-
}> & BoxProps;
|
|
13
|
-
type State = {
|
|
14
|
-
viewBox: [number, number];
|
|
15
|
-
};
|
|
16
|
-
declare class LineChart extends Component<Props> {
|
|
17
|
-
ref: RefObject<HTMLDivElement>;
|
|
18
|
-
state: State;
|
|
19
|
-
constructor(props: Props);
|
|
20
|
-
componentDidMount(): void;
|
|
21
|
-
componentWillUnmount(): void;
|
|
22
|
-
handleResize: () => void;
|
|
23
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
}
|
|
25
|
-
export declare const Chart: {
|
|
26
|
-
Line: typeof LineChart;
|
|
27
|
-
};
|
|
28
|
-
export {};
|
package/dist/components/Chart.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
var w = Object.defineProperty;
|
|
2
|
-
var R = (t, o, e) => o in t ? w(t, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[o] = e;
|
|
3
|
-
var p = (t, o, e) => R(t, typeof o != "symbol" ? o + "" : o, e);
|
|
4
|
-
import { jsx as c } from "react/jsx-runtime";
|
|
5
|
-
import { Component as g, createRef as B } from "react";
|
|
6
|
-
import { zip as u } from "../common/collections.js";
|
|
7
|
-
import { Box as v } from "./Box.js";
|
|
8
|
-
function C(t, o, e, n) {
|
|
9
|
-
if (t.length === 0)
|
|
10
|
-
return [];
|
|
11
|
-
const f = u(...t), h = f.map((r) => Math.min(...r)), a = f.map((r) => Math.max(...r));
|
|
12
|
-
return e !== void 0 && (h[0] = e[0], a[0] = e[1]), n !== void 0 && (h[1] = n[0], a[1] = n[1]), t.map(
|
|
13
|
-
(r) => u(r, h, a, o).map(
|
|
14
|
-
([l, i, m, d]) => (l - i) / (m - i) * d
|
|
15
|
-
)
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
function L(t) {
|
|
19
|
-
let o = "";
|
|
20
|
-
for (let e = 0; e < t.length; e++) {
|
|
21
|
-
const n = t[e];
|
|
22
|
-
o += n[0] + "," + n[1] + " ";
|
|
23
|
-
}
|
|
24
|
-
return o;
|
|
25
|
-
}
|
|
26
|
-
class b extends g {
|
|
27
|
-
constructor(e) {
|
|
28
|
-
super(e);
|
|
29
|
-
p(this, "ref");
|
|
30
|
-
p(this, "state");
|
|
31
|
-
p(this, "handleResize", () => {
|
|
32
|
-
const e = this.ref.current;
|
|
33
|
-
e && this.setState({
|
|
34
|
-
viewBox: [e.offsetWidth, e.offsetHeight]
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
this.ref = B(), this.state = {
|
|
38
|
-
// Initial guess
|
|
39
|
-
viewBox: [600, 200]
|
|
40
|
-
}, this.handleResize = this.handleResize.bind(this);
|
|
41
|
-
}
|
|
42
|
-
componentDidMount() {
|
|
43
|
-
window.addEventListener("resize", this.handleResize), this.handleResize();
|
|
44
|
-
}
|
|
45
|
-
componentWillUnmount() {
|
|
46
|
-
window.removeEventListener("resize", this.handleResize);
|
|
47
|
-
}
|
|
48
|
-
render() {
|
|
49
|
-
const {
|
|
50
|
-
data: e = [],
|
|
51
|
-
rangeX: n,
|
|
52
|
-
rangeY: f,
|
|
53
|
-
fillColor: h = "none",
|
|
54
|
-
strokeColor: a = "#ffffff",
|
|
55
|
-
strokeWidth: s = 2,
|
|
56
|
-
...r
|
|
57
|
-
} = this.props, { viewBox: l } = this.state, i = C(e, l, n, f);
|
|
58
|
-
if (i.length > 0) {
|
|
59
|
-
const z = i[0], x = i[i.length - 1];
|
|
60
|
-
i.push([l[0] + s, x[1]]), i.push([l[0] + s, -s]), i.push([-s, -s]), i.push([-s, z[1]]);
|
|
61
|
-
}
|
|
62
|
-
const m = L(i), d = { ...r, className: "", ref: this.ref };
|
|
63
|
-
return /* @__PURE__ */ c(v, { position: "relative", ...r, children: /* @__PURE__ */ c(v, { ...d, children: /* @__PURE__ */ c(
|
|
64
|
-
"svg",
|
|
65
|
-
{
|
|
66
|
-
viewBox: `0 0 ${l[0]} ${l[1]}`,
|
|
67
|
-
preserveAspectRatio: "none",
|
|
68
|
-
style: {
|
|
69
|
-
position: "absolute",
|
|
70
|
-
top: 0,
|
|
71
|
-
left: 0,
|
|
72
|
-
right: 0,
|
|
73
|
-
bottom: 0,
|
|
74
|
-
overflow: "hidden"
|
|
75
|
-
},
|
|
76
|
-
children: /* @__PURE__ */ c(
|
|
77
|
-
"polyline",
|
|
78
|
-
{
|
|
79
|
-
transform: `scale(1, -1) translate(0, -${l[1]})`,
|
|
80
|
-
fill: h,
|
|
81
|
-
stroke: a,
|
|
82
|
-
strokeWidth: s,
|
|
83
|
-
points: m
|
|
84
|
-
}
|
|
85
|
-
)
|
|
86
|
-
}
|
|
87
|
-
) }) });
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
const $ = {
|
|
91
|
-
Line: b
|
|
92
|
-
};
|
|
93
|
-
export {
|
|
94
|
-
$ as Chart
|
|
95
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { BoxProps } from './Box';
|
|
3
|
-
|
|
4
|
-
type Props = Partial<{
|
|
5
|
-
/** Buttons or other content to render inline with the button */
|
|
6
|
-
buttons: ReactNode;
|
|
7
|
-
/** Icon to display with the collapsible */
|
|
8
|
-
icon: string;
|
|
9
|
-
/** Whether the collapsible is open */
|
|
10
|
-
open: boolean;
|
|
11
|
-
/** Text to display on the button for collapsing */
|
|
12
|
-
title: ReactNode;
|
|
13
|
-
}> & BoxProps;
|
|
14
|
-
export declare function Collapsible(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useState as h } from "react";
|
|
3
|
-
import { Box as r } from "./Box.js";
|
|
4
|
-
import { Button as p } from "./Button.js";
|
|
5
|
-
function v(o) {
|
|
6
|
-
const { children: t, color: s, title: a, buttons: n, icon: c, ...m } = o, [l, d] = h(o.open);
|
|
7
|
-
return /* @__PURE__ */ i(r, { mb: 1, children: [
|
|
8
|
-
/* @__PURE__ */ i("div", { className: "Table", children: [
|
|
9
|
-
/* @__PURE__ */ e("div", { className: "Table__cell", children: /* @__PURE__ */ e(
|
|
10
|
-
p,
|
|
11
|
-
{
|
|
12
|
-
fluid: !0,
|
|
13
|
-
color: s,
|
|
14
|
-
icon: c || (l ? "chevron-down" : "chevron-right"),
|
|
15
|
-
onClick: () => d(!l),
|
|
16
|
-
...m,
|
|
17
|
-
children: a
|
|
18
|
-
}
|
|
19
|
-
) }),
|
|
20
|
-
n && /* @__PURE__ */ e("div", { className: "Table__cell Table__cell--collapsing", children: n })
|
|
21
|
-
] }),
|
|
22
|
-
l && /* @__PURE__ */ e(r, { mt: 1, children: t })
|
|
23
|
-
] });
|
|
24
|
-
}
|
|
25
|
-
export {
|
|
26
|
-
v as Collapsible
|
|
27
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { classes as s } from "../common/react.js";
|
|
3
|
-
import { computeBoxClassName as e, computeBoxProps as n } from "./Box.js";
|
|
4
|
-
import '../assets/ColorBox.css';const m = "_colorBox_110qz_5", a = {
|
|
5
|
-
colorBox: m
|
|
6
|
-
};
|
|
7
|
-
function d(r) {
|
|
8
|
-
const { content: c, children: x, className: l, ...o } = r;
|
|
9
|
-
return o.color = c ? null : "default", o.backgroundColor = r.color || "default", /* @__PURE__ */ t(
|
|
10
|
-
"div",
|
|
11
|
-
{
|
|
12
|
-
className: s([
|
|
13
|
-
a.colorBox,
|
|
14
|
-
l,
|
|
15
|
-
e(o)
|
|
16
|
-
]),
|
|
17
|
-
...n(o),
|
|
18
|
-
children: c || "."
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
export {
|
|
23
|
-
d as ColorBox
|
|
24
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
type DialogProps = {
|
|
2
|
-
children: any;
|
|
3
|
-
height?: string;
|
|
4
|
-
onClose: () => void;
|
|
5
|
-
title: any;
|
|
6
|
-
width?: string;
|
|
7
|
-
};
|
|
8
|
-
export declare function Dialog(props: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export declare namespace Dialog {
|
|
10
|
-
var Button: typeof DialogButton;
|
|
11
|
-
}
|
|
12
|
-
type DialogButtonProps = {
|
|
13
|
-
children: any;
|
|
14
|
-
onClick: () => void;
|
|
15
|
-
};
|
|
16
|
-
declare function DialogButton(props: DialogButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
type UnsavedChangesDialogProps = {
|
|
18
|
-
documentName: string;
|
|
19
|
-
onClose: () => void;
|
|
20
|
-
onDiscard: () => void;
|
|
21
|
-
onSave: () => void;
|
|
22
|
-
};
|
|
23
|
-
export declare function UnsavedChangesDialog(props: UnsavedChangesDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export {};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
2
|
-
import { Box as s } from "./Box.js";
|
|
3
|
-
import { Button as a } from "./Button.js";
|
|
4
|
-
import '../assets/Dialog.css';const m = "_dialog_1hdv8_5", v = "_content_1hdv8_17", u = "_header_1hdv8_25", g = "_title_1hdv8_33", p = "_body_1hdv8_42", C = "_footer_1hdv8_47", f = "_button_1hdv8_55", o = {
|
|
5
|
-
dialog: m,
|
|
6
|
-
content: v,
|
|
7
|
-
header: u,
|
|
8
|
-
title: g,
|
|
9
|
-
body: p,
|
|
10
|
-
footer: C,
|
|
11
|
-
button: f
|
|
12
|
-
};
|
|
13
|
-
function h(n) {
|
|
14
|
-
const { title: e, onClose: i, children: r, width: l, height: _ } = n;
|
|
15
|
-
return /* @__PURE__ */ t("div", { className: o.dialog, children: /* @__PURE__ */ c(s, { className: o.content, width: l || "370px", height: _, children: [
|
|
16
|
-
/* @__PURE__ */ c("div", { className: o.header, children: [
|
|
17
|
-
/* @__PURE__ */ t("div", { className: o.title, children: e }),
|
|
18
|
-
/* @__PURE__ */ t(s, { mr: 2, children: /* @__PURE__ */ t(
|
|
19
|
-
a,
|
|
20
|
-
{
|
|
21
|
-
mr: "-3px",
|
|
22
|
-
width: "26px",
|
|
23
|
-
lineHeight: "22px",
|
|
24
|
-
textAlign: "center",
|
|
25
|
-
color: "transparent",
|
|
26
|
-
icon: "window-close-o",
|
|
27
|
-
tooltip: "Close",
|
|
28
|
-
tooltipPosition: "bottom-start",
|
|
29
|
-
onClick: i
|
|
30
|
-
}
|
|
31
|
-
) })
|
|
32
|
-
] }),
|
|
33
|
-
r
|
|
34
|
-
] }) });
|
|
35
|
-
}
|
|
36
|
-
function d(n) {
|
|
37
|
-
const { onClick: e, children: i } = n;
|
|
38
|
-
return /* @__PURE__ */ t(
|
|
39
|
-
a,
|
|
40
|
-
{
|
|
41
|
-
onClick: e,
|
|
42
|
-
className: o.button,
|
|
43
|
-
verticalAlignContent: "middle",
|
|
44
|
-
children: i
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
h.Button = d;
|
|
49
|
-
function w(n) {
|
|
50
|
-
const { documentName: e, onSave: i, onDiscard: r, onClose: l } = n;
|
|
51
|
-
return /* @__PURE__ */ c(h, { title: "Notepad", onClose: l, children: [
|
|
52
|
-
/* @__PURE__ */ c("div", { className: o.body, children: [
|
|
53
|
-
"Do you want to save changes to ",
|
|
54
|
-
e,
|
|
55
|
-
"?"
|
|
56
|
-
] }),
|
|
57
|
-
/* @__PURE__ */ c("div", { className: o.footer, children: [
|
|
58
|
-
/* @__PURE__ */ t(d, { onClick: i, children: "Save" }),
|
|
59
|
-
/* @__PURE__ */ t(d, { onClick: r, children: "Don't Save" }),
|
|
60
|
-
/* @__PURE__ */ t(d, { onClick: l, children: "Cancel" })
|
|
61
|
-
] })
|
|
62
|
-
] });
|
|
63
|
-
}
|
|
64
|
-
export {
|
|
65
|
-
h as Dialog,
|
|
66
|
-
w as UnsavedChangesDialog
|
|
67
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { classes as o } from "../common/react.js";
|
|
3
|
-
import { Box as t } from "./Box.js";
|
|
4
|
-
import '../assets/Dimmer.css';const c = "_dimmer_ldz2o_5", n = {
|
|
5
|
-
dimmer: c
|
|
6
|
-
};
|
|
7
|
-
function _(r) {
|
|
8
|
-
const { className: e, children: s, ...i } = r;
|
|
9
|
-
return /* @__PURE__ */ m(t, { className: o([n.dimmer, e]), ...i, children: /* @__PURE__ */ m("div", { className: "Dimmer__inner", children: s }) });
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
_ as Dimmer
|
|
13
|
-
};
|