antd-mobile 5.28.2 → 5.29.1

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 (266) hide show
  1. package/2x/bundle/antd-mobile.cjs.development.js +429 -217
  2. package/2x/bundle/antd-mobile.cjs.js +9 -9
  3. package/2x/bundle/antd-mobile.es.development.js +429 -217
  4. package/2x/bundle/antd-mobile.es.js +4918 -4678
  5. package/2x/bundle/antd-mobile.umd.development.js +429 -217
  6. package/2x/bundle/antd-mobile.umd.js +9 -9
  7. package/2x/bundle/style.css +36 -33
  8. package/2x/cjs/components/action-sheet/action-sheet.css +1 -1
  9. package/2x/cjs/components/action-sheet/action-sheet.js +6 -2
  10. package/2x/cjs/components/avatar/avatar.d.ts +1 -1
  11. package/2x/cjs/components/avatar/avatar.js +2 -1
  12. package/2x/cjs/components/badge/badge.css +2 -2
  13. package/2x/cjs/components/button/button.css +2 -2
  14. package/2x/cjs/components/calendar/calendar.js +1 -1
  15. package/2x/cjs/components/capsule-tabs/capsule-tabs.css +2 -2
  16. package/2x/cjs/components/check-list/check-list-item.js +3 -1
  17. package/2x/cjs/components/check-list/check-list.d.ts +1 -0
  18. package/2x/cjs/components/check-list/check-list.js +2 -0
  19. package/2x/cjs/components/check-list/context.d.ts +1 -0
  20. package/2x/cjs/components/checkbox/checkbox.css +2 -2
  21. package/2x/cjs/components/ellipsis/ellipsis.js +1 -1
  22. package/2x/cjs/components/image/image.css +1 -1
  23. package/2x/cjs/components/index-bar/index-bar.css +4 -4
  24. package/2x/cjs/components/input/input.d.ts +1 -1
  25. package/2x/cjs/components/jumbo-tabs/jumbo-tabs.css +2 -2
  26. package/2x/cjs/components/notice-bar/notice-bar.css +1 -1
  27. package/2x/cjs/components/number-keyboard/number-keyboard.js +14 -8
  28. package/2x/cjs/components/popover/index.d.ts +1 -1
  29. package/2x/cjs/components/popover/popover.css +1 -1
  30. package/2x/cjs/components/popover/popover.d.ts +2 -2
  31. package/2x/cjs/components/popover/popover.js +1 -1
  32. package/2x/cjs/components/popup/popup.js +13 -11
  33. package/2x/cjs/components/radio/radio.css +2 -2
  34. package/2x/cjs/components/search-bar/search-bar.css +1 -1
  35. package/2x/cjs/components/selector/selector.css +1 -1
  36. package/2x/cjs/components/selector/selector.js +10 -2
  37. package/2x/cjs/components/side-bar/side-bar.css +1 -1
  38. package/2x/cjs/components/slider/slider.css +3 -3
  39. package/2x/cjs/components/stepper/stepper.css +2 -2
  40. package/2x/cjs/components/swipe-action/swipe-action.css +1 -1
  41. package/2x/cjs/components/switch/switch.css +2 -2
  42. package/2x/cjs/components/tabs/tabs.js +5 -2
  43. package/2x/cjs/components/text-area/text-area.d.ts +1 -1
  44. package/2x/cjs/components/text-area/text-area.js +1 -0
  45. package/2x/cjs/components/virtual-input/virtual-input.js +11 -2
  46. package/2x/cjs/global/global.css +5 -2
  47. package/2x/cjs/global/theme-default.css +5 -2
  48. package/2x/cjs/locales/base.d.ts +3 -0
  49. package/2x/cjs/locales/base.js +3 -0
  50. package/2x/cjs/locales/da-DK.d.ts +134 -0
  51. package/2x/cjs/locales/da-DK.js +132 -0
  52. package/2x/cjs/locales/en-US.d.ts +3 -0
  53. package/2x/cjs/locales/es-ES.d.ts +3 -0
  54. package/2x/cjs/locales/fa-IR.d.ts +3 -0
  55. package/2x/cjs/locales/fr-FR.d.ts +3 -0
  56. package/2x/cjs/locales/id-ID.d.ts +3 -0
  57. package/2x/cjs/locales/it-IT.d.ts +134 -0
  58. package/2x/cjs/locales/it-IT.js +144 -0
  59. package/2x/cjs/locales/ja-JP.d.ts +3 -0
  60. package/2x/cjs/locales/kk-KZ.d.ts +3 -0
  61. package/2x/cjs/locales/ko-KR.d.ts +3 -0
  62. package/2x/cjs/locales/nb-NO.d.ts +134 -0
  63. package/2x/cjs/locales/nb-NO.js +144 -0
  64. package/2x/cjs/locales/nl-NL.d.ts +134 -0
  65. package/2x/cjs/locales/nl-NL.js +144 -0
  66. package/2x/cjs/locales/zh-CN.d.ts +3 -0
  67. package/2x/cjs/locales/zh-CN.js +3 -0
  68. package/2x/cjs/locales/zh-HK.d.ts +3 -0
  69. package/2x/cjs/locales/zh-TW.d.ts +3 -0
  70. package/2x/es/components/action-sheet/action-sheet.css +1 -1
  71. package/2x/es/components/action-sheet/action-sheet.js +6 -2
  72. package/2x/es/components/avatar/avatar.d.ts +1 -1
  73. package/2x/es/components/avatar/avatar.js +2 -1
  74. package/2x/es/components/badge/badge.css +2 -2
  75. package/2x/es/components/button/button.css +2 -2
  76. package/2x/es/components/calendar/calendar.js +1 -1
  77. package/2x/es/components/capsule-tabs/capsule-tabs.css +2 -2
  78. package/2x/es/components/check-list/check-list-item.js +3 -1
  79. package/2x/es/components/check-list/check-list.d.ts +1 -0
  80. package/2x/es/components/check-list/check-list.js +2 -0
  81. package/2x/es/components/check-list/context.d.ts +1 -0
  82. package/2x/es/components/checkbox/checkbox.css +2 -2
  83. package/2x/es/components/ellipsis/ellipsis.js +1 -1
  84. package/2x/es/components/image/image.css +1 -1
  85. package/2x/es/components/index-bar/index-bar.css +4 -4
  86. package/2x/es/components/input/input.d.ts +1 -1
  87. package/2x/es/components/jumbo-tabs/jumbo-tabs.css +2 -2
  88. package/2x/es/components/notice-bar/notice-bar.css +1 -1
  89. package/2x/es/components/number-keyboard/number-keyboard.js +14 -8
  90. package/2x/es/components/popover/index.d.ts +1 -1
  91. package/2x/es/components/popover/popover.css +1 -1
  92. package/2x/es/components/popover/popover.d.ts +2 -2
  93. package/2x/es/components/popover/popover.js +1 -1
  94. package/2x/es/components/popup/popup.js +13 -11
  95. package/2x/es/components/radio/radio.css +2 -2
  96. package/2x/es/components/search-bar/search-bar.css +1 -1
  97. package/2x/es/components/selector/selector.css +1 -1
  98. package/2x/es/components/selector/selector.js +10 -2
  99. package/2x/es/components/side-bar/side-bar.css +1 -1
  100. package/2x/es/components/slider/slider.css +3 -3
  101. package/2x/es/components/stepper/stepper.css +2 -2
  102. package/2x/es/components/swipe-action/swipe-action.css +1 -1
  103. package/2x/es/components/switch/switch.css +2 -2
  104. package/2x/es/components/tabs/tabs.js +5 -2
  105. package/2x/es/components/text-area/text-area.d.ts +1 -1
  106. package/2x/es/components/text-area/text-area.js +1 -0
  107. package/2x/es/components/virtual-input/virtual-input.js +11 -2
  108. package/2x/es/global/global.css +5 -2
  109. package/2x/es/global/theme-default.css +5 -2
  110. package/2x/es/locales/base.d.ts +3 -0
  111. package/2x/es/locales/base.js +3 -0
  112. package/2x/es/locales/da-DK.d.ts +134 -0
  113. package/2x/es/locales/da-DK.js +125 -0
  114. package/2x/es/locales/en-US.d.ts +3 -0
  115. package/2x/es/locales/es-ES.d.ts +3 -0
  116. package/2x/es/locales/fa-IR.d.ts +3 -0
  117. package/2x/es/locales/fr-FR.d.ts +3 -0
  118. package/2x/es/locales/id-ID.d.ts +3 -0
  119. package/2x/es/locales/it-IT.d.ts +134 -0
  120. package/2x/es/locales/it-IT.js +137 -0
  121. package/2x/es/locales/ja-JP.d.ts +3 -0
  122. package/2x/es/locales/kk-KZ.d.ts +3 -0
  123. package/2x/es/locales/ko-KR.d.ts +3 -0
  124. package/2x/es/locales/nb-NO.d.ts +134 -0
  125. package/2x/es/locales/nb-NO.js +137 -0
  126. package/2x/es/locales/nl-NL.d.ts +134 -0
  127. package/2x/es/locales/nl-NL.js +137 -0
  128. package/2x/es/locales/zh-CN.d.ts +3 -0
  129. package/2x/es/locales/zh-CN.js +3 -0
  130. package/2x/es/locales/zh-HK.d.ts +3 -0
  131. package/2x/es/locales/zh-TW.d.ts +3 -0
  132. package/2x/package.json +1 -1
  133. package/bundle/antd-mobile.cjs.development.js +429 -217
  134. package/bundle/antd-mobile.cjs.js +9 -9
  135. package/bundle/antd-mobile.compatible.umd.js +1 -1
  136. package/bundle/antd-mobile.es.development.js +429 -217
  137. package/bundle/antd-mobile.es.js +4918 -4678
  138. package/bundle/antd-mobile.umd.development.js +429 -217
  139. package/bundle/antd-mobile.umd.js +9 -9
  140. package/bundle/style.css +1 -1
  141. package/cjs/components/action-sheet/action-sheet.css +1 -1
  142. package/cjs/components/action-sheet/action-sheet.js +6 -2
  143. package/cjs/components/avatar/avatar.d.ts +1 -1
  144. package/cjs/components/avatar/avatar.js +2 -1
  145. package/cjs/components/badge/badge.css +2 -2
  146. package/cjs/components/button/button.css +2 -2
  147. package/cjs/components/calendar/calendar.js +1 -1
  148. package/cjs/components/capsule-tabs/capsule-tabs.css +2 -2
  149. package/cjs/components/check-list/check-list-item.js +3 -1
  150. package/cjs/components/check-list/check-list.d.ts +1 -0
  151. package/cjs/components/check-list/check-list.js +2 -0
  152. package/cjs/components/check-list/context.d.ts +1 -0
  153. package/cjs/components/checkbox/checkbox.css +2 -2
  154. package/cjs/components/ellipsis/ellipsis.js +1 -1
  155. package/cjs/components/image/image.css +1 -1
  156. package/cjs/components/index-bar/index-bar.css +4 -4
  157. package/cjs/components/input/input.d.ts +1 -1
  158. package/cjs/components/jumbo-tabs/jumbo-tabs.css +2 -2
  159. package/cjs/components/notice-bar/notice-bar.css +1 -1
  160. package/cjs/components/number-keyboard/number-keyboard.js +14 -8
  161. package/cjs/components/popover/index.d.ts +1 -1
  162. package/cjs/components/popover/popover.css +1 -1
  163. package/cjs/components/popover/popover.d.ts +2 -2
  164. package/cjs/components/popover/popover.js +1 -1
  165. package/cjs/components/popup/popup.js +13 -11
  166. package/cjs/components/radio/radio.css +2 -2
  167. package/cjs/components/search-bar/search-bar.css +1 -1
  168. package/cjs/components/selector/selector.css +1 -1
  169. package/cjs/components/selector/selector.js +10 -2
  170. package/cjs/components/side-bar/side-bar.css +1 -1
  171. package/cjs/components/slider/slider.css +3 -3
  172. package/cjs/components/stepper/stepper.css +2 -2
  173. package/cjs/components/swipe-action/swipe-action.css +1 -1
  174. package/cjs/components/switch/switch.css +2 -2
  175. package/cjs/components/tabs/tabs.js +5 -2
  176. package/cjs/components/text-area/text-area.d.ts +1 -1
  177. package/cjs/components/text-area/text-area.js +1 -0
  178. package/cjs/components/virtual-input/virtual-input.js +11 -2
  179. package/cjs/global/global.css +5 -2
  180. package/cjs/global/theme-default.css +5 -2
  181. package/cjs/locales/base.d.ts +3 -0
  182. package/cjs/locales/base.js +3 -0
  183. package/cjs/locales/da-DK.d.ts +134 -0
  184. package/cjs/locales/da-DK.js +132 -0
  185. package/cjs/locales/en-US.d.ts +3 -0
  186. package/cjs/locales/es-ES.d.ts +3 -0
  187. package/cjs/locales/fa-IR.d.ts +3 -0
  188. package/cjs/locales/fr-FR.d.ts +3 -0
  189. package/cjs/locales/id-ID.d.ts +3 -0
  190. package/cjs/locales/it-IT.d.ts +134 -0
  191. package/cjs/locales/it-IT.js +144 -0
  192. package/cjs/locales/ja-JP.d.ts +3 -0
  193. package/cjs/locales/kk-KZ.d.ts +3 -0
  194. package/cjs/locales/ko-KR.d.ts +3 -0
  195. package/cjs/locales/nb-NO.d.ts +134 -0
  196. package/cjs/locales/nb-NO.js +144 -0
  197. package/cjs/locales/nl-NL.d.ts +134 -0
  198. package/cjs/locales/nl-NL.js +144 -0
  199. package/cjs/locales/zh-CN.d.ts +3 -0
  200. package/cjs/locales/zh-CN.js +3 -0
  201. package/cjs/locales/zh-HK.d.ts +3 -0
  202. package/cjs/locales/zh-TW.d.ts +3 -0
  203. package/es/components/action-sheet/action-sheet.css +1 -1
  204. package/es/components/action-sheet/action-sheet.js +6 -2
  205. package/es/components/avatar/avatar.d.ts +1 -1
  206. package/es/components/avatar/avatar.js +2 -1
  207. package/es/components/badge/badge.css +2 -2
  208. package/es/components/button/button.css +2 -2
  209. package/es/components/calendar/calendar.js +1 -1
  210. package/es/components/capsule-tabs/capsule-tabs.css +2 -2
  211. package/es/components/check-list/check-list-item.js +3 -1
  212. package/es/components/check-list/check-list.d.ts +1 -0
  213. package/es/components/check-list/check-list.js +2 -0
  214. package/es/components/check-list/context.d.ts +1 -0
  215. package/es/components/checkbox/checkbox.css +2 -2
  216. package/es/components/ellipsis/ellipsis.js +1 -1
  217. package/es/components/image/image.css +1 -1
  218. package/es/components/index-bar/index-bar.css +4 -4
  219. package/es/components/input/input.d.ts +1 -1
  220. package/es/components/jumbo-tabs/jumbo-tabs.css +2 -2
  221. package/es/components/notice-bar/notice-bar.css +1 -1
  222. package/es/components/number-keyboard/number-keyboard.js +14 -8
  223. package/es/components/popover/index.d.ts +1 -1
  224. package/es/components/popover/popover.css +1 -1
  225. package/es/components/popover/popover.d.ts +2 -2
  226. package/es/components/popover/popover.js +1 -1
  227. package/es/components/popup/popup.js +13 -11
  228. package/es/components/radio/radio.css +2 -2
  229. package/es/components/search-bar/search-bar.css +1 -1
  230. package/es/components/selector/selector.css +1 -1
  231. package/es/components/selector/selector.js +10 -2
  232. package/es/components/side-bar/side-bar.css +1 -1
  233. package/es/components/slider/slider.css +3 -3
  234. package/es/components/stepper/stepper.css +2 -2
  235. package/es/components/swipe-action/swipe-action.css +1 -1
  236. package/es/components/switch/switch.css +2 -2
  237. package/es/components/tabs/tabs.js +5 -2
  238. package/es/components/text-area/text-area.d.ts +1 -1
  239. package/es/components/text-area/text-area.js +1 -0
  240. package/es/components/virtual-input/virtual-input.js +11 -2
  241. package/es/global/global.css +5 -2
  242. package/es/global/theme-default.css +5 -2
  243. package/es/locales/base.d.ts +3 -0
  244. package/es/locales/base.js +3 -0
  245. package/es/locales/da-DK.d.ts +134 -0
  246. package/es/locales/da-DK.js +125 -0
  247. package/es/locales/en-US.d.ts +3 -0
  248. package/es/locales/es-ES.d.ts +3 -0
  249. package/es/locales/fa-IR.d.ts +3 -0
  250. package/es/locales/fr-FR.d.ts +3 -0
  251. package/es/locales/id-ID.d.ts +3 -0
  252. package/es/locales/it-IT.d.ts +134 -0
  253. package/es/locales/it-IT.js +137 -0
  254. package/es/locales/ja-JP.d.ts +3 -0
  255. package/es/locales/kk-KZ.d.ts +3 -0
  256. package/es/locales/ko-KR.d.ts +3 -0
  257. package/es/locales/nb-NO.d.ts +134 -0
  258. package/es/locales/nb-NO.js +137 -0
  259. package/es/locales/nl-NL.d.ts +134 -0
  260. package/es/locales/nl-NL.js +137 -0
  261. package/es/locales/zh-CN.d.ts +3 -0
  262. package/es/locales/zh-CN.js +3 -0
  263. package/es/locales/zh-HK.d.ts +3 -0
  264. package/es/locales/zh-TW.d.ts +3 -0
  265. package/package.json +1 -1
  266. package/umd/antd-mobile.js +1 -1
