@kdcloudjs/kdesign 1.8.29 → 1.8.31
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/kdesign-complete.less +897 -83
- package/dist/kdesign.css +650 -7
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +188 -109
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +3 -3
- package/dist/kdesign.min.js +5 -5
- package/dist/kdesign.min.js.map +1 -1
- package/es/anchor/anchor.js +7 -5
- package/es/anchor/style/index.css +14 -0
- package/es/anchor/style/index.less +15 -0
- package/es/button/button.js +4 -2
- package/es/button/group.js +5 -3
- package/es/button/style/index.css +32 -0
- package/es/button/style/index.less +42 -1
- package/es/checkbox/checkbox.js +5 -3
- package/es/checkbox/group.js +4 -2
- package/es/checkbox/style/index.css +38 -1
- package/es/checkbox/style/index.less +56 -15
- package/es/city-picker/city-picker.js +32 -14
- package/es/city-picker/option.js +7 -2
- package/es/city-picker/style/index.css +54 -0
- package/es/city-picker/style/index.less +67 -0
- package/es/collapse/collapse.js +4 -2
- package/es/collapse/style/index.css +24 -0
- package/es/collapse/style/index.less +26 -0
- package/es/color-picker/color-picker.js +6 -4
- package/es/color-picker/style/index.css +129 -4
- package/es/color-picker/style/index.less +174 -29
- package/es/config-provider/ConfigContext.d.ts +4 -0
- package/es/config-provider/ConfigContext.js +2 -0
- package/es/config-provider/compDefaultProps.d.ts +0 -1
- package/es/config-provider/compDefaultProps.js +0 -5
- package/es/config-provider/defaultConfig.d.ts +1 -0
- package/es/config-provider/defaultConfig.js +2 -1
- package/es/dropdown/dropdown.js +4 -2
- package/es/dropdown/menu.js +4 -2
- package/es/dropdown/style/index.css +3 -0
- package/es/dropdown/style/index.less +4 -0
- package/es/image/preview.js +6 -4
- package/es/image/style/index.css +11 -0
- package/es/image/style/index.less +20 -4
- package/es/input/ClearableLabeledInput.d.ts +1 -0
- package/es/input/ClearableLabeledInput.js +6 -4
- package/es/input/TextArea.js +7 -4
- package/es/input/input.js +6 -3
- package/es/input/style/index.css +48 -0
- package/es/input/style/index.less +55 -0
- package/es/link/link.js +4 -2
- package/es/link/style/index.css +11 -0
- package/es/link/style/index.less +14 -0
- package/es/menu/menu.js +4 -2
- package/es/menu/menuItem.js +5 -3
- package/es/menu/style/index.css +10 -0
- package/es/menu/style/index.less +33 -22
- package/es/menu/subMenu.js +6 -4
- package/es/modal/modal.js +4 -2
- package/es/modal/style/index.css +7 -0
- package/es/modal/style/index.less +14 -0
- package/es/pagination/pagination.js +16 -13
- package/es/pagination/style/index.css +72 -0
- package/es/pagination/style/index.less +99 -0
- package/es/qr-code/qr-code.js +4 -2
- package/es/qr-code/style/index.css +3 -0
- package/es/qr-code/style/index.less +7 -3
- package/es/radio/group.js +4 -2
- package/es/radio/radio.js +4 -2
- package/es/radio/style/index.css +38 -0
- package/es/radio/style/index.less +46 -0
- package/es/select/option.js +4 -2
- package/es/select/select.js +8 -6
- package/es/select/style/index.css +61 -0
- package/es/select/style/index.less +87 -0
- package/es/steps/Steps.js +4 -2
- package/es/steps/style/index.css +35 -0
- package/es/steps/style/index.less +59 -5
- package/es/switch/style/index.css +9 -0
- package/es/switch/style/index.less +9 -2
- package/es/switch/switch.js +4 -2
- package/es/tag/style/index.css +7 -0
- package/es/tag/style/index.less +8 -0
- package/es/tag/tag.js +4 -2
- package/es/tree/style/index.css +19 -0
- package/es/tree/style/index.less +27 -0
- package/es/tree/tree.js +4 -2
- package/es/tree/treeNode.js +3 -2
- package/es/upload/style/index.css +24 -1
- package/es/upload/style/index.less +40 -2
- package/es/upload/upload.js +4 -2
- package/lib/anchor/anchor.js +7 -5
- package/lib/anchor/style/index.css +14 -0
- package/lib/anchor/style/index.less +15 -0
- package/lib/button/button.js +4 -2
- package/lib/button/group.js +5 -3
- package/lib/button/style/index.css +32 -0
- package/lib/button/style/index.less +42 -1
- package/lib/checkbox/checkbox.js +5 -3
- package/lib/checkbox/group.js +4 -2
- package/lib/checkbox/style/index.css +38 -1
- package/lib/checkbox/style/index.less +56 -15
- package/lib/city-picker/city-picker.js +32 -14
- package/lib/city-picker/option.js +7 -2
- package/lib/city-picker/style/index.css +54 -0
- package/lib/city-picker/style/index.less +67 -0
- package/lib/collapse/collapse.js +4 -2
- package/lib/collapse/style/index.css +24 -0
- package/lib/collapse/style/index.less +26 -0
- package/lib/color-picker/color-picker.js +6 -4
- package/lib/color-picker/style/index.css +129 -4
- package/lib/color-picker/style/index.less +174 -29
- package/lib/config-provider/ConfigContext.d.ts +4 -0
- package/lib/config-provider/ConfigContext.js +4 -1
- package/lib/config-provider/compDefaultProps.d.ts +0 -1
- package/lib/config-provider/compDefaultProps.js +0 -5
- package/lib/config-provider/defaultConfig.d.ts +1 -0
- package/lib/config-provider/defaultConfig.js +2 -1
- package/lib/dropdown/dropdown.js +4 -2
- package/lib/dropdown/menu.js +4 -2
- package/lib/dropdown/style/index.css +3 -0
- package/lib/dropdown/style/index.less +4 -0
- package/lib/image/preview.js +6 -4
- package/lib/image/style/index.css +11 -0
- package/lib/image/style/index.less +20 -4
- package/lib/input/ClearableLabeledInput.d.ts +1 -0
- package/lib/input/ClearableLabeledInput.js +6 -4
- package/lib/input/TextArea.js +7 -4
- package/lib/input/input.js +6 -3
- package/lib/input/style/index.css +48 -0
- package/lib/input/style/index.less +55 -0
- package/lib/link/link.js +4 -2
- package/lib/link/style/index.css +11 -0
- package/lib/link/style/index.less +14 -0
- package/lib/menu/menu.js +4 -2
- package/lib/menu/menuItem.js +5 -3
- package/lib/menu/style/index.css +10 -0
- package/lib/menu/style/index.less +33 -22
- package/lib/menu/subMenu.js +6 -4
- package/lib/modal/modal.js +4 -2
- package/lib/modal/style/index.css +7 -0
- package/lib/modal/style/index.less +14 -0
- package/lib/pagination/pagination.js +16 -13
- package/lib/pagination/style/index.css +72 -0
- package/lib/pagination/style/index.less +99 -0
- package/lib/qr-code/qr-code.js +4 -2
- package/lib/qr-code/style/index.css +3 -0
- package/lib/qr-code/style/index.less +7 -3
- package/lib/radio/group.js +4 -2
- package/lib/radio/radio.js +4 -2
- package/lib/radio/style/index.css +38 -0
- package/lib/radio/style/index.less +46 -0
- package/lib/select/option.js +4 -2
- package/lib/select/select.js +8 -6
- package/lib/select/style/index.css +61 -0
- package/lib/select/style/index.less +87 -0
- package/lib/steps/Steps.js +4 -2
- package/lib/steps/style/index.css +35 -0
- package/lib/steps/style/index.less +59 -5
- package/lib/switch/style/index.css +9 -0
- package/lib/switch/style/index.less +9 -2
- package/lib/switch/switch.js +4 -2
- package/lib/tag/style/index.css +7 -0
- package/lib/tag/style/index.less +8 -0
- package/lib/tag/tag.js +4 -2
- package/lib/tree/style/index.css +19 -0
- package/lib/tree/style/index.less +27 -0
- package/lib/tree/tree.js +4 -2
- package/lib/tree/treeNode.js +3 -2
- package/lib/upload/style/index.css +24 -1
- package/lib/upload/style/index.less +40 -2
- package/lib/upload/upload.js +4 -2
- package/package.json +1 -1
|
@@ -98,13 +98,13 @@
|
|
|
98
98
|
box-sizing: border-box;
|
|
99
99
|
width: @color-picker-panel-sizing-width;
|
|
100
100
|
padding: 4px 12px 16px;
|
|
101
|
-
background: #
|
|
101
|
+
background: #ffffff;
|
|
102
102
|
box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
|
|
103
103
|
border-radius: 2px;
|
|
104
104
|
transform-origin: top left;
|
|
105
105
|
z-index: @color-picker-panel-z-index;
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
& > div {
|
|
108
108
|
margin-top: 12px;
|
|
109
109
|
}
|
|
110
110
|
|
|
@@ -174,15 +174,15 @@
|
|
|
174
174
|
width: 278px !important;
|
|
175
175
|
box-shadow: none !important;
|
|
176
176
|
|
|
177
|
-
|
|
177
|
+
& > div:last-child {
|
|
178
178
|
padding: 9px 0 4px !important;
|
|
179
179
|
|
|
180
180
|
.flexbox-fix:first-child {
|
|
181
181
|
display: flex;
|
|
182
182
|
flex-direction: row-reverse;
|
|
183
183
|
|
|
184
|
-
|
|
185
|
-
|
|
184
|
+
& > div:first-child {
|
|
185
|
+
& > div {
|
|
186
186
|
width: 28px !important;
|
|
187
187
|
height: 28px !important;
|
|
188
188
|
border-radius: 50% !important;
|
|
@@ -191,44 +191,42 @@
|
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
& > div:last-child {
|
|
196
195
|
.hue-horizontal {
|
|
197
196
|
width: 240px !important;
|
|
198
197
|
height: 12px !important;
|
|
199
198
|
border-radius: 6px !important;
|
|
200
199
|
padding: unset !important;
|
|
201
200
|
|
|
202
|
-
|
|
201
|
+
& > div > div {
|
|
203
202
|
margin-top: 1px;
|
|
204
203
|
}
|
|
205
204
|
}
|
|
206
205
|
|
|
207
|
-
|
|
208
|
-
|
|
206
|
+
& > div:last-child {
|
|
207
|
+
& > div {
|
|
209
208
|
width: 240px !important;
|
|
210
209
|
height: 12px !important;
|
|
211
210
|
margin: unset;
|
|
212
211
|
|
|
213
|
-
|
|
212
|
+
& > div:first-child {
|
|
214
213
|
border-radius: 6px !important;
|
|
215
214
|
}
|
|
216
215
|
|
|
217
|
-
|
|
216
|
+
& > div:nth-child(2) {
|
|
218
217
|
border-radius: 6px !important;
|
|
219
218
|
}
|
|
220
219
|
|
|
221
|
-
|
|
220
|
+
& > div:last-child {
|
|
222
221
|
margin: unset !important;
|
|
223
222
|
|
|
224
|
-
|
|
223
|
+
& > div > div {
|
|
225
224
|
margin-top: 1px;
|
|
226
225
|
}
|
|
227
226
|
}
|
|
228
227
|
}
|
|
229
228
|
}
|
|
230
229
|
}
|
|
231
|
-
|
|
232
230
|
}
|
|
233
231
|
|
|
234
232
|
.flexbox-fix:last-child {
|
|
@@ -237,20 +235,20 @@
|
|
|
237
235
|
}
|
|
238
236
|
|
|
239
237
|
&-no-box {
|
|
240
|
-
|
|
238
|
+
& > div:first-child {
|
|
241
239
|
display: none;
|
|
242
240
|
}
|
|
243
241
|
}
|
|
244
242
|
|
|
245
243
|
&-no-hue {
|
|
246
|
-
|
|
244
|
+
& > div:last-child {
|
|
247
245
|
.flexbox-fix:first-child {
|
|
248
|
-
|
|
249
|
-
|
|
246
|
+
& > div:last-child {
|
|
247
|
+
& > div:first-child {
|
|
250
248
|
display: none;
|
|
251
249
|
}
|
|
252
250
|
|
|
253
|
-
|
|
251
|
+
& > div:last-child {
|
|
254
252
|
margin-top: 8px;
|
|
255
253
|
}
|
|
256
254
|
}
|
|
@@ -259,14 +257,14 @@
|
|
|
259
257
|
}
|
|
260
258
|
|
|
261
259
|
&-no-opacity {
|
|
262
|
-
|
|
260
|
+
& > div:last-child {
|
|
263
261
|
.flexbox-fix:first-child {
|
|
264
|
-
|
|
265
|
-
|
|
262
|
+
& > div:last-child {
|
|
263
|
+
& > div:last-child {
|
|
266
264
|
display: none;
|
|
267
265
|
}
|
|
268
266
|
|
|
269
|
-
|
|
267
|
+
& > div:first-child {
|
|
270
268
|
margin-top: 8px;
|
|
271
269
|
}
|
|
272
270
|
}
|
|
@@ -280,7 +278,7 @@
|
|
|
280
278
|
}
|
|
281
279
|
|
|
282
280
|
.@{color-picker-prefix-cls}-panel-chrome-no-hue.@{color-picker-prefix-cls}-panel-chrome-no-opacity {
|
|
283
|
-
|
|
281
|
+
& > div:last-child {
|
|
284
282
|
display: none;
|
|
285
283
|
}
|
|
286
284
|
}
|
|
@@ -334,10 +332,10 @@
|
|
|
334
332
|
position: absolute;
|
|
335
333
|
width: 64px !important;
|
|
336
334
|
min-width: unset !important;
|
|
337
|
-
background: #
|
|
335
|
+
background: #ffffff;
|
|
338
336
|
right: 0;
|
|
339
337
|
left: unset !important;
|
|
340
|
-
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.
|
|
338
|
+
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
|
|
341
339
|
border-radius: 2px;
|
|
342
340
|
}
|
|
343
341
|
|
|
@@ -441,7 +439,7 @@
|
|
|
441
439
|
margin-right: 0;
|
|
442
440
|
}
|
|
443
441
|
|
|
444
|
-
&:nth-child(-n+12) {
|
|
442
|
+
&:nth-child(-n + 12) {
|
|
445
443
|
margin-top: 0;
|
|
446
444
|
}
|
|
447
445
|
}
|
|
@@ -510,7 +508,7 @@
|
|
|
510
508
|
margin-right: 0;
|
|
511
509
|
}
|
|
512
510
|
|
|
513
|
-
&:nth-child(-n+12) {
|
|
511
|
+
&:nth-child(-n + 12) {
|
|
514
512
|
margin-top: 0;
|
|
515
513
|
}
|
|
516
514
|
}
|
|
@@ -553,3 +551,150 @@
|
|
|
553
551
|
}
|
|
554
552
|
}
|
|
555
553
|
}
|
|
554
|
+
|
|
555
|
+
.@{color-picker-prefix-cls}-rtl {
|
|
556
|
+
direction: rtl;
|
|
557
|
+
.@{color-picker-prefix-cls}-input {
|
|
558
|
+
.@{kd-prefix}-input-prefix {
|
|
559
|
+
margin-right: auto;
|
|
560
|
+
margin-left: 3px;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
&.@{color-picker-prefix-cls}-pop {
|
|
564
|
+
.@{color-picker-prefix-cls}-panel {
|
|
565
|
+
transform-origin: top left;
|
|
566
|
+
&-clear {
|
|
567
|
+
&-box {
|
|
568
|
+
margin-left: 4px;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
&-switch {
|
|
572
|
+
span {
|
|
573
|
+
vertical-align: middle;
|
|
574
|
+
margin-right: 9px;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
&-container {
|
|
579
|
+
display: flex;
|
|
580
|
+
flex-wrap: nowrap;
|
|
581
|
+
|
|
582
|
+
&-select {
|
|
583
|
+
margin-left: 8px;
|
|
584
|
+
margin-right: 0;
|
|
585
|
+
.@{kd-prefix}-select-bordered {
|
|
586
|
+
border-radius: 2px;
|
|
587
|
+
width: @color-picker-panel-select-sizing-width;
|
|
588
|
+
height: @color-picker-panel-select-sizing-height;
|
|
589
|
+
min-height: 28px;
|
|
590
|
+
padding: 0 28px 0 0;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.active-option {
|
|
594
|
+
background-color: @color-picker-panel-option-color-background;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
&-input {
|
|
599
|
+
height: 28px;
|
|
600
|
+
flex: 1 1 auto;
|
|
601
|
+
padding: 0 8px;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
&-input-group {
|
|
605
|
+
display: flex;
|
|
606
|
+
align-items: center;
|
|
607
|
+
|
|
608
|
+
&-item {
|
|
609
|
+
height: 28px;
|
|
610
|
+
flex: 1;
|
|
611
|
+
|
|
612
|
+
&.active {
|
|
613
|
+
z-index: 2;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
&:first-child {
|
|
617
|
+
border-top-right-radius: 0;
|
|
618
|
+
border-bottom-right-radius: 0;
|
|
619
|
+
z-index: 1;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
&:nth-child(2) {
|
|
623
|
+
margin-right: -1px;
|
|
624
|
+
margin-left: -1px;
|
|
625
|
+
border-radius: 0;
|
|
626
|
+
|
|
627
|
+
&:hover {
|
|
628
|
+
z-index: 1;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
&:last-child {
|
|
633
|
+
border-top-left-radius: 0;
|
|
634
|
+
border-bottom-left-radius: 0;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
&-transparent {
|
|
640
|
+
flex: 0 0 54px;
|
|
641
|
+
height: 28px;
|
|
642
|
+
margin-right: 8px;
|
|
643
|
+
margin-left: 0;
|
|
644
|
+
padding: 0;
|
|
645
|
+
text-align: center;
|
|
646
|
+
font-size: @color-picker-panel-alpha-font-size;
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
&-historical-color-box {
|
|
651
|
+
&-title {
|
|
652
|
+
font-size: 12px;
|
|
653
|
+
color: #666666;
|
|
654
|
+
line-height: 18px;
|
|
655
|
+
font-weight: 400;
|
|
656
|
+
margin-bottom: 8px;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
&-container {
|
|
660
|
+
display: grid;
|
|
661
|
+
grid-template-columns: repeat(12, 1fr);
|
|
662
|
+
grid-column-gap: 8px;
|
|
663
|
+
grid-row-gap: 8px;
|
|
664
|
+
|
|
665
|
+
&-ie11 {
|
|
666
|
+
display: flex;
|
|
667
|
+
flex-wrap: wrap;
|
|
668
|
+
|
|
669
|
+
li {
|
|
670
|
+
margin-right: 8px;
|
|
671
|
+
margin-top: 8px;
|
|
672
|
+
|
|
673
|
+
&:nth-child(12n) {
|
|
674
|
+
margin-right: 0;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
&:nth-child(-n + 12) {
|
|
678
|
+
margin-top: 0;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
.@{color-picker-prefix-cls}-panel {
|
|
687
|
+
&-chrome {
|
|
688
|
+
& > div:last-child {
|
|
689
|
+
.flexbox-fix:first-child {
|
|
690
|
+
& > div:first-child {
|
|
691
|
+
& > div {
|
|
692
|
+
margin-right: 4px !important;
|
|
693
|
+
margin-left: 0 !important;
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { LocaleConfigType, CompLangMsgParams, ComponentType } from '../locale';
|
|
3
|
+
export declare const DirectionTypes: ["ltr", "rtl"];
|
|
4
|
+
export declare type DirectionType = typeof DirectionTypes[number];
|
|
3
5
|
interface IntlUniversal {
|
|
4
6
|
getCompLangMsg: (compLangMsgParams: CompLangMsgParams, customGetLangMsg?: (componentName: string, labelName: string, params: any) => any) => any;
|
|
5
7
|
getLangMsg: (componentName: ComponentType | string, labelName: string, params?: any) => string | React.ReactNode[];
|
|
@@ -10,6 +12,7 @@ export interface IConfigProps {
|
|
|
10
12
|
prefixCls?: string;
|
|
11
13
|
localeConfig?: LocaleConfigType;
|
|
12
14
|
locale?: IntlUniversal;
|
|
15
|
+
direction?: DirectionType;
|
|
13
16
|
}
|
|
14
17
|
export interface IContextConfigProps {
|
|
15
18
|
getPrefixCls?: (configPrefixCls?: string, suffixCls?: string, customizePrefixCls?: string) => string;
|
|
@@ -17,6 +20,7 @@ export interface IContextConfigProps {
|
|
|
17
20
|
prefixCls?: string;
|
|
18
21
|
localeConfig?: LocaleConfigType;
|
|
19
22
|
locale: IntlUniversal;
|
|
23
|
+
direction?: DirectionType;
|
|
20
24
|
}
|
|
21
25
|
declare const ConfigContext: import("react").Context<IContextConfigProps>;
|
|
22
26
|
export default ConfigContext;
|
|
@@ -4,9 +4,12 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.default = void 0;
|
|
7
|
+
exports.default = exports.DirectionTypes = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _defaultConfig = _interopRequireDefault(require("./defaultConfig"));
|
|
10
|
+
var _type = require("../_utils/type");
|
|
11
|
+
var DirectionTypes = (0, _type.tuple)('ltr', 'rtl');
|
|
12
|
+
exports.DirectionTypes = DirectionTypes;
|
|
10
13
|
var ConfigContext = (0, _react.createContext)(_defaultConfig.default);
|
|
11
14
|
var _default = ConfigContext;
|
|
12
15
|
exports.default = _default;
|
|
@@ -365,11 +365,6 @@ var compDefaultProps = {
|
|
|
365
365
|
disabled: false,
|
|
366
366
|
draggable: false,
|
|
367
367
|
virtual: true,
|
|
368
|
-
switcherIcon: function switcherIcon() {
|
|
369
|
-
return React.createElement(_index.Icon, {
|
|
370
|
-
type: "arrow-right-solid"
|
|
371
|
-
});
|
|
372
|
-
},
|
|
373
368
|
estimatedItemSize: 32,
|
|
374
369
|
expandOnClickNode: true,
|
|
375
370
|
expandOnFilterNode: false
|
|
@@ -6,5 +6,6 @@ declare const defaultConfig: {
|
|
|
6
6
|
getLangMsg: (componentName: string, labelName: string, params?: any) => string | import("react").ReactNode[];
|
|
7
7
|
getCompLangMsg: (compLangMsgParams: import("../locale").CompLangMsgParams, customGetLangMsg?: ((componentName: string, labelName: string, params: any) => any) | undefined, localeDate?: any) => any;
|
|
8
8
|
};
|
|
9
|
+
direction: "ltr" | "rtl";
|
|
9
10
|
};
|
|
10
11
|
export default defaultConfig;
|
package/lib/dropdown/dropdown.js
CHANGED
|
@@ -33,7 +33,8 @@ var Dropdown = React.forwardRef(function (props, ref) {
|
|
|
33
33
|
var _React$useContext = React.useContext(_ConfigContext.default),
|
|
34
34
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
35
35
|
pkgPrefixCls = _React$useContext.prefixCls,
|
|
36
|
-
userDefaultProps = _React$useContext.compDefaultProps
|
|
36
|
+
userDefaultProps = _React$useContext.compDefaultProps,
|
|
37
|
+
direction = _React$useContext.direction;
|
|
37
38
|
var allProps = (0, _utils.getCompProps)('Dropdown', userDefaultProps, props);
|
|
38
39
|
var menu = allProps.menu,
|
|
39
40
|
disabled = allProps.disabled,
|
|
@@ -144,7 +145,8 @@ var Dropdown = React.forwardRef(function (props, ref) {
|
|
|
144
145
|
popperStyle: innerAnimation ? popperStyle : (0, _extends2.default)({
|
|
145
146
|
animation: 'none'
|
|
146
147
|
}, popperStyle),
|
|
147
|
-
onVisibleChange: handleVisibleChange
|
|
148
|
+
onVisibleChange: handleVisibleChange,
|
|
149
|
+
placement: direction === 'rtl' ? 'bottomRight' : 'bottomLeft'
|
|
148
150
|
});
|
|
149
151
|
return (0, _usePopper.default)(child, menuElement, popperProps);
|
|
150
152
|
});
|
package/lib/dropdown/menu.js
CHANGED
|
@@ -30,7 +30,8 @@ var Menu = React.forwardRef(function (props, ref) {
|
|
|
30
30
|
var _React$useContext = React.useContext(_configProvider.ConfigContext),
|
|
31
31
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
32
32
|
pkgPrefixCls = _React$useContext.prefixCls,
|
|
33
|
-
userDefaultProps = _React$useContext.compDefaultProps
|
|
33
|
+
userDefaultProps = _React$useContext.compDefaultProps,
|
|
34
|
+
direction = _React$useContext.direction;
|
|
34
35
|
var _a = (0, _utils.getCompProps)('DropdownMenu', userDefaultProps, props),
|
|
35
36
|
customPrefixcls = _a.prefixCls,
|
|
36
37
|
children = _a.children,
|
|
@@ -39,6 +40,7 @@ var Menu = React.forwardRef(function (props, ref) {
|
|
|
39
40
|
className = _a.className,
|
|
40
41
|
restProps = __rest(_a, ["prefixCls", "children", "selectable", "selectedKey", "className"]);
|
|
41
42
|
var prefixCls = getPrefixCls(pkgPrefixCls, 'dropdown-menu', customPrefixcls);
|
|
43
|
+
var rtlCls = direction === 'rtl' ? "".concat(prefixCls, "-rtl") : null;
|
|
42
44
|
var cloneItem = function cloneItem(item, index) {
|
|
43
45
|
if (!React.isValidElement(item)) {
|
|
44
46
|
return item;
|
|
@@ -52,7 +54,7 @@ var Menu = React.forwardRef(function (props, ref) {
|
|
|
52
54
|
});
|
|
53
55
|
};
|
|
54
56
|
return React.createElement("ul", (0, _extends2.default)({
|
|
55
|
-
className: (0, _classnames.default)(prefixCls, className),
|
|
57
|
+
className: (0, _classnames.default)(prefixCls, rtlCls, className),
|
|
56
58
|
role: "menu"
|
|
57
59
|
}, restProps, {
|
|
58
60
|
ref: ref
|
package/lib/image/preview.js
CHANGED
|
@@ -29,7 +29,8 @@ var Preview = function Preview(props) {
|
|
|
29
29
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
30
30
|
pkgPrefixCls = _React$useContext.prefixCls,
|
|
31
31
|
userDefaultProps = _React$useContext.compDefaultProps,
|
|
32
|
-
locale = _React$useContext.locale
|
|
32
|
+
locale = _React$useContext.locale,
|
|
33
|
+
direction = _React$useContext.direction;
|
|
33
34
|
var allProps = (0, _utils.getCompProps)('Image', userDefaultProps, props);
|
|
34
35
|
var imageLangMsg = locale.getCompLangMsg({
|
|
35
36
|
componentName: 'Image'
|
|
@@ -46,6 +47,7 @@ var Preview = function Preview(props) {
|
|
|
46
47
|
operations = allProps.operations,
|
|
47
48
|
customPrefixcls = allProps.prefixCls;
|
|
48
49
|
var prefixCls = getPrefixCls(pkgPrefixCls, 'image', customPrefixcls);
|
|
50
|
+
var rtlCls = direction === 'rtl' ? "".concat(prefixCls, "-rtl") : null;
|
|
49
51
|
var _React$useState = React.useState(visible),
|
|
50
52
|
_React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
|
|
51
53
|
show = _React$useState2[0],
|
|
@@ -118,7 +120,7 @@ var Preview = function Preview(props) {
|
|
|
118
120
|
}
|
|
119
121
|
};
|
|
120
122
|
var peviewContainer = React.createElement("div", {
|
|
121
|
-
className: (0, _classnames.default)("".concat(prefixCls, "-preview"), props.className, {
|
|
123
|
+
className: (0, _classnames.default)("".concat(prefixCls, "-preview"), rtlCls, props.className, {
|
|
122
124
|
show: show
|
|
123
125
|
}),
|
|
124
126
|
style: (0, _extends2.default)({}, props.style)
|
|
@@ -136,7 +138,7 @@ var Preview = function Preview(props) {
|
|
|
136
138
|
}, React.createElement("img", (0, _extends2.default)({}, previewImgProps)))), React.createElement("div", {
|
|
137
139
|
className: "".concat(prefixCls, "-preview-action")
|
|
138
140
|
}, props.type !== 'upload' && length && React.createElement(_icon.default, {
|
|
139
|
-
type:
|
|
141
|
+
type: direction === 'rtl' ? 'arrow-right' : 'arrow-left',
|
|
140
142
|
className: (0, _classnames.default)({
|
|
141
143
|
disabled: current <= 0
|
|
142
144
|
}),
|
|
@@ -154,7 +156,7 @@ var Preview = function Preview(props) {
|
|
|
154
156
|
}),
|
|
155
157
|
onClick: handleZoomIn
|
|
156
158
|
}), props.type !== 'upload' && operations, props.type !== 'upload' && length && React.createElement(_icon.default, {
|
|
157
|
-
type:
|
|
159
|
+
type: direction === 'rtl' ? 'arrow-left' : 'arrow-right',
|
|
158
160
|
className: (0, _classnames.default)({
|
|
159
161
|
disabled: current >= length - 1
|
|
160
162
|
}),
|
|
@@ -331,3 +331,14 @@
|
|
|
331
331
|
margin-right: 2px;
|
|
332
332
|
font-size: 18px;
|
|
333
333
|
}
|
|
334
|
+
.kd-image-rtl {
|
|
335
|
+
direction: rtl;
|
|
336
|
+
}
|
|
337
|
+
.kd-image-rtl .kd-image-preview-close {
|
|
338
|
+
left: 18px;
|
|
339
|
+
right: auto;
|
|
340
|
+
}
|
|
341
|
+
.kd-image-rtl .kd-image-preview-action i:not(:first-child) {
|
|
342
|
+
margin-right: 20px;
|
|
343
|
+
margin-left: 0;
|
|
344
|
+
}
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
transition: all 0.2s ease-out;
|
|
45
45
|
background-color: @image-action-background-color;
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
> * {
|
|
48
48
|
color: @image-icon-color;
|
|
49
49
|
cursor: pointer;
|
|
50
50
|
display: inline-block;
|
|
@@ -67,14 +67,14 @@
|
|
|
67
67
|
opacity: 0;
|
|
68
68
|
transform: scale(0.15);
|
|
69
69
|
visibility: hidden;
|
|
70
|
-
transition: all 0.2s cubic-bezier(0.4,0,1,0.6);
|
|
70
|
+
transition: all 0.2s cubic-bezier(0.4, 0, 1, 0.6);
|
|
71
71
|
-webkit-overflow-scrolling: touch;
|
|
72
72
|
|
|
73
73
|
&.show {
|
|
74
74
|
opacity: 1;
|
|
75
75
|
transform: scale(1);
|
|
76
76
|
visibility: visible;
|
|
77
|
-
transition: all 0.2s cubic-bezier(0
|
|
77
|
+
transition: all 0.2s cubic-bezier(0, 0.4, 0.4, 1);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
&-mask {
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
position: absolute;
|
|
209
209
|
right: 40px;
|
|
210
210
|
|
|
211
|
-
|
|
211
|
+
> * {
|
|
212
212
|
display: inline-block;
|
|
213
213
|
margin-left: 20px;
|
|
214
214
|
cursor: pointer;
|
|
@@ -221,3 +221,19 @@
|
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
+
|
|
225
|
+
.@{image-prefix-cls}-rtl {
|
|
226
|
+
direction: rtl;
|
|
227
|
+
.@{image-preview-prefix-cls}-close {
|
|
228
|
+
left: 18px;
|
|
229
|
+
right: auto;
|
|
230
|
+
}
|
|
231
|
+
.@{image-preview-prefix-cls}-action {
|
|
232
|
+
i {
|
|
233
|
+
&:not(:first-child) {
|
|
234
|
+
margin-right: 20px;
|
|
235
|
+
margin-left: 0;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
@@ -42,12 +42,14 @@ var ClearableInput = function ClearableInput(props) {
|
|
|
42
42
|
numberMark = props.numberMark,
|
|
43
43
|
inputCount = props.inputCount,
|
|
44
44
|
count = props.count,
|
|
45
|
-
status = props.status
|
|
45
|
+
status = props.status,
|
|
46
|
+
direction = props.direction;
|
|
46
47
|
var fixRef = (0, _react.useRef)(null);
|
|
47
48
|
var _useState = (0, _react.useState)(false),
|
|
48
49
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
49
50
|
isMouseEnter = _useState2[0],
|
|
50
51
|
setIsMouseEnter = _useState2[1];
|
|
52
|
+
var rtlCls = direction === 'rtl' ? "".concat(prefixCls, "-rtl") : null;
|
|
51
53
|
var mouseEnterHandle = function mouseEnterHandle() {
|
|
52
54
|
setIsMouseEnter(true);
|
|
53
55
|
};
|
|
@@ -101,7 +103,7 @@ var ClearableInput = function ClearableInput(props) {
|
|
|
101
103
|
className: "".concat(prefixCls, "-prefix"),
|
|
102
104
|
onMouseDown: mouseDownHandle
|
|
103
105
|
}, prefix) : null;
|
|
104
|
-
var inputWrapperClasses = (0, _classnames.default)((_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-wrapper"), true), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-wrapper-focused"), focused && !disabled), (0, _defineProperty2.default)(_classNames2, (0, _concat.default)(_context = "".concat(prefixCls, "-wrapper-size-")).call(_context, size), size), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-wrapper-borderless"), borderType === 'none'), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-wrapper-underline"), borderType === 'underline'), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-error"), status === 'error'), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-wrapper-disabled"), disabled), _classNames2), (0, _defineProperty2.default)({}, className, className && !addonBefore && !addonAfter));
|
|
106
|
+
var inputWrapperClasses = (0, _classnames.default)(rtlCls, (_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-wrapper"), true), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-wrapper-focused"), focused && !disabled), (0, _defineProperty2.default)(_classNames2, (0, _concat.default)(_context = "".concat(prefixCls, "-wrapper-size-")).call(_context, size), size), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-wrapper-borderless"), borderType === 'none'), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-wrapper-underline"), borderType === 'underline'), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-error"), status === 'error'), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-wrapper-disabled"), disabled), _classNames2), (0, _defineProperty2.default)({}, className, className && !addonBefore && !addonAfter));
|
|
105
107
|
return _react.default.createElement("span", {
|
|
106
108
|
className: inputWrapperClasses,
|
|
107
109
|
ref: fixRef,
|
|
@@ -125,7 +127,7 @@ var ClearableInput = function ClearableInput(props) {
|
|
|
125
127
|
var addonAfterNode = addonAfter ? _react.default.createElement("span", {
|
|
126
128
|
className: addonClassName
|
|
127
129
|
}, addonAfter) : null;
|
|
128
|
-
var inputGroupClasses = (0, _classnames.default)(className, (_classNames5 = {}, (0, _defineProperty2.default)(_classNames5, "".concat(prefixCls, "-group"), true), (0, _defineProperty2.default)(_classNames5, (0, _concat.default)(_context2 = "".concat(prefixCls, "-group-size-")).call(_context2, size), size), _classNames5));
|
|
130
|
+
var inputGroupClasses = (0, _classnames.default)(className, rtlCls, (_classNames5 = {}, (0, _defineProperty2.default)(_classNames5, "".concat(prefixCls, "-group"), true), (0, _defineProperty2.default)(_classNames5, (0, _concat.default)(_context2 = "".concat(prefixCls, "-group-size-")).call(_context2, size), size), _classNames5));
|
|
129
131
|
return _react.default.createElement("span", {
|
|
130
132
|
className: "".concat(prefixCls, "-group-wrapper")
|
|
131
133
|
}, _react.default.createElement("span", {
|
|
@@ -159,7 +161,7 @@ var ClearableInput = function ClearableInput(props) {
|
|
|
159
161
|
delete wrapperStyle[key];
|
|
160
162
|
}
|
|
161
163
|
}
|
|
162
|
-
var textAreaWrapperClasses = (0, _classnames.default)(className, (0, _defineProperty2.default)({}, "".concat(prefixCls, "-wrapper-textarea"), true));
|
|
164
|
+
var textAreaWrapperClasses = (0, _classnames.default)(className, rtlCls, (0, _defineProperty2.default)({}, "".concat(prefixCls, "-wrapper-textarea"), true));
|
|
163
165
|
return _react.default.createElement("span", {
|
|
164
166
|
className: textAreaWrapperClasses,
|
|
165
167
|
style: wrapperStyle,
|