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,26 +1,28 @@
|
|
|
1
1
|
@use "../base";
|
|
2
|
-
@use "../functions" as *;
|
|
3
2
|
|
|
4
|
-
$text-color:
|
|
5
|
-
$background-color:
|
|
6
|
-
$border-color:
|
|
7
|
-
$border-radius:
|
|
8
|
-
$font-family:
|
|
9
|
-
$mono-font-family:
|
|
3
|
+
$text-color: 0 !default;
|
|
4
|
+
$background-color: 0 !default;
|
|
5
|
+
$border-color: 0 !default;
|
|
6
|
+
$border-radius: 0 !default;
|
|
7
|
+
$font-family: 0 !default;
|
|
8
|
+
$mono-font-family: 0 !default;
|
|
10
9
|
|
|
11
10
|
.Input {
|
|
11
|
+
overflow: visible;
|
|
12
12
|
position: relative;
|
|
13
13
|
display: inline-block;
|
|
14
14
|
width: base.em(120px);
|
|
15
|
-
border: base.em(1px) solid $border-color;
|
|
16
|
-
border: base.em(1px) solid rgba($border-color, 0.75);
|
|
17
|
-
border-radius: $border-radius;
|
|
18
|
-
color: $text-color;
|
|
19
|
-
background-color: $background-color;
|
|
20
|
-
padding: 0 base.em(4px);
|
|
21
|
-
margin-right: base.em(2px);
|
|
22
15
|
line-height: base.em(17px);
|
|
23
|
-
|
|
16
|
+
padding: 0 var(--space-sm);
|
|
17
|
+
margin-right: var(--space-xs);
|
|
18
|
+
background-color: var(--input-background);
|
|
19
|
+
color: var(--input-color);
|
|
20
|
+
border: var(--border-thickness-tiny) solid var(--input-border-color);
|
|
21
|
+
border-radius: var(--input-border-radius);
|
|
22
|
+
|
|
23
|
+
&:focus-within {
|
|
24
|
+
border-color: var(--input-border-color-focus);
|
|
25
|
+
}
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
.Input--fluid {
|
|
@@ -36,10 +38,7 @@ $mono-font-family: "Consolas", monospace !default;
|
|
|
36
38
|
.Input__input {
|
|
37
39
|
display: block;
|
|
38
40
|
position: absolute;
|
|
39
|
-
|
|
40
|
-
bottom: 0;
|
|
41
|
-
left: 0;
|
|
42
|
-
right: 0;
|
|
41
|
+
inset: 0;
|
|
43
42
|
border: 0;
|
|
44
43
|
outline: 0;
|
|
45
44
|
width: 100%;
|
|
@@ -47,19 +46,18 @@ $mono-font-family: "Consolas", monospace !default;
|
|
|
47
46
|
line-height: base.em(17px);
|
|
48
47
|
height: base.em(17px);
|
|
49
48
|
margin: 0;
|
|
50
|
-
padding: 0
|
|
51
|
-
font-family:
|
|
49
|
+
padding: 0 var(--space-m);
|
|
50
|
+
font-family: var(--input-font-family);
|
|
52
51
|
background-color: transparent;
|
|
53
|
-
color:
|
|
52
|
+
color: var(--input-color);
|
|
54
53
|
color: inherit;
|
|
55
54
|
|
|
56
|
-
|
|
55
|
+
&::placeholder {
|
|
57
56
|
font-style: italic;
|
|
58
|
-
color:
|
|
59
|
-
color: hsla(0, 0%, 100%, 0.45);
|
|
57
|
+
color: var(--input-color-placeholder);
|
|
60
58
|
}
|
|
61
59
|
}
|
|
62
60
|
|
|
63
61
|
.Input--monospace .Input__input {
|
|
64
|
-
font-family:
|
|
62
|
+
font-family: var(--input-font-family-mono);
|
|
65
63
|
}
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
@use "../base";
|
|
2
2
|
@use "../colors";
|
|
3
|
-
@use "../functions" as *;
|
|
4
3
|
|
|
5
|
-
$
|
|
6
|
-
$
|
|
7
|
-
$
|
|
8
|
-
$knob-color: hsl(0, 0%, 20%) !default;
|
|
9
|
-
$popup-background-color: hsl(0, 0%, 0%) !default;
|
|
10
|
-
$popup-text-color: hsl(0, 0%, 100%) !default;
|
|
4
|
+
$pi: 3.1416;
|
|
5
|
+
$bg-map: colors.$color-map !default;
|
|
6
|
+
$fg-map: colors.$color-map !default;
|
|
11
7
|
|
|
12
|
-
$
|
|
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
13
|
|
|
14
14
|
.Knob {
|
|
15
|
+
user-select: none;
|
|
16
|
+
cursor: var(--cursor-n-resize);
|
|
15
17
|
position: relative;
|
|
16
18
|
font-size: 1rem;
|
|
17
19
|
width: 2.6em;
|
|
18
20
|
height: 2.6em;
|
|
19
21
|
margin: 0 auto;
|
|
20
22
|
margin-bottom: -0.2em;
|
|
21
|
-
cursor: n-resize;
|
|
22
23
|
|
|
23
24
|
// Adjusts a baseline in a way, that makes knob middle-aligned
|
|
24
25
|
// when it flows with the text.
|
|
@@ -31,27 +32,21 @@ $inner-padding: 0.1em;
|
|
|
31
32
|
|
|
32
33
|
.Knob__circle {
|
|
33
34
|
position: absolute;
|
|
34
|
-
|
|
35
|
-
bottom: $inner-padding;
|
|
36
|
-
left: $inner-padding;
|
|
37
|
-
right: $inner-padding;
|
|
35
|
+
inset: var(--knob-inner-padding);
|
|
38
36
|
margin: 0.3em;
|
|
39
|
-
background-color:
|
|
37
|
+
background-color: var(--knob-color);
|
|
40
38
|
background-image: linear-gradient(
|
|
41
39
|
to bottom,
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
hsl(from var(--knob-color) h s calc(l + 15)) 0%,
|
|
41
|
+
var(--knob-color) 100%
|
|
44
42
|
);
|
|
45
|
-
border-radius:
|
|
46
|
-
box-shadow:
|
|
43
|
+
border-radius: var(--border-radius-circular);
|
|
44
|
+
box-shadow: var(--shadow-glow-medium) hsl(from var(--knob-color) h s l / 0.25);
|
|
47
45
|
}
|
|
48
46
|
|
|
49
47
|
.Knob__cursorBox {
|
|
50
48
|
position: absolute;
|
|
51
|
-
|
|
52
|
-
bottom: 0;
|
|
53
|
-
left: 0;
|
|
54
|
-
right: 0;
|
|
49
|
+
inset: 0;
|
|
55
50
|
}
|
|
56
51
|
|
|
57
52
|
.Knob__cursor {
|
|
@@ -60,41 +55,38 @@ $inner-padding: 0.1em;
|
|
|
60
55
|
margin: 0 auto;
|
|
61
56
|
width: 0.2em;
|
|
62
57
|
height: 0.8em;
|
|
63
|
-
background-color:
|
|
58
|
+
background-color: hsl(from var(--knob-color) h s 85);
|
|
64
59
|
}
|
|
65
60
|
|
|
66
61
|
.Knob__popupValue {
|
|
62
|
+
white-space: nowrap;
|
|
67
63
|
position: absolute;
|
|
68
|
-
top:
|
|
69
|
-
|
|
64
|
+
top: 0;
|
|
65
|
+
left: 50%;
|
|
70
66
|
font-size: 1rem;
|
|
71
67
|
text-align: center;
|
|
72
|
-
padding:
|
|
73
|
-
color:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
68
|
+
padding: var(--space-s) var(--space-m);
|
|
69
|
+
background-color: var(--knob-popup-background);
|
|
70
|
+
color: var(--knob-popup-color);
|
|
71
|
+
border-radius: var(--knob-popup-border-radius);
|
|
72
|
+
transform: translateY(-100%) translateX(-50%);
|
|
73
|
+
backdrop-filter: var(--knob-popup-blur);
|
|
77
74
|
}
|
|
78
75
|
|
|
79
76
|
.Knob__ring {
|
|
77
|
+
overflow: visible;
|
|
80
78
|
position: absolute;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
left: 0;
|
|
84
|
-
right: 0;
|
|
85
|
-
padding: $inner-padding;
|
|
79
|
+
inset: 0;
|
|
80
|
+
padding: var(--knob-inner-padding);
|
|
86
81
|
}
|
|
87
82
|
|
|
88
|
-
$pi: 3.1416;
|
|
89
|
-
|
|
90
83
|
.Knob__ringTrackPivot {
|
|
91
84
|
transform: rotateZ(135deg);
|
|
92
85
|
}
|
|
93
86
|
|
|
94
87
|
.Knob__ringTrack {
|
|
95
|
-
// transform-origin: 50% 50%;
|
|
96
88
|
fill: transparent;
|
|
97
|
-
stroke:
|
|
89
|
+
stroke: hsl(from var(--knob-ring-color) h s l / 0.15);
|
|
98
90
|
stroke-width: 8;
|
|
99
91
|
stroke-linecap: round;
|
|
100
92
|
stroke-dasharray: 75 * $pi;
|
|
@@ -110,11 +102,11 @@ $pi: 3.1416;
|
|
|
110
102
|
|
|
111
103
|
.Knob__ringFill {
|
|
112
104
|
fill: transparent;
|
|
113
|
-
stroke:
|
|
105
|
+
stroke: var(--knob-ring-color);
|
|
114
106
|
stroke-width: 8;
|
|
115
107
|
stroke-linecap: round;
|
|
116
108
|
stroke-dasharray: 100 * $pi;
|
|
117
|
-
transition: stroke
|
|
109
|
+
transition: stroke var(--transition-time-medium) ease-out;
|
|
118
110
|
}
|
|
119
111
|
|
|
120
112
|
@each $color-name, $color-value in $fg-map {
|
|
@@ -122,5 +114,9 @@ $pi: 3.1416;
|
|
|
122
114
|
.Knob__ringFill {
|
|
123
115
|
stroke: $color-value;
|
|
124
116
|
}
|
|
117
|
+
|
|
118
|
+
.Knob__ringTrack {
|
|
119
|
+
stroke: hsl(from $color-value h s l / 0.15);
|
|
120
|
+
}
|
|
125
121
|
}
|
|
126
122
|
}
|
|
@@ -2,14 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
.LabeledList {
|
|
4
4
|
display: table;
|
|
5
|
-
// IE8: Does not support calc
|
|
6
|
-
width: 100%;
|
|
7
5
|
// Compensate for negative margin
|
|
8
6
|
width: calc(100% + 1em);
|
|
9
7
|
border-collapse: collapse;
|
|
10
8
|
border-spacing: 0;
|
|
11
|
-
margin: -
|
|
12
|
-
margin-bottom: 0;
|
|
9
|
+
margin: calc(-1 * var(--space-s)) calc(-1 * var(--space-m)) 0;
|
|
13
10
|
padding: 0;
|
|
14
11
|
}
|
|
15
12
|
|
|
@@ -24,7 +21,7 @@
|
|
|
24
21
|
.LabeledList__cell {
|
|
25
22
|
display: table-cell;
|
|
26
23
|
margin: 0;
|
|
27
|
-
padding:
|
|
24
|
+
padding: var(--space-s) var(--space-m);
|
|
28
25
|
border: 0;
|
|
29
26
|
text-align: left;
|
|
30
27
|
}
|
|
@@ -39,6 +36,11 @@
|
|
|
39
36
|
width: 0.1%;
|
|
40
37
|
white-space: nowrap;
|
|
41
38
|
text-align: right;
|
|
42
|
-
padding-top:
|
|
39
|
+
padding-top: var(--space-xxs);
|
|
43
40
|
padding-bottom: 0;
|
|
44
41
|
}
|
|
42
|
+
|
|
43
|
+
.LabeledList__breakContents {
|
|
44
|
+
word-break: break-all;
|
|
45
|
+
word-wrap: break-word;
|
|
46
|
+
}
|
|
@@ -1,56 +1,52 @@
|
|
|
1
|
-
@use "sass:color";
|
|
2
1
|
@use "../base";
|
|
3
2
|
|
|
4
|
-
$separator-color: base.$color-bg-section;
|
|
5
|
-
$background-color: base.$color-bg !default;
|
|
6
|
-
$dropdown-z-index: 5;
|
|
7
|
-
|
|
8
3
|
.MenuBar {
|
|
9
4
|
display: flex;
|
|
10
5
|
}
|
|
11
6
|
|
|
12
7
|
.MenuBar__font {
|
|
13
|
-
font-family:
|
|
8
|
+
font-family: var(--menu-bar-font-family);
|
|
14
9
|
font-size: base.em(12px);
|
|
15
10
|
line-height: base.em(17px);
|
|
16
11
|
}
|
|
17
12
|
|
|
18
13
|
.MenuBar__hover {
|
|
19
14
|
&:hover {
|
|
20
|
-
background-color:
|
|
15
|
+
background-color: hsl(from var(--menu-bar-background) h s calc(l + 20));
|
|
21
16
|
transition: background-color 0ms;
|
|
22
17
|
}
|
|
23
18
|
}
|
|
24
19
|
|
|
25
20
|
.MenuBar__MenuBarButton {
|
|
26
|
-
padding:
|
|
21
|
+
padding: var(--space-s) var(--space-m);
|
|
27
22
|
}
|
|
28
23
|
|
|
29
24
|
.MenuBar__menu {
|
|
30
25
|
position: absolute;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
background-color: var(--menu-bar-background);
|
|
27
|
+
padding: var(--space-sm);
|
|
28
|
+
box-shadow: 4px 6px 5px -2px hsla(0, 0%, 0%, 0.5);
|
|
29
|
+
z-index: 5;
|
|
35
30
|
}
|
|
36
31
|
|
|
37
32
|
.MenuBar__MenuItem {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
background-color: $background-color;
|
|
33
|
+
transition: background-color var(--menu-bar-transition) ease-out;
|
|
34
|
+
background-color: var(--menu-bar-background);
|
|
41
35
|
white-space: nowrap;
|
|
42
|
-
padding:
|
|
36
|
+
padding: var(--space-sm) var(--space-xl) var(--space-sm)
|
|
37
|
+
calc(var(--space-xxl) + 1rem);
|
|
43
38
|
}
|
|
44
39
|
|
|
45
40
|
.MenuBar__MenuItemToggle {
|
|
46
|
-
padding:
|
|
41
|
+
padding: var(--space-sm) var(--space-xl) var(--space-sm) 0;
|
|
47
42
|
}
|
|
48
43
|
|
|
49
44
|
.MenuBar__MenuItemToggle__check {
|
|
50
45
|
display: inline-block;
|
|
51
46
|
vertical-align: middle;
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
text-align: center;
|
|
48
|
+
min-width: 2.5rem;
|
|
49
|
+
padding-left: var(--space-sm);
|
|
54
50
|
}
|
|
55
51
|
|
|
56
52
|
.MenuBar__over {
|
|
@@ -66,6 +62,6 @@ $dropdown-z-index: 5;
|
|
|
66
62
|
|
|
67
63
|
.MenuBar__Separator {
|
|
68
64
|
display: block;
|
|
69
|
-
margin:
|
|
70
|
-
border-top:
|
|
65
|
+
margin: var(--space-sm);
|
|
66
|
+
border-top: var(--border-thickness-tiny) solid var(--color-border);
|
|
71
67
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
@use "../base";
|
|
2
|
-
|
|
3
|
-
$background-color: base.$color-bg !default;
|
|
4
|
-
|
|
5
1
|
.Modal {
|
|
6
|
-
background-color:
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
background-color: var(--modal-background);
|
|
3
|
+
padding: var(--modal-padding);
|
|
4
|
+
|
|
5
|
+
&__dimmer .Dimmer__inner {
|
|
6
|
+
// 1rem for window padding, 1rem like modal margin
|
|
7
|
+
max-width: calc(100vw - var(--space-xxl));
|
|
8
|
+
max-height: calc(100vh - var(--space-xxl));
|
|
9
|
+
}
|
|
9
10
|
}
|
|
@@ -1,60 +1,56 @@
|
|
|
1
|
-
@use "sass:color";
|
|
2
1
|
@use "../base";
|
|
3
2
|
@use "../colors";
|
|
4
|
-
@use "../functions" as *;
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
$
|
|
8
|
-
$color
|
|
9
|
-
$color-
|
|
10
|
-
$bg-map: colors.$bg-map !default;
|
|
4
|
+
$bg-map: colors.$color-map !default;
|
|
5
|
+
$fg-map: colors.$color-map !default;
|
|
6
|
+
$background-color: 0 !default;
|
|
7
|
+
$color-stripes: 0 !default;
|
|
11
8
|
|
|
12
9
|
.NoticeBox {
|
|
13
|
-
// Adapt text color to background luminance to ensure high contast
|
|
14
|
-
$luminance: luminance($background-color);
|
|
15
|
-
$text-color: if($luminance > 0.35, rgba(0, 0, 0, 1), rgba(255, 255, 255, 1));
|
|
16
|
-
|
|
17
|
-
padding: 0.33em 0.5em;
|
|
18
|
-
margin-bottom: 0.5em;
|
|
19
|
-
box-shadow: none;
|
|
20
10
|
font-weight: bold;
|
|
21
11
|
font-style: italic;
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
padding: var(--space-sm) var(--space-m);
|
|
13
|
+
margin-bottom: var(--space-m);
|
|
14
|
+
color: var(--notice-box-color);
|
|
15
|
+
background-color: var(--notice-box-background);
|
|
24
16
|
background-image: repeating-linear-gradient(
|
|
25
17
|
-45deg,
|
|
26
18
|
transparent,
|
|
27
19
|
transparent base.em(10px),
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
var(--notice-box-stripes) base.em(10px),
|
|
21
|
+
var(--notice-box-stripes) base.em(20px)
|
|
30
22
|
);
|
|
31
23
|
}
|
|
32
24
|
|
|
33
25
|
@mixin box-color($color) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
color: $text-color;
|
|
37
|
-
background-color: color.adjust($color, $saturation: -15%, $lightness: -15%);
|
|
26
|
+
background-color: hsl(from $color h calc(s - 15) calc(l - 15));
|
|
27
|
+
color: var(--color-text-fixed-white);
|
|
38
28
|
}
|
|
39
29
|
|
|
40
30
|
@each $color-name, $color-value in $bg-map {
|
|
41
31
|
.NoticeBox--color--#{$color-name} {
|
|
32
|
+
@each $color in colors.$low-contrast-color-map {
|
|
33
|
+
@if $color-name == $color {
|
|
34
|
+
--color-text-fixed-white: var(--color-black);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
42
38
|
@include box-color($color-value);
|
|
43
39
|
}
|
|
44
40
|
}
|
|
45
41
|
|
|
46
42
|
.NoticeBox--type--info {
|
|
47
|
-
@include box-color(
|
|
43
|
+
@include box-color(var(--color-blue));
|
|
48
44
|
}
|
|
49
45
|
|
|
50
46
|
.NoticeBox--type--success {
|
|
51
|
-
@include box-color(
|
|
47
|
+
@include box-color(var(--color-green));
|
|
52
48
|
}
|
|
53
49
|
|
|
54
50
|
.NoticeBox--type--warning {
|
|
55
|
-
@include box-color(
|
|
51
|
+
@include box-color(var(--color-orange));
|
|
56
52
|
}
|
|
57
53
|
|
|
58
54
|
.NoticeBox--type--danger {
|
|
59
|
-
@include box-color(
|
|
55
|
+
@include box-color(var(--color-red));
|
|
60
56
|
}
|
|
@@ -3,25 +3,29 @@
|
|
|
3
3
|
@use "../functions" as *;
|
|
4
4
|
@use "./Input";
|
|
5
5
|
|
|
6
|
-
$text-color:
|
|
7
|
-
$background-color:
|
|
8
|
-
$border-color:
|
|
9
|
-
$border-radius:
|
|
6
|
+
$text-color: 0 !default;
|
|
7
|
+
$background-color: 0 !default;
|
|
8
|
+
$border-color: 0 !default;
|
|
9
|
+
$border-radius: 0 !default;
|
|
10
10
|
|
|
11
11
|
.NumberInput {
|
|
12
|
+
cursor: var(--cursor-n-resize);
|
|
13
|
+
overflow: visible;
|
|
12
14
|
position: relative;
|
|
13
15
|
display: inline-block;
|
|
14
|
-
border: base.em(1px) solid $border-color;
|
|
15
|
-
border: base.em(1px) solid rgba($border-color, 0.75);
|
|
16
|
-
border-radius: $border-radius;
|
|
17
|
-
color: $border-color;
|
|
18
|
-
background-color: $background-color;
|
|
19
|
-
padding: 0 base.em(4px);
|
|
20
|
-
margin-right: base.em(2px);
|
|
21
|
-
line-height: base.em(17px);
|
|
22
16
|
text-align: right;
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
line-height: base.em(17px);
|
|
18
|
+
padding: 0 var(--space-sm);
|
|
19
|
+
margin-right: var(--space-xs);
|
|
20
|
+
background-color: var(--number-input-background);
|
|
21
|
+
color: var(--number-input-border-color-active);
|
|
22
|
+
border: var(--border-thickness-tiny) solid var(--number-input-border-color);
|
|
23
|
+
border-radius: var(--number-input-border-radius);
|
|
24
|
+
transition: border-color var(--number-input-transition);
|
|
25
|
+
|
|
26
|
+
&:active {
|
|
27
|
+
border-color: var(--number-input-border-color-active);
|
|
28
|
+
}
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
.NumberInput--fluid {
|
|
@@ -29,14 +33,14 @@ $border-radius: Input.$border-radius !default;
|
|
|
29
33
|
}
|
|
30
34
|
|
|
31
35
|
.NumberInput__content {
|
|
32
|
-
margin-left:
|
|
36
|
+
margin-left: var(--space-m);
|
|
33
37
|
}
|
|
34
38
|
|
|
35
39
|
.NumberInput__barContainer {
|
|
36
40
|
position: absolute;
|
|
37
|
-
top:
|
|
38
|
-
bottom:
|
|
39
|
-
left:
|
|
41
|
+
top: var(--space-xs);
|
|
42
|
+
bottom: var(--space-xs);
|
|
43
|
+
left: var(--space-xs);
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
.NumberInput__bar {
|
|
@@ -45,17 +49,16 @@ $border-radius: Input.$border-radius !default;
|
|
|
45
49
|
left: 0;
|
|
46
50
|
width: base.em(3px);
|
|
47
51
|
box-sizing: border-box;
|
|
48
|
-
border-bottom:
|
|
49
|
-
|
|
52
|
+
border-bottom: var(--border-thickness-tiny) solid
|
|
53
|
+
var(--number-input-border-color-active);
|
|
54
|
+
background-color: var(--number-input-border-color-active);
|
|
50
55
|
}
|
|
51
56
|
|
|
52
57
|
.NumberInput__input {
|
|
53
58
|
display: block;
|
|
54
59
|
position: absolute;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
left: 0;
|
|
58
|
-
right: 0;
|
|
60
|
+
text-align: right;
|
|
61
|
+
inset: 0;
|
|
59
62
|
border: 0;
|
|
60
63
|
outline: 0;
|
|
61
64
|
width: 100%;
|
|
@@ -63,9 +66,8 @@ $border-radius: Input.$border-radius !default;
|
|
|
63
66
|
line-height: base.em(17px);
|
|
64
67
|
height: base.em(17px);
|
|
65
68
|
margin: 0;
|
|
66
|
-
padding: 0
|
|
69
|
+
padding: 0 var(--space-m);
|
|
67
70
|
font-family: Verdana, sans-serif;
|
|
68
|
-
background-color:
|
|
69
|
-
color:
|
|
70
|
-
text-align: right;
|
|
71
|
+
background-color: var(--number-input-background);
|
|
72
|
+
color: var(--number-input-color);
|
|
71
73
|
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
@use "../base";
|
|
2
2
|
@use "../colors";
|
|
3
|
-
@use "../functions" as *;
|
|
4
3
|
|
|
5
|
-
$
|
|
6
|
-
$
|
|
7
|
-
$
|
|
8
|
-
$
|
|
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
9
|
|
|
10
10
|
.ProgressBar {
|
|
11
11
|
display: inline-block;
|
|
12
12
|
position: relative;
|
|
13
13
|
width: 100%;
|
|
14
|
-
padding: 0
|
|
15
|
-
border-width:
|
|
14
|
+
padding: 0 var(--space-m);
|
|
15
|
+
border-width: var(--border-thickness-tiny) !important;
|
|
16
16
|
border-style: solid !important;
|
|
17
|
-
border-radius:
|
|
18
|
-
background-color:
|
|
19
|
-
transition: border-color
|
|
17
|
+
border-radius: var(--progress-bar-border-radius);
|
|
18
|
+
background-color: var(--progress-bar-background);
|
|
19
|
+
transition: border-color var(--progress-bar-transition) ease-out;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.ProgressBar__fill {
|
|
23
23
|
position: absolute;
|
|
24
|
-
top:
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
top: 0;
|
|
25
|
+
bottom: 0;
|
|
26
|
+
left: 0;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.ProgressBar__fill--animated {
|
|
30
30
|
transition:
|
|
31
|
-
background-color
|
|
32
|
-
width
|
|
31
|
+
background-color var(--progress-bar-transition) ease-out,
|
|
32
|
+
width var(--progress-bar-transition) ease-out;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.ProgressBar__content {
|
|
@@ -37,22 +37,30 @@ $bg-map: colors.$bg-map !default;
|
|
|
37
37
|
line-height: base.em(17px);
|
|
38
38
|
width: 100%;
|
|
39
39
|
text-align: right;
|
|
40
|
+
user-select: none;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
.ProgressBar--color--default {
|
|
43
|
-
border:
|
|
44
|
+
border: var(--border-thickness-tiny) solid
|
|
45
|
+
hsl(from var(--progress-bar-fill) h s calc(l - var(--adjust-color)));
|
|
44
46
|
|
|
45
47
|
.ProgressBar__fill {
|
|
46
|
-
background-color:
|
|
48
|
+
background-color: hsl(
|
|
49
|
+
from var(--progress-bar-fill) h s calc(l - var(--adjust-color))
|
|
50
|
+
);
|
|
47
51
|
}
|
|
48
52
|
}
|
|
49
53
|
|
|
50
54
|
@each $color-name, $color-value in $bg-map {
|
|
51
55
|
.ProgressBar--color--#{$color-name} {
|
|
52
|
-
border-color:
|
|
56
|
+
border-color: hsl(
|
|
57
|
+
from $color-value h s calc(l - var(--adjust-color))
|
|
58
|
+
) !important;
|
|
53
59
|
|
|
54
60
|
.ProgressBar__fill {
|
|
55
|
-
background-color:
|
|
61
|
+
background-color: hsl(
|
|
62
|
+
from $color-value h s calc(l - var(--adjust-color))
|
|
63
|
+
);
|
|
56
64
|
}
|
|
57
65
|
}
|
|
58
66
|
}
|