tgui-core 1.8.4 → 2.0.1
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/common/constants.d.ts +4 -0
- package/dist/common/constants.js +17 -0
- package/dist/common/hotkeys.js +48 -48
- package/dist/common/ui.d.ts +6 -0
- package/dist/common/ui.js +63 -59
- package/dist/components/AnimatedNumber.d.ts +1 -1
- package/dist/components/Button.d.ts +3 -3
- package/dist/components/Button.js +21 -22
- package/dist/components/Chart.d.ts +3 -15
- package/dist/components/Chart.js +68 -86
- package/dist/components/ColorBox.js +3 -3
- package/dist/components/Dialog.d.ts +16 -0
- package/dist/components/Dialog.js +5 -5
- package/dist/components/DmIcon.d.ts +1 -1
- package/dist/components/DraggableControl.d.ts +56 -0
- package/dist/components/DraggableControl.js +126 -176
- package/dist/components/Dropdown.d.ts +8 -6
- package/dist/components/Dropdown.js +137 -129
- package/dist/components/FitText.d.ts +1 -1
- package/dist/components/Floating.d.ts +75 -0
- package/dist/components/Floating.js +2235 -0
- package/dist/components/ImageButton.d.ts +2 -3
- package/dist/components/ImageButton.js +88 -98
- package/dist/components/InfinitePlane.d.ts +35 -32
- package/dist/components/InfinitePlane.js +123 -133
- package/dist/components/Knob.d.ts +22 -6
- package/dist/components/Knob.js +45 -46
- package/dist/components/MenuBar.js +81 -97
- package/dist/components/Modal.js +12 -12
- package/dist/components/NumberInput.d.ts +1 -1
- package/dist/components/Popper.d.ts +5 -1
- package/dist/components/Popper.js +1026 -121
- package/dist/components/ProgressBar.js +3 -3
- package/dist/components/RoundGauge.js +30 -30
- package/dist/components/Section.js +7 -7
- package/dist/components/Slider.d.ts +22 -6
- package/dist/components/Slider.js +55 -56
- package/dist/components/Stack.js +3 -3
- package/dist/components/Table.js +7 -7
- package/dist/components/Tabs.js +7 -7
- package/dist/components/TextArea.d.ts +17 -0
- package/dist/components/TextArea.js +35 -33
- package/dist/components/Tooltip.d.ts +3 -34
- package/dist/components/Tooltip.js +14 -77
- package/dist/components/TrackOutsideClicks.d.ts +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +64 -62
- package/package.json +26 -27
- package/styles/base.scss +13 -11
- package/styles/colors.scss +63 -67
- package/styles/components/BlockQuote.scss +5 -8
- package/styles/components/Button.scss +123 -99
- package/styles/components/Dialog.scss +23 -30
- package/styles/components/Dimmer.scss +3 -8
- package/styles/components/Divider.scss +6 -7
- package/styles/components/Dropdown.scss +103 -51
- package/styles/components/Flex.scss +0 -1
- package/styles/components/Floating.scss +60 -0
- package/styles/components/ImageButton.scss +136 -192
- package/styles/components/Input.scss +24 -26
- package/styles/components/Knob.scss +37 -41
- package/styles/components/LabeledList.scss +8 -6
- package/styles/components/MenuBar.scss +17 -21
- package/styles/components/Modal.scss +8 -7
- package/styles/components/NoticeBox.scss +22 -26
- package/styles/components/NumberInput.scss +30 -28
- package/styles/components/ProgressBar.scss +27 -19
- package/styles/components/RoundGauge.scss +46 -26
- package/styles/components/Section.scss +17 -32
- package/styles/components/Slider.scss +18 -15
- package/styles/components/Stack.scss +8 -48
- package/styles/components/Table.scss +2 -2
- package/styles/components/Tabs.scss +92 -66
- package/styles/components/TextArea.scss +32 -36
- package/styles/components/Tooltip.scss +10 -13
- package/styles/functions.scss +1 -62
- package/styles/main.scss +6 -1
- package/styles/reset.scss +7 -11
- package/styles/vars-colors.scss +108 -0
- package/styles/vars-components.scss +162 -0
- package/styles/vars-values.scss +110 -0
- package/dist/popper-CiqSDJTE.js +0 -906
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
@use "../base";
|
|
2
|
-
@use "../functions" as *;
|
|
3
2
|
@use "./Input";
|
|
4
3
|
|
|
5
|
-
$text-color:
|
|
6
|
-
$background-color:
|
|
7
|
-
$border-color:
|
|
8
|
-
$border-radius:
|
|
4
|
+
$text-color: 0 !default;
|
|
5
|
+
$background-color: 0 !default;
|
|
6
|
+
$border-color: 0 !default;
|
|
7
|
+
$border-radius: 0 !default;
|
|
9
8
|
|
|
10
9
|
.TextArea {
|
|
11
|
-
|
|
10
|
+
background-color: var(--input-background);
|
|
11
|
+
border-radius: var(--input-border-radius);
|
|
12
|
+
border: var(--border-thickness-tiny) solid var(--input-border-color);
|
|
13
|
+
box-sizing: border-box;
|
|
12
14
|
display: inline-block;
|
|
13
|
-
border: base.em(1px) solid $border-color;
|
|
14
|
-
border: base.em(1px) solid rgba($border-color, 0.75);
|
|
15
|
-
border-radius: $border-radius;
|
|
16
|
-
background-color: $background-color;
|
|
17
|
-
margin-right: base.em(2px);
|
|
18
15
|
line-height: base.em(17px);
|
|
19
|
-
|
|
16
|
+
margin-right: base.em(2px);
|
|
17
|
+
position: relative;
|
|
20
18
|
width: 100%;
|
|
19
|
+
&:focus-within {
|
|
20
|
+
border-color: var(--input-border-color-focus);
|
|
21
|
+
}
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
.TextArea--fluid {
|
|
24
25
|
display: block;
|
|
25
|
-
width: auto;
|
|
26
26
|
height: auto;
|
|
27
|
+
width: auto;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
.TextArea--noborder {
|
|
@@ -31,39 +32,34 @@ $border-radius: Input.$border-radius !default;
|
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
.TextArea__textarea.TextArea__textarea--scrollable {
|
|
34
|
-
overflow: auto;
|
|
35
|
-
overflow-x: hidden;
|
|
36
|
-
overflow-y: scroll;
|
|
35
|
+
overflow: hidden auto;
|
|
37
36
|
}
|
|
38
37
|
|
|
39
38
|
.TextArea__textarea {
|
|
40
|
-
|
|
41
|
-
position: absolute;
|
|
42
|
-
top: 0;
|
|
43
|
-
bottom: 0;
|
|
44
|
-
left: 0;
|
|
45
|
-
right: 0;
|
|
39
|
+
background-color: transparent;
|
|
46
40
|
border: 0;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
color: var(--input-color);
|
|
43
|
+
display: block;
|
|
44
|
+
font-family: inherit;
|
|
50
45
|
font-size: 1em;
|
|
46
|
+
height: 100%;
|
|
47
|
+
inset: 0;
|
|
51
48
|
line-height: base.em(17px);
|
|
52
|
-
min-height: base.em(17px);
|
|
53
49
|
margin: 0;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
min-height: base.em(17px);
|
|
51
|
+
outline: 0;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
padding: 0 var(--space-m);
|
|
54
|
+
position: absolute;
|
|
55
|
+
resize: none;
|
|
56
|
+
width: 100%;
|
|
59
57
|
// Make sure the div and the textarea wrap words in the same way
|
|
60
58
|
word-wrap: break-word;
|
|
61
|
-
overflow: hidden;
|
|
62
59
|
|
|
63
|
-
|
|
60
|
+
&::placeholder {
|
|
64
61
|
font-style: italic;
|
|
65
|
-
color:
|
|
66
|
-
color: hsla(0, 0%, 100%, 0.45);
|
|
62
|
+
color: var(--input-color-placeholder);
|
|
67
63
|
}
|
|
68
64
|
}
|
|
69
65
|
|
|
@@ -73,7 +69,7 @@ $border-radius: Input.$border-radius !default;
|
|
|
73
69
|
}
|
|
74
70
|
|
|
75
71
|
.TextArea__nowrap {
|
|
76
|
-
white-space: nowrap;
|
|
77
72
|
overflow-wrap: normal;
|
|
78
73
|
overflow-x: scroll;
|
|
74
|
+
white-space: nowrap;
|
|
79
75
|
}
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
@use "../base";
|
|
2
|
-
@use "../functions" as *;
|
|
3
2
|
|
|
4
|
-
$color:
|
|
5
|
-
$background-color:
|
|
6
|
-
$border-radius:
|
|
3
|
+
$color: 0 !default;
|
|
4
|
+
$background-color: 0 !default;
|
|
5
|
+
$border-radius: 0 !default;
|
|
7
6
|
|
|
8
7
|
.Tooltip {
|
|
9
|
-
|
|
8
|
+
backdrop-filter: var(--tooltip-blur);
|
|
9
|
+
background-color: var(--tooltip-background);
|
|
10
|
+
border-radius: var(--tooltip-border-radius);
|
|
11
|
+
box-shadow: 0.1em 0.1em 1.25em -0.1em hsla(0, 0%, 0%, 0.5);
|
|
12
|
+
color: var(--tooltip-color);
|
|
13
|
+
max-width: base.em(250px);
|
|
14
|
+
padding: var(--space-m) var(--space-l);
|
|
10
15
|
pointer-events: none;
|
|
11
16
|
text-align: left;
|
|
12
|
-
transition: opacity 150ms ease-out;
|
|
13
|
-
background-color: $background-color;
|
|
14
|
-
color: $color;
|
|
15
|
-
box-shadow: 0.1em 0.1em 1.25em -0.1em rgba(0, 0, 0, 0.5);
|
|
16
|
-
border-radius: $border-radius;
|
|
17
|
-
max-width: base.em(250px);
|
|
18
|
-
// Must be over everything
|
|
19
|
-
z-index: 999;
|
|
20
17
|
}
|
package/styles/functions.scss
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
@use "sass:color";
|
|
2
|
-
@use "sass:map";
|
|
3
1
|
@use "sass:math";
|
|
4
|
-
@use "sass:meta";
|
|
5
2
|
|
|
6
|
-
|
|
7
|
-
// --------------------------------------------------------
|
|
8
|
-
|
|
9
|
-
// Get a unit-less numeric value
|
|
3
|
+
/* Type-casting: Get a unit-less numeric value */
|
|
10
4
|
@function num($value) {
|
|
11
5
|
@if meta.type-of($value) != number {
|
|
12
6
|
@error 'Could not convert `#{$value}` - must be `type-of number`';
|
|
@@ -17,58 +11,3 @@
|
|
|
17
11
|
}
|
|
18
12
|
@return math.div($value, $value * 0 + 1);
|
|
19
13
|
}
|
|
20
|
-
|
|
21
|
-
// Color
|
|
22
|
-
// --------------------------------------------------------
|
|
23
|
-
|
|
24
|
-
// Increases perceptual color lightness.
|
|
25
|
-
@function lighten($color, $percent) {
|
|
26
|
-
$scaled: hsl(
|
|
27
|
-
color.channel($color, "hue", $space: hsl),
|
|
28
|
-
color.channel($color, "saturation", $space: hsl),
|
|
29
|
-
color.channel($color, "lightness", $space: hsl) * (1 + num($percent))
|
|
30
|
-
);
|
|
31
|
-
$mixed: color.mix(hsl(0, 0%, 100%), $color, 100% * num($percent));
|
|
32
|
-
@return color.mix($scaled, $mixed, 75%);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// Returns the NTSC luminance of `$color` as a float (between 0 and 1).
|
|
36
|
-
// 1 is pure white, 0 is pure black.
|
|
37
|
-
@function luminance($color) {
|
|
38
|
-
$colors: (
|
|
39
|
-
"red": color.channel($color, "red", $space: rgb),
|
|
40
|
-
"green": color.channel($color, "green", $space: rgb),
|
|
41
|
-
"blue": color.channel($color, "blue", $space: rgb),
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
@each $name, $value in $colors {
|
|
45
|
-
$adjusted: 0;
|
|
46
|
-
$value: math.div($value, 255);
|
|
47
|
-
@if $value < 0.03928 {
|
|
48
|
-
$value: math.div($value, 12.92);
|
|
49
|
-
} @else {
|
|
50
|
-
$value: math.div($value + 0.055, 1.055);
|
|
51
|
-
$value: math.pow($value, 2.4);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
$colors: map.merge(
|
|
55
|
-
$colors,
|
|
56
|
-
(
|
|
57
|
-
$name: $value,
|
|
58
|
-
)
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
@return (map.get($colors, "red") * 0.2126) +
|
|
63
|
-
(map.get($colors, "green") * 0.7152) + (map.get($colors, "blue") * 0.0722);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// Blends an RGBA color with a static background color based on its
|
|
67
|
-
// alpha channel. Returns an RGB color, which is compatible with IE8.
|
|
68
|
-
@function fake-alpha($color-rgba, $color-background) {
|
|
69
|
-
@return color.mix(
|
|
70
|
-
color.change($color-rgba, $alpha: 1),
|
|
71
|
-
$color-background,
|
|
72
|
-
color.alpha($color-rgba) * 100%
|
|
73
|
-
);
|
|
74
|
-
}
|
package/styles/main.scss
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
@use "sass:meta";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
// CSS Variables
|
|
4
|
+
@use "./vars-colors";
|
|
5
|
+
@use "./vars-values";
|
|
6
|
+
@use "./vars-components";
|
|
3
7
|
|
|
4
8
|
// Core styles
|
|
5
9
|
@include meta.load-css("./reset.scss");
|
|
@@ -13,6 +17,7 @@
|
|
|
13
17
|
@include meta.load-css("./components/Divider.scss");
|
|
14
18
|
@include meta.load-css("./components/Dropdown.scss");
|
|
15
19
|
@include meta.load-css("./components/Flex.scss");
|
|
20
|
+
@include meta.load-css("./components/Floating.scss");
|
|
16
21
|
@include meta.load-css("./components/Icon.scss");
|
|
17
22
|
@include meta.load-css("./components/ImageButton.scss");
|
|
18
23
|
@include meta.load-css("./components/Input.scss");
|
package/styles/reset.scss
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
@use "base";
|
|
2
|
-
|
|
3
1
|
html,
|
|
4
2
|
body {
|
|
5
3
|
box-sizing: border-box;
|
|
6
4
|
height: 100%;
|
|
7
5
|
margin: 0;
|
|
8
|
-
font-size:
|
|
6
|
+
font-size: var(--font-size, 12px);
|
|
7
|
+
color: var(--color-text, hsl(0, 0%, 100%));
|
|
8
|
+
scrollbar-color: var(--color-scrollbar-thumb) var(--color-scrollbar-base);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
html {
|
|
12
|
+
cursor: var(--cursor-default, default); // Reset the cursor.
|
|
12
13
|
overflow: hidden;
|
|
13
|
-
cursor: default; // Reset the cursor.
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
body {
|
|
17
17
|
overflow: auto;
|
|
18
|
-
font-family: Verdana, Geneva, sans-serif;
|
|
18
|
+
font-family: var(--font-family, Verdana, Geneva, sans-serif);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
*,
|
|
@@ -32,27 +32,23 @@ h5,
|
|
|
32
32
|
h6 {
|
|
33
33
|
display: block;
|
|
34
34
|
margin: 0;
|
|
35
|
-
padding: 6px 0;
|
|
36
|
-
padding: 0.5rem 0;
|
|
35
|
+
padding: var(--space-m, 6px) 0;
|
|
36
|
+
padding: var(--space-m, 0.5rem) 0;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
h1 {
|
|
40
|
-
font-size: 18px;
|
|
41
40
|
font-size: 1.5rem;
|
|
42
41
|
}
|
|
43
42
|
|
|
44
43
|
h2 {
|
|
45
|
-
font-size: 16px;
|
|
46
44
|
font-size: 1.333rem;
|
|
47
45
|
}
|
|
48
46
|
|
|
49
47
|
h3 {
|
|
50
|
-
font-size: 14px;
|
|
51
48
|
font-size: 1.167rem;
|
|
52
49
|
}
|
|
53
50
|
|
|
54
51
|
h4 {
|
|
55
|
-
font-size: 12px;
|
|
56
52
|
font-size: 1rem;
|
|
57
53
|
}
|
|
58
54
|
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TGUI
|
|
3
|
+
* Main Colors
|
|
4
|
+
*
|
|
5
|
+
* This file contains all the main colors that are
|
|
6
|
+
* used elsewhere and are mixed/modified to
|
|
7
|
+
* suit the needs of the components/ui's.
|
|
8
|
+
*
|
|
9
|
+
* The main goal is to standardize colors.
|
|
10
|
+
* When adding new independent colors, you should add them here.
|
|
11
|
+
*
|
|
12
|
+
* Overwriting these variables will have an extreme impact
|
|
13
|
+
* on the global appearance of the entire TGUI, as they are used everywhere.
|
|
14
|
+
* For finer customization of components, use vars-components.scss
|
|
15
|
+
*
|
|
16
|
+
* Made with love by Aylong (https://github.com/AyIong)
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
:root {
|
|
20
|
+
/* Background colors */
|
|
21
|
+
--color-base: hsl(0, 0%, 15%);
|
|
22
|
+
--color-section: hsla(0, 0%, 0%, 0.33);
|
|
23
|
+
--color-secondary: hsl(
|
|
24
|
+
from var(--color-base) var(--secondary-hue) var(--secondary-saturation)
|
|
25
|
+
calc(l + var(--secondary-lightness-adjustment))
|
|
26
|
+
);
|
|
27
|
+
--secondary-hue: h;
|
|
28
|
+
--secondary-saturation: s;
|
|
29
|
+
--secondary-lightness-adjustment: 7.5;
|
|
30
|
+
--base-gradient-spread: 2;
|
|
31
|
+
--color-base-start: hsl(
|
|
32
|
+
from var(--color-base) h s calc(l + var(--base-gradient-spread))
|
|
33
|
+
);
|
|
34
|
+
--color-base-end: hsl(
|
|
35
|
+
from var(--color-base) h s calc(l - var(--base-gradient-spread))
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
/* Scrollbar */
|
|
39
|
+
--color-scrollbar-base: var(--color-section);
|
|
40
|
+
--color-scrollbar-thumb: hsl(from var(--color-base) h s calc(l + 9.25));
|
|
41
|
+
|
|
42
|
+
/* Candystripe */
|
|
43
|
+
--candystripe-odd: hsla(0, 0%, 0%, 0.25);
|
|
44
|
+
--candystripe-even: transparent;
|
|
45
|
+
|
|
46
|
+
/* Base colors */
|
|
47
|
+
--color-red: hsl(0, 70%, 50%);
|
|
48
|
+
--color-orange: hsl(25, 90%, 50%);
|
|
49
|
+
--color-yellow: hsl(50, 97.5%, 50%);
|
|
50
|
+
--color-olive: hsl(70, 75%, 45%);
|
|
51
|
+
--color-green: hsl(140, 70%, 40%);
|
|
52
|
+
--color-teal: hsl(180, 100%, 35%);
|
|
53
|
+
--color-blue: hsl(210, 65%, 47.5%);
|
|
54
|
+
--color-violet: hsl(260, 60%, 50%);
|
|
55
|
+
--color-purple: hsl(290, 60%, 50%);
|
|
56
|
+
--color-pink: hsl(325, 70%, 50%);
|
|
57
|
+
--color-brown: hsl(25, 47.5%, 45%);
|
|
58
|
+
|
|
59
|
+
/* Grayscale colors */
|
|
60
|
+
--color-black: hsl(0, 0%, 0%);
|
|
61
|
+
--color-white: hsl(0, 0%, 100%);
|
|
62
|
+
--color-grey: hsl(0, 0%, 50%);
|
|
63
|
+
--color-light-grey: hsl(0, 0%, 66.6%);
|
|
64
|
+
--color-gray: var(--color-grey);
|
|
65
|
+
--color-light-gray: var(--color-light-grey);
|
|
66
|
+
|
|
67
|
+
/* Action colors */
|
|
68
|
+
--color-action: hsl(0, 0%, 50%);
|
|
69
|
+
--color-hover: hsl(from var(--color-action) h s l / 0.25);
|
|
70
|
+
--color-active: hsl(from var(--color-action) h s l / 0.3);
|
|
71
|
+
--color-selected: hsl(from var(--color-action) h s l / 0.4);
|
|
72
|
+
|
|
73
|
+
/* Semantic colors */
|
|
74
|
+
--primary-hue: 210;
|
|
75
|
+
--primary-saturation: 37.5%;
|
|
76
|
+
--primary-lightness: 45%;
|
|
77
|
+
/* prettier-ignore */
|
|
78
|
+
--color-primary: hsl(var(--primary-hue), var(--primary-saturation), var(--primary-lightness));
|
|
79
|
+
--color-good: hsl(95, 62.5%, 40%);
|
|
80
|
+
--color-average: hsl(32.5, 90%, 50%);
|
|
81
|
+
--color-bad: hsl(0, 72.5%, 50%);
|
|
82
|
+
--color-label: hsl(from var(--color-primary) h 17.5 57.5);
|
|
83
|
+
|
|
84
|
+
/* Text colors */
|
|
85
|
+
--color-text: var(--color-white);
|
|
86
|
+
--color-text-translucent: hsl(from var(--color-text) h s l / 0.5);
|
|
87
|
+
--color-text-translucent-light: hsl(from var(--color-text) h s l / 0.75);
|
|
88
|
+
--color-text-fixed-white: var(--color-white);
|
|
89
|
+
--color-text-fixed-black: var(--color-black);
|
|
90
|
+
|
|
91
|
+
/* Link colors */
|
|
92
|
+
--color-hyperlink: hsl(220, 100%, 70%);
|
|
93
|
+
--color-hyperlink-visited: hsl(260, 100%, 70%);
|
|
94
|
+
--color-hyperlink-new: hsl(0, 100%, 70%);
|
|
95
|
+
--color-hyperlink-new-visited: hsl(15, 100%, 70%);
|
|
96
|
+
|
|
97
|
+
/* Border */
|
|
98
|
+
--color-border: hsla(0, 0%, 100%, 0.1);
|
|
99
|
+
--color-border-dark: hsla(0, 0%, 0%, 0.33);
|
|
100
|
+
--border-primary-saturation: 100;
|
|
101
|
+
--border-primary-lightness: 75;
|
|
102
|
+
--border-primary-alpha: 0.75;
|
|
103
|
+
--color-border-primary: hsl(
|
|
104
|
+
from var(--color-primary) h var(--border-primary-saturation)
|
|
105
|
+
var(--border-primary-lightness) / var(--border-primary-alpha)
|
|
106
|
+
);
|
|
107
|
+
--color-border-secondary: hsl(from var(--color-border-primary) h s l / 1);
|
|
108
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TGUI
|
|
3
|
+
* Components Variables
|
|
4
|
+
*
|
|
5
|
+
* This file contains all variables used in components,
|
|
6
|
+
* or almost all...
|
|
7
|
+
*
|
|
8
|
+
* If you make a new component, or edit an existing one
|
|
9
|
+
* and you need a new color for it, it is highly advisable to
|
|
10
|
+
* add a new variable for the component, and only then use the color.
|
|
11
|
+
*
|
|
12
|
+
* That's allows downstreams/other codebases to customize each component as needed,
|
|
13
|
+
* creating their own unique (almost) TGUI designs with ease (almost).
|
|
14
|
+
*
|
|
15
|
+
* Don't add new base colors here, that files only for mixing and modifying
|
|
16
|
+
* variables from vars-colors.scss and vars-values.scss,
|
|
17
|
+
* for their further use in components.
|
|
18
|
+
*
|
|
19
|
+
* Made with love by Aylong (https://github.com/AyIong)
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
:root {
|
|
23
|
+
/* BlockQuote */
|
|
24
|
+
--blockquote-color: hsl(
|
|
25
|
+
from var(--color-label) h s calc(l + var(--adjust-color))
|
|
26
|
+
);
|
|
27
|
+
--blockquote-border: var(--border-thickness-small) solid;
|
|
28
|
+
|
|
29
|
+
/* Button */
|
|
30
|
+
--button-color: var(--color-white);
|
|
31
|
+
--button-color-transparent: var(--color-text-translucent);
|
|
32
|
+
--button-background-default: var(--color-primary);
|
|
33
|
+
--button-background-selected: var(--color-green);
|
|
34
|
+
--button-background-caution: var(--color-yellow);
|
|
35
|
+
--button-background-danger: var(--color-red);
|
|
36
|
+
--button-border-radius: var(--border-radius-tiny);
|
|
37
|
+
--button-transition: var(--transition-time-medium);
|
|
38
|
+
--button-transition-timing: ease;
|
|
39
|
+
|
|
40
|
+
/* Dialog */
|
|
41
|
+
--dialog-background: hsl(from var(--color-section) h s l / 0.5);
|
|
42
|
+
|
|
43
|
+
/* Dimmer */
|
|
44
|
+
--dimmer-background-opacity: 0.75;
|
|
45
|
+
--dimmer-background: hsl(
|
|
46
|
+
from var(--color-base) h s 5 / var(--dimmer-background-opacity)
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
/* Divider */
|
|
50
|
+
--divider-color: var(--color-border);
|
|
51
|
+
--divider-border: var(--border-thickness-small) solid var(--divider-color);
|
|
52
|
+
|
|
53
|
+
/* Dropdown */
|
|
54
|
+
--dropdown-transition: var(--transition-time-medium);
|
|
55
|
+
--dropdown-menu-color: var(--color-text);
|
|
56
|
+
--dropdown-menu-background: hsl(
|
|
57
|
+
from var(--color-base) h s calc(l - 5.5) / 0.85
|
|
58
|
+
);
|
|
59
|
+
--dropdown-menu-border: var(--border-thickness-tiny) solid var(--color-border);
|
|
60
|
+
--dropdown-menu-border-radius: var(--border-radius-large);
|
|
61
|
+
--dropdown-menu-blur: var(--blur-medium);
|
|
62
|
+
--dropdown-entry-background-hover: var(--color-hover);
|
|
63
|
+
--dropdown-entry-background-active: var(--color-active);
|
|
64
|
+
--dropdown-entry-background-selected: var(--color-selected);
|
|
65
|
+
--dropdown-entry-border-radius: var(--border-radius-small);
|
|
66
|
+
--dropdown-entry-transition: var(--transition-time-fast);
|
|
67
|
+
|
|
68
|
+
/* Floating */
|
|
69
|
+
--floating-transition-time: var(--transition-time-medium);
|
|
70
|
+
--floating-transition-timing: ease;
|
|
71
|
+
|
|
72
|
+
/* Tabs */
|
|
73
|
+
--tab-background: transparent;
|
|
74
|
+
--tab-background-hover: hsl(from var(--color-hover) h s calc(l * 0.75));
|
|
75
|
+
--tab-background-selected: hsl(from var(--color-selected) h s calc(l * 0.75));
|
|
76
|
+
--tab-color: var(--color-text-translucent);
|
|
77
|
+
--tab-color-selected: hsl(from var(--color-primary) h s 90);
|
|
78
|
+
--tab-border-radius: var(--border-radius-small);
|
|
79
|
+
--tab-indicator-size: var(--border-thickness-small);
|
|
80
|
+
--tab-transition: var(--transition-time-medium);
|
|
81
|
+
--tabs-container-background: var(--color-section);
|
|
82
|
+
|
|
83
|
+
/* Input */
|
|
84
|
+
--input-background-lightness: 5;
|
|
85
|
+
--input-background: hsl(
|
|
86
|
+
from var(--color-base) h s var(--input-background-lightness)
|
|
87
|
+
);
|
|
88
|
+
--input-color: var(--color-text);
|
|
89
|
+
--input-color-placeholder: var(--color-text-translucent);
|
|
90
|
+
--input-border-color: var(--color-border-primary);
|
|
91
|
+
--input-border-color-focus: var(--color-border-secondary);
|
|
92
|
+
--input-border-radius: var(--border-radius-tiny);
|
|
93
|
+
--input-transition: var(--transition-time-medium);
|
|
94
|
+
--input-font-family: var(--font-family);
|
|
95
|
+
--input-font-family-mono: var(--font-family-mono);
|
|
96
|
+
|
|
97
|
+
/* Knob */
|
|
98
|
+
--knob-color: hsl(from var(--color-base) h 5 20);
|
|
99
|
+
--knob-ring-color: var(--input-border-color);
|
|
100
|
+
--knob-popup-background: var(--tooltip-background);
|
|
101
|
+
--knob-popup-color: var(--tooltip-color);
|
|
102
|
+
--knob-popup-border-radius: var(--tooltip-border-radius);
|
|
103
|
+
--knob-popup-blur: var(--tooltip-blur);
|
|
104
|
+
--knob-inner-padding: var(--space-xs);
|
|
105
|
+
|
|
106
|
+
/* Menu Bar */
|
|
107
|
+
--menu-bar-background: var(--color-base);
|
|
108
|
+
--menu-bar-font-family: var(--font-family);
|
|
109
|
+
--menu-bar-transition: var(--transition-time-medium);
|
|
110
|
+
|
|
111
|
+
/* Modal */
|
|
112
|
+
--modal-background: var(--color-base);
|
|
113
|
+
--modal-padding: var(--space-xl);
|
|
114
|
+
|
|
115
|
+
/* Notice Box */
|
|
116
|
+
--notice-box-stripes: hsla(0, 0%, 0%, 0.1);
|
|
117
|
+
--notice-box-background: hsl(37.5, 40%, 57.5%);
|
|
118
|
+
--notice-box-color: var(--color-text-fixed-black);
|
|
119
|
+
|
|
120
|
+
/* Number Input */
|
|
121
|
+
--number-input-background: var(--input-background);
|
|
122
|
+
--number-input-color: var(--input-color);
|
|
123
|
+
--number-input-border-color: var(--input-border-color);
|
|
124
|
+
--number-input-border-color-active: var(--input-border-color-focus);
|
|
125
|
+
--number-input-border-radius: var(--input-border-radius);
|
|
126
|
+
--number-input-transition: var(--input-transition);
|
|
127
|
+
|
|
128
|
+
/* Progress Bar */
|
|
129
|
+
--progress-bar-fill: var(--color-primary);
|
|
130
|
+
--progress-bar-background: transparent;
|
|
131
|
+
--progress-bar-border-radius: var(--border-radius-tiny);
|
|
132
|
+
--progress-bar-transition: var(--transition-time-slowest);
|
|
133
|
+
|
|
134
|
+
/* Round Gauge */
|
|
135
|
+
--round-gauge-ring-color: var(--input-border-color);
|
|
136
|
+
--round-gauge-transition: var(--transition-time-medium);
|
|
137
|
+
--round-gauge-alert-animation: var(--transition-time-slowest);
|
|
138
|
+
--round-gauge-needle-alert-animation: var(--transition-time-fast);
|
|
139
|
+
--round-gauge-needle-alert-rotation: 2.5deg;
|
|
140
|
+
|
|
141
|
+
/* Section - Why not? */
|
|
142
|
+
--section-title-color: var(--color-text);
|
|
143
|
+
--section-background: var(--color-section);
|
|
144
|
+
--section-separator-color: var(--color-primary);
|
|
145
|
+
--section-separator-thickness: var(--border-thickness-small);
|
|
146
|
+
|
|
147
|
+
/* Slider */
|
|
148
|
+
--slider-cursor-color: var(--color-text);
|
|
149
|
+
--slider-popup-background: var(--tooltip-background);
|
|
150
|
+
--slider-popup-color: var(--tooltip-color);
|
|
151
|
+
--slider-popup-border-radius: var(--tooltip-border-radius);
|
|
152
|
+
--slider-popup-blur: var(--tooltip-blur);
|
|
153
|
+
|
|
154
|
+
/* Tooltip */
|
|
155
|
+
--tooltip-color: var(--color-text);
|
|
156
|
+
--tooltip-background-lightness: 5;
|
|
157
|
+
--tooltip-background: hsl(
|
|
158
|
+
from var(--color-base) h s var(--tooltip-background-lightness) / 0.85
|
|
159
|
+
);
|
|
160
|
+
--tooltip-border-radius: var(--border-radius-medium);
|
|
161
|
+
--tooltip-blur: var(--blur-medium);
|
|
162
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TGUI
|
|
3
|
+
* Values Variables
|
|
4
|
+
*
|
|
5
|
+
* This file contains all values, like spacings, sizes, etc.
|
|
6
|
+
* You won't find any colors here, just numbers and letters.
|
|
7
|
+
*
|
|
8
|
+
* Made with love by Aylong (https://github.com/AyIong)
|
|
9
|
+
*/
|
|
10
|
+
:root {
|
|
11
|
+
/* Font */
|
|
12
|
+
--font-size: 12px;
|
|
13
|
+
--font-family: Verdana, Geneva, sans-serif;
|
|
14
|
+
--font-family-mono: Consolas, monospace;
|
|
15
|
+
|
|
16
|
+
/* Border thickness */
|
|
17
|
+
--border-thickness-unit: 0.5em;
|
|
18
|
+
/* 1px | 0.085em */
|
|
19
|
+
--border-thickness-tiny: calc(var(--border-thickness-unit) * 0.5 * 0.34);
|
|
20
|
+
/* 2px | 0.17em */
|
|
21
|
+
--border-thickness-small: calc(var(--border-thickness-unit) * 0.34);
|
|
22
|
+
/* 3px | 0.25em */
|
|
23
|
+
--border-thickness-medium: calc(var(--border-thickness-unit) * 0.5);
|
|
24
|
+
/* 4px | 0.33em */
|
|
25
|
+
--border-thickness-large: calc(var(--border-thickness-unit) * 0.66);
|
|
26
|
+
/* 6px | 0.5em */
|
|
27
|
+
--border-thickness-larger: var(--border-thickness-unit);
|
|
28
|
+
|
|
29
|
+
/* Border radius */
|
|
30
|
+
--border-radius-unit: 1rem;
|
|
31
|
+
/* 2px | 0.17rem */
|
|
32
|
+
--border-radius-tiny: calc(var(--border-radius-unit) * 0.25 * 0.68);
|
|
33
|
+
/* 3px | 0.25rem */
|
|
34
|
+
--border-radius-small: calc(var(--border-radius-unit) * 0.25);
|
|
35
|
+
/* 4px | 0.33rem */
|
|
36
|
+
--border-radius-medium: calc(var(--border-radius-unit) * 0.33);
|
|
37
|
+
/* 6px | 0.5rem */
|
|
38
|
+
--border-radius-large: calc(var(--border-radius-unit) * 0.5);
|
|
39
|
+
/* 10px | 0.75rem */
|
|
40
|
+
--border-radius-larger: calc(var(--border-radius-unit) * 0.75);
|
|
41
|
+
/* 12px | 1rem*/
|
|
42
|
+
--border-radius-huge: var(--border-radius-unit);
|
|
43
|
+
/* 24px | 2rem*/
|
|
44
|
+
--border-radius-giant: calc(var(--border-radius-unit) * 2);
|
|
45
|
+
/* Maximum border radius. Makes perfect circles */
|
|
46
|
+
--border-radius-circular: 99999px;
|
|
47
|
+
|
|
48
|
+
/* Spacing */
|
|
49
|
+
--space-unit: 1em;
|
|
50
|
+
/* 1px | 0.085em */
|
|
51
|
+
--space-xxs: calc(var(--space-unit) * 0.25 * 0.34);
|
|
52
|
+
/* 2px | 0.17em */
|
|
53
|
+
--space-xs: calc(var(--space-unit) * 0.25 * 0.68);
|
|
54
|
+
/* 3px | 0.25em */
|
|
55
|
+
--space-s: calc(var(--space-unit) * 0.25);
|
|
56
|
+
/* 4px | 0.33em */
|
|
57
|
+
--space-sm: calc(var(--space-unit) * 0.33);
|
|
58
|
+
/* 6px | 0.5em */
|
|
59
|
+
--space-m: calc(var(--space-unit) * 0.5);
|
|
60
|
+
/* 8px | 0.66em */
|
|
61
|
+
--space-ml: calc(var(--space-unit) * 0.66);
|
|
62
|
+
/* 10px | 0.75em */
|
|
63
|
+
--space-l: calc(var(--space-unit) * 0.75);
|
|
64
|
+
/* 12px | 1em*/
|
|
65
|
+
--space-xl: var(--space-unit);
|
|
66
|
+
/* 24px | 2em*/
|
|
67
|
+
--space-xxl: calc(var(--space-unit) * 2);
|
|
68
|
+
|
|
69
|
+
/* Transition */
|
|
70
|
+
--transition-time-unit: 1s;
|
|
71
|
+
/* 0.1s | 100ms */
|
|
72
|
+
--transition-time-fast: calc(var(--transition-time-unit) * 0.1);
|
|
73
|
+
/* 0.2s | 200ms */
|
|
74
|
+
--transition-time-medium: calc(var(--transition-time-unit) * 0.2);
|
|
75
|
+
/* 0.5s | 500ms */
|
|
76
|
+
--transition-time-slow: calc(var(--transition-time-unit) * 0.5);
|
|
77
|
+
/* 1s | 1000ms */
|
|
78
|
+
--transition-time-slowest: var(--transition-time-unit);
|
|
79
|
+
|
|
80
|
+
/* Shadows */
|
|
81
|
+
--shadow-unit: 1rem;
|
|
82
|
+
/* 0 0 0.5rem */
|
|
83
|
+
--shadow-glow-small: 0 0 calc(var(--shadow-unit) * 0.5);
|
|
84
|
+
/* 0 0 1rem */
|
|
85
|
+
--shadow-glow-medium: 0 0 var(--shadow-unit);
|
|
86
|
+
/* 0 0 2rem */
|
|
87
|
+
--shadow-glow-large: 0 0 calc(var(--shadow-unit) * 2);
|
|
88
|
+
|
|
89
|
+
/* Blur */
|
|
90
|
+
--blur-small: blur(6px);
|
|
91
|
+
--blur-medium: blur(12px);
|
|
92
|
+
--blur-large: blur(24px);
|
|
93
|
+
|
|
94
|
+
/* Adjustments */
|
|
95
|
+
/* Color lightness multiplier. + for FG - for BG */
|
|
96
|
+
--adjust-color: 5;
|
|
97
|
+
/* Color lightness multiplier wneh hovered */
|
|
98
|
+
--adjust-hover: 10;
|
|
99
|
+
/* Color lightness multiplier when active (clicked) */
|
|
100
|
+
--adjust-active: 7.5;
|
|
101
|
+
|
|
102
|
+
/* Cursors */
|
|
103
|
+
--cursor-default: default;
|
|
104
|
+
--cursor-pointer: pointer;
|
|
105
|
+
--cursor-disabled: var(--cursor-default);
|
|
106
|
+
--cursor-n-resize: n-resize;
|
|
107
|
+
--cursor-s-resize: s-resize;
|
|
108
|
+
--cursor-se-resize: se-resize;
|
|
109
|
+
--cursor-e-resize: e-resize;
|
|
110
|
+
}
|