tgui-core 4.0.4 → 4.1.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 +1 -1
- package/dist/common/constants.js +1 -1
- package/dist/common/events.js +1 -1
- package/dist/common/hotkeys.js +1 -1
- package/dist/common/uuid.js +1 -1
- package/dist/components/AnimatedNumber.d.ts +2 -42
- package/dist/components/AnimatedNumber.js +1 -1
- package/dist/components/Box.d.ts +2 -3
- package/dist/components/Button.js +1 -1
- package/dist/components/DraggableControl.d.ts +4 -1
- package/dist/components/Flex.d.ts +1 -1
- package/dist/components/Flex.js +1 -1
- package/dist/components/Floating.d.ts +1 -0
- package/dist/components/Floating.js +1 -1
- package/dist/components/Input.d.ts +4 -2
- package/dist/components/Input.js +1 -1
- package/dist/components/Knob.d.ts +4 -4
- package/dist/components/Modal.d.ts +2 -3
- package/dist/components/NumberInput.d.ts +2 -2
- package/dist/components/RestrictedInput.d.ts +4 -2
- package/dist/components/Slider.d.ts +4 -4
- package/dist/components/Slider.js +1 -1
- package/dist/components/Stack.d.ts +1 -1
- package/dist/components/Tabs.js +1 -1
- package/package.json +9 -9
- package/styles/atomic/candystripe.scss +8 -0
- package/styles/atomic/centered-image.scss +7 -0
- package/styles/atomic/color.scss +17 -0
- package/styles/atomic/debug-layout.scss +12 -0
- package/styles/atomic/fit-text.scss +15 -0
- package/styles/atomic/links.scss +21 -0
- package/styles/atomic/outline.scss +43 -0
- package/styles/atomic/text.scss +39 -0
- package/styles/atomic.scss +11 -0
- package/styles/components/BlockQuote.scss +0 -2
- package/styles/components/Button.scss +83 -85
- package/styles/components/Dimmer.scss +0 -2
- package/styles/components/Divider.scss +0 -5
- package/styles/components/Dropdown.scss +2 -0
- package/styles/components/ImageButton.scss +104 -102
- package/styles/components/Input.scss +3 -0
- package/styles/components/Knob.scss +5 -21
- package/styles/components/LabeledList.scss +0 -2
- package/styles/components/NoticeBox.scss +15 -21
- package/styles/components/NumberInput.scss +1 -9
- package/styles/components/ProgressBar.scss +27 -48
- package/styles/components/RestrictedInput.scss +3 -0
- package/styles/components/RoundGauge.scss +8 -13
- package/styles/components/Section.scss +0 -7
- package/styles/components/Slider.scss +49 -42
- package/styles/components/Tabs.scss +1 -12
- package/styles/components/TextArea.scss +3 -0
- package/styles/components/Tooltip.scss +0 -4
- package/styles/main.scss +0 -1
- package/styles/vars-components.scss +5 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@use "sass:meta";
|
|
2
|
+
|
|
3
|
+
// Loads in all atomic styles
|
|
4
|
+
@include meta.load-css("./atomic/candystripe.scss");
|
|
5
|
+
@include meta.load-css("./atomic/centered-image.scss");
|
|
6
|
+
@include meta.load-css("./atomic/color.scss");
|
|
7
|
+
@include meta.load-css("./atomic/debug-layout.scss");
|
|
8
|
+
@include meta.load-css("./atomic/fit-text.scss");
|
|
9
|
+
@include meta.load-css("./atomic/links.scss");
|
|
10
|
+
@include meta.load-css("./atomic/outline.scss");
|
|
11
|
+
@include meta.load-css("./atomic/text.scss");
|
|
@@ -1,60 +1,69 @@
|
|
|
1
1
|
@use "../base";
|
|
2
2
|
@use "../colors";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
@mixin button-color() {
|
|
5
|
+
--button-background: hsl(from var(--color) h s calc(l - var(--adjust-color)));
|
|
6
|
+
cursor: var(--cursor-pointer);
|
|
7
|
+
background-color: var(--button-background);
|
|
8
|
+
color: var(--button-color);
|
|
9
|
+
transition-property: background-color, color, opacity;
|
|
10
|
+
transition-duration: var(--button-transition);
|
|
11
|
+
transition-timing-function: var(--button-transition-timing);
|
|
12
|
+
// Disable selection in buttons
|
|
13
|
+
user-select: none;
|
|
6
14
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
15
|
+
&:hover {
|
|
16
|
+
background-color: hsl(
|
|
17
|
+
from var(--button-background) h s calc(l + var(--adjust-hover))
|
|
18
|
+
);
|
|
19
|
+
color: var(--button-color);
|
|
20
|
+
}
|
|
13
21
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
from $color h s
|
|
23
|
-
calc(calc(l - var(--adjust-color)) + var(--adjust-hover))
|
|
24
|
-
);
|
|
25
|
-
color: $text-color;
|
|
26
|
-
}
|
|
22
|
+
&:active {
|
|
23
|
+
background-color: hsl(
|
|
24
|
+
from var(--button-background) h s calc(l - var(--adjust-active))
|
|
25
|
+
);
|
|
26
|
+
color: var(--button-color);
|
|
27
|
+
transition: none;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
27
30
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
@mixin button-color-transparent() {
|
|
32
|
+
--button-background: hsl(from var(--button-color) h s l / 0.1);
|
|
33
|
+
--button-color: var(--button-color-transparent);
|
|
34
|
+
background-color: transparent;
|
|
35
|
+
|
|
36
|
+
&:hover {
|
|
37
|
+
--button-color: hsl(from var(--button-color-transparent) h s l / 1);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:active {
|
|
41
|
+
opacity: 0.75;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.Button--selected {
|
|
45
|
+
--button-color: hsl(from var(--color) h s calc(l + var(--adjust-color)));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&.Button--disabled {
|
|
49
|
+
--button-background: hsl(from var(--button-color) h s l / 0.2);
|
|
50
|
+
--button-color: var(--color-bad);
|
|
51
|
+
opacity: 1;
|
|
52
|
+
color: var(--button-color) !important;
|
|
35
53
|
}
|
|
36
54
|
}
|
|
37
55
|
|
|
38
56
|
.Button {
|
|
39
|
-
cursor: var(--cursor-pointer);
|
|
40
57
|
position: relative;
|
|
41
58
|
display: inline-block;
|
|
42
59
|
white-space: nowrap;
|
|
43
|
-
line-height:
|
|
60
|
+
line-height: var(--button-height);
|
|
44
61
|
padding: 0 var(--space-m);
|
|
45
62
|
margin-right: var(--space-xs);
|
|
46
63
|
margin-bottom: var(--space-xs);
|
|
47
|
-
outline: 0;
|
|
48
64
|
border-radius: var(--button-border-radius);
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
transition-timing-function: var(--button-transition-timing);
|
|
52
|
-
// Disable selection in buttons
|
|
53
|
-
user-select: none;
|
|
54
|
-
|
|
55
|
-
&:active {
|
|
56
|
-
transition: none;
|
|
57
|
-
}
|
|
65
|
+
outline: none;
|
|
66
|
+
@include button-color();
|
|
58
67
|
|
|
59
68
|
&:last-child {
|
|
60
69
|
margin-right: 0;
|
|
@@ -76,7 +85,7 @@ $border-radius: 0 !default;
|
|
|
76
85
|
text-align: center;
|
|
77
86
|
}
|
|
78
87
|
|
|
79
|
-
|
|
88
|
+
&.Button--hasIcon {
|
|
80
89
|
padding-left: 0;
|
|
81
90
|
|
|
82
91
|
.Button--icon {
|
|
@@ -84,7 +93,7 @@ $border-radius: 0 !default;
|
|
|
84
93
|
}
|
|
85
94
|
}
|
|
86
95
|
|
|
87
|
-
&--icon-right
|
|
96
|
+
&--icon-right.Button--hasIcon {
|
|
88
97
|
padding-left: var(--space-m);
|
|
89
98
|
padding-right: var(--space-s);
|
|
90
99
|
|
|
@@ -93,7 +102,7 @@ $border-radius: 0 !default;
|
|
|
93
102
|
}
|
|
94
103
|
}
|
|
95
104
|
|
|
96
|
-
&--empty
|
|
105
|
+
&--empty.Button--hasIcon {
|
|
97
106
|
padding: 0;
|
|
98
107
|
}
|
|
99
108
|
|
|
@@ -101,7 +110,7 @@ $border-radius: 0 !default;
|
|
|
101
110
|
padding: 0 var(--space-s);
|
|
102
111
|
line-height: 1.333em;
|
|
103
112
|
|
|
104
|
-
|
|
113
|
+
&.Button--hasIcon .Button--icon {
|
|
105
114
|
margin: 0 var(--space-xxs);
|
|
106
115
|
}
|
|
107
116
|
}
|
|
@@ -118,75 +127,64 @@ $border-radius: 0 !default;
|
|
|
118
127
|
|
|
119
128
|
&--ellipsis {
|
|
120
129
|
display: block;
|
|
121
|
-
text-overflow: ellipsis;
|
|
122
130
|
overflow: hidden;
|
|
131
|
+
text-overflow: ellipsis;
|
|
123
132
|
margin-right: calc(-1 * var(--space-s));
|
|
124
133
|
}
|
|
125
134
|
|
|
126
135
|
// We don't need additional margin if button inside stack
|
|
136
|
+
.Stack > &,
|
|
127
137
|
.Stack__item > & {
|
|
128
138
|
margin: 0;
|
|
129
139
|
}
|
|
130
140
|
}
|
|
131
141
|
|
|
132
|
-
@each $color-name, $color-value in
|
|
142
|
+
@each $color-name, $color-value in colors.$color-map {
|
|
133
143
|
.Button--color--#{$color-name} {
|
|
144
|
+
--color: #{$color-value};
|
|
145
|
+
--button-color: var(--color-white);
|
|
146
|
+
|
|
134
147
|
@each $color in colors.$low-contrast-color-map {
|
|
135
148
|
@if $color-name == $color {
|
|
136
|
-
--color
|
|
149
|
+
--button-color: var(--color-black);
|
|
137
150
|
}
|
|
138
151
|
}
|
|
139
|
-
|
|
140
|
-
@include button-color($color-value);
|
|
141
152
|
}
|
|
142
153
|
}
|
|
143
154
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
cursor: var(--cursor-pointer);
|
|
147
|
-
color: var(--button-color-transparent);
|
|
148
|
-
|
|
149
|
-
&:not(.Button--disabled) {
|
|
150
|
-
&:hover {
|
|
151
|
-
background-color: var(--color-hover);
|
|
152
|
-
color: hsl(from var(--button-color-transparent) h s l / 1);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
&:active {
|
|
156
|
-
background-color: var(--color-active);
|
|
157
|
-
color: hsl(from var(--button-color-transparent) h s l / 1);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
&.Button--disabled {
|
|
162
|
-
--button-color-transparent: var(--color-text-translucent-light);
|
|
163
|
-
background-color: hsl(from var(--color-bad) h s l / 0.33) !important;
|
|
164
|
-
}
|
|
155
|
+
.Button--selected {
|
|
156
|
+
--color: var(--button-background-selected);
|
|
165
157
|
}
|
|
166
158
|
|
|
167
|
-
.Button--
|
|
168
|
-
|
|
159
|
+
.Button--disabled {
|
|
160
|
+
cursor: var(--cursor-disabled) !important;
|
|
161
|
+
background-color: var(
|
|
162
|
+
--button-background-disabled,
|
|
163
|
+
var(--button-background)
|
|
164
|
+
) !important;
|
|
165
|
+
opacity: var(--button-disabled-opacity);
|
|
169
166
|
}
|
|
170
167
|
|
|
171
|
-
.Button--color--
|
|
172
|
-
|
|
173
|
-
|
|
168
|
+
.Button--color-- {
|
|
169
|
+
&default {
|
|
170
|
+
--color: var(--button-background-default);
|
|
171
|
+
}
|
|
174
172
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
173
|
+
&caution {
|
|
174
|
+
--color: var(--button-background-caution);
|
|
175
|
+
}
|
|
178
176
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
177
|
+
&danger {
|
|
178
|
+
--color: var(--button-background-danger);
|
|
179
|
+
}
|
|
182
180
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
181
|
+
&transparent {
|
|
182
|
+
@include button-color-transparent();
|
|
183
|
+
}
|
|
186
184
|
}
|
|
187
185
|
|
|
188
186
|
.Button--flex {
|
|
189
|
-
display: inline-flex; //Inline even for fluid
|
|
187
|
+
display: inline-flex; // Inline even for fluid
|
|
190
188
|
flex-direction: column;
|
|
191
189
|
}
|
|
192
190
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use "../base";
|
|
2
|
+
@use "./Button" as button;
|
|
2
3
|
|
|
3
4
|
.Dropdown {
|
|
4
5
|
display: flex;
|
|
@@ -32,6 +33,7 @@
|
|
|
32
33
|
line-height: base.em(16px);
|
|
33
34
|
height: base.em(22px);
|
|
34
35
|
border-radius: var(--button-border-radius);
|
|
36
|
+
@include button.button-color();
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
&__selected-text {
|
|
@@ -1,142 +1,78 @@
|
|
|
1
1
|
@use "../colors";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
.ImageButton {
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
user-select: none;
|
|
6
|
+
position: relative;
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
text-align: center;
|
|
9
|
+
margin: 0.25em;
|
|
6
10
|
background-color: hsl(
|
|
7
|
-
from
|
|
11
|
+
from var(--imagebutton-color) h s calc(l - var(--adjust-color) * 2) /
|
|
8
12
|
var(--imagebutton-transparecy)
|
|
9
13
|
);
|
|
10
14
|
border: var(--border-thickness-tiny) solid
|
|
11
15
|
hsl(
|
|
12
|
-
from
|
|
16
|
+
from var(--imagebutton-color) h s calc(l + var(--adjust-color)) /
|
|
13
17
|
var(--imagebutton-transparecy)
|
|
14
18
|
);
|
|
19
|
+
border-radius: var(--border-radius-medium);
|
|
20
|
+
transition-property: background-color, border-color, box-shadow;
|
|
21
|
+
transition-duration: var(--transition-time-medium);
|
|
22
|
+
border-width: 0;
|
|
15
23
|
|
|
16
24
|
&:not(.ImageButton--disabled, .ImageButton--noAction) {
|
|
17
25
|
.ImageButton__container {
|
|
18
26
|
cursor: var(--cursor-pointer);
|
|
19
27
|
}
|
|
20
28
|
|
|
21
|
-
&:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
&:active {
|
|
29
|
-
box-shadow: inset var(--shadow-glow-small) hsl(from $color h s l / 0.5);
|
|
30
|
-
transition-duration: 0s;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/* Disable hover/active effects if hovered on buttons container */
|
|
34
|
-
&:hover,
|
|
35
|
-
&:active {
|
|
36
|
-
&:has(.ImageButton__buttons:hover),
|
|
37
|
-
&:has(.ImageButton__buttons:active) {
|
|
29
|
+
&:not(
|
|
30
|
+
/* Prevent hover/active effects if hovered/pressed on buttons container */
|
|
31
|
+
:has(.ImageButton__buttons:hover),
|
|
32
|
+
:has(.ImageButton__buttons:active)
|
|
33
|
+
) {
|
|
34
|
+
&:hover {
|
|
38
35
|
background-color: hsl(
|
|
39
|
-
from
|
|
36
|
+
from var(--imagebutton-color) h s
|
|
37
|
+
calc(l - var(--adjust-color) + var(--adjust-hover)) /
|
|
40
38
|
var(--imagebutton-transparecy)
|
|
41
39
|
);
|
|
42
|
-
box-shadow: none;
|
|
43
40
|
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
41
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
border-top: var(--border-thickness-tiny) solid $color;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
@each $color-name, $color-value in $bg-map {
|
|
55
|
-
.ImageButton__color--#{$color-name} {
|
|
56
|
-
@each $color in colors.$low-contrast-color-map {
|
|
57
|
-
@if $color-name == $color {
|
|
58
|
-
--color-text-fixed-white: var(--color-black);
|
|
42
|
+
&:active .ImageButton__image {
|
|
43
|
+
filter: drop-shadow(var(--shadow-glow-small) var(--imagebutton-color));
|
|
44
|
+
transition-duration: 0s;
|
|
59
45
|
}
|
|
60
46
|
}
|
|
61
|
-
|
|
62
|
-
@include button-style($color-value);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.ImageButton__color--default {
|
|
67
|
-
@include button-style(hsl(from var(--color-base) h s 30));
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.ImageButton__color--primary {
|
|
71
|
-
@include button-style(hsl(from var(--color-primary) h s 30));
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.ImageButton__color--transparent {
|
|
75
|
-
@include button-style(hsl(from var(--color-base) h s 30));
|
|
76
|
-
|
|
77
|
-
background-color: transparent;
|
|
78
|
-
border-color: transparent !important;
|
|
79
|
-
|
|
80
|
-
.ImageButton__content {
|
|
81
|
-
background-color: transparent !important;
|
|
82
|
-
color: var(--color-text-translucent);
|
|
83
|
-
border-color: transparent !important;
|
|
84
47
|
}
|
|
85
48
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
@include button-style(var(--button-background-selected));
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.ImageButton--disabled {
|
|
96
|
-
.ImageButton__container {
|
|
97
|
-
cursor: var(--cursor-disabled);
|
|
98
|
-
opacity: 0.5;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
&.ImageButton--fluid {
|
|
102
|
-
filter: contrast(75%);
|
|
103
|
-
|
|
104
|
-
.ImageButton__buttons {
|
|
105
|
-
filter: contrast(125%);
|
|
106
|
-
}
|
|
49
|
+
/* Make non-fluid content opaque */
|
|
50
|
+
&:not(.ImageButton--fluid) .ImageButton__content {
|
|
51
|
+
background-color: hsl(
|
|
52
|
+
from var(--imagebutton-color) h s calc(l - var(--adjust-hover))
|
|
53
|
+
);
|
|
54
|
+
border-top: var(--border-thickness-tiny) solid var(--imagebutton-color);
|
|
107
55
|
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.ImageButton {
|
|
111
|
-
overflow: hidden;
|
|
112
|
-
user-select: none;
|
|
113
|
-
position: relative;
|
|
114
|
-
display: inline-flex;
|
|
115
|
-
text-align: center;
|
|
116
|
-
margin: 0.25em;
|
|
117
|
-
border-radius: var(--border-radius-medium);
|
|
118
|
-
transition-property: background-color, border-color, box-shadow;
|
|
119
|
-
transition-duration: var(--transition-time-medium);
|
|
120
|
-
border-width: 0;
|
|
121
56
|
|
|
122
57
|
&__container {
|
|
123
58
|
display: flex;
|
|
124
59
|
flex-direction: column;
|
|
125
|
-
transition: opacity var(--transition-time-medium);
|
|
126
60
|
border-color: inherit;
|
|
61
|
+
transition: opacity var(--transition-time-medium);
|
|
127
62
|
}
|
|
128
63
|
|
|
129
64
|
&__image {
|
|
130
|
-
position: relative;
|
|
131
|
-
align-self: center;
|
|
132
65
|
pointer-events: none;
|
|
133
66
|
overflow: hidden;
|
|
67
|
+
position: relative;
|
|
68
|
+
align-self: center;
|
|
134
69
|
line-height: 0;
|
|
135
70
|
padding: var(--space-s);
|
|
136
71
|
border: var(--border-thickness-tiny) solid;
|
|
137
72
|
border-bottom: none;
|
|
138
73
|
border-color: inherit;
|
|
139
74
|
border-radius: var(--border-radius-medium) var(--border-radius-medium) 0 0;
|
|
75
|
+
transition: filter var(--transition-time-slow);
|
|
140
76
|
|
|
141
77
|
&--fallback {
|
|
142
78
|
text-align: center;
|
|
@@ -152,18 +88,18 @@ $bg-map: colors.$color-map !default;
|
|
|
152
88
|
}
|
|
153
89
|
|
|
154
90
|
&__content {
|
|
155
|
-
user-select: none;
|
|
156
91
|
overflow: hidden;
|
|
157
|
-
text-overflow: ellipsis;
|
|
158
92
|
white-space: nowrap;
|
|
93
|
+
text-overflow: ellipsis;
|
|
159
94
|
padding: 0.25em 0.33em;
|
|
95
|
+
color: var(--color-text-fixed-white);
|
|
160
96
|
z-index: 2;
|
|
161
97
|
}
|
|
162
98
|
|
|
163
99
|
&__buttons {
|
|
164
|
-
display: flex;
|
|
165
|
-
position: absolute;
|
|
166
100
|
overflow: hidden;
|
|
101
|
+
position: absolute;
|
|
102
|
+
display: flex;
|
|
167
103
|
left: var(--border-thickness-tiny);
|
|
168
104
|
bottom: 1.8em;
|
|
169
105
|
max-width: 100%;
|
|
@@ -211,6 +147,7 @@ $bg-map: colors.$color-map !default;
|
|
|
211
147
|
}
|
|
212
148
|
}
|
|
213
149
|
|
|
150
|
+
// MARK: Fluid
|
|
214
151
|
.ImageButton--fluid {
|
|
215
152
|
display: flex;
|
|
216
153
|
flex-direction: row;
|
|
@@ -289,3 +226,68 @@ $bg-map: colors.$color-map !default;
|
|
|
289
226
|
}
|
|
290
227
|
}
|
|
291
228
|
}
|
|
229
|
+
|
|
230
|
+
// MARK: Colors
|
|
231
|
+
@each $color-name, $color-value in colors.$color-map {
|
|
232
|
+
.ImageButton__color--#{$color-name} {
|
|
233
|
+
--imagebutton-color: #{$color-value};
|
|
234
|
+
|
|
235
|
+
@each $color in colors.$low-contrast-color-map {
|
|
236
|
+
@if $color-name == $color {
|
|
237
|
+
--color-text-fixed-white: var(--color-black);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// I hate this
|
|
244
|
+
.ImageButton__color--transparent {
|
|
245
|
+
--imagebutton-color: var(--color-text-translucent-light);
|
|
246
|
+
--imagebutton-transparecy: 0.1;
|
|
247
|
+
background-color: transparent;
|
|
248
|
+
border-color: transparent !important;
|
|
249
|
+
|
|
250
|
+
.ImageButton__content {
|
|
251
|
+
background-color: transparent !important;
|
|
252
|
+
color: var(--color-text-translucent-light);
|
|
253
|
+
border-color: transparent !important;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
&.ImageButton--disabled {
|
|
257
|
+
background-color: hsL(from var(--color-red) h s l / 0.15) !important;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
&.ImageButton--selected {
|
|
261
|
+
background-color: hsL(from var(--color-good) h s l / 0.15);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.ImageButton__color--default {
|
|
266
|
+
--imagebutton-color: hsl(from var(--color-base) h s 30);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.ImageButton__color--primary {
|
|
270
|
+
--imagebutton-color: hsl(from var(--color-primary) h s l);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.ImageButton--selected {
|
|
274
|
+
--imagebutton-color: hsl(
|
|
275
|
+
from var(--button-background-selected) h s calc(l * 1.15)
|
|
276
|
+
);
|
|
277
|
+
--color-text-fixed-white: var(--color-white);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.ImageButton--disabled {
|
|
281
|
+
.ImageButton__container {
|
|
282
|
+
cursor: var(--cursor-disabled);
|
|
283
|
+
opacity: 0.5;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
&.ImageButton--fluid {
|
|
287
|
+
filter: contrast(75%);
|
|
288
|
+
|
|
289
|
+
.ImageButton__buttons {
|
|
290
|
+
filter: contrast(125%);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
@@ -7,12 +7,15 @@
|
|
|
7
7
|
font-family: var(--input-font-family);
|
|
8
8
|
padding: var(--space-xxs) var(--space-sm);
|
|
9
9
|
width: var(--input-width);
|
|
10
|
+
|
|
10
11
|
&:focus {
|
|
11
12
|
outline: none;
|
|
12
13
|
}
|
|
14
|
+
|
|
13
15
|
&:focus-within {
|
|
14
16
|
border-color: var(--input-border-color-focus);
|
|
15
17
|
}
|
|
18
|
+
|
|
16
19
|
&::placeholder {
|
|
17
20
|
font-style: italic;
|
|
18
21
|
color: var(--input-color-placeholder);
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
@use "../base";
|
|
2
1
|
@use "../colors";
|
|
3
2
|
|
|
4
3
|
$pi: 3.1416;
|
|
5
|
-
$bg-map: colors.$color-map !default;
|
|
6
|
-
$fg-map: colors.$color-map !default;
|
|
7
|
-
|
|
8
|
-
$ring-color: 0 !default;
|
|
9
|
-
$knob-color: 0 !default;
|
|
10
|
-
$popup-background-color: 0 !default;
|
|
11
|
-
$popup-text-color: 0 !default;
|
|
12
|
-
$inner-padding: 0;
|
|
13
4
|
|
|
14
5
|
.Knob {
|
|
15
6
|
user-select: none;
|
|
@@ -18,8 +9,7 @@ $inner-padding: 0;
|
|
|
18
9
|
font-size: 1rem;
|
|
19
10
|
width: 2.6em;
|
|
20
11
|
height: 2.6em;
|
|
21
|
-
margin: 0 auto;
|
|
22
|
-
margin-bottom: -0.2em;
|
|
12
|
+
margin: 0 auto -0.2em;
|
|
23
13
|
|
|
24
14
|
// Adjusts a baseline in a way, that makes knob middle-aligned
|
|
25
15
|
// when it flows with the text.
|
|
@@ -86,7 +76,7 @@ $inner-padding: 0;
|
|
|
86
76
|
|
|
87
77
|
.Knob__ringTrack {
|
|
88
78
|
fill: transparent;
|
|
89
|
-
stroke: hsl(from var(--knob-ring-color) h s l / 0.15);
|
|
79
|
+
stroke: hsl(from var(--ring-color, var(--knob-ring-color)) h s l / 0.15);
|
|
90
80
|
stroke-width: 8;
|
|
91
81
|
stroke-linecap: round;
|
|
92
82
|
stroke-dasharray: 75 * $pi;
|
|
@@ -102,21 +92,15 @@ $inner-padding: 0;
|
|
|
102
92
|
|
|
103
93
|
.Knob__ringFill {
|
|
104
94
|
fill: transparent;
|
|
105
|
-
stroke: var(--knob-ring-color);
|
|
95
|
+
stroke: var(--ring-color, var(--knob-ring-color));
|
|
106
96
|
stroke-width: 8;
|
|
107
97
|
stroke-linecap: round;
|
|
108
98
|
stroke-dasharray: 100 * $pi;
|
|
109
99
|
transition: stroke var(--transition-time-medium) ease-out;
|
|
110
100
|
}
|
|
111
101
|
|
|
112
|
-
@each $color-name, $color-value in
|
|
102
|
+
@each $color-name, $color-value in colors.$color-map {
|
|
113
103
|
.Knob--color--#{$color-name} {
|
|
114
|
-
|
|
115
|
-
stroke: $color-value;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.Knob__ringTrack {
|
|
119
|
-
stroke: hsl(from $color-value h s l / 0.15);
|
|
120
|
-
}
|
|
104
|
+
--ring-color: #{$color-value};
|
|
121
105
|
}
|
|
122
106
|
}
|