@douyinfe/semi-ui 2.20.2 → 2.20.4

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.
Files changed (66) hide show
  1. package/README.md +4 -4
  2. package/dist/css/semi.css +7 -0
  3. package/dist/css/semi.min.css +1 -1
  4. package/dist/umd/semi-ui.js +285 -251
  5. package/dist/umd/semi-ui.js.map +1 -1
  6. package/dist/umd/semi-ui.min.js +1 -1
  7. package/dist/umd/semi-ui.min.js.map +1 -1
  8. package/lib/cjs/anchor/index.d.ts +1 -1
  9. package/lib/cjs/autoComplete/index.d.ts +1 -1
  10. package/lib/cjs/breadcrumb/item.js +1 -0
  11. package/lib/cjs/button/buttonGroup.js +14 -9
  12. package/lib/cjs/datePicker/datePicker.d.ts +2 -2
  13. package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
  14. package/lib/cjs/datePicker/quickControl.d.ts +1 -1
  15. package/lib/cjs/datePicker/yearAndMonth.d.ts +1 -1
  16. package/lib/cjs/dropdown/index.d.ts +1 -1
  17. package/lib/cjs/dropdown/index.js +2 -1
  18. package/lib/cjs/form/baseForm.d.ts +1 -1
  19. package/lib/cjs/form/field.d.ts +1 -1
  20. package/lib/cjs/form/hoc/withField.js +7 -4
  21. package/lib/cjs/image/image.d.ts +0 -1
  22. package/lib/cjs/image/image.js +0 -2
  23. package/lib/cjs/image/index.d.ts +1 -0
  24. package/lib/cjs/image/index.js +2 -0
  25. package/lib/cjs/inputNumber/index.js +1 -1
  26. package/lib/cjs/modal/ModalContent.js +9 -2
  27. package/lib/cjs/navigation/Footer.js +2 -2
  28. package/lib/cjs/navigation/OpenIconTransition.js +1 -0
  29. package/lib/cjs/navigation/SubNav.js +6 -2
  30. package/lib/cjs/popover/index.d.ts +1 -1
  31. package/lib/cjs/select/index.d.ts +1 -1
  32. package/lib/cjs/table/Body/index.js +1 -1
  33. package/lib/cjs/table/Table.d.ts +1 -1
  34. package/lib/cjs/timeline/index.js +1 -0
  35. package/lib/cjs/tooltip/index.d.ts +1 -1
  36. package/lib/cjs/typography/title.d.ts +1 -1
  37. package/lib/es/anchor/index.d.ts +1 -1
  38. package/lib/es/autoComplete/index.d.ts +1 -1
  39. package/lib/es/breadcrumb/item.js +1 -0
  40. package/lib/es/button/buttonGroup.js +14 -9
  41. package/lib/es/datePicker/datePicker.d.ts +2 -2
  42. package/lib/es/datePicker/monthsGrid.d.ts +1 -1
  43. package/lib/es/datePicker/quickControl.d.ts +1 -1
  44. package/lib/es/datePicker/yearAndMonth.d.ts +1 -1
  45. package/lib/es/dropdown/index.d.ts +1 -1
  46. package/lib/es/dropdown/index.js +2 -1
  47. package/lib/es/form/baseForm.d.ts +1 -1
  48. package/lib/es/form/field.d.ts +1 -1
  49. package/lib/es/form/hoc/withField.js +8 -5
  50. package/lib/es/image/image.d.ts +0 -1
  51. package/lib/es/image/image.js +0 -1
  52. package/lib/es/image/index.d.ts +1 -0
  53. package/lib/es/image/index.js +1 -0
  54. package/lib/es/inputNumber/index.js +1 -1
  55. package/lib/es/modal/ModalContent.js +8 -2
  56. package/lib/es/navigation/Footer.js +2 -2
  57. package/lib/es/navigation/OpenIconTransition.js +1 -0
  58. package/lib/es/navigation/SubNav.js +6 -2
  59. package/lib/es/popover/index.d.ts +1 -1
  60. package/lib/es/select/index.d.ts +1 -1
  61. package/lib/es/table/Body/index.js +1 -1
  62. package/lib/es/table/Table.d.ts +1 -1
  63. package/lib/es/timeline/index.js +1 -0
  64. package/lib/es/tooltip/index.d.ts +1 -1
  65. package/lib/es/typography/title.d.ts +1 -1
  66. package/package.json +7 -7
