@arco-design/mobile-react 2.36.2 → 2.37.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.
Files changed (167) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.en-US.md +2 -2
  3. package/README.md +2 -2
  4. package/cjs/_helpers/hooks.d.ts +1 -1
  5. package/cjs/_helpers/hooks.js +1 -1
  6. package/cjs/_helpers/react-dom.d.ts +5 -5
  7. package/cjs/_helpers/react-dom.js +49 -32
  8. package/cjs/_helpers/render.js +6 -3
  9. package/cjs/action-sheet/index.d.ts +3 -2
  10. package/cjs/action-sheet/index.js +2 -2
  11. package/cjs/checkbox/checkbox.d.ts +1 -1
  12. package/cjs/checkbox/group.d.ts +1 -1
  13. package/cjs/checkbox/hooks/useMergeProps.d.ts +1 -1
  14. package/cjs/checkbox/index.d.ts +2 -2
  15. package/cjs/context-provider/index.d.ts +8 -2
  16. package/cjs/count-down/hooks.js +2 -2
  17. package/cjs/dialog/index.d.ts +8 -3
  18. package/cjs/dialog/methods.d.ts +6 -2
  19. package/cjs/dropdown-menu/helper.d.ts +2 -2
  20. package/cjs/ellipsis/components/native-ellipsis.d.ts +2 -3
  21. package/cjs/ellipsis/components/native-ellipsis.js +1 -2
  22. package/cjs/form/type.d.ts +5 -5
  23. package/cjs/image-preview/index.d.ts +2 -2
  24. package/cjs/index-bar/group.js +3 -1
  25. package/cjs/index-bar/index.d.ts +2 -2
  26. package/cjs/index-bar/utils.d.ts +1 -1
  27. package/cjs/masking/index.d.ts +2 -2
  28. package/cjs/notify/index.d.ts +8 -8
  29. package/cjs/notify/index.js +2 -2
  30. package/cjs/picker-view/components/cascader.js +3 -1
  31. package/cjs/picker-view/components/picker-cell.js +1 -1
  32. package/cjs/picker-view/index.js +3 -1
  33. package/cjs/popup/index.d.ts +2 -2
  34. package/cjs/popup-swiper/index.d.ts +2 -2
  35. package/cjs/pull-refresh/hooks.d.ts +2 -2
  36. package/cjs/radio/group.d.ts +1 -1
  37. package/cjs/radio/index.d.ts +2 -2
  38. package/cjs/radio/radio.d.ts +1 -1
  39. package/cjs/skeleton/elements.js +9 -3
  40. package/cjs/slider/hooks/index.d.ts +1 -1
  41. package/cjs/slider/hooks/useSliderEvents.d.ts +1 -1
  42. package/cjs/stepper/hooks/useValue.d.ts +2 -1
  43. package/cjs/steps/index.d.ts +1 -1
  44. package/cjs/tabs/type.d.ts +2 -2
  45. package/cjs/toast/index.d.ts +12 -12
  46. package/cjs/toast/index.js +1 -1
  47. package/dist/index.js +103 -75
  48. package/dist/index.min.js +4 -4
  49. package/esm/_helpers/hooks.d.ts +1 -1
  50. package/esm/_helpers/hooks.js +1 -1
  51. package/esm/_helpers/react-dom.d.ts +5 -5
  52. package/esm/_helpers/react-dom.js +49 -30
  53. package/esm/_helpers/render.js +6 -3
  54. package/esm/action-sheet/index.d.ts +3 -2
  55. package/esm/action-sheet/index.js +2 -2
  56. package/esm/checkbox/checkbox.d.ts +1 -1
  57. package/esm/checkbox/group.d.ts +1 -1
  58. package/esm/checkbox/hooks/useMergeProps.d.ts +1 -1
  59. package/esm/checkbox/index.d.ts +2 -2
  60. package/esm/context-provider/index.d.ts +8 -2
  61. package/esm/count-down/hooks.js +2 -2
  62. package/esm/dialog/index.d.ts +8 -3
  63. package/esm/dialog/methods.d.ts +6 -2
  64. package/esm/dropdown-menu/helper.d.ts +2 -2
  65. package/esm/ellipsis/components/native-ellipsis.d.ts +2 -3
  66. package/esm/ellipsis/components/native-ellipsis.js +1 -1
  67. package/esm/form/type.d.ts +5 -5
  68. package/esm/image-preview/index.d.ts +2 -2
  69. package/esm/index-bar/group.js +3 -1
  70. package/esm/index-bar/index.d.ts +2 -2
  71. package/esm/index-bar/utils.d.ts +1 -1
  72. package/esm/masking/index.d.ts +2 -2
  73. package/esm/notify/index.d.ts +8 -8
  74. package/esm/notify/index.js +2 -2
  75. package/esm/picker-view/components/cascader.js +3 -1
  76. package/esm/picker-view/components/picker-cell.js +1 -1
  77. package/esm/picker-view/index.js +3 -1
  78. package/esm/popup/index.d.ts +2 -2
  79. package/esm/popup-swiper/index.d.ts +2 -2
  80. package/esm/pull-refresh/hooks.d.ts +2 -2
  81. package/esm/radio/group.d.ts +1 -1
  82. package/esm/radio/index.d.ts +2 -2
  83. package/esm/radio/radio.d.ts +1 -1
  84. package/esm/skeleton/elements.js +9 -3
  85. package/esm/slider/hooks/index.d.ts +1 -1
  86. package/esm/slider/hooks/useSliderEvents.d.ts +1 -1
  87. package/esm/stepper/hooks/useValue.d.ts +2 -1
  88. package/esm/steps/index.d.ts +1 -1
  89. package/esm/tabs/type.d.ts +2 -2
  90. package/esm/toast/index.d.ts +12 -12
  91. package/esm/toast/index.js +1 -1
  92. package/esnext/_helpers/hooks.js +1 -1
  93. package/esnext/_helpers/react-dom.d.ts +5 -5
  94. package/esnext/_helpers/react-dom.js +47 -28
  95. package/esnext/_helpers/render.js +3 -2
  96. package/esnext/action-sheet/index.d.ts +3 -2
  97. package/esnext/action-sheet/index.js +1 -1
  98. package/esnext/context-provider/index.d.ts +8 -2
  99. package/esnext/context-provider/index.js +1 -1
  100. package/esnext/count-down/hooks.js +2 -2
  101. package/esnext/dialog/index.d.ts +8 -3
  102. package/esnext/dialog/methods.d.ts +6 -2
  103. package/esnext/dropdown-menu/helper.d.ts +1 -1
  104. package/esnext/ellipsis/components/native-ellipsis.d.ts +2 -3
  105. package/esnext/ellipsis/components/native-ellipsis.js +1 -1
  106. package/esnext/form/type.d.ts +5 -5
  107. package/esnext/image-preview/index.d.ts +2 -2
  108. package/esnext/index-bar/group.js +5 -1
  109. package/esnext/index-bar/index.d.ts +2 -2
  110. package/esnext/masking/index.d.ts +2 -2
  111. package/esnext/notify/index.d.ts +8 -8
  112. package/esnext/notify/index.js +2 -2
  113. package/esnext/picker-view/components/cascader.js +5 -1
  114. package/esnext/picker-view/components/picker-cell.js +1 -1
  115. package/esnext/picker-view/index.js +5 -1
  116. package/esnext/popup/index.d.ts +2 -2
  117. package/esnext/popup-swiper/index.d.ts +2 -2
  118. package/esnext/pull-refresh/hooks.d.ts +2 -2
  119. package/esnext/skeleton/elements.js +15 -3
  120. package/esnext/slider/hooks/useSliderEvents.d.ts +1 -1
  121. package/esnext/tabs/type.d.ts +2 -2
  122. package/esnext/toast/index.d.ts +12 -12
  123. package/esnext/toast/index.js +1 -1
  124. package/package.json +3 -3
  125. package/umd/_helpers/hooks.d.ts +1 -1
  126. package/umd/_helpers/hooks.js +1 -1
  127. package/umd/_helpers/react-dom.d.ts +5 -5
  128. package/umd/_helpers/react-dom.js +53 -35
  129. package/umd/_helpers/render.js +6 -3
  130. package/umd/action-sheet/index.d.ts +3 -2
  131. package/umd/action-sheet/index.js +2 -2
  132. package/umd/checkbox/checkbox.d.ts +1 -1
  133. package/umd/checkbox/group.d.ts +1 -1
  134. package/umd/checkbox/hooks/useMergeProps.d.ts +1 -1
  135. package/umd/checkbox/index.d.ts +2 -2
  136. package/umd/context-provider/index.d.ts +8 -2
  137. package/umd/count-down/hooks.js +2 -2
  138. package/umd/dialog/index.d.ts +8 -3
  139. package/umd/dialog/methods.d.ts +6 -2
  140. package/umd/dropdown-menu/helper.d.ts +2 -2
  141. package/umd/ellipsis/components/native-ellipsis.d.ts +2 -3
  142. package/umd/ellipsis/components/native-ellipsis.js +1 -2
  143. package/umd/form/type.d.ts +5 -5
  144. package/umd/image-preview/index.d.ts +2 -2
  145. package/umd/index-bar/group.js +3 -1
  146. package/umd/index-bar/index.d.ts +2 -2
  147. package/umd/index-bar/utils.d.ts +1 -1
  148. package/umd/masking/index.d.ts +2 -2
  149. package/umd/notify/index.d.ts +8 -8
  150. package/umd/notify/index.js +2 -2
  151. package/umd/picker-view/components/cascader.js +3 -1
  152. package/umd/picker-view/components/picker-cell.js +1 -1
  153. package/umd/picker-view/index.js +3 -1
  154. package/umd/popup/index.d.ts +2 -2
  155. package/umd/popup-swiper/index.d.ts +2 -2
  156. package/umd/pull-refresh/hooks.d.ts +2 -2
  157. package/umd/radio/group.d.ts +1 -1
  158. package/umd/radio/index.d.ts +2 -2
  159. package/umd/radio/radio.d.ts +1 -1
  160. package/umd/skeleton/elements.js +9 -3
  161. package/umd/slider/hooks/index.d.ts +1 -1
  162. package/umd/slider/hooks/useSliderEvents.d.ts +1 -1
  163. package/umd/stepper/hooks/useValue.d.ts +2 -1
  164. package/umd/steps/index.d.ts +1 -1
  165. package/umd/tabs/type.d.ts +2 -2
  166. package/umd/toast/index.d.ts +12 -12
  167. package/umd/toast/index.js +1 -1
