@douyinfe/semi-ui 2.10.4 → 2.10.5
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/cascader/index.tsx +16 -15
- package/checkbox/checkbox.tsx +1 -0
- package/checkbox/checkboxInner.tsx +10 -1
- package/datePicker/datePicker.tsx +7 -4
- package/dist/umd/semi-ui.js +194 -51
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/input/index.tsx +5 -1
- package/inputNumber/index.tsx +5 -2
- package/lib/cjs/cascader/index.d.ts +1 -0
- package/lib/cjs/cascader/index.js +9 -2
- package/lib/cjs/checkbox/checkbox.d.ts +1 -0
- package/lib/cjs/checkbox/checkbox.js +2 -1
- package/lib/cjs/checkbox/checkboxInner.d.ts +8 -0
- package/lib/cjs/checkbox/checkboxInner.js +11 -2
- package/lib/cjs/datePicker/datePicker.d.ts +1 -0
- package/lib/cjs/datePicker/datePicker.js +21 -5
- package/lib/cjs/form/baseForm.d.ts +2 -1
- package/lib/cjs/form/field.d.ts +2 -1
- package/lib/cjs/input/index.d.ts +2 -0
- package/lib/cjs/input/index.js +11 -4
- package/lib/cjs/inputNumber/index.d.ts +1 -0
- package/lib/cjs/inputNumber/index.js +8 -2
- package/lib/cjs/modal/ModalContent.d.ts +1 -0
- package/lib/cjs/modal/ModalContent.js +14 -3
- package/lib/cjs/modal/confirm.d.ts +5 -0
- package/lib/cjs/radio/radio.d.ts +5 -0
- package/lib/cjs/radio/radio.js +2 -1
- package/lib/cjs/radio/radioInner.d.ts +8 -0
- package/lib/cjs/radio/radioInner.js +11 -2
- package/lib/cjs/rating/index.d.ts +2 -0
- package/lib/cjs/rating/index.js +12 -5
- package/lib/cjs/rating/item.d.ts +10 -0
- package/lib/cjs/rating/item.js +4 -1
- package/lib/cjs/select/index.d.ts +2 -0
- package/lib/cjs/select/index.js +15 -3
- package/lib/cjs/tabs/index.d.ts +1 -0
- package/lib/cjs/tabs/index.js +2 -1
- package/lib/cjs/tabs/interface.d.ts +1 -0
- package/lib/cjs/tagInput/index.d.ts +2 -0
- package/lib/cjs/tagInput/index.js +13 -4
- package/lib/cjs/timePicker/TimeInput.d.ts +2 -1
- package/lib/cjs/timePicker/TimeInput.js +7 -3
- package/lib/cjs/timePicker/TimePicker.d.ts +2 -0
- package/lib/cjs/timePicker/TimePicker.js +2 -1
- package/lib/cjs/timePicker/index.d.ts +1 -0
- package/lib/cjs/tooltip/index.d.ts +3 -0
- package/lib/cjs/tooltip/index.js +8 -2
- package/lib/cjs/tree/index.d.ts +1 -0
- package/lib/cjs/tree/index.js +9 -2
- package/lib/cjs/typography/title.d.ts +1 -1
- package/lib/es/cascader/index.d.ts +1 -0
- package/lib/es/cascader/index.js +9 -2
- package/lib/es/checkbox/checkbox.d.ts +1 -0
- package/lib/es/checkbox/checkbox.js +2 -1
- package/lib/es/checkbox/checkboxInner.d.ts +8 -0
- package/lib/es/checkbox/checkboxInner.js +11 -2
- package/lib/es/datePicker/datePicker.d.ts +1 -0
- package/lib/es/datePicker/datePicker.js +21 -5
- package/lib/es/form/baseForm.d.ts +2 -1
- package/lib/es/form/field.d.ts +2 -1
- package/lib/es/input/index.d.ts +2 -0
- package/lib/es/input/index.js +11 -4
- package/lib/es/inputNumber/index.d.ts +1 -0
- package/lib/es/inputNumber/index.js +8 -2
- package/lib/es/modal/ModalContent.d.ts +1 -0
- package/lib/es/modal/ModalContent.js +14 -3
- package/lib/es/modal/confirm.d.ts +5 -0
- package/lib/es/radio/radio.d.ts +5 -0
- package/lib/es/radio/radio.js +2 -1
- package/lib/es/radio/radioInner.d.ts +8 -0
- package/lib/es/radio/radioInner.js +11 -2
- package/lib/es/rating/index.d.ts +2 -0
- package/lib/es/rating/index.js +12 -5
- package/lib/es/rating/item.d.ts +10 -0
- package/lib/es/rating/item.js +4 -1
- package/lib/es/select/index.d.ts +2 -0
- package/lib/es/select/index.js +15 -3
- package/lib/es/tabs/index.d.ts +1 -0
- package/lib/es/tabs/index.js +2 -1
- package/lib/es/tabs/interface.d.ts +1 -0
- package/lib/es/tagInput/index.d.ts +2 -0
- package/lib/es/tagInput/index.js +13 -4
- package/lib/es/timePicker/TimeInput.d.ts +2 -1
- package/lib/es/timePicker/TimeInput.js +7 -3
- package/lib/es/timePicker/TimePicker.d.ts +2 -0
- package/lib/es/timePicker/TimePicker.js +2 -1
- package/lib/es/timePicker/index.d.ts +1 -0
- package/lib/es/tooltip/index.d.ts +3 -0
- package/lib/es/tooltip/index.js +9 -2
- package/lib/es/tree/index.d.ts +1 -0
- package/lib/es/tree/index.js +9 -2
- package/lib/es/typography/title.d.ts +1 -1
- package/modal/ModalContent.tsx +6 -3
- package/package.json +9 -9
- package/radio/radio.tsx +5 -0
- package/radio/radioInner.tsx +10 -1
- package/rating/index.tsx +6 -4
- package/rating/item.tsx +11 -0
- package/select/index.tsx +6 -2
- package/tabs/index.tsx +1 -0
- package/tabs/interface.ts +1 -0
- package/tagInput/index.tsx +6 -3
- package/timePicker/TimeInput.tsx +5 -3
- package/timePicker/TimePicker.tsx +2 -0
- package/tooltip/index.tsx +5 -1
- package/tree/index.tsx +3 -1
package/dist/umd/semi-ui.js
CHANGED
|
@@ -26876,14 +26876,17 @@ class foundation_Tooltip extends foundation {
|
|
|
26876
26876
|
_focusTrigger() {
|
|
26877
26877
|
const {
|
|
26878
26878
|
trigger,
|
|
26879
|
-
returnFocusOnClose
|
|
26879
|
+
returnFocusOnClose,
|
|
26880
|
+
preventScroll
|
|
26880
26881
|
} = this.getProps();
|
|
26881
26882
|
|
|
26882
|
-
if (returnFocusOnClose && trigger
|
|
26883
|
+
if (returnFocusOnClose && trigger !== 'custom') {
|
|
26883
26884
|
const triggerNode = this._adapter.getTriggerNode();
|
|
26884
26885
|
|
|
26885
26886
|
if (triggerNode && 'focus' in triggerNode) {
|
|
26886
|
-
triggerNode.focus(
|
|
26887
|
+
triggerNode.focus({
|
|
26888
|
+
preventScroll
|
|
26889
|
+
});
|
|
26887
26890
|
}
|
|
26888
26891
|
}
|
|
26889
26892
|
}
|
|
@@ -26903,34 +26906,56 @@ class foundation_Tooltip extends foundation {
|
|
|
26903
26906
|
}
|
|
26904
26907
|
|
|
26905
26908
|
_handleContainerTabKeyDown(focusableElements, event) {
|
|
26909
|
+
const {
|
|
26910
|
+
preventScroll
|
|
26911
|
+
} = this.getProps();
|
|
26912
|
+
|
|
26906
26913
|
const activeElement = this._adapter.getActiveElement();
|
|
26907
26914
|
|
|
26908
26915
|
const isLastCurrentFocus = focusableElements[focusableElements.length - 1] === activeElement;
|
|
26909
26916
|
|
|
26910
26917
|
if (isLastCurrentFocus) {
|
|
26911
|
-
focusableElements[0].focus(
|
|
26918
|
+
focusableElements[0].focus({
|
|
26919
|
+
preventScroll
|
|
26920
|
+
});
|
|
26912
26921
|
event.preventDefault(); // prevent browser default tab move behavior
|
|
26913
26922
|
}
|
|
26914
26923
|
}
|
|
26915
26924
|
|
|
26916
26925
|
_handleContainerShiftTabKeyDown(focusableElements, event) {
|
|
26926
|
+
const {
|
|
26927
|
+
preventScroll
|
|
26928
|
+
} = this.getProps();
|
|
26929
|
+
|
|
26917
26930
|
const activeElement = this._adapter.getActiveElement();
|
|
26918
26931
|
|
|
26919
26932
|
const isFirstCurrentFocus = focusableElements[0] === activeElement;
|
|
26920
26933
|
|
|
26921
26934
|
if (isFirstCurrentFocus) {
|
|
26922
|
-
focusableElements[focusableElements.length - 1].focus(
|
|
26935
|
+
focusableElements[focusableElements.length - 1].focus({
|
|
26936
|
+
preventScroll
|
|
26937
|
+
});
|
|
26923
26938
|
event.preventDefault(); // prevent browser default tab move behavior
|
|
26924
26939
|
}
|
|
26925
26940
|
}
|
|
26926
26941
|
|
|
26927
26942
|
_handleTriggerArrowDownKeydown(focusableElements, event) {
|
|
26928
|
-
|
|
26943
|
+
const {
|
|
26944
|
+
preventScroll
|
|
26945
|
+
} = this.getProps();
|
|
26946
|
+
focusableElements[0].focus({
|
|
26947
|
+
preventScroll
|
|
26948
|
+
});
|
|
26929
26949
|
event.preventDefault(); // prevent browser default scroll behavior
|
|
26930
26950
|
}
|
|
26931
26951
|
|
|
26932
26952
|
_handleTriggerArrowUpKeydown(focusableElements, event) {
|
|
26933
|
-
|
|
26953
|
+
const {
|
|
26954
|
+
preventScroll
|
|
26955
|
+
} = this.getProps();
|
|
26956
|
+
focusableElements[focusableElements.length - 1].focus({
|
|
26957
|
+
preventScroll
|
|
26958
|
+
});
|
|
26934
26959
|
event.preventDefault(); // prevent browser default scroll behavior
|
|
26935
26960
|
}
|
|
26936
26961
|
|
|
@@ -29617,10 +29642,16 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
|
|
|
29617
29642
|
return Object(_utils["b" /* getActiveElement */])();
|
|
29618
29643
|
},
|
|
29619
29644
|
setInitialFocus: () => {
|
|
29645
|
+
const {
|
|
29646
|
+
preventScroll
|
|
29647
|
+
} = this.props;
|
|
29648
|
+
|
|
29620
29649
|
const focusRefNode = get_default()(this, 'initialFocusRef.current');
|
|
29621
29650
|
|
|
29622
29651
|
if (focusRefNode && 'focus' in focusRefNode) {
|
|
29623
|
-
focusRefNode.focus(
|
|
29652
|
+
focusRefNode.focus({
|
|
29653
|
+
preventScroll
|
|
29654
|
+
});
|
|
29624
29655
|
}
|
|
29625
29656
|
},
|
|
29626
29657
|
notifyEscKeydown: event => {
|
|
@@ -29770,7 +29801,8 @@ tooltip_Tooltip.propTypes = {
|
|
|
29770
29801
|
role: prop_types_default.a.string,
|
|
29771
29802
|
wrapWhenSpecial: prop_types_default.a.bool,
|
|
29772
29803
|
guardFocus: prop_types_default.a.bool,
|
|
29773
|
-
returnFocusOnClose: prop_types_default.a.bool
|
|
29804
|
+
returnFocusOnClose: prop_types_default.a.bool,
|
|
29805
|
+
preventScroll: prop_types_default.a.bool
|
|
29774
29806
|
};
|
|
29775
29807
|
tooltip_Tooltip.defaultProps = {
|
|
29776
29808
|
arrowBounding: numbers.ARROW_BOUNDING,
|
|
@@ -35894,10 +35926,15 @@ class input_Input extends baseComponent_BaseComponent {
|
|
|
35894
35926
|
eyeClosed: value
|
|
35895
35927
|
}),
|
|
35896
35928
|
toggleFocusing: isFocus => {
|
|
35929
|
+
const {
|
|
35930
|
+
preventScroll
|
|
35931
|
+
} = this.props;
|
|
35897
35932
|
const input = this.inputRef && this.inputRef.current;
|
|
35898
35933
|
|
|
35899
35934
|
if (isFocus) {
|
|
35900
|
-
input && input.focus(
|
|
35935
|
+
input && input.focus({
|
|
35936
|
+
preventScroll
|
|
35937
|
+
});
|
|
35901
35938
|
} else {
|
|
35902
35939
|
input && input.blur();
|
|
35903
35940
|
}
|
|
@@ -36130,9 +36167,10 @@ class input_Input extends baseComponent_BaseComponent {
|
|
|
36130
36167
|
inputStyle,
|
|
36131
36168
|
forwardRef,
|
|
36132
36169
|
maxLength,
|
|
36133
|
-
getValueLength
|
|
36170
|
+
getValueLength,
|
|
36171
|
+
preventScroll
|
|
36134
36172
|
} = _a,
|
|
36135
|
-
rest = input_rest(_a, ["addonAfter", "addonBefore", "autofocus", "className", "disabled", "placeholder", "prefix", "mode", "insetLabel", "insetLabelId", "validateStatus", "type", "readonly", "size", "suffix", "style", "showClear", "onEnterPress", "onClear", "hideSuffix", "inputStyle", "forwardRef", "maxLength", "getValueLength"]);
|
|
36173
|
+
rest = input_rest(_a, ["addonAfter", "addonBefore", "autofocus", "className", "disabled", "placeholder", "prefix", "mode", "insetLabel", "insetLabelId", "validateStatus", "type", "readonly", "size", "suffix", "style", "showClear", "onEnterPress", "onClear", "hideSuffix", "inputStyle", "forwardRef", "maxLength", "getValueLength", "preventScroll"]);
|
|
36136
36174
|
|
|
36137
36175
|
const {
|
|
36138
36176
|
value,
|
|
@@ -36257,7 +36295,8 @@ input_Input.propTypes = {
|
|
|
36257
36295
|
insetLabel: prop_types_default.a.node,
|
|
36258
36296
|
insetLabelId: prop_types_default.a.string,
|
|
36259
36297
|
inputStyle: prop_types_default.a.object,
|
|
36260
|
-
getValueLength: prop_types_default.a.func
|
|
36298
|
+
getValueLength: prop_types_default.a.func,
|
|
36299
|
+
preventScroll: prop_types_default.a.bool
|
|
36261
36300
|
};
|
|
36262
36301
|
input_Input.defaultProps = {
|
|
36263
36302
|
addonBefore: '',
|
|
@@ -49132,7 +49171,12 @@ class checkboxInner_CheckboxInner extends external_root_React_commonjs2_react_co
|
|
|
49132
49171
|
}
|
|
49133
49172
|
|
|
49134
49173
|
focus() {
|
|
49135
|
-
|
|
49174
|
+
const {
|
|
49175
|
+
preventScroll
|
|
49176
|
+
} = this.props;
|
|
49177
|
+
this.inputEntity.focus({
|
|
49178
|
+
preventScroll
|
|
49179
|
+
});
|
|
49136
49180
|
}
|
|
49137
49181
|
|
|
49138
49182
|
render() {
|
|
@@ -49200,7 +49244,11 @@ checkboxInner_CheckboxInner.propTypes = {
|
|
|
49200
49244
|
value: prop_types_default.a.any,
|
|
49201
49245
|
isPureCardType: prop_types_default.a.bool,
|
|
49202
49246
|
addonId: prop_types_default.a.string,
|
|
49203
|
-
extraId: prop_types_default.a.string
|
|
49247
|
+
extraId: prop_types_default.a.string,
|
|
49248
|
+
focusInner: prop_types_default.a.bool,
|
|
49249
|
+
onInputFocus: prop_types_default.a.func,
|
|
49250
|
+
onInputBlur: prop_types_default.a.func,
|
|
49251
|
+
preventScroll: prop_types_default.a.bool
|
|
49204
49252
|
};
|
|
49205
49253
|
checkboxInner_CheckboxInner.defaultProps = {
|
|
49206
49254
|
onChange: noop_default.a
|
|
@@ -49420,7 +49468,8 @@ checkbox_Checkbox.propTypes = {
|
|
|
49420
49468
|
extra: prop_types_default.a.node,
|
|
49421
49469
|
index: prop_types_default.a.number,
|
|
49422
49470
|
'aria-label': prop_types_default.a.string,
|
|
49423
|
-
tabIndex: prop_types_default.a.number
|
|
49471
|
+
tabIndex: prop_types_default.a.number,
|
|
49472
|
+
preventScroll: prop_types_default.a.bool
|
|
49424
49473
|
};
|
|
49425
49474
|
checkbox_Checkbox.defaultProps = {
|
|
49426
49475
|
defaultChecked: false,
|
|
@@ -50687,11 +50736,14 @@ class tagInput_TagInput extends baseComponent_BaseComponent {
|
|
|
50687
50736
|
componentDidMount() {
|
|
50688
50737
|
const {
|
|
50689
50738
|
disabled,
|
|
50690
|
-
autoFocus
|
|
50739
|
+
autoFocus,
|
|
50740
|
+
preventScroll
|
|
50691
50741
|
} = this.props;
|
|
50692
50742
|
|
|
50693
50743
|
if (!disabled && autoFocus) {
|
|
50694
|
-
this.inputRef.current.focus(
|
|
50744
|
+
this.inputRef.current.focus({
|
|
50745
|
+
preventScroll
|
|
50746
|
+
});
|
|
50695
50747
|
}
|
|
50696
50748
|
}
|
|
50697
50749
|
|
|
@@ -50841,7 +50893,12 @@ class tagInput_TagInput extends baseComponent_BaseComponent {
|
|
|
50841
50893
|
}
|
|
50842
50894
|
|
|
50843
50895
|
focus() {
|
|
50844
|
-
|
|
50896
|
+
const {
|
|
50897
|
+
preventScroll
|
|
50898
|
+
} = this.props;
|
|
50899
|
+
this.inputRef.current.focus({
|
|
50900
|
+
preventScroll
|
|
50901
|
+
});
|
|
50845
50902
|
}
|
|
50846
50903
|
|
|
50847
50904
|
render() {
|
|
@@ -50941,7 +50998,8 @@ tagInput_TagInput.propTypes = {
|
|
|
50941
50998
|
validateStatus: prop_types_default.a.oneOf(tagInput_constants_strings.STATUS),
|
|
50942
50999
|
prefix: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.node]),
|
|
50943
51000
|
suffix: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.node]),
|
|
50944
|
-
'aria-label': prop_types_default.a.string
|
|
51001
|
+
'aria-label': prop_types_default.a.string,
|
|
51002
|
+
preventScroll: prop_types_default.a.bool
|
|
50945
51003
|
};
|
|
50946
51004
|
tagInput_TagInput.defaultProps = {
|
|
50947
51005
|
showClear: false,
|
|
@@ -51545,9 +51603,15 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
51545
51603
|
});
|
|
51546
51604
|
},
|
|
51547
51605
|
focusInput: () => {
|
|
51606
|
+
const {
|
|
51607
|
+
preventScroll
|
|
51608
|
+
} = this.props;
|
|
51609
|
+
|
|
51548
51610
|
if (this.inputRef && this.inputRef.current) {
|
|
51549
51611
|
// TODO: check the reason
|
|
51550
|
-
this.inputRef.current.focus(
|
|
51612
|
+
this.inputRef.current.focus({
|
|
51613
|
+
preventScroll
|
|
51614
|
+
});
|
|
51551
51615
|
}
|
|
51552
51616
|
}
|
|
51553
51617
|
};
|
|
@@ -51963,7 +52027,8 @@ cascader_Cascader.propTypes = {
|
|
|
51963
52027
|
loadedKeys: prop_types_default.a.array,
|
|
51964
52028
|
disableStrictly: prop_types_default.a.bool,
|
|
51965
52029
|
leafOnly: prop_types_default.a.bool,
|
|
51966
|
-
enableLeafClick: prop_types_default.a.bool
|
|
52030
|
+
enableLeafClick: prop_types_default.a.bool,
|
|
52031
|
+
preventScroll: prop_types_default.a.bool
|
|
51967
52032
|
};
|
|
51968
52033
|
cascader_Cascader.defaultProps = {
|
|
51969
52034
|
leafOnly: false,
|
|
@@ -64802,6 +64867,10 @@ class datePicker_DatePicker extends baseComponent_BaseComponent {
|
|
|
64802
64867
|
motionEnd
|
|
64803
64868
|
}),
|
|
64804
64869
|
setRangeInputFocus: rangeInputFocus => {
|
|
64870
|
+
const {
|
|
64871
|
+
preventScroll
|
|
64872
|
+
} = this.props;
|
|
64873
|
+
|
|
64805
64874
|
if (rangeInputFocus !== this.state.rangeInputFocus) {
|
|
64806
64875
|
this.setState({
|
|
64807
64876
|
rangeInputFocus
|
|
@@ -64812,7 +64881,9 @@ class datePicker_DatePicker extends baseComponent_BaseComponent {
|
|
|
64812
64881
|
case 'rangeStart':
|
|
64813
64882
|
const inputStartNode = get_default()(this, 'rangeInputStartRef.current');
|
|
64814
64883
|
|
|
64815
|
-
inputStartNode && inputStartNode.focus(
|
|
64884
|
+
inputStartNode && inputStartNode.focus({
|
|
64885
|
+
preventScroll
|
|
64886
|
+
});
|
|
64816
64887
|
/**
|
|
64817
64888
|
* 解决选择完startDate,切换到endDate后panel被立马关闭的问题。
|
|
64818
64889
|
* 用户打开panel,选了startDate后,会执行setRangeInputFocus('rangeEnd'),focus到endDateInput,
|
|
@@ -64836,7 +64907,9 @@ class datePicker_DatePicker extends baseComponent_BaseComponent {
|
|
|
64836
64907
|
case 'rangeEnd':
|
|
64837
64908
|
const inputEndNode = get_default()(this, 'rangeInputEndRef.current');
|
|
64838
64909
|
|
|
64839
|
-
inputEndNode && inputEndNode.focus(
|
|
64910
|
+
inputEndNode && inputEndNode.focus({
|
|
64911
|
+
preventScroll
|
|
64912
|
+
});
|
|
64840
64913
|
/**
|
|
64841
64914
|
* 解决选择完startDate,切换到endDate后panel被立马关闭的问题。
|
|
64842
64915
|
* 用户打开panel,选了startDate后,会执行setRangeInputFocus('rangeEnd'),focus到endDateInput,
|
|
@@ -64864,6 +64937,9 @@ class datePicker_DatePicker extends baseComponent_BaseComponent {
|
|
|
64864
64937
|
couldPanelClosed: () => this.focusRecordsRef.current.rangeStart && this.focusRecordsRef.current.rangeEnd,
|
|
64865
64938
|
isEventTarget: e => e && e.target === e.currentTarget,
|
|
64866
64939
|
setInsetInputFocus: () => {
|
|
64940
|
+
const {
|
|
64941
|
+
preventScroll
|
|
64942
|
+
} = this.props;
|
|
64867
64943
|
const {
|
|
64868
64944
|
rangeInputFocus
|
|
64869
64945
|
} = this.state;
|
|
@@ -64873,7 +64949,9 @@ class datePicker_DatePicker extends baseComponent_BaseComponent {
|
|
|
64873
64949
|
if (document.activeElement !== this.rangeInputEndRef.current) {
|
|
64874
64950
|
const inputEndNode = get_default()(this, 'rangeInputEndRef.current');
|
|
64875
64951
|
|
|
64876
|
-
inputEndNode && inputEndNode.focus(
|
|
64952
|
+
inputEndNode && inputEndNode.focus({
|
|
64953
|
+
preventScroll
|
|
64954
|
+
});
|
|
64877
64955
|
}
|
|
64878
64956
|
|
|
64879
64957
|
break;
|
|
@@ -64883,7 +64961,9 @@ class datePicker_DatePicker extends baseComponent_BaseComponent {
|
|
|
64883
64961
|
if (document.activeElement !== this.rangeInputStartRef.current) {
|
|
64884
64962
|
const inputStartNode = get_default()(this, 'rangeInputStartRef.current');
|
|
64885
64963
|
|
|
64886
|
-
inputStartNode && inputStartNode.focus(
|
|
64964
|
+
inputStartNode && inputStartNode.focus({
|
|
64965
|
+
preventScroll
|
|
64966
|
+
});
|
|
64887
64967
|
}
|
|
64888
64968
|
|
|
64889
64969
|
break;
|
|
@@ -65203,7 +65283,8 @@ datePicker_DatePicker.propTypes = {
|
|
|
65203
65283
|
syncSwitchMonth: prop_types_default.a.bool,
|
|
65204
65284
|
// Callback function for panel date switching
|
|
65205
65285
|
onPanelChange: prop_types_default.a.func,
|
|
65206
|
-
rangeSeparator: prop_types_default.a.string
|
|
65286
|
+
rangeSeparator: prop_types_default.a.string,
|
|
65287
|
+
preventScroll: prop_types_default.a.bool
|
|
65207
65288
|
};
|
|
65208
65289
|
datePicker_DatePicker.defaultProps = {
|
|
65209
65290
|
onChangeWithDateFirst: true,
|
|
@@ -66076,6 +66157,9 @@ class ModalContent_ModalContent extends baseComponent_BaseComponent {
|
|
|
66076
66157
|
},
|
|
66077
66158
|
getMouseState: () => this.state.dialogMouseDown,
|
|
66078
66159
|
modalDialogFocus: () => {
|
|
66160
|
+
const {
|
|
66161
|
+
preventScroll
|
|
66162
|
+
} = this.props;
|
|
66079
66163
|
let activeElementInDialog;
|
|
66080
66164
|
|
|
66081
66165
|
if (this.modalDialogRef) {
|
|
@@ -66084,7 +66168,9 @@ class ModalContent_ModalContent extends baseComponent_BaseComponent {
|
|
|
66084
66168
|
}
|
|
66085
66169
|
|
|
66086
66170
|
if (!activeElementInDialog) {
|
|
66087
|
-
this.modalDialogRef && this.modalDialogRef.current.focus(
|
|
66171
|
+
this.modalDialogRef && this.modalDialogRef.current.focus({
|
|
66172
|
+
preventScroll
|
|
66173
|
+
});
|
|
66088
66174
|
}
|
|
66089
66175
|
},
|
|
66090
66176
|
modalDialogBlur: () => {
|
|
@@ -66094,10 +66180,15 @@ class ModalContent_ModalContent extends baseComponent_BaseComponent {
|
|
|
66094
66180
|
const {
|
|
66095
66181
|
prevFocusElement
|
|
66096
66182
|
} = this.state;
|
|
66183
|
+
const {
|
|
66184
|
+
preventScroll
|
|
66185
|
+
} = this.props;
|
|
66097
66186
|
|
|
66098
66187
|
const focus = get_default()(prevFocusElement, 'focus');
|
|
66099
66188
|
|
|
66100
|
-
isFunction_default()(focus) && prevFocusElement.focus(
|
|
66189
|
+
isFunction_default()(focus) && prevFocusElement.focus({
|
|
66190
|
+
preventScroll
|
|
66191
|
+
});
|
|
66101
66192
|
}
|
|
66102
66193
|
});
|
|
66103
66194
|
}
|
|
@@ -66152,7 +66243,8 @@ ModalContent_ModalContent.propTypes = {
|
|
|
66152
66243
|
getContainerContext: prop_types_default.a.func,
|
|
66153
66244
|
contentClassName: prop_types_default.a.string,
|
|
66154
66245
|
maskClassName: prop_types_default.a.string,
|
|
66155
|
-
onAnimationEnd: prop_types_default.a.func
|
|
66246
|
+
onAnimationEnd: prop_types_default.a.func,
|
|
66247
|
+
preventScroll: prop_types_default.a.bool
|
|
66156
66248
|
};
|
|
66157
66249
|
ModalContent_ModalContent.defaultProps = {
|
|
66158
66250
|
close: noop_default.a,
|
|
@@ -70134,6 +70226,8 @@ var inputNumber_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
70134
70226
|
}
|
|
70135
70227
|
return t;
|
|
70136
70228
|
};
|
|
70229
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
70230
|
+
|
|
70137
70231
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
70138
70232
|
|
|
70139
70233
|
/* eslint-disable no-unused-vars */
|
|
@@ -70397,7 +70491,8 @@ class inputNumber_InputNumber extends baseComponent_BaseComponent {
|
|
|
70397
70491
|
|
|
70398
70492
|
componentDidUpdate(prevProps) {
|
|
70399
70493
|
const {
|
|
70400
|
-
value
|
|
70494
|
+
value,
|
|
70495
|
+
preventScroll
|
|
70401
70496
|
} = this.props;
|
|
70402
70497
|
const {
|
|
70403
70498
|
focusing
|
|
@@ -70512,7 +70607,9 @@ class inputNumber_InputNumber extends baseComponent_BaseComponent {
|
|
|
70512
70607
|
|
|
70513
70608
|
if (this.props.keepFocus && this.state.focusing) {
|
|
70514
70609
|
if (document.activeElement !== this.inputNode) {
|
|
70515
|
-
this.inputNode.focus(
|
|
70610
|
+
this.inputNode.focus({
|
|
70611
|
+
preventScroll
|
|
70612
|
+
});
|
|
70516
70613
|
}
|
|
70517
70614
|
}
|
|
70518
70615
|
}
|
|
@@ -70622,6 +70719,7 @@ inputNumber_InputNumber.propTypes = {
|
|
|
70622
70719
|
prefixCls: prop_types_default.a.string,
|
|
70623
70720
|
pressInterval: prop_types_default.a.number,
|
|
70624
70721
|
pressTimeout: prop_types_default.a.number,
|
|
70722
|
+
preventScroll: prop_types_default.a.bool,
|
|
70625
70723
|
shiftStep: prop_types_default.a.number,
|
|
70626
70724
|
step: prop_types_default.a.number,
|
|
70627
70725
|
style: prop_types_default.a.object,
|
|
@@ -78334,8 +78432,14 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
78334
78432
|
});
|
|
78335
78433
|
},
|
|
78336
78434
|
focusInput: () => {
|
|
78435
|
+
const {
|
|
78436
|
+
preventScroll
|
|
78437
|
+
} = this.props;
|
|
78438
|
+
|
|
78337
78439
|
if (this.inputRef && this.inputRef.current) {
|
|
78338
|
-
this.inputRef.current.focus(
|
|
78440
|
+
this.inputRef.current.focus({
|
|
78441
|
+
preventScroll
|
|
78442
|
+
});
|
|
78339
78443
|
}
|
|
78340
78444
|
}
|
|
78341
78445
|
};
|
|
@@ -78487,8 +78591,13 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
78487
78591
|
},
|
|
78488
78592
|
focusTrigger: () => {
|
|
78489
78593
|
try {
|
|
78594
|
+
const {
|
|
78595
|
+
preventScroll
|
|
78596
|
+
} = this.props;
|
|
78490
78597
|
const el = this.triggerRef.current;
|
|
78491
|
-
el.focus(
|
|
78598
|
+
el.focus({
|
|
78599
|
+
preventScroll
|
|
78600
|
+
});
|
|
78492
78601
|
} catch (error) {}
|
|
78493
78602
|
},
|
|
78494
78603
|
updateScrollTop: index => {
|
|
@@ -79285,7 +79394,8 @@ select_Select.propTypes = {
|
|
|
79285
79394
|
virtualize: prop_types_default.a.object,
|
|
79286
79395
|
renderOptionItem: prop_types_default.a.func,
|
|
79287
79396
|
onListScroll: prop_types_default.a.func,
|
|
79288
|
-
arrowIcon: prop_types_default.a.node
|
|
79397
|
+
arrowIcon: prop_types_default.a.node,
|
|
79398
|
+
preventScroll: prop_types_default.a.bool // open: PropTypes.bool,
|
|
79289
79399
|
// tagClosable: PropTypes.bool,
|
|
79290
79400
|
|
|
79291
79401
|
};
|
|
@@ -81426,7 +81536,12 @@ class radioInner_RadioInner extends baseComponent_BaseComponent {
|
|
|
81426
81536
|
}
|
|
81427
81537
|
|
|
81428
81538
|
focus() {
|
|
81429
|
-
|
|
81539
|
+
const {
|
|
81540
|
+
preventScroll
|
|
81541
|
+
} = this.props;
|
|
81542
|
+
this.inputEntity.focus({
|
|
81543
|
+
preventScroll
|
|
81544
|
+
});
|
|
81430
81545
|
}
|
|
81431
81546
|
|
|
81432
81547
|
onChange(e) {
|
|
@@ -81488,7 +81603,11 @@ radioInner_RadioInner.propTypes = {
|
|
|
81488
81603
|
isButtonRadio: prop_types_default.a.bool,
|
|
81489
81604
|
onChange: prop_types_default.a.func,
|
|
81490
81605
|
mode: prop_types_default.a.oneOf(['advanced', '']),
|
|
81491
|
-
'aria-label': prop_types_default.a.string
|
|
81606
|
+
'aria-label': prop_types_default.a.string,
|
|
81607
|
+
focusInner: prop_types_default.a.bool,
|
|
81608
|
+
onInputFocus: prop_types_default.a.func,
|
|
81609
|
+
onInputBlur: prop_types_default.a.func,
|
|
81610
|
+
preventScroll: prop_types_default.a.bool
|
|
81492
81611
|
};
|
|
81493
81612
|
radioInner_RadioInner.defaultProps = {
|
|
81494
81613
|
onChange: noop_default.a,
|
|
@@ -81699,7 +81818,8 @@ radio_Radio.propTypes = {
|
|
|
81699
81818
|
addonStyle: prop_types_default.a.object,
|
|
81700
81819
|
addonClassName: prop_types_default.a.string,
|
|
81701
81820
|
type: prop_types_default.a.oneOf([radio_constants_strings.TYPE_DEFAULT, radio_constants_strings.TYPE_BUTTON, radio_constants_strings.TYPE_CARD, radio_constants_strings.TYPE_PURECARD]),
|
|
81702
|
-
'aria-label': prop_types_default.a.string
|
|
81821
|
+
'aria-label': prop_types_default.a.string,
|
|
81822
|
+
preventScroll: prop_types_default.a.bool
|
|
81703
81823
|
};
|
|
81704
81824
|
radio_Radio.defaultProps = {
|
|
81705
81825
|
autoFocus: false,
|
|
@@ -82041,7 +82161,10 @@ rating_item_Item.propTypes = {
|
|
|
82041
82161
|
disabled: prop_types_default.a.bool,
|
|
82042
82162
|
count: prop_types_default.a.number,
|
|
82043
82163
|
size: prop_types_default.a.oneOfType([prop_types_default.a.oneOf(rating_constants_strings.SIZE_SET), prop_types_default.a.number]),
|
|
82044
|
-
'aria-describedby': prop_types_default.a.string
|
|
82164
|
+
'aria-describedby': prop_types_default.a.string,
|
|
82165
|
+
onFocus: prop_types_default.a.func,
|
|
82166
|
+
onBlur: prop_types_default.a.func,
|
|
82167
|
+
preventScroll: prop_types_default.a.bool
|
|
82045
82168
|
};
|
|
82046
82169
|
// CONCATENATED MODULE: ../semi-foundation/rating/foundation.ts
|
|
82047
82170
|
|
|
@@ -82282,11 +82405,14 @@ class rating_Rating extends baseComponent_BaseComponent {
|
|
|
82282
82405
|
|
|
82283
82406
|
this.focus = () => {
|
|
82284
82407
|
const {
|
|
82285
|
-
disabled
|
|
82408
|
+
disabled,
|
|
82409
|
+
preventScroll
|
|
82286
82410
|
} = this.props;
|
|
82287
82411
|
|
|
82288
82412
|
if (!disabled) {
|
|
82289
|
-
this.rate.focus(
|
|
82413
|
+
this.rate.focus({
|
|
82414
|
+
preventScroll
|
|
82415
|
+
});
|
|
82290
82416
|
}
|
|
82291
82417
|
};
|
|
82292
82418
|
|
|
@@ -82333,11 +82459,14 @@ class rating_Rating extends baseComponent_BaseComponent {
|
|
|
82333
82459
|
return assign_default()(assign_default()({}, super.adapter), {
|
|
82334
82460
|
focus: () => {
|
|
82335
82461
|
const {
|
|
82336
|
-
disabled
|
|
82462
|
+
disabled,
|
|
82463
|
+
preventScroll
|
|
82337
82464
|
} = this.props;
|
|
82338
82465
|
|
|
82339
82466
|
if (!disabled) {
|
|
82340
|
-
this.rate.focus(
|
|
82467
|
+
this.rate.focus({
|
|
82468
|
+
preventScroll
|
|
82469
|
+
});
|
|
82341
82470
|
}
|
|
82342
82471
|
},
|
|
82343
82472
|
getStarDOM: index => {
|
|
@@ -82513,7 +82642,8 @@ rating_Rating.propTypes = {
|
|
|
82513
82642
|
autoFocus: prop_types_default.a.bool,
|
|
82514
82643
|
size: prop_types_default.a.oneOfType([prop_types_default.a.oneOf(rating_constants_strings.SIZE_SET), prop_types_default.a.number]),
|
|
82515
82644
|
tooltips: prop_types_default.a.arrayOf(prop_types_default.a.string),
|
|
82516
|
-
id: prop_types_default.a.string
|
|
82645
|
+
id: prop_types_default.a.string,
|
|
82646
|
+
preventScroll: prop_types_default.a.bool
|
|
82517
82647
|
};
|
|
82518
82648
|
rating_Rating.defaultProps = {
|
|
82519
82649
|
defaultValue: 0,
|
|
@@ -94274,7 +94404,8 @@ tabs_Tabs.propTypes = {
|
|
|
94274
94404
|
tabPaneMotion: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.object, prop_types_default.a.func]),
|
|
94275
94405
|
tabPosition: prop_types_default.a.oneOf(tabs_constants_strings.POSITION_MAP),
|
|
94276
94406
|
type: prop_types_default.a.oneOf(tabs_constants_strings.TYPE_MAP),
|
|
94277
|
-
onTabClose: prop_types_default.a.func
|
|
94407
|
+
onTabClose: prop_types_default.a.func,
|
|
94408
|
+
preventScroll: prop_types_default.a.bool
|
|
94278
94409
|
};
|
|
94279
94410
|
tabs_Tabs.defaultProps = {
|
|
94280
94411
|
children: [],
|
|
@@ -95226,7 +95357,8 @@ class TimeInput_TimeInput extends baseComponent_BaseComponent {
|
|
|
95226
95357
|
componentDidMount() {
|
|
95227
95358
|
super.componentDidMount();
|
|
95228
95359
|
const {
|
|
95229
|
-
focusOnOpen
|
|
95360
|
+
focusOnOpen,
|
|
95361
|
+
preventScroll
|
|
95230
95362
|
} = this.props;
|
|
95231
95363
|
|
|
95232
95364
|
if (focusOnOpen) {
|
|
@@ -95235,7 +95367,9 @@ class TimeInput_TimeInput extends baseComponent_BaseComponent {
|
|
|
95235
95367
|
const inputNode = this.adapter.getCache('inputNode');
|
|
95236
95368
|
|
|
95237
95369
|
if (inputNode) {
|
|
95238
|
-
inputNode.focus(
|
|
95370
|
+
inputNode.focus({
|
|
95371
|
+
preventScroll
|
|
95372
|
+
});
|
|
95239
95373
|
inputNode.select();
|
|
95240
95374
|
}
|
|
95241
95375
|
});
|
|
@@ -95364,7 +95498,8 @@ TimeInput_TimeInput.propTypes = {
|
|
|
95364
95498
|
locale: prop_types_default.a.object,
|
|
95365
95499
|
localeCode: prop_types_default.a.string,
|
|
95366
95500
|
insetLabel: prop_types_default.a.node,
|
|
95367
|
-
validateStatus: prop_types_default.a.string
|
|
95501
|
+
validateStatus: prop_types_default.a.string,
|
|
95502
|
+
preventScroll: prop_types_default.a.bool
|
|
95368
95503
|
};
|
|
95369
95504
|
TimeInput_TimeInput.defaultProps = {
|
|
95370
95505
|
inputReadOnly: false,
|
|
@@ -95845,7 +95980,8 @@ TimePicker_TimePicker.propTypes = assign_default()(assign_default()({
|
|
|
95845
95980
|
motion: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.func, prop_types_default.a.object]),
|
|
95846
95981
|
autoAdjustOverflow: prop_types_default.a.bool
|
|
95847
95982
|
}, PanelShape), {
|
|
95848
|
-
inputStyle: prop_types_default.a.object
|
|
95983
|
+
inputStyle: prop_types_default.a.object,
|
|
95984
|
+
preventScroll: prop_types_default.a.bool
|
|
95849
95985
|
});
|
|
95850
95986
|
TimePicker_TimePicker.defaultProps = assign_default()({
|
|
95851
95987
|
autoAdjustOverflow: true,
|
|
@@ -98743,8 +98879,14 @@ class tree_Tree extends baseComponent_BaseComponent {
|
|
|
98743
98879
|
});
|
|
98744
98880
|
},
|
|
98745
98881
|
focusInput: () => {
|
|
98882
|
+
const {
|
|
98883
|
+
preventScroll
|
|
98884
|
+
} = this.props;
|
|
98885
|
+
|
|
98746
98886
|
if (this.inputRef && this.inputRef.current) {
|
|
98747
|
-
this.inputRef.current.focus(
|
|
98887
|
+
this.inputRef.current.focus({
|
|
98888
|
+
preventScroll
|
|
98889
|
+
});
|
|
98748
98890
|
}
|
|
98749
98891
|
}
|
|
98750
98892
|
};
|
|
@@ -99050,7 +99192,8 @@ tree_Tree.propTypes = {
|
|
|
99050
99192
|
onDrop: prop_types_default.a.func,
|
|
99051
99193
|
labelEllipsis: prop_types_default.a.bool,
|
|
99052
99194
|
checkRelation: prop_types_default.a.string,
|
|
99053
|
-
'aria-label': prop_types_default.a.string
|
|
99195
|
+
'aria-label': prop_types_default.a.string,
|
|
99196
|
+
preventScroll: prop_types_default.a.bool
|
|
99054
99197
|
};
|
|
99055
99198
|
tree_Tree.defaultProps = {
|
|
99056
99199
|
showClear: true,
|