@@ -7856,6 +7856,216 @@ var defineProperty = (function() {
7856
7856
  module.exports = defineProperty;
7857
7857
 
7858
7858
 
7859
+ /***/ }),
7860
+
7861
+ /***/ "Q0Dl":
7862
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
7863
+
7864
+ "use strict";
7865
+ /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return stopPropagation; });
7866
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return cloneDeep; });
7867
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getHighLightTextHTML; });
7868
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return registerMediaQuery; });
7869
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isSemiIcon; });
7870
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getActiveElement; });
7871
+ /* unused harmony export isNodeContainsFocus */
7872
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getFocusableElements; });
7873
+ /* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2srY");
7874
+ /* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_0__);
7875
+ /* harmony import */ var lodash_set__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("DL3M");
7876
+ /* harmony import */ var lodash_set__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_set__WEBPACK_IMPORTED_MODULE_1__);
7877
+ /* harmony import */ var lodash_cloneDeepWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("NdXQ");
7878
+ /* harmony import */ var lodash_cloneDeepWith__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeepWith__WEBPACK_IMPORTED_MODULE_2__);
7879
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("cDcd");
7880
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
7881
+ /* harmony import */ var _douyinfe_semi_foundation_utils_warning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("MYbw");
7882
+ /* harmony import */ var _douyinfe_semi_foundation_utils_getHighlight__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("C5xO");
7883
+ /* harmony import */ var _douyinfe_semi_foundation_utils_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("Awix");
7884
+
7885
+
7886
+
7887
+
7888
+ /* eslint-disable max-len */
7889
+
7890
+ /* argus-disable unPkgSensitiveInfo */
7891
+
7892
+
7893
+
7894
+
7895
+ /**
7896
+ * stop propagation
7897
+ *
7898
+ * @param {React.MouseEvent<HTMLElement>} e React mouse event object
7899
+ * @param {boolean} noImmediate Skip stopping immediate propagation
7900
+ */
7901
+
7902
+ function stopPropagation(e, noImmediate) {
7903
+ if (e && typeof e.stopPropagation === 'function') {
7904
+ e.stopPropagation();
7905
+ }
7906
+
7907
+ if (!noImmediate && e.nativeEvent && typeof e.nativeEvent.stopImmediatePropagation === 'function') {
7908
+ e.nativeEvent.stopImmediatePropagation();
7909
+ }
7910
+ }
7911
+ /**
7912
+ *
7913
+ * @param {any} value
7914
+ * @param {Function} customizer
7915
+ * @returns {any}
7916
+ * use in Table, Form, Navigation
7917
+ */
7918
+
7919
+ function cloneDeep(value, customizer) {
7920
+ return lodash_cloneDeepWith__WEBPACK_IMPORTED_MODULE_2___default()(value, v => {
7921
+ if (typeof customizer === 'function') {
7922
+ return customizer(v);
7923
+ }
7924
+
7925
+ if (typeof v === 'function' || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.isValidElement(v)) {
7926
+ return v;
7927
+ }
7928
+
7929
+ if (Object.prototype.toString.call(v) === '[object Error]') {
7930
+ return v;
7931
+ }
7932
+
7933
+ if (Array.isArray(v) && v.length === 0) {
7934
+ const keys = Object.keys(v);
7935
+
7936
+ if (keys.length) {
7937
+ const newArray = [];
7938
+ keys.forEach(key => {
7939
+ lodash_set__WEBPACK_IMPORTED_MODULE_1___default()(newArray, key, v[key]);
7940
+ }); // internal-issues:887
7941
+
7942
+ try {
7943
+ Object(_douyinfe_semi_foundation_utils_warning__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(lodash_get__WEBPACK_IMPORTED_MODULE_0___default()(process, 'env.NODE_ENV') !== 'production', "[Semi] You may use an out-of-bounds array. In some cases, your program may not behave as expected.\n The maximum length of an array is 4294967295.\n Please check whether the array subscript in your data exceeds the maximum value of the JS array subscript");
7944
+ } catch (e) {}
7945
+
7946
+ return newArray;
7947
+ } else {
7948
+ return undefined;
7949
+ }
7950
+ }
7951
+
7952
+ return undefined;
7953
+ });
7954
+ }
7955
+ /**
7956
+ * [getHighLightTextHTML description]
7957
+ *
7958
+ * @param {string} sourceString [source content text]
7959
+ * @param {Array<string>} searchWords [keywords to be highlighted]
7960
+ * @param {object} option
7961
+ * @param {true} option.highlightTag [The tag wrapped by the highlighted content, mark is used by default]
7962
+ * @param {true} option.highlightClassName
7963
+ * @param {true} option.highlightStyle
7964
+ * @param {boolean} option.caseSensitive
7965
+ *
7966
+ * @return {Array<object>}
7967
+ */
7968
+
7969
+ const getHighLightTextHTML = _ref => {
7970
+ let {
7971
+ sourceString = '',
7972
+ searchWords = [],
7973
+ option = {
7974
+ autoEscape: true,
7975
+ caseSensitive: false
7976
+ }
7977
+ } = _ref;
7978
+ const chunks = Object(_douyinfe_semi_foundation_utils_getHighlight__WEBPACK_IMPORTED_MODULE_5__[/* findAll */ "a"])(Object.assign({
7979
+ sourceString,
7980
+ searchWords
7981
+ }, option));
7982
+ const markEle = option.highlightTag || 'mark';
7983
+ const highlightClassName = option.highlightClassName || '';
7984
+ const highlightStyle = option.highlightStyle || {};
7985
+ return chunks.map((chunk, index) => {
7986
+ const {
7987
+ end,
7988
+ start,
7989
+ highlight
7990
+ } = chunk;
7991
+ const text = sourceString.substr(start, end - start);
7992
+
7993
+ if (highlight) {
7994
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(markEle, {
7995
+ style: highlightStyle,
7996
+ className: highlightClassName,
7997
+ key: text + index
7998
+ }, text);
7999
+ } else {
8000
+ return text;
8001
+ }
8002
+ });
8003
+ };
8004
+ /**
8005
+ * register matchFn and unMatchFn callback while media query
8006
+ * @param {string} media media string
8007
+ * @param {object} param param object
8008
+ * @returns function
8009
+ */
8010
+
8011
+ const registerMediaQuery = (media, _ref2) => {
8012
+ let {
8013
+ match,
8014
+ unmatch,
8015
+ callInInit = true
8016
+ } = _ref2;
8017
+
8018
+ if (typeof window !== 'undefined') {
8019
+ const mediaQueryList = window.matchMedia(media);
8020
+
8021
+ function handlerMediaChange(e) {
8022
+ if (e.matches) {
8023
+ match && match(e);
8024
+ } else {
8025
+ unmatch && unmatch(e);
8026
+ }
8027
+ }
8028
+
8029
+ callInInit && handlerMediaChange(mediaQueryList);
8030
+
8031
+ if (Object.prototype.hasOwnProperty.call(mediaQueryList, 'addEventListener')) {
8032
+ mediaQueryList.addEventListener('change', handlerMediaChange);
8033
+ return () => mediaQueryList.removeEventListener('change', handlerMediaChange);
8034
+ }
8035
+
8036
+ mediaQueryList.addListener(handlerMediaChange);
8037
+ return () => mediaQueryList.removeListener(handlerMediaChange);
8038
+ }
8039
+
8040
+ return () => undefined;
8041
+ };
8042
+ /**
8043
+ * Determine whether the incoming element is a built-in icon
8044
+ * @param icon 元素
8045
+ * @returns boolean
8046
+ */
8047
+
8048
+ const isSemiIcon = icon => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.isValidElement(icon) && lodash_get__WEBPACK_IMPORTED_MODULE_0___default()(icon.type, 'elementType') === 'Icon';
8049
+ function getActiveElement() {
8050
+ return document ? document.activeElement : null;
8051
+ }
8052
+ function isNodeContainsFocus(node) {
8053
+ const activeElement = getActiveElement();
8054
+ return activeElement === node || node.contains(activeElement);
8055
+ }
8056
+ function getFocusableElements(node) {
8057
+ if (!Object(_douyinfe_semi_foundation_utils_dom__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(node)) {
8058
+ return [];
8059
+ }
8060
+
8061
+ const focusableSelectorsList = ["input:not([disabled]):not([tabindex='-1'])", "textarea:not([disabled]):not([tabindex='-1'])", "button:not([disabled]):not([tabindex='-1'])", "a[href]:not([tabindex='-1'])", "select:not([disabled]):not([tabindex='-1'])", "area[href]:not([tabindex='-1'])", "iframe:not([tabindex='-1'])", "object:not([tabindex='-1'])", "*[tabindex]:not([tabindex='-1'])", "*[contenteditable]:not([tabindex='-1'])"];
8062
+ const focusableSelectorsStr = focusableSelectorsList.join(','); // we are not filtered elements which are invisible
8063
+
8064
+ const focusableElements = Array.from(node.querySelectorAll(focusableSelectorsStr));
8065
+ return focusableElements;
8066
+ }
8067
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("F63i")))
8068
+
7859
8069
  /***/ }),