@@ -1,23 +1,20 @@
1
1
  (function (global, factory) {
2
2
  if (typeof define === "function" && define.amd) {
3
- define(["exports", "@babel/runtime/helpers/extends", "react-dom"], factory);
3
+ define(["exports", "react-dom"], factory);
4
4
  } else if (typeof exports !== "undefined") {
5
- factory(exports, require("@babel/runtime/helpers/extends"), require("react-dom"));
5
+ factory(exports, require("react-dom"));
6
6
  } else {
7
7
  var mod = {
8
8
  exports: {}
9
9
  };
10
- factory(mod.exports, global._extends, global.reactDom);
10
+ factory(mod.exports, global.reactDom);
11
11
  global.reactDom = mod.exports;
12
12
  }
13
- })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _extends2, ReactDOM) {
13
+ })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, ReactDOM) {
14
14
  "use strict";
15
15
 
16
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
17
-
18
16
  _exports.__esModule = true;
19
17
  _exports.render = void 0;
20
- _extends2 = _interopRequireDefault(_extends2);
21
18
  ReactDOM = _interopRequireWildcard(ReactDOM);
22
19
 
23
20
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -28,56 +25,77 @@
28
25
  return Object.prototype.toString.call(obj) === '[object Object]';
29
26
  }
30
27
 
