tgui-core 4.0.3 → 4.1.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 (107) hide show
  1. package/README.md +7 -0
  2. package/dist/common/constants.d.ts +1 -1
  3. package/dist/common/constants.js +1 -1
  4. package/dist/common/events.js +1 -1
  5. package/dist/common/fuzzysearch.js +1 -1
  6. package/dist/common/hotkeys.js +1 -1
  7. package/dist/common/random.js +1 -1
  8. package/dist/common/ui.js +1 -1
  9. package/dist/common/uuid.js +1 -1
  10. package/dist/common/vector.js +1 -1
  11. package/dist/components/AnimatedNumber.d.ts +2 -42
  12. package/dist/components/AnimatedNumber.js +1 -1
  13. package/dist/components/Autofocus.js +1 -1
  14. package/dist/components/Blink.js +1 -1
  15. package/dist/components/BlockQuote.js +1 -1
  16. package/dist/components/Box.d.ts +2 -2
  17. package/dist/components/Box.js +1 -1
  18. package/dist/components/Button.d.ts +1 -1
  19. package/dist/components/Button.js +1 -1
  20. package/dist/components/ByondUi.js +1 -1
  21. package/dist/components/Chart.js +1 -1
  22. package/dist/components/Collapsible.js +1 -1
  23. package/dist/components/ColorBox.js +1 -1
  24. package/dist/components/Dialog.js +1 -1
  25. package/dist/components/Dimmer.js +1 -1
  26. package/dist/components/Divider.js +1 -1
  27. package/dist/components/DmIcon.js +1 -1
  28. package/dist/components/DraggableControl.d.ts +4 -1
  29. package/dist/components/DraggableControl.js +1 -1
  30. package/dist/components/Dropdown.d.ts +2 -0
  31. package/dist/components/Dropdown.js +1 -1
  32. package/dist/components/FitText.js +1 -1
  33. package/dist/components/Flex.d.ts +1 -1
  34. package/dist/components/Flex.js +1 -1
  35. package/dist/components/Floating.d.ts +2 -1
  36. package/dist/components/Floating.js +1 -1
  37. package/dist/components/Icon.d.ts +1 -1
  38. package/dist/components/Icon.js +1 -1
  39. package/dist/components/Image.d.ts +7 -1
  40. package/dist/components/Image.js +1 -1
  41. package/dist/components/ImageButton.d.ts +1 -1
  42. package/dist/components/ImageButton.js +1 -1
  43. package/dist/components/InfinitePlane.js +1 -1
  44. package/dist/components/Input.js +1 -1
  45. package/dist/components/KeyListener.d.ts +1 -1
  46. package/dist/components/KeyListener.js +1 -1
  47. package/dist/components/Knob.d.ts +5 -5
  48. package/dist/components/Knob.js +1 -1
  49. package/dist/components/LabeledControls.js +1 -1
  50. package/dist/components/LabeledList.d.ts +1 -1
  51. package/dist/components/LabeledList.js +1 -1
  52. package/dist/components/MenuBar.js +1 -1
  53. package/dist/components/Modal.d.ts +2 -3
  54. package/dist/components/Modal.js +1 -1
  55. package/dist/components/NoticeBox.js +1 -1
  56. package/dist/components/NumberInput.d.ts +3 -3
  57. package/dist/components/NumberInput.js +1 -1
  58. package/dist/components/Popper.js +1 -1
  59. package/dist/components/ProgressBar.js +1 -1
  60. package/dist/components/RestrictedInput.js +1 -1
  61. package/dist/components/RoundGauge.js +1 -1
  62. package/dist/components/Section.js +1 -1
  63. package/dist/components/Slider.d.ts +4 -4
  64. package/dist/components/Slider.js +1 -1
  65. package/dist/components/Stack.js +1 -1
  66. package/dist/components/StyleableSection.js +1 -1
  67. package/dist/components/Table.js +1 -1
  68. package/dist/components/Tabs.js +1 -1
  69. package/dist/components/TextArea.js +1 -1
  70. package/dist/components/TimeDisplay.js +1 -1
  71. package/dist/components/Tooltip.js +1 -1
  72. package/dist/components/TrackOutsideClicks.js +1 -1
  73. package/dist/components/VirtualList.js +1 -1
  74. package/dist/components/index.js +1 -1
  75. package/package.json +15 -20
  76. package/styles/atomic/candystripe.scss +8 -0
  77. package/styles/atomic/centered-image.scss +7 -0
  78. package/styles/atomic/color.scss +17 -0
  79. package/styles/atomic/debug-layout.scss +12 -0
  80. package/styles/atomic/fit-text.scss +15 -0
  81. package/styles/atomic/links.scss +21 -0
  82. package/styles/atomic/outline.scss +43 -0
  83. package/styles/atomic/text.scss +39 -0
  84. package/styles/atomic.scss +11 -0
  85. package/styles/components/BlockQuote.scss +0 -2
  86. package/styles/components/Button.scss +83 -84
  87. package/styles/components/Dimmer.scss +0 -2
  88. package/styles/components/Divider.scss +0 -5
  89. package/styles/components/Dropdown.scss +8 -0
  90. package/styles/components/ImageButton.scss +104 -102
  91. package/styles/components/Input.scss +4 -1
  92. package/styles/components/Knob.scss +5 -21
  93. package/styles/components/LabeledList.scss +0 -2
  94. package/styles/components/NoticeBox.scss +15 -21
  95. package/styles/components/NumberInput.scss +1 -9
  96. package/styles/components/ProgressBar.scss +27 -48
  97. package/styles/components/RestrictedInput.scss +3 -0
  98. package/styles/components/RoundGauge.scss +8 -13
  99. package/styles/components/Section.scss +0 -7
  100. package/styles/components/Slider.scss +49 -42
  101. package/styles/components/Tabs.scss +1 -12
  102. package/styles/components/TextArea.scss +3 -0
  103. package/styles/components/Tooltip.scss +0 -4
  104. package/styles/functions.scss +10 -0
  105. package/styles/main.scss +0 -1
  106. package/styles/reset.scss +1 -0
  107. package/styles/vars-components.scss +5 -2
