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,298 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,95 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
};
|