7860
8070
 
7861
8071
  /***/ "Q4oW":
@@ -10053,216 +10263,6 @@ module.exports = isRegExp;
10053
10263
 
10054
10264
 
10055
10265
 
10056
- /***/ }),
10057
-
10058
- /***/ "UU7A":
10059
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
10060
-
10061
- "use strict";
10062
- /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return stopPropagation; });
10063
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return cloneDeep; });
10064
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getHighLightTextHTML; });
10065
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return registerMediaQuery; });
10066
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isSemiIcon; });
10067
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getActiveElement; });
10068
- /* unused harmony export isNodeContainsFocus */
10069
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getFocusableElements; });
10070
- /* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2srY");
10071
- /* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_0__);
10072
- /* harmony import */ var lodash_set__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("DL3M");
10073
- /* harmony import */ var lodash_set__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_set__WEBPACK_IMPORTED_MODULE_1__);
10074
- /* harmony import */ var lodash_cloneDeepWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("NdXQ");
10075
- /* harmony import */ var lodash_cloneDeepWith__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeepWith__WEBPACK_IMPORTED_MODULE_2__);
10076
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("cDcd");
10077
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
10078
- /* harmony import */ var _douyinfe_semi_foundation_utils_warning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("MYbw");
10079
- /* harmony import */ var _douyinfe_semi_foundation_utils_getHighlight__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("C5xO");
10080
- /* harmony import */ var _douyinfe_semi_foundation_utils_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("Awix");
10081
-
10082
-
10083
-
10084
-
10085
- /* eslint-disable max-len */
10086
-
10087
- /* argus-disable unPkgSensitiveInfo */
10088
-
10089
-
10090
-
10091
-
10092
- /**
10093
- * stop propagation
10094
- *
10095
- * @param {React.MouseEvent<HTMLElement>} e React mouse event object
10096
- * @param {boolean} noImmediate Skip stopping immediate propagation
10097
- */
10098
-
10099
- function stopPropagation(e, noImmediate) {
10100
- if (e && typeof e.stopPropagation === 'function') {
10101
- e.stopPropagation();
10102
- }
10103
-
10104
- if (!noImmediate && e.nativeEvent && typeof e.nativeEvent.stopImmediatePropagation === 'function') {
10105
- e.nativeEvent.stopImmediatePropagation();
10106
- }
10107
- }
10108
- /**
10109
- *
10110
- * @param {any} value
10111
- * @param {Function} customizer
10112
- * @returns {any}
10113
- * use in Table, Form, Navigation
10114
- */
10115
-
10116
- function cloneDeep(value, customizer) {
10117
- return lodash_cloneDeepWith__WEBPACK_IMPORTED_MODULE_2___default()(value, v => {
10118
- if (typeof customizer === 'function') {
10119
- return customizer(v);
10120
- }
10121
-
10122
- if (typeof v === 'function' || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.isValidElement(v)) {
10123
- return v;
10124
- }
10125
-
10126
- if (Object.prototype.toString.call(v) === '[object Error]') {
10127
- return v;
10128
- }
10129
-
10130
- if (Array.isArray(v) && v.length === 0) {
10131
- const keys = Object.keys(v);
10132
-
10133
- if (keys.length) {
10134
- const newArray = [];
10135
- keys.forEach(key => {
10136
- lodash_set__WEBPACK_IMPORTED_MODULE_1___default()(newArray, key, v[key]);
10137
- }); // internal-issues:887
10138
-
10139
- try {
10140
- Object(_douyinfe_semi_foundation_utils_warning__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(lodash_get__WEBPACK_IMPORTED_MODULE_0___default()(process, 'env.NODE_ENV') !== 'production', "[Semi] You may use an out-of-bounds array. In some cases, your program may not behave as expected.\n The maximum length of an array is 4294967295.\n Please check whether the array subscript in your data exceeds the maximum value of the JS array subscript");
10141
- } catch (e) {}
10142
-
10143
- return newArray;
10144
- } else {
10145
- return undefined;
10146
- }
10147
- }
10148
-
10149
- return undefined;
10150
- });
10151
- }
10152
- /**
10153
- * [getHighLightTextHTML description]
10154
- *
10155
- * @param {string} sourceString [source content text]
10156
- * @param {Array<string>} searchWords [keywords to be highlighted]
10157
- * @param {object} option
10158
- * @param {true} option.highlightTag [The tag wrapped by the highlighted content, mark is used by default]
10159
- * @param {true} option.highlightClassName
10160
- * @param {true} option.highlightStyle
10161
- * @param {boolean} option.caseSensitive
10162
- *
10163
- * @return {Array<object>}
10164
- */
10165
-
10166
- const getHighLightTextHTML = _ref => {
10167
- let {
10168
- sourceString = '',
10169
- searchWords = [],
10170
- option = {
10171
- autoEscape: true,
10172
- caseSensitive: false
10173
- }
10174
- } = _ref;
10175
- const chunks = Object(_douyinfe_semi_foundation_utils_getHighlight__WEBPACK_IMPORTED_MODULE_5__[/* findAll */ "a"])(Object.assign({
10176
- sourceString,
10177
- searchWords
10178
- }, option));
10179
- const markEle = option.highlightTag || 'mark';
10180
- const highlightClassName = option.highlightClassName || '';
10181
- const highlightStyle = option.highlightStyle || {};
10182
- return chunks.map((chunk, index) => {
10183
- const {
10184
- end,
10185
- start,
10186
- highlight
10187
- } = chunk;
10188
- const text = sourceString.substr(start, end - start);
10189
-
10190
- if (highlight) {
10191
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(markEle, {
10192
- style: highlightStyle,
10193
- className: highlightClassName,
10194
- key: text + index
10195
- }, text);
10196
- } else {
10197
- return text;
10198
- }
10199
- });
10200
- };
10201
- /**
10202
- * register matchFn and unMatchFn callback while media query
10203
- * @param {string} media media string
10204
- * @param {object} param param object
10205
- * @returns function
10206
- */
10207
-
10208
- const registerMediaQuery = (media, _ref2) => {
10209
- let {
10210
- match,
10211
- unmatch,
10212
- callInInit = true
10213
- } = _ref2;
10214
-
10215
- if (typeof window !== 'undefined') {
10216
- const mediaQueryList = window.matchMedia(media);
10217
-
10218
- function handlerMediaChange(e) {
10219
- if (e.matches) {
10220
- match && match(e);
10221
- } else {
10222
- unmatch && unmatch(e);
10223
- }
10224
- }
10225
-
10226
- callInInit && handlerMediaChange(mediaQueryList);
10227
-
10228
- if (Object.prototype.hasOwnProperty.call(mediaQueryList, 'addEventListener')) {
10229
- mediaQueryList.addEventListener('change', handlerMediaChange);
10230
- return () => mediaQueryList.removeEventListener('change', handlerMediaChange);
10231
- }
10232
-
10233
- mediaQueryList.addListener(handlerMediaChange);
10234
- return () => mediaQueryList.removeListener(handlerMediaChange);
10235
- }
10236
-
10237
- return () => undefined;
10238
- };
10239
- /**
10240
- * Determine whether the incoming element is a built-in icon
10241
- * @param icon 元素
10242
- * @returns boolean
10243
- */
10244
-
10245
- const isSemiIcon = icon => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.isValidElement(icon) && lodash_get__WEBPACK_IMPORTED_MODULE_0___default()(icon.type, 'elementType') === 'Icon';
10246
- function getActiveElement() {
10247
- return document ? document.activeElement : null;
10248
- }
10249
- function isNodeContainsFocus(node) {
10250
- const activeElement = getActiveElement();
10251
- return activeElement === node || node.contains(activeElement);
10252
- }
10253
- function getFocusableElements(node) {
10254
- if (!Object(_douyinfe_semi_foundation_utils_dom__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(node)) {
10255
- return [];
10256
- }
10257
-
10258
- const focusableSelectorsList = ["input:not([disabled]):not([tabindex='-1'])", "textarea:not([disabled]):not([tabindex='-1'])", "button:not([disabled]):not([tabindex='-1'])", "a[href]:not([tabindex='-1'])", "select:not([disabled]):not([tabindex='-1'])", "area[href]:not([tabindex='-1'])", "iframe:not([tabindex='-1'])", "object:not([tabindex='-1'])", "*[tabindex]:not([tabindex='-1'])", "*[contenteditable]:not([tabindex='-1'])"];
10259
- const focusableSelectorsStr = focusableSelectorsList.join(','); // we are not filtered elements which are invisible
10260
-
10261
- const focusableElements = Array.from(node.querySelectorAll(focusableSelectorsStr));
10262
- return focusableElements;
10263
- }
10264
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("F63i")))
10265
-
10266
10266
  /***/ }),
