@kdcloudjs/kdesign 1.7.68-stable.8 → 1.7.68-stable.9
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 +33 -0
- package/dist/kdesign-complete.less +110 -0
- package/dist/kdesign.css +365 -1
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +3876 -167
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +3 -3
- package/dist/kdesign.min.js +12 -12
- package/dist/kdesign.min.js.map +1 -1
- package/es/_utils/useId.d.ts +2 -0
- package/es/_utils/useId.js +30 -0
- package/es/city-picker/city-picker.js +16 -28
- package/es/city-picker/option.js +1 -5
- package/es/city-picker/style/index.css +8 -0
- package/es/city-picker/style/index.less +10 -0
- package/es/config-provider/compDefaultProps.d.ts +0 -1
- package/es/config-provider/compDefaultProps.js +0 -1
- package/es/locale/locale.d.ts +1 -0
- package/es/locale/zh-CN.d.ts +1 -0
- package/es/locale/zh-CN.js +1 -0
- package/es/popper/index.d.ts +61 -0
- package/es/popper/index.js +550 -0
- package/es/popper/style/css.js +2 -0
- package/es/popper/style/index.css +355 -0
- package/es/popper/style/index.d.ts +2 -0
- package/es/popper/style/index.js +2 -0
- package/es/popper/style/index.less +99 -0
- package/lib/_utils/useId.d.ts +2 -0
- package/lib/_utils/useId.js +43 -0
- package/lib/city-picker/city-picker.js +16 -28
- package/lib/city-picker/option.js +1 -5
- package/lib/city-picker/style/index.css +8 -0
- package/lib/city-picker/style/index.less +10 -0
- package/lib/config-provider/compDefaultProps.d.ts +0 -1
- package/lib/config-provider/compDefaultProps.js +0 -1
- package/lib/locale/locale.d.ts +1 -0
- package/lib/locale/zh-CN.d.ts +1 -0
- package/lib/locale/zh-CN.js +1 -0
- package/lib/popper/index.d.ts +61 -0
- package/lib/popper/index.js +567 -0
- package/lib/popper/style/css.js +4 -0
- package/lib/popper/style/index.css +355 -0
- package/lib/popper/style/index.d.ts +2 -0
- package/lib/popper/style/index.js +4 -0
- package/lib/popper/style/index.less +99 -0
- package/lib/style/components.less +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
/* ----------- color ——————---- start */
|
|
2
|
+
/* ----------- color ——————---- end */
|
|
3
|
+
/* ----------- motion ——————---- start */
|
|
4
|
+
/* ----------- motion ——————---- end */
|
|
5
|
+
/* ----------- transition ——————---- start */
|
|
6
|
+
/* ----------- transition ——————---- end */
|
|
7
|
+
/* ----------- font ——————---- start */
|
|
8
|
+
/* ----------- font ——————---- end */
|
|
9
|
+
/* ----------- zIndex ——————---- start */
|
|
10
|
+
/*
|
|
11
|
+
普通组件内部自身层级应设置在0-100间
|
|
12
|
+
*/
|
|
13
|
+
/* ----------- zIndex ——————---- end */
|
|
14
|
+
/* ----------- Button ——————---- start */
|
|
15
|
+
/* ----------- Button ——————---- end */
|
|
16
|
+
/* ----------- Collapse ——————---- start */
|
|
17
|
+
/* ----------- Collapse ——————---- end */
|
|
18
|
+
/* ----------- Card ——————---- start */
|
|
19
|
+
/* ----------- Card ——————---- end */
|
|
20
|
+
/* ----------- Carousel ——————---- start */
|
|
21
|
+
/* ----------- Carousel ——————---- end */
|
|
22
|
+
/* ----------- Cascader ——————---- start */
|
|
23
|
+
/* ----------- Cascader ——————---- end */
|
|
24
|
+
/* ----------- Switch ——————---- start */
|
|
25
|
+
/* ----------- Switch ——————---- end */
|
|
26
|
+
/* ----------- Input ——————---- start */
|
|
27
|
+
/* ----------- Input ——————---- end */
|
|
28
|
+
/* ----------- InputNumber ——————---- start */
|
|
29
|
+
/* ----------- InputNumber ——————---- end */
|
|
30
|
+
/* ----------- checkbox ——————---- start */
|
|
31
|
+
/* ----------- checkbox ——————---- start */
|
|
32
|
+
/* ----------- checkbox ——————---- end */
|
|
33
|
+
/* ----------- Radio ——————---- start */
|
|
34
|
+
/* ----------- Radio ——————---- end */
|
|
35
|
+
/* ----------- icon ——————---- start */
|
|
36
|
+
/* ----------- icon ——————---- end */
|
|
37
|
+
/* ----------- Popconfirm ——————---- start */
|
|
38
|
+
/* ----------- Popconfirm ——————---- end */
|
|
39
|
+
/* ----------- Progress ——————---- start */
|
|
40
|
+
/* ----------- Progress ——————---- end */
|
|
41
|
+
/* ----------- Pagination ——————---- start */
|
|
42
|
+
/* ----------- Pagination ——————---- end */
|
|
43
|
+
/* ----------- Timeline ——————---- start */
|
|
44
|
+
/* ----------- Timeline ——————---- end */
|
|
45
|
+
/* ----------- Tabs ——————---- start */
|
|
46
|
+
/* ----------- Tabs ——————---- end */
|
|
47
|
+
/* ----------- Select ——————---- start */
|
|
48
|
+
/* ----------- Select ——————---- end */
|
|
49
|
+
/* ----------- Rate ——————---- start */
|
|
50
|
+
/* ----------- Rate ——————---- end */
|
|
51
|
+
/* ----------- Dropdown ——————---- start */
|
|
52
|
+
/* ----------- Dropdown ——————---- end */
|
|
53
|
+
/* ----------- Tooltip ——————---- start */
|
|
54
|
+
/* ----------- Tooltip ——————---- end */
|
|
55
|
+
/* ----------- Transfer ——————---- start */
|
|
56
|
+
/* ----------- Transfer ——————---- end */
|
|
57
|
+
/* ----------- DatePicker ——————---- start */
|
|
58
|
+
/* ----------- DatePicker ——————---- end */
|
|
59
|
+
/* ----------- ColorPicker ——————---- start */
|
|
60
|
+
/* ----------- ColorPicker ——————---- end */
|
|
61
|
+
/* ----------- Tree ——————---- start */
|
|
62
|
+
/* ----------- Tree ——————---- end */
|
|
63
|
+
/* ----------- Alert ——————---- start */
|
|
64
|
+
/* ----------- Alert ——————---- end */
|
|
65
|
+
/* ----------- Split-Panel ——————---- start */
|
|
66
|
+
/* ----------- Split-Panel ——————---- end */
|
|
67
|
+
/* ----------- Modal ——————---- start */
|
|
68
|
+
/* ----------- Modal ——————---- end */
|
|
69
|
+
/* ----------- Steps ——————---- start */
|
|
70
|
+
/* ----------- Steps ——————---- end */
|
|
71
|
+
/* ----------- Form ——————---- start */
|
|
72
|
+
/* ----------- Form ——————---- end */
|
|
73
|
+
/* ----------- Tag ——————---- start */
|
|
74
|
+
/* ----------- Tag ——————---- end */
|
|
75
|
+
/* ----------- Menu ——————---- start */
|
|
76
|
+
/* ----------- Menu ——————---- end */
|
|
77
|
+
/* ----------- notice ——————---- start */
|
|
78
|
+
/* ----------- message ——————---- end */
|
|
79
|
+
/* ----------- Spin ——————---- start */
|
|
80
|
+
/* ----------- Spin ——————---- end */
|
|
81
|
+
/* ----------- Spin ——————---- start */
|
|
82
|
+
/* ----------- Spin ——————---- end */
|
|
83
|
+
/* ----------- Layout ——————---- start */
|
|
84
|
+
/* ----------- Layout ——————---- end */
|
|
85
|
+
/* ----------- Typography ——————---- start */
|
|
86
|
+
/* ----------- Typography ——————---- start */
|
|
87
|
+
/* ----------- Search ——————---- start */
|
|
88
|
+
/* ----------- Search ——————---- start */
|
|
89
|
+
/* ----------- Badge ——————---- start */
|
|
90
|
+
/* ----------- Badge ——————---- end */
|
|
91
|
+
/* ----------- Anchor ——————---- start */
|
|
92
|
+
/* ----------- Anchor ——————---- end */
|
|
93
|
+
/* ----------- Avatar ——————---- start */
|
|
94
|
+
/* ----------- Avatar ——————---- end */
|
|
95
|
+
/* ----------- AdvancedSelector ——————---- start */
|
|
96
|
+
/* ----------- AdvancedSelector ——————---- end */
|
|
97
|
+
/* ----------- motion ——————---- start */
|
|
98
|
+
/* ----------- motion ——————---- end */
|
|
99
|
+
/* ----------- transition ——————---- start */
|
|
100
|
+
/* ----------- transition ——————---- end */
|
|
101
|
+
/* ----------- zIndex ——————---- start */
|
|
102
|
+
/*
|
|
103
|
+
普通组件内部自身层级应设置在0-100间
|
|
104
|
+
*/
|
|
105
|
+
/* ----------- zIndex ——————---- end */
|
|
106
|
+
/* 多行显示省略号 */
|
|
107
|
+
/* 单行显示省略号 */
|
|
108
|
+
/** 浮层箭头样式 **/
|
|
109
|
+
.kd-popper {
|
|
110
|
+
opacity: 1;
|
|
111
|
+
z-index: var(--kd-g-z-index-popper, 1050);
|
|
112
|
+
visibility: visible;
|
|
113
|
+
}
|
|
114
|
+
.kd-popper.hidden {
|
|
115
|
+
opacity: 0;
|
|
116
|
+
visibility: hidden;
|
|
117
|
+
pointer-events: none;
|
|
118
|
+
}
|
|
119
|
+
.kd-popper .arrow {
|
|
120
|
+
visibility: hidden;
|
|
121
|
+
}
|
|
122
|
+
.kd-popper .arrow::before {
|
|
123
|
+
visibility: visible;
|
|
124
|
+
position: absolute;
|
|
125
|
+
border-style: solid;
|
|
126
|
+
border-color: transparent;
|
|
127
|
+
border-width: var(--arrowSize);
|
|
128
|
+
content: '';
|
|
129
|
+
-webkit-transform: rotate(45deg);
|
|
130
|
+
transform: rotate(45deg);
|
|
131
|
+
}
|
|
132
|
+
.kd-popper[data-popper-placement^='top'] .arrow {
|
|
133
|
+
bottom: calc(1.05 * var(--arrowSize));
|
|
134
|
+
}
|
|
135
|
+
.kd-popper[data-popper-placement^='top'] .arrow::before {
|
|
136
|
+
left: calc(-1 * var(--arrowSize));
|
|
137
|
+
border-top-color: transparent;
|
|
138
|
+
border-left-color: transparent;
|
|
139
|
+
}
|
|
140
|
+
.kd-popper[data-popper-placement^='bottom'] .arrow {
|
|
141
|
+
top: calc(-0.85 * var(--arrowSize));
|
|
142
|
+
}
|
|
143
|
+
.kd-popper[data-popper-placement^='bottom'] .arrow::before {
|
|
144
|
+
left: calc(-1 * var(--arrowSize));
|
|
145
|
+
border-bottom-color: transparent;
|
|
146
|
+
border-right-color: transparent;
|
|
147
|
+
}
|
|
148
|
+
.kd-popper[data-popper-placement^='left'] .arrow {
|
|
149
|
+
right: calc(1.05 * var(--arrowSize));
|
|
150
|
+
}
|
|
151
|
+
.kd-popper[data-popper-placement^='left'] .arrow::before {
|
|
152
|
+
top: calc(-1 * var(--arrowSize));
|
|
153
|
+
border-left-color: transparent;
|
|
154
|
+
border-bottom-color: transparent;
|
|
155
|
+
}
|
|
156
|
+
.kd-popper[data-popper-placement^='right'] .arrow {
|
|
157
|
+
left: calc(-0.85 * var(--arrowSize));
|
|
158
|
+
}
|
|
159
|
+
.kd-popper[data-popper-placement^='right'] .arrow::before {
|
|
160
|
+
top: calc(-1 * var(--arrowSize));
|
|
161
|
+
border-top-color: transparent;
|
|
162
|
+
border-right-color: transparent;
|
|
163
|
+
}
|
|
164
|
+
.kd-popper-top {
|
|
165
|
+
-webkit-animation-duration: calc(0.3s - 0.1s);
|
|
166
|
+
animation-duration: calc(0.3s - 0.1s);
|
|
167
|
+
}
|
|
168
|
+
.kd-popper-top-in {
|
|
169
|
+
-webkit-animation-name: kdZoomBottomIn;
|
|
170
|
+
animation-name: kdZoomBottomIn;
|
|
171
|
+
-webkit-animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
172
|
+
animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
173
|
+
}
|
|
174
|
+
.kd-popper-top-out {
|
|
175
|
+
-webkit-animation-name: kdZoomBottomOut;
|
|
176
|
+
animation-name: kdZoomBottomOut;
|
|
177
|
+
-webkit-animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
178
|
+
animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
179
|
+
}
|
|
180
|
+
.kd-popper-left {
|
|
181
|
+
-webkit-animation-duration: calc(0.3s - 0.1s);
|
|
182
|
+
animation-duration: calc(0.3s - 0.1s);
|
|
183
|
+
}
|
|
184
|
+
.kd-popper-left-in {
|
|
185
|
+
-webkit-animation-name: kdZoomRightIn;
|
|
186
|
+
animation-name: kdZoomRightIn;
|
|
187
|
+
-webkit-animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
188
|
+
animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
189
|
+
}
|
|
190
|
+
.kd-popper-left-out {
|
|
191
|
+
-webkit-animation-name: kdZoomRightOut;
|
|
192
|
+
animation-name: kdZoomRightOut;
|
|
193
|
+
-webkit-animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
194
|
+
animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
195
|
+
}
|
|
196
|
+
.kd-popper-right {
|
|
197
|
+
-webkit-animation-duration: calc(0.3s - 0.1s);
|
|
198
|
+
animation-duration: calc(0.3s - 0.1s);
|
|
199
|
+
}
|
|
200
|
+
.kd-popper-right-in {
|
|
201
|
+
-webkit-animation-name: kdZoomLeftIn;
|
|
202
|
+
animation-name: kdZoomLeftIn;
|
|
203
|
+
-webkit-animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
204
|
+
animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
205
|
+
}
|
|
206
|
+
.kd-popper-right-out {
|
|
207
|
+
-webkit-animation-name: kdZoomLeftOut;
|
|
208
|
+
animation-name: kdZoomLeftOut;
|
|
209
|
+
-webkit-animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
210
|
+
animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
211
|
+
}
|
|
212
|
+
.kd-popper-bottom {
|
|
213
|
+
-webkit-animation-duration: calc(0.3s - 0.1s);
|
|
214
|
+
animation-duration: calc(0.3s - 0.1s);
|
|
215
|
+
}
|
|
216
|
+
.kd-popper-bottom-in {
|
|
217
|
+
-webkit-animation-name: kdZoomTopIn;
|
|
218
|
+
animation-name: kdZoomTopIn;
|
|
219
|
+
-webkit-animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
220
|
+
animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
221
|
+
}
|
|
222
|
+
.kd-popper-bottom-out {
|
|
223
|
+
-webkit-animation-name: kdZoomTopOut;
|
|
224
|
+
animation-name: kdZoomTopOut;
|
|
225
|
+
-webkit-animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
226
|
+
animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
227
|
+
}
|
|
228
|
+
.kd-popper-top-start {
|
|
229
|
+
-webkit-animation-duration: calc(0.3s - 0.1s);
|
|
230
|
+
animation-duration: calc(0.3s - 0.1s);
|
|
231
|
+
}
|
|
232
|
+
.kd-popper-top-start-in {
|
|
233
|
+
-webkit-animation-name: kdZoomLeftBottomIn;
|
|
234
|
+
animation-name: kdZoomLeftBottomIn;
|
|
235
|
+
-webkit-animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
236
|
+
animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
237
|
+
}
|
|
238
|
+
.kd-popper-top-start-out {
|
|
239
|
+
-webkit-animation-name: kdZoomLeftBottomOut;
|
|
240
|
+
animation-name: kdZoomLeftBottomOut;
|
|
241
|
+
-webkit-animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
242
|
+
animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
243
|
+
}
|
|
244
|
+
.kd-popper-right-end {
|
|
245
|
+
-webkit-animation-duration: calc(0.3s - 0.1s);
|
|
246
|
+
animation-duration: calc(0.3s - 0.1s);
|
|
247
|
+
}
|
|
248
|
+
.kd-popper-right-end-in {
|
|
249
|
+
-webkit-animation-name: kdZoomLeftBottomIn;
|
|
250
|
+
animation-name: kdZoomLeftBottomIn;
|
|
251
|
+
-webkit-animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
252
|
+
animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
253
|
+
}
|
|
254
|
+
.kd-popper-right-end-out {
|
|
255
|
+
-webkit-animation-name: kdZoomLeftBottomOut;
|
|
256
|
+
animation-name: kdZoomLeftBottomOut;
|
|
257
|
+
-webkit-animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
258
|
+
animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
259
|
+
}
|
|
260
|
+
.kd-popper-top-end {
|
|
261
|
+
-webkit-animation-duration: calc(0.3s - 0.1s);
|
|
262
|
+
animation-duration: calc(0.3s - 0.1s);
|
|
263
|
+
}
|
|
264
|
+
.kd-popper-top-end-in {
|
|
265
|
+
-webkit-animation-name: kdZoomRightBottomIn;
|
|
266
|
+
animation-name: kdZoomRightBottomIn;
|
|
267
|
+
-webkit-animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
268
|
+
animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
269
|
+
}
|
|
270
|
+
.kd-popper-top-end-out {
|
|
271
|
+
-webkit-animation-name: kdZoomRightBottomOut;
|
|
272
|
+
animation-name: kdZoomRightBottomOut;
|
|
273
|
+
-webkit-animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
274
|
+
animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
275
|
+
}
|
|
276
|
+
.kd-popper-left-end {
|
|
277
|
+
-webkit-animation-duration: calc(0.3s - 0.1s);
|
|
278
|
+
animation-duration: calc(0.3s - 0.1s);
|
|
279
|
+
}
|
|
280
|
+
.kd-popper-left-end-in {
|
|
281
|
+
-webkit-animation-name: kdZoomRightBottomIn;
|
|
282
|
+
animation-name: kdZoomRightBottomIn;
|
|
283
|
+
-webkit-animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
284
|
+
animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
285
|
+
}
|
|
286
|
+
.kd-popper-left-end-out {
|
|
287
|
+
-webkit-animation-name: kdZoomRightBottomOut;
|
|
288
|
+
animation-name: kdZoomRightBottomOut;
|
|
289
|
+
-webkit-animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
290
|
+
animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
291
|
+
}
|
|
292
|
+
.kd-popper-left-start {
|
|
293
|
+
-webkit-animation-duration: calc(0.3s - 0.1s);
|
|
294
|
+
animation-duration: calc(0.3s - 0.1s);
|
|
295
|
+
}
|
|
296
|
+
.kd-popper-left-start-in {
|
|
297
|
+
-webkit-animation-name: kdZoomTopRightIn;
|
|
298
|
+
animation-name: kdZoomTopRightIn;
|
|
299
|
+
-webkit-animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
300
|
+
animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
301
|
+
}
|
|
302
|
+
.kd-popper-left-start-out {
|
|
303
|
+
-webkit-animation-name: kdZoomTopRightOut;
|
|
304
|
+
animation-name: kdZoomTopRightOut;
|
|
305
|
+
-webkit-animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
306
|
+
animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
307
|
+
}
|
|
308
|
+
.kd-popper-bottom-end {
|
|
309
|
+
-webkit-animation-duration: calc(0.3s - 0.1s);
|
|
310
|
+
animation-duration: calc(0.3s - 0.1s);
|
|
311
|
+
}
|
|
312
|
+
.kd-popper-bottom-end-in {
|
|
313
|
+
-webkit-animation-name: kdZoomTopRightIn;
|
|
314
|
+
animation-name: kdZoomTopRightIn;
|
|
315
|
+
-webkit-animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
316
|
+
animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
317
|
+
}
|
|
318
|
+
.kd-popper-bottom-end-out {
|
|
319
|
+
-webkit-animation-name: kdZoomTopRightOut;
|
|
320
|
+
animation-name: kdZoomTopRightOut;
|
|
321
|
+
-webkit-animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
322
|
+
animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
323
|
+
}
|
|
324
|
+
.kd-popper-right-start {
|
|
325
|
+
-webkit-animation-duration: calc(0.3s - 0.1s);
|
|
326
|
+
animation-duration: calc(0.3s - 0.1s);
|
|
327
|
+
}
|
|
328
|
+
.kd-popper-right-start-in {
|
|
329
|
+
-webkit-animation-name: kdZoomTopLeftIn;
|
|
330
|
+
animation-name: kdZoomTopLeftIn;
|
|
331
|
+
-webkit-animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
332
|
+
animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
333
|
+
}
|
|
334
|
+
.kd-popper-right-start-out {
|
|
335
|
+
-webkit-animation-name: kdZoomTopLeftOut;
|
|
336
|
+
animation-name: kdZoomTopLeftOut;
|
|
337
|
+
-webkit-animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
338
|
+
animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
339
|
+
}
|
|
340
|
+
.kd-popper-bottom-start {
|
|
341
|
+
-webkit-animation-duration: calc(0.3s - 0.1s);
|
|
342
|
+
animation-duration: calc(0.3s - 0.1s);
|
|
343
|
+
}
|
|
344
|
+
.kd-popper-bottom-start-in {
|
|
345
|
+
-webkit-animation-name: kdZoomTopLeftIn;
|
|
346
|
+
animation-name: kdZoomTopLeftIn;
|
|
347
|
+
-webkit-animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
348
|
+
animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
|
|
349
|
+
}
|
|
350
|
+
.kd-popper-bottom-start-out {
|
|
351
|
+
-webkit-animation-name: kdZoomTopLeftOut;
|
|
352
|
+
animation-name: kdZoomTopLeftOut;
|
|
353
|
+
-webkit-animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
354
|
+
animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6);
|
|
355
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
@import '../../style/themes/index';
|
|
2
|
+
@import '../../style/mixins/index';
|
|
3
|
+
|
|
4
|
+
@popper-prefix-cls: ~'@{kd-prefix}-popper';
|
|
5
|
+
|
|
6
|
+
.@{popper-prefix-cls} {
|
|
7
|
+
opacity: 1;
|
|
8
|
+
z-index: @z-index-popper;
|
|
9
|
+
visibility: visible;
|
|
10
|
+
|
|
11
|
+
&.hidden {
|
|
12
|
+
opacity: 0;
|
|
13
|
+
visibility: hidden;
|
|
14
|
+
pointer-events: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.arrow {
|
|
18
|
+
visibility: hidden;
|
|
19
|
+
|
|
20
|
+
&::before {
|
|
21
|
+
visibility: visible;
|
|
22
|
+
position: absolute;
|
|
23
|
+
border-style: solid;
|
|
24
|
+
border-color: transparent;
|
|
25
|
+
border-width: var(--arrowSize);
|
|
26
|
+
content: '';
|
|
27
|
+
transform: rotate(45deg);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&[data-popper-placement^='top'] .arrow {
|
|
32
|
+
bottom: calc(1.05 * var(--arrowSize));
|
|
33
|
+
|
|
34
|
+
&::before {
|
|
35
|
+
left: calc(-1 * var(--arrowSize));
|
|
36
|
+
border-top-color: transparent;
|
|
37
|
+
border-left-color: transparent;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&[data-popper-placement^='bottom'] .arrow {
|
|
42
|
+
top: calc(-0.85 * var(--arrowSize));
|
|
43
|
+
|
|
44
|
+
&::before {
|
|
45
|
+
left: calc(-1 * var(--arrowSize));
|
|
46
|
+
border-bottom-color: transparent;
|
|
47
|
+
border-right-color: transparent;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&[data-popper-placement^='left'] .arrow {
|
|
52
|
+
right: calc(1.05 * var(--arrowSize));
|
|
53
|
+
|
|
54
|
+
&::before {
|
|
55
|
+
top: calc(-1 * var(--arrowSize));
|
|
56
|
+
border-left-color: transparent;
|
|
57
|
+
border-bottom-color: transparent;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&[data-popper-placement^='right'] .arrow {
|
|
62
|
+
left: calc(-0.85 * var(--arrowSize));
|
|
63
|
+
|
|
64
|
+
&::before {
|
|
65
|
+
top: calc(-1 * var(--arrowSize));
|
|
66
|
+
border-top-color: transparent;
|
|
67
|
+
border-right-color: transparent;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.popper-motion(@className, @keyframeName, @duration: calc(@transition-duration - 0.1s)) {
|
|
73
|
+
.@{className} {
|
|
74
|
+
animation-duration: @duration;
|
|
75
|
+
|
|
76
|
+
&-in {
|
|
77
|
+
animation-name: ~'@{keyframeName}In';
|
|
78
|
+
animation-timing-function: @ease-out;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&-out {
|
|
82
|
+
animation-name: ~'@{keyframeName}Out';
|
|
83
|
+
animation-timing-function: @ease-in;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.popper-motion(~'@{popper-prefix-cls}-top', kdZoomBottom);
|
|
89
|
+
.popper-motion(~'@{popper-prefix-cls}-left', kdZoomRight);
|
|
90
|
+
.popper-motion(~'@{popper-prefix-cls}-right', kdZoomLeft);
|
|
91
|
+
.popper-motion(~'@{popper-prefix-cls}-bottom', kdZoomTop);
|
|
92
|
+
.popper-motion(~'@{popper-prefix-cls}-top-start', kdZoomLeftBottom);
|
|
93
|
+
.popper-motion(~'@{popper-prefix-cls}-right-end', kdZoomLeftBottom);
|
|
94
|
+
.popper-motion(~'@{popper-prefix-cls}-top-end', kdZoomRightBottom);
|
|
95
|
+
.popper-motion(~'@{popper-prefix-cls}-left-end', kdZoomRightBottom);
|
|
96
|
+
.popper-motion(~'@{popper-prefix-cls}-left-start', kdZoomTopRight);
|
|
97
|
+
.popper-motion(~'@{popper-prefix-cls}-bottom-end', kdZoomTopRight);
|
|
98
|
+
.popper-motion(~'@{popper-prefix-cls}-right-start', kdZoomTopLeft);
|
|
99
|
+
.popper-motion(~'@{popper-prefix-cls}-bottom-start', kdZoomTopLeft);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
|
4
|
+
var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
5
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
6
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.default = void 0;
|
|
11
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
|
13
|
+
var React = _interopRequireWildcard(require("react"));
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
+
function getUseId() {
|
|
17
|
+
var fullClone = (0, _extends2.default)({}, React);
|
|
18
|
+
return fullClone === null || fullClone === void 0 ? void 0 : fullClone.useId;
|
|
19
|
+
}
|
|
20
|
+
var uuid = 0;
|
|
21
|
+
var useOriginId = getUseId();
|
|
22
|
+
var _default = useOriginId ? function useId(id) {
|
|
23
|
+
var reactId = useOriginId();
|
|
24
|
+
if (id) {
|
|
25
|
+
return id;
|
|
26
|
+
}
|
|
27
|
+
return reactId;
|
|
28
|
+
} : function useCompatId(id) {
|
|
29
|
+
var _React$useState = React.useState('ssr-id'),
|
|
30
|
+
_React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
|
|
31
|
+
innerId = _React$useState2[0],
|
|
32
|
+
setInnerId = _React$useState2[1];
|
|
33
|
+
React.useEffect(function () {
|
|
34
|
+
var nextId = uuid;
|
|
35
|
+
uuid += 1;
|
|
36
|
+
setInnerId("kd_unique_".concat(nextId));
|
|
37
|
+
}, []);
|
|
38
|
+
if (id) {
|
|
39
|
+
return id;
|
|
40
|
+
}
|
|
41
|
+
return innerId;
|
|
42
|
+
};
|
|
43
|
+
exports.default = _default;
|
|
@@ -12,6 +12,7 @@ var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-sta
|
|
|
12
12
|
var _find = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find"));
|
|
13
13
|
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
14
14
|
var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
|
|
15
|
+
var _findIndex = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find-index"));
|
|
15
16
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
|
16
17
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/toConsumableArray"));
|
|
17
18
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
@@ -22,7 +23,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
22
23
|
var _ConfigContext = _interopRequireDefault(require("../config-provider/ConfigContext"));
|
|
23
24
|
var _utils = require("../_utils");
|
|
24
25
|
var _index = require("../index");
|
|
25
|
-
var
|
|
26
|
+
var _popper = _interopRequireDefault(require("../popper"));
|
|
26
27
|
var _option = _interopRequireDefault(require("./option"));
|
|
27
28
|
var _escapeRegExp = _interopRequireDefault(require("lodash/escapeRegExp"));
|
|
28
29
|
var _KeyCode = _interopRequireDefault(require("../_utils/KeyCode"));
|
|
@@ -71,7 +72,8 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
71
72
|
clearIcon = selectProps.clearIcon,
|
|
72
73
|
loading = selectProps.loading,
|
|
73
74
|
showDescription = selectProps.showDescription,
|
|
74
|
-
|
|
75
|
+
_selectProps$descript = selectProps.description,
|
|
76
|
+
description = _selectProps$descript === void 0 ? cityPickerLangMsg.title : _selectProps$descript,
|
|
75
77
|
optionHighlightProps = selectProps.optionHighlightProps,
|
|
76
78
|
_selectProps$popperSt = selectProps.popperStyle,
|
|
77
79
|
popperStyle = _selectProps$popperSt === void 0 ? {} : _selectProps$popperSt,
|
|
@@ -164,15 +166,6 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
164
166
|
setAfterChangeFocus(false);
|
|
165
167
|
onBlur && onBlur(e);
|
|
166
168
|
}, [onBlur]);
|
|
167
|
-
(0, _react.useEffect)(function () {
|
|
168
|
-
selectionRef.current.addEventListener('mouseup', function (e) {
|
|
169
|
-
var _a;
|
|
170
|
-
var isCloseBtn = ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.className.indexOf('kd-tag-close-icon')) > -1;
|
|
171
|
-
if (isCloseBtn) {
|
|
172
|
-
e.stopPropagation();
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
}, []);
|
|
176
169
|
// 输入框变化搜索内容
|
|
177
170
|
var handleSearchChange = (0, _react.useCallback)(function (event) {
|
|
178
171
|
var val = event.currentTarget.value;
|
|
@@ -377,14 +370,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
377
370
|
}, [optionShow]);
|
|
378
371
|
(0, _react.useEffect)(function () {
|
|
379
372
|
var _a;
|
|
380
|
-
|
|
381
|
-
e.stopPropagation();
|
|
382
|
-
};
|
|
383
|
-
(_a = clearRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('mouseup', fn);
|
|
384
|
-
return function () {
|
|
385
|
-
var _a;
|
|
386
|
-
(_a = clearRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('mouseup', fn);
|
|
387
|
-
};
|
|
373
|
+
(_a = clearRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('click', handleReset);
|
|
388
374
|
}, [initValue]);
|
|
389
375
|
// keyboard
|
|
390
376
|
var curkeyboardList = (0, _react.useMemo)(function () {
|
|
@@ -414,15 +400,17 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
414
400
|
setActiveIndex(index === undefined ? getActiveIndex(0) : index);
|
|
415
401
|
};
|
|
416
402
|
(0, _react.useEffect)(function () {
|
|
417
|
-
|
|
418
|
-
|
|
403
|
+
var index = (0, _findIndex.default)(curkeyboardList).call(curkeyboardList, function (item) {
|
|
404
|
+
return item.id === initValue;
|
|
405
|
+
});
|
|
406
|
+
initActiveIndex(index >= 0 ? index : undefined);
|
|
407
|
+
}, [curkeyboardList, initValue]);
|
|
419
408
|
var onInternalKeyDown = function onInternalKeyDown(e) {
|
|
420
409
|
var _a, _b, _c;
|
|
421
410
|
var which = e.which;
|
|
422
411
|
// open
|
|
423
412
|
if (which === _KeyCode.default.ENTER || which === _KeyCode.default.UP || which === _KeyCode.default.DOWN) {
|
|
424
413
|
e.preventDefault();
|
|
425
|
-
setOptionShow(true);
|
|
426
414
|
}
|
|
427
415
|
// up、down、enter、esc
|
|
428
416
|
if (optionShow) {
|
|
@@ -443,6 +431,8 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
443
431
|
break;
|
|
444
432
|
}
|
|
445
433
|
case _KeyCode.default.ESC:
|
|
434
|
+
e.stopPropagation();
|
|
435
|
+
e.nativeEvent.stopImmediatePropagation();
|
|
446
436
|
handleVisibleChange(false);
|
|
447
437
|
break;
|
|
448
438
|
default:
|
|
@@ -488,15 +478,11 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
488
478
|
minWidth: width,
|
|
489
479
|
maxWidth: 600
|
|
490
480
|
}, dropdownStyle), {
|
|
491
|
-
width: (dropdownStyle === null || dropdownStyle === void 0 ? void 0 : dropdownStyle.width) || 'auto'
|
|
492
|
-
zIndex: 1050
|
|
481
|
+
width: (dropdownStyle === null || dropdownStyle === void 0 ? void 0 : dropdownStyle.width) || 'auto'
|
|
493
482
|
}), popperStyle);
|
|
494
483
|
}
|
|
495
484
|
};
|
|
496
485
|
var handleVisibleChange = function handleVisibleChange(visible) {
|
|
497
|
-
if (!visible) {
|
|
498
|
-
initActiveIndex(-1);
|
|
499
|
-
}
|
|
500
486
|
if (visible !== optionShow) {
|
|
501
487
|
props.visible === undefined && setOptionShow(visible);
|
|
502
488
|
onVisibleChange && onVisibleChange(visible);
|
|
@@ -516,7 +502,9 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
516
502
|
}
|
|
517
503
|
}
|
|
518
504
|
});
|
|
519
|
-
return (
|
|
505
|
+
return /*#__PURE__*/_react.default.createElement(_popper.default, (0, _extends2.default)({
|
|
506
|
+
tip: renderContent()
|
|
507
|
+
}, popperProps), renderCityPicker());
|
|
520
508
|
};
|
|
521
509
|
var Select = /*#__PURE__*/_react.default.forwardRef(InternalSelect);
|
|
522
510
|
Select.displayName = 'CityPicker';
|
|
@@ -45,16 +45,12 @@ var InternalOption = function InternalOption(props, ref) {
|
|
|
45
45
|
var handleOnMouseEnter = function handleOnMouseEnter() {
|
|
46
46
|
onChangeActiveIndex && onChangeActiveIndex(index);
|
|
47
47
|
};
|
|
48
|
-
var handleOnMouseLeave = function handleOnMouseLeave() {
|
|
49
|
-
onChangeActiveIndex && onChangeActiveIndex(-1);
|
|
50
|
-
};
|
|
51
48
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
52
49
|
ref: optionRef,
|
|
53
50
|
className: optionCls,
|
|
54
51
|
title: name,
|
|
55
52
|
onClick: handleClick,
|
|
56
|
-
onMouseEnter: handleOnMouseEnter
|
|
57
|
-
onMouseLeave: handleOnMouseLeave
|
|
53
|
+
onMouseEnter: handleOnMouseEnter
|
|
58
54
|
}, typeof itemRender === 'function' ? itemRender(city) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
59
55
|
className: "".concat(selectOptionPrefixCls, "-content")
|
|
60
56
|
}, children), /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -270,6 +270,14 @@
|
|
|
270
270
|
-webkit-box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
|
|
271
271
|
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
|
|
272
272
|
}
|
|
273
|
+
.kd-city-picker-dropdown.kd-popper-bottom-start-in {
|
|
274
|
+
-webkit-animation-name: kdSlideUpIn;
|
|
275
|
+
animation-name: kdSlideUpIn;
|
|
276
|
+
}
|
|
277
|
+
.kd-city-picker-dropdown.kd-popper-bottom-start-out {
|
|
278
|
+
-webkit-animation-name: kdSlideUpOut;
|
|
279
|
+
animation-name: kdSlideUpOut;
|
|
280
|
+
}
|
|
273
281
|
.kd-city-picker-dropdown .kd-tabs-tab-list {
|
|
274
282
|
width: 100%;
|
|
275
283
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
@city-picker-prefix-cls: ~'@{kd-prefix}-city-picker';
|
|
6
6
|
@tabs-prefix-cls: ~'@{kd-prefix}-tabs';
|
|
7
|
+
@popper-prefix-cls: ~'@{kd-prefix}-popper';
|
|
7
8
|
|
|
8
9
|
.@{city-picker-prefix-cls} {
|
|
9
10
|
position: relative;
|
|
@@ -156,6 +157,15 @@
|
|
|
156
157
|
outline: none;
|
|
157
158
|
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
|
|
158
159
|
|
|
160
|
+
&.@{popper-prefix-cls}-bottom-start {
|
|
161
|
+
&-in {
|
|
162
|
+
animation-name: kdSlideUpIn;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&-out {
|
|
166
|
+
animation-name: kdSlideUpOut;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
159
169
|
// 调整tabs样式
|
|
160
170
|
.@{tabs-prefix-cls}-tab-list {
|
|
161
171
|
width: 100%;
|