@ts-element-ui/theme-chalk 0.0.0-stage → 1.3.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.
- package/dist/components/avatar.css +156 -0
- package/dist/components/backtop.css +151 -0
- package/dist/components/badge.css +166 -0
- package/dist/components/breadcrumb.css +147 -0
- package/dist/components/button.css +282 -0
- package/dist/components/calendar.css +193 -0
- package/dist/components/carousel.css +234 -0
- package/dist/components/cascader.css +369 -0
- package/dist/components/checkbox.css +205 -0
- package/dist/components/collapse.css +173 -0
- package/dist/components/color-picker.css +420 -0
- package/dist/components/container.css +502 -0
- package/dist/components/date-picker.css +433 -0
- package/dist/components/descriptions.css +165 -0
- package/dist/components/dialog.css +201 -0
- package/dist/components/divider.css +171 -0
- package/dist/components/drawer.css +253 -0
- package/dist/components/dropdown.css +181 -0
- package/dist/components/empty.css +141 -0
- package/dist/components/form.css +173 -0
- package/dist/components/icon.css +150 -0
- package/dist/components/image.css +256 -0
- package/dist/components/input-number.css +183 -0
- package/dist/components/input.css +207 -0
- package/dist/components/link.css +162 -0
- package/dist/components/mention.css +196 -0
- package/dist/components/message.css +195 -0
- package/dist/components/messagebox.css +220 -0
- package/dist/components/pagination.css +199 -0
- package/dist/components/progress.css +201 -0
- package/dist/components/radio.css +198 -0
- package/dist/components/rate.css +169 -0
- package/dist/components/result.css +162 -0
- package/dist/components/scrollbar.css +185 -0
- package/dist/components/select.css +229 -0
- package/dist/components/skeleton.css +169 -0
- package/dist/components/slider.css +286 -0
- package/dist/components/space.css +152 -0
- package/dist/components/steps.css +224 -0
- package/dist/components/switch.css +171 -0
- package/dist/components/table.css +275 -0
- package/dist/components/tabs.css +204 -0
- package/dist/components/tag.css +204 -0
- package/dist/components/time-picker.css +266 -0
- package/dist/components/timeline.css +183 -0
- package/dist/components/tooltip.css +208 -0
- package/dist/components/transfer.css +208 -0
- package/dist/components/tree.css +259 -0
- package/dist/index.css +1 -0
- package/dist/index.js +84 -0
- package/package.json +63 -4
- package/src/_generate.ps1 +0 -0
- package/src/avatar.scss +29 -0
- package/src/backtop.scss +40 -0
- package/src/badge.scss +55 -0
- package/src/breadcrumb.scss +36 -0
- package/src/button.scss +207 -0
- package/src/calendar.scss +75 -0
- package/src/carousel.scss +134 -0
- package/src/cascader.scss +246 -0
- package/src/checkbox.scss +105 -0
- package/src/collapse.scss +62 -0
- package/src/color-picker.scss +340 -0
- package/src/common/var.css +110 -0
- package/src/common/var.scss +84 -0
- package/src/container.scss +78 -0
- package/src/date-picker.scss +327 -0
- package/src/descriptions.scss +59 -0
- package/src/dialog.scss +78 -0
- package/src/divider.scss +64 -0
- package/src/drawer.scss +131 -0
- package/src/dropdown.scss +52 -0
- package/src/empty.scss +30 -0
- package/src/form.scss +62 -0
- package/src/icon.scss +28 -0
- package/src/image.scss +160 -0
- package/src/index.scss +95 -0
- package/src/index.ts +6 -0
- package/src/input-number.scss +76 -0
- package/src/input.scss +91 -0
- package/src/link.scss +39 -0
- package/src/mention.scss +90 -0
- package/src/message.scss +80 -0
- package/src/messagebox.scss +106 -0
- package/src/pagination.scss +84 -0
- package/src/progress.scss +89 -0
- package/src/radio.scss +92 -0
- package/src/rate.scss +58 -0
- package/src/result.scss +47 -0
- package/src/scrollbar.scss +82 -0
- package/src/select.scss +106 -0
- package/src/skeleton.scss +41 -0
- package/src/slider.scss +198 -0
- package/src/space.scss +24 -0
- package/src/steps.scss +119 -0
- package/src/switch.scss +63 -0
- package/src/table.scss +191 -0
- package/src/tabs.scss +90 -0
- package/src/tag.scss +93 -0
- package/src/themes.ts +91 -0
- package/src/time-picker.scss +177 -0
- package/src/timeline.scss +59 -0
- package/src/tooltip.scss +66 -0
- package/src/transfer.scss +94 -0
- package/src/tree.scss +148 -0
- package/README.md +0 -3
package/src/select.scss
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TSElement - Select 选择器 组件样式
|
|
3
|
+
*/
|
|
4
|
+
@use 'common/var.scss' as *;
|
|
5
|
+
|
|
6
|
+
.ts-select {
|
|
7
|
+
position: relative;
|
|
8
|
+
display: inline-block;
|
|
9
|
+
width: 240px;
|
|
10
|
+
|
|
11
|
+
&__wrapper {
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: $component-size-base;
|
|
16
|
+
padding: 0 8px 0 12px;
|
|
17
|
+
border: 1px solid var(--ts-border-color);
|
|
18
|
+
border-radius: $border-radius-base;
|
|
19
|
+
background-color: var(--ts-bg-color);
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
transition: $transition-base;
|
|
22
|
+
|
|
23
|
+
&:hover { border-color: var(--ts-color-primary-light-5); }
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&__selected {
|
|
27
|
+
flex: 1;
|
|
28
|
+
color: var(--ts-text-color-regular);
|
|
29
|
+
font-size: $font-size-base;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
text-overflow: ellipsis;
|
|
32
|
+
white-space: nowrap;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&__placeholder { color: var(--ts-text-color-placeholder); }
|
|
36
|
+
|
|
37
|
+
&__arrow {
|
|
38
|
+
color: var(--ts-text-color-placeholder);
|
|
39
|
+
margin-left: 8px;
|
|
40
|
+
transition: transform 0.3s;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&__popper {
|
|
44
|
+
position: absolute;
|
|
45
|
+
top: 100%;
|
|
46
|
+
left: 0;
|
|
47
|
+
margin-top: 4px;
|
|
48
|
+
min-width: 100%;
|
|
49
|
+
background-color: var(--ts-bg-color);
|
|
50
|
+
border: 1px solid var(--ts-border-color-lighter);
|
|
51
|
+
border-radius: $border-radius-base;
|
|
52
|
+
box-shadow: var(--ts-box-shadow-light);
|
|
53
|
+
z-index: 1000;
|
|
54
|
+
padding: 6px 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&__tags { position: relative; }
|
|
58
|
+
|
|
59
|
+
&__collapse-tag { cursor: default; }
|
|
60
|
+
|
|
61
|
+
&__tags-tooltip {
|
|
62
|
+
position: absolute;
|
|
63
|
+
top: 100%;
|
|
64
|
+
left: 0;
|
|
65
|
+
margin-top: 6px;
|
|
66
|
+
padding: 6px 10px;
|
|
67
|
+
white-space: nowrap;
|
|
68
|
+
font-size: $font-size-small;
|
|
69
|
+
color: var(--ts-text-color-regular);
|
|
70
|
+
background-color: var(--ts-bg-color);
|
|
71
|
+
border: 1px solid var(--ts-border-color-lighter);
|
|
72
|
+
border-radius: $border-radius-base;
|
|
73
|
+
box-shadow: var(--ts-box-shadow-light);
|
|
74
|
+
z-index: 1001;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&__option {
|
|
78
|
+
padding: 9px 16px;
|
|
79
|
+
font-size: $font-size-base;
|
|
80
|
+
color: var(--ts-text-color-regular);
|
|
81
|
+
cursor: pointer;
|
|
82
|
+
transition: background-color 0.2s;
|
|
83
|
+
|
|
84
|
+
&:hover { background-color: var(--ts-fill-color-light); color: var(--ts-color-primary); }
|
|
85
|
+
&--selected { color: var(--ts-color-primary); font-weight: $font-weight-primary; }
|
|
86
|
+
&--disabled { color: var(--ts-text-color-placeholder); cursor: not-allowed; }
|
|
87
|
+
&--group-label {
|
|
88
|
+
font-size: $font-size-small;
|
|
89
|
+
color: var(--ts-text-color-placeholder);
|
|
90
|
+
font-weight: $font-weight-primary;
|
|
91
|
+
cursor: default;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&--open .ts-select__wrapper { border-color: var(--ts-color-primary); }
|
|
96
|
+
&--open .ts-select__arrow { transform: rotate(180deg); }
|
|
97
|
+
|
|
98
|
+
&--disabled .ts-select__wrapper {
|
|
99
|
+
background-color: var(--ts-fill-color-light);
|
|
100
|
+
border-color: var(--ts-border-color-lighter);
|
|
101
|
+
color: var(--ts-text-color-disabled);
|
|
102
|
+
cursor: not-allowed;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&--multiple .ts-select__selected { padding: 3px 0; }
|
|
106
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TSElement - Skeleton 骨架屏 组件样式
|
|
3
|
+
*/
|
|
4
|
+
@use 'common/var.scss' as *;
|
|
5
|
+
|
|
6
|
+
.ts-skeleton {
|
|
7
|
+
width: 100%;
|
|
8
|
+
|
|
9
|
+
&__item {
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 16px;
|
|
12
|
+
margin-bottom: 12px;
|
|
13
|
+
background-color: var(--ts-fill-color-lighter);
|
|
14
|
+
border-radius: $border-radius-base;
|
|
15
|
+
animation: ts-skeleton-pulse 1.5s ease-in-out infinite;
|
|
16
|
+
|
|
17
|
+
&:last-child { margin-bottom: 0; }
|
|
18
|
+
|
|
19
|
+
&--circle {
|
|
20
|
+
width: 80px;
|
|
21
|
+
height: 80px;
|
|
22
|
+
border-radius: $border-radius-circle;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&--rect {
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: 200px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&--h1 { height: 20px; width: 40%; }
|
|
31
|
+
&--h2 { height: 18px; width: 50%; }
|
|
32
|
+
&--h3 { height: 16px; width: 60%; }
|
|
33
|
+
&--paragraph { height: 14px; }
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@keyframes ts-skeleton-pulse {
|
|
38
|
+
0% { opacity: 1; }
|
|
39
|
+
50% { opacity: 0.4; }
|
|
40
|
+
100% { opacity: 1; }
|
|
41
|
+
}
|
package/src/slider.scss
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TSElement - Slider 滑块 组件样式
|
|
3
|
+
*/
|
|
4
|
+
@use 'common/var.scss' as *;
|
|
5
|
+
|
|
6
|
+
.ts-slider {
|
|
7
|
+
position: relative;
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 6px;
|
|
10
|
+
margin: 16px 0;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
touch-action: none;
|
|
13
|
+
|
|
14
|
+
&__bar {
|
|
15
|
+
position: absolute;
|
|
16
|
+
top: 0;
|
|
17
|
+
right: 0;
|
|
18
|
+
bottom: 0;
|
|
19
|
+
left: 0;
|
|
20
|
+
background-color: $border-light;
|
|
21
|
+
border-radius: 3px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&__bar-active {
|
|
25
|
+
position: absolute;
|
|
26
|
+
top: 0;
|
|
27
|
+
bottom: 0;
|
|
28
|
+
background-color: $primary;
|
|
29
|
+
border-radius: 3px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&__stops {
|
|
33
|
+
position: absolute;
|
|
34
|
+
top: 0;
|
|
35
|
+
right: 0;
|
|
36
|
+
bottom: 0;
|
|
37
|
+
left: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&__stop {
|
|
41
|
+
position: absolute;
|
|
42
|
+
top: 50%;
|
|
43
|
+
width: 6px;
|
|
44
|
+
height: 6px;
|
|
45
|
+
background-color: #fff;
|
|
46
|
+
border-radius: $border-radius-circle;
|
|
47
|
+
transform: translate(-50%, -50%);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&__marks {
|
|
51
|
+
position: absolute;
|
|
52
|
+
top: 0;
|
|
53
|
+
right: 0;
|
|
54
|
+
bottom: 0;
|
|
55
|
+
left: 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&__mark {
|
|
59
|
+
position: absolute;
|
|
60
|
+
top: 100%;
|
|
61
|
+
margin-top: 8px;
|
|
62
|
+
font-size: $font-size-extra-small;
|
|
63
|
+
color: $text-secondary;
|
|
64
|
+
white-space: nowrap;
|
|
65
|
+
transform: translateX(-50%);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&__handle {
|
|
69
|
+
position: absolute;
|
|
70
|
+
top: 50%;
|
|
71
|
+
z-index: 2;
|
|
72
|
+
width: 14px;
|
|
73
|
+
height: 14px;
|
|
74
|
+
background-color: #fff;
|
|
75
|
+
border: 2px solid $primary;
|
|
76
|
+
border-radius: $border-radius-circle;
|
|
77
|
+
transform: translate(-50%, -50%);
|
|
78
|
+
cursor: grab;
|
|
79
|
+
outline: none;
|
|
80
|
+
transition: box-shadow 0.2s;
|
|
81
|
+
|
|
82
|
+
&:hover,
|
|
83
|
+
&:focus-visible {
|
|
84
|
+
box-shadow: 0 0 0 4px rgba(64, 158, 255, 0.2);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&__tooltip {
|
|
89
|
+
position: absolute;
|
|
90
|
+
bottom: 100%;
|
|
91
|
+
left: 50%;
|
|
92
|
+
margin-bottom: 8px;
|
|
93
|
+
padding: 4px 8px;
|
|
94
|
+
font-size: $font-size-extra-small;
|
|
95
|
+
color: #fff;
|
|
96
|
+
white-space: nowrap;
|
|
97
|
+
background-color: $text-primary;
|
|
98
|
+
border-radius: $border-radius-base;
|
|
99
|
+
transform: translateX(-50%);
|
|
100
|
+
|
|
101
|
+
&.is-bottom {
|
|
102
|
+
top: 100%;
|
|
103
|
+
bottom: auto;
|
|
104
|
+
margin-top: 8px;
|
|
105
|
+
margin-bottom: 0;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&--disabled {
|
|
110
|
+
cursor: not-allowed;
|
|
111
|
+
opacity: 0.5;
|
|
112
|
+
|
|
113
|
+
.ts-slider__handle {
|
|
114
|
+
cursor: not-allowed;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&__inputs {
|
|
119
|
+
position: absolute;
|
|
120
|
+
top: 100%;
|
|
121
|
+
left: 0;
|
|
122
|
+
display: flex;
|
|
123
|
+
gap: 12px;
|
|
124
|
+
margin-top: 16px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&__input {
|
|
128
|
+
width: 64px;
|
|
129
|
+
height: 24px;
|
|
130
|
+
padding: 0 8px;
|
|
131
|
+
font-size: $font-size-extra-small;
|
|
132
|
+
color: $text-primary;
|
|
133
|
+
text-align: center;
|
|
134
|
+
border: 1px solid $border-light;
|
|
135
|
+
border-radius: $border-radius-base;
|
|
136
|
+
outline: none;
|
|
137
|
+
|
|
138
|
+
&:focus {
|
|
139
|
+
border-color: $primary;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&:disabled {
|
|
143
|
+
cursor: not-allowed;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// 垂直模式:从上到下为最大值到最小值
|
|
148
|
+
&.is-vertical {
|
|
149
|
+
.ts-slider__inputs {
|
|
150
|
+
top: 0;
|
|
151
|
+
left: 100%;
|
|
152
|
+
flex-direction: column;
|
|
153
|
+
margin-top: 0;
|
|
154
|
+
margin-left: 16px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
width: 6px;
|
|
158
|
+
height: 200px;
|
|
159
|
+
margin: 0 16px;
|
|
160
|
+
|
|
161
|
+
.ts-slider__bar-active {
|
|
162
|
+
top: auto;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.ts-slider__handle {
|
|
166
|
+
top: auto;
|
|
167
|
+
left: 50%;
|
|
168
|
+
transform: translate(-50%, 50%);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.ts-slider__stop {
|
|
172
|
+
top: auto;
|
|
173
|
+
left: 50%;
|
|
174
|
+
transform: translate(-50%, 50%);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.ts-slider__mark {
|
|
178
|
+
top: auto;
|
|
179
|
+
left: 100%;
|
|
180
|
+
margin-top: 0;
|
|
181
|
+
margin-left: 8px;
|
|
182
|
+
transform: translateY(50%);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.ts-slider__tooltip {
|
|
186
|
+
bottom: 50%;
|
|
187
|
+
left: 100%;
|
|
188
|
+
margin-bottom: 0;
|
|
189
|
+
margin-left: 8px;
|
|
190
|
+
transform: translateY(50%);
|
|
191
|
+
|
|
192
|
+
&.is-bottom {
|
|
193
|
+
top: auto;
|
|
194
|
+
margin-top: 0;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
package/src/space.scss
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TSElement - Space 间距 组件样式
|
|
3
|
+
*/
|
|
4
|
+
@use 'common/var.scss' as *;
|
|
5
|
+
|
|
6
|
+
.ts-space {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
|
|
10
|
+
&--vertical { flex-direction: column; align-items: flex-start; }
|
|
11
|
+
&--horizontal { flex-direction: row; }
|
|
12
|
+
|
|
13
|
+
&--wrap { flex-wrap: wrap; }
|
|
14
|
+
|
|
15
|
+
&--start { justify-content: flex-start; }
|
|
16
|
+
&--end { justify-content: flex-end; }
|
|
17
|
+
&--center { justify-content: center; }
|
|
18
|
+
&--between { justify-content: space-between; }
|
|
19
|
+
&--around { justify-content: space-around; }
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ts-space__item {
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
}
|
package/src/steps.scss
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TSElement - Steps 步骤条 组件样式
|
|
3
|
+
*/
|
|
4
|
+
@use 'common/var.scss' as *;
|
|
5
|
+
|
|
6
|
+
.ts-steps {
|
|
7
|
+
display: flex;
|
|
8
|
+
width: 100%;
|
|
9
|
+
|
|
10
|
+
&--vertical { flex-direction: column; }
|
|
11
|
+
|
|
12
|
+
&__item {
|
|
13
|
+
flex: 1;
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: flex-start;
|
|
16
|
+
position: relative;
|
|
17
|
+
padding-bottom: 16px;
|
|
18
|
+
|
|
19
|
+
&:last-child { flex: 0 0 auto; padding-bottom: 0; }
|
|
20
|
+
|
|
21
|
+
&__head {
|
|
22
|
+
position: relative;
|
|
23
|
+
width: 32px;
|
|
24
|
+
height: 32px;
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
border: 2px solid var(--ts-border-color);
|
|
29
|
+
border-radius: $border-radius-circle;
|
|
30
|
+
background-color: var(--ts-bg-color);
|
|
31
|
+
font-size: $font-size-base;
|
|
32
|
+
font-weight: $font-weight-primary;
|
|
33
|
+
color: var(--ts-text-color-placeholder);
|
|
34
|
+
z-index: 2;
|
|
35
|
+
transition: border-color 0.3s, background-color 0.3s, color 0.3s;
|
|
36
|
+
flex-shrink: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&__line {
|
|
40
|
+
position: absolute;
|
|
41
|
+
top: 16px;
|
|
42
|
+
left: 32px;
|
|
43
|
+
width: calc(100% - 32px);
|
|
44
|
+
height: 2px;
|
|
45
|
+
background-color: var(--ts-border-color);
|
|
46
|
+
z-index: 1;
|
|
47
|
+
transition: background-color 0.3s;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&__content {
|
|
51
|
+
margin-left: 10px;
|
|
52
|
+
padding-top: 4px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&__title {
|
|
56
|
+
font-size: $font-size-base;
|
|
57
|
+
font-weight: $font-weight-primary;
|
|
58
|
+
color: var(--ts-text-color-placeholder);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&__description {
|
|
62
|
+
margin-top: 4px;
|
|
63
|
+
font-size: $font-size-small;
|
|
64
|
+
color: var(--ts-text-color-secondary);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// 状态
|
|
68
|
+
&--wait {
|
|
69
|
+
.ts-steps-item__title { color: var(--ts-text-color-placeholder); }
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&--process {
|
|
73
|
+
.ts-steps-item__head {
|
|
74
|
+
border-color: var(--ts-color-primary);
|
|
75
|
+
color: var(--ts-color-primary);
|
|
76
|
+
}
|
|
77
|
+
.ts-steps-item__title { color: var(--ts-text-color-primary); }
|
|
78
|
+
.ts-steps-item__line { background-color: var(--ts-border-color); }
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&--finish {
|
|
82
|
+
.ts-steps-item__head {
|
|
83
|
+
background-color: var(--ts-color-primary);
|
|
84
|
+
border-color: var(--ts-color-primary);
|
|
85
|
+
color: #fff;
|
|
86
|
+
}
|
|
87
|
+
.ts-steps-item__title { color: var(--ts-text-color-primary); }
|
|
88
|
+
.ts-steps-item__line { background-color: var(--ts-color-primary); }
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&--error {
|
|
92
|
+
.ts-steps-item__head {
|
|
93
|
+
border-color: var(--ts-color-danger);
|
|
94
|
+
color: var(--ts-color-danger);
|
|
95
|
+
}
|
|
96
|
+
.ts-steps-item__title { color: var(--ts-color-danger); }
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&--success {
|
|
100
|
+
.ts-steps-item__head {
|
|
101
|
+
background-color: var(--ts-color-success);
|
|
102
|
+
border-color: var(--ts-color-success);
|
|
103
|
+
color: #fff;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&--vertical .ts-steps__item {
|
|
109
|
+
flex-direction: column;
|
|
110
|
+
align-items: flex-start;
|
|
111
|
+
|
|
112
|
+
.ts-steps-item__line {
|
|
113
|
+
top: 32px;
|
|
114
|
+
left: 15px;
|
|
115
|
+
width: 2px;
|
|
116
|
+
height: calc(100% - 32px);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
package/src/switch.scss
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TSElement - Switch 开关 组件样式
|
|
3
|
+
*/
|
|
4
|
+
@use 'common/var.scss' as *;
|
|
5
|
+
|
|
6
|
+
.ts-switch {
|
|
7
|
+
position: relative;
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
width: 40px;
|
|
11
|
+
height: 20px;
|
|
12
|
+
background-color: var(--ts-border-color);
|
|
13
|
+
border-radius: 10px;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
vertical-align: middle;
|
|
16
|
+
transition: background-color 0.2s;
|
|
17
|
+
flex-shrink: 0;
|
|
18
|
+
|
|
19
|
+
&__action {
|
|
20
|
+
position: absolute;
|
|
21
|
+
top: 2px;
|
|
22
|
+
left: 2px;
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
width: 16px;
|
|
27
|
+
height: 16px;
|
|
28
|
+
background-color: #fff;
|
|
29
|
+
border-radius: $border-radius-circle;
|
|
30
|
+
transition: transform 0.2s;
|
|
31
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&__label {
|
|
35
|
+
font-size: $font-size-extra-small;
|
|
36
|
+
color: var(--ts-text-color-regular);
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&--checked {
|
|
42
|
+
background-color: var(--ts-color-primary);
|
|
43
|
+
|
|
44
|
+
.ts-switch__action { transform: translateX(20px); }
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&--disabled {
|
|
48
|
+
background-color: var(--ts-fill-color);
|
|
49
|
+
cursor: not-allowed;
|
|
50
|
+
opacity: 0.6;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&--loading {
|
|
54
|
+
cursor: wait;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&--active-text,
|
|
58
|
+
&--inactive-text {
|
|
59
|
+
font-size: $font-size-base;
|
|
60
|
+
color: var(--ts-text-color-regular);
|
|
61
|
+
margin: 0 6px;
|
|
62
|
+
}
|
|
63
|
+
}
|