10267
10267
 
10268
10268
  /***/ "UdtX":
@@ -19301,8 +19301,8 @@ var tooltip = __webpack_require__("VQVM");
19301
19301
  // EXTERNAL MODULE: ../semi-foundation/utils/isElement.ts
19302
19302
  var isElement = __webpack_require__("Awix");
19303
19303
 
19304
- // EXTERNAL MODULE: ./_utils/index.ts
19305
- var _utils = __webpack_require__("UU7A");
19304
+ // EXTERNAL MODULE: ./_utils/index.tsx
19305
+ var _utils = __webpack_require__("Q0Dl");
19306
19306
 
19307
19307
  // CONCATENATED MODULE: ./configProvider/context.tsx
19308
19308
 
@@ -30713,6 +30713,7 @@ class item_BreadcrumbItem extends baseComponent_BaseComponent {
30713
30713
  const className = "".concat(item_clsPrefix, "-item-icon");
30714
30714
 
30715
30715
  if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.isValidElement(iconType)) {
30716
+ //@ts-ignore
30716
30717
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.cloneElement(iconType, {
30717
30718
  className,
30718
30719
  size: iconSize
@@ -31204,7 +31205,7 @@ class buttonGroup_ButtonGroup extends baseComponent_BaseComponent {
31204
31205
  let lineCls = "".concat(buttonGroup_prefixCls, "-group-line");
31205
31206
 
31206
31207
  if (inner.length > 1) {
31207
- inner.slice(0, -1).forEach(item => {
31208
+ inner.slice(0, -1).forEach((item, index) => {
31208
31209
  const isButtonType = get_default()(item, 'type.elementType') === 'Button';
31209
31210
 
31210
31211
  const buttonProps = get_default()(item, 'props');
@@ -31222,7 +31223,8 @@ class buttonGroup_ButtonGroup extends baseComponent_BaseComponent {
31222
31223
 
31223
31224
  if (isButtonType) {
31224
31225
  innerWithLine.push(item, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
31225
- className: lineCls
31226
+ className: lineCls,
31227
+ key: "line-".concat(index)
31226
31228
  }));
31227
31229
  } else {
31228
31230
  innerWithLine.push(item);
@@ -31253,13 +31255,17 @@ class buttonGroup_ButtonGroup extends baseComponent_BaseComponent {
31253
31255
  const cls = classnames_default()("".concat(buttonGroup_prefixCls, "-group"), className);
31254
31256
 
31255
31257
  if (children) {
31256
- inner = (Array.isArray(children) ? children : [children]).map((itm, index) => /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(itm) ? /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["cloneElement"])(itm, Object.assign(Object.assign(Object.assign({
31257
- disabled,
31258
- size,
31259
- type
31260
- }, itm.props), rest), {
31261
- key: index
31262
- })) : itm);
31258
+ inner = (Array.isArray(children) ? children : [children]).map((itm, index) => {
31259
+ var _a;
31260
+
31261
+ return /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(itm) ? /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["cloneElement"])(itm, Object.assign(Object.assign(Object.assign({
31262
+ disabled,
31263
+ size,
31264
+ type
31265
+ }, itm.props), rest), {
31266
+ key: (_a = itm.key) !== null && _a !== void 0 ? _a : index
31267
+ })) : itm;
31268
+ });
31263
31269
  innerWithLine = this.getInnerWithLine(inner);
31264
31270
  }
31265
31271
 
@@ -37723,6 +37729,7 @@ class foundation_CarouselFoundation extends foundation {
37723
37729
  }
37724
37730
 
37725
37731
  next() {
37732
+ this.stop();
37726
37733
  const {
37727
37734
  activeIndex: stateActiveIndex
37728
37735
  } = this.getStates();
@@ -37737,9 +37744,12 @@ class foundation_CarouselFoundation extends foundation {
37737
37744
 
37738
37745
  this.handleNewActiveIndex(targetIndex);
37739
37746
  }
37747
+
37748
+ this.handleAutoPlay();
37740
37749
  }
37741
37750
 
37742
37751
  prev() {
37752
+ this.stop();
37743
37753
  const {
37744
37754
  activeIndex: stateActiveIndex
37745
37755
  } = this.getStates();
@@ -37754,6 +37764,8 @@ class foundation_CarouselFoundation extends foundation {
37754
37764
 
37755
37765
  this.handleNewActiveIndex(targetIndex);
37756
37766
  }
37767
+
37768
+ this.handleAutoPlay();
37757
37769
  }
37758
37770
 
37759
37771
  destroy() {
@@ -59822,7 +59834,6 @@ class ModalContent_ModalContent extends baseComponent_BaseComponent {
59822
59834
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
59823
59835
  role: "dialog",
59824
59836
  ref: this.modalDialogRef,
59825
- tabIndex: -1,
59826
59837
  "aria-modal": "true",
59827
59838
  "aria-labelledby": "".concat(modal_constants_cssClasses.DIALOG, "-title"),
59828
59839
  "aria-describedby": "".concat(modal_constants_cssClasses.DIALOG, "-body"),
@@ -59922,8 +59933,16 @@ class ModalContent_ModalContent extends baseComponent_BaseComponent {
59922
59933
  }
59923
59934
 
59924
59935
  componentDidMount() {
59936
+ var _a;
59937
+
59925
59938
  this.foundation.handleKeyDownEventListenerMount();
59926
59939
  this.foundation.modalDialogFocus();
59940
+ const nodes = FocusHandle.getFocusableElements(this.modalDialogRef.current);
59941
+
59942
+ if (!this.modalDialogRef.current.contains(document.activeElement)) {
59943
+ // focus on first focusable element
59944
+ (_a = nodes[0]) === null || _a === void 0 ? void 0 : _a.focus();
59945
+ }
59927
59946
  }
59928
59947
 
59929
59948
  componentWillUnmount() {
@@ -59952,7 +59971,6 @@ class ModalContent_ModalContent extends baseComponent_BaseComponent {
59952
59971
  className: classList
59953
59972
  }, this.getMaskElement(), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
59954
59973
  role: "none",
59955
- tabIndex: -1,
59956
59974
  className: classnames_default()({
59957
59975
  ["".concat(modal_constants_cssClasses.DIALOG, "-wrap")]: true,
59958
59976
  ["".concat(modal_constants_cssClasses.DIALOG, "-wrap-center")]: this.props.centered
@@ -61313,6 +61331,7 @@ class dropdown_Dropdown extends baseComponent_BaseComponent {
61313
61331
  showArrow: false,
61314
61332
  returnFocusOnClose: true
61315
61333
  }, attr), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.isValidElement(children) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.cloneElement(children, {
61334
+ //@ts-ignore
61316
61335
  className: classnames_default()(get_default()(children, 'props.className'), {
61317
61336
  ["".concat(prefixCls, "-showing")]: popVisible
61318
61337
  }),
@@ -61323,7 +61342,7 @@ class dropdown_Dropdown extends baseComponent_BaseComponent {
61323
61342
 
61324
61343
  const childrenKeyDown = get_default()(children, 'props.onKeyDown');
61325
61344
 
61326
- childrenKeyDown && childrenKeyDown();
61345
+ childrenKeyDown && childrenKeyDown(e);
61327
61346
  }
61328
61347
  }) : children);
61329
61348
  }
@@ -64304,7 +64323,7 @@ class inputNumber_InputNumber extends baseComponent_BaseComponent {
64304
64323
  }
64305
64324
  }
64306
64325
 
64307
- if (isString_default()(newValue) && newValue !== String(this.props.value)) {
64326
+ if (newValue && isString_default()(newValue) && newValue !== String(this.props.value)) {
64308
64327
  this.foundation.notifyChange(newValue, null);
64309
64328
  }
64310
64329
  }
@@ -65441,6 +65460,7 @@ function OpenIconTransition() {
65441
65460
 
65442
65461
  if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.isValidElement(children)) {
65443
65462
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.cloneElement(children, {
65463
+ // @ts-ignore
65444
65464
  style: Object.assign(Object.assign({}, children.props && children.props.style), formatedStyle)
65445
65465
  });
65446
65466
  }
@@ -65584,11 +65604,15 @@ class SubNav_SubNav extends baseComponent_BaseComponent {
65584
65604
  ["".concat(prefixCls, "-item-icon-info")]: !isToggleIcon
65585
65605
  });
65586
65606
  const isOpen = this.adapter.getIsOpen();
65587
- const iconElem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.isValidElement(icon) ? withTransition ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(navigation_OpenIconTransition, {
65607
+ const iconElem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.isValidElement(icon) ? withTransition ?
65608
+ /*#__PURE__*/
65609
+ // @ts-ignore
65610
+ external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(navigation_OpenIconTransition, {
65588
65611
  isOpen: isOpen
65589
65612
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.cloneElement(icon, {
65590
65613
  size: iconSize
65591
- })) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.cloneElement(icon, {
65614
+ })) //@ts-ignore
65615
+ : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.cloneElement(icon, {
65592
65616
  size: iconSize
65593
65617
  }) : null;
65594
65618
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("i", {
@@ -65922,13 +65946,13 @@ class Footer_NavFooter extends external_root_React_commonjs2_react_commonjs_reac
65922
65946
  locale,
65923
65947
  isCollapsed
65924
65948
  } = this.context;
65925
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(CollapseButton, Object.assign({
65949
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(CollapseButton, {
65926
65950
  prefixCls: prefixCls,
65927
65951
  isCollapsed: isCollapsed,
65928
65952
  locale: locale,
65929
65953
  onClick: onCollapseChange,
65930
65954
  collapseText: collapseText
65931
- }, collapseButton));
65955
+ });
65932
65956
  };
65933
65957
  }
65934
65958
 
@@ -70935,24 +70959,30 @@ class foundation_SelectFoundation extends foundation {
70935
70959
  }
70936
70960
 
70937
70961
  clearInput() {
70938
- this._adapter.updateInputValue('');
70962
+ const {
70963
+ inputValue
70964
+ } = this.getStates(); // only when input is not null, select should notifySearch and updateOptions
70939
70965
 
70940
- this._adapter.notifySearch(''); // reset options filter
70966
+ if (inputValue !== '') {
70967
+ this._adapter.updateInputValue('');
70941
70968
 
70969
+ this._adapter.notifySearch(''); // reset options filter
70942
70970
 
70943
- const {
70944
- options
70945
- } = this.getStates();
70946
- const {
70947
- remote
70948
- } = this.getProps();
70949
- let optionsAfterFilter = options;
70950
70971
 
70951
- if (!remote) {
70952
- optionsAfterFilter = this._filterOption(options, '');
70953
- }
70972
+ const {
70973
+ options
70974
+ } = this.getStates();
70975
+ const {
70976
+ remote
70977
+ } = this.getProps();
70978
+ let optionsAfterFilter = options;
70954
70979
 
70955
- this._adapter.updateOptions(optionsAfterFilter);
70980
+ if (!remote) {
70981
+ optionsAfterFilter = this._filterOption(options, '');
70982
+ }
70983
+
70984
+ this._adapter.updateOptions(optionsAfterFilter);
70985
+ }
70956
70986
  }
70957
70987
 
70958
70988
  focusInput() {
@@ -84635,7 +84665,7 @@ class Body_Body extends baseComponent_BaseComponent {
84635
84665
  overflowY: 'auto'
84636
84666
  };
84637
84667
  const wrapCls = classnames_default()("".concat(prefixCls, "-body"));
84638
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(VariableSizeList, Object.assign({}, virtualized, {
84668
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(VariableSizeList, Object.assign({}, typeof virtualized === 'object' ? virtualized : {}, {
84639
84669
  initialScrollOffset: this.state.cache.virtualizedScrollTop,
84640
84670
  onScroll: this.handleVirtualizedScroll,
84641
84671
  onItemsRendered: this.onItemsRendered,
@@ -88321,6 +88351,7 @@ class timeline_Timeline extends external_root_React_commonjs2_react_commonjs_rea
88321
88351
  this.addClassName = items => external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.map(items, (ele, idx) => {
88322
88352
  if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.isValidElement(ele)) {
88323
88353
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.cloneElement(ele, {
88354
+ // @ts-ignore
88324
88355
  className: classnames_default()(ele.props.className, this.getPosCls(ele, idx))
88325
88356
  });
88326
88357
  }
@@ -100072,7 +100103,10 @@ function useStateWithGetter(initial) {
100072
100103
 
100073
100104
 
100074
100105
 
100075
- const withField_prefix = form_constants_cssClasses.PREFIX;
100106
+ const withField_prefix = form_constants_cssClasses.PREFIX; // To avoid useLayoutEffect warning when ssr, refer: https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
100107
+ // Fix issue 1140
100108
+
100109
+ const useIsomorphicEffect = typeof window !== 'undefined' ? external_root_React_commonjs2_react_commonjs_react_amd_react_["useLayoutEffect"] : external_root_React_commonjs2_react_commonjs_react_amd_react_["useEffect"];
100076
100110
  /**
100077
100111
  * withFiled is used to inject components
100078
100112
  * 1. Takes over the value and onChange of the component and synchronizes them to Form Foundation
@@ -100412,12 +100446,12 @@ function withField(Component, opts) {
100412
100446
  status
100413
100447
  }; // avoid hooks capture value, fixed issue 346
100414
100448
 
100415
- Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useLayoutEffect"])(() => {
100449
+ useIsomorphicEffect(() => {
100416
100450
  rulesRef.current = rules;
100417
100451
  validateRef.current = validate;
100418
100452
  }, [rules, validate]); // exec validate once when trigger inlcude 'mount'
100419
100453
 
100420
- Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useLayoutEffect"])(() => {
100454
+ useIsomorphicEffect(() => {
100421
100455
  if (validateOnMount) {
100422
100456
  fieldValidate(value);
100423
100457
  } // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -100425,7 +100459,7 @@ function withField(Component, opts) {
100425
100459
  }, []); // register when mounted,unregister when unmounted
100426
100460
  // register again when field change
100427
100461
 
100428
- Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useLayoutEffect"])(() => {
100462
+ useIsomorphicEffect(() => {
100429
100463
  // register
100430
100464
  if (typeof field === 'undefined') {
100431
100465
  // eslint-disable-next-line @typescript-eslint/no-empty-function
@@ -103073,9 +103107,6 @@ previewInner_PreviewInner.defaultProps = {
103073
103107
  maskClosable: true,
103074
103108
  viewerVisibleDelay: 10000
103075
103109
  };
103076
- // EXTERNAL MODULE: ../semi-foundation/image/image.scss
103077
- var image_image = __webpack_require__("txvO");
103078
-
103079
103110
  // CONCATENATED MODULE: ../semi-foundation/image/imageFoundation.ts
103080
103111
 
103081
103112
 
@@ -103170,7 +103201,6 @@ class imageFoundation_ImageFoundation extends foundation {
103170
103201
 
103171
103202
 
103172
103203
 
103173
-
103174
103204
  const image_prefixCls = image_constants_cssClasses.PREFIX;
103175
103205
  class image_Image extends baseComponent_BaseComponent {
103176
103206
  constructor(props) {
@@ -103378,10 +103408,14 @@ image_Image.propTypes = {
103378
103408
  image_Image.defaultProps = {
103379
103409
  preview: true
103380
103410
  };
103411
+ // EXTERNAL MODULE: ../semi-foundation/image/image.scss
103412
+ var image_image = __webpack_require__("txvO");
103413
+
103381
103414
  // CONCATENATED MODULE: ./image/index.tsx
103382
103415
 
103383
103416
 
103384
103417
 
103418
+
103385
103419
  /* harmony default export */ var image_0 = (image_Image);
103386
103420
 
103387
103421