antd-mobile 5.18.0 → 5.19.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 (155) hide show
  1. package/2x/bundle/antd-mobile.cjs.js +47 -18976
  2. package/2x/bundle/antd-mobile.compatible.umd.js +25752 -0
  3. package/2x/bundle/antd-mobile.es.js +16123 -16565
  4. package/2x/bundle/antd-mobile.umd.js +64 -0
  5. package/2x/bundle/style.css +227 -273
  6. package/2x/cjs/components/action-sheet/action-sheet.d.ts +1 -1
  7. package/2x/cjs/components/button/button.js +1 -1
  8. package/2x/cjs/components/calendar/calendar.d.ts +1 -1
  9. package/2x/cjs/components/cascader/cascader.d.ts +2 -0
  10. package/2x/cjs/components/cascader/index.d.ts +1 -0
  11. package/2x/cjs/components/cascader-view/cascader-view.d.ts +2 -1
  12. package/2x/cjs/components/cascader-view/cascader-view.js +2 -1
  13. package/2x/cjs/components/dialog/show.d.ts +1 -1
  14. package/2x/cjs/components/image-viewer/slide.js +75 -56
  15. package/2x/cjs/components/input/input.js +9 -2
  16. package/2x/cjs/components/modal/show.d.ts +1 -1
  17. package/2x/cjs/components/number-keyboard/number-keyboard.css +11 -15
  18. package/2x/cjs/components/number-keyboard/number-keyboard.d.ts +1 -1
  19. package/2x/cjs/components/number-keyboard/number-keyboard.js +19 -17
  20. package/2x/cjs/components/passcode-input/index.d.ts +1 -1
  21. package/2x/cjs/components/passcode-input/passcode-input.css +12 -12
  22. package/2x/cjs/components/passcode-input/passcode-input.js +16 -8
  23. package/2x/cjs/components/result/result.d.ts +1 -1
  24. package/2x/cjs/components/result/result.js +7 -1
  25. package/2x/cjs/components/search-bar/search-bar.js +12 -2
  26. package/2x/cjs/locales/base.d.ts +9 -0
  27. package/2x/cjs/locales/base.js +9 -0
  28. package/2x/cjs/locales/en-US.d.ts +9 -0
  29. package/2x/cjs/locales/es-ES.d.ts +9 -0
  30. package/2x/cjs/locales/fa-IR.d.ts +9 -0
  31. package/2x/cjs/locales/fr-FR.d.ts +9 -0
  32. package/2x/cjs/locales/id-ID.d.ts +9 -0
  33. package/2x/cjs/locales/kk-KZ.d.ts +9 -0
  34. package/2x/cjs/locales/ko-KR.d.ts +9 -0
  35. package/2x/cjs/locales/zh-CN.d.ts +9 -0
  36. package/2x/cjs/locales/zh-CN.js +9 -0
  37. package/2x/cjs/locales/zh-HK.d.ts +9 -0
  38. package/2x/cjs/locales/zh-TW.d.ts +9 -0
  39. package/2x/cjs/utils/matrix.d.ts +10 -0
  40. package/2x/cjs/utils/matrix.js +60 -0
  41. package/2x/es/components/action-sheet/action-sheet.d.ts +1 -1
  42. package/2x/es/components/button/button.js +1 -1
  43. package/2x/es/components/calendar/calendar.d.ts +1 -1
  44. package/2x/es/components/cascader/cascader.d.ts +2 -0
  45. package/2x/es/components/cascader/index.d.ts +1 -0
  46. package/2x/es/components/cascader-view/cascader-view.d.ts +2 -1
  47. package/2x/es/components/cascader-view/cascader-view.js +2 -1
  48. package/2x/es/components/dialog/show.d.ts +1 -1
  49. package/2x/es/components/image-viewer/slide.js +73 -56
  50. package/2x/es/components/input/input.js +8 -2
  51. package/2x/es/components/modal/show.d.ts +1 -1
  52. package/2x/es/components/number-keyboard/number-keyboard.css +11 -15
  53. package/2x/es/components/number-keyboard/number-keyboard.d.ts +1 -1
  54. package/2x/es/components/number-keyboard/number-keyboard.js +19 -17
  55. package/2x/es/components/passcode-input/index.d.ts +1 -1
  56. package/2x/es/components/passcode-input/passcode-input.css +12 -12
  57. package/2x/es/components/passcode-input/passcode-input.js +15 -8
  58. package/2x/es/components/result/result.d.ts +1 -1
  59. package/2x/es/components/result/result.js +6 -1
  60. package/2x/es/components/search-bar/search-bar.js +12 -2
  61. package/2x/es/locales/base.d.ts +9 -0
  62. package/2x/es/locales/base.js +9 -0
  63. package/2x/es/locales/en-US.d.ts +9 -0
  64. package/2x/es/locales/es-ES.d.ts +9 -0
  65. package/2x/es/locales/fa-IR.d.ts +9 -0
  66. package/2x/es/locales/fr-FR.d.ts +9 -0
  67. package/2x/es/locales/id-ID.d.ts +9 -0
  68. package/2x/es/locales/kk-KZ.d.ts +9 -0
  69. package/2x/es/locales/ko-KR.d.ts +9 -0
  70. package/2x/es/locales/zh-CN.d.ts +9 -0
  71. package/2x/es/locales/zh-CN.js +9 -0
  72. package/2x/es/locales/zh-HK.d.ts +9 -0
  73. package/2x/es/locales/zh-TW.d.ts +9 -0
  74. package/2x/es/utils/matrix.d.ts +10 -0
  75. package/2x/es/utils/matrix.js +27 -0
  76. package/2x/package.json +1 -1
  77. package/2x/umd/antd-mobile.js +25752 -2
  78. package/bundle/antd-mobile.cjs.js +47 -18976
  79. package/bundle/antd-mobile.compatible.umd.js +25752 -0
  80. package/bundle/antd-mobile.es.js +16123 -16565
  81. package/bundle/antd-mobile.umd.js +64 -0
  82. package/bundle/style.css +1 -4088
  83. package/cjs/components/action-sheet/action-sheet.d.ts +1 -1
  84. package/cjs/components/button/button.js +1 -1
  85. package/cjs/components/calendar/calendar.d.ts +1 -1
  86. package/cjs/components/cascader/cascader.d.ts +2 -0
  87. package/cjs/components/cascader/index.d.ts +1 -0
  88. package/cjs/components/cascader-view/cascader-view.d.ts +2 -1
  89. package/cjs/components/cascader-view/cascader-view.js +2 -1
  90. package/cjs/components/dialog/show.d.ts +1 -1
  91. package/cjs/components/image-viewer/slide.js +75 -56
  92. package/cjs/components/input/input.js +9 -2
  93. package/cjs/components/modal/show.d.ts +1 -1
  94. package/cjs/components/number-keyboard/number-keyboard.css +11 -14
  95. package/cjs/components/number-keyboard/number-keyboard.d.ts +1 -1
  96. package/cjs/components/number-keyboard/number-keyboard.js +19 -17
  97. package/cjs/components/passcode-input/index.d.ts +1 -1
  98. package/cjs/components/passcode-input/passcode-input.css +12 -12
  99. package/cjs/components/passcode-input/passcode-input.js +16 -8
  100. package/cjs/components/result/result.d.ts +1 -1
  101. package/cjs/components/result/result.js +7 -1
  102. package/cjs/components/search-bar/search-bar.js +12 -2
  103. package/cjs/locales/base.d.ts +9 -0
  104. package/cjs/locales/base.js +9 -0
  105. package/cjs/locales/en-US.d.ts +9 -0
  106. package/cjs/locales/es-ES.d.ts +9 -0
  107. package/cjs/locales/fa-IR.d.ts +9 -0
  108. package/cjs/locales/fr-FR.d.ts +9 -0
  109. package/cjs/locales/id-ID.d.ts +9 -0
  110. package/cjs/locales/kk-KZ.d.ts +9 -0
  111. package/cjs/locales/ko-KR.d.ts +9 -0
  112. package/cjs/locales/zh-CN.d.ts +9 -0
  113. package/cjs/locales/zh-CN.js +9 -0
  114. package/cjs/locales/zh-HK.d.ts +9 -0
  115. package/cjs/locales/zh-TW.d.ts +9 -0
  116. package/cjs/utils/matrix.d.ts +10 -0
  117. package/cjs/utils/matrix.js +60 -0
  118. package/es/components/action-sheet/action-sheet.d.ts +1 -1
  119. package/es/components/button/button.js +1 -1
  120. package/es/components/calendar/calendar.d.ts +1 -1
  121. package/es/components/cascader/cascader.d.ts +2 -0
  122. package/es/components/cascader/index.d.ts +1 -0
  123. package/es/components/cascader-view/cascader-view.d.ts +2 -1
  124. package/es/components/cascader-view/cascader-view.js +2 -1
  125. package/es/components/dialog/show.d.ts +1 -1
  126. package/es/components/image-viewer/slide.js +73 -56
  127. package/es/components/input/input.js +8 -2
  128. package/es/components/modal/show.d.ts +1 -1
  129. package/es/components/number-keyboard/number-keyboard.css +11 -14
  130. package/es/components/number-keyboard/number-keyboard.d.ts +1 -1
  131. package/es/components/number-keyboard/number-keyboard.js +19 -17
  132. package/es/components/passcode-input/index.d.ts +1 -1
  133. package/es/components/passcode-input/passcode-input.css +12 -12
  134. package/es/components/passcode-input/passcode-input.js +15 -8
  135. package/es/components/result/result.d.ts +1 -1
  136. package/es/components/result/result.js +6 -1
  137. package/es/components/search-bar/search-bar.js +12 -2
  138. package/es/locales/base.d.ts +9 -0
  139. package/es/locales/base.js +9 -0
  140. package/es/locales/en-US.d.ts +9 -0
  141. package/es/locales/es-ES.d.ts +9 -0
  142. package/es/locales/fa-IR.d.ts +9 -0
  143. package/es/locales/fr-FR.d.ts +9 -0
  144. package/es/locales/id-ID.d.ts +9 -0
  145. package/es/locales/kk-KZ.d.ts +9 -0
  146. package/es/locales/ko-KR.d.ts +9 -0
  147. package/es/locales/zh-CN.d.ts +9 -0
  148. package/es/locales/zh-CN.js +9 -0
  149. package/es/locales/zh-HK.d.ts +9 -0
  150. package/es/locales/zh-TW.d.ts +9 -0
  151. package/es/utils/matrix.d.ts +10 -0
  152. package/es/utils/matrix.js +27 -0
  153. package/package.json +1 -1
  154. package/umd/antd-mobile.js +1 -1
  155. package/2x/umd/antd-mobile.js.LICENSE.txt +0 -35
