shineout 1.10.0-rc.4 → 1.10.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/css/Cascader/Cascader.js +10 -5
- package/css/Cascader/Result.js +24 -16
- package/css/Checkbox/styles/checkinput.css +37 -15
- package/css/DatePicker/index.d.ts +8 -1
- package/css/DatePicker/styles/datepicker.css +83 -56
- package/css/Message/styles/index.js +3 -0
- package/css/Rule/index.d.ts +1 -1
- package/css/Select/More.js +13 -4
- package/css/Select/Result.js +36 -10
- package/css/Table/index.d.ts +2 -2
- package/css/Tree/Checkbox.js +1 -1
- package/css/Tree/Content.js +1 -1
- package/css/Tree/List.js +1 -1
- package/css/TreeSelect/Result.js +36 -10
- package/css/TreeSelect/styles/treeSelect.css +6 -6
- package/css/index.d.ts +1 -1
- package/css/index.js +1 -1
- package/dist/shineout.js +178 -99
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/theme.antd.css +1 -1
- package/dist/theme.antd2.css +1 -1
- package/dist/theme.default.css +1 -1
- package/dist/theme.shineout.css +1 -1
- package/es/Cascader/Cascader.js +10 -5
- package/es/Cascader/Result.js +24 -16
- package/es/Checkbox/styles/checkinput.less +37 -18
- package/es/DatePicker/index.d.ts +8 -1
- package/es/DatePicker/styles/datepicker.less +88 -85
- package/es/Message/styles/index.js +3 -1
- package/es/Rule/index.d.ts +1 -1
- package/es/Select/More.js +14 -5
- package/es/Select/Result.js +36 -10
- package/es/Table/index.d.ts +2 -2
- package/es/Tree/Checkbox.js +1 -1
- package/es/Tree/Content.js +1 -1
- package/es/Tree/List.js +1 -1
- package/es/TreeSelect/Result.js +36 -10
- package/es/TreeSelect/styles/treeSelect.less +2 -2
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/lib/Cascader/Cascader.js +10 -5
- package/lib/Cascader/Result.js +24 -16
- package/lib/Checkbox/styles/checkinput.less +37 -18
- package/lib/DatePicker/index.d.ts +8 -1
- package/lib/DatePicker/styles/datepicker.less +88 -85
- package/lib/Message/styles/index.js +3 -0
- package/lib/Rule/index.d.ts +1 -1
- package/lib/Select/More.js +13 -4
- package/lib/Select/Result.js +36 -10
- package/lib/Table/index.d.ts +2 -2
- package/lib/Tree/Checkbox.js +1 -1
- package/lib/Tree/Content.js +1 -1
- package/lib/Tree/List.js +1 -1
- package/lib/TreeSelect/Result.js +36 -10
- package/lib/TreeSelect/styles/treeSelect.less +2 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/css/Cascader/Cascader.js
CHANGED
|
@@ -209,13 +209,18 @@ function (_PureComponent) {
|
|
|
209
209
|
} else {
|
|
210
210
|
var v = value[value.length - 1];
|
|
211
211
|
var data = this.datum.getDataById(v);
|
|
212
|
-
var id = this.datum.getKey(data);
|
|
213
212
|
|
|
214
|
-
|
|
215
|
-
|
|
213
|
+
try {
|
|
214
|
+
var id = this.datum.getKey(data);
|
|
216
215
|
|
|
217
|
-
|
|
218
|
-
|
|
216
|
+
var _ref2 = this.datum.getPath(id) || {},
|
|
217
|
+
path = _ref2.path;
|
|
218
|
+
|
|
219
|
+
path = path || [];
|
|
220
|
+
this.handlePathChange(id, null, path);
|
|
221
|
+
} catch (e) {
|
|
222
|
+
console.error(e);
|
|
223
|
+
}
|
|
219
224
|
}
|
|
220
225
|
};
|
|
221
226
|
|
package/css/Cascader/Result.js
CHANGED
|
@@ -103,21 +103,7 @@ function (_PureComponent) {
|
|
|
103
103
|
};
|
|
104
104
|
|
|
105
105
|
_proto.componentDidUpdate = function componentDidUpdate(preProps) {
|
|
106
|
-
|
|
107
|
-
compressed = _this$props.compressed,
|
|
108
|
-
_this$props$value = _this$props.value,
|
|
109
|
-
value = _this$props$value === void 0 ? [] : _this$props$value,
|
|
110
|
-
onFilter = _this$props.onFilter;
|
|
111
|
-
|
|
112
|
-
if (compressed) {
|
|
113
|
-
if ((preProps.value || []).join('') !== (value || []).join('')) {
|
|
114
|
-
this.resetMore();
|
|
115
|
-
} else if (value.length && this.shouldResetMore) {
|
|
116
|
-
this.shouldResetMore = false;
|
|
117
|
-
this.state.more = (0, _More.getResetMore)(onFilter, this.resultEl, this.resultEl.querySelectorAll("." + (0, _styles3.cascaderClass)('item')));
|
|
118
|
-
this.forceUpdate();
|
|
119
|
-
}
|
|
120
|
-
}
|
|
106
|
+
this.updateMore(preProps);
|
|
121
107
|
};
|
|
122
108
|
|
|
123
109
|
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
@@ -134,6 +120,27 @@ function (_PureComponent) {
|
|
|
134
120
|
this.resultEl = el;
|
|
135
121
|
};
|
|
136
122
|
|
|
123
|
+
_proto.updateMore = function updateMore(preProps) {
|
|
124
|
+
var _this$props = this.props,
|
|
125
|
+
compressed = _this$props.compressed,
|
|
126
|
+
_this$props$value = _this$props.value,
|
|
127
|
+
value = _this$props$value === void 0 ? [] : _this$props$value,
|
|
128
|
+
onFilter = _this$props.onFilter,
|
|
129
|
+
data = _this$props.data;
|
|
130
|
+
|
|
131
|
+
if (compressed) {
|
|
132
|
+
if ((preProps.value || []).join('') !== (value || []).join('')) {
|
|
133
|
+
this.resetMore();
|
|
134
|
+
} else if ((preProps.data || []).length !== (data || []).length) {
|
|
135
|
+
this.resetMore();
|
|
136
|
+
} else if (value.length && this.shouldResetMore) {
|
|
137
|
+
this.shouldResetMore = false;
|
|
138
|
+
this.state.more = (0, _More.getResetMore)(onFilter, this.resultEl, this.resultEl.querySelectorAll("." + (0, _styles3.cascaderClass)('item')));
|
|
139
|
+
this.forceUpdate();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
|
|
137
144
|
_proto.resetMore = function resetMore() {
|
|
138
145
|
if (!this.props.compressed) return;
|
|
139
146
|
this.shouldResetMore = true;
|
|
@@ -386,7 +393,8 @@ Result.propTypes = {
|
|
|
386
393
|
selectId: _propTypes.default.string,
|
|
387
394
|
showList: _propTypes.default.func,
|
|
388
395
|
size: _propTypes.default.string,
|
|
389
|
-
showArrow: _propTypes.default.bool
|
|
396
|
+
showArrow: _propTypes.default.bool,
|
|
397
|
+
data: _propTypes.default.array
|
|
390
398
|
};
|
|
391
399
|
Result.defaultProps = {
|
|
392
400
|
value: []
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
cursor: pointer;
|
|
8
8
|
vertical-align: middle;
|
|
9
9
|
}
|
|
10
|
+
.so-checkinput-rtl.so-checkinput {
|
|
11
|
+
margin-left: var(--checkbox-margin-right, 24px);
|
|
12
|
+
margin-right: 0;
|
|
13
|
+
}
|
|
10
14
|
.so-checkinput input[type='checkbox'],
|
|
11
15
|
.so-checkinput input[type='radio'] {
|
|
12
16
|
position: absolute;
|
|
@@ -15,6 +19,11 @@
|
|
|
15
19
|
clip: rect(0, 0, 0, 0);
|
|
16
20
|
visibility: hidden;
|
|
17
21
|
}
|
|
22
|
+
.so-checkinput-rtl.so-checkinput input[type='checkbox'],
|
|
23
|
+
.so-checkinput-rtl.so-checkinput input[type='radio'] {
|
|
24
|
+
left: auto;
|
|
25
|
+
right: 0;
|
|
26
|
+
}
|
|
18
27
|
@-webkit-keyframes so-checkinput-focus {
|
|
19
28
|
0% {
|
|
20
29
|
-webkit-box-shadow: 0 0 0 0 var(--primary-color-fade-50, rgba(51, 153, 255, 0.5));
|
|
@@ -98,6 +107,9 @@
|
|
|
98
107
|
transition: all 0.15s ease-in-out;
|
|
99
108
|
border-radius: 0px;
|
|
100
109
|
}
|
|
110
|
+
.so-checkinput-rtl.so-checkinput-button .so-checkinput {
|
|
111
|
+
margin-left: 0;
|
|
112
|
+
}
|
|
101
113
|
.so-checkinput-button .so-checkinput:focus,
|
|
102
114
|
.so-checkinput-button .so-checkinput:hover,
|
|
103
115
|
.so-checkinput-button .so-checkinput:active {
|
|
@@ -128,8 +140,11 @@ fieldset[disabled] .so-checkinput-button .so-checkinput:active {
|
|
|
128
140
|
.so-checkinput-button .so-checkinput > input {
|
|
129
141
|
display: none;
|
|
130
142
|
}
|
|
131
|
-
.so-checkinput-button .so-checkinput:not(:first-child) {
|
|
132
|
-
border-left-width:
|
|
143
|
+
.so-checkinput-button .so-checkinput:not(:first-child):not(.so-checkinput-rtl *) {
|
|
144
|
+
border-left-width: 0;
|
|
145
|
+
}
|
|
146
|
+
.so-checkinput-rtl.so-checkinput-button .so-checkinput:not(:first-child) {
|
|
147
|
+
border-right-width: 0;
|
|
133
148
|
}
|
|
134
149
|
.so-checkinput-button .so-checkinput:not(:first-child):before {
|
|
135
150
|
position: absolute;
|
|
@@ -146,6 +161,10 @@ fieldset[disabled] .so-checkinput-button .so-checkinput:active {
|
|
|
146
161
|
-webkit-transition: background-color 0.15s ease-in-out;
|
|
147
162
|
transition: background-color 0.15s ease-in-out;
|
|
148
163
|
}
|
|
164
|
+
.so-checkinput-rtl.so-checkinput-button .so-checkinput:not(:first-child):before {
|
|
165
|
+
left: auto;
|
|
166
|
+
right: -1px;
|
|
167
|
+
}
|
|
149
168
|
.so-checkinput-button .so-checkinput:not(:last-child)::after {
|
|
150
169
|
position: absolute;
|
|
151
170
|
top: -1px;
|
|
@@ -162,6 +181,10 @@ fieldset[disabled] .so-checkinput-button .so-checkinput:active {
|
|
|
162
181
|
-webkit-transition: background-color 0.15s ease-in-out;
|
|
163
182
|
transition: background-color 0.15s ease-in-out;
|
|
164
183
|
}
|
|
184
|
+
.so-checkinput-rtl.so-checkinput-button .so-checkinput:not(:last-child)::after {
|
|
185
|
+
right: auto;
|
|
186
|
+
left: -1px;
|
|
187
|
+
}
|
|
165
188
|
.so-checkinput-button .so-checkinput:hover:not(.so-checkinput-disabled)::before,
|
|
166
189
|
.so-checkinput-button .so-checkinput:active:not(.so-checkinput-disabled)::before,
|
|
167
190
|
.so-checkinput-button .so-checkinput:focus:not(.so-checkinput-disabled)::before {
|
|
@@ -293,15 +316,26 @@ fieldset[disabled] .so-checkinput-button .so-checkinput.so-checkinput-checked:ac
|
|
|
293
316
|
border-top-left-radius: var(--radio-button-group-border-radius, var(--button-border-radius, 3px));
|
|
294
317
|
border-bottom-left-radius: var(--radio-button-group-border-radius, var(--button-border-radius, 3px));
|
|
295
318
|
}
|
|
319
|
+
.so-checkinput-rtl.so-checkinput-button .so-checkinput:first-child {
|
|
320
|
+
border-top-left-radius: 0;
|
|
321
|
+
border-bottom-left-radius: 0;
|
|
322
|
+
border-top-right-radius: var(--radio-button-group-border-radius, var(--button-border-radius, 3px));
|
|
323
|
+
border-bottom-right-radius: var(--radio-button-group-border-radius, var(--button-border-radius, 3px));
|
|
324
|
+
}
|
|
296
325
|
.so-checkinput-button .so-checkinput:last-child {
|
|
297
326
|
border-top-right-radius: var(--radio-button-group-border-radius, var(--button-border-radius, 3px));
|
|
298
327
|
border-bottom-right-radius: var(--radio-button-group-border-radius, var(--button-border-radius, 3px));
|
|
299
328
|
}
|
|
329
|
+
.so-checkinput-rtl.so-checkinput-button .so-checkinput:last-child {
|
|
330
|
+
border-top-left-radius: var(--radio-button-group-border-radius, var(--button-border-radius, 3px));
|
|
331
|
+
border-bottom-left-radius: var(--radio-button-group-border-radius, var(--button-border-radius, 3px));
|
|
332
|
+
border-top-right-radius: 0;
|
|
333
|
+
border-bottom-right-radius: 0;
|
|
334
|
+
}
|
|
300
335
|
.so-checkinput-button.so-checkinput-outline .so-checkinput.so-checkinput-checked {
|
|
301
336
|
border-color: var(--primary-color, #3399ff);
|
|
302
337
|
background-color: #fff;
|
|
303
338
|
color: var(--primary-color, #3399ff);
|
|
304
|
-
border-right-width: 1px;
|
|
305
339
|
}
|
|
306
340
|
.so-checkinput-button.so-checkinput-outline .so-checkinput.so-checkinput-checked:hover,
|
|
307
341
|
.so-checkinput-button.so-checkinput-outline .so-checkinput.so-checkinput-checked:active,
|
|
@@ -601,15 +635,3 @@ i.so-checkinput-radio.so-checkinput-indicator:after {
|
|
|
601
635
|
direction: rtl;
|
|
602
636
|
text-align: right;
|
|
603
637
|
}
|
|
604
|
-
.so-checkinput-rtl.so-checkinput-group.so-checkinput-button {
|
|
605
|
-
direction: ltr;
|
|
606
|
-
text-align: left;
|
|
607
|
-
}
|
|
608
|
-
.so-checkinput-rtl.so-checkinput-group.so-checkinput-button .so-checkinput-radio-container {
|
|
609
|
-
margin-left: 0;
|
|
610
|
-
}
|
|
611
|
-
.so-checkinput-rtl.so-checkinput-radio-container,
|
|
612
|
-
.so-checkinput-rtl.so-checkinput-checkbox-container {
|
|
613
|
-
margin-right: 0;
|
|
614
|
-
margin-left: var(--checkbox-margin-right, 24px);
|
|
615
|
-
}
|
|
@@ -263,7 +263,14 @@ export interface DatePickerProps<T =DatePickerValue > extends StandardProps,
|
|
|
263
263
|
* default: -
|
|
264
264
|
*/
|
|
265
265
|
innerTitle?: ReactNode;
|
|
266
|
-
|
|
266
|
+
/**
|
|
267
|
+
* The name of a Form that accesses data
|
|
268
|
+
*
|
|
269
|
+
* Form 存取数据的名称
|
|
270
|
+
*
|
|
271
|
+
* default: -
|
|
272
|
+
*/
|
|
273
|
+
name?: string | string[]
|
|
267
274
|
}
|
|
268
275
|
|
|
269
276
|
declare class DatePicker extends React.Component<DatePickerProps, {}> {
|
|
@@ -41,21 +41,39 @@ label.so-datepicker-r-time {
|
|
|
41
41
|
outline: none;
|
|
42
42
|
cursor: pointer;
|
|
43
43
|
}
|
|
44
|
+
.so-datepicker-rtl.so-datepicker-inner {
|
|
45
|
+
padding: 6px 12px 6px 24px;
|
|
46
|
+
}
|
|
44
47
|
.so-datepicker-size-small.so-datepicker-inner {
|
|
45
48
|
padding: 5px 22px 5px 10px;
|
|
46
49
|
}
|
|
50
|
+
.so-datepicker-rtl.so-datepicker-size-small.so-datepicker-inner {
|
|
51
|
+
padding: 5px 10px 5px 22px;
|
|
52
|
+
}
|
|
47
53
|
.so-datepicker-size-large.so-datepicker-inner {
|
|
48
54
|
padding: 8px 28px 8px 16px;
|
|
49
55
|
}
|
|
56
|
+
.so-datepicker-rtl.so-datepicker-size-large.so-datepicker-inner {
|
|
57
|
+
padding: 8px 16px 8px 28px;
|
|
58
|
+
}
|
|
50
59
|
.so-datepicker-inner-title {
|
|
51
60
|
padding: 4px 20px 4px 8px;
|
|
52
61
|
}
|
|
62
|
+
.so-datepicker-rtl.so-datepicker-inner-title {
|
|
63
|
+
padding: 4px 8px 4px 20px;
|
|
64
|
+
}
|
|
53
65
|
.so-datepicker-size-small.so-datepicker-inner-title {
|
|
54
66
|
padding: 2px 20px 2px 8px;
|
|
55
67
|
}
|
|
68
|
+
.so-datepicker-rtl.so-datepicker-size-small.so-datepicker-inner-title {
|
|
69
|
+
padding: 2px 8px 2px 20px;
|
|
70
|
+
}
|
|
56
71
|
.so-datepicker-size-large.so-datepicker-inner-title {
|
|
57
72
|
padding: 4px 20px 4px 8px;
|
|
58
73
|
}
|
|
74
|
+
.so-datepicker-rtl.so-datepicker-size-large.so-datepicker-inner-title {
|
|
75
|
+
padding: 4px 8px 4px 20px;
|
|
76
|
+
}
|
|
59
77
|
.so-datepicker-result {
|
|
60
78
|
position: relative;
|
|
61
79
|
display: -webkit-box;
|
|
@@ -72,6 +90,12 @@ label.so-datepicker-r-time {
|
|
|
72
90
|
margin: -9px -16px 0 0;
|
|
73
91
|
font-size: 14px;
|
|
74
92
|
}
|
|
93
|
+
.so-datepicker-rtl .so-datepicker-result .so-datepicker-icon {
|
|
94
|
+
right: auto;
|
|
95
|
+
left: 0;
|
|
96
|
+
margin-right: 0;
|
|
97
|
+
margin-left: -16px;
|
|
98
|
+
}
|
|
75
99
|
.so-datepicker-result .so-datepicker-icon path {
|
|
76
100
|
-webkit-transition: all 0.2s;
|
|
77
101
|
transition: all 0.2s;
|
|
@@ -127,9 +151,12 @@ label.so-datepicker-r-time {
|
|
|
127
151
|
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.02), 0 6px 12px rgba(0, 0, 0, 0.175);
|
|
128
152
|
font-size: var(--font-size-base, 14px);
|
|
129
153
|
}
|
|
130
|
-
.so-datepicker-picker.so-datepicker-quick {
|
|
154
|
+
.so-datepicker-picker.so-datepicker-quick:not(.so-datepicker-rtl *) {
|
|
131
155
|
padding-left: 0;
|
|
132
156
|
}
|
|
157
|
+
.so-datepicker-rtl .so-datepicker-picker.so-datepicker-quick {
|
|
158
|
+
padding-right: 0;
|
|
159
|
+
}
|
|
133
160
|
.so-datepicker-picker span {
|
|
134
161
|
color: var(--gray-600, #6c757d);
|
|
135
162
|
}
|
|
@@ -174,6 +201,7 @@ label.so-datepicker-r-time {
|
|
|
174
201
|
}
|
|
175
202
|
.so-datepicker-picker .so-datepicker-header .so-datepicker-ym + .so-datepicker-ym {
|
|
176
203
|
text-align: left;
|
|
204
|
+
text-align: start;
|
|
177
205
|
}
|
|
178
206
|
.so-datepicker-picker span.so-datepicker-today {
|
|
179
207
|
color: var(--primary-color, #3399ff);
|
|
@@ -248,6 +276,10 @@ label.so-datepicker-r-time {
|
|
|
248
276
|
.so-datepicker-range-picker > div:nth-last-child(2) {
|
|
249
277
|
margin-right: 12px;
|
|
250
278
|
}
|
|
279
|
+
.so-datepicker-rtl .so-datepicker-range-picker > div:nth-last-child(2) {
|
|
280
|
+
margin-right: 0;
|
|
281
|
+
margin-left: 12px;
|
|
282
|
+
}
|
|
251
283
|
.so-datepicker-range-picker > div:last-child {
|
|
252
284
|
position: relative;
|
|
253
285
|
}
|
|
@@ -258,6 +290,10 @@ label.so-datepicker-r-time {
|
|
|
258
290
|
height: 100%;
|
|
259
291
|
border-left: 1px solid var(--divider-color, #f0f0f0);
|
|
260
292
|
}
|
|
293
|
+
.so-datepicker-rtl .so-datepicker-range-picker > div:last-child:before {
|
|
294
|
+
left: auto;
|
|
295
|
+
right: -6px;
|
|
296
|
+
}
|
|
261
297
|
.so-datepicker-day-picker {
|
|
262
298
|
display: -webkit-box;
|
|
263
299
|
display: -ms-flexbox;
|
|
@@ -299,10 +335,22 @@ label.so-datepicker-r-time {
|
|
|
299
335
|
border-bottom-left-radius: 16px;
|
|
300
336
|
border-top-left-radius: 16px;
|
|
301
337
|
}
|
|
338
|
+
.so-datepicker-rtl .so-datepicker-day-picker .so-datepicker-list div.so-datepicker-hover-start {
|
|
339
|
+
border-bottom-left-radius: 0;
|
|
340
|
+
border-top-left-radius: 0;
|
|
341
|
+
border-bottom-right-radius: 16px;
|
|
342
|
+
border-top-right-radius: 16px;
|
|
343
|
+
}
|
|
302
344
|
.so-datepicker-day-picker .so-datepicker-list div.so-datepicker-hover-end {
|
|
303
345
|
border-bottom-right-radius: 16px;
|
|
304
346
|
border-top-right-radius: 16px;
|
|
305
347
|
}
|
|
348
|
+
.so-datepicker-rtl .so-datepicker-day-picker .so-datepicker-list div.so-datepicker-hover-end {
|
|
349
|
+
border-bottom-right-radius: 0;
|
|
350
|
+
border-top-right-radius: 0;
|
|
351
|
+
border-bottom-left-radius: 16px;
|
|
352
|
+
border-top-left-radius: 16px;
|
|
353
|
+
}
|
|
306
354
|
.so-datepicker-day-picker .so-datepicker-list div.so-datepicker-active.so-datepicker-hover-start span,
|
|
307
355
|
.so-datepicker-day-picker .so-datepicker-list div.so-datepicker-active.so-datepicker-hover-end span {
|
|
308
356
|
background: var(--primary-color, #3399ff);
|
|
@@ -339,12 +387,20 @@ label.so-datepicker-r-time {
|
|
|
339
387
|
padding-left: 12px;
|
|
340
388
|
border-top: solid 1px #f2f2f2;
|
|
341
389
|
}
|
|
390
|
+
.so-datepicker-rtl .so-datepicker-day-picker .so-datepicker-datetime {
|
|
391
|
+
padding-left: 0px;
|
|
392
|
+
padding-right: 12px;
|
|
393
|
+
}
|
|
342
394
|
.so-datepicker-day-picker .so-datepicker-datetime .so-datepicker-clock {
|
|
343
395
|
fill: var(--gray-600, #6c757d);
|
|
344
396
|
margin-right: 8px;
|
|
345
397
|
position: relative;
|
|
346
398
|
top: 2px;
|
|
347
399
|
}
|
|
400
|
+
.so-datepicker-rtl .so-datepicker-day-picker .so-datepicker-datetime .so-datepicker-clock {
|
|
401
|
+
margin-right: 0;
|
|
402
|
+
margin-left: 8px;
|
|
403
|
+
}
|
|
348
404
|
.so-datepicker-day-picker .so-datepicker-datetime .so-datepicker-clock > svg {
|
|
349
405
|
width: 14px;
|
|
350
406
|
height: 14px;
|
|
@@ -359,6 +415,10 @@ label.so-datepicker-r-time {
|
|
|
359
415
|
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.02), 0 -2px 12px rgba(0, 0, 0, 0.175);
|
|
360
416
|
visibility: hidden;
|
|
361
417
|
}
|
|
418
|
+
.so-datepicker-rtl .so-datepicker-day-picker .so-datepicker-datetime .so-datepicker-time-picker {
|
|
419
|
+
left: auto;
|
|
420
|
+
right: 0;
|
|
421
|
+
}
|
|
362
422
|
.so-datepicker-day-picker .so-datepicker-datetime:hover .so-datepicker-time-picker {
|
|
363
423
|
z-index: 100;
|
|
364
424
|
visibility: visible;
|
|
@@ -413,9 +473,18 @@ label.so-datepicker-r-time {
|
|
|
413
473
|
font-size: var(--font-size-base, 14px);
|
|
414
474
|
text-align: left;
|
|
415
475
|
}
|
|
476
|
+
.so-datepicker-rtl .so-datepicker-time-picker .so-datepicker-time-list {
|
|
477
|
+
text-align: right;
|
|
478
|
+
}
|
|
416
479
|
.so-datepicker-time-picker .so-datepicker-time-list:last-child {
|
|
417
480
|
border-right: 0;
|
|
418
481
|
}
|
|
482
|
+
.so-datepicker-rtl .so-datepicker-time-picker .so-datepicker-time-list:last-child {
|
|
483
|
+
border-right: 1px solid var(--gray-200, #e9ecef);
|
|
484
|
+
}
|
|
485
|
+
.so-datepicker-rtl .so-datepicker-time-picker .so-datepicker-time-list:first-child {
|
|
486
|
+
border-right: 0;
|
|
487
|
+
}
|
|
419
488
|
.so-datepicker-time-picker .so-datepicker-time-list .so-datepicker-pad {
|
|
420
489
|
height: 60px;
|
|
421
490
|
}
|
|
@@ -427,6 +496,11 @@ label.so-datepicker-r-time {
|
|
|
427
496
|
line-height: 30px;
|
|
428
497
|
height: 30px;
|
|
429
498
|
}
|
|
499
|
+
.so-datepicker-rtl .so-datepicker-time-picker .so-datepicker-time-list span,
|
|
500
|
+
.so-datepicker-rtl .so-datepicker-time-picker .so-datepicker-time-list a {
|
|
501
|
+
padding-left: 0;
|
|
502
|
+
padding-right: 18px;
|
|
503
|
+
}
|
|
430
504
|
.so-datepicker-time-picker .so-datepicker-time-list .so-datepicker-time-active {
|
|
431
505
|
color: #000;
|
|
432
506
|
font-weight: bold;
|
|
@@ -446,6 +520,10 @@ label.so-datepicker-r-time {
|
|
|
446
520
|
min-width: 80px;
|
|
447
521
|
border-right: 1px solid var(--divider-color, #f0f0f0);
|
|
448
522
|
}
|
|
523
|
+
.so-datepicker-rtl .so-datepicker-quick-select {
|
|
524
|
+
border-right: none;
|
|
525
|
+
border-left: 1px solid var(--divider-color, #f0f0f0);
|
|
526
|
+
}
|
|
449
527
|
.so-datepicker-quick-select-item {
|
|
450
528
|
max-width: 120px;
|
|
451
529
|
text-overflow: ellipsis;
|
|
@@ -472,6 +550,10 @@ label.so-datepicker-r-time {
|
|
|
472
550
|
bottom: 0;
|
|
473
551
|
width: 2px;
|
|
474
552
|
}
|
|
553
|
+
.so-datepicker-rtl .so-datepicker-quick-select-item::after {
|
|
554
|
+
right: auto;
|
|
555
|
+
left: 0;
|
|
556
|
+
}
|
|
475
557
|
.so-datepicker-quick-select-item-active {
|
|
476
558
|
color: var(--primary-color, #3399ff);
|
|
477
559
|
}
|
|
@@ -501,64 +583,9 @@ label.so-datepicker-r-time {
|
|
|
501
583
|
direction: rtl;
|
|
502
584
|
text-align: right;
|
|
503
585
|
}
|
|
504
|
-
.so-datepicker-rtl.so-datepicker-inner {
|
|
505
|
-
padding: 6px 12px 6px 24px;
|
|
506
|
-
}
|
|
507
|
-
.so-datepicker-rtl.so-datepicker-inner .so-datepicker-result .so-datepicker-icon {
|
|
508
|
-
right: auto;
|
|
509
|
-
left: 0;
|
|
510
|
-
margin-right: 0;
|
|
511
|
-
margin-left: -16px;
|
|
512
|
-
}
|
|
513
|
-
.so-datepicker-rtl.so-datepicker-inner-title {
|
|
514
|
-
padding: 4px 8px 4px 20px;
|
|
515
|
-
}
|
|
516
|
-
.so-datepicker-rtl.so-datepicker-size-small.so-datepicker-inner-title {
|
|
517
|
-
padding: 2px 8px 2px 20px;
|
|
518
|
-
}
|
|
519
|
-
.so-datepicker-rtl.so-datepicker-size-large.so-datepicker-inner-title {
|
|
520
|
-
padding: 4px 8px 4px 20px;
|
|
521
|
-
}
|
|
522
586
|
.so-datepicker-rtl .so-datepicker-picker .so-datepicker-header .so-datepicker-left,
|
|
523
587
|
.so-datepicker-rtl .so-datepicker-picker .so-datepicker-header .so-datepicker-right {
|
|
524
588
|
-webkit-transform: rotate(180deg);
|
|
525
589
|
-ms-transform: rotate(180deg);
|
|
526
590
|
transform: rotate(180deg);
|
|
527
591
|
}
|
|
528
|
-
.so-datepicker-rtl .so-datepicker-range-picker > div:nth-last-child(2) {
|
|
529
|
-
margin-right: 0;
|
|
530
|
-
margin-left: 12px;
|
|
531
|
-
}
|
|
532
|
-
.so-datepicker-rtl .so-datepicker-range-picker > div:last-child:before {
|
|
533
|
-
content: none;
|
|
534
|
-
}
|
|
535
|
-
.so-datepicker-rtl .so-datepicker-range-picker > div:last-child:after {
|
|
536
|
-
content: ' ';
|
|
537
|
-
position: absolute;
|
|
538
|
-
height: 100%;
|
|
539
|
-
right: -6px;
|
|
540
|
-
top: 0;
|
|
541
|
-
border-left: 1px solid var(--divider-color, #f0f0f0);
|
|
542
|
-
}
|
|
543
|
-
.so-datepicker-rtl .so-datepicker-day-picker .so-datepicker-list .so-datepicker-hover-end {
|
|
544
|
-
border-bottom-right-radius: 0;
|
|
545
|
-
border-top-right-radius: 0;
|
|
546
|
-
border-bottom-left-radius: 16px;
|
|
547
|
-
border-top-left-radius: 16px;
|
|
548
|
-
}
|
|
549
|
-
.so-datepicker-rtl .so-datepicker-day-picker .so-datepicker-list .so-datepicker-hover-start {
|
|
550
|
-
border-bottom-left-radius: 0;
|
|
551
|
-
border-top-left-radius: 0;
|
|
552
|
-
border-bottom-right-radius: 16px;
|
|
553
|
-
border-top-right-radius: 16px;
|
|
554
|
-
}
|
|
555
|
-
.so-datepicker-rtl .so-datepicker-time-picker .so-datepicker-time-list:first-child {
|
|
556
|
-
border-width: 0;
|
|
557
|
-
}
|
|
558
|
-
.so-datepicker-rtl .so-datepicker-time-picker .so-datepicker-time-list:last-child {
|
|
559
|
-
border-right: 1px solid var(--gray-200, #e9ecef);
|
|
560
|
-
}
|
|
561
|
-
.so-datepicker-rtl .so-datepicker-quick-select {
|
|
562
|
-
border-right: none;
|
|
563
|
-
border-left: 1px solid var(--divider-color, #f0f0f0);
|
|
564
|
-
}
|
|
@@ -7,9 +7,12 @@ exports.messageClass = void 0;
|
|
|
7
7
|
|
|
8
8
|
require("../../styles/normalize.css");
|
|
9
9
|
|
|
10
|
+
require("../../Alert/styles/alert.css");
|
|
11
|
+
|
|
10
12
|
var _message = _interopRequireDefault(require("./message.css"));
|
|
11
13
|
|
|
12
14
|
var _classname = _interopRequireDefault(require("../../utils/classname"));
|
|
13
15
|
|
|
16
|
+
// rely Alert
|
|
14
17
|
var messageClass = (0, _classname.default)(_message.default, 'message');
|
|
15
18
|
exports.messageClass = messageClass;
|
package/css/Rule/index.d.ts
CHANGED
package/css/Select/More.js
CHANGED
|
@@ -22,6 +22,7 @@ var _element = require("../utils/dom/element");
|
|
|
22
22
|
|
|
23
23
|
var _Popover = _interopRequireDefault(require("../Popover"));
|
|
24
24
|
|
|
25
|
+
// if num = -1 display all else display num
|
|
25
26
|
function getResetMore(onFilter, container, doms) {
|
|
26
27
|
if (!container || !doms || !doms.length) return -1;
|
|
27
28
|
var items = Array.from(doms);
|
|
@@ -51,10 +52,18 @@ function getResetMore(onFilter, container, doms) {
|
|
|
51
52
|
for (var i = 0; i < itemWidthArr.length; i++) {
|
|
52
53
|
var itemLen = itemWidthArr[i]; // number length
|
|
53
54
|
|
|
54
|
-
var
|
|
55
|
-
|
|
55
|
+
var resetNum = items.length - 1 - i;
|
|
56
|
+
var moreWidth = void 0;
|
|
57
|
+
|
|
58
|
+
if (resetNum <= 0) {
|
|
59
|
+
moreWidth = 0;
|
|
60
|
+
} else {
|
|
61
|
+
var reset = "+" + resetNum;
|
|
62
|
+
hideEl.childNodes[0].innerText = reset; // (+num) width
|
|
63
|
+
|
|
64
|
+
moreWidth = hideEl.offsetWidth + hideMargin;
|
|
65
|
+
}
|
|
56
66
|
|
|
57
|
-
var moreWidth = hideEl.offsetWidth + hideMargin;
|
|
58
67
|
len += itemLen;
|
|
59
68
|
|
|
60
69
|
if (len > contentWidth - moreWidth) {
|
|
@@ -114,7 +123,7 @@ function (_Component) {
|
|
|
114
123
|
cls = _this$props.cls,
|
|
115
124
|
showNum = _this$props.showNum;
|
|
116
125
|
var status = this.state.status;
|
|
117
|
-
if (showNum < 0 || showNum
|
|
126
|
+
if (showNum < 0 || showNum >= data.length) return _react.default.createElement(_react.default.Fragment, null, data, _react.default.createElement("a", {
|
|
118
127
|
key: "hidden",
|
|
119
128
|
className: className,
|
|
120
129
|
style: {
|
package/css/Select/Result.js
CHANGED
|
@@ -125,13 +125,47 @@ function (_PureComponent) {
|
|
|
125
125
|
};
|
|
126
126
|
|
|
127
127
|
_proto.componentDidUpdate = function componentDidUpdate(preProps) {
|
|
128
|
+
this.updateMore(preProps);
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
132
|
+
if (this.cancelResizeObserver) this.cancelResizeObserver();
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
_proto.bindResult = function bindResult(el) {
|
|
136
|
+
this.resultEl = el;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
_proto.updateMore = function updateMore(preProps) {
|
|
128
140
|
var _this$props = this.props,
|
|
129
141
|
result = _this$props.result,
|
|
130
142
|
compressed = _this$props.compressed,
|
|
131
|
-
onFilter = _this$props.onFilter
|
|
143
|
+
onFilter = _this$props.onFilter,
|
|
144
|
+
renderResult = _this$props.renderResult,
|
|
145
|
+
renderUnmatched = _this$props.renderUnmatched;
|
|
132
146
|
|
|
133
147
|
if (compressed) {
|
|
134
|
-
|
|
148
|
+
var shouldRest = false;
|
|
149
|
+
|
|
150
|
+
if (preProps.result.length !== result.length) {
|
|
151
|
+
shouldRest = true;
|
|
152
|
+
} else {
|
|
153
|
+
var i = preProps.result.length - 1;
|
|
154
|
+
|
|
155
|
+
while (i >= 0) {
|
|
156
|
+
var before = getResultContent(preProps.result[i], preProps.renderResult, preProps.renderUnmatched);
|
|
157
|
+
var now = getResultContent(result[i], renderResult, renderUnmatched);
|
|
158
|
+
|
|
159
|
+
if (before !== now) {
|
|
160
|
+
shouldRest = true;
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
i -= 1;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (shouldRest) {
|
|
135
169
|
this.resetMore();
|
|
136
170
|
} else if (result.length && this.shouldResetMore) {
|
|
137
171
|
this.shouldResetMore = false;
|
|
@@ -141,14 +175,6 @@ function (_PureComponent) {
|
|
|
141
175
|
}
|
|
142
176
|
};
|
|
143
177
|
|
|
144
|
-
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
145
|
-
if (this.cancelResizeObserver) this.cancelResizeObserver();
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
_proto.bindResult = function bindResult(el) {
|
|
149
|
-
this.resultEl = el;
|
|
150
|
-
};
|
|
151
|
-
|
|
152
178
|
_proto.resetMore = function resetMore() {
|
|
153
179
|
if (!this.props.compressed) return;
|
|
154
180
|
this.shouldResetMore = true;
|
package/css/Table/index.d.ts
CHANGED
|
@@ -124,7 +124,7 @@ export interface ColumnItem<T> {
|
|
|
124
124
|
*
|
|
125
125
|
* default: none
|
|
126
126
|
*/
|
|
127
|
-
sorter?: ((order: ColumnOrder) => (prevRowData: T, nextRowData: T) =>
|
|
127
|
+
sorter?: ((order: ColumnOrder) => (prevRowData: T, nextRowData: T) => number) | string;
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
130
|
* The content of the header
|
|
@@ -552,7 +552,7 @@ export interface TableProps<Value, TRD> extends StandardProps, ListItemStandardP
|
|
|
552
552
|
* default: false
|
|
553
553
|
*/
|
|
554
554
|
changedByExpand?: boolean
|
|
555
|
-
|
|
555
|
+
|
|
556
556
|
/*
|
|
557
557
|
* customize sort icons
|
|
558
558
|
*
|
package/css/Tree/Checkbox.js
CHANGED
|
@@ -92,6 +92,6 @@ exports.default = _default;
|
|
|
92
92
|
(0, _defineProperty2.default)(_default, "propTypes", {
|
|
93
93
|
datum: _propTypes.default.object.isRequired,
|
|
94
94
|
disabled: _propTypes.default.bool,
|
|
95
|
-
id: _propTypes.default.string.
|
|
95
|
+
id: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
96
96
|
onChange: _propTypes.default.func.isRequired
|
|
97
97
|
});
|
package/css/Tree/Content.js
CHANGED
|
@@ -163,7 +163,7 @@ Content.propTypes = {
|
|
|
163
163
|
draggable: _propTypes.default.bool,
|
|
164
164
|
expanded: _propTypes.default.bool,
|
|
165
165
|
loader: _propTypes.default.func,
|
|
166
|
-
id: _propTypes.default.
|
|
166
|
+
id: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
167
167
|
onChange: _propTypes.default.func,
|
|
168
168
|
onToggle: _propTypes.default.func,
|
|
169
169
|
onDragOver: _propTypes.default.func,
|
package/css/Tree/List.js
CHANGED
|
@@ -107,7 +107,7 @@ List.propTypes = {
|
|
|
107
107
|
className: _propTypes.default.string,
|
|
108
108
|
data: _propTypes.default.array,
|
|
109
109
|
expanded: _propTypes.default.bool,
|
|
110
|
-
id: _propTypes.default.
|
|
110
|
+
id: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
111
111
|
isRoot: _propTypes.default.bool,
|
|
112
112
|
keygen: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.func]).isRequired,
|
|
113
113
|
line: _propTypes.default.bool,
|