tgui-core 1.1.8 → 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.
Files changed (291) hide show
  1. package/lib/common/assets.ts +38 -0
  2. package/lib/common/collections.ts +27 -0
  3. package/lib/common/color.ts +88 -0
  4. package/lib/common/constants.ts +349 -0
  5. package/lib/common/events.ts +262 -0
  6. package/{dist/common/exhaustive.d.ts → lib/common/exhaustive.ts} +3 -1
  7. package/lib/common/format.ts +167 -0
  8. package/{dist/common/fp.d.ts → lib/common/fp.ts} +16 -2
  9. package/lib/common/hotkeys.ts +207 -0
  10. package/lib/common/http.ts +16 -0
  11. package/lib/common/keycodes.ts +86 -0
  12. package/{dist/common/keys.d.ts → lib/common/keys.ts} +24 -21
  13. package/lib/common/math.ts +76 -0
  14. package/lib/common/perf.ts +72 -0
  15. package/lib/common/random.ts +32 -0
  16. package/lib/common/react.ts +59 -0
  17. package/lib/common/redux.ts +187 -0
  18. package/lib/common/storage.ts +207 -0
  19. package/lib/common/string.ts +169 -0
  20. package/lib/common/timer.ts +63 -0
  21. package/lib/common/type-utils.ts +41 -0
  22. package/lib/common/types.d.ts +12 -0
  23. package/lib/common/uuid.ts +18 -0
  24. package/lib/components/AnimatedNumber.tsx +180 -0
  25. package/lib/components/Autofocus.tsx +23 -0
  26. package/lib/components/Blink.tsx +91 -0
  27. package/lib/components/BlockQuote.tsx +9 -0
  28. package/lib/components/BodyZoneSelector.tsx +149 -0
  29. package/lib/components/Box.tsx +252 -0
  30. package/lib/components/Button.tsx +425 -0
  31. package/lib/components/ByondUi.jsx +110 -0
  32. package/lib/components/Chart.tsx +155 -0
  33. package/lib/components/Collapsible.tsx +43 -0
  34. package/lib/components/ColorBox.tsx +29 -0
  35. package/lib/components/Dialog.tsx +81 -0
  36. package/lib/components/Dimmer.tsx +13 -0
  37. package/lib/components/Divider.tsx +20 -0
  38. package/lib/components/DmIcon.tsx +86 -0
  39. package/lib/components/DraggableControl.jsx +276 -0
  40. package/lib/components/Dropdown.tsx +246 -0
  41. package/lib/components/FakeTerminal.jsx +52 -0
  42. package/lib/components/FitText.tsx +99 -0
  43. package/lib/components/Flex.tsx +159 -0
  44. package/lib/components/Icon.tsx +95 -0
  45. package/lib/components/Image.tsx +54 -0
  46. package/lib/components/InfinitePlane.jsx +192 -0
  47. package/lib/components/Input.tsx +176 -0
  48. package/lib/components/KeyListener.tsx +40 -0
  49. package/lib/components/Knob.tsx +178 -0
  50. package/lib/components/LabeledControls.tsx +44 -0
  51. package/lib/components/LabeledList.tsx +154 -0
  52. package/lib/components/MenuBar.tsx +228 -0
  53. package/lib/components/Modal.tsx +23 -0
  54. package/lib/components/NoticeBox.tsx +45 -0
  55. package/lib/components/NumberInput.tsx +328 -0
  56. package/lib/components/Popper.tsx +100 -0
  57. package/lib/components/ProgressBar.tsx +105 -0
  58. package/lib/components/RestrictedInput.jsx +301 -0
  59. package/lib/components/RoundGauge.tsx +180 -0
  60. package/lib/components/Section.tsx +120 -0
  61. package/lib/components/Slider.tsx +169 -0
  62. package/lib/components/Stack.tsx +96 -0
  63. package/lib/components/StyleableSection.tsx +33 -0
  64. package/lib/components/Table.tsx +84 -0
  65. package/lib/components/Tabs.tsx +89 -0
  66. package/lib/components/TextArea.tsx +182 -0
  67. package/lib/components/TimeDisplay.jsx +64 -0
  68. package/lib/components/Tooltip.tsx +152 -0
  69. package/lib/components/TrackOutsideClicks.tsx +35 -0
  70. package/lib/components/VirtualList.tsx +69 -0
  71. package/lib/styles/atomic/candystripe.scss +8 -0
  72. package/lib/styles/atomic/centered-image.scss +7 -0
  73. package/lib/styles/atomic/color.scss +21 -0
  74. package/lib/styles/atomic/debug-layout.scss +17 -0
  75. package/lib/styles/atomic/fit-text.scss +14 -0
  76. package/lib/styles/atomic/links.scss +12 -0
  77. package/lib/styles/atomic/outline.scss +47 -0
  78. package/lib/styles/atomic/text.scss +44 -0
  79. package/lib/styles/base.scss +32 -0
  80. package/lib/styles/colors.scss +92 -0
  81. package/lib/styles/components/BlockQuote.module.scss +20 -0
  82. package/lib/styles/components/BlockQuote.module.scss.d.ts +4 -0
  83. package/lib/styles/components/Button.module.scss +157 -0
  84. package/lib/styles/components/Button.module.scss.d.ts +46 -0
  85. package/lib/styles/components/ColorBox.module.scss +12 -0
  86. package/lib/styles/components/ColorBox.module.scss.d.ts +4 -0
  87. package/lib/styles/components/Dialog.module.scss +60 -0
  88. package/lib/styles/components/Dialog.module.scss.d.ts +10 -0
  89. package/lib/styles/components/Dimmer.module.scss +22 -0
  90. package/lib/styles/components/Dimmer.module.scss.d.ts +4 -0
  91. package/lib/styles/components/Divider.module.scss +27 -0
  92. package/lib/styles/components/Divider.module.scss.d.ts +6 -0
  93. package/lib/styles/components/Dropdown.scss +72 -0
  94. package/lib/styles/components/Flex.module.scss +13 -0
  95. package/lib/styles/components/Flex.module.scss.d.ts +5 -0
  96. package/lib/styles/components/Icon.module.scss +25 -0
  97. package/lib/styles/components/Icon.module.scss.d.ts +5 -0
  98. package/lib/styles/components/Input.module.scss +64 -0
  99. package/lib/styles/components/Input.module.scss.d.ts +8 -0
  100. package/lib/styles/components/Knob.module.scss +131 -0
  101. package/lib/styles/components/Knob.module.scss.d.ts +33 -0
  102. package/lib/styles/components/LabeledList.module.scss +49 -0
  103. package/lib/styles/components/LabeledList.module.scss.d.ts +8 -0
  104. package/lib/styles/components/MenuBar.module.scss +75 -0
  105. package/lib/styles/components/MenuBar.module.scss.d.ts +14 -0
  106. package/lib/styles/components/Modal.module.scss +14 -0
  107. package/lib/styles/components/Modal.module.scss.d.ts +4 -0
  108. package/lib/styles/components/NoticeBox.module.scss +65 -0
  109. package/lib/styles/components/NoticeBox.module.scss.d.ts +27 -0
  110. package/lib/styles/components/NumberInput.module.scss +71 -0
  111. package/lib/styles/components/NumberInput.module.scss.d.ts +9 -0
  112. package/lib/styles/components/ProgressBar.module.scss +63 -0
  113. package/lib/styles/components/ProgressBar.module.scss.d.ts +27 -0
  114. package/lib/styles/components/RoundGauge.module.scss +85 -0
  115. package/lib/styles/components/RoundGauge.module.scss.d.ts +49 -0
  116. package/lib/styles/components/Section.module.scss +130 -0
  117. package/lib/styles/components/Section.module.scss.d.ts +13 -0
  118. package/lib/styles/components/Slider.module.scss +54 -0
  119. package/lib/styles/components/Slider.module.scss.d.ts +8 -0
  120. package/lib/styles/components/Stack.module.scss +60 -0
  121. package/lib/styles/components/Stack.module.scss.d.ts +12 -0
  122. package/lib/styles/components/Table.module.scss +44 -0
  123. package/lib/styles/components/Table.module.scss.d.ts +10 -0
  124. package/lib/styles/components/Tabs.module.scss +144 -0
  125. package/lib/styles/components/Tabs.module.scss.d.ts +35 -0
  126. package/lib/styles/components/TextArea.module.scss +86 -0
  127. package/lib/styles/components/TextArea.module.scss.d.ts +11 -0
  128. package/lib/styles/components/Tooltip.module.scss +24 -0
  129. package/lib/styles/components/Tooltip.module.scss.d.ts +4 -0
  130. package/lib/styles/functions.scss +79 -0
  131. package/lib/styles/input.scss +9 -0
  132. package/lib/styles/main.scss +20 -0
  133. package/lib/styles/reset.scss +68 -0
  134. package/package.json +6 -6
  135. package/dist/ProgressBar.module-BkAFfFy0.js +0 -29
  136. package/dist/Section.module-CLVHJ4yA.js +0 -15
  137. package/dist/assets/BlockQuote.css +0 -1
  138. package/dist/assets/Button.css +0 -1
  139. package/dist/assets/ColorBox.css +0 -1
  140. package/dist/assets/Dialog.css +0 -1
  141. package/dist/assets/Dimmer.css +0 -1
  142. package/dist/assets/Divider.css +0 -1
  143. package/dist/assets/Flex.css +0 -1
  144. package/dist/assets/Icon.css +0 -6
  145. package/dist/assets/Input.css +0 -1
  146. package/dist/assets/Knob.css +0 -1
  147. package/dist/assets/LabeledList.css +0 -1
  148. package/dist/assets/MenuBar.css +0 -1
  149. package/dist/assets/Modal.css +0 -1
  150. package/dist/assets/NoticeBox.css +0 -1
  151. package/dist/assets/NumberInput.css +0 -1
  152. package/dist/assets/ProgressBar.css +0 -1
  153. package/dist/assets/RoundGauge.css +0 -1
  154. package/dist/assets/Section.css +0 -1
  155. package/dist/assets/Slider.css +0 -1
  156. package/dist/assets/Stack.css +0 -1
  157. package/dist/assets/Table.css +0 -1
  158. package/dist/assets/Tabs.css +0 -1
  159. package/dist/assets/TextArea.css +0 -1
  160. package/dist/assets/Tooltip.css +0 -1
  161. package/dist/common/assets.d.ts +0 -4
  162. package/dist/common/assets.js +0 -25
  163. package/dist/common/collections.d.ts +0 -10
  164. package/dist/common/collections.js +0 -15
  165. package/dist/common/color.d.ts +0 -25
  166. package/dist/common/color.js +0 -69
  167. package/dist/common/constants.d.ts +0 -102
  168. package/dist/common/constants.js +0 -312
  169. package/dist/common/events.d.ts +0 -33
  170. package/dist/common/events.js +0 -147
  171. package/dist/common/exhaustive.js +0 -6
  172. package/dist/common/format.d.ts +0 -11
  173. package/dist/common/format.js +0 -114
  174. package/dist/common/fp.js +0 -9
  175. package/dist/common/hotkeys.d.ts +0 -25
  176. package/dist/common/hotkeys.js +0 -112
  177. package/dist/common/http.d.ts +0 -4
  178. package/dist/common/http.js +0 -10
  179. package/dist/common/keycodes.d.ts +0 -85
  180. package/dist/common/keycodes.js +0 -88
  181. package/dist/common/keys.js +0 -8
  182. package/dist/common/math.d.ts +0 -39
  183. package/dist/common/math.js +0 -41
  184. package/dist/common/perf.d.ts +0 -24
  185. package/dist/common/perf.js +0 -33
  186. package/dist/common/random.d.ts +0 -16
  187. package/dist/common/random.js +0 -18
  188. package/dist/common/react.d.ts +0 -23
  189. package/dist/common/react.js +0 -30
  190. package/dist/common/redux.d.ts +0 -64
  191. package/dist/common/redux.js +0 -72
  192. package/dist/common/storage.js +0 -124
  193. package/dist/common/string.d.ts +0 -65
  194. package/dist/common/string.js +0 -83
  195. package/dist/common/timer.d.ts +0 -18
  196. package/dist/common/timer.js +0 -28
  197. package/dist/common/type-utils.d.ts +0 -9
  198. package/dist/common/type-utils.js +0 -25
  199. package/dist/common/uuid.d.ts +0 -9
  200. package/dist/common/uuid.js +0 -10
  201. package/dist/components/AnimatedNumber.d.ts +0 -60
  202. package/dist/components/AnimatedNumber.js +0 -76
  203. package/dist/components/Autofocus.d.ts +0 -4
  204. package/dist/components/Autofocus.js +0 -17
  205. package/dist/components/Blink.d.ts +0 -26
  206. package/dist/components/Blink.js +0 -56
  207. package/dist/components/BlockQuote.d.ts +0 -3
  208. package/dist/components/BlockQuote.js +0 -13
  209. package/dist/components/BodyZoneSelector.d.ts +0 -28
  210. package/dist/components/BodyZoneSelector.js +0 -115
  211. package/dist/components/Box.d.ts +0 -91
  212. package/dist/components/Box.js +0 -133
  213. package/dist/components/Button.d.ts +0 -93
  214. package/dist/components/Button.js +0 -298
  215. package/dist/components/ByondUi.js +0 -73
  216. package/dist/components/Chart.d.ts +0 -28
  217. package/dist/components/Chart.js +0 -95
  218. package/dist/components/Collapsible.d.ts +0 -15
  219. package/dist/components/Collapsible.js +0 -27
  220. package/dist/components/ColorBox.d.ts +0 -8
  221. package/dist/components/ColorBox.js +0 -24
  222. package/dist/components/Dialog.d.ts +0 -24
  223. package/dist/components/Dialog.js +0 -67
  224. package/dist/components/Dimmer.d.ts +0 -3
  225. package/dist/components/Dimmer.js +0 -13
  226. package/dist/components/Divider.d.ts +0 -6
  227. package/dist/components/Divider.js +0 -22
  228. package/dist/components/DmIcon.d.ts +0 -31
  229. package/dist/components/DmIcon.js +0 -34
  230. package/dist/components/DraggableControl.js +0 -176
  231. package/dist/components/Dropdown.d.ts +0 -48
  232. package/dist/components/Dropdown.js +0 -152
  233. package/dist/components/FakeTerminal.js +0 -38
  234. package/dist/components/FitText.d.ts +0 -22
  235. package/dist/components/FitText.js +0 -63
  236. package/dist/components/Flex.d.ts +0 -93
  237. package/dist/components/Flex.js +0 -72
  238. package/dist/components/Icon.d.ts +0 -30
  239. package/dist/components/Icon.js +0 -51
  240. package/dist/components/Image.d.ts +0 -14
  241. package/dist/components/Image.js +0 -35
  242. package/dist/components/InfinitePlane.js +0 -139
  243. package/dist/components/Input.d.ts +0 -61
  244. package/dist/components/Input.js +0 -89
  245. package/dist/components/KeyListener.d.ts +0 -15
  246. package/dist/components/KeyListener.js +0 -23
  247. package/dist/components/Knob.d.ts +0 -49
  248. package/dist/components/Knob.js +0 -162
  249. package/dist/components/LabeledControls.d.ts +0 -11
  250. package/dist/components/LabeledControls.js +0 -39
  251. package/dist/components/LabeledList.d.ts +0 -57
  252. package/dist/components/LabeledList.js +0 -94
  253. package/dist/components/MenuBar.d.ts +0 -28
  254. package/dist/components/MenuBar.js +0 -174
  255. package/dist/components/Modal.d.ts +0 -3
  256. package/dist/components/Modal.js +0 -25
  257. package/dist/components/NoticeBox.d.ts +0 -20
  258. package/dist/components/NoticeBox.js +0 -49
  259. package/dist/components/NumberInput.d.ts +0 -45
  260. package/dist/components/NumberInput.js +0 -221
  261. package/dist/components/Popper.d.ts +0 -27
  262. package/dist/components/Popper.js +0 -177
  263. package/dist/components/ProgressBar.d.ts +0 -46
  264. package/dist/components/ProgressBar.js +0 -37
  265. package/dist/components/RestrictedInput.js +0 -155
  266. package/dist/components/RoundGauge.d.ts +0 -53
  267. package/dist/components/RoundGauge.js +0 -147
  268. package/dist/components/Section.d.ts +0 -63
  269. package/dist/components/Section.js +0 -62
  270. package/dist/components/Slider.d.ts +0 -46
  271. package/dist/components/Slider.js +0 -124
  272. package/dist/components/Stack.d.ts +0 -27
  273. package/dist/components/Stack.js +0 -67
  274. package/dist/components/StyleableSection.d.ts +0 -11
  275. package/dist/components/StyleableSection.js +0 -16
  276. package/dist/components/Table.d.ts +0 -29
  277. package/dist/components/Table.js +0 -67
  278. package/dist/components/Tabs.d.ts +0 -23
  279. package/dist/components/Tabs.js +0 -89
  280. package/dist/components/TextArea.d.ts +0 -39
  281. package/dist/components/TextArea.js +0 -118
  282. package/dist/components/TimeDisplay.js +0 -34
  283. package/dist/components/Tooltip.d.ts +0 -29
  284. package/dist/components/Tooltip.js +0 -83
  285. package/dist/components/TrackOutsideClicks.d.ts +0 -13
  286. package/dist/components/TrackOutsideClicks.js +0 -24
  287. package/dist/components/VirtualList.d.ts +0 -8
  288. package/dist/components/VirtualList.js +0 -34
  289. package/dist/components/index.js +0 -92
  290. package/dist/popper-CiqSDJTE.js +0 -906
  291. /package/{dist/components/index.d.ts → lib/components/index.ts} +0 -0
