lumen-plus 0.0.3 → 0.0.5
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/index.js +2 -0
- package/dist/theme-chalk/_index.scss +69 -0
- package/dist/theme-chalk/_reset.scss +16 -0
- package/dist/theme-chalk/_variables.scss +91 -0
- package/dist/theme-chalk/affix.scss +8 -0
- package/dist/theme-chalk/alert.scss +140 -0
- package/dist/theme-chalk/autocomplete.scss +238 -0
- package/dist/theme-chalk/avatar.scss +49 -0
- package/dist/theme-chalk/backtop.scss +55 -0
- package/dist/theme-chalk/badge.scss +47 -0
- package/dist/theme-chalk/breadcrumb.scss +50 -0
- package/dist/theme-chalk/button.scss +472 -0
- package/dist/theme-chalk/calendar.scss +166 -0
- package/dist/theme-chalk/card.scss +70 -0
- package/dist/theme-chalk/carousel.scss +167 -0
- package/dist/theme-chalk/cascader.scss +265 -0
- package/dist/theme-chalk/checkbox.scss +127 -0
- package/dist/theme-chalk/collapse.scss +100 -0
- package/dist/theme-chalk/color-picker.scss +247 -0
- package/dist/theme-chalk/container.scss +79 -0
- package/dist/theme-chalk/date-picker.scss +352 -0
- package/dist/theme-chalk/date-time-picker.scss +396 -0
- package/dist/theme-chalk/descriptions.scss +160 -0
- package/dist/theme-chalk/dialog.scss +154 -0
- package/dist/theme-chalk/divider.scss +61 -0
- package/dist/theme-chalk/drawer.scss +211 -0
- package/dist/theme-chalk/dropdown.scss +230 -0
- package/dist/theme-chalk/empty.scss +36 -0
- package/dist/theme-chalk/form.scss +187 -0
- package/dist/theme-chalk/icon.scss +16 -0
- package/dist/theme-chalk/image.scss +171 -0
- package/dist/theme-chalk/input-number.scss +229 -0
- package/dist/theme-chalk/input-tag.scss +119 -0
- package/dist/theme-chalk/input.scss +249 -0
- package/dist/theme-chalk/link.scss +28 -0
- package/dist/theme-chalk/loading.scss +68 -0
- package/dist/theme-chalk/menu.scss +239 -0
- package/dist/theme-chalk/message.scss +150 -0
- package/dist/theme-chalk/messagebox.scss +76 -0
- package/dist/theme-chalk/mixins/_bem.scss +103 -0
- package/dist/theme-chalk/mixins/_function.scss +12 -0
- package/dist/theme-chalk/notification.scss +164 -0
- package/dist/theme-chalk/pagination.scss +130 -0
- package/dist/theme-chalk/pin-input.scss +192 -0
- package/dist/theme-chalk/popconfirm.scss +194 -0
- package/dist/theme-chalk/popover.scss +196 -0
- package/dist/theme-chalk/progress.scss +51 -0
- package/dist/theme-chalk/radio.scss +128 -0
- package/dist/theme-chalk/rating.scss +227 -0
- package/dist/theme-chalk/result.scss +80 -0
- package/dist/theme-chalk/segmented.scss +108 -0
- package/dist/theme-chalk/select.scss +301 -0
- package/dist/theme-chalk/skeleton.scss +113 -0
- package/dist/theme-chalk/slider.scss +259 -0
- package/dist/theme-chalk/space.scss +44 -0
- package/dist/theme-chalk/statistic.scss +49 -0
- package/dist/theme-chalk/steps.scss +255 -0
- package/dist/theme-chalk/switch.scss +277 -0
- package/dist/theme-chalk/table.scss +343 -0
- package/dist/theme-chalk/tabs.scss +433 -0
- package/dist/theme-chalk/tag.scss +143 -0
- package/dist/theme-chalk/textarea.scss +125 -0
- package/dist/theme-chalk/time-picker.scss +321 -0
- package/dist/theme-chalk/timeline.scss +119 -0
- package/dist/theme-chalk/tooltip.scss +165 -0
- package/dist/theme-chalk/transfer.scss +219 -0
- package/dist/theme-chalk/tree-select.scss +384 -0
- package/dist/theme-chalk/tree.scss +101 -0
- package/dist/theme-chalk/upload.scss +457 -0
- package/dist/theme-chalk/watermark.scss +30 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/transitions.js +31 -0
- package/package.json +8 -2
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
@use './variables' as *;
|
|
2
|
+
@use './mixins/bem' as *;
|
|
3
|
+
|
|
4
|
+
@include b(transfer) {
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
gap: 16px;
|
|
8
|
+
|
|
9
|
+
&.is-disabled {
|
|
10
|
+
opacity: 0.6;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@include b(transfer__panel) {
|
|
15
|
+
width: 200px;
|
|
16
|
+
border: 1px solid $border-color-base;
|
|
17
|
+
border-radius: $border-radius-base;
|
|
18
|
+
background: $bg-color;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@include b(transfer__header) {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
gap: 8px;
|
|
26
|
+
padding: 10px 12px;
|
|
27
|
+
background: $bg-color-page;
|
|
28
|
+
border-bottom: 1px solid $border-color-base;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@include b(transfer__title) {
|
|
32
|
+
flex: 1;
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
font-weight: 500;
|
|
35
|
+
color: $color-text-primary;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@include b(transfer__count) {
|
|
39
|
+
font-size: 12px;
|
|
40
|
+
color: $color-text-secondary;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@include b(transfer__filter) {
|
|
44
|
+
padding: 8px 12px;
|
|
45
|
+
border-bottom: 1px solid $border-color-lighter;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@include b(transfer__filter-input) {
|
|
49
|
+
width: 100%;
|
|
50
|
+
height: 28px;
|
|
51
|
+
padding: 0 8px;
|
|
52
|
+
border: 1px solid $border-color-base;
|
|
53
|
+
border-radius: $border-radius-small;
|
|
54
|
+
font-size: 13px;
|
|
55
|
+
outline: none;
|
|
56
|
+
transition: border-color 0.2s;
|
|
57
|
+
|
|
58
|
+
&:focus {
|
|
59
|
+
border-color: $color-primary;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&:disabled {
|
|
63
|
+
background: $bg-color-page;
|
|
64
|
+
cursor: not-allowed;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&::placeholder {
|
|
68
|
+
color: $color-text-placeholder;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@include b(transfer__body) {
|
|
73
|
+
height: 200px;
|
|
74
|
+
overflow-y: auto;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@include b(transfer__list) {
|
|
78
|
+
list-style: none;
|
|
79
|
+
margin: 0;
|
|
80
|
+
padding: 0;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@include b(transfer__item) {
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
box-sizing: border-box;
|
|
87
|
+
padding: 8px 12px;
|
|
88
|
+
border-left: 2px solid transparent;
|
|
89
|
+
transition: background-color 0.2s;
|
|
90
|
+
|
|
91
|
+
.#{$namespace}-checkbox {
|
|
92
|
+
width: 100%;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&:hover:not(.is-disabled) {
|
|
96
|
+
background: $bg-color-page;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&.is-checked:not(.is-disabled) {
|
|
100
|
+
background: rgba($color-primary, 0.08);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&.is-disabled {
|
|
104
|
+
color: $color-text-disabled;
|
|
105
|
+
cursor: not-allowed;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@include b(transfer__empty) {
|
|
110
|
+
display: flex;
|
|
111
|
+
align-items: center;
|
|
112
|
+
justify-content: center;
|
|
113
|
+
height: 100%;
|
|
114
|
+
font-size: 14px;
|
|
115
|
+
color: $color-text-secondary;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@include b(transfer__buttons) {
|
|
119
|
+
display: flex;
|
|
120
|
+
flex-direction: column;
|
|
121
|
+
gap: 8px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@include b(transfer__button) {
|
|
125
|
+
display: flex;
|
|
126
|
+
align-items: center;
|
|
127
|
+
justify-content: center;
|
|
128
|
+
gap: 4px;
|
|
129
|
+
min-width: 32px;
|
|
130
|
+
height: 32px;
|
|
131
|
+
padding: 0 10px;
|
|
132
|
+
border: 1px solid $border-color-base;
|
|
133
|
+
border-radius: $border-radius-base;
|
|
134
|
+
background-color: $bg-color;
|
|
135
|
+
color: $color-text-regular;
|
|
136
|
+
font-size: 14px;
|
|
137
|
+
cursor: pointer;
|
|
138
|
+
transition: color 0.2s, border-color 0.2s, background-color 0.2s;
|
|
139
|
+
|
|
140
|
+
&:hover:not(:disabled) {
|
|
141
|
+
color: $color-primary;
|
|
142
|
+
border-color: $color-primary;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&:disabled {
|
|
146
|
+
color: $color-text-disabled;
|
|
147
|
+
background-color: $bg-color-page;
|
|
148
|
+
cursor: not-allowed;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.dark {
|
|
153
|
+
.#{$namespace}-transfer {
|
|
154
|
+
&__panel {
|
|
155
|
+
background: $bg-color-dark-light;
|
|
156
|
+
border-color: color-mix(in oklab, $bg-color-dark-lighter 70%, $color-text-dark-secondary);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&__header {
|
|
160
|
+
background: $bg-color-dark-lighter;
|
|
161
|
+
border-bottom-color: color-mix(in oklab, $bg-color-dark-lighter 70%, $color-text-dark-secondary);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
&__title {
|
|
165
|
+
color: $color-text-dark;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&__count {
|
|
169
|
+
color: $color-text-dark-secondary;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&__filter {
|
|
173
|
+
border-bottom-color: color-mix(in oklab, $bg-color-dark-lighter 70%, $color-text-dark-secondary);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
&__filter-input {
|
|
177
|
+
background: $bg-color-dark-light;
|
|
178
|
+
border-color: color-mix(in oklab, $bg-color-dark-lighter 70%, $color-text-dark-secondary);
|
|
179
|
+
color: $color-text-dark;
|
|
180
|
+
|
|
181
|
+
&::placeholder {
|
|
182
|
+
color: $color-text-dark-secondary;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&:disabled {
|
|
186
|
+
background: $bg-color-dark-lighter;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&__item {
|
|
191
|
+
&:hover:not(.is-disabled) {
|
|
192
|
+
background: $bg-color-dark-lighter;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
&.is-checked:not(.is-disabled) {
|
|
196
|
+
background: rgba($color-primary, 0.18);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
&.is-disabled {
|
|
200
|
+
color: $color-text-dark-secondary;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
&__empty {
|
|
205
|
+
color: $color-text-dark-secondary;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
&__button {
|
|
209
|
+
background: $bg-color-dark-light;
|
|
210
|
+
border-color: color-mix(in oklab, $bg-color-dark-lighter 70%, $color-text-dark-secondary);
|
|
211
|
+
color: $color-text-dark-secondary;
|
|
212
|
+
|
|
213
|
+
&:disabled {
|
|
214
|
+
background: $bg-color-dark-lighter;
|
|
215
|
+
color: $color-text-dark-secondary;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
@use './variables' as *;
|
|
2
|
+
@use './mixins/bem' as *;
|
|
3
|
+
|
|
4
|
+
@include b('tree-select') {
|
|
5
|
+
position: relative;
|
|
6
|
+
display: inline-block;
|
|
7
|
+
width: 220px;
|
|
8
|
+
max-width: 100%;
|
|
9
|
+
font-size: $font-size-base;
|
|
10
|
+
|
|
11
|
+
&.is-disabled {
|
|
12
|
+
.#{$namespace}-tree-select__trigger {
|
|
13
|
+
background-color: $bg-color-page;
|
|
14
|
+
cursor: not-allowed;
|
|
15
|
+
&:hover { border-color: $border-color-base; }
|
|
16
|
+
}
|
|
17
|
+
.#{$namespace}-tree-select__value,
|
|
18
|
+
.#{$namespace}-tree-select__arrow { color: $color-text-disabled; }
|
|
19
|
+
.#{$namespace}-tree-select__tags .#{$namespace}-tag { cursor: not-allowed; }
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&.is-focus .#{$namespace}-tree-select__trigger {
|
|
23
|
+
border-color: $color-primary;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&--small {
|
|
27
|
+
.#{$namespace}-tree-select__trigger { min-height: 28px; font-size: $font-size-small; }
|
|
28
|
+
.#{$namespace}-tree-select__tags { gap: 2px; }
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&--large {
|
|
32
|
+
.#{$namespace}-tree-select__trigger { min-height: 40px; font-size: $font-size-medium; }
|
|
33
|
+
.#{$namespace}-tree-select__tags { gap: 6px; }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:not(&--small):not(&--large) {
|
|
37
|
+
.#{$namespace}-tree-select__trigger { min-height: 32px; font-size: $font-size-base; }
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@include e('trigger') {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
flex-wrap: wrap;
|
|
44
|
+
gap: 4px;
|
|
45
|
+
padding: 0 32px 0 12px;
|
|
46
|
+
border: 1px solid $border-color-base;
|
|
47
|
+
border-radius: $border-radius-base;
|
|
48
|
+
background-color: #fff;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
transition: border-color $transition-duration-fast;
|
|
51
|
+
position: relative;
|
|
52
|
+
font-family: inherit;
|
|
53
|
+
font-size: inherit;
|
|
54
|
+
font-weight: inherit;
|
|
55
|
+
line-height: 1;
|
|
56
|
+
|
|
57
|
+
&:hover { border-color: #c0c4cc; }
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&.is-multiple {
|
|
61
|
+
.#{$namespace}-tree-select__trigger {
|
|
62
|
+
padding: 4px 32px 4px 12px;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@include e('value') {
|
|
67
|
+
flex: 1;
|
|
68
|
+
color: $color-text-primary;
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
text-overflow: ellipsis;
|
|
71
|
+
white-space: nowrap;
|
|
72
|
+
font-size: inherit;
|
|
73
|
+
font-weight: inherit;
|
|
74
|
+
line-height: inherit;
|
|
75
|
+
|
|
76
|
+
&.is-placeholder { color: $color-text-placeholder; }
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@include e('input') {
|
|
80
|
+
flex: 1;
|
|
81
|
+
min-width: 0;
|
|
82
|
+
height: 100%;
|
|
83
|
+
padding: 0;
|
|
84
|
+
border: none;
|
|
85
|
+
outline: none;
|
|
86
|
+
background: transparent;
|
|
87
|
+
font-size: inherit;
|
|
88
|
+
font-weight: inherit;
|
|
89
|
+
line-height: inherit;
|
|
90
|
+
color: $color-text-primary;
|
|
91
|
+
|
|
92
|
+
&::placeholder { color: $color-text-placeholder; }
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@include e('tags') {
|
|
96
|
+
display: flex;
|
|
97
|
+
flex-wrap: wrap;
|
|
98
|
+
align-items: center;
|
|
99
|
+
gap: 4px;
|
|
100
|
+
flex: 1;
|
|
101
|
+
min-width: 0;
|
|
102
|
+
|
|
103
|
+
.#{$namespace}-tag {
|
|
104
|
+
max-width: 100%;
|
|
105
|
+
overflow: hidden;
|
|
106
|
+
text-overflow: ellipsis;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@include e('filter-input') {
|
|
111
|
+
flex: 1;
|
|
112
|
+
min-width: 40px;
|
|
113
|
+
height: 22px;
|
|
114
|
+
padding: 0;
|
|
115
|
+
border: none;
|
|
116
|
+
outline: none;
|
|
117
|
+
background: transparent;
|
|
118
|
+
font-size: inherit;
|
|
119
|
+
color: $color-text-primary;
|
|
120
|
+
|
|
121
|
+
&::placeholder { color: $color-text-placeholder; }
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@include e('suffix') {
|
|
125
|
+
position: absolute;
|
|
126
|
+
right: 8px;
|
|
127
|
+
top: 50%;
|
|
128
|
+
transform: translateY(-50%);
|
|
129
|
+
display: flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@include e('arrow') {
|
|
134
|
+
color: $color-text-secondary;
|
|
135
|
+
transition: transform $transition-duration-fast;
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
|
|
139
|
+
&.is-open { transform: rotate(180deg); }
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@include e('clear') {
|
|
143
|
+
display: inline-flex;
|
|
144
|
+
align-items: center;
|
|
145
|
+
padding: 0;
|
|
146
|
+
border: none;
|
|
147
|
+
background: none;
|
|
148
|
+
color: $color-text-secondary;
|
|
149
|
+
cursor: pointer;
|
|
150
|
+
transition: color $transition-duration-fast;
|
|
151
|
+
|
|
152
|
+
&:hover { color: $color-text-primary; }
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
@include e('dropdown') {
|
|
156
|
+
position: absolute;
|
|
157
|
+
top: 100%;
|
|
158
|
+
left: 0;
|
|
159
|
+
width: 100%;
|
|
160
|
+
margin-top: 12px;
|
|
161
|
+
// Arrow variables
|
|
162
|
+
--l-tree-select-bg: #{$bg-color};
|
|
163
|
+
--l-tree-select-border: #{$border-color-lighter};
|
|
164
|
+
--arrow-size: 10px;
|
|
165
|
+
background-color: var(--l-tree-select-bg);
|
|
166
|
+
border: 1px solid var(--l-tree-select-border);
|
|
167
|
+
border-radius: $border-radius-base;
|
|
168
|
+
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
|
169
|
+
z-index: $z-index-popper;
|
|
170
|
+
overflow: visible;
|
|
171
|
+
font-size: inherit;
|
|
172
|
+
transform-origin: top;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
@include e('menu-arrow') {
|
|
176
|
+
position: absolute;
|
|
177
|
+
width: var(--arrow-size);
|
|
178
|
+
height: var(--arrow-size);
|
|
179
|
+
z-index: -1;
|
|
180
|
+
pointer-events: none;
|
|
181
|
+
|
|
182
|
+
top: calc(-1 * (var(--arrow-size) * 0.55) + 1px);
|
|
183
|
+
left: 50%;
|
|
184
|
+
margin-left: calc(-1 * (var(--arrow-size) / 2));
|
|
185
|
+
|
|
186
|
+
&::before {
|
|
187
|
+
content: '';
|
|
188
|
+
position: absolute;
|
|
189
|
+
inset: 0;
|
|
190
|
+
width: 100%;
|
|
191
|
+
height: 100%;
|
|
192
|
+
background: var(--l-tree-select-bg);
|
|
193
|
+
transform: rotate(45deg);
|
|
194
|
+
border-radius: calc(var(--arrow-size) * 0.2);
|
|
195
|
+
box-shadow: -1px -1px 0 0 var(--l-tree-select-border);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
@include e('dropdown-content') {
|
|
200
|
+
padding: 7px 0;
|
|
201
|
+
max-height: 300px;
|
|
202
|
+
overflow-y: auto;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
@include e('tree-node') {
|
|
206
|
+
&.is-current > .#{$namespace}-tree-select__node-content {
|
|
207
|
+
background-color: rgba($color-primary, 0.1);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
@include e('node-content') {
|
|
212
|
+
display: flex;
|
|
213
|
+
align-items: center;
|
|
214
|
+
padding: 10px 12px;
|
|
215
|
+
cursor: pointer;
|
|
216
|
+
transition: background-color $transition-duration-fast;
|
|
217
|
+
font-size: inherit;
|
|
218
|
+
|
|
219
|
+
&:hover { background-color: $bg-color-page; }
|
|
220
|
+
|
|
221
|
+
&.is-selected {
|
|
222
|
+
color: $color-primary;
|
|
223
|
+
font-weight: 500;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
&.is-disabled {
|
|
227
|
+
color: $color-text-disabled;
|
|
228
|
+
cursor: not-allowed;
|
|
229
|
+
|
|
230
|
+
&:hover { background-color: transparent; }
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
@include e('expand-icon') {
|
|
235
|
+
display: inline-flex;
|
|
236
|
+
align-items: center;
|
|
237
|
+
justify-content: center;
|
|
238
|
+
width: 20px;
|
|
239
|
+
height: 20px;
|
|
240
|
+
padding: 0;
|
|
241
|
+
margin-right: 4px;
|
|
242
|
+
border: none;
|
|
243
|
+
background: none;
|
|
244
|
+
color: $color-text-secondary;
|
|
245
|
+
cursor: pointer;
|
|
246
|
+
flex-shrink: 0;
|
|
247
|
+
transition: transform $transition-duration-fast;
|
|
248
|
+
|
|
249
|
+
&.is-expanded {
|
|
250
|
+
transform: rotate(90deg);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
&.is-leaf {
|
|
254
|
+
visibility: hidden;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
@include e('loading') {
|
|
259
|
+
display: inline-flex;
|
|
260
|
+
animation: #{$namespace}-tree-select-spin 1s linear infinite;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
@include e('checkbox') {
|
|
264
|
+
display: inline-flex;
|
|
265
|
+
align-items: center;
|
|
266
|
+
margin-right: 8px;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
@include e('node-label') {
|
|
270
|
+
flex: 1;
|
|
271
|
+
overflow: hidden;
|
|
272
|
+
text-overflow: ellipsis;
|
|
273
|
+
white-space: nowrap;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
@include e('children') {
|
|
277
|
+
overflow: hidden;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
@include e('check-icon') {
|
|
281
|
+
display: inline-flex;
|
|
282
|
+
align-items: center;
|
|
283
|
+
margin-left: 8px;
|
|
284
|
+
color: $color-primary;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
@include e('children') {
|
|
288
|
+
// 可添加缩进动画
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
@include e('empty') {
|
|
292
|
+
padding: 16px;
|
|
293
|
+
text-align: center;
|
|
294
|
+
color: $color-text-secondary;
|
|
295
|
+
font-size: $font-size-small;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
@keyframes #{$namespace}-tree-select-spin {
|
|
300
|
+
from { transform: rotate(0deg); }
|
|
301
|
+
to { transform: rotate(360deg); }
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.dark {
|
|
305
|
+
.#{$namespace}-tree-select {
|
|
306
|
+
.#{$namespace}-tree-select__trigger {
|
|
307
|
+
background-color: $bg-color-dark-light;
|
|
308
|
+
border-color: color-mix(in oklab, $bg-color-dark-lighter 70%, $color-text-dark-secondary);
|
|
309
|
+
|
|
310
|
+
&:hover {
|
|
311
|
+
border-color: color-mix(in oklab, $bg-color-dark-lighter 55%, $color-text-dark-secondary);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
&.is-focus .#{$namespace}-tree-select__trigger {
|
|
316
|
+
border-color: $color-primary;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
&.is-disabled {
|
|
320
|
+
.#{$namespace}-tree-select__trigger {
|
|
321
|
+
background-color: $bg-color-dark-lighter;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.#{$namespace}-tree-select__value,
|
|
325
|
+
.#{$namespace}-tree-select__arrow {
|
|
326
|
+
color: $color-text-dark-secondary;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.#{$namespace}-tree-select__value,
|
|
331
|
+
.#{$namespace}-tree-select__input,
|
|
332
|
+
.#{$namespace}-tree-select__filter-input {
|
|
333
|
+
color: $color-text-dark;
|
|
334
|
+
|
|
335
|
+
&.is-placeholder {
|
|
336
|
+
color: $color-text-dark-secondary;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
&::placeholder {
|
|
340
|
+
color: $color-text-dark-secondary;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.#{$namespace}-tree-select__arrow,
|
|
345
|
+
.#{$namespace}-tree-select__clear,
|
|
346
|
+
.#{$namespace}-tree-select__expand-icon {
|
|
347
|
+
color: $color-text-dark-secondary;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.#{$namespace}-tree-select__clear:hover {
|
|
351
|
+
color: $color-text-dark;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.#{$namespace}-tree-select__dropdown {
|
|
355
|
+
--l-tree-select-bg: #{$bg-color-dark-light};
|
|
356
|
+
--l-tree-select-border: #{color-mix(in oklab, $bg-color-dark-lighter 70%, $color-text-dark-secondary)};
|
|
357
|
+
box-shadow: $box-shadow-dark;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.#{$namespace}-tree-select__node-content {
|
|
361
|
+
color: $color-text-dark;
|
|
362
|
+
|
|
363
|
+
&.is-disabled {
|
|
364
|
+
color: $color-text-dark-secondary;
|
|
365
|
+
|
|
366
|
+
&:hover {
|
|
367
|
+
background-color: transparent;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
&.is-selected {
|
|
372
|
+
color: $color-primary;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.#{$namespace}-tree-select__node-content:hover {
|
|
377
|
+
background-color: $bg-color-dark-lighter;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.#{$namespace}-tree-select__empty {
|
|
381
|
+
color: $color-text-dark-secondary;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
@use './variables' as *;
|
|
2
|
+
@use './mixins/bem' as *;
|
|
3
|
+
|
|
4
|
+
@include b('tree') {
|
|
5
|
+
background: $bg-color;
|
|
6
|
+
color: $color-text-regular;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@include b('tree-node') {
|
|
10
|
+
&.is-disabled {
|
|
11
|
+
.#{$namespace}-tree-node__content {
|
|
12
|
+
color: $color-text-disabled;
|
|
13
|
+
cursor: not-allowed;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&.is-current {
|
|
18
|
+
> .#{$namespace}-tree-node__content {
|
|
19
|
+
background: rgba($color-primary, 0.1);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@include e('content') {
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
padding: 6px 8px;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
transition: background $transition-duration-fast;
|
|
29
|
+
border-radius: $border-radius-base;
|
|
30
|
+
|
|
31
|
+
&:hover {
|
|
32
|
+
background: $bg-color-page;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@include e('expand-icon') {
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
justify-content: center;
|
|
40
|
+
width: 18px;
|
|
41
|
+
height: 18px;
|
|
42
|
+
margin-right: 4px;
|
|
43
|
+
padding: 0;
|
|
44
|
+
border: none;
|
|
45
|
+
background: transparent;
|
|
46
|
+
color: $color-text-secondary;
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
transition: transform $transition-duration-fast;
|
|
49
|
+
|
|
50
|
+
&.is-expanded {
|
|
51
|
+
transform: rotate(90deg);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&.is-leaf {
|
|
55
|
+
visibility: hidden;
|
|
56
|
+
cursor: default;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@include e('checkbox') {
|
|
61
|
+
margin-right: 8px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@include e('label') {
|
|
65
|
+
font-size: $font-size-base;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@include e('children') {
|
|
69
|
+
padding-left: 0;
|
|
70
|
+
overflow: hidden;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.dark {
|
|
75
|
+
.#{$namespace}-tree {
|
|
76
|
+
background: $bg-color-dark-light;
|
|
77
|
+
color: $color-text-dark-secondary;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.#{$namespace}-tree-node {
|
|
81
|
+
&.is-disabled {
|
|
82
|
+
.#{$namespace}-tree-node__content {
|
|
83
|
+
color: $color-text-dark-secondary;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.#{$namespace}-tree-node__content {
|
|
88
|
+
&:hover {
|
|
89
|
+
background: $bg-color-dark-lighter;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.#{$namespace}-tree-node__expand-icon {
|
|
94
|
+
color: $color-text-dark-secondary;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.#{$namespace}-tree-node__label {
|
|
98
|
+
color: $color-text-dark;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|