tgui-core 1.0.0

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 (152) hide show
  1. package/.editorconfig +10 -0
  2. package/.eslintrc.cjs +78 -0
  3. package/.gitattributes +4 -0
  4. package/.prettierrc.yml +1 -0
  5. package/.vscode/extensions.json +6 -0
  6. package/.vscode/settings.json +5 -0
  7. package/README.md +1 -0
  8. package/global.d.ts +173 -0
  9. package/package.json +25 -0
  10. package/src/assets.ts +43 -0
  11. package/src/backend.ts +369 -0
  12. package/src/common/collections.ts +349 -0
  13. package/src/common/color.ts +94 -0
  14. package/src/common/events.ts +45 -0
  15. package/src/common/exhaustive.ts +19 -0
  16. package/src/common/fp.ts +38 -0
  17. package/src/common/keycodes.ts +86 -0
  18. package/src/common/keys.ts +39 -0
  19. package/src/common/math.ts +98 -0
  20. package/src/common/perf.ts +72 -0
  21. package/src/common/random.ts +32 -0
  22. package/src/common/react.ts +65 -0
  23. package/src/common/redux.ts +196 -0
  24. package/src/common/storage.js +196 -0
  25. package/src/common/string.ts +173 -0
  26. package/src/common/timer.ts +68 -0
  27. package/src/common/type-utils.ts +41 -0
  28. package/src/common/types.ts +9 -0
  29. package/src/common/uuid.ts +24 -0
  30. package/src/common/vector.ts +51 -0
  31. package/src/components/AnimatedNumber.tsx +185 -0
  32. package/src/components/Autofocus.tsx +23 -0
  33. package/src/components/Blink.jsx +69 -0
  34. package/src/components/BlockQuote.tsx +15 -0
  35. package/src/components/BodyZoneSelector.tsx +149 -0
  36. package/src/components/Box.tsx +255 -0
  37. package/src/components/Button.tsx +415 -0
  38. package/src/components/ByondUi.jsx +121 -0
  39. package/src/components/Chart.tsx +160 -0
  40. package/src/components/Collapsible.tsx +45 -0
  41. package/src/components/ColorBox.tsx +30 -0
  42. package/src/components/Dialog.tsx +85 -0
  43. package/src/components/Dimmer.tsx +19 -0
  44. package/src/components/Divider.tsx +26 -0
  45. package/src/components/DmIcon.tsx +72 -0
  46. package/src/components/DraggableControl.jsx +282 -0
  47. package/src/components/Dropdown.tsx +246 -0
  48. package/src/components/FakeTerminal.jsx +52 -0
  49. package/src/components/FitText.tsx +99 -0
  50. package/src/components/Flex.tsx +105 -0
  51. package/src/components/Grid.tsx +44 -0
  52. package/src/components/Icon.tsx +91 -0
  53. package/src/components/Image.tsx +63 -0
  54. package/src/components/InfinitePlane.jsx +192 -0
  55. package/src/components/Input.tsx +181 -0
  56. package/src/components/KeyListener.tsx +40 -0
  57. package/src/components/Knob.tsx +185 -0
  58. package/src/components/LabeledControls.tsx +50 -0
  59. package/src/components/LabeledList.tsx +130 -0
  60. package/src/components/MenuBar.tsx +238 -0
  61. package/src/components/Modal.tsx +25 -0
  62. package/src/components/NoticeBox.tsx +48 -0
  63. package/src/components/NumberInput.tsx +328 -0
  64. package/src/components/Popper.tsx +100 -0
  65. package/src/components/ProgressBar.tsx +79 -0
  66. package/src/components/RestrictedInput.jsx +301 -0
  67. package/src/components/RoundGauge.tsx +189 -0
  68. package/src/components/Section.tsx +125 -0
  69. package/src/components/Slider.tsx +173 -0
  70. package/src/components/Stack.tsx +101 -0
  71. package/src/components/StyleableSection.tsx +30 -0
  72. package/src/components/Table.tsx +90 -0
  73. package/src/components/Tabs.tsx +90 -0
  74. package/src/components/TextArea.tsx +198 -0
  75. package/src/components/TimeDisplay.jsx +64 -0
  76. package/src/components/Tooltip.tsx +147 -0
  77. package/src/components/TrackOutsideClicks.tsx +35 -0
  78. package/src/components/VirtualList.tsx +69 -0
  79. package/src/constants.ts +355 -0
  80. package/src/debug/KitchenSink.jsx +56 -0
  81. package/src/debug/actions.js +11 -0
  82. package/src/debug/hooks.js +10 -0
  83. package/src/debug/index.ts +10 -0
  84. package/src/debug/middleware.js +86 -0
  85. package/src/debug/reducer.js +22 -0
  86. package/src/debug/selectors.js +7 -0
  87. package/src/drag.ts +280 -0
  88. package/src/events.ts +237 -0
  89. package/src/focus.ts +25 -0
  90. package/src/format.ts +173 -0
  91. package/src/hotkeys.ts +212 -0
  92. package/src/http.ts +16 -0
  93. package/src/layouts/Layout.tsx +75 -0
  94. package/src/layouts/NtosWindow.tsx +162 -0
  95. package/src/layouts/Pane.tsx +56 -0
  96. package/src/layouts/Window.tsx +227 -0
  97. package/src/renderer.ts +50 -0
  98. package/styles/base.scss +32 -0
  99. package/styles/colors.scss +92 -0
  100. package/styles/components/BlockQuote.scss +20 -0
  101. package/styles/components/Button.scss +175 -0
  102. package/styles/components/ColorBox.scss +12 -0
  103. package/styles/components/Dialog.scss +105 -0
  104. package/styles/components/Dimmer.scss +22 -0
  105. package/styles/components/Divider.scss +27 -0
  106. package/styles/components/Dropdown.scss +72 -0
  107. package/styles/components/Flex.scss +31 -0
  108. package/styles/components/Icon.scss +25 -0
  109. package/styles/components/Input.scss +68 -0
  110. package/styles/components/Knob.scss +131 -0
  111. package/styles/components/LabeledList.scss +49 -0
  112. package/styles/components/MenuBar.scss +75 -0
  113. package/styles/components/Modal.scss +14 -0
  114. package/styles/components/NoticeBox.scss +65 -0
  115. package/styles/components/NumberInput.scss +76 -0
  116. package/styles/components/ProgressBar.scss +63 -0
  117. package/styles/components/RoundGauge.scss +88 -0
  118. package/styles/components/Section.scss +143 -0
  119. package/styles/components/Slider.scss +54 -0
  120. package/styles/components/Stack.scss +59 -0
  121. package/styles/components/Table.scss +44 -0
  122. package/styles/components/Tabs.scss +144 -0
  123. package/styles/components/TextArea.scss +84 -0
  124. package/styles/components/Tooltip.scss +24 -0
  125. package/styles/functions.scss +79 -0
  126. package/styles/layouts/Layout.scss +57 -0
  127. package/styles/layouts/NtosHeader.scss +20 -0
  128. package/styles/layouts/NtosWindow.scss +26 -0
  129. package/styles/layouts/TitleBar.scss +111 -0
  130. package/styles/layouts/Window.scss +103 -0
  131. package/styles/main.scss +97 -0
  132. package/styles/reset.scss +68 -0
  133. package/styles/themes/abductor.scss +68 -0
  134. package/styles/themes/admin.scss +38 -0
  135. package/styles/themes/cardtable.scss +57 -0
  136. package/styles/themes/hackerman.scss +70 -0
  137. package/styles/themes/malfunction.scss +67 -0
  138. package/styles/themes/neutral.scss +50 -0
  139. package/styles/themes/ntOS95.scss +166 -0
  140. package/styles/themes/ntos.scss +44 -0
  141. package/styles/themes/ntos_cat.scss +148 -0
  142. package/styles/themes/ntos_darkmode.scss +44 -0
  143. package/styles/themes/ntos_lightmode.scss +67 -0
  144. package/styles/themes/ntos_spooky.scss +69 -0
  145. package/styles/themes/ntos_synth.scss +99 -0
  146. package/styles/themes/ntos_terminal.scss +112 -0
  147. package/styles/themes/paper.scss +184 -0
  148. package/styles/themes/retro.scss +72 -0
  149. package/styles/themes/spookyconsole.scss +73 -0
  150. package/styles/themes/syndicate.scss +67 -0
  151. package/styles/themes/wizard.scss +68 -0
  152. package/tsconfig.json +34 -0
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Copyright (c) 2020 Aleksej Komarov
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ @use '../base.scss';
7
+
8
+ $separator-color: base.$color-bg-section;
9
+ $background-color: base.$color-bg !default;
10
+ $dropdown-z-index: 5;
11
+
12
+ .MenuBar {
13
+ display: flex;
14
+ }
15
+
16
+ .MenuBar__font {
17
+ font-family: Verdana, sans-serif;
18
+ font-size: base.em(12px);
19
+ line-height: base.em(17px);
20
+ }
21
+
22
+ .MenuBar__hover {
23
+ &:hover {
24
+ background-color: lighten($background-color, 30%);
25
+ transition: background-color 0ms;
26
+ }
27
+ }
28
+
29
+ .MenuBar__MenuBarButton {
30
+ padding: 0.2rem 0.5rem 0.2rem 0.5rem;
31
+ }
32
+
33
+ .MenuBar__menu {
34
+ position: absolute;
35
+ z-index: $dropdown-z-index;
36
+ background-color: $background-color;
37
+ padding: 0.3rem 0.3rem 0.3rem 0.3rem;
38
+ box-shadow: 4px 6px 5px -2px rgba(0, 0, 0, 0.55);
39
+ }
40
+
41
+ .MenuBar__MenuItem {
42
+ z-index: $dropdown-z-index;
43
+ transition: background-color 100ms ease-out;
44
+ background-color: $background-color;
45
+ white-space: nowrap;
46
+ padding: 0.3rem 2rem 0.3rem 3rem;
47
+ }
48
+
49
+ .MenuBar__MenuItemToggle {
50
+ padding: 0.3rem 2rem 0.3rem 0;
51
+ }
52
+
53
+ .MenuBar__MenuItemToggle__check {
54
+ display: inline-block;
55
+ vertical-align: middle;
56
+ min-width: 3rem;
57
+ margin-left: 0.3rem;
58
+ }
59
+
60
+ .MenuBar__over {
61
+ top: auto;
62
+ bottom: 100%;
63
+ }
64
+
65
+ .MenuBar__MenuBarButton-text {
66
+ text-overflow: clip;
67
+ white-space: nowrap;
68
+ height: base.em(17px);
69
+ }
70
+
71
+ .MenuBar__Separator {
72
+ display: block;
73
+ margin: 0.3rem 0.3rem 0.3rem 2.3rem;
74
+ border-top: 1px solid $separator-color;
75
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Copyright (c) 2020 Aleksej Komarov
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ @use '../base.scss';
7
+
8
+ $background-color: base.$color-bg !default;
9
+
10
+ .Modal {
11
+ background-color: $background-color;
12
+ max-width: calc(100% - 1rem);
13
+ padding: 1rem;
14
+ }
@@ -0,0 +1,65 @@
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' as *;
10
+
11
+ // NoticeBox
12
+ $background-color: #bb9b68 !default;
13
+ $color-stripes: rgba(0, 0, 0, 0.1) !default;
14
+ $color-border: #272727 !default;
15
+ $bg-map: colors.$bg-map !default;
16
+
17
+ .NoticeBox {
18
+ // Adapt text color to background luminance to ensure high contast
19
+ $luminance: luminance($background-color);
20
+ $text-color: if($luminance > 0.35, rgba(0, 0, 0, 1), rgba(255, 255, 255, 1));
21
+
22
+ padding: 0.33em 0.5em;
23
+ margin-bottom: 0.5em;
24
+ box-shadow: none;
25
+ font-weight: bold;
26
+ font-style: italic;
27
+ color: $text-color;
28
+ background-color: $background-color;
29
+ background-image: repeating-linear-gradient(
30
+ -45deg,
31
+ transparent,
32
+ transparent base.em(10px),
33
+ $color-stripes base.em(10px),
34
+ $color-stripes base.em(20px)
35
+ );
36
+ }
37
+
38
+ @mixin box-color($color) {
39
+ $luminance: luminance($color);
40
+ $text-color: if($luminance > 0.35, rgba(0, 0, 0, 1), rgba(255, 255, 255, 1));
41
+ color: $text-color;
42
+ background-color: color.adjust($color, $saturation: -15%, $lightness: -15%);
43
+ }
44
+
45
+ @each $color-name, $color-value in $bg-map {
46
+ .NoticeBox--color--#{$color-name} {
47
+ @include box-color($color-value);
48
+ }
49
+ }
50
+
51
+ .NoticeBox--type--info {
52
+ @include box-color(colors.$blue);
53
+ }
54
+
55
+ .NoticeBox--type--success {
56
+ @include box-color(colors.$green);
57
+ }
58
+
59
+ .NoticeBox--type--warning {
60
+ @include box-color(colors.$orange);
61
+ }
62
+
63
+ .NoticeBox--type--danger {
64
+ @include box-color(colors.$red);
65
+ }
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Copyright (c) 2020 Aleksej Komarov
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ @use 'sass:color';
7
+ @use '../base.scss';
8
+ @use '../functions.scss' as *;
9
+ @use './Input.scss';
10
+
11
+ $text-color: Input.$text-color !default;
12
+ $background-color: Input.$background-color !default;
13
+ $border-color: Input.$border-color !default;
14
+ $border-radius: Input.$border-radius !default;
15
+
16
+ .NumberInput {
17
+ position: relative;
18
+ display: inline-block;
19
+ border: base.em(1px) solid $border-color;
20
+ border: base.em(1px) solid rgba($border-color, 0.75);
21
+ border-radius: $border-radius;
22
+ color: $border-color;
23
+ background-color: $background-color;
24
+ padding: 0 base.em(4px);
25
+ margin-right: base.em(2px);
26
+ line-height: base.em(17px);
27
+ text-align: right;
28
+ overflow: visible;
29
+ cursor: n-resize;
30
+ }
31
+
32
+ .NumberInput--fluid {
33
+ display: block;
34
+ }
35
+
36
+ .NumberInput__content {
37
+ margin-left: 0.5em;
38
+ }
39
+
40
+ .NumberInput__barContainer {
41
+ position: absolute;
42
+ top: base.em(2px);
43
+ bottom: base.em(2px);
44
+ left: base.em(2px);
45
+ }
46
+
47
+ .NumberInput__bar {
48
+ position: absolute;
49
+ bottom: 0;
50
+ left: 0;
51
+ width: base.em(3px);
52
+ box-sizing: border-box;
53
+ border-bottom: base.em(1px) solid $border-color;
54
+ background-color: $border-color;
55
+ }
56
+
57
+ .NumberInput__input {
58
+ display: block;
59
+ position: absolute;
60
+ top: 0;
61
+ bottom: 0;
62
+ left: 0;
63
+ right: 0;
64
+ border: 0;
65
+ outline: 0;
66
+ width: 100%;
67
+ font-size: base.em(12px);
68
+ line-height: base.em(17px);
69
+ height: base.em(17px);
70
+ margin: 0;
71
+ padding: 0 0.5em;
72
+ font-family: Verdana, sans-serif;
73
+ background-color: $background-color;
74
+ color: $text-color;
75
+ text-align: right;
76
+ }
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Copyright (c) 2020 Aleksej Komarov
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ @use '../base.scss';
7
+ @use '../colors.scss';
8
+ @use '../functions.scss' as *;
9
+
10
+ $color-default-fill: colors.bg(colors.$primary) !default;
11
+ $background-color: rgba(0, 0, 0, 0) !default;
12
+ $border-radius: base.$border-radius !default;
13
+ $bg-map: colors.$bg-map !default;
14
+
15
+ .ProgressBar {
16
+ display: inline-block;
17
+ position: relative;
18
+ width: 100%;
19
+ padding: 0 0.5em;
20
+ border-width: base.em(1px) !important;
21
+ border-style: solid !important;
22
+ border-radius: $border-radius;
23
+ background-color: $background-color;
24
+ transition: border-color 900ms ease-out;
25
+ }
26
+
27
+ .ProgressBar__fill {
28
+ position: absolute;
29
+ top: -0.5px;
30
+ left: 0px;
31
+ bottom: -0.5px;
32
+ }
33
+
34
+ .ProgressBar__fill--animated {
35
+ transition:
36
+ background-color 900ms ease-out,
37
+ width 900ms ease-out;
38
+ }
39
+
40
+ .ProgressBar__content {
41
+ position: relative;
42
+ line-height: base.em(17px);
43
+ width: 100%;
44
+ text-align: right;
45
+ }
46
+
47
+ .ProgressBar--color--default {
48
+ border: base.em(1px) solid $color-default-fill;
49
+
50
+ .ProgressBar__fill {
51
+ background-color: $color-default-fill;
52
+ }
53
+ }
54
+
55
+ @each $color-name, $color-value in $bg-map {
56
+ .ProgressBar--color--#{$color-name} {
57
+ border-color: $color-value !important;
58
+
59
+ .ProgressBar__fill {
60
+ background-color: $color-value;
61
+ }
62
+ }
63
+ }
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Copyright (c) 2020 bobbahbrown (https://github.com/bobbahbrown)
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ @use '../base.scss';
7
+ @use '../colors.scss';
8
+ @use '../functions.scss' as *;
9
+
10
+ $fg-map: colors.$fg-map !default;
11
+ $ring-color: #6a96c9 !default;
12
+
13
+ .RoundGauge {
14
+ font-size: 1rem;
15
+ width: 2.6em;
16
+ height: 1.3em;
17
+ margin: 0 auto;
18
+ margin-bottom: 0.2em;
19
+ }
20
+
21
+ $pi: 3.1416;
22
+
23
+ .RoundGauge__ringTrack {
24
+ fill: transparent;
25
+ stroke: rgba(255, 255, 255, 0.1);
26
+ stroke-width: 10;
27
+ stroke-dasharray: 50 * $pi;
28
+ stroke-dashoffset: 50 * $pi;
29
+ }
30
+
31
+ .RoundGauge__ringFill {
32
+ fill: transparent;
33
+ stroke: $ring-color;
34
+ stroke-width: 10;
35
+ stroke-dasharray: 100 * $pi;
36
+ transition: stroke 50ms ease-out;
37
+ }
38
+
39
+ .RoundGauge__needle,
40
+ .RoundGauge__ringFill {
41
+ transition: transform 50ms ease-in-out;
42
+ }
43
+
44
+ .RoundGauge__needleLine,
45
+ .RoundGauge__needleMiddle {
46
+ fill: colors.$bad;
47
+ }
48
+
49
+ .RoundGauge__alert {
50
+ fill-rule: evenodd;
51
+ clip-rule: evenodd;
52
+ stroke-linejoin: round;
53
+ stroke-miterlimit: 2;
54
+ fill: rgba(255, 255, 255, 0.1);
55
+ }
56
+
57
+ .RoundGauge__alert.max {
58
+ fill: colors.$bad;
59
+ }
60
+
61
+ @each $color-name, $color-value in $fg-map {
62
+ .RoundGauge--color--#{$color-name}.RoundGauge__ringFill {
63
+ stroke: $color-value;
64
+ }
65
+ }
66
+
67
+ @each $color-name, $color-value in $fg-map {
68
+ .RoundGauge__alert--#{$color-name} {
69
+ fill: $color-value;
70
+ transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1);
71
+ animation: RoundGauge__alertAnim
72
+ 1s
73
+ cubic-bezier(0.34, 1.56, 0.64, 1)
74
+ infinite;
75
+ }
76
+ }
77
+
78
+ @keyframes RoundGauge__alertAnim {
79
+ 0% {
80
+ opacity: 0.1;
81
+ }
82
+ 50% {
83
+ opacity: 1;
84
+ }
85
+ 100% {
86
+ opacity: 0.1;
87
+ }
88
+ }
@@ -0,0 +1,143 @@
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
+ .Section__title {
28
+ position: relative;
29
+ padding: 0.5em;
30
+ border-bottom: base.em(2px) solid $separator-color;
31
+ }
32
+
33
+ .Section__titleText {
34
+ font-size: base.em(14px);
35
+ font-weight: bold;
36
+ color: $title-text-color;
37
+ }
38
+
39
+ .Section__buttons {
40
+ position: absolute;
41
+ display: inline-block;
42
+ right: 0.5em;
43
+ margin-top: base.em(-1px);
44
+ }
45
+
46
+ .Section__rest {
47
+ position: relative;
48
+ }
49
+
50
+ .Section__content {
51
+ padding: 0.66em 0.5em;
52
+ }
53
+
54
+ .Section--fitted > .Section__rest > .Section__content {
55
+ padding: 0;
56
+ }
57
+
58
+ .Section--fill {
59
+ display: flex;
60
+ flex-direction: column;
61
+ height: 100%;
62
+ }
63
+
64
+ .Section--fill > .Section__rest {
65
+ flex-grow: 1;
66
+ }
67
+
68
+ .Section--fill > .Section__rest > .Section__content {
69
+ height: 100%;
70
+ }
71
+
72
+ .Section--fill.Section--scrollable > .Section__rest > .Section__content {
73
+ position: absolute;
74
+ top: 0;
75
+ left: 0;
76
+ right: 0;
77
+ bottom: 0;
78
+ }
79
+
80
+ .Section--fill.Section--iefix {
81
+ display: table !important;
82
+ width: 100% !important;
83
+ height: 100% !important;
84
+ border-collapse: collapse;
85
+ border-spacing: 0;
86
+
87
+ & > .Section__rest {
88
+ display: table-row !important;
89
+ height: 100% !important;
90
+ }
91
+ }
92
+
93
+ .Section--scrollable {
94
+ overflow-x: hidden;
95
+ overflow-y: hidden;
96
+
97
+ & > .Section__rest > .Section__content {
98
+ overflow-y: scroll;
99
+ overflow-x: hidden;
100
+ }
101
+ }
102
+
103
+ .Section--scrollableHorizontal {
104
+ overflow-x: hidden;
105
+ overflow-y: hidden;
106
+
107
+ & > .Section__rest > .Section__content {
108
+ overflow-y: hidden;
109
+ overflow-x: scroll;
110
+ }
111
+ }
112
+
113
+ .Section--scrollable.Section--scrollableHorizontal {
114
+ overflow-x: hidden;
115
+ overflow-y: hidden;
116
+
117
+ & > .Section__rest > .Section__content {
118
+ overflow-y: scroll;
119
+ overflow-x: scroll;
120
+ }
121
+ }
122
+
123
+ // Nested sections
124
+ .Section .Section {
125
+ background-color: transparent;
126
+ margin-left: -0.5em;
127
+ margin-right: -0.5em;
128
+
129
+ // Remove extra space above the first nested section
130
+ &:first-child {
131
+ margin-top: -0.5em;
132
+ }
133
+ }
134
+
135
+ // Level 2 section title
136
+ .Section .Section .Section__titleText {
137
+ font-size: base.em(13px);
138
+ }
139
+
140
+ // Level 3 section title
141
+ .Section .Section .Section .Section__titleText {
142
+ font-size: base.em(12px);
143
+ }
@@ -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
+ .Slider__cursorOffset {
17
+ position: absolute;
18
+ top: 0;
19
+ left: 0;
20
+ bottom: 0;
21
+ transition: none !important;
22
+ }
23
+
24
+ .Slider__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
+ .Slider__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
+ .Slider__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,59 @@
1
+ /**
2
+ * Copyright (c) 2021 Aleksej Komarov
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ @use '../base.scss';
7
+ @use './Divider.scss';
8
+
9
+ $zebra-background-color: base.$color-bg-section !default;
10
+
11
+ .Stack--fill {
12
+ height: 100%;
13
+ }
14
+
15
+ .Stack--horizontal > .Stack__item {
16
+ margin-left: 0.5em;
17
+
18
+ &:first-child {
19
+ margin-left: 0;
20
+ }
21
+ }
22
+
23
+ .Stack--vertical > .Stack__item {
24
+ margin-top: 0.5em;
25
+
26
+ &:first-child {
27
+ margin-top: 0;
28
+ }
29
+ }
30
+
31
+ .Stack--reverse > .Stack__item {
32
+ margin-left: 0;
33
+ margin-right: 0.5em;
34
+
35
+ &:first-child {
36
+ margin-right: 0;
37
+ }
38
+ }
39
+
40
+ .Stack--reverse--vertical > .Stack__item {
41
+ margin-top: 0;
42
+ margin-bottom: 0.5em;
43
+
44
+ &:first-child {
45
+ margin-bottom: 0;
46
+ }
47
+ }
48
+
49
+ .Stack--zebra > .Stack__item:nth-child(even) {
50
+ background-color: $zebra-background-color;
51
+ }
52
+
53
+ .Stack--horizontal > .Stack__divider:not(.Stack__divider--hidden) {
54
+ border-left: Divider.$thickness solid Divider.$color;
55
+ }
56
+
57
+ .Stack--vertical > .Stack__divider:not(.Stack__divider--hidden) {
58
+ border-top: Divider.$thickness solid Divider.$color;
59
+ }
@@ -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
+ .Table--collapsing {
15
+ width: auto;
16
+ }
17
+
18
+ .Table__row {
19
+ display: table-row;
20
+ }
21
+
22
+ .Table__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
+ .Table__row--header .Table__cell,
36
+ .Table__cell--header {
37
+ font-weight: bold;
38
+ padding-bottom: 0.5em;
39
+ }
40
+
41
+ .Table__cell--collapsing {
42
+ width: 1%;
43
+ white-space: nowrap;
44
+ }