@@ -0,0 +1,130 @@
1
+ /**
2
+ * Copyright (c) 2020 Aleksej Komarov
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ @use 'sass:color';
7
+ @use '../base.scss';
8
+ @use '../colors.scss';
9
+ @use '../functions.scss';
10
+
11
+ $title-text-color: base.$color-fg !default;
12
+ $background-color: base.$color-bg-section !default;
13
+ $separator-color: colors.$primary !default;
14
+
15
+ .section {
16
+ position: relative;
17
+ margin-bottom: 0.5em;
18
+ background-color: functions.fake-alpha($background-color, base.$color-bg);
19
+ background-color: $background-color;
20
+ box-sizing: border-box;
21
+
22
+ &:last-child {
23
+ margin-bottom: 0;
24
+ }
25
+ }
26
+
27
+ .title {
28
+ position: relative;
29
+ padding: 0.5em;
30
+ border-bottom: base.em(2px) solid $separator-color;
31
+ }
32
+
33
+ .titleText {
34
+ font-size: base.em(14px);
35
+ font-weight: bold;
36
+ color: $title-text-color;
37
+ }
38
+
39
+ .buttons {
40
+ position: absolute;
41
+ display: inline-block;
42
+ right: 0.5em;
43
+ margin-top: base.em(-1px);
44
+ }
45
+
46
+ .rest {
47
+ position: relative;
48
+ }
49
+
50
+ .content {
51
+ padding: 0.66em 0.5em;
52
+ }
53
+
54
+ .fitted > .rest > .content {
55
+ padding: 0;
56
+ }
57
+
58
+ .fill {
59
+ display: flex;
60
+ flex-direction: column;
61
+ height: 100%;
62
+ }
63
+
64
+ .fill > .rest {
65
+ flex-grow: 1;
66
+ }
67
+
68
+ .fill > .rest > .content {
69
+ height: 100%;
70
+ }
71
+
72
+ .fill.scrollable > .rest > .content {
73
+ position: absolute;
74
+ top: 0;
75
+ left: 0;
76
+ right: 0;
77
+ bottom: 0;
78
+ }
79
+
80
+ .scrollable {
81
+ overflow-x: hidden;
82
+ overflow-y: hidden;
83
+
84
+ & > .rest > .content {
85
+ overflow-y: scroll;
86
+ overflow-x: hidden;
87
+ }
88
+ }
89
+
90
+ .scrollableHorizontal {
91
+ overflow-x: hidden;
92
+ overflow-y: hidden;
93
+
94
+ & > .rest > .content {
95
+ overflow-y: hidden;
96
+ overflow-x: scroll;
97
+ }
98
+ }
99
+
100
+ .scrollable.scrollableHorizontal {
101
+ overflow-x: hidden;
102
+ overflow-y: hidden;
103
+
104
+ & > .rest > .content {
105
+ overflow-y: scroll;
106
+ overflow-x: scroll;
107
+ }
108
+ }
109
+
110
+ // Nested sections
111
+ .section .section {
112
+ background-color: transparent;
113
+ margin-left: -0.5em;
114
+ margin-right: -0.5em;
115
+
116
+ // Remove extra space above the first nested section
117
+ &:first-child {
118
+ margin-top: -0.5em;
119
+ }
120
+ }
121
+
122
+ // Level 2 section title
123
+ .section .section .titleText {
124
+ font-size: base.em(13px);
125
+ }
126
+
127
+ // Level 3 section title
128
+ .section .section .section .titleText {
129
+ font-size: base.em(12px);
130
+ }
@@ -0,0 +1,13 @@
1
+ declare const classNames: {
2
+ readonly buttons: 'buttons';
3
+ readonly content: 'content';
4
+ readonly fill: 'fill';
5
+ readonly fitted: 'fitted';
6
+ readonly rest: 'rest';
7
+ readonly scrollable: 'scrollable';
8
+ readonly scrollableHorizontal: 'scrollableHorizontal';
9
+ readonly section: 'section';
10
+ readonly title: 'title';
11
+ readonly titleText: 'titleText';
12
+ };
13
+ export = classNames;
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Copyright (c) 2020 Aleksej Komarov
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ @use '../base.scss';
7
+
8
+ $cursor-color: base.$color-fg !default;
9
+ $popup-background-color: #000000 !default;
10
+ $popup-text-color: #ffffff !default;
11
+
12
+ .slider {
13
+ cursor: e-resize;
14
+ }
15
+
16
+ .cursorOffset {
17
+ position: absolute;
18
+ top: 0;
19
+ left: 0;
20
+ bottom: 0;
21
+ transition: none !important;
22
+ }
23
+
24
+ .cursor {
25
+ position: absolute;
26
+ top: 0;
27
+ right: base.em(-1px);
28
+ bottom: 0;
29
+ width: 0;
30
+ border-left: base.em(2px) solid $cursor-color;
31
+ }
32
+
33
+ .pointer {
34
+ position: absolute;
35
+ right: base.em(-5px);
36
+ bottom: base.em(-4px);
37
+ width: 0;
38
+ height: 0;
39
+ border-left: base.em(5px) solid transparent;
40
+ border-right: base.em(5px) solid transparent;
41
+ border-bottom: base.em(5px) solid $cursor-color;
42
+ }
43
+
44
+ .popupValue {
45
+ position: absolute;
46
+ right: 0;
47
+ top: -2rem;
48
+ font-size: 1rem;
49
+ padding: 0.25rem 0.5rem;
50
+ color: $popup-text-color;
51
+ background-color: $popup-background-color;
52
+ transform: translateX(50%);
53
+ white-space: nowrap;
54
+ }
@@ -0,0 +1,8 @@
1
+ declare const classNames: {
2
+ readonly cursor: "cursor";
3
+ readonly cursorOffset: "cursorOffset";
4
+ readonly pointer: "pointer";
5
+ readonly popupValue: "popupValue";
6
+ readonly slider: "slider";
7
+ };
8
+ export = classNames;
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Copyright (c) 2021 Aleksej Komarov
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ @use '../base.scss';
7
+
8
+ $zebra-background-color: base.$color-bg-section !default;
9
+ $color: rgba(255, 255, 255, 0.1) !default;
10
+ $thickness: base.em(2px) !default;
11
+
12
+ .fill {
13
+ height: 100%;
14
+ }
15
+
16
+ .horizontal > .item {
17
+ margin-left: 0.5em;
18
+
19
+ &:first-child {
20
+ margin-left: 0;
21
+ }
22
+ }
23
+
24
+ .vertical > .item {
25
+ margin-top: 0.5em;
26
+
27
+ &:first-child {
28
+ margin-top: 0;
29
+ }
30
+ }
31
+
32
+ .reverse > .item {
33
+ margin-left: 0;
34
+ margin-right: 0.5em;
35
+
36
+ &:first-child {
37
+ margin-right: 0;
38
+ }
39
+ }
40
+
41
+ .reverse__vertical > .item {
42
+ margin-top: 0;
43
+ margin-bottom: 0.5em;
44
+
45
+ &:first-child {
46
+ margin-bottom: 0;
47
+ }
48
+ }
49
+
50
+ .zebra > .item:nth-child(even) {
51
+ background-color: $zebra-background-color;
52
+ }
53
+
54
+ .horizontal > .divider:not(.divider__hidden) {
55
+ border-left: $thickness solid $color;
56
+ }
57
+
58
+ .vertical > .divider:not(.divider__hidden) {
59
+ border-top: $thickness solid $color;
60
+ }
@@ -0,0 +1,12 @@
1
+ declare const classNames: {
2
+ readonly divider: "divider";
3
+ readonly divider__hidden: "divider__hidden";
4
+ readonly fill: "fill";
5
+ readonly horizontal: "horizontal";
6
+ readonly item: "item";
7
+ readonly reverse: "reverse";
8
+ readonly reverse__vertical: "reverse__vertical";
9
+ readonly vertical: "vertical";
10
+ readonly zebra: "zebra";
11
+ };
12
+ export = classNames;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Copyright (c) 2020 Aleksej Komarov
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ .table {
7
+ display: table;
8
+ width: 100%;
9
+ border-collapse: collapse;
10
+ border-spacing: 0;
11
+ margin: 0;
12
+ }
13
+
14
+ .collapsing {
15
+ width: auto;
16
+ }
17
+
18
+ .row {
19
+ display: table-row;
20
+ }
21
+
22
+ .cell {
23
+ display: table-cell;
24
+ padding: 0 0.25em;
25
+
26
+ &:first-child {
27
+ padding-left: 0;
28
+ }
29
+
30
+ &:last-child {
31
+ padding-right: 0;
32
+ }
33
+ }
34
+
35
+ .row__header .cell,
36
+ .cell__header {
37
+ font-weight: bold;
38
+ padding-bottom: 0.5em;
39
+ }
40
+
41
+ .cell__collapsing {
42
+ width: 1%;
43
+ white-space: nowrap;
44
+ }
@@ -0,0 +1,10 @@
1
+ declare const classNames: {
2
+ readonly cell: "cell";
3
+ readonly cell__collapsing: "cell__collapsing";
4
+ readonly cell__header: "cell__header";
5
+ readonly collapsing: "collapsing";
6
+ readonly row: "row";
7
+ readonly row__header: "row__header";
8
+ readonly table: "table";
9
+ };
10
+ export = classNames;
@@ -0,0 +1,144 @@
1
+ /**
2
+ * Copyright (c) 2020 Aleksej Komarov
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ @use 'sass:color';
7
+ @use 'sass:math';
8
+ @use '../base.scss';
9
+ @use '../colors.scss';
10
+
11
+ $color-default: color.scale(
12
+ colors.fg(colors.$primary),
13
+ $lightness: 75%
14
+ ) !default;
15
+ $text-color: rgba(255, 255, 255, 0.5) !default;
16
+ $text-color-selected: color.scale($color-default, $lightness: 25%) !default;
17
+ $tab-color: transparent !default;
18
+ $tab-color-hovered: rgba(255, 255, 255, 0.075) !default;
19
+ $tab-color-selected: rgba(255, 255, 255, 0.125) !default;
20
+ $border-radius: base.$border-radius !default;
21
+ $fg-map: colors.$fg-map !default;
22
+
23
+ .tabs {
24
+ display: flex;
25
+ align-items: stretch;
26
+ overflow: hidden;
27
+ background-color: base.$color-bg-section;
28
+ }
29
+
30
+ .fill {
31
+ height: 100%;
32
+ }
33
+
34
+ // Interoperability with sections
35
+ :global(.section) .tabs {
36
+ background-color: transparent;
37
+ }
38
+
39
+ :global(.section):not(:global(.section--fitted)) .tabs {
40
+ margin: 0 -0.5em 0.5em;
41
+
42
+ &:first-child {
43
+ margin-top: -0.5em;
44
+ }
45
+ }
46
+
47
+ .vertical {
48
+ flex-direction: column;
49
+ padding: 0.25em 0 0.25em 0.25em;
50
+ }
51
+
52
+ .horizontal {
53
+ margin-bottom: 0.5em;
54
+ padding: 0.25em 0.25em 0 0.25em;
55
+
56
+ &:last-child {
57
+ margin-bottom: 0;
58
+ }
59
+ }
60
+
61
+ .tabs__tab {
62
+ flex-grow: 0;
63
+ }
64
+
65
+ .fluid .tabs__tab {
66
+ flex-grow: 1;
67
+ }
68
+
69
+ .tab {
70
+ display: flex;
71
+ align-items: center;
72
+ justify-content: space-between;
73
+ background-color: $tab-color;
74
+ color: $text-color;
75
+ min-height: 2.25em;
76
+ min-width: 4em;
77
+ }
78
+
79
+ .tab:not(.selected):hover {
80
+ background-color: $tab-color-hovered;
81
+ }
82
+
83
+ .selected {
84
+ background-color: $tab-color-selected;
85
+ color: $text-color-selected;
86
+ }
87
+
88
+ .tab__text {
89
+ flex-grow: 1;
90
+ margin: 0 0.5em;
91
+ }
92
+
93
+ .tab__left {
94
+ min-width: 1.5em;
95
+ text-align: center;
96
+ margin-left: 0.25em;
97
+ }
98
+
99
+ .tab__right {
100
+ min-width: 1.5em;
101
+ text-align: center;
102
+ margin-right: 0.25em;
103
+ }
104
+
105
+ .horizontal {
106
+ .tab {
107
+ border-top: math.div(1em, 6) solid transparent;
108
+ border-bottom: math.div(1em, 6) solid transparent;
109
+ border-top-left-radius: 0.25em;
110
+ border-top-right-radius: 0.25em;
111
+ }
112
+
113
+ .selected {
114
+ border-bottom: math.div(1em, 6) solid $color-default;
115
+ }
116
+ }
117
+
118
+ .vertical {
119
+ .tab {
120
+ min-height: 2em;
121
+ border-left: math.div(1em, 6) solid transparent;
122
+ border-right: math.div(1em, 6) solid transparent;
123
+ border-top-left-radius: 0.25em;
124
+ border-bottom-left-radius: 0.25em;
125
+ }
126
+
127
+ .selected {
128
+ border-right: math.div(1em, 6) solid $color-default;
129
+ }
130
+ }
131
+
132
+ @each $color-name, $color-value in $fg-map {
133
+ .selected.color__#{$color-name} {
134
+ color: color.scale($color-value, $lightness: 25%);
135
+ }
136
+
137
+ .horizontal .selected .color__#{$color-name} {
138
+ border-bottom-color: $color-value;
139
+ }
140
+
141
+ .vertical .selected .color__#{$color-name} {
142
+ border-right-color: $color-value;
143
+ }
144
+ }
@@ -0,0 +1,35 @@
1
+ declare const classNames: {
2
+ readonly color__average: 'color__average';
3
+ readonly color__bad: 'color__bad';
4
+ readonly color__black: 'color__black';
5
+ readonly color__blue: 'color__blue';
6
+ readonly color__brown: 'color__brown';
7
+ readonly color__good: 'color__good';
8
+ readonly color__green: 'color__green';
9
+ readonly color__grey: 'color__grey';
10
+ readonly color__label: 'color__label';
11
+ readonly 'color__light-grey': 'color__light-grey';
12
+ readonly color__olive: 'color__olive';
13
+ readonly color__orange: 'color__orange';
14
+ readonly color__pink: 'color__pink';
15
+ readonly color__purple: 'color__purple';
16
+ readonly color__red: 'color__red';
17
+ readonly color__teal: 'color__teal';
18
+ readonly color__violet: 'color__violet';
19
+ readonly color__white: 'color__white';
20
+ readonly color__yellow: 'color__yellow';
21
+ readonly fill: 'fill';
22
+ readonly fluid: 'fluid';
23
+ readonly horizontal: 'horizontal';
24
+ readonly section: 'section';
25
+ readonly 'section--fitted': 'section--fitted';
26
+ readonly selected: 'selected';
27
+ readonly tab: 'tab';
28
+ readonly tab__left: 'tab__left';
29
+ readonly tab__right: 'tab__right';
30
+ readonly tab__text: 'tab__text';
31
+ readonly tabs: 'tabs';
32
+ readonly tabs__tab: 'tabs__tab';
33
+ readonly vertical: 'vertical';
34
+ };
35
+ export = classNames;
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Copyright (c) 2020 Aleksej Komarov
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ @use '../base.scss';
7
+ @use '../functions.scss' as *;
8
+ @use '../input.scss';
9
+
10
+ .textArea {
11
+ position: relative;
12
+ display: inline-block;
13
+ border: base.em(1px) solid input.$border-color;
14
+ border: base.em(1px) solid rgba(input.$border-color, 0.75);
15
+ border-radius: input.$border-radius;
16
+ background-color: input.$background-color;
17
+ margin-right: base.em(2px);
18
+ line-height: base.em(17px);
19
+ box-sizing: border-box;
20
+ width: 100%;
21
+ }
22
+
23
+ .fluid {
24
+ display: block;
25
+ width: auto;
26
+ height: auto;
27
+ }
28
+
29
+ .noborder {
30
+ border: 0px;
31
+ }
32
+
33
+ .inner .scrollable {
34
+ overflow: auto;
35
+ overflow-x: hidden;
36
+ overflow-y: scroll;
37
+ }
38
+
39
+ .inner {
40
+ display: block;
41
+ position: absolute;
42
+ top: 0;
43
+ bottom: 0;
44
+ left: 0;
45
+ right: 0;
46
+ border: 0;
47
+ outline: 0;
48
+ width: 100%;
49
+ height: 100%;
50
+ font-size: 1em;
51
+ line-height: base.em(17px);
52
+ min-height: base.em(17px);
53
+ margin: 0;
54
+ padding: 0 0.5em;
55
+ font-family: inherit;
56
+ background-color: transparent;
57
+ color: inherit;
58
+ box-sizing: border-box;
59
+ // Make sure the div and the textarea wrap words in the same way
60
+ word-wrap: break-word;
61
+ overflow: hidden;
62
+
63
+ &:-ms-input-placeholder {
64
+ font-style: italic;
65
+ color: #777;
66
+ color: rgba(255, 255, 255, 0.45);
67
+ }
68
+ }
69
+
70
+ .custom {
71
+ overflow: visible;
72
+ white-space: pre-wrap;
73
+ }
74
+
75
+ .nowrap {
76
+ white-space: nowrap;
77
+ overflow-wrap: normal;
78
+ overflow-x: scroll;
79
+ }
80
+
81
+ .wrapper {
82
+ overflow: hidden;
83
+ height: 100%;
84
+ width: 100%;
85
+ position: absolute;
86
+ }
@@ -0,0 +1,11 @@
1
+ declare const classNames: {
2
+ readonly custom: 'custom';
3
+ readonly fluid: 'fluid';
4
+ readonly inner: 'inner';
5
+ readonly noborder: 'noborder';
6
+ readonly nowrap: 'nowrap';
7
+ readonly scrollable: 'scrollable';
8
+ readonly textArea: 'textArea';
9
+ readonly wrapper: 'wrapper';
10
+ };
11
+ export = classNames;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright (c) 2020 Aleksej Komarov
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ @use '../base.scss';
7
+ @use '../functions.scss' as *;
8
+
9
+ $color: #ffffff !default;
10
+ $background-color: #000000 !default;
11
+ $border-radius: base.$border-radius !default;
12
+
13
+ .tooltip {
14
+ z-index: 2;
15
+ padding: 0.5em 0.75em;
16
+ pointer-events: none;
17
+ text-align: left;
18
+ transition: opacity 150ms ease-out;
19
+ background-color: $background-color;
20
+ color: $color;
21
+ box-shadow: 0.1em 0.1em 1.25em -0.1em rgba(0, 0, 0, 0.5);
22
+ border-radius: $border-radius;
23
+ max-width: base.em(250px);
24
+ }
@@ -0,0 +1,4 @@
1
+ declare const classNames: {
2
+ readonly tooltip: "tooltip";
3
+ };
4
+ export = classNames;