tgui-core 1.7.0 → 1.7.2
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/README.md +3 -3
- package/dist/components/Button.js +2 -2
- package/package.json +10 -9
- package/styles/base.scss +27 -0
- package/styles/colors.scss +88 -0
- package/styles/components/BlockQuote.scss +15 -0
- package/styles/components/Button.scss +171 -0
- package/styles/components/ColorBox.scss +7 -0
- package/styles/components/Dialog.scss +105 -0
- package/styles/components/Dimmer.scss +18 -0
- package/styles/components/Divider.scss +22 -0
- package/styles/components/Dropdown.scss +67 -0
- package/styles/components/Flex.scss +26 -0
- package/styles/components/Icon.scss +18 -0
- package/styles/components/ImageButton.scss +273 -0
- package/styles/components/Input.scss +63 -0
- package/styles/components/Knob.scss +126 -0
- package/styles/components/LabeledList.scss +44 -0
- package/styles/components/MenuBar.scss +71 -0
- package/styles/components/Modal.scss +9 -0
- package/styles/components/NoticeBox.scss +60 -0
- package/styles/components/NumberInput.scss +71 -0
- package/styles/components/ProgressBar.scss +58 -0
- package/styles/components/RoundGauge.scss +83 -0
- package/styles/components/Section.scss +156 -0
- package/styles/components/Slider.scss +49 -0
- package/styles/components/Stack.scss +59 -0
- package/styles/components/Table.scss +39 -0
- package/styles/components/Tabs.scss +139 -0
- package/styles/components/TextArea.scss +79 -0
- package/styles/components/Tooltip.scss +19 -0
- package/styles/functions.scss +74 -0
- package/styles/main.scss +33 -0
- package/styles/reset.scss +63 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
@use "../base";
|
|
2
|
+
@use "../colors";
|
|
3
|
+
@use "../functions" as *;
|
|
4
|
+
|
|
5
|
+
$color-default-fill: colors.bg(colors.$primary) !default;
|
|
6
|
+
$background-color: rgba(0, 0, 0, 0) !default;
|
|
7
|
+
$border-radius: base.$border-radius !default;
|
|
8
|
+
$bg-map: colors.$bg-map !default;
|
|
9
|
+
|
|
10
|
+
.ProgressBar {
|
|
11
|
+
display: inline-block;
|
|
12
|
+
position: relative;
|
|
13
|
+
width: 100%;
|
|
14
|
+
padding: 0 0.5em;
|
|
15
|
+
border-width: base.em(1px) !important;
|
|
16
|
+
border-style: solid !important;
|
|
17
|
+
border-radius: $border-radius;
|
|
18
|
+
background-color: $background-color;
|
|
19
|
+
transition: border-color 900ms ease-out;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ProgressBar__fill {
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: -0.5px;
|
|
25
|
+
left: 0px;
|
|
26
|
+
bottom: -0.5px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ProgressBar__fill--animated {
|
|
30
|
+
transition:
|
|
31
|
+
background-color 900ms ease-out,
|
|
32
|
+
width 900ms ease-out;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ProgressBar__content {
|
|
36
|
+
position: relative;
|
|
37
|
+
line-height: base.em(17px);
|
|
38
|
+
width: 100%;
|
|
39
|
+
text-align: right;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ProgressBar--color--default {
|
|
43
|
+
border: base.em(1px) solid $color-default-fill;
|
|
44
|
+
|
|
45
|
+
.ProgressBar__fill {
|
|
46
|
+
background-color: $color-default-fill;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@each $color-name, $color-value in $bg-map {
|
|
51
|
+
.ProgressBar--color--#{$color-name} {
|
|
52
|
+
border-color: $color-value !important;
|
|
53
|
+
|
|
54
|
+
.ProgressBar__fill {
|
|
55
|
+
background-color: $color-value;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
@use "../base";
|
|
2
|
+
@use "../colors";
|
|
3
|
+
@use "../functions" as *;
|
|
4
|
+
|
|
5
|
+
$fg-map: colors.$fg-map !default;
|
|
6
|
+
$ring-color: hsl(212.2, 46.8%, 60.2%) !default;
|
|
7
|
+
|
|
8
|
+
.RoundGauge {
|
|
9
|
+
font-size: 1rem;
|
|
10
|
+
width: 2.6em;
|
|
11
|
+
height: 1.3em;
|
|
12
|
+
margin: 0 auto;
|
|
13
|
+
margin-bottom: 0.2em;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
$pi: 3.1416;
|
|
17
|
+
|
|
18
|
+
.RoundGauge__ringTrack {
|
|
19
|
+
fill: transparent;
|
|
20
|
+
stroke: rgba(255, 255, 255, 0.1);
|
|
21
|
+
stroke-width: 10;
|
|
22
|
+
stroke-dasharray: 50 * $pi;
|
|
23
|
+
stroke-dashoffset: 50 * $pi;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.RoundGauge__ringFill {
|
|
27
|
+
fill: transparent;
|
|
28
|
+
stroke: $ring-color;
|
|
29
|
+
stroke-width: 10;
|
|
30
|
+
stroke-dasharray: 100 * $pi;
|
|
31
|
+
transition: stroke 50ms ease-out;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.RoundGauge__needle,
|
|
35
|
+
.RoundGauge__ringFill {
|
|
36
|
+
transition: transform 50ms ease-in-out;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.RoundGauge__needleLine,
|
|
40
|
+
.RoundGauge__needleMiddle {
|
|
41
|
+
fill: colors.$bad;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.RoundGauge__alert {
|
|
45
|
+
fill-rule: evenodd;
|
|
46
|
+
clip-rule: evenodd;
|
|
47
|
+
stroke-linejoin: round;
|
|
48
|
+
stroke-miterlimit: 2;
|
|
49
|
+
fill: rgba(255, 255, 255, 0.1);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.RoundGauge__alert.max {
|
|
53
|
+
fill: colors.$bad;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@each $color-name, $color-value in $fg-map {
|
|
57
|
+
.RoundGauge--color--#{$color-name}.RoundGauge__ringFill {
|
|
58
|
+
stroke: $color-value;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@each $color-name, $color-value in $fg-map {
|
|
63
|
+
.RoundGauge__alert--#{$color-name} {
|
|
64
|
+
fill: $color-value;
|
|
65
|
+
transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1);
|
|
66
|
+
animation: RoundGauge__alertAnim
|
|
67
|
+
1s
|
|
68
|
+
cubic-bezier(0.34, 1.56, 0.64, 1)
|
|
69
|
+
infinite;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
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
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
@use "sass:color";
|
|
2
|
+
@use "../base";
|
|
3
|
+
@use "../colors";
|
|
4
|
+
@use "../functions";
|
|
5
|
+
|
|
6
|
+
$title-text-color: base.$color-fg !default;
|
|
7
|
+
$background-color: base.$color-bg-section !default;
|
|
8
|
+
$separator-color: colors.$primary !default;
|
|
9
|
+
|
|
10
|
+
.Section {
|
|
11
|
+
position: relative;
|
|
12
|
+
margin-bottom: 0.5em;
|
|
13
|
+
background-color: functions.fake-alpha($background-color, base.$color-bg);
|
|
14
|
+
background-color: $background-color;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
|
|
17
|
+
&:last-child {
|
|
18
|
+
margin-bottom: 0;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.Section__title {
|
|
23
|
+
position: relative;
|
|
24
|
+
padding: 0.5em;
|
|
25
|
+
border-bottom: base.em(2px) solid $separator-color;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.Section__titleText {
|
|
29
|
+
font-size: base.em(14px);
|
|
30
|
+
font-weight: bold;
|
|
31
|
+
color: $title-text-color;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.Section__buttons {
|
|
35
|
+
position: absolute;
|
|
36
|
+
display: inline-block;
|
|
37
|
+
right: 0.5em;
|
|
38
|
+
margin-top: base.em(-1px);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.Section__rest {
|
|
42
|
+
position: relative;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.Section__content {
|
|
46
|
+
padding: 0.66em 0.5em;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.Section--fitted > .Section__rest > .Section__content {
|
|
50
|
+
padding: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.Section--fill {
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
height: 100%;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.Section--fill > .Section__rest {
|
|
60
|
+
flex-grow: 1;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.Section--fill > .Section__rest > .Section__content {
|
|
64
|
+
height: 100%;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.Section--fill.Section--scrollable > .Section__rest > .Section__content {
|
|
68
|
+
position: absolute;
|
|
69
|
+
top: 0;
|
|
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
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.Section--scrollable {
|
|
89
|
+
overflow-x: hidden;
|
|
90
|
+
overflow-y: hidden;
|
|
91
|
+
|
|
92
|
+
& > .Section__rest > .Section__content {
|
|
93
|
+
overflow-y: scroll;
|
|
94
|
+
overflow-x: hidden;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.Section--scrollableHorizontal {
|
|
99
|
+
overflow-x: hidden;
|
|
100
|
+
overflow-y: hidden;
|
|
101
|
+
|
|
102
|
+
& > .Section__rest > .Section__content {
|
|
103
|
+
overflow-y: hidden;
|
|
104
|
+
overflow-x: scroll;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.Section--scrollable.Section--scrollableHorizontal {
|
|
109
|
+
overflow-x: hidden;
|
|
110
|
+
overflow-y: hidden;
|
|
111
|
+
|
|
112
|
+
& > .Section__rest > .Section__content {
|
|
113
|
+
overflow-y: scroll;
|
|
114
|
+
overflow-x: scroll;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Nested sections
|
|
119
|
+
.Section .Section {
|
|
120
|
+
background-color: transparent;
|
|
121
|
+
margin-left: -0.5em;
|
|
122
|
+
margin-right: -0.5em;
|
|
123
|
+
|
|
124
|
+
// Remove extra space above the first nested section
|
|
125
|
+
&:first-child {
|
|
126
|
+
margin-top: -0.5em;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Level 2 section title
|
|
131
|
+
.Section .Section .Section__titleText {
|
|
132
|
+
font-size: base.em(13px);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Level 3 section title
|
|
136
|
+
.Section .Section .Section .Section__titleText {
|
|
137
|
+
font-size: base.em(12px);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.Section--flex {
|
|
141
|
+
display: flex;
|
|
142
|
+
flex-flow: column;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.Section--flex .Section__content {
|
|
146
|
+
overflow: auto;
|
|
147
|
+
flex-grow: 1;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.Section__content--noTopPadding {
|
|
151
|
+
padding-top: 0;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.Section__content--stretchContents {
|
|
155
|
+
height: calc(100% - 3rem);
|
|
156
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
@use "../base";
|
|
2
|
+
|
|
3
|
+
$cursor-color: base.$color-fg !default;
|
|
4
|
+
$popup-background-color: hsl(0, 0%, 0%) !default;
|
|
5
|
+
$popup-text-color: hsl(0, 0%, 100%) !default;
|
|
6
|
+
|
|
7
|
+
.Slider {
|
|
8
|
+
cursor: e-resize;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.Slider__cursorOffset {
|
|
12
|
+
position: absolute;
|
|
13
|
+
top: 0;
|
|
14
|
+
left: 0;
|
|
15
|
+
bottom: 0;
|
|
16
|
+
transition: none !important;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.Slider__cursor {
|
|
20
|
+
position: absolute;
|
|
21
|
+
top: 0;
|
|
22
|
+
right: base.em(-1px);
|
|
23
|
+
bottom: 0;
|
|
24
|
+
width: 0;
|
|
25
|
+
border-left: base.em(2px) solid $cursor-color;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.Slider__pointer {
|
|
29
|
+
position: absolute;
|
|
30
|
+
right: base.em(-5px);
|
|
31
|
+
bottom: base.em(-4px);
|
|
32
|
+
width: 0;
|
|
33
|
+
height: 0;
|
|
34
|
+
border-left: base.em(5px) solid transparent;
|
|
35
|
+
border-right: base.em(5px) solid transparent;
|
|
36
|
+
border-bottom: base.em(5px) solid $cursor-color;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.Slider__popupValue {
|
|
40
|
+
position: absolute;
|
|
41
|
+
right: 0;
|
|
42
|
+
top: -2rem;
|
|
43
|
+
font-size: 1rem;
|
|
44
|
+
padding: 0.25rem 0.5rem;
|
|
45
|
+
color: $popup-text-color;
|
|
46
|
+
background-color: $popup-background-color;
|
|
47
|
+
transform: translateX(50%);
|
|
48
|
+
white-space: nowrap;
|
|
49
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 Aleksej Komarov
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@use "../base";
|
|
7
|
+
@use "./Divider";
|
|
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;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.Stack--zebra > .Stack__item:nth-child(even) {
|
|
50
|
+
background-color: $zebra-background-color;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.Stack--horizontal > .Stack__divider:not(.Stack__divider--hidden) {
|
|
54
|
+
border-left: Divider.$thickness solid Divider.$color;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.Stack--vertical > .Stack__divider:not(.Stack__divider--hidden) {
|
|
58
|
+
border-top: Divider.$thickness solid Divider.$color;
|
|
59
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
.Table {
|
|
2
|
+
display: table;
|
|
3
|
+
width: 100%;
|
|
4
|
+
border-collapse: collapse;
|
|
5
|
+
border-spacing: 0;
|
|
6
|
+
margin: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.Table--collapsing {
|
|
10
|
+
width: auto;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.Table__row {
|
|
14
|
+
display: table-row;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.Table__cell {
|
|
18
|
+
display: table-cell;
|
|
19
|
+
padding: 0 0.25em;
|
|
20
|
+
|
|
21
|
+
&:first-child {
|
|
22
|
+
padding-left: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:last-child {
|
|
26
|
+
padding-right: 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.Table__row--header .Table__cell,
|
|
31
|
+
.Table__cell--header {
|
|
32
|
+
font-weight: bold;
|
|
33
|
+
padding-bottom: 0.5em;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.Table__cell--collapsing {
|
|
37
|
+
width: 1%;
|
|
38
|
+
white-space: nowrap;
|
|
39
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
@use "sass:color";
|
|
2
|
+
@use "sass:math";
|
|
3
|
+
@use "../base";
|
|
4
|
+
@use "../colors";
|
|
5
|
+
|
|
6
|
+
$color-default: color.scale(
|
|
7
|
+
colors.fg(colors.$primary),
|
|
8
|
+
$lightness: 75%
|
|
9
|
+
) !default;
|
|
10
|
+
$text-color: rgba(255, 255, 255, 0.5) !default;
|
|
11
|
+
$text-color-selected: color.scale($color-default, $lightness: 25%) !default;
|
|
12
|
+
$tab-color: transparent !default;
|
|
13
|
+
$tab-color-hovered: rgba(255, 255, 255, 0.075) !default;
|
|
14
|
+
$tab-color-selected: rgba(255, 255, 255, 0.125) !default;
|
|
15
|
+
$border-radius: base.$border-radius !default;
|
|
16
|
+
$fg-map: colors.$fg-map !default;
|
|
17
|
+
|
|
18
|
+
.Tabs {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: stretch;
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
background-color: base.$color-bg-section;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.Tabs--fill {
|
|
26
|
+
height: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
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
|
+
.Tabs--vertical {
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
padding: 0.25em 0 0.25em 0.25em;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.Tabs--horizontal {
|
|
48
|
+
margin-bottom: 0.5em;
|
|
49
|
+
padding: 0.25em 0.25em 0 0.25em;
|
|
50
|
+
|
|
51
|
+
&:last-child {
|
|
52
|
+
margin-bottom: 0;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.Tabs__Tab {
|
|
57
|
+
flex-grow: 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.Tabs--fluid .Tabs__Tab {
|
|
61
|
+
flex-grow: 1;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.Tab {
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
justify-content: space-between;
|
|
68
|
+
background-color: $tab-color;
|
|
69
|
+
color: $text-color;
|
|
70
|
+
min-height: 2.25em;
|
|
71
|
+
min-width: 4em;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.Tab:not(.Tab--selected):hover {
|
|
75
|
+
background-color: $tab-color-hovered;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.Tab--selected {
|
|
79
|
+
background-color: $tab-color-selected;
|
|
80
|
+
color: $text-color-selected;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.Tab__text {
|
|
84
|
+
flex-grow: 1;
|
|
85
|
+
margin: 0 0.5em;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.Tab__left {
|
|
89
|
+
min-width: 1.5em;
|
|
90
|
+
text-align: center;
|
|
91
|
+
margin-left: 0.25em;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.Tab__right {
|
|
95
|
+
min-width: 1.5em;
|
|
96
|
+
text-align: center;
|
|
97
|
+
margin-right: 0.25em;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.Tabs--horizontal {
|
|
101
|
+
.Tab {
|
|
102
|
+
border-top: math.div(1em, 6) solid transparent;
|
|
103
|
+
border-bottom: math.div(1em, 6) solid transparent;
|
|
104
|
+
border-top-left-radius: 0.25em;
|
|
105
|
+
border-top-right-radius: 0.25em;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.Tab--selected {
|
|
109
|
+
border-bottom: math.div(1em, 6) solid $color-default;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.Tabs--vertical {
|
|
114
|
+
.Tab {
|
|
115
|
+
min-height: 2em;
|
|
116
|
+
border-left: math.div(1em, 6) solid transparent;
|
|
117
|
+
border-right: math.div(1em, 6) solid transparent;
|
|
118
|
+
border-top-left-radius: 0.25em;
|
|
119
|
+
border-bottom-left-radius: 0.25em;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.Tab--selected {
|
|
123
|
+
border-right: math.div(1em, 6) solid $color-default;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@each $color-name, $color-value in $fg-map {
|
|
128
|
+
.Tab--selected.Tab--color--#{$color-name} {
|
|
129
|
+
color: color.scale($color-value, $lightness: 25%);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.Tabs--horizontal .Tab--selected.Tab--color--#{$color-name} {
|
|
133
|
+
border-bottom-color: $color-value;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.Tabs--vertical .Tab--selected.Tab--color--#{$color-name} {
|
|
137
|
+
border-right-color: $color-value;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
@use "../base";
|
|
2
|
+
@use "../functions" as *;
|
|
3
|
+
@use "./Input";
|
|
4
|
+
|
|
5
|
+
$text-color: Input.$text-color !default;
|
|
6
|
+
$background-color: Input.$background-color !default;
|
|
7
|
+
$border-color: Input.$border-color !default;
|
|
8
|
+
$border-radius: Input.$border-radius !default;
|
|
9
|
+
|
|
10
|
+
.TextArea {
|
|
11
|
+
position: relative;
|
|
12
|
+
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
|
+
line-height: base.em(17px);
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
width: 100%;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.TextArea--fluid {
|
|
24
|
+
display: block;
|
|
25
|
+
width: auto;
|
|
26
|
+
height: auto;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.TextArea--noborder {
|
|
30
|
+
border: 0px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.TextArea__textarea.TextArea__textarea--scrollable {
|
|
34
|
+
overflow: auto;
|
|
35
|
+
overflow-x: hidden;
|
|
36
|
+
overflow-y: scroll;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.TextArea__textarea {
|
|
40
|
+
display: block;
|
|
41
|
+
position: absolute;
|
|
42
|
+
top: 0;
|
|
43
|
+
bottom: 0;
|
|
44
|
+
left: 0;
|
|
45
|
+
right: 0;
|
|
46
|
+
border: 0;
|
|
47
|
+
outline: 0;
|
|
48
|
+
width: 100%;
|
|
49
|
+
height: 100%;
|
|
50
|
+
font-size: 1em;
|
|
51
|
+
line-height: base.em(17px);
|
|
52
|
+
min-height: base.em(17px);
|
|
53
|
+
margin: 0;
|
|
54
|
+
padding: 0 0.5em;
|
|
55
|
+
font-family: inherit;
|
|
56
|
+
background-color: transparent;
|
|
57
|
+
color: inherit;
|
|
58
|
+
box-sizing: border-box;
|
|
59
|
+
// Make sure the div and the textarea wrap words in the same way
|
|
60
|
+
word-wrap: break-word;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
|
|
63
|
+
&:-ms-input-placeholder {
|
|
64
|
+
font-style: italic;
|
|
65
|
+
color: hsl(0, 0%, 46.7%);
|
|
66
|
+
color: hsla(0, 0%, 100%, 0.45);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.TextArea__textarea_custom {
|
|
71
|
+
overflow: visible;
|
|
72
|
+
white-space: pre-wrap;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.TextArea__nowrap {
|
|
76
|
+
white-space: nowrap;
|
|
77
|
+
overflow-wrap: normal;
|
|
78
|
+
overflow-x: scroll;
|
|
79
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@use "../base";
|
|
2
|
+
@use "../functions" as *;
|
|
3
|
+
|
|
4
|
+
$color: hsl(0, 0%, 100%) !default;
|
|
5
|
+
$background-color: hsl(0, 0%, 0%) !default;
|
|
6
|
+
$border-radius: base.$border-radius !default;
|
|
7
|
+
|
|
8
|
+
.Tooltip {
|
|
9
|
+
z-index: 2;
|
|
10
|
+
padding: 0.5em 0.75em;
|
|
11
|
+
pointer-events: none;
|
|
12
|
+
text-align: left;
|
|
13
|
+
transition: opacity 150ms ease-out;
|
|
14
|
+
background-color: $background-color;
|
|
15
|
+
color: $color;
|
|
16
|
+
box-shadow: 0.1em 0.1em 1.25em -0.1em rgba(0, 0, 0, 0.5);
|
|
17
|
+
border-radius: $border-radius;
|
|
18
|
+
max-width: base.em(250px);
|
|
19
|
+
}
|