@kdcloudjs/kdesign 1.7.19 → 1.7.20
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/CHANGELOG.md +34 -0
- package/dist/kdesign-complete.less +331 -239
- package/dist/kdesign.css +266 -239
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +512 -625
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +2 -2
- package/dist/kdesign.min.js +9 -9
- package/dist/kdesign.min.js.map +1 -1
- package/es/button/style/token.less +1 -0
- package/es/checkbox/checkbox.js +5 -5
- package/es/checkbox/style/index.css +2 -0
- package/es/checkbox/style/index.less +2 -0
- package/es/checkbox/style/token.less +1 -1
- package/es/city-picker/city-picker.d.ts +3 -23
- package/es/city-picker/city-picker.js +351 -124
- package/es/city-picker/interface.d.ts +57 -0
- package/es/city-picker/interface.js +3 -0
- package/es/city-picker/option.d.ts +4 -0
- package/es/city-picker/option.js +42 -0
- package/es/city-picker/style/index.css +264 -239
- package/es/city-picker/style/index.less +262 -218
- package/es/city-picker/style/mixin.less +26 -3
- package/es/city-picker/style/token.less +42 -14
- package/es/config-provider/compDefaultProps.d.ts +13 -0
- package/es/config-provider/compDefaultProps.js +13 -0
- package/es/input/style/token.less +2 -8
- package/lib/button/style/token.less +1 -0
- package/lib/checkbox/checkbox.js +4 -4
- package/lib/checkbox/style/index.css +2 -0
- package/lib/checkbox/style/index.less +2 -0
- package/lib/checkbox/style/token.less +1 -1
- package/lib/city-picker/city-picker.d.ts +3 -23
- package/lib/city-picker/city-picker.js +350 -123
- package/lib/city-picker/interface.d.ts +57 -0
- package/lib/city-picker/interface.js +11 -0
- package/lib/city-picker/option.d.ts +4 -0
- package/lib/city-picker/option.js +55 -0
- package/lib/city-picker/style/index.css +264 -239
- package/lib/city-picker/style/index.less +262 -218
- package/lib/city-picker/style/mixin.less +26 -3
- package/lib/city-picker/style/token.less +42 -14
- package/lib/config-provider/compDefaultProps.d.ts +13 -0
- package/lib/config-provider/compDefaultProps.js +13 -0
- package/lib/input/style/token.less +2 -8
- package/package.json +1 -1
- package/es/city-picker/city-group.d.ts +0 -8
- package/es/city-picker/city-group.js +0 -38
- package/es/city-picker/city-list.d.ts +0 -12
- package/es/city-picker/city-list.js +0 -55
- package/es/city-picker/city-panel-item.d.ts +0 -13
- package/es/city-picker/city-panel-item.js +0 -22
- package/es/city-picker/city-panel.d.ts +0 -17
- package/es/city-picker/city-panel.js +0 -153
- package/es/city-picker/city-search-panel.d.ts +0 -9
- package/es/city-picker/city-search-panel.js +0 -44
- package/es/city-picker/no-data.d.ts +0 -3
- package/es/city-picker/no-data.js +0 -18
- package/es/city-picker/utils/grouping.d.ts +0 -7
- package/es/city-picker/utils/grouping.js +0 -24
- package/lib/city-picker/city-group.d.ts +0 -8
- package/lib/city-picker/city-group.js +0 -51
- package/lib/city-picker/city-list.d.ts +0 -12
- package/lib/city-picker/city-list.js +0 -68
- package/lib/city-picker/city-panel-item.d.ts +0 -13
- package/lib/city-picker/city-panel-item.js +0 -35
- package/lib/city-picker/city-panel.d.ts +0 -17
- package/lib/city-picker/city-panel.js +0 -166
- package/lib/city-picker/city-search-panel.d.ts +0 -9
- package/lib/city-picker/city-search-panel.js +0 -57
- package/lib/city-picker/no-data.d.ts +0 -3
- package/lib/city-picker/no-data.js +0 -31
- package/lib/city-picker/utils/grouping.d.ts +0 -7
- package/lib/city-picker/utils/grouping.js +0 -30
|
@@ -1,288 +1,332 @@
|
|
|
1
1
|
@import '../../style/themes/index';
|
|
2
|
+
@import '../../style/mixins/index';
|
|
2
3
|
@import './mixin.less';
|
|
3
|
-
@import './token.less';
|
|
4
4
|
|
|
5
5
|
@city-picker-prefix-cls: ~'@{kd-prefix}-city-picker';
|
|
6
|
+
@tabs-prefix-cls: ~'@{kd-prefix}-tabs';
|
|
6
7
|
|
|
7
|
-
.@{city-picker-prefix-cls}
|
|
8
|
+
.@{city-picker-prefix-cls} {
|
|
9
|
+
position: relative;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
background-color: transparent;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
vertical-align: middle;
|
|
8
14
|
display: flex;
|
|
9
15
|
flex-direction: column;
|
|
10
|
-
position: relative;
|
|
11
|
-
border-bottom: 1px solid #999;
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
justify-content: space-between;
|
|
18
|
-
font-size: 14px;
|
|
19
|
-
color: #999999;
|
|
20
|
-
letter-spacing: 0;
|
|
21
|
-
line-height: 21px;
|
|
17
|
+
&-selector:hover {
|
|
18
|
+
.@{city-picker-prefix-cls}-icon-active {
|
|
19
|
+
color: #3761ca;
|
|
20
|
+
}
|
|
22
21
|
}
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
margin-bottom: 9px;
|
|
26
|
-
font-size: 12px;
|
|
23
|
+
&-description {
|
|
27
24
|
color: #666666;
|
|
28
|
-
|
|
29
|
-
line-height: 18px;
|
|
25
|
+
font-size: 12px;
|
|
30
26
|
}
|
|
31
27
|
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
&-visible {
|
|
29
|
+
.@{city-picker-prefix-cls}-icon-active {
|
|
30
|
+
color: #3761ca;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
& div.@{city-picker-prefix-cls}-show-search .@{city-picker-prefix-cls}-selection-item {
|
|
34
|
+
color: @city-picker-placeholder-color;
|
|
35
|
+
}
|
|
34
36
|
}
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
&-icon {
|
|
39
|
+
&-arrow {
|
|
40
|
+
display: inline-flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
vertical-align: middle;
|
|
43
|
+
&-up {
|
|
44
|
+
transform: rotate(180deg);
|
|
45
|
+
transition: transform calc(@transition-duration - 0.1s) @ease;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&-down {
|
|
49
|
+
transform: rotate(0deg);
|
|
50
|
+
transition: transform calc(@transition-duration - 0.1s) @ease;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&-clear {
|
|
55
|
+
opacity: 0;
|
|
56
|
+
z-index: 1;
|
|
57
|
+
position: absolute;
|
|
58
|
+
background: #fff;
|
|
59
|
+
transition: opacity 0.15s ease;
|
|
60
|
+
&:hover {
|
|
61
|
+
color: @city-picker-g-color-border-hover;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
42
64
|
}
|
|
43
65
|
|
|
44
|
-
|
|
45
|
-
font-size: 16px;
|
|
66
|
+
&-placeholder {
|
|
46
67
|
position: absolute;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
68
|
+
color: @city-picker-placeholder-color;
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
white-space: nowrap;
|
|
71
|
+
text-overflow: ellipsis;
|
|
72
|
+
right: 24px;
|
|
73
|
+
left: 0;
|
|
53
74
|
}
|
|
54
|
-
}
|
|
55
75
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
76
|
+
&-borderless {
|
|
77
|
+
border: none;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&-underline {
|
|
81
|
+
border-bottom: 1px solid @city-picker-g-color-border;
|
|
82
|
+
&:hover:not(.@{city-picker-prefix-cls}-disabled) {
|
|
83
|
+
border-bottom: 1px solid @city-picker-g-color-border-hover;
|
|
84
|
+
}
|
|
61
85
|
}
|
|
62
|
-
}
|
|
63
86
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
87
|
+
&-bordered {
|
|
88
|
+
border: 1px solid @city-picker-border-g-color-border;
|
|
89
|
+
padding-left: @city-picker-bordered !important;
|
|
90
|
+
border-radius: @city-picker-border-radius-border;
|
|
91
|
+
&:hover:not(.@{city-picker-prefix-cls}-disabled) {
|
|
92
|
+
border: 1px solid @city-picker-g-color-border-hover;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.@{city-picker-prefix-cls}-suffix {
|
|
96
|
+
padding-right: 8px;
|
|
97
|
+
}
|
|
70
98
|
|
|
71
|
-
|
|
99
|
+
.@{city-picker-prefix-cls}-placeholder {
|
|
100
|
+
padding-left: @city-picker-bordered;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&-wrapper {
|
|
105
|
+
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
106
|
+
padding: @city-picker-wrapper-padding;
|
|
107
|
+
max-width: 100%;
|
|
108
|
+
color: #212121;
|
|
72
109
|
display: flex;
|
|
110
|
+
flex-wrap: wrap;
|
|
73
111
|
align-items: center;
|
|
74
|
-
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
box-sizing: border-box;
|
|
114
|
+
overflow-y: auto;
|
|
115
|
+
overflow-x: hidden;
|
|
116
|
+
position: relative;
|
|
75
117
|
|
|
76
|
-
.@{city-picker-prefix-cls}-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
118
|
+
&:hover .@{city-picker-prefix-cls}-icon-clear {
|
|
119
|
+
opacity: 1;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.@{city-picker-prefix-cls}-icon-clear {
|
|
123
|
+
color: @city-picker-clear-color;
|
|
124
|
+
&:hover {
|
|
125
|
+
color: @city-picker-clear-color-hover;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&-show-search {
|
|
131
|
+
cursor: text;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&-dropdown {
|
|
135
|
+
display: block;
|
|
136
|
+
left: 0;
|
|
137
|
+
z-index: @city-picker-z-index;
|
|
138
|
+
box-sizing: border-box;
|
|
139
|
+
margin: 0;
|
|
140
|
+
overflow: auto;
|
|
141
|
+
font-size: @city-picker-list-font-size;
|
|
142
|
+
font-variant: initial;
|
|
143
|
+
background-color: @city-picker-dropdown-bg;
|
|
144
|
+
border-radius: @city-picker-g-radius-border;
|
|
145
|
+
outline: none;
|
|
146
|
+
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
|
|
147
|
+
|
|
148
|
+
// 调整tabs样式
|
|
149
|
+
.@{tabs-prefix-cls}-tab-list {
|
|
150
|
+
width: 100%;
|
|
151
|
+
|
|
152
|
+
& > span {
|
|
153
|
+
width: 50%;
|
|
154
|
+
}
|
|
80
155
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
z-index: 1;
|
|
156
|
+
.@{kd-prefix}-tab-pane {
|
|
157
|
+
text-align: center;
|
|
84
158
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
159
|
+
&-type-line {
|
|
160
|
+
padding: 0 12px;
|
|
161
|
+
font-size: 12px;
|
|
88
162
|
}
|
|
89
163
|
}
|
|
90
164
|
}
|
|
91
165
|
|
|
92
|
-
.@{
|
|
93
|
-
|
|
94
|
-
&::before {
|
|
95
|
-
position: absolute;
|
|
96
|
-
content: '';
|
|
97
|
-
top: 0;
|
|
98
|
-
left: 0;
|
|
99
|
-
right: 0;
|
|
100
|
-
bottom: 0;
|
|
101
|
-
z-index: -2;
|
|
102
|
-
background: @city-picker-background-color;
|
|
103
|
-
border-radius: 2px 4px 0 0;
|
|
104
|
-
transform: scaleY(1.25) perspective(18px) rotateX(10deg);
|
|
105
|
-
transform-origin: bottom left;
|
|
106
|
-
box-shadow: 0 -1px 2px 0 rgba(0, 0, 0, 0.2);
|
|
107
|
-
}
|
|
166
|
+
.@{tabs-prefix-cls}-noContainer {
|
|
167
|
+
height: unset;
|
|
108
168
|
}
|
|
109
169
|
|
|
110
|
-
.@{
|
|
111
|
-
|
|
112
|
-
margin-left: -13px;
|
|
113
|
-
&::before {
|
|
114
|
-
position: absolute;
|
|
115
|
-
content: '';
|
|
116
|
-
top: 0;
|
|
117
|
-
left: 0;
|
|
118
|
-
right: 0;
|
|
119
|
-
bottom: 0;
|
|
120
|
-
z-index: -2;
|
|
121
|
-
background: @city-picker-background-color;
|
|
122
|
-
border-radius: 4px 4px 0 0;
|
|
123
|
-
transform: scaleY(1.25) perspective(18px) rotateX(10deg);
|
|
124
|
-
transform-origin: bottom;
|
|
125
|
-
box-shadow: 0 -1px 2px 0 rgba(0, 0, 0, 0.2);
|
|
126
|
-
}
|
|
170
|
+
.@{tabs-prefix-cls}-right-arrows {
|
|
171
|
+
display: none;
|
|
127
172
|
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
173
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
174
|
+
&-empty {
|
|
175
|
+
height: 48px;
|
|
176
|
+
display: flex;
|
|
177
|
+
align-items: center;
|
|
178
|
+
justify-content: center;
|
|
179
|
+
color: #b2b2b2;
|
|
180
|
+
font-size: 14px;
|
|
181
|
+
}
|
|
137
182
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
183
|
+
&-common {
|
|
184
|
+
height: 32px;
|
|
185
|
+
line-height: 32px;
|
|
186
|
+
padding: 0 12px;
|
|
187
|
+
background: #fafafa;
|
|
188
|
+
color: @city-picker-font-color;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&-loading {
|
|
192
|
+
height: 48px;
|
|
193
|
+
display: flex;
|
|
194
|
+
align-items: center;
|
|
195
|
+
justify-content: center;
|
|
196
|
+
}
|
|
141
197
|
}
|
|
142
|
-
}
|
|
143
198
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.2);
|
|
149
|
-
border-radius: 0 @city-picker-panel-radius-border @city-picker-panel-radius-border @city-picker-panel-radius-border;
|
|
150
|
-
}
|
|
199
|
+
&-list {
|
|
200
|
+
padding: 8px 0;
|
|
201
|
+
max-height: 320px;
|
|
202
|
+
overflow-y: auto;
|
|
151
203
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
204
|
+
// 下拉列表选项
|
|
205
|
+
&-item {
|
|
206
|
+
.item();
|
|
207
|
+
display: flex;
|
|
208
|
+
cursor: pointer;
|
|
157
209
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
padding: 10px 0;
|
|
162
|
-
max-height: 39px;
|
|
163
|
-
box-sizing: border-box;
|
|
164
|
-
border-bottom: 2px solid #F5F5F5;
|
|
165
|
-
cursor: pointer;
|
|
166
|
-
text-align: center;
|
|
210
|
+
&-content {
|
|
211
|
+
.over();
|
|
212
|
+
}
|
|
167
213
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
214
|
+
&-info {
|
|
215
|
+
color: @city-picker-placeholder-color;
|
|
216
|
+
white-space: nowrap;
|
|
217
|
+
}
|
|
171
218
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
219
|
+
&:hover {
|
|
220
|
+
background-color: @city-picker-item-active-bg;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
&-selected:not(&-disabled) {
|
|
224
|
+
background-color: @city-picker-item-selected-bg;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
&-disabled {
|
|
228
|
+
color: @city-picker-g-item-text-color-disabled;
|
|
229
|
+
cursor: not-allowed;
|
|
230
|
+
background-color: @city-picker-disabled-option-bg;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
175
233
|
}
|
|
176
234
|
|
|
177
|
-
|
|
178
|
-
|
|
235
|
+
&-highlight {
|
|
236
|
+
color: #5582f3;
|
|
179
237
|
}
|
|
180
|
-
}
|
|
181
238
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
max-height: ~'calc(100% - 39px - 10px)';
|
|
187
|
-
overflow: scroll;
|
|
239
|
+
// 选择器框大小
|
|
240
|
+
&-size-small {
|
|
241
|
+
.select-input-size(@city-picker-small-height, @city-picker-small-height, @city-picker-small-line-height, @city-picker-small-font-size);
|
|
242
|
+
}
|
|
188
243
|
|
|
189
|
-
|
|
190
|
-
|
|
244
|
+
&-size-middle {
|
|
245
|
+
.select-input-size(@city-picker-middle-height, @city-picker-middle-height, @city-picker-middle-line-height, @city-picker-middle-font-size);
|
|
246
|
+
}
|
|
191
247
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
align-items: center;
|
|
195
|
-
justify-content: center;
|
|
196
|
-
width: 32px;
|
|
197
|
-
height: 32px;
|
|
198
|
-
color: #999;
|
|
199
|
-
margin-right: 32px;
|
|
200
|
-
flex-shrink: 0;
|
|
201
|
-
flex-grow: 0;
|
|
202
|
-
}
|
|
248
|
+
&-size-large {
|
|
249
|
+
.select-input-size(@city-picker-large-height, @city-picker-large-height, @city-picker-large-line-height, @city-picker-large-font-size);
|
|
203
250
|
}
|
|
204
251
|
|
|
205
|
-
|
|
252
|
+
&-suffix {
|
|
253
|
+
right: 0;
|
|
254
|
+
position: absolute;
|
|
206
255
|
display: flex;
|
|
256
|
+
flex: 0;
|
|
207
257
|
flex-wrap: wrap;
|
|
258
|
+
align-items: center;
|
|
259
|
+
justify-content: center;
|
|
260
|
+
margin-left: 8px;
|
|
261
|
+
cursor: pointer;
|
|
208
262
|
}
|
|
209
263
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
padding: 3px 6px;
|
|
213
|
-
color: @city-picker-panel-item-color;
|
|
214
|
-
cursor: pointer;
|
|
215
|
-
width: 60px;
|
|
216
|
-
overflow: hidden;
|
|
217
|
-
white-space: nowrap;
|
|
218
|
-
-o-text-overflow: ellipsis;
|
|
219
|
-
text-overflow: ellipsis;
|
|
264
|
+
&-focused {
|
|
265
|
+
.focusColor();
|
|
220
266
|
|
|
267
|
+
.@{city-picker-prefix-cls}-content-item {
|
|
268
|
+
color: @city-picker-placeholder-color;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
&-disabled {
|
|
273
|
+
background-color: @city-picker-color-background-disabled;
|
|
274
|
+
color: @city-picker-color-text-disabled;
|
|
275
|
+
padding-right: 0;
|
|
276
|
+
border-color: #e5e5e5;
|
|
221
277
|
&:hover {
|
|
222
|
-
|
|
223
|
-
|
|
278
|
+
cursor: not-allowed;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.@{city-picker-prefix-cls}-suffix {
|
|
282
|
+
color: @city-picker-arrow-icon-color-text-disabled;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
&.@{city-picker-prefix-cls}-bordered {
|
|
286
|
+
padding-right: @city-picker-bordered;
|
|
224
287
|
}
|
|
225
288
|
}
|
|
226
|
-
}
|
|
227
289
|
|
|
228
|
-
|
|
229
|
-
display: flex;
|
|
230
|
-
flex-direction: column;
|
|
231
|
-
width: 256px;
|
|
232
|
-
height: 320px;
|
|
233
|
-
padding: 8px 0;
|
|
234
|
-
font-size: 12px;
|
|
235
|
-
color: #212121;
|
|
236
|
-
letter-spacing: 0;
|
|
237
|
-
line-height: 18px;
|
|
238
|
-
overflow: scroll;
|
|
239
|
-
box-shadow: 0 4px 10px 0 rgba(0,0,0,0.20);
|
|
240
|
-
border-radius: 2px;
|
|
241
|
-
background: #fff;
|
|
242
|
-
|
|
243
|
-
.@{city-picker-prefix-cls}-search-panel-item {
|
|
290
|
+
&-content {
|
|
244
291
|
display: flex;
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
padding: 7px 8px;
|
|
248
|
-
cursor: pointer;
|
|
292
|
+
width: 100%;
|
|
293
|
+
font-size: 14px;
|
|
249
294
|
|
|
250
|
-
|
|
251
|
-
|
|
295
|
+
&-search {
|
|
296
|
+
flex: 1;
|
|
297
|
+
position: relative;
|
|
298
|
+
&-input {
|
|
299
|
+
outline: 0;
|
|
300
|
+
border-radius: 0;
|
|
301
|
+
border: none;
|
|
302
|
+
background: transparent;
|
|
303
|
+
height: 100%;
|
|
304
|
+
width: 100%;
|
|
305
|
+
cursor: pointer;
|
|
306
|
+
}
|
|
252
307
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
flex-grow: 0;
|
|
260
|
-
flex-shrink: 0;
|
|
261
|
-
max-width: 168px;
|
|
308
|
+
&-item {
|
|
309
|
+
display: inline-block;
|
|
310
|
+
position: absolute;
|
|
311
|
+
left: 0;
|
|
312
|
+
right: 0;
|
|
313
|
+
.over();
|
|
262
314
|
}
|
|
263
315
|
|
|
264
|
-
|
|
265
|
-
flex
|
|
266
|
-
flex-shrink: 0;
|
|
267
|
-
max-width: 112px;
|
|
268
|
-
overflow: hidden;
|
|
269
|
-
white-space: nowrap;
|
|
270
|
-
-o-text-overflow: ellipsis;
|
|
271
|
-
text-overflow: ellipsis;
|
|
316
|
+
&-info {
|
|
317
|
+
flex: 1;
|
|
272
318
|
text-align: right;
|
|
273
|
-
color:
|
|
319
|
+
color: @city-picker-placeholder-color;
|
|
320
|
+
.over();
|
|
274
321
|
}
|
|
275
322
|
}
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
.@{city-picker-prefix-cls}-search-keyword {
|
|
279
|
-
color: @city-picker-theme-color;
|
|
280
|
-
}
|
|
281
323
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
324
|
+
&.topLeft.hidden,
|
|
325
|
+
&.bottomLeft.hidden,
|
|
326
|
+
&.topRight.hidden,
|
|
327
|
+
&.bottomRight.hidden {
|
|
328
|
+
opacity: 0;
|
|
329
|
+
visibility: hidden;
|
|
330
|
+
transition: all calc(@transition-duration - 0.1s) @ease;
|
|
331
|
+
}
|
|
288
332
|
}
|
|
@@ -1,5 +1,28 @@
|
|
|
1
|
+
@import './token.less';
|
|
1
2
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
display:
|
|
3
|
+
.item() {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: block;
|
|
6
|
+
font-weight: normal;
|
|
7
|
+
font-size: @city-picker-list-font-size;
|
|
8
|
+
min-height: @city-picker-dropdown-height;
|
|
9
|
+
padding: 5px 12px;
|
|
10
|
+
color: @city-picker-font-color;
|
|
11
|
+
line-height: @city-picker-dropdown-line-height;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.focusColor() {
|
|
15
|
+
border-color: @city-picker-g-color-border-foucs !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.select-input-size(@height, @maxHeight, @lineHeight, @fontSize) {
|
|
19
|
+
min-height: @height;
|
|
20
|
+
max-height: calc(@maxHeight * 3 - 10px);
|
|
21
|
+
font-size: @fontSize;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.over() {
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
white-space: nowrap;
|
|
27
|
+
text-overflow: ellipsis;
|
|
5
28
|
}
|
|
@@ -1,25 +1,53 @@
|
|
|
1
|
-
@import
|
|
2
|
-
|
|
3
|
-
@city-picker-prefix: '--@{kd-prefix}-c-city-picker';
|
|
4
|
-
|
|
1
|
+
@import '../../style/themes/token.less';
|
|
5
2
|
|
|
3
|
+
@city-picker-custom-prefix: ~'--@{kd-prefix}-c-city-picker';
|
|
6
4
|
|
|
7
5
|
// color
|
|
8
|
-
@city-picker-
|
|
9
|
-
@city-picker-
|
|
10
|
-
@city-picker-
|
|
11
|
-
@city-picker-
|
|
12
|
-
|
|
6
|
+
@city-picker-dropdown-bg: var(~'@{city-picker-custom-prefix}-dropdown-color-background', @color-background);
|
|
7
|
+
@city-picker-disabled-option-bg: var(~'@{city-picker-custom-prefix}-item-color-background-disabled', #fff);
|
|
8
|
+
@city-picker-item-active-bg: var(~'@{city-picker-custom-prefix}-color-background', #f5f5f5);
|
|
9
|
+
@city-picker-item-selected-bg: var(~'@{city-picker-custom-prefix}-color-background-selected', #f2f6ff);
|
|
10
|
+
@city-picker-g-color-border: var(~'@{city-picker-custom-prefix}-color-border', @color-input);
|
|
11
|
+
@city-picker-g-color-border-foucs: var(~'@{city-picker-custom-prefix}-color-border-foucs', @color-theme);
|
|
12
|
+
@city-picker-g-color-border-hover: var(~'@{city-picker-custom-prefix}-color-border-hover', @color-theme);
|
|
13
|
+
@city-picker-border-g-color-border: var(~'@{city-picker-custom-prefix}-border-color-border', @color-border-strong);
|
|
14
|
+
@city-picker-placeholder-color: var(~'@{city-picker-custom-prefix}-placeholder-color-text', #b2b2b2);
|
|
15
|
+
@city-picker-font-color: var(~'@{city-picker-custom-prefix}-footer-color-text', @color-text-primary);
|
|
16
|
+
@city-picker-g-item-text-color-disabled: var(~'@{city-picker-custom-prefix}-item-color-text-disabled', @color-disabled);
|
|
17
|
+
@city-picker-color-background-disabled: var(~'@{city-picker-custom-prefix}-color-background-disabled', #fff);
|
|
18
|
+
@city-picker-color-text-disabled: var(~'@{city-picker-custom-prefix}-color-text-disabled', @color-disabled);
|
|
19
|
+
@city-picker-arrow-icon-color-text-disabled: var(
|
|
20
|
+
~'@{city-picker-custom-prefix}-arrow-icon-color-text-disabled',
|
|
21
|
+
#b2b2b2
|
|
22
|
+
);
|
|
23
|
+
@city-picker-clear-color: var(~'@{city-picker-custom-prefix}-icon-clear-color-text', #d9d9d9);
|
|
24
|
+
@city-picker-clear-color-hover: var(~'@{city-picker-custom-prefix}-icon-clear-color-text-hover', #999);
|
|
13
25
|
|
|
14
26
|
// font
|
|
15
|
-
@city-picker-
|
|
27
|
+
@city-picker-list-font-size: var(~'@{city-picker-custom-prefix}-dropdown-font-size', 12px); // 下拉列表文字大小
|
|
28
|
+
@city-picker-large-font-size: var(~'@{city-picker-custom-prefix}-font-size-large', 16px); // 大号字体
|
|
29
|
+
@city-picker-middle-font-size: var(~'@{city-picker-custom-prefix}-font-size-middle', 14px); // 中号高度
|
|
30
|
+
@city-picker-small-font-size: var(~'@{city-picker-custom-prefix}-font-size-small', 12px); // 小号高度
|
|
16
31
|
|
|
17
|
-
//
|
|
18
|
-
@city-picker-
|
|
32
|
+
// line-height
|
|
33
|
+
@city-picker-dropdown-line-height: var(~'@{city-picker-custom-prefix}-dropdown-line-height', 22px);
|
|
34
|
+
@city-picker-large-line-height: var(~'@{city-picker-custom-prefix}-line-height-large', 28px);
|
|
35
|
+
@city-picker-middle-line-height: var(~'@{city-picker-custom-prefix}-line-height-middle', 22px);
|
|
36
|
+
@city-picker-small-line-height: var(~'@{city-picker-custom-prefix}-line-height-small', 14px);
|
|
19
37
|
|
|
20
38
|
// sizing
|
|
21
|
-
@city-picker-
|
|
22
|
-
@city-picker-
|
|
39
|
+
@city-picker-dropdown-height: var(~'@{city-picker-custom-prefix}-item-sizing-height', 22px);
|
|
40
|
+
@city-picker-large-height: var(~'@{city-picker-custom-prefix}-sizing-height-large', 36px); // 大号高度 lh:28px
|
|
41
|
+
@city-picker-middle-height: var(~'@{city-picker-custom-prefix}-sizing-height-middle', 30px); // 中号高度lh:22px
|
|
42
|
+
@city-picker-small-height: var(~'@{city-picker-custom-prefix}-sizing-height-small', 24px); // 小号高度lh:12px
|
|
23
43
|
|
|
44
|
+
// spacing
|
|
45
|
+
@city-picker-bordered: var(~'@{city-picker-custom-prefix}-bordered-spacing-padding-left', 8px);
|
|
46
|
+
@city-picker-wrapper-padding: var(~'@{city-picker-custom-prefix}-wrapper-spacing-padding', 1px 24px 1px 0);
|
|
24
47
|
|
|
48
|
+
// radius
|
|
49
|
+
@city-picker-g-radius-border: var(~'@{city-picker-custom-prefix}-radius-border', @radius-border);
|
|
50
|
+
@city-picker-border-radius-border: var(~'@{city-picker-custom-prefix}-bordered-radius-border', 2px);
|
|
25
51
|
|
|
52
|
+
// z-index
|
|
53
|
+
@city-picker-z-index: var(~'@{city-picker-custom-prefix}-z-index', @z-index-popper);
|
|
@@ -447,5 +447,18 @@ declare const compDefaultProps: {
|
|
|
447
447
|
switcherIcon: () => JSX.Element;
|
|
448
448
|
expandOnClickNode: boolean;
|
|
449
449
|
};
|
|
450
|
+
CityPicker: {
|
|
451
|
+
type: string;
|
|
452
|
+
loading: boolean;
|
|
453
|
+
size: string;
|
|
454
|
+
borderType: string;
|
|
455
|
+
defaultOpen: boolean;
|
|
456
|
+
showArrow: boolean;
|
|
457
|
+
placeholder: string;
|
|
458
|
+
description: string;
|
|
459
|
+
showDescription: boolean;
|
|
460
|
+
optionHighlightProps: string;
|
|
461
|
+
allowClear: boolean;
|
|
462
|
+
};
|
|
450
463
|
};
|
|
451
464
|
export default compDefaultProps;
|
|
@@ -464,6 +464,19 @@ var compDefaultProps = {
|
|
|
464
464
|
});
|
|
465
465
|
},
|
|
466
466
|
expandOnClickNode: false
|
|
467
|
+
},
|
|
468
|
+
CityPicker: {
|
|
469
|
+
type: 'domestic',
|
|
470
|
+
loading: false,
|
|
471
|
+
size: 'small',
|
|
472
|
+
borderType: 'underline',
|
|
473
|
+
defaultOpen: false,
|
|
474
|
+
showArrow: true,
|
|
475
|
+
placeholder: '',
|
|
476
|
+
description: '城市',
|
|
477
|
+
showDescription: true,
|
|
478
|
+
optionHighlightProps: 'highlightText',
|
|
479
|
+
allowClear: true
|
|
467
480
|
}
|
|
468
481
|
};
|
|
469
482
|
export default compDefaultProps;
|