@@ -1,142 +1,78 @@
1
1
  @use "../colors";
2
2
 
3
- $bg-map: colors.$color-map !default;
4
-
5
- @mixin button-style($color) {
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 $color h s calc(l - var(--adjust-color) * 2) /
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 $color h s calc(l + var(--adjust-color)) /
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
- &:hover {
22
- background-color: hsl(
23
- from $color h s calc(l - var(--adjust-color) + var(--adjust-hover)) /
24
- var(--imagebutton-transparecy)
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 $color h s calc(l - var(--adjust-color) * 2) /
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
- /* Make non-fluid content opaque */
48
- &:not(.ImageButton--fluid) .ImageButton__content {
49
- background-color: hsl(from $color h s calc(l - var(--adjust-hover)));
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
- &:hover:not(.ImageButton--disabled) .ImageButton__content {
87
- color: var(--color-text);
88
- }
89
- }
90
-
91
- .ImageButton--selected {
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
+ }
@@ -1,5 +1,5 @@
1
1
  .Input {
2
- font-size: 1rem;
2
+ font-size: 1em;
3
3
  background-color: var(--input-background);
4
4
  border-radius: var(--input-border-radius);
5
5
  border: var(--border-thickness-tiny) solid var(--input-border-color);
@@ -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 $fg-map {
102
+ @each $color-name, $color-value in colors.$color-map {
113
103
  .Knob--color--#{$color-name} {
114
- .Knob__ringFill {
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
  }
@@ -1,5 +1,3 @@
1
- @use "../base";
2
-
3
1
  .LabeledList {
4
2
  display: table;
5
3
  // Compensate for negative margin
@@ -1,60 +1,54 @@
1
1
  @use "../base";
2
2
  @use "../colors";
3
3
 
4
- $bg-map: colors.$color-map !default;
5
- $fg-map: colors.$color-map !default;
6
- $background-color: 0 !default;
7
- $color-stripes: 0 !default;
8
-
9
4
  .NoticeBox {
5
+ --noticebox-background: var(--notice-box-background);
10
6
  font-weight: bold;
11
7
  font-style: italic;
12
8
  padding: var(--space-sm) var(--space-m);
13
9
  margin-bottom: var(--space-m);
14
- color: var(--notice-box-color);
15
- background-color: var(--notice-box-background);
10
+ background-color: oklch(
11
+ from var(--noticebox-background) calc(l * 0.825) calc(c * 0.75) h
12
+ );
16
13
  background-image: repeating-linear-gradient(
17
14
  -45deg,
18
- transparent,
19
- transparent base.em(10px),
20
- var(--notice-box-stripes) base.em(10px),
21
- var(--notice-box-stripes) base.em(20px)
15
+ transparent 0 base.em(10px),
16
+ var(--notice-box-stripes) base.em(10px) base.em(20px)
22
17
  );
18
+ color: var(--notice-box-color);
23
19
  }
24
20
 
25
21
  @mixin box-color($color) {
26
- background-color: oklch(from $color calc(l - 0.14) calc(c - 0.06) h);
27
- color: var(--color-text-fixed-white);
28
22
  }
29
23
 
30
- @each $color-name, $color-value in $bg-map {
24
+ @each $color-name, $color-value in colors.$color-map {
31
25
  .NoticeBox--color--#{$color-name} {
26
+ --noticebox-background: #{$color-value};
27
+
32
28
  @each $color in colors.$low-contrast-color-map {
33
29
  @if $color-name == $color {
34
- --color-text-fixed-white: var(--color-black);
30
+ --notice-box-color: var(--color-black);
35
31
  }
36
32
  }
37
33
 
38
34
  @if $color-name == "black" {
39
35
  --notice-box-stripes: hsla(0, 0%, 100%, 0.1);
40
36
  }
41
-
42
- @include box-color($color-value);
43
37
  }
44
38
  }
45
39
 
46
40
  .NoticeBox--type--info {
47
- @include box-color(var(--color-blue));
41
+ --noticebox-background: var(--color-blue);
48
42
  }
49
43
 
50
44
  .NoticeBox--type--success {
51
- @include box-color(var(--color-green));
45
+ --noticebox-background: var(--color-green);
52
46
  }
53
47
 
54
48
  .NoticeBox--type--warning {
55
- @include box-color(var(--color-orange));
49
+ --noticebox-background: var(--color-orange);
56
50
  }
57
51
 
58
52
  .NoticeBox--type--danger {
59
- @include box-color(var(--color-red));
53
+ --noticebox-background: var(--color-red);
60
54
  }
@@ -1,12 +1,4 @@
1
- @use "sass:color";
2
1
  @use "../base";
3
- @use "../functions" as *;
4
- @use "./Input";
5
-
6
- $text-color: 0 !default;
7
- $background-color: 0 !default;
8
- $border-color: 0 !default;
9
- $border-radius: 0 !default;
10
2
 
11
3
  .NumberInput {
12
4
  cursor: var(--cursor-n-resize);
@@ -67,7 +59,7 @@ $border-radius: 0 !default;
67
59
  height: base.em(17px);
68
60
  margin: 0;
69
61
  padding: 0 var(--space-m);
70
- font-family: Verdana, sans-serif;
62
+ font-family: var(--font-family);
71
63
  background-color: var(--number-input-background);
72
64
  color: var(--number-input-color);
73
65
  }
@@ -1,68 +1,47 @@
1
1
  @use "../base";
2
2
  @use "../colors";
3
3
 
4
- $bg-map: colors.$color-map !default;
5
- $fg-map: colors.$color-map !default;
6
- $color-default-fill: 0 !default;
7
- $background-color: 0 !default;
8
- $border-radius: 0 !default;
9
-
10
4
  .ProgressBar {
11
- display: inline-block;
12
5
  position: relative;
13
- width: 100%;
14
- min-height: 1.667em;
6
+ display: inline-block;
15
7
  align-content: center;
8
+ width: 100%;
9
+ min-height: var(--button-height);
16
10
  padding: 0 var(--space-m);
17
- border-width: var(--border-thickness-tiny) !important;
18
- border-style: solid !important;
19
- border-radius: var(--progress-bar-border-radius);
20
11
  background-color: var(--progress-bar-background);
12
+ border: var(--border-thickness-tiny) solid var(--progress-bar-color);
13
+ border-radius: var(--progress-bar-border-radius);
21
14
  transition: border-color var(--progress-bar-transition) ease-out;
22
- }
23
15
 
24
- .ProgressBar__fill {
25
- position: absolute;
26
- top: 0;
27
- bottom: 0;
28
- left: 0;
29
- }
16
+ &__fill {
17
+ position: absolute;
18
+ inset: 0;
19
+ background-color: var(--progress-bar-color);
30
20
 
31
- .ProgressBar__fill--animated {
32
- transition:
33
- background-color var(--progress-bar-transition) ease-out,
34
- width var(--progress-bar-transition) ease-out;
35
- }
21
+ &--animated {
22
+ transition-property: background-color, width;
23
+ transition-duration: var(--progress-bar-transition);
24
+ }
25
+ }
36
26
 
37
- .ProgressBar__content {
38
- position: relative;
39
- line-height: base.em(17px);
40
- width: 100%;
41
- text-align: right;
42
- user-select: none;
27
+ &__content {
28
+ user-select: none;
29
+ position: relative;
30
+ text-align: right;
31
+ width: 100%;
32
+ }
43
33
  }
44
34
 
45
35
  .ProgressBar--color--default {
46
- border: var(--border-thickness-tiny) solid
47
- hsl(from var(--progress-bar-fill) h s calc(l - var(--adjust-color)));
48
-
49
- .ProgressBar__fill {
50
- background-color: hsl(
51
- from var(--progress-bar-fill) h s calc(l - var(--adjust-color))
52
- );
53
- }
36
+ --progress-bar-color: hsl(
37
+ from var(--progress-bar-fill) h s calc(l - var(--adjust-color))
38
+ );
54
39
  }
55
40
 
56
- @each $color-name, $color-value in $bg-map {
41
+ @each $color-name, $color-value in colors.$color-map {
57
42
  .ProgressBar--color--#{$color-name} {
58
- border-color: hsl(
59
- from $color-value h s calc(l - var(--adjust-color))
60
- ) !important;
61
-
62
- .ProgressBar__fill {
63
- background-color: hsl(
64
- from $color-value h s calc(l - var(--adjust-color))
65
- );
66
- }
43
+ --progress-bar-color: hsl(
44
+ from #{$color-value} h s calc(l - var(--adjust-color))
45
+ );
67
46
  }
68
47
  }
@@ -1,9 +1,11 @@
1
1
  .RestrictedInput {
2
2
  border-color: var(--restricted-input-border-color);
3
3
  text-align: right;
4
+
4
5
  &:focus-within {
5
6
  border-color: var(--restricted-input-border-color-focus);
6
7
  }
8
+
7
9
  &::-webkit-inner-spin-button,
8
10
  &::-webkit-outer-spin-button {
9
11
  -webkit-appearance: none;
@@ -13,6 +15,7 @@
13
15
 
14
16
  .RestrictedInput--invalid {
15
17
  border-color: var(--restricted-input-border-color-invalid);
18
+
16
19
  &:focus-within {
17
20
  border-color: var(--restricted-input-border-color-invalid);
18
21
  }
@@ -1,19 +1,15 @@
1
1
  @use "../colors";
2
2
 
3
3
  $pi: 3.1416;
4
- $fg-map: colors.$color-map !default;
5
- $ring-color: 0 !default;
6
4
 
7
5
  @keyframes RoundGauge__alertAnim {
8
- 0% {
6
+ 0%,
7
+ 100% {
9
8
  opacity: 0.1;
10
9
  }
11
10
  50% {
12
11
  opacity: 1;
13
12
  }
14
- 100% {
15
- opacity: 0.1;
16
- }
17
13
  }
18
14
 
19
15
  @keyframes RoundGauge__needleAlertAnim {
@@ -74,6 +70,9 @@ $ring-color: 0 !default;
74
70
  transform-origin: top;
75
71
 
76
72
  &.active {
73
+ animation: RoundGauge__alertAnim var(--round-gauge-alert-animation)
74
+ cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
75
+
77
76
  ~ .RoundGauge__needle .RoundGauge__needleLine {
78
77
  transform-origin: bottom;
79
78
  animation: RoundGauge__needleAlertAnim
@@ -83,21 +82,17 @@ $ring-color: 0 !default;
83
82
  }
84
83
 
85
84
  .RoundGauge__alert.max {
86
- fill: colors.$bad;
85
+ fill: var(--color-bad);
87
86
  }
88
87
 
89
- @each $color-name, $color-value in $fg-map {
88
+ @each $color-name, $color-value in colors.$color-map {
90
89
  .RoundGauge--color--#{$color-name}.RoundGauge__ringFill {
91
90
  stroke: $color-value;
92
91
  }
93
92
  }
94
93
 
95
- @each $color-name, $color-value in $fg-map {
94
+ @each $color-name, $color-value in colors.$color-map {
96
95
  .RoundGauge__alert--#{$color-name} {
97
96
  fill: $color-value;
98
- animation: RoundGauge__alertAnim
99
- var(--round-gauge-alert-animation)
100
- cubic-bezier(0.34, 1.56, 0.64, 1)
101
- infinite;
102
97
  }
103
98
  }
@@ -1,11 +1,4 @@
1
- @use "sass:color";
2
1
  @use "../base";
3
- @use "../colors";
4
- @use "../functions";
5
-
6
- $title-text-color: 0 !default;
7
- $background-color: 0 !default;
8
- $separator-color: 0 !default;
9
2
 
10
3
  .Section {
11
4
  position: relative;