@@ -30,6 +30,18 @@ if (canUseDom$2) {
30
30
  document.addEventListener("touchstart", () => {
31
31
  }, true);
32
32
  }
33
+ var __assign = function() {
34
+ __assign = Object.assign || function __assign2(t) {
35
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
36
+ s = arguments[i];
37
+ for (var p in s)
38
+ if (Object.prototype.hasOwnProperty.call(s, p))
39
+ t[p] = s[p];
40
+ }
41
+ return t;
42
+ };
43
+ return __assign.apply(this, arguments);
44
+ };
33
45
  function __rest(s, e) {
34
46
  var t = {};
35
47
  for (var p in s)
@@ -69,6 +81,128 @@ function __awaiter(thisArg, _arguments, P, generator) {
69
81
  step((generator = generator.apply(thisArg, _arguments || [])).next());
70
82
  });
71
83
  }
84
+ function __generator(thisArg, body) {
85
+ var _ = { label: 0, sent: function() {
86
+ if (t[0] & 1)
87
+ throw t[1];
88
+ return t[1];
89
+ }, trys: [], ops: [] }, f, y, t, g;
90
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
91
+ return this;
92
+ }), g;
93
+ function verb(n) {
94
+ return function(v) {
95
+ return step([n, v]);
96
+ };
97
+ }
98
+ function step(op) {
99
+ if (f)
100
+ throw new TypeError("Generator is already executing.");
101
+ while (g && (g = 0, op[0] && (_ = 0)), _)
102
+ try {
103
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
104
+ return t;
105
+ if (y = 0, t)
106
+ op = [op[0] & 2, t.value];
107
+ switch (op[0]) {
108
+ case 0:
109
+ case 1:
110
+ t = op;
111
+ break;
112
+ case 4:
113
+ _.label++;
114
+ return { value: op[1], done: false };
115
+ case 5:
116
+ _.label++;
117
+ y = op[1];
118
+ op = [0];
119
+ continue;
120
+ case 7:
121
+ op = _.ops.pop();
122
+ _.trys.pop();
123
+ continue;
124
+ default:
125
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
126
+ _ = 0;
127
+ continue;
128
+ }
129
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
130
+ _.label = op[1];
131
+ break;
132
+ }
133
+ if (op[0] === 6 && _.label < t[1]) {
134
+ _.label = t[1];
135
+ t = op;
136
+ break;
137
+ }
138
+ if (t && _.label < t[2]) {
139
+ _.label = t[2];
140
+ _.ops.push(op);
141
+ break;
142
+ }
143
+ if (t[2])
144
+ _.ops.pop();
145
+ _.trys.pop();
146
+ continue;
147
+ }
148
+ op = body.call(thisArg, _);
149
+ } catch (e) {
150
+ op = [6, e];
151
+ y = 0;
152
+ } finally {
153
+ f = t = 0;
154
+ }
155
+ if (op[0] & 5)
156
+ throw op[1];
157
+ return { value: op[0] ? op[1] : void 0, done: true };
158
+ }
159
+ }
160
+ function __values(o) {
161
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
162
+ if (m)
163
+ return m.call(o);
164
+ if (o && typeof o.length === "number")
165
+ return {
166
+ next: function() {
167
+ if (o && i >= o.length)
168
+ o = void 0;
169
+ return { value: o && o[i++], done: !o };
170
+ }
171
+ };
172
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
173
+ }
174
+ function __read(o, n) {
175
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
176
+ if (!m)
177
+ return o;
178
+ var i = m.call(o), r, ar = [], e;
179
+ try {
180
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
181
+ ar.push(r.value);
182
+ } catch (error) {
183
+ e = { error };
184
+ } finally {
185
+ try {
186
+ if (r && !r.done && (m = i["return"]))
187
+ m.call(i);
188
+ } finally {
189
+ if (e)
190
+ throw e.error;
191
+ }
192
+ }
193
+ return ar;
194
+ }
195
+ function __spreadArray(to2, from, pack) {
196
+ if (pack || arguments.length === 2)
197
+ for (var i = 0, l = from.length, ar; i < l; i++) {
198
+ if (ar || !(i in from)) {
199
+ if (!ar)
200
+ ar = Array.prototype.slice.call(from, 0, i);
201
+ ar[i] = from[i];
202
+ }
203
+ }
204
+ return to2.concat(ar || Array.prototype.slice.call(from));
205
+ }
72
206
  function mergeLocale(base2, patch) {
73
207
  function merge2(a, b) {
74
208
  if (typeof a !== "object" || typeof b !== "object" || Array.isArray(a) || Array.isArray(b)) {
@@ -213,6 +347,9 @@ const base = {
213
347
  },
214
348
  Switch: {
215
349
  name: "Switch"
350
+ },
351
+ Selector: {
352
+ name: "Selector"
216
353
  }
217
354
  };
218
355
  const typeTemplate$1 = "${label}\u4E0D\u662F\u4E00\u4E2A\u6709\u6548\u7684${type}";
@@ -344,6 +481,9 @@ const zhCN = mergeLocale(base, {
344
481
  },
345
482
  Switch: {
346
483
  name: "\u5F00\u5173"
484
+ },
485
+ Selector: {
486
+ name: "\u9009\u62E9\u7EC4"
347
487
  }
348
488
  });
349
489
  const zhCN$1 = zhCN;
@@ -906,36 +1046,48 @@ function mergeProps(...items) {
906
1046
  return ret;
907
1047
  }
908
1048
  const popup = "";
909
- const createUpdateEffect = (hook) => (effect, deps) => {
910
- const isMounted = React$4.useRef(false);
911
- hook(() => {
912
- return () => {
913
- isMounted.current = false;
914
- };
915
- }, []);
916
- hook(() => {
917
- if (!isMounted.current) {
918
- isMounted.current = true;
919
- } else {
920
- return effect();
921
- }
922
- }, deps);
1049
+ var createUpdateEffect = function(hook) {
1050
+ return function(effect, deps) {
1051
+ var isMounted = React$4.useRef(false);
1052
+ hook(function() {
1053
+ return function() {
1054
+ isMounted.current = false;
1055
+ };
1056
+ }, []);
1057
+ hook(function() {
1058
+ if (!isMounted.current) {
1059
+ isMounted.current = true;
1060
+ } else {
1061
+ return effect();
1062
+ }
1063
+ }, deps);
1064
+ };
923
1065
  };
924
- const isFunction$1 = (value) => typeof value === "function";
925
- const isNumber = (value) => typeof value === "number";
926
- const isDev$1 = true;
1066
+ var isFunction$1 = function(value) {
1067
+ return typeof value === "function";
1068
+ };
1069
+ var isNumber = function(value) {
1070
+ return typeof value === "number";
1071
+ };
1072
+ var isDev$1 = true;
927
1073
  const isDev$2 = isDev$1;
928
1074
  function useMemoizedFn(fn) {
929
1075
  if (isDev$2) {
930
1076
  if (!isFunction$1(fn)) {
931
- console.error(`useMemoizedFn expected parameter is a function, got ${typeof fn}`);
1077
+ console.error("useMemoizedFn expected parameter is a function, got ".concat(typeof fn));
932
1078
  }
933
1079
  }
934
- const fnRef = React$4.useRef(fn);
935
- fnRef.current = React$4.useMemo(() => fn, [fn]);
936
- const memoizedFn = React$4.useRef();
1080
+ var fnRef = React$4.useRef(fn);
1081
+ fnRef.current = React$4.useMemo(function() {
1082
+ return fn;
1083
+ }, [fn]);
1084
+ var memoizedFn = React$4.useRef();
937
1085
  if (!memoizedFn.current) {
938
- memoizedFn.current = function(...args) {
1086
+ memoizedFn.current = function() {
1087
+ var args = [];
1088
+ for (var _i = 0; _i < arguments.length; _i++) {
1089
+ args[_i] = arguments[_i];
1090
+ }
939
1091
  return fnRef.current.apply(this, args);
940
1092
  };
941
1093
  }
@@ -945,26 +1097,28 @@ const useUpdateEffect = createUpdateEffect(React$4.useEffect);
945
1097
  function depsAreSame(oldDeps, deps) {
946
1098
  if (oldDeps === deps)
947
1099
  return true;
948
- for (let i = 0; i < oldDeps.length; i++) {
1100
+ for (var i = 0; i < oldDeps.length; i++) {
949
1101
  if (!Object.is(oldDeps[i], deps[i]))
950
1102
  return false;
951
1103
  }
952
1104
  return true;
953
1105
  }
954
1106
  function useLatest(value) {
955
- const ref = React$4.useRef(value);
1107
+ var ref = React$4.useRef(value);
956
1108
  ref.current = value;
957
1109
  return ref;
958
1110
  }
959
- const useUnmount = (fn) => {
1111
+ var useUnmount = function(fn) {
960
1112
  if (isDev$2) {
961
1113
  if (!isFunction$1(fn)) {
962
- console.error(`useUnmount expected parameter is a function, got ${typeof fn}`);
1114
+ console.error("useUnmount expected parameter is a function, got ".concat(typeof fn));
963
1115
  }
964
1116
  }
965
- const fnRef = useLatest(fn);
966
- React$4.useEffect(() => () => {
967
- fnRef.current();
1117
+ var fnRef = useLatest(fn);
1118
+ React$4.useEffect(function() {
1119
+ return function() {
1120
+ fnRef.current();
1121
+ };
968
1122
  }, []);
969
1123
  };
970
1124
  const useUnmount$1 = useUnmount;
@@ -1103,7 +1257,7 @@ function debounce$1(func, wait, options) {
1103
1257
  return debounced;
1104
1258
  }
1105
1259
  var debounce_1 = debounce$1;
1106
- const isBrowser$2 = !!(typeof window !== "undefined" && window.document && window.document.createElement);
1260
+ var isBrowser$2 = !!(typeof window !== "undefined" && window.document && window.document.createElement);
1107
1261
  const isBrowser$3 = isBrowser$2;
1108
1262
  var debounce = debounce_1, isObject$5 = isObject_1;
1109
1263
  var FUNC_ERROR_TEXT$1 = "Expected a function";
@@ -1123,20 +1277,22 @@ function throttle$1(func, wait, options) {
1123
1277
  });
1124
1278
  }
1125
1279
  var throttle_1 = throttle$1;
1126
- const useMount = (fn) => {
1280
+ var useMount = function(fn) {
1127
1281
  if (isDev$2) {
1128
1282
  if (!isFunction$1(fn)) {
1129
- console.error(`useMount: parameter \`fn\` expected to be a function, but got "${typeof fn}".`);
1283
+ console.error('useMount: parameter `fn` expected to be a function, but got "'.concat(typeof fn, '".'));
1130
1284
  }
1131
1285
  }
1132
- React$4.useEffect(() => {
1286
+ React$4.useEffect(function() {
1133
1287
  fn === null || fn === void 0 ? void 0 : fn();
1134
1288
  }, []);
1135
1289
  };
1136
1290
  const useMount$1 = useMount;
1137
- const useUpdate = () => {
1138
- const [, setState] = React$4.useState({});
1139
- return React$4.useCallback(() => setState({}), []);
1291
+ var useUpdate = function() {
1292
+ var _a = __read(React$4.useState({}), 2), setState = _a[1];
1293
+ return React$4.useCallback(function() {
1294
+ return setState({});
1295
+ }, []);
1140
1296
  };
1141
1297
  const useUpdate$1 = useUpdate;
1142
1298
  function getTargetElement(target, defaultElement) {
@@ -1146,7 +1302,7 @@ function getTargetElement(target, defaultElement) {
1146
1302
  if (!target) {
1147
1303
  return defaultElement;
1148
1304
  }
1149
- let targetElement;
1305
+ var targetElement;
1150
1306
  if (isFunction$1(target)) {
1151
1307
  targetElement = target();
1152
1308
  } else if ("current" in target) {
@@ -1156,42 +1312,44 @@ function getTargetElement(target, defaultElement) {
1156
1312
  }
1157
1313
  return targetElement;
1158
1314
  }
1159
- const checkIfAllInShadow = (targets) => {
1160
- return targets.every((item) => {
1161
- const targetElement = getTargetElement(item);
1315
+ var checkIfAllInShadow = function(targets) {
1316
+ return targets.every(function(item) {
1317
+ var targetElement = getTargetElement(item);
1162
1318
  if (!targetElement)
1163
1319
  return false;
1164
1320
  if (targetElement.getRootNode() instanceof ShadowRoot)
1165
1321
  return true;
1166
1322
  });
1167
1323
  };
1168
- const getShadow = (node) => {
1324
+ var getShadow = function(node) {
1169
1325
  if (!node) {
1170
1326
  return document;
1171
1327
  }
1172
1328
  return node.getRootNode();
1173
1329
  };
1174
- const getDocumentOrShadow = (target) => {
1330
+ var getDocumentOrShadow = function(target) {
1175
1331
  if (!target || !document.getRootNode) {
1176
1332
  return document;
1177
1333
  }
1178
- const targets = Array.isArray(target) ? target : [target];
1334
+ var targets = Array.isArray(target) ? target : [target];
1179
1335
  if (checkIfAllInShadow(targets)) {
1180
1336
  return getShadow(getTargetElement(targets[0]));
1181
1337
  }
1182
1338
  return document;
1183
1339
  };
1184
1340
  const getDocumentOrShadow$1 = getDocumentOrShadow;
1185
- const createEffectWithTarget = (useEffectType) => {
1186
- const useEffectWithTarget2 = (effect, deps, target) => {
1187
- const hasInitRef = React$4.useRef(false);
1188
- const lastElementRef = React$4.useRef([]);
1189
- const lastDepsRef = React$4.useRef([]);
1190
- const unLoadRef = React$4.useRef();
1191
- useEffectType(() => {
1341
+ var createEffectWithTarget = function(useEffectType) {
1342
+ var useEffectWithTarget2 = function(effect, deps, target) {
1343
+ var hasInitRef = React$4.useRef(false);
1344
+ var lastElementRef = React$4.useRef([]);
1345
+ var lastDepsRef = React$4.useRef([]);
1346
+ var unLoadRef = React$4.useRef();
1347
+ useEffectType(function() {
1192
1348
  var _a;
1193
- const targets = Array.isArray(target) ? target : [target];
1194
- const els = targets.map((item) => getTargetElement(item));
1349
+ var targets = Array.isArray(target) ? target : [target];
1350
+ var els = targets.map(function(item) {
1351
+ return getTargetElement(item);
1352
+ });
1195
1353
  if (!hasInitRef.current) {
1196
1354
  hasInitRef.current = true;
1197
1355
  lastElementRef.current = els;
@@ -1206,7 +1364,7 @@ const createEffectWithTarget = (useEffectType) => {
1206
1364
  unLoadRef.current = effect();
1207
1365
  }
1208
1366
  });
1209
- useUnmount$1(() => {
1367
+ useUnmount$1(function() {
1210
1368
  var _a;
1211
1369
  (_a = unLoadRef.current) === null || _a === void 0 ? void 0 : _a.call(unLoadRef);
1212
1370
  hasInitRef.current = false;
@@ -1215,26 +1373,33 @@ const createEffectWithTarget = (useEffectType) => {
1215
1373
  return useEffectWithTarget2;
1216
1374
  };
1217
1375
  const createEffectWithTarget$1 = createEffectWithTarget;
1218
- const useEffectWithTarget$1 = createEffectWithTarget$1(React$4.useEffect);
1376
+ var useEffectWithTarget$1 = createEffectWithTarget$1(React$4.useEffect);
1219
1377
  const useEffectWithTarget$2 = useEffectWithTarget$1;
1220
- function useClickAway(onClickAway, target, eventName = "click") {
1221
- const onClickAwayRef = useLatest(onClickAway);
1222
- useEffectWithTarget$2(() => {
1223
- const handler = (event) => {
1224
- const targets = Array.isArray(target) ? target : [target];
1225
- if (targets.some((item) => {
1226
- const targetElement = getTargetElement(item);
1378
+ function useClickAway(onClickAway, target, eventName) {
1379
+ if (eventName === void 0) {
1380
+ eventName = "click";
1381
+ }
1382
+ var onClickAwayRef = useLatest(onClickAway);
1383
+ useEffectWithTarget$2(function() {
1384
+ var handler = function(event) {
1385
+ var targets = Array.isArray(target) ? target : [target];
1386
+ if (targets.some(function(item) {
1387
+ var targetElement = getTargetElement(item);
1227
1388
  return !targetElement || targetElement.contains(event.target);
1228
1389
  })) {
1229
1390
  return;
1230
1391
  }
1231
1392
  onClickAwayRef.current(event);
1232
1393
  };
1233
- const documentOrShadow = getDocumentOrShadow$1(target);
1234
- const eventNames = Array.isArray(eventName) ? eventName : [eventName];
1235
- eventNames.forEach((event) => documentOrShadow.addEventListener(event, handler));
1236
- return () => {
1237
- eventNames.forEach((event) => documentOrShadow.removeEventListener(event, handler));
1394
+ var documentOrShadow = getDocumentOrShadow$1(target);
1395
+ var eventNames = Array.isArray(eventName) ? eventName : [eventName];
1396
+ eventNames.forEach(function(event) {
1397
+ return documentOrShadow.addEventListener(event, handler);
1398
+ });
1399
+ return function() {
1400
+ eventNames.forEach(function(event) {
1401
+ return documentOrShadow.removeEventListener(event, handler);
1402
+ });
1238
1403
  };
1239
1404
  }, Array.isArray(eventName) ? eventName : [eventName], target);
1240
1405
  }
@@ -1451,15 +1616,21 @@ function useDebounceFn(fn, options) {
1451
1616
  var _a;
1452
1617
  if (isDev$2) {
1453
1618
  if (!isFunction$1(fn)) {
1454
- console.error(`useDebounceFn expected parameter is a function, got ${typeof fn}`);
1619
+ console.error("useDebounceFn expected parameter is a function, got ".concat(typeof fn));
1455
1620
  }
1456
1621
  }
1457
- const fnRef = useLatest(fn);
1458
- const wait = (_a = options === null || options === void 0 ? void 0 : options.wait) !== null && _a !== void 0 ? _a : 1e3;
1459
- const debounced = React$4.useMemo(() => debounce_1((...args) => {
1460
- return fnRef.current(...args);
1461
- }, wait, options), []);
1462
- useUnmount$1(() => {
1622
+ var fnRef = useLatest(fn);
1623
+ var wait = (_a = options === null || options === void 0 ? void 0 : options.wait) !== null && _a !== void 0 ? _a : 1e3;
1624
+ var debounced = React$4.useMemo(function() {
1625
+ return debounce_1(function() {
1626
+ var args = [];
1627
+ for (var _i = 0; _i < arguments.length; _i++) {
1628
+ args[_i] = arguments[_i];
1629
+ }
1630
+ return fnRef.current.apply(fnRef, __spreadArray([], __read(args), false));
1631
+ }, wait, options);
1632
+ }, []);
1633
+ useUnmount$1(function() {
1463
1634
  debounced.cancel();
1464
1635
  });
1465
1636
  return {
@@ -1469,13 +1640,11 @@ function useDebounceFn(fn, options) {
1469
1640
  };
1470
1641
  }
1471
1642
  function useDebounceEffect(effect, deps, options) {
1472
- const [flag, setFlag] = React$4.useState({});
1473
- const {
1474
- run
1475
- } = useDebounceFn(() => {
1643
+ var _a = __read(React$4.useState({}), 2), flag = _a[0], setFlag = _a[1];
1644
+ var run = useDebounceFn(function() {
1476
1645
  setFlag({});
1477
- }, options);
1478
- React$4.useEffect(() => {
1646
+ }, options).run;
1647
+ React$4.useEffect(function() {
1479
1648
  return run();
1480
1649
  }, deps);
1481
1650
  useUpdateEffect(effect, [flag]);
@@ -2597,65 +2766,100 @@ var isEqual_1 = isEqual$1;
2597
2766
  window.IntersectionObserverEntry = IntersectionObserverEntry;
2598
2767
  })();
2599
2768
  function useInViewport(target, options) {
2600
- const [state, setState] = React$4.useState();
2601
- const [ratio, setRatio] = React$4.useState();
2602
- useEffectWithTarget$2(() => {
2603
- const el = getTargetElement(target);
2769
+ var _a = __read(React$4.useState(), 2), state = _a[0], setState = _a[1];
2770
+ var _b = __read(React$4.useState(), 2), ratio = _b[0], setRatio = _b[1];
2771
+ useEffectWithTarget$2(function() {
2772
+ var el = getTargetElement(target);
2604
2773
  if (!el) {
2605
2774
  return;
2606
2775
  }
2607
- const observer = new IntersectionObserver((entries) => {
2608
- for (const entry of entries) {
2609
- setRatio(entry.intersectionRatio);
2610
- setState(entry.isIntersecting);
2776
+ var observer = new IntersectionObserver(function(entries) {
2777
+ var e_1, _a2;
2778
+ try {
2779
+ for (var entries_1 = __values(entries), entries_1_1 = entries_1.next(); !entries_1_1.done; entries_1_1 = entries_1.next()) {
2780
+ var entry = entries_1_1.value;
2781
+ setRatio(entry.intersectionRatio);
2782
+ setState(entry.isIntersecting);
2783
+ }
2784
+ } catch (e_1_1) {
2785
+ e_1 = {
2786
+ error: e_1_1
2787
+ };
2788
+ } finally {
2789
+ try {
2790
+ if (entries_1_1 && !entries_1_1.done && (_a2 = entries_1.return))
2791
+ _a2.call(entries_1);
2792
+ } finally {
2793
+ if (e_1)
2794
+ throw e_1.error;
2795
+ }
2611
2796
  }
2612
- }, Object.assign(Object.assign({}, options), {
2797
+ }, __assign(__assign({}, options), {
2613
2798
  root: getTargetElement(options === null || options === void 0 ? void 0 : options.root)
2614
2799
  }));
2615
2800
  observer.observe(el);
2616
- return () => {
2801
+ return function() {
2617
2802
  observer.disconnect();
2618
2803
  };
2619
2804
  }, [options === null || options === void 0 ? void 0 : options.rootMargin, options === null || options === void 0 ? void 0 : options.threshold], target);
2620
2805
  return [state, ratio];
2621
2806
  }
2622
- const useIsomorphicLayoutEffect$1 = isBrowser$3 ? React$4.useLayoutEffect : React$4.useEffect;
2807
+ var useIsomorphicLayoutEffect$1 = isBrowser$3 ? React$4.useLayoutEffect : React$4.useEffect;
2623
2808
  const useIsomorphicLayoutEffect$2 = useIsomorphicLayoutEffect$1;
2624
2809
  function useLockFn(fn) {
2625
- const lockRef = React$4.useRef(false);
2626
- return React$4.useCallback((...args) => __awaiter(this, void 0, void 0, function* () {
2627
- if (lockRef.current)
2628
- return;
2629
- lockRef.current = true;
2630
- try {
2631
- const ret = yield fn(...args);
2632
- lockRef.current = false;
2633
- return ret;
2634
- } catch (e) {
2635
- lockRef.current = false;
2636
- throw e;
2637
- }
2638
- }), [fn]);
2810
+ var _this = this;
2811
+ var lockRef = React$4.useRef(false);
2812
+ return React$4.useCallback(function() {
2813
+ var args = [];
2814
+ for (var _i = 0; _i < arguments.length; _i++) {
2815
+ args[_i] = arguments[_i];
2816
+ }
2817
+ return __awaiter(_this, void 0, void 0, function() {
2818
+ var ret, e_1;
2819
+ return __generator(this, function(_a) {
2820
+ switch (_a.label) {
2821
+ case 0:
2822
+ if (lockRef.current)
2823
+ return [2];
2824
+ lockRef.current = true;
2825
+ _a.label = 1;
2826
+ case 1:
2827
+ _a.trys.push([1, 3, , 4]);
2828
+ return [4, fn.apply(void 0, __spreadArray([], __read(args), false))];
2829
+ case 2:
2830
+ ret = _a.sent();
2831
+ lockRef.current = false;
2832
+ return [2, ret];
2833
+ case 3:
2834
+ e_1 = _a.sent();
2835
+ lockRef.current = false;
2836
+ throw e_1;
2837
+ case 4:
2838
+ return [2];
2839
+ }
2840
+ });
2841
+ });
2842
+ }, [fn]);
2639
2843
  }
2640
2844
  function useRafState(initialState) {
2641
- const ref = React$4.useRef(0);
2642
- const [state, setState] = React$4.useState(initialState);
2643
- const setRafState = React$4.useCallback((value) => {
2845
+ var ref = React$4.useRef(0);
2846
+ var _a = __read(React$4.useState(initialState), 2), state = _a[0], setState = _a[1];
2847
+ var setRafState = React$4.useCallback(function(value) {
2644
2848
  cancelAnimationFrame(ref.current);
2645
- ref.current = requestAnimationFrame(() => {
2849
+ ref.current = requestAnimationFrame(function() {
2646
2850
  setState(value);
2647
2851
  });
2648
2852
  }, []);
2649
- useUnmount$1(() => {
2853
+ useUnmount$1(function() {
2650
2854
  cancelAnimationFrame(ref.current);
2651
2855
  });
2652
2856
  return [state, setRafState];
2653
2857
  }
2654
- const useUnmountedRef = () => {
2655
- const unmountedRef = React$4.useRef(false);
2656
- React$4.useEffect(() => {
2858
+ var useUnmountedRef = function() {
2859
+ var unmountedRef = React$4.useRef(false);
2860
+ React$4.useEffect(function() {
2657
2861
  unmountedRef.current = false;
2658
- return () => {
2862
+ return function() {
2659
2863
  unmountedRef.current = true;
2660
2864
  };
2661
2865
  }, []);
@@ -3133,29 +3337,26 @@ var index$k = function() {
3133
3337
  }
3134
3338
  return ResizeObserver$1;
3135
3339
  }();
3136
- const useEffectWithTarget = createEffectWithTarget$1(React$4.useLayoutEffect);
3340
+ var useEffectWithTarget = createEffectWithTarget$1(React$4.useLayoutEffect);
3137
3341
  const useLayoutEffectWithTarget = useEffectWithTarget;
3138
- const useIsomorphicLayoutEffectWithTarget = isBrowser$3 ? useLayoutEffectWithTarget : useEffectWithTarget$2;
3342
+ var useIsomorphicLayoutEffectWithTarget = isBrowser$3 ? useLayoutEffectWithTarget : useEffectWithTarget$2;
3139
3343
  const useIsomorphicLayoutEffectWithTarget$1 = useIsomorphicLayoutEffectWithTarget;
3140
3344
  function useSize(target) {
3141
- const [state, setState] = useRafState(() => {
3142
- const el = getTargetElement(target);
3345
+ var _a = __read(useRafState(function() {
3346
+ var el = getTargetElement(target);
3143
3347
  return el ? {
3144
3348
  width: el.clientWidth,
3145
3349
  height: el.clientHeight
3146
3350
  } : void 0;
3147
- });
3148
- useIsomorphicLayoutEffectWithTarget$1(() => {
3149
- const el = getTargetElement(target);
3351
+ }), 2), state = _a[0], setState = _a[1];
3352
+ useIsomorphicLayoutEffectWithTarget$1(function() {
3353
+ var el = getTargetElement(target);
3150
3354
  if (!el) {
3151
3355
  return;
3152
3356
  }
3153
- const resizeObserver = new index$k((entries) => {
3154
- entries.forEach((entry) => {
3155
- const {
3156
- clientWidth,
3157
- clientHeight
3158
- } = entry.target;
3357
+ var resizeObserver = new index$k(function(entries) {
3358
+ entries.forEach(function(entry) {
3359
+ var _a2 = entry.target, clientWidth = _a2.clientWidth, clientHeight = _a2.clientHeight;
3159
3360
  setState({
3160
3361
  width: clientWidth,
3161
3362
  height: clientHeight
@@ -3163,7 +3364,7 @@ function useSize(target) {
3163
3364
  });
3164
3365
  });
3165
3366
  resizeObserver.observe(el);
3166
- return () => {
3367
+ return function() {
3167
3368
  resizeObserver.disconnect();
3168
3369
  };
3169
3370
  }, [], target);
@@ -3173,15 +3374,21 @@ function useThrottleFn(fn, options) {
3173
3374
  var _a;
3174
3375
  if (isDev$2) {
3175
3376
  if (!isFunction$1(fn)) {
3176
- console.error(`useThrottleFn expected parameter is a function, got ${typeof fn}`);
3377
+ console.error("useThrottleFn expected parameter is a function, got ".concat(typeof fn));
3177
3378
  }
3178
3379
  }
3179
- const fnRef = useLatest(fn);
3180
- const wait = (_a = options === null || options === void 0 ? void 0 : options.wait) !== null && _a !== void 0 ? _a : 1e3;
3181
- const throttled = React$4.useMemo(() => throttle_1((...args) => {
3182
- return fnRef.current(...args);
3183
- }, wait, options), []);
3184
- useUnmount$1(() => {
3380
+ var fnRef = useLatest(fn);
3381
+ var wait = (_a = options === null || options === void 0 ? void 0 : options.wait) !== null && _a !== void 0 ? _a : 1e3;
3382
+ var throttled = React$4.useMemo(function() {
3383
+ return throttle_1(function() {
3384
+ var args = [];
3385
+ for (var _i = 0; _i < arguments.length; _i++) {
3386
+ args[_i] = arguments[_i];
3387
+ }
3388
+ return fnRef.current.apply(fnRef, __spreadArray([], __read(args), false));
3389
+ }, wait, options);
3390
+ }, []);
3391
+ useUnmount$1(function() {
3185
3392
  throttled.cancel();
3186
3393
  });
3187
3394
  return {
@@ -3190,29 +3397,24 @@ function useThrottleFn(fn, options) {
3190
3397
  flush: throttled.flush
3191
3398
  };
3192
3399
  }
3193
- function useTimeout(fn, delay) {
3194
- const fnRef = useLatest(fn);
3195
- const timerRef = React$4.useRef(null);
3196
- React$4.useEffect(() => {
3197
- if (!isNumber(delay) || delay < 0) {
3198
- return;
3199
- }
3200
- timerRef.current = setTimeout(() => {
3201
- fnRef.current();
3202
- }, delay);
3203
- return () => {
3204
- if (timerRef.current) {
3205
- clearTimeout(timerRef.current);
3206
- }
3207
- };
3208
- }, [delay]);
3209
- const clear2 = React$4.useCallback(() => {
3400
+ var useTimeout = function(fn, delay) {
3401
+ var timerCallback = useMemoizedFn(fn);
3402
+ var timerRef = React$4.useRef(null);
3403
+ var clear2 = React$4.useCallback(function() {
3210
3404
  if (timerRef.current) {
3211
3405
  clearTimeout(timerRef.current);
3212
3406
  }
3213
3407
  }, []);
3408
+ React$4.useEffect(function() {
3409
+ if (!isNumber(delay) || delay < 0) {
3410
+ return;
3411
+ }
3412
+ timerRef.current = setTimeout(timerCallback, delay);
3413
+ return clear2;
3414
+ }, [delay]);
3214
3415
  return clear2;
3215
- }
3416
+ };
3417
+ const useTimeout$1 = useTimeout;
3216
3418
  const mask = "";
3217
3419
  const MIN_DISTANCE = 10;
3218
3420
  function getDirection(x, y) {
@@ -7378,17 +7580,19 @@ const Popup$1 = (p) => {
7378
7580
  className: bodyCls,
7379
7581
  style: Object.assign(Object.assign({}, props.bodyStyle), {
7380
7582
  transform: percent.to((v) => {
7381
- if (props.position === "bottom") {
7382
- return `translate(0, ${v}%)`;
7383
- }
7384
- if (props.position === "top") {
7385
- return `translate(0, -${v}%)`;
7386
- }
7387
- if (props.position === "left") {
7388
- return `translate(-${v}%, 0)`;
7389
- }
7390
- if (props.position === "right") {
7391
- return `translate(${v}%, 0)`;
7583
+ if (v) {
7584
+ if (props.position === "bottom") {
7585
+ return `translate(0, ${v}%)`;
7586
+ }
7587
+ if (props.position === "top") {
7588
+ return `translate(0, -${v}%)`;
7589
+ }
7590
+ if (props.position === "left") {
7591
+ return `translate(-${v}%, 0)`;
7592
+ }
7593
+ if (props.position === "right") {
7594
+ return `translate(${v}%, 0)`;
7595
+ }
7392
7596
  }
7393
7597
  return "none";
7394
7598
  })
@@ -7597,13 +7801,17 @@ const ActionSheet = (p) => {
7597
7801
  if (props.closeOnAction) {
7598
7802
  (_c = props.onClose) === null || _c === void 0 ? void 0 : _c.call(props);
7599
7803
  }
7600
- }
7804
+ },
7805
+ role: "option",
7806
+ "aria-disabled": action.disabled
7601
7807
  }, React__default.default.createElement("div", {
7602
7808
  className: `${classPrefix$1i}-button-item-name`
7603
7809
  }, action.text), action.description && React__default.default.createElement("div", {
7604
7810
  className: `${classPrefix$1i}-button-item-description`
7605
7811
  }, action.description))))), props.cancelText && React__default.default.createElement("div", {
7606
- className: `${classPrefix$1i}-cancel`
7812
+ className: `${classPrefix$1i}-cancel`,
7813
+ role: "option",
7814
+ "aria-label": props.cancelText
7607
7815
  }, React__default.default.createElement("div", {
7608
7816
  className: `${classPrefix$1i}-button-item-wrapper`
7609
7817
  }, React__default.default.createElement("a", {
@@ -7828,7 +8036,8 @@ const Avatar$1 = (p) => {
7828
8036
  lazy: props.lazy,
7829
8037
  fit: props.fit,
7830
8038
  onClick: props.onClick,
7831
- onError: props.onError
8039
+ onError: props.onError,
8040
+ onLoad: props.onLoad
7832
8041
  }));
7833
8042
  };
7834
8043
  const Avatar = Avatar$1;
@@ -8176,7 +8385,7 @@ const Calendar$1 = React$4.forwardRef((p, ref) => {
8176
8385
  return;
8177
8386
  }
8178
8387
  }
8179
- setCurrent(current[action](num, type4));
8388
+ setCurrent(nxtCurrent);
8180
8389
  };
8181
8390
  const header = React__default.default.createElement("div", {
8182
8391
  className: `${classPrefix$1b}-header`
@@ -11580,7 +11789,8 @@ const Tabs$1 = (p) => {
11580
11789
  className: `${classPrefix$13}-tab-list`,
11581
11790
  ref: tabListContainerRef,
11582
11791
  scrollLeft,
11583
- onScroll: updateMask
11792
+ onScroll: updateMask,
11793
+ role: "tablist"
11584
11794
  }, React__default.default.createElement(animated.div, {
11585
11795
  ref: activeLineRef,
11586
11796
  className: `${classPrefix$13}-tab-line`,
@@ -11608,7 +11818,9 @@ const Tabs$1 = (p) => {
11608
11818
  className: classNames(`${classPrefix$13}-tab`, {
11609
11819
  [`${classPrefix$13}-tab-active`]: pane.key === activeKey,
11610
11820
  [`${classPrefix$13}-tab-disabled`]: pane.props.disabled
11611
- })
11821
+ }),
11822
+ role: "tab",
11823
+ "aria-selected": pane.key === activeKey
11612
11824
  }, pane.props.title)))))), panes.map((pane) => {
11613
11825
  if (pane.props.children === void 0) {
11614
11826
  return null;
@@ -11708,6 +11920,7 @@ const CheckList$1 = (p) => {
11708
11920
  }
11709
11921
  const {
11710
11922
  activeIcon,
11923
+ extra,
11711
11924
  disabled,
11712
11925
  readOnly
11713
11926
  } = props;
@@ -11717,6 +11930,7 @@ const CheckList$1 = (p) => {
11717
11930
  check,
11718
11931
  uncheck,
11719
11932
  activeIcon,
11933
+ extra,
11720
11934
  disabled,
11721
11935
  readOnly
11722
11936
  }
@@ -11734,9 +11948,11 @@ const CheckListItem = (props) => {
11734
11948
  }
11735
11949
  const active = context.value.includes(props.value);
11736
11950
  const readOnly = props.readOnly || context.readOnly;
11951
+ const defaultExtra = active ? context.activeIcon : null;
11952
+ const renderExtra = context.extra ? context.extra(active) : defaultExtra;
11737
11953
  const extra = React__default.default.createElement("div", {
11738
11954
  className: `${classPrefix$$}-extra`
11739
- }, active ? context.activeIcon : null);
11955
+ }, renderExtra);
11740
11956
  return withNativeProps(props, React__default.default.createElement(List$1.Item, {
11741
11957
  title: props.title,
11742
11958
  className: classNames(classPrefix$$, readOnly && `${classPrefix$$}-readonly`, active && `${classPrefix$$}-active`),
@@ -13527,7 +13743,7 @@ const Ellipsis$1 = (p) => {
13527
13743
  setExpanded(true);
13528
13744
  }
13529
13745
  }, props.expandText)) : null;
13530
- const collapseActionElement = exceeded && props.expandText ? withStopPropagation(props.stopPropagationForActionButtons, React__default.default.createElement("a", {
13746
+ const collapseActionElement = exceeded && props.collapseText ? withStopPropagation(props.stopPropagationForActionButtons, React__default.default.createElement("a", {
13531
13747
  onClick: () => {
13532
13748
  setExpanded(false);
13533
13749
  }
@@ -18882,22 +19098,6 @@ const computePosition$1 = async (reference, floating, config2) => {
18882
19098
  } = config2;
18883
19099
  const validMiddleware = middleware.filter(Boolean);
18884
19100
  const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(floating));
18885
- {
18886
- if (platform2 == null) {
18887
- console.error(["Floating UI: `platform` property was not passed to config. If you", "want to use Floating UI on the web, install @floating-ui/dom", "instead of the /core package. Otherwise, you can create your own", "`platform`: https://floating-ui.com/docs/platform"].join(" "));
18888
- }
18889
- if (validMiddleware.filter((_ref) => {
18890
- let {
18891
- name
18892
- } = _ref;
18893
- return name === "autoPlacement" || name === "flip";
18894
- }).length > 1) {
18895
- throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware", "detected. This will lead to an infinite loop. Ensure only one of", "either has been passed to the `middleware` array."].join(" "));
18896
- }
18897
- if (!reference || !floating) {
18898
- console.error(["Floating UI: The reference and/or floating element was not defined", "when `computePosition()` was called. Ensure that both elements have", "been created and can be measured."].join(" "));
18899
- }
18900
- }
18901
19101
  let rects = await platform2.getElementRects({
18902
19102
  reference,
18903
19103
  floating,
@@ -18943,11 +19143,6 @@ const computePosition$1 = async (reference, floating, config2) => {
18943
19143
  ...data
18944
19144
  }
18945
19145
  };
18946
- {
18947
- if (resetCount > 50) {
18948
- console.warn(["Floating UI: The middleware lifecycle appears to be running in an", "infinite loop. This is usually caused by a `reset` continually", "being returned without a break condition."].join(" "));
18949
- }
18950
- }
18951
19146
  if (reset && resetCount <= 50) {
18952
19147
  resetCount++;
18953
19148
  if (typeof reset === "object") {
@@ -19080,9 +19275,6 @@ const arrow = (options) => ({
19080
19275
  elements
19081
19276
  } = state;
19082
19277
  if (element == null) {
19083
- {
19084
- console.warn("Floating UI: No `element` was passed to the `arrow` middleware.");
19085
- }
19086
19278
  return {};
19087
19279
  }
19088
19280
  const paddingObject = getSideObjectFromPadding(padding);
@@ -19888,16 +20080,14 @@ function getClippingElementAncestors(element, cache) {
19888
20080
  while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
19889
20081
  const computedStyle = getComputedStyle$1(currentNode);
19890
20082
  const containingBlock = isContainingBlock(currentNode);
19891
- const shouldIgnoreCurrentNode = computedStyle.position === "fixed";
19892
- if (shouldIgnoreCurrentNode) {
20083
+ if (computedStyle.position === "fixed") {
19893
20084
  currentContainingBlockComputedStyle = null;
20085
+ }
20086
+ const shouldDropCurrentNode = elementIsFixed ? !containingBlock && !currentContainingBlockComputedStyle : !containingBlock && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position);
20087
+ if (shouldDropCurrentNode) {
20088
+ result2 = result2.filter((ancestor) => ancestor !== currentNode);
19894
20089
  } else {
19895
- const shouldDropCurrentNode = elementIsFixed ? !containingBlock && !currentContainingBlockComputedStyle : !containingBlock && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position);
19896
- if (shouldDropCurrentNode) {
19897
- result2 = result2.filter((ancestor) => ancestor !== currentNode);
19898
- } else {
19899
- currentContainingBlockComputedStyle = computedStyle;
19900
- }
20090
+ currentContainingBlockComputedStyle = computedStyle;
19901
20091
  }
19902
20092
  currentNode = getParentNode(currentNode);
19903
20093
  }
@@ -20242,7 +20432,7 @@ const Popover$1 = React$4.forwardRef((p, ref) => {
20242
20432
  top: arrowY != null ? `${arrowY}px` : "",
20243
20433
  right: "",
20244
20434
  bottom: "",
20245
- [arrowSide]: `-${convertPx(8)}px`
20435
+ [arrowSide]: "calc(var(--arrow-size) * -1)"
20246
20436
  });
20247
20437
  const arrowRotate = {
20248
20438
  top: "0deg",
@@ -22138,7 +22328,7 @@ const NoticeBar$1 = React$4.memo((p) => {
22138
22328
  text.style.transitionDuration = `${Math.round(distance / speed)}s`;
22139
22329
  text.style.transform = `translateX(-${text.offsetWidth}px)`;
22140
22330
  }
22141
- useTimeout(() => {
22331
+ useTimeout$1(() => {
22142
22332
  delayLockRef.current = false;
22143
22333
  start2();
22144
22334
  }, props.delay);
@@ -22275,16 +22465,18 @@ const NumberKeyboard$1 = (p) => {
22275
22465
  className: classNames(`${classPrefix$w}-header`, {
22276
22466
  [`${classPrefix$w}-header-with-title`]: !!title
22277
22467
  })
22278
- }, title && React__default.default.createElement("div", {
22279
- className: `${classPrefix$w}-title`
22468
+ }, React__default.default.createElement("div", {
22469
+ className: `${classPrefix$w}-title`,
22470
+ "aria-label": title
22280
22471
  }, title), showCloseButton && React__default.default.createElement("span", {
22281
22472
  className: `${classPrefix$w}-header-close-button`,
22282
22473
  onClick: () => {
22283
22474
  var _a;
22284
22475
  (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
22285
22476
  },
22286
- role: "button",
22287
- title: "CLOSE"
22477
+ role: "grid",
22478
+ title: "CLOSE",
22479
+ tabIndex: -1
22288
22480
  }, React__default.default.createElement(DownOutline, null)));
22289
22481
  };
22290
22482
  const renderKey = (key, index2) => {
@@ -22295,8 +22487,9 @@ const NumberKeyboard$1 = (p) => {
22295
22487
  [`${classPrefix$w}-key-mid`]: index2 === 9 && !!confirmText && keys2.length < 12
22296
22488
  });
22297
22489
  const ariaProps = key ? {
22298
- role: "button",
22299
- title: key
22490
+ role: "grid",
22491
+ title: key,
22492
+ tabIndex: -1
22300
22493
  } : void 0;
22301
22494
  return React__default.default.createElement("div", Object.assign({
22302
22495
  key,
@@ -22348,11 +22541,14 @@ const NumberKeyboard$1 = (p) => {
22348
22541
  onBackspacePressEnd();
22349
22542
  },
22350
22543
  title: "BACKSPACE",
22351
- role: "button"
22544
+ role: "grid",
22545
+ tabIndex: -1
22352
22546
  }, React__default.default.createElement(TextDeletionOutline, null)), React__default.default.createElement("div", {
22353
22547
  className: `${classPrefix$w}-key ${classPrefix$w}-key-extra ${classPrefix$w}-key-ok`,
22354
22548
  onTouchEnd: (e) => onKeyPress(e, "OK"),
22355
- role: "button"
22549
+ role: "grid",
22550
+ tabIndex: -1,
22551
+ "aria-label": confirmText
22356
22552
  }, confirmText))), props.safeArea && React__default.default.createElement("div", {
22357
22553
  className: `${classPrefix$w}-footer`
22358
22554
  }, React__default.default.createElement(SafeArea, {
@@ -23200,6 +23396,9 @@ const Selector$1 = (p) => {
23200
23396
  (_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, val, extend);
23201
23397
  }
23202
23398
  });
23399
+ const {
23400
+ locale
23401
+ } = useConfig();
23203
23402
  const items = props.options.map((option) => {
23204
23403
  const active = (value || []).includes(option.value);
23205
23404
  const disabled = option.disabled || props.disabled;
@@ -23222,7 +23421,9 @@ const Selector$1 = (p) => {
23222
23421
  const val = active ? [] : [option.value];
23223
23422
  setValue2(val);
23224
23423
  }
23225
- }
23424
+ },
23425
+ role: "option",
23426
+ "aria-selected": active && !props.multiple || active && props.multiple
23226
23427
  }, option.label, option.description && React__default.default.createElement("div", {
23227
23428
  className: `${classPrefix$k}-item-description`
23228
23429
  }, option.description), active && props.showCheckMark && React__default.default.createElement("div", {
@@ -23230,7 +23431,9 @@ const Selector$1 = (p) => {
23230
23431
  }, React__default.default.createElement(CheckMark, null)));
23231
23432
  });
23232
23433
  return withNativeProps(props, React__default.default.createElement("div", {
23233
- className: classPrefix$k
23434
+ className: classPrefix$k,
23435
+ role: "listbox",
23436
+ "aria-label": locale.Selector.name
23234
23437
  }, !props.columns && React__default.default.createElement(Space, {
23235
23438
  wrap: true
23236
23439
  }, items), props.columns && React__default.default.createElement(Grid, {
@@ -25294,6 +25497,7 @@ const TextArea$1 = React$4.forwardRef((p, ref) => {
25294
25497
  ref: hiddenTextAreaRef,
25295
25498
  className: `${classPrefix$6}-element ${classPrefix$6}-element-hidden`,
25296
25499
  value,
25500
+ rows: props.rows,
25297
25501
  "aria-hidden": true,
25298
25502
  readOnly: true
25299
25503
  })));
@@ -25778,6 +25982,9 @@ const VirtualInput$1 = React$4.forwardRef((p, ref) => {
25778
25982
  const rootRef = React$4.useRef(null);
25779
25983
  const contentRef = React$4.useRef(null);
25780
25984
  const [hasFocus, setHasFocus] = React$4.useState(false);
25985
+ const {
25986
+ locale
25987
+ } = useConfig();
25781
25988
  function scrollToEnd() {
25782
25989
  const root2 = rootRef.current;
25783
25990
  if (!root2)
@@ -25844,12 +26051,15 @@ const VirtualInput$1 = React$4.forwardRef((p, ref) => {
25844
26051
  [`${classPrefix$2}-disabled`]: props.disabled
25845
26052
  }),
25846
26053
  tabIndex: props.disabled ? void 0 : 0,
26054
+ role: "option",
25847
26055
  onFocus,
25848
26056
  onBlur,
25849
26057
  onClick: props.onClick
25850
26058
  }, React__default.default.createElement("div", {
25851
26059
  className: `${classPrefix$2}-content`,
25852
- ref: contentRef
26060
+ ref: contentRef,
26061
+ "aria-disabled": props.disabled,
26062
+ "aria-label": props.placeholder
25853
26063
  }, value, React__default.default.createElement("div", {
25854
26064
  className: `${classPrefix$2}-caret-container`
25855
26065
  }, hasFocus && React__default.default.createElement("div", {
@@ -25861,7 +26071,9 @@ const VirtualInput$1 = React$4.forwardRef((p, ref) => {
25861
26071
  e.stopPropagation();
25862
26072
  setValue2("");
25863
26073
  (_a = props.onClear) === null || _a === void 0 ? void 0 : _a.call(props);
25864
- }
26074
+ },
26075
+ role: "button",
26076
+ "aria-label": locale.Input.clear
25865
26077
  }, React__default.default.createElement(CloseCircleFill, null)), !value && React__default.default.createElement("div", {
25866
26078
  className: `${classPrefix$2}-placeholder`
25867
26079
  }, props.placeholder), keyboardElement));