31
- var CopyReactDOM = (0, _extends2.default)({}, ReactDOM);
28
+ // Cast ReactDOM to a version that might have createRoot and other properties
29
+ var typedReactDOM = ReactDOM;
32
30
  var copyRender;
33
- var version = CopyReactDOM.version,
34
- reactRender = CopyReactDOM.render,
35
- unmountComponentAtNode = CopyReactDOM.unmountComponentAtNode;
36
- var isReact18 = Number((version || '').split('.')[0]) > 17;
37
31
 
38
32
  var updateUsingClientEntryPoint = function updateUsingClientEntryPoint(skipWarning) {
39
33
  // https://github.com/facebook/react/blob/17806594cc28284fe195f918e8d77de3516848ec/packages/react-dom/npm/client.js#L10
40
34
  // Avoid console warning
41
- var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = CopyReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
35
+ var secretInternals = typedReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
42
36
 
43
- if (isObject(__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)) {
44
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint = skipWarning;
37
+ if (isObject(secretInternals)) {
38
+ secretInternals.usingClientEntryPoint = skipWarning;
45
39
  }
46
40
  };
47
41
 
48
- var createRoot;
49
-
50
- try {
51
- createRoot = CopyReactDOM.createRoot;
52
- } catch (_) {}
42
+ var createRootFn = typedReactDOM.createRoot;
53
43
 
54
- if (isReact18 && createRoot) {
55
- copyRender = function copyRender(app, container) {
44
+ var getRender = function getRender(createRootFunction) {
45
+ return function (app, container) {
56
46
  updateUsingClientEntryPoint(true);
57
- var root = createRoot(container);
47
+ var root = createRootFunction(container);
58
48
  updateUsingClientEntryPoint(false);
59
49
  root.render(app);
60
-
61
- root._unmount = function () {
62
- setTimeout(function () {
63
- root == null ? void 0 : root.unmount == null ? void 0 : root.unmount();
64
- });
50
+ return {
51
+ render: function render(elementToRender) {
52
+ root.render(elementToRender);
53
+ },
54
+ _unmount: function _unmount() {
55
+ setTimeout(function () {
56
+ if (root && typeof root.unmount === 'function') {
57
+ root.unmount();
58
+ }
59
+ });
60
+ }
65
61
  };
66
-
67
- return root;
68
62
  };
69
- } else {
63
+ };
64
+
65
+ if (createRootFn) {
66
+ // React 18
67
+ copyRender = getRender(createRootFn);
68
+ } else if (typeof typedReactDOM.render === 'function' && typeof typedReactDOM.unmountComponentAtNode === 'function') {
69
+ // React 16/17
70
70
  copyRender = function copyRender(app, container) {
71
- reactRender(app, container);
71
+ typedReactDOM.render(app, container); // Use non-null assertion
72
+
72
73
  return {
73
- render: function render(comment) {
74
- reactRender(comment, container);
74
+ render: function render(elementToRender) {
75
+ typedReactDOM.render(elementToRender, container); // Use non-null assertion
75
76
  },
76
77
  _unmount: function _unmount() {
77
- unmountComponentAtNode(container);
78
+ typedReactDOM.unmountComponentAtNode(container); // Use non-null assertion
78
79
  }
79
80
  };
80
81
  };
82
+ } else {
83
+ copyRender = function copyRender(app, container, createRootFunction) {
84
+ var defaultCb = function defaultCb() {
85
+ // Fallback if no rendering method is found
86
+ console.error('ArcoDesign: ReactDOM.createRoot() or ReactDOM.render() not found. ' + 'This usually means you are using an unsupported version of React, ' + 'or ReactDOM is not properly initialized. ' + 'ArcoDesign Mobile React requires React 16, 17, 18, or 19.');
87
+ return {
88
+ render: function render(_element) {},
89
+ _unmount: function _unmount() {}
90
+ };
91
+ };
92
+
93
+ if (createRootFunction) {
94
+ return getRender(createRootFunction)(app, container);
95
+ }
96
+
97
+ return defaultCb();
98
+ };
81
99
  }
82
100
 
83
101
  var render = copyRender;
@@ -35,14 +35,17 @@
35
35
 
36
36
  this.render = function (props) {
37
37
  var CustomApp = _this.app;
38
- var propsWithContext = (0, _extends2.default)({}, props, {
38
+ var propsWithContext = (0, _extends2.default)({
39
39
  context: _this.context
40
- });
40
+ }, props);
41
41
 
42
42
  if (_this.root) {
43
43
  _this.root.render( /*#__PURE__*/_react.default.createElement(CustomApp, propsWithContext));
44
44
  } else {
45
- _this.root = (0, _reactDom.render)( /*#__PURE__*/_react.default.createElement(CustomApp, propsWithContext), _this.container);
45
+ var _ref = _this.context || {},
46
+ createRoot = _ref.createRoot;
47
+
48
+ _this.root = (0, _reactDom.render)( /*#__PURE__*/_react.default.createElement(CustomApp, propsWithContext), _this.container, createRoot);
46
49
  }
47
50
  };
48
51
 
@@ -1,4 +1,5 @@
1
1
  import React, { ReactNode, CSSProperties } from 'react';
2
+ import { Promise } from 'es6-promise';
2
3
  import { PopupProps } from '../popup';
3
4
  import { OpenBaseProps } from '../masking';
4
5
  export interface ActionSheetItemOptions {
@@ -86,11 +87,11 @@ declare const _default: React.ForwardRefExoticComponent<ActionSheetProps & React
86
87
  * @param {ActionSheetProps} config setting
87
88
  * @returns {{ close: () => void; update: (newConfig: ActionSheetProps) => void; }}
88
89
  */
89
- open: (config: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "context" | "translateZ" | "className" | "onTouchMove" | "getContainer" | "items" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "cancelText" | "subTitle"> & {
90
+ open: (config: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "ref" | "className" | "title" | "context" | "key" | "translateZ" | "onTouchMove" | "getContainer" | "items" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "cancelText" | "subTitle"> & {
90
91
  key?: string | undefined;
91
92
  }, context?: import("../context-provider").GlobalContextParams | undefined) => {
92
93
  close: () => void;
93
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "context" | "translateZ" | "className" | "onTouchMove" | "getContainer" | "items" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "cancelText" | "subTitle"> & {
94
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "ref" | "className" | "title" | "context" | "key" | "translateZ" | "onTouchMove" | "getContainer" | "items" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "cancelText" | "subTitle"> & {
94
95
  key?: string | undefined;
95
96
  }) => void;
96
97
  };
@@ -80,14 +80,14 @@
80
80
  }, subTitle) : null) : null, /*#__PURE__*/_react.default.createElement("div", {
81
81
  className: prefixCls + "-action-sheet-list"
82
82
  }, (items || []).map(function (item, index) {
83
- return /*#__PURE__*/_react.default.createElement("div", {
83
+ return item.content ? /*#__PURE__*/_react.default.createElement("div", {
84
84
  className: (0, _mobileUtils.cls)(prefixCls + "-action-sheet-item", item.className, item.status || 'normal'),
85
85
  key: index,
86
86
  style: item.style,
87
87
  onClick: function onClick(e) {
88
88
  return handleItemClick(e, item);
89
89
  }
90
- }, item.content);
90
+ }, item.content) : null;
91
91
  })), cancelText ? /*#__PURE__*/_react.default.createElement("div", {
92
92
  className: prefixCls + "-action-sheet-item cancel-item",
93
93
  onClick: function onClick(e) {
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { CheckboxProps, CheckboxRef } from './type';
3
- export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps<string | number> & React.RefAttributes<CheckboxRef>>;
3
+ export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps<React.ReactText> & React.RefAttributes<CheckboxRef>>;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { GroupContextParams, CheckboxGroupProps, CheckboxGroupRef, ValueType, CheckboxProps, CheckboxRef } from './type';
3
- export declare const CheckboxGroupContext: React.Context<GroupContextParams<string | number>>;
3
+ export declare const CheckboxGroupContext: React.Context<GroupContextParams<React.ReactText>>;
4
4
  export declare function componentGenerator<T extends ValueType = ValueType, P extends CheckboxProps<T> = CheckboxProps<T>, R extends CheckboxRef = CheckboxRef>(Comp: React.ForwardRefExoticComponent<P & React.RefAttributes<R>>): React.ForwardRefExoticComponent<CheckboxGroupProps<T, P> & React.RefAttributes<CheckboxGroupRef>>;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { CheckboxProps, GroupContextParams, ValueType } from '../type';
3
- export declare const useMergeProps: <T extends string | number = string | number, P extends CheckboxProps<T> = CheckboxProps<T>>(props: P, groupContext: React.Context<GroupContextParams<ValueType>>) => P;
3
+ export declare const useMergeProps: <T extends React.ReactText = React.ReactText, P extends CheckboxProps<T> = CheckboxProps<T>>(props: P, groupContext: React.Context<GroupContextParams<ValueType>>) => P;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export * from './type';
3
- declare const _default: import("react").ForwardRefExoticComponent<import("./type").CheckboxProps<string | number> & import("react").RefAttributes<import("./type").CheckboxRef>> & {
4
- Group: import("react").ForwardRefExoticComponent<import("./type").CheckboxGroupProps<string | number, import("./type").CheckboxProps<string | number> & import("react").RefAttributes<import("./type").CheckboxRef>> & import("react").RefAttributes<import("./type").CheckboxGroupRef>> & {
3
+ declare const _default: import("react").ForwardRefExoticComponent<import("./type").CheckboxProps<import("react").ReactText> & import("react").RefAttributes<import("./type").CheckboxRef>> & {
4
+ Group: import("react").ForwardRefExoticComponent<import("./type").CheckboxGroupProps<import("react").ReactText, import("./type").CheckboxProps<import("react").ReactText> & import("react").RefAttributes<import("./type").CheckboxRef>> & import("react").RefAttributes<import("./type").CheckboxGroupRef>> & {
5
5
  displayName?: string | undefined;
6
6
  };
7
7
  } & {
@@ -1,5 +1,6 @@
1
- import React from 'react';
1
+ import React, { Attributes } from 'react';
2
2
  import { ILocale } from '@arco-design/mobile-utils';
3
+ import { CreateRootFnType } from '../_helpers';
3
4
  export interface GlobalContextParams {
4
5
  /**
5
6
  * 组件类名前缀
@@ -52,6 +53,11 @@ export interface GlobalContextParams {
52
53
  * @en Triggered when the system's native dark mode changes, valid when useDarkMode=true
53
54
  */
54
55
  onDarkModeChange?: (isDark: boolean) => void;
56
+ /**
57
+ * React19 修改了 createRoot 的引入路径,导致组件内部无法直接引入(低react版本会找不到模块)。因此使用 react 19 的用户需从外部传入 createRoot 方法
58
+ * @en Users using react 19 need to pass in the createRoot method from outside
59
+ */
60
+ createRoot?: CreateRootFnType;
55
61
  }
56
62
  export declare const defaultContext: GlobalContextParams;
57
63
  export declare const GlobalContext: React.Context<GlobalContextParams>;
@@ -71,4 +77,4 @@ export declare type WithGlobalContext<T> = T & {
71
77
  */
72
78
  export default function ContextProvider(props: ContextProviderProps): JSX.Element;
73
79
  export declare const ContextLayout: React.Consumer<GlobalContextParams>;
74
- export declare function CompWithGlobalContext<P extends JSX.IntrinsicAttributes>(Component: React.FunctionComponent<P>): (props: WithGlobalContext<P>) => JSX.Element;
80
+ export declare function CompWithGlobalContext<P extends Attributes>(Component: React.FunctionComponent<P>): (props: WithGlobalContext<P>) => JSX.Element;
@@ -18,8 +18,8 @@
18
18
 
19
19
  var useCountDown = function useCountDown(options) {
20
20
  var taskIdRef = (0, _react.useRef)(0);
21
- var endTimeRef = (0, _react.useRef)();
22
- var countingRef = (0, _react.useRef)();
21
+ var endTimeRef = (0, _react.useRef)(undefined);
22
+ var countingRef = (0, _react.useRef)(undefined);
23
23
 
24
24
  var _useRefState = (0, _helpers.useRefState)(options.time),
25
25
  remain = _useRefState[0],
@@ -1,5 +1,6 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { ILocale } from '@arco-design/mobile-utils';
3
+ import { Promise } from 'es6-promise';
3
4
  import { MaskingCommonProps, MaskingRef, OpenBaseProps } from '../masking';
4
5
  export * from './methods';
5
6
  export interface FooterButtonOptions {
@@ -130,7 +131,11 @@ export interface ConfirmOptions extends AlertOptions {
130
131
  * */
131
132
  cancelText?: ReactNode;
132
133
  }
133
- export declare function methodsGenerator<P extends OpenBaseProps, A = AlertOptions, C = ConfirmOptions>(Comp: React.FunctionComponent<P>): {
134
+ export declare function methodsGenerator<P extends OpenBaseProps, A extends {
135
+ key?: string;
136
+ } = AlertOptions, C extends {
137
+ key?: string;
138
+ } = ConfirmOptions>(Comp: React.FunctionComponent<P>): {
134
139
  /**
135
140
  * 打开确认框(含一个确认按钮)
136
141
  * @desc {en} Open a confirmation dialog (with a confirmation button)
@@ -193,11 +198,11 @@ declare const _default: React.ForwardRefExoticComponent<DialogProps & React.RefA
193
198
  * @param {DialogProps} config Configuration
194
199
  * @returns {{ close: () => void; update: (newConfig: DialogProps) => void; }}
195
200
  */
196
- open: (config: Pick<import("../context-provider").WithGlobalContext<DialogProps & React.RefAttributes<DialogRef>>, "platform" | "footer" | "title" | "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "footerType" | "renderFooter" | "footerCollapseCount" | "titleAlign" | "contentAlign" | "extra"> & {
201
+ open: (config: Pick<import("../context-provider").WithGlobalContext<DialogProps & React.RefAttributes<DialogRef>>, "ref" | "className" | "footer" | "title" | "children" | "context" | "key" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "footerType" | "renderFooter" | "footerCollapseCount" | "titleAlign" | "contentAlign" | "platform" | "extra"> & {
197
202
  key?: string | undefined;
198
203
  }, context?: import("../context-provider").GlobalContextParams | undefined) => {
199
204
  close: () => void;
200
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<DialogProps & React.RefAttributes<DialogRef>>, "platform" | "footer" | "title" | "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "footerType" | "renderFooter" | "footerCollapseCount" | "titleAlign" | "contentAlign" | "extra"> & {
205
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<DialogProps & React.RefAttributes<DialogRef>>, "ref" | "className" | "footer" | "title" | "children" | "context" | "key" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "footerType" | "renderFooter" | "footerCollapseCount" | "titleAlign" | "contentAlign" | "platform" | "extra"> & {
201
206
  key?: string | undefined;
202
207
  }) => void;
203
208
  };
@@ -2,11 +2,15 @@ import React from 'react';
2
2
  import { OpenBaseProps } from '../masking/methods';
3
3
  export declare function normalizeAlert<AlertOptions, P>(config: AlertOptions): P;
4
4
  export declare function normalizeConfirm<ConfirmOptions, P>(config: ConfirmOptions): P;
5
- export declare function alert<AlertOptions, P extends OpenBaseProps>(Component: React.FunctionComponent<P>, normalize?: <T, Props>(config: T) => Props): (config: AlertOptions, context?: import("../context-provider").GlobalContextParams | undefined) => {
5
+ export declare function alert<AlertOptions extends {
6
+ key?: string;
7
+ }, P extends OpenBaseProps>(Component: React.FunctionComponent<P>, normalize?: <T, Props>(config: T) => Props): (config: AlertOptions, context?: import("../context-provider").GlobalContextParams | undefined) => {
6
8
  close: () => void;
7
9
  update: (newConfig: AlertOptions) => void;
8
10
  };
9
- export declare function confirm<ConfirmOptions, P extends OpenBaseProps>(Component: React.FunctionComponent<P>, normalize?: <T, Props>(config: T) => Props): (config: ConfirmOptions, context?: import("../context-provider").GlobalContextParams | undefined) => {
11
+ export declare function confirm<ConfirmOptions extends {
12
+ key?: string;
13
+ }, P extends OpenBaseProps>(Component: React.FunctionComponent<P>, normalize?: <T, Props>(config: T) => Props): (config: ConfirmOptions, context?: import("../context-provider").GlobalContextParams | undefined) => {
10
14
  close: () => void;
11
15
  update: (newConfig: ConfirmOptions) => void;
12
16
  };
@@ -20,13 +20,13 @@ export declare function isCascadeArray(options: string[] | OptionsItem[][] | Cas
20
20
  * */
21
21
  export declare const getFormattedOptions: (options: OptionsItem[][] | string[] | CascadeOptions[], currentValues: ValueType) => {
22
22
  formattedOptions: OptionsItem[][];
23
- formattedValue: (string | number | (string | number)[])[];
23
+ formattedValue: (string | number | React.ReactText[])[];
24
24
  };
25
25
  /**
26
26
  * 判断是否为指定ref内的元素
27
27
  * @en Determine whether it is an element within the specified ref
28
28
  */
29
- export declare const isRefDom: (dom: any, ref: React.RefObject<HTMLDivElement>) => boolean;
29
+ export declare const isRefDom: (dom: any, ref: React.RefObject<HTMLDivElement | null>) => boolean;
30
30
  /**
31
31
  * 判断是否为指定类名下的元素
32
32
  * @en Determine whether it is an element under the specified classname
@@ -1,5 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { NativeEllipsisProps } from '../type';
3
3
  declare function NativeEllipsis({ prefixCls, ellipsis, dangerouslyUseInnerHTML, text, maxLine, ellipsisNode, collapseNode, onEllipsisNodeClick, onCollapseNodeClick, }: NativeEllipsisProps): JSX.Element;
4
- declare const _default: React.MemoExoticComponent<typeof NativeEllipsis>;
5
- export default _default;
4
+ export default NativeEllipsis;
@@ -53,7 +53,6 @@
53
53
  }, ellipsisNode) : null);
54
54
  }
55
55
 
56
- var _default = /*#__PURE__*/_react.default.memo(NativeEllipsis);
57
-
56
+ var _default = NativeEllipsis;
58
57
  _exports.default = _default;
59
58
  });
@@ -1,5 +1,5 @@
1
1
  import { IRules } from '@arco-design/mobile-utils';
2
- import { ReactNode } from 'react';
2
+ import { ReactElement, ReactNode } from 'react';
3
3
  import { Promise } from 'es6-promise';
4
4
  export declare type FieldValue = any;
5
5
  export declare type FieldItem = Record<string, FieldValue>;
@@ -46,7 +46,7 @@ export interface FormProps {
46
46
  * @en Form initial value
47
47
  */
48
48
  initialValues?: FieldItem;
49
- children: React.ReactNodeArray | ReactNode;
49
+ children: ReactNode[] | ReactNode;
50
50
  /**
51
51
  * 表单项数据变化时的回调
52
52
  * @en Callback when the form item value changes
@@ -282,7 +282,7 @@ export interface FormItemProps {
282
282
  * 表单项子节点
283
283
  * @en Form item children
284
284
  */
285
- children: JSX.Element;
285
+ children: ReactElement;
286
286
  /**
287
287
  * 表单项是否刷新
288
288
  * @en Form item is updated
@@ -297,7 +297,7 @@ export interface FormItemProps {
297
297
  * 表单项下方节点
298
298
  * @en Form item extra node
299
299
  */
300
- extra?: JSX.Element;
300
+ extra?: ReactElement;
301
301
  /**
302
302
  * 触发事件更新事件名称
303
303
  * @en The function name when updating data
@@ -337,7 +337,7 @@ export interface IFormItemInnerProps {
337
337
  * 表单项子节点
338
338
  * @en Form item children
339
339
  */
340
- children: JSX.Element;
340
+ children: ReactElement<any, any>;
341
341
  /**
342
342
  * 表单项是否刷新
343
343
  * @en Form item is updated
@@ -280,9 +280,9 @@ declare const _default: React.ForwardRefExoticComponent<ImagePreviewProps & Reac
280
280
  * @param {ImagePreviewProps} config configuration
281
281
  * @returns {{ close: () => void; update: (newConfig: ImagePreviewProps) => void; }}
282
282
  */
283
- open: (config: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "style" | "ref" | "key" | "context" | "className" | "swipeable" | "lazyloadCount" | "onChange" | "onAfterChange" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "onClose" | "fit" | "loadingArea" | "errorArea" | "showLoading" | "showError" | "retryTime" | "staticLabel" | "animateDurationSlide" | "loop" | "renderIndicator" | "indicatorPos" | "showIndicator" | "hideSingleIndicator" | "spaceBetween" | "offsetBetween" | "percentToChange" | "distanceToChange" | "speedToChange" | "renderExtra" | "extra" | "images" | "openIndex" | "displayDuration" | "replaceFallbackWhenLoaded" | "noselect" | "scrollBezier" | "swipeToClose" | "getMinScale" | "getMaxScale" | "getDoubleClickScale" | "getThumbBounds" | "onImageClick" | "onImageDoubleClick" | "onImageLongTap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
283
+ open: (config: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "ref" | "className" | "style" | "context" | "key" | "swipeable" | "lazyloadCount" | "onChange" | "onAfterChange" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "onClose" | "fit" | "loadingArea" | "errorArea" | "showLoading" | "showError" | "retryTime" | "staticLabel" | "animateDurationSlide" | "loop" | "renderIndicator" | "indicatorPos" | "showIndicator" | "hideSingleIndicator" | "spaceBetween" | "offsetBetween" | "percentToChange" | "distanceToChange" | "speedToChange" | "renderExtra" | "extra" | "images" | "openIndex" | "displayDuration" | "replaceFallbackWhenLoaded" | "noselect" | "scrollBezier" | "swipeToClose" | "getMinScale" | "getMaxScale" | "getDoubleClickScale" | "getThumbBounds" | "onImageClick" | "onImageDoubleClick" | "onImageLongTap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
284
284
  close: () => void;
285
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "style" | "ref" | "key" | "context" | "className" | "swipeable" | "lazyloadCount" | "onChange" | "onAfterChange" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "onClose" | "fit" | "loadingArea" | "errorArea" | "showLoading" | "showError" | "retryTime" | "staticLabel" | "animateDurationSlide" | "loop" | "renderIndicator" | "indicatorPos" | "showIndicator" | "hideSingleIndicator" | "spaceBetween" | "offsetBetween" | "percentToChange" | "distanceToChange" | "speedToChange" | "renderExtra" | "extra" | "images" | "openIndex" | "displayDuration" | "replaceFallbackWhenLoaded" | "noselect" | "scrollBezier" | "swipeToClose" | "getMinScale" | "getMaxScale" | "getDoubleClickScale" | "getThumbBounds" | "onImageClick" | "onImageDoubleClick" | "onImageLongTap">) => void;
285
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "ref" | "className" | "style" | "context" | "key" | "swipeable" | "lazyloadCount" | "onChange" | "onAfterChange" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "onClose" | "fit" | "loadingArea" | "errorArea" | "showLoading" | "showError" | "retryTime" | "staticLabel" | "animateDurationSlide" | "loop" | "renderIndicator" | "indicatorPos" | "showIndicator" | "hideSingleIndicator" | "spaceBetween" | "offsetBetween" | "percentToChange" | "distanceToChange" | "speedToChange" | "renderExtra" | "extra" | "images" | "openIndex" | "displayDuration" | "replaceFallbackWhenLoaded" | "noselect" | "scrollBezier" | "swipeToClose" | "getMinScale" | "getMaxScale" | "getDoubleClickScale" | "getThumbBounds" | "onImageClick" | "onImageDoubleClick" | "onImageLongTap">) => void;
286
286
  };
287
287
  };
288
288
  /**
@@ -91,7 +91,9 @@
91
91
  stickyStyle: "absolute",
92
92
  getScrollContainer: getScrollContainer,
93
93
  ref: function ref(stickyRef) {
94
- return stickyRef && updateRef(groupIndex, stickyRef);
94
+ if (stickyRef) {
95
+ updateRef(groupIndex, stickyRef);
96
+ }
95
97
  }
96
98
  }, titleDom) : titleDom;
97
99
  };
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import type { IndexBarBaseData, IndexBarProps, IndexBarRef } from './type';
2
+ import type { IndexBarBaseData, IndexBarProps, IndexBarRef, IndexBarGroupProps } from './type';
3
3
  export type { IndexBarProps, IndexBarRef, IndexBarGroupProps, IndexBarGroupRef, IndexBarChangeTrigger, IndexBarIndexType, IndexBarTipType, } from './type';
4
4
  declare const _default: React.ForwardRefExoticComponent<IndexBarProps<IndexBarBaseData> & React.RefAttributes<IndexBarRef>> & {
5
- Group: React.ForwardRefExoticComponent<import("./type").IndexBarGroupProps<IndexBarBaseData> & React.RefAttributes<import("./type").IndexBarGroupRef>>;
5
+ Group: React.ForwardRefExoticComponent<IndexBarGroupProps<IndexBarBaseData> & React.RefAttributes<import("./type").IndexBarGroupRef>>;
6
6
  };
7
7
  /**
8
8
  * 索引栏组件
@@ -1,6 +1,6 @@
1
1
  import { ReactElement, ReactNode } from 'react';
2
2
  import { IndexBarIndexType } from './type';
3
3
  export declare function filterValidIndexBarChild(children: ReactNode): ReactElement<any, string | ((props: any) => ReactElement<any, any> | null) | (new (props: any) => import("react").Component<any, any, any>)>[];
4
- export declare function getFormatIndex(index: IndexBarIndexType, activeIndex: IndexBarIndexType | undefined): string | number;
4
+ export declare function getFormatIndex(index: IndexBarIndexType, activeIndex: IndexBarIndexType | undefined): import("react").ReactText;
5
5
  export declare function isValidIndex(index: unknown): index is IndexBarIndexType;
6
6
  export declare function getGroupDomFromIndex(containerDom: HTMLDivElement, activeIndex: IndexBarIndexType): HTMLDivElement | null;
@@ -205,11 +205,11 @@ declare const _default: React.ForwardRefExoticComponent<MaskingProps & React.Ref
205
205
  * @param {MaskingProps} config Configuration
206
206
  * @returns {{ close: () => void; update: (newConfig: MaskingProps) => void; }}
207
207
  */
208
- open: (config: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove"> & {
208
+ open: (config: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "ref" | "className" | "children" | "context" | "key" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove"> & {
209
209
  key?: string | undefined;
210
210
  }, context?: import("../context-provider").GlobalContextParams | undefined) => {
211
211
  close: () => void;
212
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove"> & {
212
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "ref" | "className" | "children" | "context" | "key" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove"> & {
213
213
  key?: string | undefined;
214
214
  }) => void;
215
215
  };
@@ -51,8 +51,8 @@ declare const _default: React.ForwardRefExoticComponent<NotifyProps & React.RefA
51
51
  * @param {string | NotifyProps} config
52
52
  * @returns {{ update: (config: NotifyProps) => void; close: () => void }}
53
53
  */
54
- info: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
55
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">) => void;
54
+ info: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "ref" | "className" | "style" | "duration" | "content" | "transitionDuration" | "context" | "key" | "type" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
55
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "ref" | "className" | "style" | "duration" | "content" | "transitionDuration" | "context" | "key" | "type" | "getContainer" | "onClose">) => void;
56
56
  close: () => void;
57
57
  };
58
58
  /**
@@ -61,8 +61,8 @@ declare const _default: React.ForwardRefExoticComponent<NotifyProps & React.RefA
61
61
  * @param {string | NotifyProps} config
62
62
  * @returns {{ update: (config: NotifyProps) => void; close: () => void }}
63
63
  */
64
- success: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
65
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">) => void;
64
+ success: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "ref" | "className" | "style" | "duration" | "content" | "transitionDuration" | "context" | "key" | "type" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
65
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "ref" | "className" | "style" | "duration" | "content" | "transitionDuration" | "context" | "key" | "type" | "getContainer" | "onClose">) => void;
66
66
  close: () => void;
67
67
  };
68
68
  /**
@@ -71,8 +71,8 @@ declare const _default: React.ForwardRefExoticComponent<NotifyProps & React.RefA
71
71
  * @param {string | NotifyProps} config
72
72
  * @returns {{ update: (config: NotifyProps) => void; close: () => void }}
73
73
  */
74
- error: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
75
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">) => void;
74
+ error: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "ref" | "className" | "style" | "duration" | "content" | "transitionDuration" | "context" | "key" | "type" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
75
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "ref" | "className" | "style" | "duration" | "content" | "transitionDuration" | "context" | "key" | "type" | "getContainer" | "onClose">) => void;
76
76
  close: () => void;
77
77
  };
78
78
  /**
@@ -81,8 +81,8 @@ declare const _default: React.ForwardRefExoticComponent<NotifyProps & React.RefA
81
81
  * @param {string | NotifyProps} config
82
82
  * @returns {{ update: (config: NotifyProps) => void; close: () => void }}
83
83
  */
84
- warn: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
85
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">) => void;
84
+ warn: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "ref" | "className" | "style" | "duration" | "content" | "transitionDuration" | "context" | "key" | "type" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
85
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "ref" | "className" | "style" | "duration" | "content" | "transitionDuration" | "context" | "key" | "type" | "getContainer" | "onClose">) => void;
86
86
  close: () => void;
87
87
  };
88
88
  };
@@ -53,8 +53,8 @@
53
53
  getContainer = props.getContainer;
54
54
  var domRef = (0, _react.useRef)(null);
55
55
  var innerRef = (0, _react.useRef)(null);
56
- var closeTimerRef = (0, _react.useRef)();
57
- var onCloseTimeRef = (0, _react.useRef)();
56
+ var closeTimerRef = (0, _react.useRef)(undefined);
57
+ var onCloseTimeRef = (0, _react.useRef)(undefined);
58
58
 
59
59
  var _useState = (0, _react.useState)(!visible),
60
60
  hasTrans = _useState[0],
@@ -135,7 +135,9 @@
135
135
  rows: rows,
136
136
  hideEmptyCols: hideEmptyCols,
137
137
  ref: function ref(cellRef) {
138
- return cellRef && (pickerCellsRef.current[index] = cellRef);
138
+ if (cellRef) {
139
+ pickerCellsRef.current[index] = cellRef;
140
+ }
139
141
  },
140
142
  touchToStop: touchToStop
141
143
  });
@@ -75,7 +75,7 @@
75
75
  var rowCount = Math.max(rows % 2 === 0 ? rows + 1 : rows, 3);
76
76
  var isTouchMoveRef = (0, _react.useRef)(false);
77
77
  var isTouchStopped = (0, _react.useRef)(false);
78
- var unmountCallbackRef = (0, _react.useRef)();
78
+ var unmountCallbackRef = (0, _react.useRef)(undefined);
79
79
  var timeRef = (0, _react.useRef)(null);
80
80
  var colStyle = (0, _react.useMemo)(function () {
81
81
  return (0, _helpers.getStyleWithVendor)((0, _extends2.default)({
@@ -265,7 +265,9 @@
265
265
  rows: rows,
266
266
  hideEmptyCols: hideEmptyCols,
267
267
  ref: function ref(cellRef) {
268
- return cellRef && (pickerCellsRef.current[index] = cellRef);
268
+ if (cellRef) {
269
+ pickerCellsRef.current[index] = cellRef;
270
+ }
269
271
  },
270
272
  touchToStop: touchToStop
271
273
  });