antd-mobile 5.42.0-alpha.0 → 5.42.0-alpha.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.
@@ -23254,20 +23254,27 @@ const NumberKeyboard = (p) => {
23254
23254
  onKeyPress(e2, "BACKSPACE");
23255
23255
  };
23256
23256
  const renderKey = (key, index2) => {
23257
- const isNumberKey = /^\d$/.test(key);
23258
- const isBackspace = key === "BACKSPACE";
23257
+ const keyConfig = typeof key === "string" ? {
23258
+ key,
23259
+ title: key
23260
+ } : key;
23261
+ const realKey = keyConfig.key;
23262
+ const isNumberKey = /^\d$/.test(realKey);
23263
+ const isBackspace = realKey === "BACKSPACE";
23264
+ const title2 = isBackspace ? locale.Input.clear : keyConfig.title;
23259
23265
  const className = classNames(`${classPrefix$x}-key`, {
23260
23266
  [`${classPrefix$x}-key-number`]: isNumberKey,
23261
- [`${classPrefix$x}-key-sign`]: !isNumberKey && key,
23267
+ [`${classPrefix$x}-key-sign`]: !isNumberKey && realKey,
23262
23268
  [`${classPrefix$x}-key-mid`]: index2 === 9 && !!confirmText && keys2.length < 12
23263
23269
  });
23264
- const ariaProps = key ? {
23270
+ const ariaProps = realKey ? {
23265
23271
  role: "button",
23266
- title: isBackspace ? locale.Input.clear : key,
23272
+ title: title2,
23273
+ "aria-label": title2,
23267
23274
  tabIndex: -1
23268
23275
  } : void 0;
23269
23276
  return React$3.createElement("div", Object.assign({
23270
- key,
23277
+ key: realKey,
23271
23278
  className,
23272
23279
  // 仅为 backspace 绑定,支持长按快速删除
23273
23280
  onTouchStart: isBackspace ? onBackspaceTouchStart : void 0,
@@ -23279,9 +23286,9 @@ const NumberKeyboard = (p) => {
23279
23286
  // backspace touchend 时会 preventDefault 阻止其后续 click 事件
23280
23287
  onClick: (e2) => {
23281
23288
  stopContinueClear();
23282
- onKeyPress(e2, key);
23289
+ onKeyPress(e2, realKey);
23283
23290
  }
23284
- }, ariaProps), isBackspace ? React$3.createElement(TextDeletionOutline, null) : key);
23291
+ }, ariaProps), isBackspace ? React$3.createElement(TextDeletionOutline, null) : realKey);
23285
23292
  };
23286
23293
  return React$3.createElement(Popup, {
23287
23294
  visible,