@@ -17,6 +17,8 @@ var _bound = require("../../utils/bound");
17
17
 
18
18
  var _usePropsValue = require("../../utils/use-props-value");
19
19
 
20
+ var _configProvider = require("../config-provider");
21
+
20
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
23
 
22
24
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -36,6 +38,9 @@ const PasscodeInput = (0, _react.forwardRef)((p, ref) => {
36
38
  const props = (0, _withDefaultProps.mergeProps)(defaultProps, p); // 防止 length 值不合法
37
39
 
38
40
  const cellLength = props.length > 0 && props.length < Infinity ? Math.floor(props.length) : defaultProps.length;
41
+ const {
42
+ locale
43
+ } = (0, _configProvider.useConfig)();
39
44
  const [focused, setFocused] = (0, _react.useState)(false);
40
45
  const [value, setValue] = (0, _usePropsValue.usePropsValue)(props);
41
46
  const rootRef = (0, _react.useRef)(null);
@@ -106,9 +111,9 @@ const PasscodeInput = (0, _react.forwardRef)((p, ref) => {
106
111
  for (let i = 0; i < cellLength; i++) {
107
112
  cells.push(_react.default.createElement("div", {
108
113
  className: (0, _classnames.default)(`${classPrefix}-cell`, {
109
- caret: props.caret && caretIndex === i && focused,
110
- focused: focusedIndex === i && focused,
111
- dot: !props.plain && chars[i]
114
+ [`${classPrefix}-cell-caret`]: props.caret && caretIndex === i && focused,
115
+ [`${classPrefix}-cell-focused`]: focusedIndex === i && focused,
116
+ [`${classPrefix}-cell-dot`]: !props.plain && chars[i]
112
117
  }),
113
118
  key: i
114
119
  }, chars[i] && props.plain ? chars[i] : ''));
@@ -118,16 +123,18 @@ const PasscodeInput = (0, _react.forwardRef)((p, ref) => {
118
123
  };
119
124
 
120
125
  const cls = (0, _classnames.default)(classPrefix, {
121
- focused: focused,
122
- error: props.error,
123
- seperated: props.seperated
126
+ [`${classPrefix}-focused`]: focused,
127
+ [`${classPrefix}-error`]: props.error,
128
+ [`${classPrefix}-seperated`]: props.seperated
124
129
  });
125
130
  return _react.default.createElement(_react.default.Fragment, null, (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
126
131
  ref: rootRef,
127
132
  tabIndex: 0,
128
133
  className: cls,
129
134
  onFocus: onFocus,
130
- onBlur: onBlur
135
+ onBlur: onBlur,
136
+ role: 'button',
137
+ "aria-label": locale.PasscodeInput.name
131
138
  }, _react.default.createElement("div", {
132
139
  className: `${classPrefix}-cell-container`
133
140
  }, renderCells()), _react.default.createElement("input", {
@@ -139,7 +146,8 @@ const PasscodeInput = (0, _react.forwardRef)((p, ref) => {
139
146
  inputMode: 'numeric',
140
147
  onChange: e => {
141
148
  setValue(e.target.value.slice(0, props.length));
142
- }
149
+ },
150
+ "aria-hidden": true
143
151
  }))), props.keyboard && _react.default.cloneElement(props.keyboard, {
144
152
  visible: focused,
145
153
  onInput: v => {
@@ -1,7 +1,7 @@
1
1
  import { FC, ReactNode } from 'react';
2
2
  import { NativeProps } from '../../utils/native-props';
3
3
  export declare type ResultProps = {
4
- status: 'success' | 'error' | 'info' | 'waiting' | 'warning';
4
+ status?: 'success' | 'error' | 'info' | 'waiting' | 'warning';
5
5
  title: ReactNode;
6
6
  description?: ReactNode;
7
7
  icon?: ReactNode;
@@ -13,6 +13,8 @@ var _antdMobileIcons = require("antd-mobile-icons");
13
13
 
14
14
  var _nativeProps = require("../../utils/native-props");
15
15
 
16
+ var _withDefaultProps = require("../../utils/with-default-props");
17
+
16
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
19
 
18
20
  const classPrefix = `adm-result`;
@@ -23,8 +25,12 @@ const iconRecord = {
23
25
  waiting: _antdMobileIcons.ClockCircleFill,
24
26
  warning: _antdMobileIcons.ExclamationCircleFill
25
27
  };
28
+ const defaultProps = {
29
+ status: 'info'
30
+ };
26
31
 
27
- const Result = props => {
32
+ const Result = p => {
33
+ const props = (0, _withDefaultProps.mergeProps)(defaultProps, p);
28
34
  const {
29
35
  status,
30
36
  title,
@@ -48,6 +48,7 @@ const SearchBar = (0, _react.forwardRef)((p, ref) => {
48
48
  const [value, setValue] = (0, _usePropsValue.usePropsValue)(props);
49
49
  const [hasFocus, setHasFocus] = (0, _react.useState)(false);
50
50
  const inputRef = (0, _react.useRef)(null);
51
+ const composingRef = (0, _react.useRef)(false);
51
52
  (0, _react.useImperativeHandle)(ref, () => ({
52
53
  clear: () => {
53
54
  var _a;
@@ -140,8 +141,17 @@ const SearchBar = (0, _react.forwardRef)((p, ref) => {
140
141
  onEnterPress: () => {
141
142
  var _a, _b;
142
143
 
143
- (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.blur();
144
- (_b = props.onSearch) === null || _b === void 0 ? void 0 : _b.call(props, value);
144
+ if (!composingRef.current) {
145
+ (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.blur();
146
+ (_b = props.onSearch) === null || _b === void 0 ? void 0 : _b.call(props, value);
147
+ }
148
+ },
149
+ "aria-label": locale.SearchBar.name,
150
+ onCompositionStart: () => {
151
+ composingRef.current = true;
152
+ },
153
+ onCompositionEnd: () => {
154
+ composingRef.current = false;
145
155
  }
146
156
  })), renderCancelButton()));
147
157
  });
@@ -93,17 +93,26 @@ export declare const base: {
93
93
  failedToLoad: string;
94
94
  retry: string;
95
95
  };
96
+ Input: {
97
+ clear: string;
98
+ };
96
99
  Mask: {
97
100
  name: string;
98
101
  };
99
102
  Modal: {
100
103
  ok: string;
101
104
  };
105
+ PasscodeInput: {
106
+ name: string;
107
+ };
102
108
  PullToRefresh: {
103
109
  pulling: string;
104
110
  canRelease: string;
105
111
  complete: string;
106
112
  };
113
+ SearchBar: {
114
+ name: string;
115
+ };
107
116
  Slider: {
108
117
  name: string;
109
118
  };
@@ -100,17 +100,26 @@ const base = {
100
100
  failedToLoad: 'Failed to load',
101
101
  retry: 'Retry'
102
102
  },
103
+ Input: {
104
+ clear: 'clear'
105
+ },
103
106
  Mask: {
104
107
  name: 'Mask'
105
108
  },
106
109
  Modal: {
107
110
  ok: 'OK'
108
111
  },
112
+ PasscodeInput: {
113
+ name: 'Passcode Input'
114
+ },
109
115
  PullToRefresh: {
110
116
  pulling: 'Scroll down to refresh',
111
117
  canRelease: 'Release to refresh immediately',
112
118
  complete: 'Refresh successful'
113
119
  },
120
+ SearchBar: {
121
+ name: 'Search Bar'
122
+ },
114
123
  Slider: {
115
124
  name: 'Slider'
116
125
  },
@@ -93,17 +93,26 @@ declare const enUS: {
93
93
  failedToLoad: string;
94
94
  retry: string;
95
95
  };
96
+ Input: {
97
+ clear: string;
98
+ };
96
99
  Mask: {
97
100
  name: string;
98
101
  };
99
102
  Modal: {
100
103
  ok: string;
101
104
  };
105
+ PasscodeInput: {
106
+ name: string;
107
+ };
102
108
  PullToRefresh: {
103
109
  pulling: string;
104
110
  canRelease: string;
105
111
  complete: string;
106
112
  };
113
+ SearchBar: {
114
+ name: string;
115
+ };
107
116
  Slider: {
108
117
  name: string;
109
118
  };
@@ -93,17 +93,26 @@ declare const esES: {
93
93
  failedToLoad: string;
94
94
  retry: string;
95
95
  };
96
+ Input: {
97
+ clear: string;
98
+ };
96
99
  Mask: {
97
100
  name: string;
98
101
  };
99
102
  Modal: {
100
103
  ok: string;
101
104
  };
105
+ PasscodeInput: {
106
+ name: string;
107
+ };
102
108
  PullToRefresh: {
103
109
  pulling: string;
104
110
  canRelease: string;
105
111
  complete: string;
106
112
  };
113
+ SearchBar: {
114
+ name: string;
115
+ };
107
116
  Slider: {
108
117
  name: string;
109
118
  };
@@ -93,17 +93,26 @@ declare const faIR: {
93
93
  failedToLoad: string;
94
94
  retry: string;
95
95
  };
96
+ Input: {
97
+ clear: string;
98
+ };
96
99
  Mask: {
97
100
  name: string;
98
101
  };
99
102
  Modal: {
100
103
  ok: string;
101
104
  };
105
+ PasscodeInput: {
106
+ name: string;
107
+ };
102
108
  PullToRefresh: {
103
109
  pulling: string;
104
110
  canRelease: string;
105
111
  complete: string;
106
112
  };
113
+ SearchBar: {
114
+ name: string;
115
+ };
107
116
  Slider: {
108
117
  name: string;
109
118
  };
@@ -93,17 +93,26 @@ declare const frFR: {
93
93
  failedToLoad: string;
94
94
  retry: string;
95
95
  };
96
+ Input: {
97
+ clear: string;
98
+ };
96
99
  Mask: {
97
100
  name: string;
98
101
  };
99
102
  Modal: {
100
103
  ok: string;
101
104
  };
105
+ PasscodeInput: {
106
+ name: string;
107
+ };
102
108
  PullToRefresh: {
103
109
  pulling: string;
104
110
  canRelease: string;
105
111
  complete: string;
106
112
  };
113
+ SearchBar: {
114
+ name: string;
115
+ };
107
116
  Slider: {
108
117
  name: string;
109
118
  };
@@ -93,17 +93,26 @@ declare const idID: {
93
93
  failedToLoad: string;
94
94
  retry: string;
95
95
  };
96
+ Input: {
97
+ clear: string;
98
+ };
96
99
  Mask: {
97
100
  name: string;
98
101
  };
99
102
  Modal: {
100
103
  ok: string;
101
104
  };
105
+ PasscodeInput: {
106
+ name: string;
107
+ };
102
108
  PullToRefresh: {
103
109
  pulling: string;
104
110
  canRelease: string;
105
111
  complete: string;
106
112
  };
113
+ SearchBar: {
114
+ name: string;
115
+ };
107
116
  Slider: {
108
117
  name: string;
109
118
  };
@@ -93,17 +93,26 @@ declare const kkKZ: {
93
93
  failedToLoad: string;
94
94
  retry: string;
95
95
  };
96
+ Input: {
97
+ clear: string;
98
+ };
96
99
  Mask: {
97
100
  name: string;
98
101
  };
99
102
  Modal: {
100
103
  ok: string;
101
104
  };
105
+ PasscodeInput: {
106
+ name: string;
107
+ };
102
108
  PullToRefresh: {
103
109
  pulling: string;
104
110
  canRelease: string;
105
111
  complete: string;
106
112
  };
113
+ SearchBar: {
114
+ name: string;
115
+ };
107
116
  Slider: {
108
117
  name: string;
109
118
  };
@@ -93,17 +93,26 @@ declare const koKR: {
93
93
  failedToLoad: string;
94
94
  retry: string;
95
95
  };
96
+ Input: {
97
+ clear: string;
98
+ };
96
99
  Mask: {
97
100
  name: string;
98
101
  };
99
102
  Modal: {
100
103
  ok: string;
101
104
  };
105
+ PasscodeInput: {
106
+ name: string;
107
+ };
102
108
  PullToRefresh: {
103
109
  pulling: string;
104
110
  canRelease: string;
105
111
  complete: string;
106
112
  };
113
+ SearchBar: {
114
+ name: string;
115
+ };
107
116
  Slider: {
108
117
  name: string;
109
118
  };
@@ -93,17 +93,26 @@ declare const zhCN: {
93
93
  failedToLoad: string;
94
94
  retry: string;
95
95
  };
96
+ Input: {
97
+ clear: string;
98
+ };
96
99
  Mask: {
97
100
  name: string;
98
101
  };
99
102
  Modal: {
100
103
  ok: string;
101
104
  };
105
+ PasscodeInput: {
106
+ name: string;
107
+ };
102
108
  PullToRefresh: {
103
109
  pulling: string;
104
110
  canRelease: string;
105
111
  complete: string;
106
112
  };
113
+ SearchBar: {
114
+ name: string;
115
+ };
107
116
  Slider: {
108
117
  name: string;
109
118
  };
@@ -105,17 +105,26 @@ const zhCN = (0, _mergeLocale.mergeLocale)(_base.base, {
105
105
  failedToLoad: '加载失败',
106
106
  retry: '重新加载'
107
107
  },
108
+ Input: {
109
+ clear: '清除'
110
+ },
108
111
  Mask: {
109
112
  name: '遮罩层'
110
113
  },
111
114
  Modal: {
112
115
  ok: '我知道了'
113
116
  },
117
+ PasscodeInput: {
118
+ name: '密码输入框'
119
+ },
114
120
  PullToRefresh: {
115
121
  pulling: '下拉刷新',
116
122
  canRelease: '释放立即刷新',
117
123
  complete: '刷新成功'
118
124
  },
125
+ SearchBar: {
126
+ name: '搜索框'
127
+ },
119
128
  Slider: {
120
129
  name: '滑动输入条'
121
130
  },
@@ -93,17 +93,26 @@ declare const zhHK: {
93
93
  failedToLoad: string;
94
94
  retry: string;
95
95
  };
96
+ Input: {
97
+ clear: string;
98
+ };
96
99
  Mask: {
97
100
  name: string;
98
101
  };
99
102
  Modal: {
100
103
  ok: string;
101
104
  };
105
+ PasscodeInput: {
106
+ name: string;
107
+ };
102
108
  PullToRefresh: {
103
109
  pulling: string;
104
110
  canRelease: string;
105
111
  complete: string;
106
112
  };
113
+ SearchBar: {
114
+ name: string;
115
+ };
107
116
  Slider: {
108
117
  name: string;
109
118
  };
@@ -93,17 +93,26 @@ declare const zhTW: {
93
93
  failedToLoad: string;
94
94
  retry: string;
95
95
  };
96
+ Input: {
97
+ clear: string;
98
+ };
96
99
  Mask: {
97
100
  name: string;
98
101
  };
99
102
  Modal: {
100
103
  ok: string;
101
104
  };
105
+ PasscodeInput: {
106
+ name: string;
107
+ };
102
108
  PullToRefresh: {
103
109
  pulling: string;
104
110
  canRelease: string;
105
111
  complete: string;
106
112
  };
113
+ SearchBar: {
114
+ name: string;
115
+ };
107
116
  Slider: {
108
117
  name: string;
109
118
  };
@@ -0,0 +1,10 @@
1
+ export declare type Matrix = readonly [number, number, number, number, number, number];
2
+ export declare const create: () => Matrix;
3
+ export declare const getTranslateX: (m: Matrix) => number;
4
+ export declare const getTranslateY: (m: Matrix) => number;
5
+ export declare const getScaleX: (m: Matrix) => number;
6
+ export declare const getScaleY: (m: Matrix) => number;
7
+ export declare const translate: (m: Matrix, x: number, y: number) => Matrix;
8
+ export declare const scale: (m: Matrix, scaleX: number, scaleY?: number) => Matrix;
9
+ export declare const apply: (m: Matrix, [ox, oy]: [number, number]) => [number, number];
10
+ export declare const multiply: (m1: Matrix, m2: Matrix) => Matrix;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.translate = exports.scale = exports.multiply = exports.getTranslateY = exports.getTranslateX = exports.getScaleY = exports.getScaleX = exports.create = exports.apply = void 0;
7
+
8
+ const create = () => {
9
+ return [1, 0, 0, 1, 0, 0];
10
+ };
11
+
12
+ exports.create = create;
13
+
14
+ const getTranslateX = m => {
15
+ return m[4];
16
+ };
17
+
18
+ exports.getTranslateX = getTranslateX;
19
+
20
+ const getTranslateY = m => {
21
+ return m[5];
22
+ };
23
+
24
+ exports.getTranslateY = getTranslateY;
25
+
26
+ const getScaleX = m => {
27
+ return m[0];
28
+ };
29
+
30
+ exports.getScaleX = getScaleX;
31
+
32
+ const getScaleY = m => {
33
+ return m[3];
34
+ };
35
+
36
+ exports.getScaleY = getScaleY;
37
+
38
+ const translate = (m, x, y) => {
39
+ return multiply([1, 0, 0, 1, x, y], m);
40
+ };
41
+
42
+ exports.translate = translate;
43
+
44
+ const scale = (m, scaleX, scaleY = scaleX) => {
45
+ return multiply([scaleX, 0, 0, scaleY, 0, 0], m);
46
+ };
47
+
48
+ exports.scale = scale;
49
+
50
+ const apply = (m, [ox, oy]) => {
51
+ return [m[0] * ox + m[2] * oy + m[4], m[1] * ox + m[3] * oy + m[5]];
52
+ };
53
+
54
+ exports.apply = apply;
55
+
56
+ const multiply = (m1, m2) => {
57
+ return [m1[0] * m2[0] + m1[2] * m2[1], m1[1] * m2[0] + m1[3] * m2[1], m1[0] * m2[2] + m1[2] * m2[3], m1[1] * m2[2] + m1[3] * m2[3], m1[0] * m2[4] + m1[2] * m2[5] + m1[4], m1[1] * m2[4] + m1[3] * m2[5] + m1[5]];
58
+ };
59
+
60
+ exports.multiply = multiply;
@@ -27,4 +27,4 @@ export declare const ActionSheet: FC<ActionSheetProps>;
27
27
  export declare type ActionSheetShowHandler = {
28
28
  close: () => void;
29
29
  };
30
- export declare function showActionSheet(props: Omit<ActionSheetProps, 'visible'>): ActionSheetShowHandler;
30
+ export declare function showActionSheet(props: Omit<ActionSheetProps, 'visible' | 'destroyOnClose' | 'forceRender'>): ActionSheetShowHandler;
@@ -68,5 +68,5 @@ export const Button = forwardRef((p, ref) => {
68
68
  onTouchEnd: props.onTouchEnd
69
69
  }, loading ? React.createElement("div", {
70
70
  className: `${classPrefix}-loading-wrapper`
71
- }, props.loadingIcon, props.loadingText) : props.children));
71
+ }, props.loadingIcon, props.loadingText) : React.createElement("span", null, props.children)));
72
72
  });
@@ -15,7 +15,7 @@ export declare type CalendarProps = {
15
15
  nextYearButton?: React.ReactNode;
16
16
  onPageChange?: (year: number, month: number) => void;
17
17
  weekStartsOn?: 'Monday' | 'Sunday';
18
- renderLabel?: (date: Date) => string | null | undefined;
18
+ renderLabel?: (date: Date) => React.ReactNode;
19
19
  allowClear?: boolean;
20
20
  max?: Date;
21
21
  min?: Date;
@@ -23,6 +23,7 @@ export declare type CascaderProps = {
23
23
  cancelText?: ReactNode;
24
24
  children?: (items: (CascaderOption | null)[], actions: CascaderActions) => ReactNode;
25
25
  onTabsChange?: (index: number) => void;
26
+ activeIcon?: ReactNode;
26
27
  } & Pick<PopupProps, 'getContainer' | 'afterShow' | 'afterClose' | 'onClick' | 'stopPropagation' | 'destroyOnClose' | 'forceRender'> & NativeProps;
27
28
  export declare const Cascader: React.ForwardRefExoticComponent<{
28
29
  options: CascaderOption[];
@@ -39,6 +40,7 @@ export declare const Cascader: React.ForwardRefExoticComponent<{
39
40
  cancelText?: ReactNode;
40
41
  children?: ((items: (CascaderOption | null)[], actions: CascaderActions) => ReactNode) | undefined;
41
42
  onTabsChange?: ((index: number) => void) | undefined;
43
+ activeIcon?: ReactNode;
42
44
  } & Pick<PopupProps, "onClick" | "destroyOnClose" | "forceRender" | "getContainer" | "afterShow" | "afterClose" | "stopPropagation"> & {
43
45
  className?: string | undefined;
44
46
  style?: (React.CSSProperties & Partial<Record<never, string>>) | undefined;
@@ -18,6 +18,7 @@ declare const _default: import("react").ForwardRefExoticComponent<{
18
18
  cancelText?: import("react").ReactNode;
19
19
  children?: ((items: (import("../cascader-view").CascaderOption | null)[], actions: import("./cascader").CascaderActions) => import("react").ReactNode) | undefined;
20
20
  onTabsChange?: ((index: number) => void) | undefined;
21
+ activeIcon?: import("react").ReactNode;
21
22
  } & Pick<import("../popup").PopupProps, "onClick" | "destroyOnClose" | "forceRender" | "getContainer" | "afterShow" | "afterClose" | "stopPropagation"> & {
22
23
  className?: string | undefined;
23
24
  style?: (import("react").CSSProperties & Partial<Record<never, string>>) | undefined;
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  import { NativeProps } from '../../utils/native-props';
3
3
  export declare type CascaderValue = string;
4
4
  export declare type CascaderOption = {
@@ -18,5 +18,6 @@ export declare type CascaderViewProps = {
18
18
  onChange?: (value: CascaderValue[], extend: CascaderValueExtend) => void;
19
19
  placeholder?: string;
20
20
  onTabsChange?: (index: number) => void;
21
+ activeIcon?: ReactNode;
21
22
  } & NativeProps<'--height'>;
22
23
  export declare const CascaderView: FC<CascaderViewProps>;
@@ -121,7 +121,8 @@ export const CascaderView = p => {
121
121
  animated: true
122
122
  })) : React.createElement(CheckList, {
123
123
  value: [value[index]],
124
- onChange: selectValue => onItemSelect(selectValue[0], index)
124
+ onChange: selectValue => onItemSelect(selectValue[0], index),
125
+ activeIcon: props.activeIcon
125
126
  }, level.options.map(option => {
126
127
  const active = value[index] === option.value;
127
128
  return React.createElement(CheckList.Item, {
@@ -1,5 +1,5 @@
1
1
  import { DialogProps } from './dialog';
2
- export declare type DialogShowProps = Omit<DialogProps, 'visible'>;
2
+ export declare type DialogShowProps = Omit<DialogProps, 'visible' | 'destroyOnClose' | 'forceRender'>;
3
3
  export declare type DialogShowHandler = {
4
4
  close: () => void;
5
5
  };