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,9 +1,29 @@
|
|
|
1
|
-
@use "../base";
|
|
2
1
|
@use "../colors";
|
|
3
|
-
@use "../functions" as *;
|
|
4
2
|
|
|
5
|
-
$
|
|
6
|
-
$
|
|
3
|
+
$pi: 3.1416;
|
|
4
|
+
$fg-map: colors.$color-map !default;
|
|
5
|
+
$ring-color: 0 !default;
|
|
6
|
+
|
|
7
|
+
@keyframes RoundGauge__alertAnim {
|
|
8
|
+
0% {
|
|
9
|
+
opacity: 0.1;
|
|
10
|
+
}
|
|
11
|
+
50% {
|
|
12
|
+
opacity: 1;
|
|
13
|
+
}
|
|
14
|
+
100% {
|
|
15
|
+
opacity: 0.1;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@keyframes RoundGauge__needleAlertAnim {
|
|
20
|
+
0% {
|
|
21
|
+
transform: rotate(var(--round-gauge-needle-alert-rotation));
|
|
22
|
+
}
|
|
23
|
+
50% {
|
|
24
|
+
transform: rotate(calc(-1 * var(--round-gauge-needle-alert-rotation)));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
7
27
|
|
|
8
28
|
.RoundGauge {
|
|
9
29
|
font-size: 1rem;
|
|
@@ -11,13 +31,16 @@ $ring-color: hsl(212.2, 46.8%, 60.2%) !default;
|
|
|
11
31
|
height: 1.3em;
|
|
12
32
|
margin: 0 auto;
|
|
13
33
|
margin-bottom: 0.2em;
|
|
14
|
-
}
|
|
15
34
|
|
|
16
|
-
|
|
35
|
+
&__wrapper {
|
|
36
|
+
display: inline-block;
|
|
37
|
+
text-align: center;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
17
40
|
|
|
18
41
|
.RoundGauge__ringTrack {
|
|
19
42
|
fill: transparent;
|
|
20
|
-
stroke:
|
|
43
|
+
stroke: hsla(0, 0%, 100%, 0.1);
|
|
21
44
|
stroke-width: 10;
|
|
22
45
|
stroke-dasharray: 50 * $pi;
|
|
23
46
|
stroke-dashoffset: 50 * $pi;
|
|
@@ -25,20 +48,20 @@ $pi: 3.1416;
|
|
|
25
48
|
|
|
26
49
|
.RoundGauge__ringFill {
|
|
27
50
|
fill: transparent;
|
|
28
|
-
stroke:
|
|
51
|
+
stroke: var(--round-gauge-ring-color);
|
|
29
52
|
stroke-width: 10;
|
|
30
53
|
stroke-dasharray: 100 * $pi;
|
|
31
|
-
transition: stroke
|
|
54
|
+
transition: stroke var(--round-gauge-transition) ease-out;
|
|
32
55
|
}
|
|
33
56
|
|
|
34
57
|
.RoundGauge__needle,
|
|
35
58
|
.RoundGauge__ringFill {
|
|
36
|
-
transition: transform
|
|
59
|
+
transition: transform var(--round-gauge-transition) ease-in-out;
|
|
37
60
|
}
|
|
38
61
|
|
|
39
62
|
.RoundGauge__needleLine,
|
|
40
63
|
.RoundGauge__needleMiddle {
|
|
41
|
-
fill:
|
|
64
|
+
fill: var(--color-red);
|
|
42
65
|
}
|
|
43
66
|
|
|
44
67
|
.RoundGauge__alert {
|
|
@@ -46,7 +69,17 @@ $pi: 3.1416;
|
|
|
46
69
|
clip-rule: evenodd;
|
|
47
70
|
stroke-linejoin: round;
|
|
48
71
|
stroke-miterlimit: 2;
|
|
49
|
-
fill:
|
|
72
|
+
fill: hsla(0, 0%, 100%, 0.1);
|
|
73
|
+
transform: scale(0.9);
|
|
74
|
+
transform-origin: top;
|
|
75
|
+
|
|
76
|
+
&.active {
|
|
77
|
+
~ .RoundGauge__needle .RoundGauge__needleLine {
|
|
78
|
+
transform-origin: bottom;
|
|
79
|
+
animation: RoundGauge__needleAlertAnim
|
|
80
|
+
var(--round-gauge-needle-alert-animation) infinite;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
50
83
|
}
|
|
51
84
|
|
|
52
85
|
.RoundGauge__alert.max {
|
|
@@ -62,22 +95,9 @@ $pi: 3.1416;
|
|
|
62
95
|
@each $color-name, $color-value in $fg-map {
|
|
63
96
|
.RoundGauge__alert--#{$color-name} {
|
|
64
97
|
fill: $color-value;
|
|
65
|
-
transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1);
|
|
66
98
|
animation: RoundGauge__alertAnim
|
|
67
|
-
|
|
99
|
+
var(--round-gauge-alert-animation)
|
|
68
100
|
cubic-bezier(0.34, 1.56, 0.64, 1)
|
|
69
101
|
infinite;
|
|
70
102
|
}
|
|
71
103
|
}
|
|
72
|
-
|
|
73
|
-
@keyframes RoundGauge__alertAnim {
|
|
74
|
-
0% {
|
|
75
|
-
opacity: 0.1;
|
|
76
|
-
}
|
|
77
|
-
50% {
|
|
78
|
-
opacity: 1;
|
|
79
|
-
}
|
|
80
|
-
100% {
|
|
81
|
-
opacity: 0.1;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
@@ -3,16 +3,17 @@
|
|
|
3
3
|
@use "../colors";
|
|
4
4
|
@use "../functions";
|
|
5
5
|
|
|
6
|
-
$title-text-color:
|
|
7
|
-
$background-color:
|
|
8
|
-
$separator-color:
|
|
6
|
+
$title-text-color: 0 !default;
|
|
7
|
+
$background-color: 0 !default;
|
|
8
|
+
$separator-color: 0 !default;
|
|
9
9
|
|
|
10
10
|
.Section {
|
|
11
11
|
position: relative;
|
|
12
|
-
margin-bottom:
|
|
13
|
-
background-color:
|
|
14
|
-
background-color: $background-color;
|
|
12
|
+
margin-bottom: var(--space-m);
|
|
13
|
+
background-color: var(--section-background);
|
|
15
14
|
box-sizing: border-box;
|
|
15
|
+
/* Make base transparent, cause it uses section background color */
|
|
16
|
+
scrollbar-color: var(--color-scrollbar-thumb) transparent;
|
|
16
17
|
|
|
17
18
|
&:last-child {
|
|
18
19
|
margin-bottom: 0;
|
|
@@ -21,21 +22,22 @@ $separator-color: colors.$primary !default;
|
|
|
21
22
|
|
|
22
23
|
.Section__title {
|
|
23
24
|
position: relative;
|
|
24
|
-
padding:
|
|
25
|
-
border-bottom:
|
|
25
|
+
padding: var(--space-m);
|
|
26
|
+
border-bottom: var(--section-separator-thickness) solid
|
|
27
|
+
var(--section-separator-color);
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
.Section__titleText {
|
|
29
31
|
font-size: base.em(14px);
|
|
30
32
|
font-weight: bold;
|
|
31
|
-
color:
|
|
33
|
+
color: var(--section-title-color);
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
.Section__buttons {
|
|
35
37
|
position: absolute;
|
|
36
38
|
display: inline-block;
|
|
37
|
-
right:
|
|
38
|
-
margin-top:
|
|
39
|
+
right: var(--space-m);
|
|
40
|
+
margin-top: calc(-1 * var(--space-xxs));
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
.Section__rest {
|
|
@@ -43,7 +45,7 @@ $separator-color: colors.$primary !default;
|
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
.Section__content {
|
|
46
|
-
padding:
|
|
48
|
+
padding: var(--space-ml) var(--space-m);
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
.Section--fitted > .Section__rest > .Section__content {
|
|
@@ -66,23 +68,7 @@ $separator-color: colors.$primary !default;
|
|
|
66
68
|
|
|
67
69
|
.Section--fill.Section--scrollable > .Section__rest > .Section__content {
|
|
68
70
|
position: absolute;
|
|
69
|
-
|
|
70
|
-
left: 0;
|
|
71
|
-
right: 0;
|
|
72
|
-
bottom: 0;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.Section--fill.Section--iefix {
|
|
76
|
-
display: table !important;
|
|
77
|
-
width: 100% !important;
|
|
78
|
-
height: 100% !important;
|
|
79
|
-
border-collapse: collapse;
|
|
80
|
-
border-spacing: 0;
|
|
81
|
-
|
|
82
|
-
& > .Section__rest {
|
|
83
|
-
display: table-row !important;
|
|
84
|
-
height: 100% !important;
|
|
85
|
-
}
|
|
71
|
+
inset: 0;
|
|
86
72
|
}
|
|
87
73
|
|
|
88
74
|
.Section--scrollable {
|
|
@@ -118,12 +104,11 @@ $separator-color: colors.$primary !default;
|
|
|
118
104
|
// Nested sections
|
|
119
105
|
.Section .Section {
|
|
120
106
|
background-color: transparent;
|
|
121
|
-
margin-
|
|
122
|
-
margin-right: -0.5em;
|
|
107
|
+
margin: 0 calc(-1 * var(--space-m)); // Compensate for padding: 0.5em;
|
|
123
108
|
|
|
124
109
|
// Remove extra space above the first nested section
|
|
125
110
|
&:first-child {
|
|
126
|
-
margin-top: -
|
|
111
|
+
margin-top: calc(-1 * var(--space-m));
|
|
127
112
|
}
|
|
128
113
|
}
|
|
129
114
|
|
|
@@ -1,49 +1,52 @@
|
|
|
1
1
|
@use "../base";
|
|
2
2
|
|
|
3
|
-
$cursor-color:
|
|
4
|
-
$popup-background-color:
|
|
5
|
-
$popup-text-color:
|
|
3
|
+
$cursor-color: 0 !default;
|
|
4
|
+
$popup-background-color: 0 !default;
|
|
5
|
+
$popup-text-color: 0 !default;
|
|
6
6
|
|
|
7
7
|
.Slider {
|
|
8
8
|
cursor: e-resize;
|
|
9
|
+
user-select: none;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
.Slider__cursorOffset {
|
|
12
13
|
position: absolute;
|
|
13
|
-
|
|
14
|
-
left: 0;
|
|
15
|
-
bottom: 0;
|
|
14
|
+
inset: 0;
|
|
16
15
|
transition: none !important;
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
.Slider__cursor {
|
|
20
19
|
position: absolute;
|
|
21
20
|
top: 0;
|
|
22
|
-
right:
|
|
21
|
+
right: calc(-1 * var(--space-xxs));
|
|
23
22
|
bottom: 0;
|
|
24
23
|
width: 0;
|
|
25
|
-
border-left:
|
|
24
|
+
border-left: var(--border-thickness-small) solid var(--slider-cursor-color);
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
.Slider__pointer {
|
|
29
28
|
position: absolute;
|
|
30
|
-
right:
|
|
31
|
-
bottom:
|
|
29
|
+
right: 0;
|
|
30
|
+
bottom: 0;
|
|
32
31
|
width: 0;
|
|
33
32
|
height: 0;
|
|
34
33
|
border-left: base.em(5px) solid transparent;
|
|
35
34
|
border-right: base.em(5px) solid transparent;
|
|
36
|
-
border-bottom: base.em(5px) solid
|
|
35
|
+
border-bottom: base.em(5px) solid var(--slider-cursor-color);
|
|
36
|
+
transform: translate(50%, calc(100% - var(--border-thickness-tiny)));
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.Slider__popupValue {
|
|
40
|
+
user-select: none;
|
|
41
|
+
white-space: nowrap;
|
|
40
42
|
position: absolute;
|
|
41
43
|
right: 0;
|
|
42
44
|
top: -2rem;
|
|
43
45
|
font-size: 1rem;
|
|
44
|
-
padding:
|
|
45
|
-
color:
|
|
46
|
-
|
|
46
|
+
padding: var(--space-s) var(--space-m);
|
|
47
|
+
background-color: var(--slider-popup-background);
|
|
48
|
+
color: var(--slider-popup-color);
|
|
49
|
+
border-radius: var(--slider-popup-border-radius);
|
|
47
50
|
transform: translateX(50%);
|
|
48
|
-
|
|
51
|
+
backdrop-filter: var(--slider-popup-blur);
|
|
49
52
|
}
|
|
@@ -1,59 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* SPDX-License-Identifier: MIT
|
|
4
|
-
*/
|
|
1
|
+
.Stack {
|
|
2
|
+
gap: 0.5em;
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
$zebra-background-color: base.$color-bg-section !default;
|
|
10
|
-
|
|
11
|
-
.Stack--fill {
|
|
12
|
-
height: 100%;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.Stack--horizontal > .Stack__item {
|
|
16
|
-
margin-left: 0.5em;
|
|
17
|
-
|
|
18
|
-
&:first-child {
|
|
19
|
-
margin-left: 0;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.Stack--vertical > .Stack__item {
|
|
24
|
-
margin-top: 0.5em;
|
|
25
|
-
|
|
26
|
-
&:first-child {
|
|
27
|
-
margin-top: 0;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.Stack--reverse > .Stack__item {
|
|
32
|
-
margin-left: 0;
|
|
33
|
-
margin-right: 0.5em;
|
|
34
|
-
|
|
35
|
-
&:first-child {
|
|
36
|
-
margin-right: 0;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.Stack--reverse--vertical > .Stack__item {
|
|
41
|
-
margin-top: 0;
|
|
42
|
-
margin-bottom: 0.5em;
|
|
43
|
-
|
|
44
|
-
&:first-child {
|
|
45
|
-
margin-bottom: 0;
|
|
4
|
+
&--fill {
|
|
5
|
+
height: 100%;
|
|
46
6
|
}
|
|
47
7
|
}
|
|
48
8
|
|
|
49
|
-
.Stack--zebra > .Stack__item:nth-child(
|
|
50
|
-
background-color:
|
|
9
|
+
.Stack--zebra > .Stack__item:nth-child(odd) {
|
|
10
|
+
background-color: var(--candystripe-odd);
|
|
51
11
|
}
|
|
52
12
|
|
|
53
13
|
.Stack--horizontal > .Stack__divider:not(.Stack__divider--hidden) {
|
|
54
|
-
border-left:
|
|
14
|
+
border-left: var(--divider-border);
|
|
55
15
|
}
|
|
56
16
|
|
|
57
17
|
.Stack--vertical > .Stack__divider:not(.Stack__divider--hidden) {
|
|
58
|
-
border-top:
|
|
18
|
+
border-top: var(--divider-border);
|
|
59
19
|
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
.Table__cell {
|
|
18
18
|
display: table-cell;
|
|
19
|
-
padding: 0
|
|
19
|
+
padding: 0 var(--space-s);
|
|
20
20
|
|
|
21
21
|
&:first-child {
|
|
22
22
|
padding-left: 0;
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
.Table__row--header .Table__cell,
|
|
31
31
|
.Table__cell--header {
|
|
32
32
|
font-weight: bold;
|
|
33
|
-
padding-bottom:
|
|
33
|
+
padding-bottom: var(--space-m);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.Table__cell--collapsing {
|
|
@@ -1,52 +1,72 @@
|
|
|
1
|
-
@use "sass:color";
|
|
2
|
-
@use "sass:math";
|
|
3
|
-
@use "../base";
|
|
4
1
|
@use "../colors";
|
|
5
2
|
|
|
6
|
-
$
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
$text-color:
|
|
11
|
-
$
|
|
12
|
-
$tab-color:
|
|
13
|
-
$tab-color-
|
|
14
|
-
$
|
|
15
|
-
$border-radius:
|
|
16
|
-
|
|
3
|
+
$fg-map: colors.$color-map !default;
|
|
4
|
+
|
|
5
|
+
$color-default: 0 !default;
|
|
6
|
+
$text-color: 0 !default;
|
|
7
|
+
$text-color-selected: 0 !default;
|
|
8
|
+
$tab-color: 0 !default;
|
|
9
|
+
$tab-color-hovered: 0 !default;
|
|
10
|
+
$tab-color-selected: 0 !default;
|
|
11
|
+
$transition-duration: 0 !default;
|
|
12
|
+
$border-radius: 0 !default;
|
|
13
|
+
|
|
14
|
+
@mixin indicator($position) {
|
|
15
|
+
position: relative;
|
|
16
|
+
padding-#{$position}: var(--tab-indicator-size);
|
|
17
|
+
|
|
18
|
+
&:before {
|
|
19
|
+
content: "";
|
|
20
|
+
position: absolute;
|
|
21
|
+
#{$position}: 0;
|
|
22
|
+
background-color: currentColor;
|
|
23
|
+
transition: transform var(--tab-transition);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@if $position == bottom or $position == top {
|
|
27
|
+
&:before {
|
|
28
|
+
width: 100%;
|
|
29
|
+
height: var(--tab-indicator-size);
|
|
30
|
+
transform: scaleX(0);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&--selected:before {
|
|
34
|
+
transform: scaleX(0.99999) !important;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@if $position == left or $position == right {
|
|
39
|
+
&:before {
|
|
40
|
+
width: var(--tab-indicator-size);
|
|
41
|
+
height: 100%;
|
|
42
|
+
transform: scaleY(0);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&--selected:before {
|
|
46
|
+
transform: scaleY(0.99999) !important;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
17
50
|
|
|
18
51
|
.Tabs {
|
|
19
52
|
display: flex;
|
|
20
53
|
align-items: stretch;
|
|
21
54
|
overflow: hidden;
|
|
22
|
-
background-color:
|
|
55
|
+
background-color: var(--tabs-container-background);
|
|
23
56
|
}
|
|
24
57
|
|
|
25
58
|
.Tabs--fill {
|
|
26
59
|
height: 100%;
|
|
27
60
|
}
|
|
28
61
|
|
|
29
|
-
// Interoperability with sections
|
|
30
|
-
.Section .Tabs {
|
|
31
|
-
background-color: transparent;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.Section:not(.Section--fitted) .Tabs {
|
|
35
|
-
margin: 0 -0.5em 0.5em;
|
|
36
|
-
|
|
37
|
-
&:first-child {
|
|
38
|
-
margin-top: -0.5em;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
62
|
.Tabs--vertical {
|
|
43
63
|
flex-direction: column;
|
|
44
|
-
padding:
|
|
64
|
+
padding: var(--space-s) 0 var(--space-s) var(--space-s);
|
|
45
65
|
}
|
|
46
66
|
|
|
47
67
|
.Tabs--horizontal {
|
|
48
|
-
margin-bottom:
|
|
49
|
-
padding:
|
|
68
|
+
margin-bottom: var(--space-m);
|
|
69
|
+
padding: var(--space-s) var(--space-s) 0;
|
|
50
70
|
|
|
51
71
|
&:last-child {
|
|
52
72
|
margin-bottom: 0;
|
|
@@ -62,78 +82,84 @@ $fg-map: colors.$fg-map !default;
|
|
|
62
82
|
}
|
|
63
83
|
|
|
64
84
|
.Tab {
|
|
85
|
+
user-select: none;
|
|
86
|
+
cursor: var(--cursor-pointer);
|
|
65
87
|
display: flex;
|
|
66
88
|
align-items: center;
|
|
67
89
|
justify-content: space-between;
|
|
68
|
-
background-color:
|
|
69
|
-
color:
|
|
90
|
+
background-color: var(--tab-background);
|
|
91
|
+
color: var(--tab-color);
|
|
70
92
|
min-height: 2.25em;
|
|
71
93
|
min-width: 4em;
|
|
72
|
-
|
|
94
|
+
transition-property: background-color, color;
|
|
95
|
+
transition-duration: var(--tab-transition);
|
|
73
96
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
97
|
+
&:not(.Tab--selected) {
|
|
98
|
+
&:hover {
|
|
99
|
+
background-color: var(--tab-background-hover);
|
|
100
|
+
}
|
|
77
101
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
102
|
+
&:active {
|
|
103
|
+
color: var(--tab-color-selected);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&--selected {
|
|
108
|
+
cursor: var(--cursor-default);
|
|
109
|
+
background-color: var(--tab-background-selected);
|
|
110
|
+
color: var(--tab-color-selected);
|
|
111
|
+
}
|
|
81
112
|
}
|
|
82
113
|
|
|
83
|
-
.Tab__text {
|
|
114
|
+
.Tab .Tab__text {
|
|
84
115
|
flex-grow: 1;
|
|
85
|
-
margin: 0
|
|
116
|
+
margin: 0 var(--space-m);
|
|
86
117
|
}
|
|
87
118
|
|
|
88
119
|
.Tab__left {
|
|
89
120
|
min-width: 1.5em;
|
|
90
121
|
text-align: center;
|
|
91
|
-
margin-left:
|
|
122
|
+
margin-left: var(--space-s);
|
|
92
123
|
}
|
|
93
124
|
|
|
94
125
|
.Tab__right {
|
|
95
126
|
min-width: 1.5em;
|
|
96
127
|
text-align: center;
|
|
97
|
-
margin-right:
|
|
128
|
+
margin-right: var(--space-s);
|
|
98
129
|
}
|
|
99
130
|
|
|
100
131
|
.Tabs--horizontal {
|
|
101
132
|
.Tab {
|
|
102
|
-
border-top:
|
|
103
|
-
border-
|
|
104
|
-
|
|
105
|
-
border-top-right-radius: 0.25em;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.Tab--selected {
|
|
109
|
-
border-bottom: math.div(1em, 6) solid $color-default;
|
|
133
|
+
border-top-left-radius: var(--tab-border-radius);
|
|
134
|
+
border-top-right-radius: var(--tab-border-radius);
|
|
135
|
+
@include indicator(bottom);
|
|
110
136
|
}
|
|
111
137
|
}
|
|
112
138
|
|
|
113
139
|
.Tabs--vertical {
|
|
114
140
|
.Tab {
|
|
115
141
|
min-height: 2em;
|
|
116
|
-
border-left:
|
|
117
|
-
border-
|
|
118
|
-
|
|
119
|
-
border-bottom-left-radius: 0.25em;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.Tab--selected {
|
|
123
|
-
border-right: math.div(1em, 6) solid $color-default;
|
|
142
|
+
border-top-left-radius: var(--tab-border-radius);
|
|
143
|
+
border-bottom-left-radius: var(--tab-border-radius);
|
|
144
|
+
@include indicator(right);
|
|
124
145
|
}
|
|
125
146
|
}
|
|
126
147
|
|
|
127
148
|
@each $color-name, $color-value in $fg-map {
|
|
128
149
|
.Tab--selected.Tab--color--#{$color-name} {
|
|
129
|
-
color:
|
|
150
|
+
color: hsl(from $color-value h s calc(l + 17.5));
|
|
130
151
|
}
|
|
152
|
+
}
|
|
131
153
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
154
|
+
// Interoperability with sections
|
|
155
|
+
.Section .Tabs {
|
|
156
|
+
background-color: transparent;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.Section:not(.Section--fitted) .Tabs {
|
|
160
|
+
margin: 0 calc(-1 * var(--space-m)) var(--space-m);
|
|
135
161
|
|
|
136
|
-
|
|
137
|
-
|
|
162
|
+
&:first-child {
|
|
163
|
+
margin-top: calc(-1 * var(--space-m));
|
|
138
164
|
}
|
|
139
165
|
}
|