@qn-pandora/pandora-component 2.1.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +25 -0
- package/CHANGELOG.md +11 -0
- package/es/components/AutoComplete/style.css +17 -13
- package/es/components/Button/style.css +2 -3
- package/es/components/Button/style.less +0 -1
- package/es/components/Card/index.js +2 -1
- package/es/components/CheckTransformList/Item/index.js +1 -1
- package/es/components/CheckTransformList/style.css +25 -17
- package/es/components/CheckboxList/index.d.ts +1 -0
- package/es/components/CheckboxList/index.js +3 -2
- package/es/components/Collapse/index.js +2 -1
- package/es/components/CollapsiblePanel/index.d.ts +2 -2
- package/es/components/ConfigProvider/index.js +2 -1
- package/es/components/DateTimePicker/Base/index.js +2 -2
- package/es/components/DateTimePicker/Base/style.css +13 -13
- package/es/components/DateTimePicker/BaseMobile/index.d.ts +1 -0
- package/es/components/DateTimePicker/BaseMobile/index.js +2 -2
- package/es/components/DateTimePicker/DisplayInput/style.css +16 -16
- package/es/components/DateTimePicker/index.d.ts +6 -1
- package/es/components/DateTimePicker/index.js +2 -2
- package/es/components/Input/NumberInput/index.d.ts +29 -0
- package/es/components/Input/NumberInput/index.js +116 -0
- package/es/components/Input/index.d.ts +1 -0
- package/es/components/Input/index.js +4 -1
- package/es/components/Input/style.css +19 -16
- package/es/components/Input/style.less +4 -0
- package/es/components/InputNumber/style.css +6 -6
- package/es/components/Menu/index.d.ts +2 -2
- package/es/components/NameLimiter/index.d.ts +3 -13
- package/es/components/NameLimiter/index.js +30 -39
- package/es/components/NameLimiter/style.css +9 -1
- package/es/components/NameLimiter/style.less +10 -1
- package/es/components/OptionList/index.js +2 -1
- package/es/components/RangeInput/style.css +22 -22
- package/es/components/RemarkName/index.d.ts +0 -2
- package/es/components/RemarkName/index.js +2 -4
- package/es/components/RemarkName/style.css +9 -5
- package/es/components/RemarkName/style.less +0 -5
- package/es/components/Selector/style.css +17 -13
- package/es/components/Selector/style.less +7 -3
- package/es/components/SolidRadioGroup/index.d.ts +3 -2
- package/es/components/SolidRadioGroup/index.js +7 -4
- package/es/components/SolidRadioGroup/style.css +13 -6
- package/es/components/SolidRadioGroup/style.less +16 -3
- package/es/components/Steps/index.js +2 -1
- package/es/components/Table/index.d.ts +9 -24
- package/es/components/Table/index.js +40 -8
- package/es/components/Table/style.css +11 -8
- package/es/components/Table/style.less +6 -0
- package/es/components/TagList/Tag/style.css +3 -3
- package/es/components/TagList/Tag/style.less +3 -3
- package/es/components/TagList/index.js +3 -2
- package/es/components/TagList/style.css +3 -3
- package/es/components/TagList/style.less +8 -8
- package/es/index.css +1804 -1784
- package/es/index.d.ts +2 -2
- package/es/index.js +1 -1
- package/es/index.less +2 -2
- package/es/style/theme.less +9 -7
- package/lib/components/AutoComplete/style.css +17 -13
- package/lib/components/Button/style.css +2 -3
- package/lib/components/Button/style.less +0 -1
- package/lib/components/Card/index.js +1 -1
- package/lib/components/CheckTransformList/Item/index.js +1 -1
- package/lib/components/CheckTransformList/style.css +25 -17
- package/lib/components/CheckboxList/index.d.ts +1 -0
- package/lib/components/CheckboxList/index.js +3 -2
- package/lib/components/Collapse/index.js +1 -1
- package/lib/components/CollapsiblePanel/index.d.ts +2 -2
- package/lib/components/ConfigProvider/index.js +1 -1
- package/lib/components/DateTimePicker/Base/index.js +2 -2
- package/lib/components/DateTimePicker/Base/style.css +13 -13
- package/lib/components/DateTimePicker/BaseMobile/index.d.ts +1 -0
- package/lib/components/DateTimePicker/BaseMobile/index.js +2 -2
- package/lib/components/DateTimePicker/DisplayInput/style.css +16 -16
- package/lib/components/DateTimePicker/index.d.ts +6 -1
- package/lib/components/DateTimePicker/index.js +2 -2
- package/lib/components/Input/NumberInput/index.d.ts +29 -0
- package/lib/components/Input/NumberInput/index.js +121 -0
- package/lib/components/Input/index.d.ts +1 -0
- package/lib/components/Input/index.js +3 -1
- package/lib/components/Input/style.css +19 -16
- package/lib/components/Input/style.less +4 -0
- package/lib/components/InputNumber/style.css +6 -6
- package/lib/components/Menu/index.d.ts +2 -2
- package/lib/components/NameLimiter/index.d.ts +3 -13
- package/lib/components/NameLimiter/index.js +30 -38
- package/lib/components/NameLimiter/style.css +9 -1
- package/lib/components/NameLimiter/style.less +10 -1
- package/lib/components/OptionList/index.js +1 -1
- package/lib/components/RangeInput/style.css +22 -22
- package/lib/components/RemarkName/index.d.ts +0 -2
- package/lib/components/RemarkName/index.js +2 -4
- package/lib/components/RemarkName/style.css +9 -5
- package/lib/components/RemarkName/style.less +0 -5
- package/lib/components/Selector/style.css +17 -13
- package/lib/components/Selector/style.less +7 -3
- package/lib/components/SolidRadioGroup/index.d.ts +3 -2
- package/lib/components/SolidRadioGroup/index.js +6 -3
- package/lib/components/SolidRadioGroup/style.css +13 -6
- package/lib/components/SolidRadioGroup/style.less +16 -3
- package/lib/components/Steps/index.js +1 -1
- package/lib/components/Table/index.d.ts +9 -24
- package/lib/components/Table/index.js +39 -7
- package/lib/components/Table/style.css +11 -8
- package/lib/components/Table/style.less +6 -0
- package/lib/components/TagList/Tag/style.css +3 -3
- package/lib/components/TagList/Tag/style.less +3 -3
- package/lib/components/TagList/index.js +2 -2
- package/lib/components/TagList/style.css +3 -3
- package/lib/components/TagList/style.less +8 -8
- package/lib/index.css +116 -96
- package/lib/index.d.ts +2 -2
- package/lib/index.js +0 -1
- package/lib/index.less +2 -2
- package/lib/style/theme.less +9 -7
- package/package.json +23 -23
- package/es/components/NameLimiter/transformer.d.ts +0 -6
- package/es/components/NameLimiter/transformer.js +0 -84
- package/lib/components/NameLimiter/transformer.d.ts +0 -6
- package/lib/components/NameLimiter/transformer.js +0 -91
@@ -1,7 +1,16 @@
|
|
1
1
|
@import 'antd/lib/tooltip/style/index.less';
|
2
2
|
@import '../../style/theme.less';
|
3
3
|
|
4
|
-
.@{sdk-prefix}-name-
|
4
|
+
.@{sdk-prefix}-name-limit {
|
5
|
+
max-width: 100%;
|
6
|
+
display: inline-block;
|
7
|
+
vertical-align: top;
|
8
|
+
white-space: nowrap;
|
9
|
+
text-overflow: ellipsis;
|
10
|
+
overflow: hidden;
|
11
|
+
}
|
12
|
+
|
13
|
+
.@{sdk-prefix}-name-limit-tooltip {
|
5
14
|
.@{ant-prefix}-tooltip-inner {
|
6
15
|
max-width: 400px !important;
|
7
16
|
max-height: 200px !important;
|
@@ -28,7 +28,7 @@ export * from './constants';
|
|
28
28
|
/**
|
29
29
|
* 资源列表页面表格中操作列表
|
30
30
|
*/
|
31
|
-
|
31
|
+
function OptionList(props) {
|
32
32
|
var mode = props.mode, _a = props.options, options = _a === void 0 ? [] : _a, placement = props.placement, className = props.className, popupClassName = props.popupClassName, other = __rest(props, ["mode", "options", "placement", "className", "popupClassName"]);
|
33
33
|
var globalShowMode = mode === 'popover' ? EShowMode.POPOVER : EShowMode.INLINE;
|
34
34
|
var showingOptions = options.filter(function (op) { return !op.hidden; });
|
@@ -51,3 +51,4 @@ export default function OptionList(props) {
|
|
51
51
|
OptionList.EShowMode = EShowMode;
|
52
52
|
OptionList.InlineOptionList = InlineOptionList;
|
53
53
|
OptionList.PopoverOptionList = PopoverOptionList;
|
54
|
+
export default OptionList;
|
@@ -13,7 +13,7 @@
|
|
13
13
|
line-height: 1.5715;
|
14
14
|
background-color: transparent;
|
15
15
|
background-image: none;
|
16
|
-
border: 1px solid #
|
16
|
+
border: 1px solid #bfbfbf;
|
17
17
|
border-radius: 2px;
|
18
18
|
-webkit-transition: all 0.3s;
|
19
19
|
transition: all 0.3s;
|
@@ -64,7 +64,7 @@
|
|
64
64
|
opacity: 1;
|
65
65
|
}
|
66
66
|
.ant-input-affix-wrapper-disabled:hover {
|
67
|
-
border-color: #
|
67
|
+
border-color: #bfbfbf;
|
68
68
|
border-right-width: 1px !important;
|
69
69
|
}
|
70
70
|
.ant-input-affix-wrapper[disabled] {
|
@@ -74,7 +74,7 @@
|
|
74
74
|
opacity: 1;
|
75
75
|
}
|
76
76
|
.ant-input-affix-wrapper[disabled]:hover {
|
77
|
-
border-color: #
|
77
|
+
border-color: #bfbfbf;
|
78
78
|
border-right-width: 1px !important;
|
79
79
|
}
|
80
80
|
.ant-input-affix-wrapper-borderless,
|
@@ -98,7 +98,7 @@ textarea.ant-input-affix-wrapper {
|
|
98
98
|
transition: all 0.3s, height 0s;
|
99
99
|
}
|
100
100
|
.ant-input-affix-wrapper-lg {
|
101
|
-
padding:
|
101
|
+
padding: 6.5px 11px;
|
102
102
|
font-size: 16px;
|
103
103
|
}
|
104
104
|
.ant-input-affix-wrapper-sm {
|
@@ -209,7 +209,7 @@ textarea.ant-input-affix-wrapper {
|
|
209
209
|
line-height: 1.5715;
|
210
210
|
background-color: transparent;
|
211
211
|
background-image: none;
|
212
|
-
border: 1px solid #
|
212
|
+
border: 1px solid #bfbfbf;
|
213
213
|
border-radius: 2px;
|
214
214
|
-webkit-transition: all 0.3s;
|
215
215
|
transition: all 0.3s;
|
@@ -257,7 +257,7 @@ textarea.ant-input-affix-wrapper {
|
|
257
257
|
opacity: 1;
|
258
258
|
}
|
259
259
|
.ant-input-disabled:hover {
|
260
|
-
border-color: #
|
260
|
+
border-color: #bfbfbf;
|
261
261
|
border-right-width: 1px !important;
|
262
262
|
}
|
263
263
|
.ant-input[disabled] {
|
@@ -267,7 +267,7 @@ textarea.ant-input-affix-wrapper {
|
|
267
267
|
opacity: 1;
|
268
268
|
}
|
269
269
|
.ant-input[disabled]:hover {
|
270
|
-
border-color: #
|
270
|
+
border-color: #bfbfbf;
|
271
271
|
border-right-width: 1px !important;
|
272
272
|
}
|
273
273
|
.ant-input-borderless,
|
@@ -291,7 +291,7 @@ textarea.ant-input {
|
|
291
291
|
transition: all 0.3s, height 0s;
|
292
292
|
}
|
293
293
|
.ant-input-lg {
|
294
|
-
padding:
|
294
|
+
padding: 6.5px 11px;
|
295
295
|
font-size: 16px;
|
296
296
|
}
|
297
297
|
.ant-input-sm {
|
@@ -373,7 +373,7 @@ textarea.ant-input {
|
|
373
373
|
font-size: 14px;
|
374
374
|
text-align: center;
|
375
375
|
background-color: #fafafa;
|
376
|
-
border: 1px solid #
|
376
|
+
border: 1px solid #bfbfbf;
|
377
377
|
border-radius: 2px;
|
378
378
|
-webkit-transition: all 0.3s;
|
379
379
|
transition: all 0.3s;
|
@@ -427,7 +427,7 @@ textarea.ant-input {
|
|
427
427
|
}
|
428
428
|
.ant-input-group-lg .ant-input,
|
429
429
|
.ant-input-group-lg > .ant-input-group-addon {
|
430
|
-
padding:
|
430
|
+
padding: 6.5px 11px;
|
431
431
|
font-size: 16px;
|
432
432
|
}
|
433
433
|
.ant-input-group-sm .ant-input,
|
@@ -435,7 +435,7 @@ textarea.ant-input {
|
|
435
435
|
padding: 1px 7px;
|
436
436
|
}
|
437
437
|
.ant-input-group-lg .ant-select-single .ant-select-selector {
|
438
|
-
height:
|
438
|
+
height: 40px;
|
439
439
|
}
|
440
440
|
.ant-input-group-sm .ant-select-single .ant-select-selector {
|
441
441
|
height: 26px;
|
@@ -562,12 +562,12 @@ textarea.ant-input {
|
|
562
562
|
border-radius: 0 2px 2px 0;
|
563
563
|
}
|
564
564
|
.ant-input-group-rtl .ant-input-group-addon:first-child {
|
565
|
-
border-right: 1px solid #
|
565
|
+
border-right: 1px solid #bfbfbf;
|
566
566
|
border-left: 0;
|
567
567
|
}
|
568
568
|
.ant-input-group-rtl .ant-input-group-addon:last-child {
|
569
569
|
border-right: 0;
|
570
|
-
border-left: 1px solid #
|
570
|
+
border-left: 1px solid #bfbfbf;
|
571
571
|
}
|
572
572
|
.ant-input-group-rtl.ant-input-group > .ant-input:last-child,
|
573
573
|
.ant-input-group-rtl.ant-input-group-addon:last-child {
|
@@ -624,7 +624,7 @@ textarea.ant-input {
|
|
624
624
|
height: 32px;
|
625
625
|
}
|
626
626
|
.ant-input[type='color'].ant-input-lg {
|
627
|
-
height:
|
627
|
+
height: 40px;
|
628
628
|
}
|
629
629
|
.ant-input[type='color'].ant-input-sm {
|
630
630
|
height: 26px;
|
@@ -679,7 +679,7 @@ textarea.ant-input {
|
|
679
679
|
z-index: 1;
|
680
680
|
}
|
681
681
|
.ant-input-search-large .ant-input-search-button {
|
682
|
-
height:
|
682
|
+
height: 40px;
|
683
683
|
}
|
684
684
|
.ant-input-search-small .ant-input-search-button {
|
685
685
|
height: 26px;
|
@@ -738,7 +738,7 @@ textarea.ant-input {
|
|
738
738
|
height: 32px;
|
739
739
|
}
|
740
740
|
.ant-input-lg {
|
741
|
-
height:
|
741
|
+
height: 40px;
|
742
742
|
}
|
743
743
|
.ant-input-sm {
|
744
744
|
height: 26px;
|
@@ -764,7 +764,7 @@ textarea.ant-input {
|
|
764
764
|
line-height: 1.5715;
|
765
765
|
background-color: transparent;
|
766
766
|
background-image: none;
|
767
|
-
border: 1px solid #
|
767
|
+
border: 1px solid #bfbfbf;
|
768
768
|
-webkit-transition: all 0.3s;
|
769
769
|
transition: all 0.3s;
|
770
770
|
display: inline-block;
|
@@ -817,7 +817,7 @@ textarea.ant-input {
|
|
817
817
|
opacity: 1;
|
818
818
|
}
|
819
819
|
.ant-input-number-disabled:hover {
|
820
|
-
border-color: #
|
820
|
+
border-color: #bfbfbf;
|
821
821
|
border-right-width: 1px !important;
|
822
822
|
}
|
823
823
|
.ant-input-number[disabled] {
|
@@ -827,7 +827,7 @@ textarea.ant-input {
|
|
827
827
|
opacity: 1;
|
828
828
|
}
|
829
829
|
.ant-input-number[disabled]:hover {
|
830
|
-
border-color: #
|
830
|
+
border-color: #bfbfbf;
|
831
831
|
border-right-width: 1px !important;
|
832
832
|
}
|
833
833
|
.ant-input-number-borderless,
|
@@ -851,7 +851,7 @@ textarea.ant-input-number {
|
|
851
851
|
transition: all 0.3s, height 0s;
|
852
852
|
}
|
853
853
|
.ant-input-number-lg {
|
854
|
-
padding:
|
854
|
+
padding: 6.5px 11px;
|
855
855
|
font-size: 16px;
|
856
856
|
}
|
857
857
|
.ant-input-number-sm {
|
@@ -950,7 +950,7 @@ textarea.ant-input-number {
|
|
950
950
|
opacity: 1;
|
951
951
|
}
|
952
952
|
.ant-input-number-disabled:hover {
|
953
|
-
border-color: #
|
953
|
+
border-color: #bfbfbf;
|
954
954
|
border-right-width: 1px !important;
|
955
955
|
}
|
956
956
|
.ant-input-number-disabled .ant-input-number-input {
|
@@ -1000,7 +1000,7 @@ textarea.ant-input-number {
|
|
1000
1000
|
font-size: 16px;
|
1001
1001
|
}
|
1002
1002
|
.ant-input-number-lg input {
|
1003
|
-
height:
|
1003
|
+
height: 38px;
|
1004
1004
|
}
|
1005
1005
|
.ant-input-number-sm {
|
1006
1006
|
padding: 0;
|
@@ -1,17 +1,15 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import { SDK_PREFIX } from '../../constants/style';
|
3
2
|
import NameLimiter from '../../components/NameLimiter';
|
4
3
|
export var IgnoreDesString = '由logkit';
|
5
4
|
/**
|
6
5
|
* 资源名称展示位'名称(备注)'
|
7
6
|
*/
|
8
7
|
export default function RemarkName(props) {
|
9
|
-
var name = props.name, remark = props.remark
|
8
|
+
var name = props.name, remark = props.remark;
|
10
9
|
var getTooltip = function () {
|
11
10
|
return remark && remark !== name && !remark.startsWith(IgnoreDesString)
|
12
11
|
? name + "(" + (remark && remark.trim()) + ")"
|
13
12
|
: '';
|
14
13
|
};
|
15
|
-
return
|
16
|
-
React.createElement(NameLimiter, { name: name, title: getTooltip(), length: length })));
|
14
|
+
return React.createElement(NameLimiter, { name: name, title: getTooltip() });
|
17
15
|
}
|
@@ -262,7 +262,15 @@
|
|
262
262
|
.ant-tooltip-rtl .ant-tooltip-inner {
|
263
263
|
text-align: right;
|
264
264
|
}
|
265
|
-
.pandora-sdk-name-
|
265
|
+
.pandora-sdk-name-limit {
|
266
|
+
max-width: 100%;
|
267
|
+
display: inline-block;
|
268
|
+
vertical-align: top;
|
269
|
+
white-space: nowrap;
|
270
|
+
text-overflow: ellipsis;
|
271
|
+
overflow: hidden;
|
272
|
+
}
|
273
|
+
.pandora-sdk-name-limit-tooltip .ant-tooltip-inner {
|
266
274
|
max-width: 400px !important;
|
267
275
|
max-height: 200px !important;
|
268
276
|
overflow: auto;
|
@@ -275,7 +283,3 @@
|
|
275
283
|
.ant-btn-sm {
|
276
284
|
padding: 0 7px;
|
277
285
|
}
|
278
|
-
.pandora-sdk-remark-name {
|
279
|
-
word-break: break-all;
|
280
|
-
white-space: nowrap;
|
281
|
-
}
|
@@ -211,7 +211,7 @@
|
|
211
211
|
}
|
212
212
|
.ant-select-disabled.ant-select-multiple .ant-select-selection-item {
|
213
213
|
color: #bfbfbf;
|
214
|
-
border-color: #
|
214
|
+
border-color: #bfbfbf;
|
215
215
|
cursor: not-allowed;
|
216
216
|
}
|
217
217
|
.ant-select-multiple .ant-select-selection-item-content {
|
@@ -299,20 +299,20 @@
|
|
299
299
|
transition: all 0.3s;
|
300
300
|
}
|
301
301
|
.ant-select-multiple.ant-select-lg .ant-select-selector::after {
|
302
|
-
line-height:
|
302
|
+
line-height: 32px;
|
303
303
|
}
|
304
304
|
.ant-select-multiple.ant-select-lg .ant-select-selection-item {
|
305
|
-
height:
|
306
|
-
line-height:
|
305
|
+
height: 32px;
|
306
|
+
line-height: 30px;
|
307
307
|
}
|
308
308
|
.ant-select-multiple.ant-select-lg .ant-select-selection-search {
|
309
|
-
height:
|
310
|
-
line-height:
|
309
|
+
height: 32px;
|
310
|
+
line-height: 32px;
|
311
311
|
}
|
312
312
|
.ant-select-multiple.ant-select-lg .ant-select-selection-search-input,
|
313
313
|
.ant-select-multiple.ant-select-lg .ant-select-selection-search-mirror {
|
314
|
-
height:
|
315
|
-
line-height:
|
314
|
+
height: 32px;
|
315
|
+
line-height: 30px;
|
316
316
|
}
|
317
317
|
.ant-select-multiple.ant-select-sm .ant-select-selector::after {
|
318
318
|
line-height: 18px;
|
@@ -364,7 +364,7 @@
|
|
364
364
|
.ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
365
365
|
position: relative;
|
366
366
|
background-color: #ffffff;
|
367
|
-
border: 1px solid #
|
367
|
+
border: 1px solid #bfbfbf;
|
368
368
|
border-radius: 2px;
|
369
369
|
-webkit-transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
370
370
|
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
@@ -1042,16 +1042,20 @@
|
|
1042
1042
|
.pandora-sdk-selector-dropdown .ant-select-dropdown-menu::-webkit-scrollbar-corner {
|
1043
1043
|
background: transparent;
|
1044
1044
|
}
|
1045
|
-
.pandora-sdk-selector-dropdown .ant-select-
|
1045
|
+
.pandora-sdk-selector-dropdown .ant-select-item-option-disabled {
|
1046
1046
|
color: #d9d9d9 !important;
|
1047
1047
|
}
|
1048
|
-
.pandora-sdk-selector-dropdown .ant-select-
|
1048
|
+
.pandora-sdk-selector-dropdown .ant-select-item-option-selected {
|
1049
1049
|
color: #2c6dd2;
|
1050
|
+
font-weight: 400;
|
1050
1051
|
}
|
1051
|
-
.pandora-sdk-selector-dropdown .ant-select-
|
1052
|
+
.pandora-sdk-selector-dropdown .ant-select-item-option-selected::after {
|
1052
1053
|
color: #2c6dd2 !important;
|
1053
1054
|
}
|
1054
|
-
.pandora-sdk-selector-dropdown .ant-select-
|
1055
|
+
.pandora-sdk-selector-dropdown .ant-select-item-option:hover {
|
1056
|
+
color: #2c6dd2;
|
1057
|
+
}
|
1058
|
+
.pandora-sdk-selector-dropdown .ant-select-item-group {
|
1055
1059
|
color: #d9d9d9;
|
1056
1060
|
}
|
1057
1061
|
.pandora-sdk-selector-dropdown.pandora-sdk-selector-no-ellipsis .ant-select-dropdown-menu {
|
@@ -56,17 +56,21 @@
|
|
56
56
|
margin: 0;
|
57
57
|
.scrollbar();
|
58
58
|
}
|
59
|
-
.@{ant-prefix}-select-
|
59
|
+
.@{ant-prefix}-select-item-option-disabled {
|
60
60
|
color: @font-disable-color!important;
|
61
61
|
}
|
62
|
-
.@{ant-prefix}-select-
|
62
|
+
.@{ant-prefix}-select-item-option-selected {
|
63
63
|
color: @theme-color;
|
64
|
+
font-weight: 400;
|
64
65
|
&::after {
|
65
66
|
color: @theme-color!important;
|
66
67
|
}
|
67
68
|
}
|
69
|
+
.@{ant-prefix}-select-item-option:hover {
|
70
|
+
color: @theme-color;
|
71
|
+
}
|
68
72
|
|
69
|
-
.@{ant-prefix}-select-
|
73
|
+
.@{ant-prefix}-select-item-group {
|
70
74
|
color: @font-disable-color;
|
71
75
|
}
|
72
76
|
&.@{sdk-prefix}-selector-no-ellipsis {
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
|
2
|
+
declare type BasicType = string | number | boolean;
|
3
|
+
export interface IOption<T = BasicType> {
|
3
4
|
/**
|
4
5
|
* 选项的值
|
5
6
|
*/
|
@@ -13,7 +14,7 @@ export interface IOption<T = string> {
|
|
13
14
|
*/
|
14
15
|
disabled?: boolean;
|
15
16
|
}
|
16
|
-
export interface ISolidRadioGroupProps<T =
|
17
|
+
export interface ISolidRadioGroupProps<T = BasicType> {
|
17
18
|
/**
|
18
19
|
* 当前值
|
19
20
|
*/
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import { isArray } from 'lodash';
|
2
|
+
import { isArray, isUndefined } from 'lodash';
|
3
3
|
import Radio from 'antd/es/radio';
|
4
4
|
import classnames from 'classnames';
|
5
5
|
import { SDK_PREFIX } from '../../constants/style';
|
6
6
|
var useCallback = React.useCallback, useMemo = React.useMemo;
|
7
7
|
export default function SolidRadioGroup(props) {
|
8
|
-
var className = props.className, buttonClassName = props.buttonClassName, value = props.value, size = props.size, onChange = props.onChange, children = props.children, _a = props.options, options = _a === void 0 ? {} : _a;
|
8
|
+
var className = props.className, buttonClassName = props.buttonClassName, value = props.value, size = props.size, onChange = props.onChange, children = props.children, disabled = props.disabled, _a = props.options, options = _a === void 0 ? {} : _a;
|
9
9
|
var handleChange = useCallback(function (e) {
|
10
10
|
if (onChange) {
|
11
11
|
onChange(e.target.value);
|
@@ -19,8 +19,11 @@ export default function SolidRadioGroup(props) {
|
|
19
19
|
return (React.createElement(Radio.Group, { className: classnames(SDK_PREFIX + "-solid-radio-group", className), value: value, onChange: handleChange, size: size },
|
20
20
|
radioOptions.map(function (option) {
|
21
21
|
var _a;
|
22
|
-
var value = option.value, item = option.item
|
23
|
-
|
22
|
+
var value = option.value, item = option.item;
|
23
|
+
var disableRealVal = isUndefined(option.disabled)
|
24
|
+
? disabled
|
25
|
+
: option.disabled;
|
26
|
+
return (React.createElement(Radio.Button, { key: value.toString(), value: value, disabled: disableRealVal, className: classnames((_a = {}, _a[SDK_PREFIX + "-solid-radio-item"] = !disableRealVal, _a), buttonClassName) }, item));
|
24
27
|
}),
|
25
28
|
children));
|
26
29
|
}
|
@@ -204,9 +204,9 @@ span.ant-radio + * {
|
|
204
204
|
height: 100%;
|
205
205
|
}
|
206
206
|
.ant-radio-group-large .ant-radio-button-wrapper {
|
207
|
-
height:
|
207
|
+
height: 40px;
|
208
208
|
font-size: 16px;
|
209
|
-
line-height:
|
209
|
+
line-height: 38px;
|
210
210
|
}
|
211
211
|
.ant-radio-group-small .ant-radio-button-wrapper {
|
212
212
|
height: 26px;
|
@@ -386,19 +386,26 @@ span.ant-radio + * {
|
|
386
386
|
}
|
387
387
|
.pandora-sdk-solid-radio-group .pandora-sdk-solid-radio-item {
|
388
388
|
padding: 0 12px;
|
389
|
-
border-color: #
|
389
|
+
border-color: #bfbfbf !important;
|
390
390
|
color: #333;
|
391
391
|
text-align: center;
|
392
392
|
}
|
393
393
|
.pandora-sdk-solid-radio-group .pandora-sdk-solid-radio-item:hover {
|
394
394
|
background: #fafafa;
|
395
|
-
border-color: #
|
395
|
+
border-color: #bfbfbf;
|
396
396
|
}
|
397
397
|
.pandora-sdk-solid-radio-group .ant-radio-button-wrapper-checked,
|
398
398
|
.pandora-sdk-solid-radio-group .ant-radio-button-wrapper-checked:hover {
|
399
399
|
border-color: #2c6dd2 !important;
|
400
400
|
color: #2c6dd2 !important;
|
401
401
|
}
|
402
|
-
.pandora-sdk-solid-radio-group .ant-radio-button-wrapper-checked
|
403
|
-
|
402
|
+
.pandora-sdk-solid-radio-group .ant-radio-button-wrapper-checked.ant-radio-button-wrapper-disabled {
|
403
|
+
border-color: #bfbfbf !important;
|
404
|
+
color: #333 !important;
|
405
|
+
}
|
406
|
+
.pandora-sdk-solid-radio-group .ant-radio-button-wrapper:not(:first-child)::before {
|
407
|
+
background-color: #bfbfbf;
|
408
|
+
}
|
409
|
+
.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled)::before {
|
410
|
+
background-color: #2c6dd2 !important;
|
404
411
|
}
|
@@ -18,9 +18,22 @@
|
|
18
18
|
color: @theme-color !important;
|
19
19
|
}
|
20
20
|
|
21
|
-
.@{ant-prefix}-radio-button-wrapper-checked {
|
22
|
-
|
23
|
-
|
21
|
+
.@{ant-prefix}-radio-button-wrapper-checked.@{ant-prefix}-radio-button-wrapper-disabled {
|
22
|
+
border-color: @input-border-color !important;
|
23
|
+
color: @heading-color!important;
|
24
|
+
}
|
25
|
+
|
26
|
+
.@{ant-prefix}-radio-button-wrapper {
|
27
|
+
&:not(:first-child) {
|
28
|
+
&::before {
|
29
|
+
background-color: @input-border-color;
|
30
|
+
}
|
24
31
|
}
|
25
32
|
}
|
26
33
|
}
|
34
|
+
|
35
|
+
.@{ant-prefix}-radio-button-wrapper-checked {
|
36
|
+
&:not(.@{ant-prefix}-radio-button-wrapper-disabled)::before {
|
37
|
+
background-color: @theme-color !important;
|
38
|
+
}
|
39
|
+
}
|
@@ -44,7 +44,7 @@ import Step from './Step';
|
|
44
44
|
import ControlButton from './ControlButton';
|
45
45
|
import { Provider } from './context';
|
46
46
|
var useMemo = React.useMemo, useState = React.useState, useCallback = React.useCallback;
|
47
|
-
|
47
|
+
function Steps(props) {
|
48
48
|
var _a = __read(useState(0), 2), stepLength = _a[0], setStepLength = _a[1];
|
49
49
|
var current = props.current, _b = props.steps, steps = _b === void 0 ? [] : _b, className = props.className, children = props.children, otherProps = __rest(props, ["current", "steps", "className", "children"]);
|
50
50
|
var handleAddSteps = useCallback(function () {
|
@@ -70,3 +70,4 @@ export default function Steps(props) {
|
|
70
70
|
}
|
71
71
|
Steps.Step = Step;
|
72
72
|
Steps.ControlButton = ControlButton;
|
73
|
+
export default Steps;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { TableProps } from 'antd/es/table';
|
3
|
+
import { TableRowSelection } from 'antd/es/table/interface';
|
3
4
|
/**
|
4
5
|
* 表格提供自定义多选, 通过 rowSelection对象的selectedRowKeys和onChange来控制多选的状态
|
5
6
|
* 需要注意的是, 当在外部进行增删改或者外部需要控制选择状态时, 例如删除之后清空全选状态, 需要受控
|
@@ -17,7 +18,7 @@ export interface IOptionItem {
|
|
17
18
|
/**
|
18
19
|
* 禁用当前操作
|
19
20
|
*/
|
20
|
-
disabled?: boolean;
|
21
|
+
disabled?: boolean | ((selectItems: any[]) => boolean);
|
21
22
|
}
|
22
23
|
export interface ITableProps<T> extends TableProps<T> {
|
23
24
|
/**
|
@@ -32,7 +33,7 @@ export interface ITableProps<T> extends TableProps<T> {
|
|
32
33
|
/**
|
33
34
|
* pandora2.0风格的表格
|
34
35
|
*/
|
35
|
-
|
36
|
+
declare class Table<T = any> extends React.Component<ITableProps<T>, any> {
|
36
37
|
static Column: typeof import("antd/lib/table/Column").default;
|
37
38
|
static ColumnTag: (props: {
|
38
39
|
tags: any[];
|
@@ -43,35 +44,19 @@ export default class Table<T = any> extends React.Component<ITableProps<T>, any>
|
|
43
44
|
checkAll: boolean;
|
44
45
|
UNSAFE_componentWillReceiveProps(nextProps: ITableProps<T>): void;
|
45
46
|
get selectedRowKeys(): React.ReactText[];
|
46
|
-
get rowSelection():
|
47
|
-
|
48
|
-
onChange: (selectedRowKeys: string[] | number[], selectedRowsOfCurrentPage: any[]) => void;
|
49
|
-
preserveSelectedRowKeys?: boolean | undefined;
|
50
|
-
type?: "checkbox" | "radio" | undefined;
|
51
|
-
defaultSelectedRowKeys?: React.ReactText[] | undefined;
|
52
|
-
getCheckboxProps?: ((record: T) => Partial<Pick<import("antd/es/checkbox").CheckboxProps, "type" | "onClick" | "className" | "id" | "style" | "tabIndex" | "children" | "onChange" | "onKeyDown" | "onKeyPress" | "onMouseEnter" | "onMouseLeave" | "autoFocus" | "disabled" | "name" | "value" | "prefixCls" | "indeterminate" | "skipGroup">>) | undefined;
|
53
|
-
onSelect?: import("antd/es/table/interface").SelectionSelectFn<T> | undefined;
|
54
|
-
onSelectMultiple?: ((selected: boolean, selectedRows: T[], changeRows: T[]) => void) | undefined;
|
55
|
-
onSelectAll?: ((selected: boolean, selectedRows: T[], changeRows: T[]) => void) | undefined;
|
56
|
-
onSelectInvert?: ((selectedRowKeys: React.ReactText[]) => void) | undefined;
|
57
|
-
onSelectNone?: (() => void) | undefined;
|
58
|
-
selections?: boolean | import("antd/es/table/hooks/useSelection").INTERNAL_SELECTION_ITEM[] | undefined;
|
59
|
-
hideSelectAll?: boolean | undefined;
|
60
|
-
fixed?: boolean | undefined;
|
61
|
-
columnWidth?: string | number | undefined;
|
62
|
-
columnTitle?: React.ReactNode;
|
63
|
-
checkStrictly?: boolean | undefined;
|
64
|
-
renderCell?: ((value: boolean, record: T, index: number, originNode: React.ReactNode) => string | number | boolean | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal | import("rc-table/lib/interface").RenderedCell<T> | null | undefined) | undefined;
|
65
|
-
} | undefined;
|
47
|
+
get rowSelection(): TableRowSelection<T> | undefined;
|
48
|
+
get undisabledData(): readonly T[];
|
66
49
|
get keysOfCurrentPage(): any[];
|
67
50
|
getRowKey(row: any, index: number): any;
|
68
51
|
setIndeterminate(indeterminate: boolean): void;
|
69
52
|
setCheckAll(checkAll: boolean): void;
|
70
53
|
setCheckboxStatus(selectedRowsOfCurrentPage?: T[], dataSource?: T[]): void;
|
71
|
-
handleSelectionChange(selectedRowKeys:
|
72
|
-
onRowSelectionChange(selectedRowKeys:
|
54
|
+
handleSelectionChange(selectedRowKeys: React.Key[], selectedRowsOfCurrentPage: any[]): void;
|
55
|
+
onRowSelectionChange(selectedRowKeys: React.Key[], selectedRowsOfCurrentPage: any[]): void;
|
73
56
|
handleCheckAllChange(e: any): void;
|
74
57
|
handleBatchOptionClick(option: IOptionItem): void;
|
75
58
|
getRowClassName(record: any, index: number, indent: number): string;
|
59
|
+
getDisabledStatus(option: IOptionItem): boolean | undefined;
|
76
60
|
render(): JSX.Element;
|
77
61
|
}
|
62
|
+
export default Table;
|