antd-mobile 5.36.1 → 5.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 (204) hide show
  1. package/2x/bundle/antd-mobile.cjs.development.js +355 -283
  2. package/2x/bundle/antd-mobile.cjs.js +7 -7
  3. package/2x/bundle/antd-mobile.es.development.js +355 -283
  4. package/2x/bundle/antd-mobile.es.js +5428 -5379
  5. package/2x/bundle/antd-mobile.umd.development.js +355 -283
  6. package/2x/bundle/antd-mobile.umd.js +7 -7
  7. package/2x/bundle/style.css +5 -8
  8. package/2x/cjs/components/card/card.css +5 -5
  9. package/2x/cjs/components/card/card.patch.css +21 -0
  10. package/2x/cjs/components/center-popup/center-popup.js +46 -43
  11. package/2x/cjs/components/check-list/check-list.js +15 -11
  12. package/2x/cjs/components/collapse/collapse.d.ts +9 -1
  13. package/2x/cjs/components/collapse/collapse.js +26 -28
  14. package/2x/cjs/components/config-provider/config-provider.d.ts +40 -2
  15. package/2x/cjs/components/dropdown/context.d.ts +2 -0
  16. package/2x/cjs/components/dropdown/context.js +10 -0
  17. package/2x/cjs/components/dropdown/dropdown.d.ts +11 -3
  18. package/2x/cjs/components/dropdown/dropdown.js +23 -16
  19. package/2x/cjs/components/dropdown/index.d.ts +1 -0
  20. package/2x/cjs/components/dropdown/item.d.ts +5 -1
  21. package/2x/cjs/components/dropdown/item.js +22 -8
  22. package/2x/cjs/components/form/form-item.d.ts +6 -5
  23. package/2x/cjs/components/form/form-item.js +25 -17
  24. package/2x/cjs/components/form/form.d.ts +1 -1
  25. package/2x/cjs/components/form/index.d.ts +1 -1
  26. package/2x/cjs/components/input/input.d.ts +3 -1
  27. package/2x/cjs/components/input/input.js +53 -51
  28. package/2x/cjs/components/list/list-item.d.ts +6 -2
  29. package/2x/cjs/components/list/list-item.js +16 -6
  30. package/2x/cjs/components/nav-bar/nav-bar.d.ts +4 -0
  31. package/2x/cjs/components/nav-bar/nav-bar.js +18 -13
  32. package/2x/cjs/components/notice-bar/notice-bar.css +0 -3
  33. package/2x/cjs/components/notice-bar/notice-bar.d.ts +3 -1
  34. package/2x/cjs/components/notice-bar/notice-bar.js +30 -25
  35. package/2x/cjs/components/number-keyboard/number-keyboard.d.ts +1 -1
  36. package/2x/cjs/components/number-keyboard/number-keyboard.js +14 -13
  37. package/2x/cjs/components/popup/popup-base-props.d.ts +3 -2
  38. package/2x/cjs/components/popup/popup-base-props.js +4 -0
  39. package/2x/cjs/components/popup/popup.js +5 -5
  40. package/2x/cjs/components/result/result.js +3 -10
  41. package/2x/cjs/components/result/use-result-icon.d.ts +3 -0
  42. package/2x/cjs/components/result/use-result-icon.js +37 -0
  43. package/2x/cjs/components/result-page/result-page.js +3 -10
  44. package/2x/cjs/components/search-bar/search-bar.d.ts +10 -2
  45. package/2x/cjs/components/search-bar/search-bar.js +34 -33
  46. package/2x/cjs/components/toast/toast.d.ts +2 -2
  47. package/2x/cjs/components/toast/toast.js +4 -4
  48. package/2x/cjs/components/virtual-input/virtual-input.d.ts +5 -5
  49. package/2x/cjs/components/virtual-input/virtual-input.js +26 -24
  50. package/2x/cjs/utils/is-node-with-content.d.ts +3 -0
  51. package/2x/cjs/utils/is-node-with-content.js +3 -0
  52. package/2x/cjs/utils/with-default-props.d.ts +7 -0
  53. package/2x/cjs/utils/with-default-props.js +21 -5
  54. package/2x/es/components/card/card.css +5 -5
  55. package/2x/es/components/card/card.patch.css +21 -0
  56. package/2x/es/components/center-popup/center-popup.js +45 -42
  57. package/2x/es/components/check-list/check-list.js +15 -11
  58. package/2x/es/components/collapse/collapse.d.ts +9 -1
  59. package/2x/es/components/collapse/collapse.js +26 -28
  60. package/2x/es/components/config-provider/config-provider.d.ts +40 -2
  61. package/2x/es/components/dropdown/context.d.ts +2 -0
  62. package/2x/es/components/dropdown/context.js +2 -0
  63. package/2x/es/components/dropdown/dropdown.d.ts +11 -3
  64. package/2x/es/components/dropdown/dropdown.js +24 -17
  65. package/2x/es/components/dropdown/index.d.ts +1 -0
  66. package/2x/es/components/dropdown/item.d.ts +5 -1
  67. package/2x/es/components/dropdown/item.js +22 -8
  68. package/2x/es/components/form/form-item.d.ts +6 -5
  69. package/2x/es/components/form/form-item.js +24 -16
  70. package/2x/es/components/form/form.d.ts +1 -1
  71. package/2x/es/components/form/index.d.ts +1 -1
  72. package/2x/es/components/input/input.d.ts +3 -1
  73. package/2x/es/components/input/input.js +52 -50
  74. package/2x/es/components/list/list-item.d.ts +6 -2
  75. package/2x/es/components/list/list-item.js +16 -6
  76. package/2x/es/components/nav-bar/nav-bar.d.ts +4 -0
  77. package/2x/es/components/nav-bar/nav-bar.js +18 -13
  78. package/2x/es/components/notice-bar/notice-bar.css +0 -3
  79. package/2x/es/components/notice-bar/notice-bar.d.ts +3 -1
  80. package/2x/es/components/notice-bar/notice-bar.js +29 -24
  81. package/2x/es/components/number-keyboard/number-keyboard.d.ts +1 -1
  82. package/2x/es/components/number-keyboard/number-keyboard.js +13 -12
  83. package/2x/es/components/popup/popup-base-props.d.ts +3 -2
  84. package/2x/es/components/popup/popup-base-props.js +3 -0
  85. package/2x/es/components/popup/popup.js +5 -5
  86. package/2x/es/components/result/result.js +3 -10
  87. package/2x/es/components/result/use-result-icon.d.ts +3 -0
  88. package/2x/es/components/result/use-result-icon.js +29 -0
  89. package/2x/es/components/result-page/result-page.js +3 -10
  90. package/2x/es/components/search-bar/search-bar.d.ts +10 -2
  91. package/2x/es/components/search-bar/search-bar.js +33 -32
  92. package/2x/es/components/toast/toast.d.ts +2 -2
  93. package/2x/es/components/toast/toast.js +3 -3
  94. package/2x/es/components/virtual-input/virtual-input.d.ts +5 -5
  95. package/2x/es/components/virtual-input/virtual-input.js +25 -23
  96. package/2x/es/utils/is-node-with-content.d.ts +3 -0
  97. package/2x/es/utils/is-node-with-content.js +3 -0
  98. package/2x/es/utils/with-default-props.d.ts +7 -0
  99. package/2x/es/utils/with-default-props.js +20 -5
  100. package/2x/package.json +1 -1
  101. package/bundle/antd-mobile.cjs.development.js +355 -283
  102. package/bundle/antd-mobile.cjs.js +7 -7
  103. package/bundle/antd-mobile.compatible.umd.js +1 -1
  104. package/bundle/antd-mobile.es.development.js +355 -283
  105. package/bundle/antd-mobile.es.js +5428 -5379
  106. package/bundle/antd-mobile.umd.development.js +355 -283
  107. package/bundle/antd-mobile.umd.js +7 -7
  108. package/bundle/style.css +1 -1
  109. package/cjs/components/card/card.css +5 -5
  110. package/cjs/components/card/card.patch.css +17 -0
  111. package/cjs/components/center-popup/center-popup.js +46 -43
  112. package/cjs/components/check-list/check-list.js +15 -11
  113. package/cjs/components/collapse/collapse.d.ts +9 -1
  114. package/cjs/components/collapse/collapse.js +26 -28
  115. package/cjs/components/config-provider/config-provider.d.ts +40 -2
  116. package/cjs/components/dropdown/context.d.ts +2 -0
  117. package/cjs/components/dropdown/context.js +10 -0
  118. package/cjs/components/dropdown/dropdown.d.ts +11 -3
  119. package/cjs/components/dropdown/dropdown.js +23 -16
  120. package/cjs/components/dropdown/index.d.ts +1 -0
  121. package/cjs/components/dropdown/item.d.ts +5 -1
  122. package/cjs/components/dropdown/item.js +22 -8
  123. package/cjs/components/form/form-item.d.ts +6 -5
  124. package/cjs/components/form/form-item.js +25 -17
  125. package/cjs/components/form/form.d.ts +1 -1
  126. package/cjs/components/form/index.d.ts +1 -1
  127. package/cjs/components/input/input.d.ts +3 -1
  128. package/cjs/components/input/input.js +53 -51
  129. package/cjs/components/list/list-item.d.ts +6 -2
  130. package/cjs/components/list/list-item.js +16 -6
  131. package/cjs/components/nav-bar/nav-bar.d.ts +4 -0
  132. package/cjs/components/nav-bar/nav-bar.js +18 -13
  133. package/cjs/components/notice-bar/notice-bar.css +0 -2
  134. package/cjs/components/notice-bar/notice-bar.d.ts +3 -1
  135. package/cjs/components/notice-bar/notice-bar.js +30 -25
  136. package/cjs/components/number-keyboard/number-keyboard.d.ts +1 -1
  137. package/cjs/components/number-keyboard/number-keyboard.js +14 -13
  138. package/cjs/components/popup/popup-base-props.d.ts +3 -2
  139. package/cjs/components/popup/popup-base-props.js +4 -0
  140. package/cjs/components/popup/popup.js +5 -5
  141. package/cjs/components/result/result.js +3 -10
  142. package/cjs/components/result/use-result-icon.d.ts +3 -0
  143. package/cjs/components/result/use-result-icon.js +37 -0
  144. package/cjs/components/result-page/result-page.js +3 -10
  145. package/cjs/components/search-bar/search-bar.d.ts +10 -2
  146. package/cjs/components/search-bar/search-bar.js +34 -33
  147. package/cjs/components/toast/toast.css +1 -1
  148. package/cjs/components/toast/toast.d.ts +2 -2
  149. package/cjs/components/toast/toast.js +4 -4
  150. package/cjs/components/virtual-input/virtual-input.d.ts +5 -5
  151. package/cjs/components/virtual-input/virtual-input.js +26 -24
  152. package/cjs/utils/is-node-with-content.d.ts +3 -0
  153. package/cjs/utils/is-node-with-content.js +3 -0
  154. package/cjs/utils/with-default-props.d.ts +7 -0
  155. package/cjs/utils/with-default-props.js +21 -5
  156. package/es/components/card/card.css +5 -5
  157. package/es/components/card/card.patch.css +17 -0
  158. package/es/components/center-popup/center-popup.js +45 -42
  159. package/es/components/check-list/check-list.js +15 -11
  160. package/es/components/collapse/collapse.d.ts +9 -1
  161. package/es/components/collapse/collapse.js +26 -28
  162. package/es/components/config-provider/config-provider.d.ts +40 -2
  163. package/es/components/dropdown/context.d.ts +2 -0
  164. package/es/components/dropdown/context.js +2 -0
  165. package/es/components/dropdown/dropdown.d.ts +11 -3
  166. package/es/components/dropdown/dropdown.js +24 -17
  167. package/es/components/dropdown/index.d.ts +1 -0
  168. package/es/components/dropdown/item.d.ts +5 -1
  169. package/es/components/dropdown/item.js +22 -8
  170. package/es/components/form/form-item.d.ts +6 -5
  171. package/es/components/form/form-item.js +24 -16
  172. package/es/components/form/form.d.ts +1 -1
  173. package/es/components/form/index.d.ts +1 -1
  174. package/es/components/input/input.d.ts +3 -1
  175. package/es/components/input/input.js +52 -50
  176. package/es/components/list/list-item.d.ts +6 -2
  177. package/es/components/list/list-item.js +16 -6
  178. package/es/components/nav-bar/nav-bar.d.ts +4 -0
  179. package/es/components/nav-bar/nav-bar.js +18 -13
  180. package/es/components/notice-bar/notice-bar.css +0 -2
  181. package/es/components/notice-bar/notice-bar.d.ts +3 -1
  182. package/es/components/notice-bar/notice-bar.js +29 -24
  183. package/es/components/number-keyboard/number-keyboard.d.ts +1 -1
  184. package/es/components/number-keyboard/number-keyboard.js +13 -12
  185. package/es/components/popup/popup-base-props.d.ts +3 -2
  186. package/es/components/popup/popup-base-props.js +3 -0
  187. package/es/components/popup/popup.js +5 -5
  188. package/es/components/result/result.js +3 -10
  189. package/es/components/result/use-result-icon.d.ts +3 -0
  190. package/es/components/result/use-result-icon.js +29 -0
  191. package/es/components/result-page/result-page.js +3 -10
  192. package/es/components/search-bar/search-bar.d.ts +10 -2
  193. package/es/components/search-bar/search-bar.js +33 -32
  194. package/es/components/toast/toast.css +1 -1
  195. package/es/components/toast/toast.d.ts +2 -2
  196. package/es/components/toast/toast.js +3 -3
  197. package/es/components/virtual-input/virtual-input.d.ts +5 -5
  198. package/es/components/virtual-input/virtual-input.js +25 -23
  199. package/es/utils/is-node-with-content.d.ts +3 -0
  200. package/es/utils/is-node-with-content.js +3 -0
  201. package/es/utils/with-default-props.d.ts +7 -0
  202. package/es/utils/with-default-props.js +20 -5
  203. package/package.json +1 -1
  204. package/umd/antd-mobile.js +1 -1
@@ -452,14 +452,24 @@
452
452
  function mergeProps(...items) {
453
453
  const ret = {};
454
454
  items.forEach((item) => {
455
- Object.keys(item).forEach((key) => {
456
- if (item[key] !== void 0) {
457
- ret[key] = item[key];
458
- }
459
- });
455
+ if (item) {
456
+ Object.keys(item).forEach((key) => {
457
+ if (item[key] !== void 0) {
458
+ ret[key] = item[key];
459
+ }
460
+ });
461
+ }
460
462
  });
461
463
  return ret;
462
464
  }
465
+ function mergeProp(defaultProp, ...propList) {
466
+ for (let i2 = propList.length - 1; i2 >= 0; i2 -= 1) {
467
+ if (propList[i2] !== void 0) {
468
+ return propList[i2];
469
+ }
470
+ }
471
+ return defaultProp;
472
+ }
463
473
  var createUpdateEffect = function(hook) {
464
474
  return function(effect, deps) {
465
475
  var isMounted = React$1.useRef(false);
@@ -6511,6 +6521,7 @@
6511
6521
  }
6512
6522
  const defaultPopupBaseProps = {
6513
6523
  closeOnMaskClick: false,
6524
+ closeIcon: React$1.createElement(CloseOutline, null),
6514
6525
  destroyOnClose: false,
6515
6526
  disableBodyScroll: true,
6516
6527
  forceRender: false,
@@ -8368,11 +8379,12 @@ Please add \`${key}Action\` when creating your handler.`);
8368
8379
  position: "bottom"
8369
8380
  });
8370
8381
  const Popup = (p) => {
8371
- const props = mergeProps(defaultProps$14, p);
8372
- const bodyCls = classNames(`${classPrefix$1o}-body`, props.bodyClassName, `${classPrefix$1o}-body-position-${props.position}`);
8373
8382
  const {
8374
- locale
8383
+ locale,
8384
+ popup: componentConfig = {}
8375
8385
  } = useConfig();
8386
+ const props = mergeProps(defaultProps$14, componentConfig, p);
8387
+ const bodyCls = classNames(`${classPrefix$1o}-body`, props.bodyClassName, `${classPrefix$1o}-body-position-${props.position}`);
8376
8388
  const [active, setActive] = React$1.useState(props.visible);
8377
8389
  const ref = React$1.useRef(null);
8378
8390
  useLockScroll(ref, props.disableBodyScroll && active ? "strict" : false);
@@ -8469,7 +8481,7 @@ Please add \`${key}Action\` when creating your handler.`);
8469
8481
  },
8470
8482
  role: "button",
8471
8483
  "aria-label": locale.common.close
8472
- }, React$1.createElement(CloseOutline, null)), props.children))));
8484
+ }, props.closeIcon), props.children))));
8473
8485
  return React$1.createElement(ShouldRender, {
8474
8486
  active,
8475
8487
  forceRender: props.forceRender,
@@ -11413,9 +11425,17 @@ Please add \`${key}Action\` when creating your handler.`);
11413
11425
  }
11414
11426
  const classPrefix$12 = `adm-list-item`;
11415
11427
  const ListItem = (props) => {
11416
- var _a;
11428
+ var _a, _b;
11429
+ const {
11430
+ arrow: arrow2,
11431
+ arrowIcon
11432
+ } = props;
11433
+ const {
11434
+ list: componentConfig = {}
11435
+ } = useConfig();
11417
11436
  const clickable = (_a = props.clickable) !== null && _a !== void 0 ? _a : !!props.onClick;
11418
- const arrow2 = props.arrow === void 0 ? clickable : props.arrow;
11437
+ const showArrow = (_b = arrow2 !== null && arrow2 !== void 0 ? arrow2 : arrowIcon) !== null && _b !== void 0 ? _b : clickable;
11438
+ const mergedArrowIcon = mergeProp(componentConfig.arrowIcon, arrow2 !== true ? arrow2 : null, arrowIcon !== true ? arrowIcon : null);
11419
11439
  const content = React$1.createElement("div", {
11420
11440
  className: `${classPrefix$12}-content`
11421
11441
  }, isNodeWithContent(props.prefix) && React$1.createElement("div", {
@@ -11428,9 +11448,9 @@ Please add \`${key}Action\` when creating your handler.`);
11428
11448
  className: `${classPrefix$12}-description`
11429
11449
  }, props.description)), isNodeWithContent(props.extra) && React$1.createElement("div", {
11430
11450
  className: `${classPrefix$12}-content-extra`
11431
- }, props.extra), isNodeWithContent(arrow2) && React$1.createElement("div", {
11451
+ }, props.extra), showArrow && React$1.createElement("div", {
11432
11452
  className: `${classPrefix$12}-content-arrow`
11433
- }, arrow2 === true ? React$1.createElement(RightOutline, null) : arrow2));
11453
+ }, mergedArrowIcon || React$1.createElement(RightOutline, null)));
11434
11454
  return withNativeProps(props, React$1.createElement(clickable ? "a" : "div", {
11435
11455
  className: classNames(`${classPrefix$12}`, clickable ? ["adm-plain-anchor"] : [], props.disabled && `${classPrefix$12}-disabled`),
11436
11456
  onClick: props.disabled ? void 0 : props.onClick
@@ -11446,11 +11466,14 @@ Please add \`${key}Action\` when creating your handler.`);
11446
11466
  defaultValue: [],
11447
11467
  activeIcon: React$1.createElement(CheckOutline, null)
11448
11468
  };
11449
- const CheckList$1 = (p) => {
11450
- const props = mergeProps(defaultProps$R, p);
11451
- const [value, setValue2] = usePropsValue(props);
11469
+ const CheckList$1 = (props) => {
11470
+ const {
11471
+ checkList: componentConfig = {}
11472
+ } = useConfig();
11473
+ const mergedProps = mergeProps(defaultProps$R, componentConfig, props);
11474
+ const [value, setValue2] = usePropsValue(mergedProps);
11452
11475
  function check(val) {
11453
- if (props.multiple) {
11476
+ if (mergedProps.multiple) {
11454
11477
  setValue2([...value, val]);
11455
11478
  } else {
11456
11479
  setValue2([val]);
@@ -11464,7 +11487,7 @@ Please add \`${key}Action\` when creating your handler.`);
11464
11487
  extra,
11465
11488
  disabled,
11466
11489
  readOnly
11467
- } = props;
11490
+ } = mergedProps;
11468
11491
  return React$1.createElement(CheckListContext.Provider, {
11469
11492
  value: {
11470
11493
  value,
@@ -11475,10 +11498,10 @@ Please add \`${key}Action\` when creating your handler.`);
11475
11498
  disabled,
11476
11499
  readOnly
11477
11500
  }
11478
- }, withNativeProps(props, React$1.createElement(List$1, {
11479
- mode: props.mode,
11501
+ }, withNativeProps(mergedProps, React$1.createElement(List$1, {
11502
+ mode: mergedProps.mode,
11480
11503
  className: classPrefix$11
11481
- }, props.children)));
11504
+ }, mergedProps.children)));
11482
11505
  };
11483
11506
  const classPrefix$10 = `adm-check-list-item`;
11484
11507
  const CheckListItem = (props) => {
@@ -11951,12 +11974,15 @@ Please add \`${key}Action\` when creating your handler.`);
11951
11974
  const defaultProps$O = Object.assign(Object.assign({}, defaultPopupBaseProps), {
11952
11975
  getContainer: null
11953
11976
  });
11954
- const CenterPopup = (p) => {
11955
- const props = mergeProps(defaultProps$O, p);
11977
+ const CenterPopup = (props) => {
11978
+ const {
11979
+ popup: componentConfig = {}
11980
+ } = useConfig();
11981
+ const mergedProps = mergeProps(defaultProps$O, componentConfig, props);
11956
11982
  const unmountedRef = useUnmountedRef$1();
11957
11983
  const style = useSpring({
11958
- scale: props.visible ? 1 : 0.8,
11959
- opacity: props.visible ? 1 : 0,
11984
+ scale: mergedProps.visible ? 1 : 0.8,
11985
+ opacity: mergedProps.visible ? 1 : 0,
11960
11986
  config: {
11961
11987
  mass: 1.2,
11962
11988
  tension: 200,
@@ -11967,69 +11993,69 @@ Please add \`${key}Action\` when creating your handler.`);
11967
11993
  var _a, _b;
11968
11994
  if (unmountedRef.current)
11969
11995
  return;
11970
- setActive(props.visible);
11971
- if (props.visible) {
11972
- (_a = props.afterShow) === null || _a === void 0 ? void 0 : _a.call(props);
11996
+ setActive(mergedProps.visible);
11997
+ if (mergedProps.visible) {
11998
+ (_a = mergedProps.afterShow) === null || _a === void 0 ? void 0 : _a.call(mergedProps);
11973
11999
  } else {
11974
- (_b = props.afterClose) === null || _b === void 0 ? void 0 : _b.call(props);
12000
+ (_b = mergedProps.afterClose) === null || _b === void 0 ? void 0 : _b.call(mergedProps);
11975
12001
  }
11976
12002
  }
11977
12003
  });
11978
- const [active, setActive] = React$1.useState(props.visible);
12004
+ const [active, setActive] = React$1.useState(mergedProps.visible);
11979
12005
  useIsomorphicLayoutEffect$2(() => {
11980
- if (props.visible) {
12006
+ if (mergedProps.visible) {
11981
12007
  setActive(true);
11982
12008
  }
11983
- }, [props.visible]);
12009
+ }, [mergedProps.visible]);
11984
12010
  const ref = React$1.useRef(null);
11985
- useLockScroll(ref, props.disableBodyScroll && active);
11986
- const maskVisible = useInnerVisible(active && props.visible);
12011
+ useLockScroll(ref, mergedProps.disableBodyScroll && active);
12012
+ const maskVisible = useInnerVisible(active && mergedProps.visible);
11987
12013
  const body = React$1.createElement("div", {
11988
- className: classNames(`${classPrefix$Y}-body`, props.bodyClassName),
11989
- style: props.bodyStyle
11990
- }, props.children);
11991
- const node = withStopPropagation(props.stopPropagation, withNativeProps(props, React$1.createElement("div", {
12014
+ className: classNames(`${classPrefix$Y}-body`, mergedProps.bodyClassName),
12015
+ style: mergedProps.bodyStyle
12016
+ }, mergedProps.children);
12017
+ const node = withStopPropagation(mergedProps.stopPropagation, withNativeProps(mergedProps, React$1.createElement("div", {
11992
12018
  className: classPrefix$Y,
11993
12019
  style: {
11994
12020
  display: active ? void 0 : "none",
11995
12021
  pointerEvents: active ? void 0 : "none"
11996
12022
  }
11997
- }, props.mask && React$1.createElement(Mask, {
12023
+ }, mergedProps.mask && React$1.createElement(Mask, {
11998
12024
  visible: maskVisible,
11999
- forceRender: props.forceRender,
12000
- destroyOnClose: props.destroyOnClose,
12025
+ forceRender: mergedProps.forceRender,
12026
+ destroyOnClose: mergedProps.destroyOnClose,
12001
12027
  onMaskClick: (e2) => {
12002
12028
  var _a, _b;
12003
- (_a = props.onMaskClick) === null || _a === void 0 ? void 0 : _a.call(props, e2);
12004
- if (props.closeOnMaskClick) {
12005
- (_b = props.onClose) === null || _b === void 0 ? void 0 : _b.call(props);
12029
+ (_a = mergedProps.onMaskClick) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
12030
+ if (mergedProps.closeOnMaskClick) {
12031
+ (_b = mergedProps.onClose) === null || _b === void 0 ? void 0 : _b.call(mergedProps);
12006
12032
  }
12007
12033
  },
12008
- style: props.maskStyle,
12009
- className: classNames(`${classPrefix$Y}-mask`, props.maskClassName),
12034
+ style: mergedProps.maskStyle,
12035
+ className: classNames(`${classPrefix$Y}-mask`, mergedProps.maskClassName),
12010
12036
  disableBodyScroll: false,
12011
- stopPropagation: props.stopPropagation
12037
+ stopPropagation: mergedProps.stopPropagation
12012
12038
  }), React$1.createElement("div", {
12013
12039
  className: `${classPrefix$Y}-wrap`,
12014
- role: props.role,
12015
- "aria-label": props["aria-label"]
12040
+ role: mergedProps.role,
12041
+ "aria-label": mergedProps["aria-label"]
12016
12042
  }, React$1.createElement(animated.div, {
12017
12043
  style: Object.assign(Object.assign({}, style), {
12018
12044
  pointerEvents: style.opacity.to((v) => v === 1 ? "unset" : "none")
12019
12045
  }),
12020
12046
  ref
12021
- }, props.showCloseButton && React$1.createElement("a", {
12047
+ }, mergedProps.showCloseButton && React$1.createElement("a", {
12022
12048
  className: classNames(`${classPrefix$Y}-close`, "adm-plain-anchor"),
12023
12049
  onClick: () => {
12024
12050
  var _a;
12025
- (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
12051
+ (_a = mergedProps.onClose) === null || _a === void 0 ? void 0 : _a.call(mergedProps);
12026
12052
  }
12027
- }, React$1.createElement(CloseOutline, null)), body)))));
12053
+ }, mergedProps.closeIcon), body)))));
12028
12054
  return React$1.createElement(ShouldRender, {
12029
12055
  active,
12030
- forceRender: props.forceRender,
12031
- destroyOnClose: props.destroyOnClose
12032
- }, renderToContainer(props.getContainer, node));
12056
+ forceRender: mergedProps.forceRender,
12057
+ destroyOnClose: mergedProps.destroyOnClose
12058
+ }, renderToContainer(mergedProps.getContainer, node));
12033
12059
  };
12034
12060
  const CheckboxGroupContext = React$1.createContext(null);
12035
12061
  const defaultProps$N = {
@@ -12273,8 +12299,12 @@ Please add \`${key}Action\` when creating your handler.`);
12273
12299
  }, React$1.createElement(List$1.Item, null, shouldRender && props.children)));
12274
12300
  };
12275
12301
  const Collapse = (props) => {
12302
+ const {
12303
+ collapse: componentConfig = {}
12304
+ } = useConfig();
12305
+ const mergedProps = mergeProps(componentConfig, props);
12276
12306
  const panels = [];
12277
- traverseReactNode(props.children, (child) => {
12307
+ traverseReactNode(mergedProps.children, (child) => {
12278
12308
  if (!React$1.isValidElement(child))
12279
12309
  return;
12280
12310
  const key = child.key;
@@ -12284,11 +12314,11 @@ Please add \`${key}Action\` when creating your handler.`);
12284
12314
  });
12285
12315
  const handlePropsValue = () => {
12286
12316
  var _a;
12287
- if (!props.accordion) {
12317
+ if (!mergedProps.accordion) {
12288
12318
  return {
12289
- value: props.activeKey,
12290
- defaultValue: (_a = props.defaultActiveKey) !== null && _a !== void 0 ? _a : [],
12291
- onChange: props.onChange
12319
+ value: mergedProps.activeKey,
12320
+ defaultValue: (_a = mergedProps.defaultActiveKey) !== null && _a !== void 0 ? _a : [],
12321
+ onChange: mergedProps.onChange
12292
12322
  };
12293
12323
  }
12294
12324
  const initValue = {
@@ -12296,29 +12326,29 @@ Please add \`${key}Action\` when creating your handler.`);
12296
12326
  defaultValue: [],
12297
12327
  onChange: (v) => {
12298
12328
  var _a2, _b;
12299
- (_a2 = props.onChange) === null || _a2 === void 0 ? void 0 : _a2.call(props, (_b = v[0]) !== null && _b !== void 0 ? _b : null);
12329
+ (_a2 = mergedProps.onChange) === null || _a2 === void 0 ? void 0 : _a2.call(mergedProps, (_b = v[0]) !== null && _b !== void 0 ? _b : null);
12300
12330
  }
12301
12331
  };
12302
- if (props.activeKey === void 0) {
12332
+ if (mergedProps.activeKey === void 0) {
12303
12333
  initValue.value = void 0;
12304
- } else if (props.activeKey !== null) {
12305
- initValue.value = [props.activeKey];
12334
+ } else if (mergedProps.activeKey !== null) {
12335
+ initValue.value = [mergedProps.activeKey];
12306
12336
  }
12307
- if (![null, void 0].includes(props.defaultActiveKey)) {
12308
- initValue.defaultValue = [props.defaultActiveKey];
12337
+ if (![null, void 0].includes(mergedProps.defaultActiveKey)) {
12338
+ initValue.defaultValue = [mergedProps.defaultActiveKey];
12309
12339
  }
12310
12340
  return initValue;
12311
12341
  };
12312
12342
  const [activeKey, setActiveKey] = usePropsValue(handlePropsValue());
12313
12343
  const activeKeyList = activeKey === null ? [] : Array.isArray(activeKey) ? activeKey : [activeKey];
12314
- return withNativeProps(props, React$1.createElement("div", {
12344
+ return withNativeProps(mergedProps, React$1.createElement("div", {
12315
12345
  className: classPrefix$W
12316
12346
  }, React$1.createElement(List$1, null, panels.map((panel) => {
12317
12347
  const key = panel.key;
12318
12348
  const active = activeKeyList.includes(key);
12319
12349
  function handleClick(event) {
12320
12350
  var _a, _b;
12321
- if (props.accordion) {
12351
+ if (mergedProps.accordion) {
12322
12352
  if (active) {
12323
12353
  setActiveKey([]);
12324
12354
  } else {
@@ -12333,27 +12363,19 @@ Please add \`${key}Action\` when creating your handler.`);
12333
12363
  }
12334
12364
  (_b = (_a = panel.props).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, event);
12335
12365
  }
12336
- const renderArrow = () => {
12337
- let arrow2 = React$1.createElement(DownOutline, null);
12338
- if (props.arrow !== void 0) {
12339
- arrow2 = props.arrow;
12340
- }
12341
- if (panel.props.arrow !== void 0) {
12342
- arrow2 = panel.props.arrow;
12343
- }
12344
- return typeof arrow2 === "function" ? arrow2(active) : React$1.createElement("div", {
12345
- className: classNames(`${classPrefix$W}-arrow`, {
12346
- [`${classPrefix$W}-arrow-active`]: active
12347
- })
12348
- }, arrow2);
12349
- };
12366
+ const arrow2 = mergeProp(React$1.createElement(DownOutline, null), mergedProps.arrow, mergedProps.arrowIcon, panel.props.arrow, panel.props.arrowIcon);
12367
+ const arrowIcon = typeof arrow2 === "function" ? arrow2(active) : React$1.createElement("div", {
12368
+ className: classNames(`${classPrefix$W}-arrow`, {
12369
+ [`${classPrefix$W}-arrow-active`]: active
12370
+ })
12371
+ }, arrow2);
12350
12372
  return React$1.createElement(React$1.Fragment, {
12351
12373
  key
12352
12374
  }, withNativeProps(panel.props, React$1.createElement(List$1.Item, {
12353
12375
  className: `${classPrefix$W}-panel-header`,
12354
12376
  onClick: handleClick,
12355
12377
  disabled: panel.props.disabled,
12356
- arrow: renderArrow()
12378
+ arrowIcon
12357
12379
  }, panel.props.title)), React$1.createElement(CollapsePanelContent, {
12358
12380
  visible: active,
12359
12381
  forceRender: !!panel.props.forceRender,
@@ -12989,25 +13011,37 @@ Please add \`${key}Action\` when creating your handler.`);
12989
13011
  confirm: confirm$1,
12990
13012
  clear: clear$2
12991
13013
  });
13014
+ const IconContext = React$1.createContext(null);
12992
13015
  const classPrefix$V = `adm-dropdown-item`;
12993
13016
  const Item = (props) => {
12994
- var _a;
13017
+ const {
13018
+ dropdown: componentConfig = {}
13019
+ } = useConfig();
13020
+ const mergedProps = mergeProps(componentConfig, props);
13021
+ const {
13022
+ active,
13023
+ highlight,
13024
+ onClick,
13025
+ title
13026
+ } = mergedProps;
12995
13027
  const cls2 = classNames(classPrefix$V, {
12996
- [`${classPrefix$V}-active`]: props.active,
12997
- [`${classPrefix$V}-highlight`]: (_a = props.highlight) !== null && _a !== void 0 ? _a : props.active
13028
+ [`${classPrefix$V}-active`]: active,
13029
+ [`${classPrefix$V}-highlight`]: highlight !== null && highlight !== void 0 ? highlight : active
12998
13030
  });
13031
+ const contextArrowIcon = React$1.useContext(IconContext);
13032
+ const mergedArrowIcon = mergeProp(React$1.createElement(DownFill, null), contextArrowIcon, mergedProps.arrow, mergedProps.arrowIcon);
12999
13033
  return withNativeProps(props, React$1.createElement("div", {
13000
13034
  className: cls2,
13001
- onClick: props.onClick
13035
+ onClick
13002
13036
  }, React$1.createElement("div", {
13003
13037
  className: `${classPrefix$V}-title`
13004
13038
  }, React$1.createElement("span", {
13005
13039
  className: `${classPrefix$V}-title-text`
13006
- }, props.title), React$1.createElement("span", {
13040
+ }, title), React$1.createElement("span", {
13007
13041
  className: classNames(`${classPrefix$V}-title-arrow`, {
13008
- [`${classPrefix$V}-title-arrow-active`]: props.active
13042
+ [`${classPrefix$V}-title-arrow-active`]: active
13009
13043
  })
13010
- }, props.arrow === void 0 ? React$1.createElement(DownFill, null) : props.arrow))));
13044
+ }, mergedArrowIcon))));
13011
13045
  };
13012
13046
  const Item$1 = Item;
13013
13047
  const ItemChildrenWrap = (props) => {
@@ -13030,17 +13064,21 @@ Please add \`${key}Action\` when creating your handler.`);
13030
13064
  closeOnClickAway: false,
13031
13065
  getContainer: defaultPopupBaseProps["getContainer"]
13032
13066
  };
13033
- const Dropdown = React$1.forwardRef((p, ref) => {
13034
- const props = mergeProps(defaultProps$H, p);
13067
+ const Dropdown = React$1.forwardRef((props, ref) => {
13068
+ const {
13069
+ dropdown: componentConfig = {}
13070
+ } = useConfig();
13071
+ const mergedProps = mergeProps(defaultProps$H, componentConfig, props);
13072
+ const arrowIcon = mergeProp(componentConfig.arrowIcon, props.arrow, props.arrowIcon);
13035
13073
  const [value, setValue2] = usePropsValue({
13036
- value: props.activeKey,
13037
- defaultValue: props.defaultActiveKey,
13038
- onChange: props.onChange
13074
+ value: mergedProps.activeKey,
13075
+ defaultValue: mergedProps.defaultActiveKey,
13076
+ onChange: mergedProps.onChange
13039
13077
  });
13040
13078
  const navRef = React$1.useRef(null);
13041
13079
  const contentRef = React$1.useRef(null);
13042
13080
  useClickAway(() => {
13043
- if (!props.closeOnClickAway)
13081
+ if (!mergedProps.closeOnClickAway)
13044
13082
  return;
13045
13083
  setValue2(null);
13046
13084
  }, [navRef, contentRef]);
@@ -13064,7 +13102,7 @@ Please add \`${key}Action\` when creating your handler.`);
13064
13102
  };
13065
13103
  let popupForceRender = false;
13066
13104
  const items = [];
13067
- const navs = React$1.Children.map(props.children, (child) => {
13105
+ const navs = React$1.Children.map(mergedProps.children, (child) => {
13068
13106
  if (React$1.isValidElement(child)) {
13069
13107
  const childProps = Object.assign(Object.assign({}, child.props), {
13070
13108
  onClick: (event) => {
@@ -13072,8 +13110,7 @@ Please add \`${key}Action\` when creating your handler.`);
13072
13110
  changeActive(child.key);
13073
13111
  (_b = (_a = child.props).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, event);
13074
13112
  },
13075
- active: child.key === value,
13076
- arrow: child.props.arrow === void 0 ? props.arrow : child.props.arrow
13113
+ active: child.key === value
13077
13114
  });
13078
13115
  items.push(child);
13079
13116
  if (child.props.forceRender)
@@ -13088,18 +13125,20 @@ Please add \`${key}Action\` when creating your handler.`);
13088
13125
  setValue2(null);
13089
13126
  }
13090
13127
  }), [setValue2]);
13091
- return withNativeProps(props, React$1.createElement("div", {
13128
+ return withNativeProps(mergedProps, React$1.createElement("div", {
13092
13129
  className: classNames(classPrefix$U, {
13093
13130
  [`${classPrefix$U}-open`]: !!value
13094
13131
  }),
13095
13132
  ref: containerRef
13133
+ }, React$1.createElement(IconContext.Provider, {
13134
+ value: arrowIcon
13096
13135
  }, React$1.createElement("div", {
13097
13136
  className: `${classPrefix$U}-nav`,
13098
13137
  ref: navRef
13099
- }, navs), React$1.createElement(Popup, {
13138
+ }, navs)), React$1.createElement(Popup, {
13100
13139
  visible: !!value,
13101
13140
  position: "top",
13102
- getContainer: props.getContainer,
13141
+ getContainer: mergedProps.getContainer,
13103
13142
  className: `${classPrefix$U}-popup`,
13104
13143
  maskClassName: `${classPrefix$U}-popup-mask`,
13105
13144
  bodyClassName: `${classPrefix$U}-popup-body`,
@@ -13107,7 +13146,7 @@ Please add \`${key}Action\` when creating your handler.`);
13107
13146
  top
13108
13147
  },
13109
13148
  forceRender: popupForceRender,
13110
- onMaskClick: props.closeOnMaskClick ? () => {
13149
+ onMaskClick: mergedProps.closeOnMaskClick ? () => {
13111
13150
  changeActive(null);
13112
13151
  } : void 0
13113
13152
  }, React$1.createElement("div", {
@@ -18320,24 +18359,13 @@ Please add \`${key}Action\` when creating your handler.`);
18320
18359
  });
18321
18360
  var _default = Context;
18322
18361
  default_1 = FieldContext.default = _default;
18323
- function toArray(candidate) {
18324
- if (candidate === void 0 || candidate === false)
18325
- return [];
18326
- return Array.isArray(candidate) ? candidate : [candidate];
18327
- }
18328
- function shouldConstruct(Component) {
18329
- const prototype = Component.prototype;
18330
- return !!(prototype && prototype.isReactComponent);
18331
- }
18332
- function isSimpleFunctionComponent(type) {
18333
- return typeof type === "function" && !shouldConstruct(type) && type.defaultProps === void 0;
18334
- }
18335
- function isSafeSetRefComponent(component) {
18336
- if (reactIsExports.isFragment(component))
18337
- return false;
18338
- if (reactIsExports.isMemo(component))
18339
- return isSafeSetRefComponent(component.type);
18340
- return !isSimpleFunctionComponent(component.type);
18362
+ function undefinedFallback(...items) {
18363
+ let i2;
18364
+ for (i2 = 0; i2 < items.length; i2++) {
18365
+ if (items[i2] !== void 0)
18366
+ break;
18367
+ }
18368
+ return items[i2];
18341
18369
  }
18342
18370
  const Arrow = React$1.memo((props) => {
18343
18371
  return withNativeProps(props, React$1.createElement("svg", {
@@ -19965,13 +19993,24 @@ Please add \`${key}Action\` when creating your handler.`);
19965
19993
  const Popover = attachPropertiesToComponent(Popover$1, {
19966
19994
  Menu: PopoverMenu
19967
19995
  });
19968
- function undefinedFallback(...items) {
19969
- let i2;
19970
- for (i2 = 0; i2 < items.length; i2++) {
19971
- if (items[i2] !== void 0)
19972
- break;
19973
- }
19974
- return items[i2];
19996
+ function toArray(candidate) {
19997
+ if (candidate === void 0 || candidate === false)
19998
+ return [];
19999
+ return Array.isArray(candidate) ? candidate : [candidate];
20000
+ }
20001
+ function shouldConstruct(Component) {
20002
+ const prototype = Component.prototype;
20003
+ return !!(prototype && prototype.isReactComponent);
20004
+ }
20005
+ function isSimpleFunctionComponent(type) {
20006
+ return typeof type === "function" && !shouldConstruct(type) && type.defaultProps === void 0;
20007
+ }
20008
+ function isSafeSetRefComponent(component) {
20009
+ if (reactIsExports.isFragment(component))
20010
+ return false;
20011
+ if (reactIsExports.isMemo(component))
20012
+ return isSafeSetRefComponent(component.type);
20013
+ return !isSimpleFunctionComponent(component.type);
19975
20014
  }
19976
20015
  const NAME_SPLIT = "__SPLIT__";
19977
20016
  const classPrefix$L = `adm-form-item`;
@@ -19980,22 +20019,25 @@ Please add \`${key}Action\` when creating your handler.`);
19980
20019
  }) => children, (prev, next) => prev.value === next.value && prev.update === next.update);
19981
20020
  const FormItemLayout = (props) => {
19982
20021
  var _a;
20022
+ const {
20023
+ locale,
20024
+ form: componentConfig = {}
20025
+ } = useConfig();
19983
20026
  const {
19984
20027
  style,
19985
20028
  extra,
19986
20029
  label,
19987
20030
  help,
20031
+ helpIcon,
19988
20032
  required,
19989
20033
  children,
19990
20034
  htmlFor,
19991
20035
  hidden,
19992
20036
  arrow: arrow2,
20037
+ arrowIcon,
19993
20038
  childElementPosition = "normal"
19994
- } = props;
20039
+ } = mergeProps(componentConfig, props);
19995
20040
  const context = React$1.useContext(FormContext);
19996
- const {
19997
- locale
19998
- } = useConfig();
19999
20041
  const hasFeedback = props.hasFeedback !== void 0 ? props.hasFeedback : context.hasFeedback;
20000
20042
  const layout = props.layout || context.layout;
20001
20043
  const disabled = (_a = props.disabled) !== null && _a !== void 0 ? _a : context.disabled;
@@ -20035,7 +20077,7 @@ Please add \`${key}Action\` when creating your handler.`);
20035
20077
  e2.stopPropagation();
20036
20078
  e2.preventDefault();
20037
20079
  }
20038
- }, React$1.createElement(QuestionCircleOutline, null))));
20080
+ }, helpIcon || React$1.createElement(QuestionCircleOutline, null))));
20039
20081
  const description = (!!props.description || hasFeedback) && React$1.createElement(React$1.Fragment, null, props.description, hasFeedback && React$1.createElement(React$1.Fragment, null, props.errors.map((error, index2) => React$1.createElement("div", {
20040
20082
  key: `error-${index2}`,
20041
20083
  className: `${classPrefix$L}-feedback-error`
@@ -20056,7 +20098,7 @@ Please add \`${key}Action\` when creating your handler.`);
20056
20098
  disabled,
20057
20099
  onClick: props.onClick,
20058
20100
  clickable: props.clickable,
20059
- arrow: arrow2
20101
+ arrowIcon: arrowIcon || arrow2
20060
20102
  }, React$1.createElement("div", {
20061
20103
  className: classNames(`${classPrefix$L}-child`, `${classPrefix$L}-child-position-${childElementPosition}`)
20062
20104
  }, React$1.createElement("div", {
@@ -20070,6 +20112,7 @@ Please add \`${key}Action\` when creating your handler.`);
20070
20112
  // FormItem 相关
20071
20113
  label,
20072
20114
  help,
20115
+ helpIcon,
20073
20116
  extra,
20074
20117
  hasFeedback,
20075
20118
  name,
@@ -20090,8 +20133,9 @@ Please add \`${key}Action\` when creating your handler.`);
20090
20133
  shouldUpdate,
20091
20134
  dependencies,
20092
20135
  clickable,
20093
- arrow: arrow2
20094
- } = props, fieldProps = __rest(props, ["style", "label", "help", "extra", "hasFeedback", "name", "required", "noStyle", "hidden", "layout", "childElementPosition", "description", "disabled", "rules", "children", "messageVariables", "trigger", "validateTrigger", "onClick", "shouldUpdate", "dependencies", "clickable", "arrow"]);
20136
+ arrow: arrow2,
20137
+ arrowIcon
20138
+ } = props, fieldProps = __rest(props, ["style", "label", "help", "helpIcon", "extra", "hasFeedback", "name", "required", "noStyle", "hidden", "layout", "childElementPosition", "description", "disabled", "rules", "children", "messageVariables", "trigger", "validateTrigger", "onClick", "shouldUpdate", "dependencies", "clickable", "arrow", "arrowIcon"]);
20095
20139
  const {
20096
20140
  name: formName
20097
20141
  } = React$1.useContext(FormContext);
@@ -20143,6 +20187,7 @@ Please add \`${key}Action\` when creating your handler.`);
20143
20187
  label,
20144
20188
  extra,
20145
20189
  help,
20190
+ helpIcon,
20146
20191
  description,
20147
20192
  required: isRequired,
20148
20193
  disabled,
@@ -20155,7 +20200,8 @@ Please add \`${key}Action\` when creating your handler.`);
20155
20200
  layout,
20156
20201
  childElementPosition,
20157
20202
  clickable,
20158
- arrow: arrow2
20203
+ arrow: arrow2,
20204
+ arrowIcon
20159
20205
  }, React$1.createElement(NoStyleItemContext.Provider, {
20160
20206
  value: onSubMetaChange
20161
20207
  }, baseChildren)));
@@ -21382,22 +21428,24 @@ Please add \`${key}Action\` when creating your handler.`);
21382
21428
  const classPrefix$A = `adm-input`;
21383
21429
  const defaultProps$v = {
21384
21430
  defaultValue: "",
21431
+ clearIcon: React$1.createElement(CloseCircleFill, null),
21385
21432
  onlyShowClearWhenFocus: true
21386
21433
  };
21387
- const Input = React$1.forwardRef((p, ref) => {
21388
- const props = mergeProps(defaultProps$v, p);
21389
- const [value, setValue2] = usePropsValue(props);
21434
+ const Input = React$1.forwardRef((props, ref) => {
21435
+ const {
21436
+ locale,
21437
+ input: componentConfig = {}
21438
+ } = useConfig();
21439
+ const mergedProps = mergeProps(defaultProps$v, componentConfig, props);
21440
+ const [value, setValue2] = usePropsValue(mergedProps);
21390
21441
  const [hasFocus, setHasFocus] = React$1.useState(false);
21391
21442
  const compositionStartRef = React$1.useRef(false);
21392
21443
  const nativeInputRef = React$1.useRef(null);
21393
- const {
21394
- locale
21395
- } = useConfig();
21396
21444
  const handleKeydown = useInputHandleKeyDown({
21397
- onEnterPress: props.onEnterPress,
21398
- onKeyDown: props.onKeyDown,
21445
+ onEnterPress: mergedProps.onEnterPress,
21446
+ onKeyDown: mergedProps.onKeyDown,
21399
21447
  nativeInputRef,
21400
- enterKeyHint: props.enterKeyHint
21448
+ enterKeyHint: mergedProps.enterKeyHint
21401
21449
  });
21402
21450
  React$1.useImperativeHandle(ref, () => ({
21403
21451
  clear: () => {
@@ -21417,8 +21465,8 @@ Please add \`${key}Action\` when creating your handler.`);
21417
21465
  }));
21418
21466
  function checkValue() {
21419
21467
  let nextValue = value;
21420
- if (props.type === "number") {
21421
- const boundValue = nextValue && bound(parseFloat(nextValue), props.min, props.max).toString();
21468
+ if (mergedProps.type === "number") {
21469
+ const boundValue = nextValue && bound(parseFloat(nextValue), mergedProps.min, mergedProps.max).toString();
21422
21470
  if (Number(nextValue) !== Number(boundValue)) {
21423
21471
  nextValue = boundValue;
21424
21472
  }
@@ -21428,16 +21476,16 @@ Please add \`${key}Action\` when creating your handler.`);
21428
21476
  }
21429
21477
  }
21430
21478
  const shouldShowClear = (() => {
21431
- if (!props.clearable || !value || props.readOnly)
21479
+ if (!mergedProps.clearable || !value || mergedProps.readOnly)
21432
21480
  return false;
21433
- if (props.onlyShowClearWhenFocus) {
21481
+ if (mergedProps.onlyShowClearWhenFocus) {
21434
21482
  return hasFocus;
21435
21483
  } else {
21436
21484
  return true;
21437
21485
  }
21438
21486
  })();
21439
- return withNativeProps(props, React$1.createElement("div", {
21440
- className: classNames(`${classPrefix$A}`, props.disabled && `${classPrefix$A}-disabled`)
21487
+ return withNativeProps(mergedProps, React$1.createElement("div", {
21488
+ className: classNames(`${classPrefix$A}`, mergedProps.disabled && `${classPrefix$A}-disabled`)
21441
21489
  }, React$1.createElement("input", {
21442
21490
  ref: nativeInputRef,
21443
21491
  className: `${classPrefix$A}-element`,
@@ -21448,50 +21496,50 @@ Please add \`${key}Action\` when creating your handler.`);
21448
21496
  onFocus: (e2) => {
21449
21497
  var _a;
21450
21498
  setHasFocus(true);
21451
- (_a = props.onFocus) === null || _a === void 0 ? void 0 : _a.call(props, e2);
21499
+ (_a = mergedProps.onFocus) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
21452
21500
  },
21453
21501
  onBlur: (e2) => {
21454
21502
  var _a;
21455
21503
  setHasFocus(false);
21456
21504
  checkValue();
21457
- (_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props, e2);
21505
+ (_a = mergedProps.onBlur) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
21458
21506
  },
21459
- id: props.id,
21460
- placeholder: props.placeholder,
21461
- disabled: props.disabled,
21462
- readOnly: props.readOnly,
21463
- maxLength: props.maxLength,
21464
- minLength: props.minLength,
21465
- max: props.max,
21466
- min: props.min,
21467
- autoComplete: props.autoComplete,
21468
- enterKeyHint: props.enterKeyHint,
21469
- autoFocus: props.autoFocus,
21470
- pattern: props.pattern,
21471
- inputMode: props.inputMode,
21472
- type: props.type,
21473
- name: props.name,
21474
- autoCapitalize: props.autoCapitalize,
21475
- autoCorrect: props.autoCorrect,
21507
+ id: mergedProps.id,
21508
+ placeholder: mergedProps.placeholder,
21509
+ disabled: mergedProps.disabled,
21510
+ readOnly: mergedProps.readOnly,
21511
+ maxLength: mergedProps.maxLength,
21512
+ minLength: mergedProps.minLength,
21513
+ max: mergedProps.max,
21514
+ min: mergedProps.min,
21515
+ autoComplete: mergedProps.autoComplete,
21516
+ enterKeyHint: mergedProps.enterKeyHint,
21517
+ autoFocus: mergedProps.autoFocus,
21518
+ pattern: mergedProps.pattern,
21519
+ inputMode: mergedProps.inputMode,
21520
+ type: mergedProps.type,
21521
+ name: mergedProps.name,
21522
+ autoCapitalize: mergedProps.autoCapitalize,
21523
+ autoCorrect: mergedProps.autoCorrect,
21476
21524
  onKeyDown: handleKeydown,
21477
- onKeyUp: props.onKeyUp,
21525
+ onKeyUp: mergedProps.onKeyUp,
21478
21526
  onCompositionStart: (e2) => {
21479
21527
  var _a;
21480
21528
  compositionStartRef.current = true;
21481
- (_a = props.onCompositionStart) === null || _a === void 0 ? void 0 : _a.call(props, e2);
21529
+ (_a = mergedProps.onCompositionStart) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
21482
21530
  },
21483
21531
  onCompositionEnd: (e2) => {
21484
21532
  var _a;
21485
21533
  compositionStartRef.current = false;
21486
- (_a = props.onCompositionEnd) === null || _a === void 0 ? void 0 : _a.call(props, e2);
21534
+ (_a = mergedProps.onCompositionEnd) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
21487
21535
  },
21488
- onClick: props.onClick,
21489
- step: props.step,
21490
- role: props.role,
21491
- "aria-valuenow": props["aria-valuenow"],
21492
- "aria-valuemax": props["aria-valuemax"],
21493
- "aria-valuemin": props["aria-valuemin"],
21494
- "aria-label": props["aria-label"]
21536
+ onClick: mergedProps.onClick,
21537
+ step: mergedProps.step,
21538
+ role: mergedProps.role,
21539
+ "aria-valuenow": mergedProps["aria-valuenow"],
21540
+ "aria-valuemax": mergedProps["aria-valuemax"],
21541
+ "aria-valuemin": mergedProps["aria-valuemin"],
21542
+ "aria-label": mergedProps["aria-label"]
21495
21543
  }), shouldShowClear && React$1.createElement("div", {
21496
21544
  className: `${classPrefix$A}-clear`,
21497
21545
  onMouseDown: (e2) => {
@@ -21500,14 +21548,14 @@ Please add \`${key}Action\` when creating your handler.`);
21500
21548
  onClick: () => {
21501
21549
  var _a, _b;
21502
21550
  setValue2("");
21503
- (_a = props.onClear) === null || _a === void 0 ? void 0 : _a.call(props);
21551
+ (_a = mergedProps.onClear) === null || _a === void 0 ? void 0 : _a.call(mergedProps);
21504
21552
  if (isIOS() && compositionStartRef.current) {
21505
21553
  compositionStartRef.current = false;
21506
21554
  (_b = nativeInputRef.current) === null || _b === void 0 ? void 0 : _b.blur();
21507
21555
  }
21508
21556
  },
21509
21557
  "aria-label": locale.Input.clear
21510
- }, React$1.createElement(CloseCircleFill, null))));
21558
+ }, mergedProps.clearIcon)));
21511
21559
  });
21512
21560
  const classPrefix$z = `adm-jumbo-tabs`;
21513
21561
  const JumboTab = () => {
@@ -21768,50 +21816,60 @@ Please add \`${key}Action\` when creating your handler.`);
21768
21816
  });
21769
21817
  const classPrefix$y = `adm-nav-bar`;
21770
21818
  const defaultProps$s = {
21771
- backArrow: true
21819
+ backIcon: true
21772
21820
  };
21773
- const NavBar = (p) => {
21774
- const props = mergeProps(defaultProps$s, p);
21821
+ const NavBar = (props) => {
21822
+ const {
21823
+ navBar: componentConfig = {}
21824
+ } = useConfig();
21825
+ const mergedProps = mergeProps(defaultProps$s, componentConfig, props);
21775
21826
  const {
21776
21827
  back,
21828
+ backIcon,
21777
21829
  backArrow
21778
- } = props;
21779
- return withNativeProps(props, React$1.createElement("div", {
21830
+ } = mergedProps;
21831
+ return withNativeProps(mergedProps, React$1.createElement("div", {
21780
21832
  className: classNames(classPrefix$y)
21781
21833
  }, React$1.createElement("div", {
21782
21834
  className: `${classPrefix$y}-left`,
21783
21835
  role: "button"
21784
21836
  }, back !== null && React$1.createElement("div", {
21785
21837
  className: `${classPrefix$y}-back`,
21786
- onClick: props.onBack
21787
- }, backArrow && React$1.createElement("span", {
21838
+ onClick: mergedProps.onBack
21839
+ }, (backIcon || backArrow) && React$1.createElement("span", {
21788
21840
  className: `${classPrefix$y}-back-arrow`
21789
- }, backArrow === true ? React$1.createElement(LeftOutline, null) : backArrow), React$1.createElement("span", {
21841
+ }, backIcon === true || backArrow === true ? componentConfig.backIcon || React$1.createElement(LeftOutline, null) : backIcon || backArrow), React$1.createElement("span", {
21790
21842
  "aria-hidden": "true"
21791
- }, back)), props.left), React$1.createElement("div", {
21843
+ }, back)), mergedProps.left), React$1.createElement("div", {
21792
21844
  className: `${classPrefix$y}-title`
21793
- }, props.children), React$1.createElement("div", {
21845
+ }, mergedProps.children), React$1.createElement("div", {
21794
21846
  className: `${classPrefix$y}-right`
21795
- }, props.right)));
21847
+ }, mergedProps.right)));
21796
21848
  };
21797
21849
  const classPrefix$x = `adm-notice-bar`;
21798
21850
  const defaultProps$r = {
21799
21851
  color: "default",
21800
21852
  delay: 2e3,
21801
21853
  speed: 50,
21802
- wrap: false,
21803
- icon: React$1.createElement(SoundOutline, null)
21854
+ icon: React$1.createElement(SoundOutline, null),
21855
+ wrap: false
21804
21856
  };
21805
- const NoticeBar = React$1.memo((p) => {
21806
- const props = mergeProps(defaultProps$r, p);
21857
+ const NoticeBar = React$1.memo((props) => {
21858
+ const {
21859
+ noticeBar: componentConfig = {}
21860
+ } = useConfig();
21861
+ const mergedProps = mergeProps(defaultProps$r, componentConfig, props);
21862
+ const closeIcon = mergeProp(React$1.createElement(CloseOutline, {
21863
+ className: `${classPrefix$x}-close-icon`
21864
+ }), componentConfig.closeIcon, props.closeIcon);
21807
21865
  const containerRef = React$1.useRef(null);
21808
21866
  const textRef = React$1.useRef(null);
21809
21867
  const [visible, setVisible] = React$1.useState(true);
21810
- const speed = props.speed;
21868
+ const speed = mergedProps.speed;
21811
21869
  const delayLockRef = React$1.useRef(true);
21812
21870
  const animatingRef = React$1.useRef(false);
21813
21871
  function start2() {
21814
- if (delayLockRef.current || props.wrap)
21872
+ if (delayLockRef.current || mergedProps.wrap)
21815
21873
  return;
21816
21874
  const container = containerRef.current;
21817
21875
  const text = textRef.current;
@@ -21840,7 +21898,7 @@ Please add \`${key}Action\` when creating your handler.`);
21840
21898
  useTimeout$1(() => {
21841
21899
  delayLockRef.current = false;
21842
21900
  start2();
21843
- }, props.delay);
21901
+ }, mergedProps.delay);
21844
21902
  useResizeEffect(() => {
21845
21903
  start2();
21846
21904
  }, containerRef);
@@ -21853,14 +21911,14 @@ Please add \`${key}Action\` when creating your handler.`);
21853
21911
  });
21854
21912
  if (!visible)
21855
21913
  return null;
21856
- return withNativeProps(props, React$1.createElement("div", {
21857
- className: classNames(classPrefix$x, `${classPrefix$x}-${props.color}`, {
21858
- [`${classPrefix$x}-wrap`]: props.wrap
21914
+ return withNativeProps(mergedProps, React$1.createElement("div", {
21915
+ className: classNames(classPrefix$x, `${classPrefix$x}-${mergedProps.color}`, {
21916
+ [`${classPrefix$x}-wrap`]: mergedProps.wrap
21859
21917
  }),
21860
- onClick: props.onClick
21861
- }, props.icon && React$1.createElement("span", {
21918
+ onClick: mergedProps.onClick
21919
+ }, mergedProps.icon && React$1.createElement("span", {
21862
21920
  className: `${classPrefix$x}-left`
21863
- }, props.icon), React$1.createElement("span", {
21921
+ }, mergedProps.icon), React$1.createElement("span", {
21864
21922
  ref: containerRef,
21865
21923
  className: `${classPrefix$x}-content`
21866
21924
  }, React$1.createElement("span", {
@@ -21870,18 +21928,16 @@ Please add \`${key}Action\` when creating your handler.`);
21870
21928
  },
21871
21929
  ref: textRef,
21872
21930
  className: `${classPrefix$x}-content-inner`
21873
- }, props.content)), (props.closeable || props.extra) && React$1.createElement("span", {
21931
+ }, mergedProps.content)), (mergedProps.closeable || mergedProps.extra) && React$1.createElement("span", {
21874
21932
  className: `${classPrefix$x}-right`
21875
- }, props.extra, props.closeable && React$1.createElement("div", {
21933
+ }, mergedProps.extra, mergedProps.closeable && React$1.createElement("div", {
21876
21934
  className: `${classPrefix$x}-close`,
21877
21935
  onClick: () => {
21878
21936
  var _a;
21879
21937
  setVisible(false);
21880
- (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
21938
+ (_a = mergedProps.onClose) === null || _a === void 0 ? void 0 : _a.call(mergedProps);
21881
21939
  }
21882
- }, React$1.createElement(CloseOutline, {
21883
- className: `${classPrefix$x}-close-icon`
21884
- })))));
21940
+ }, closeIcon))));
21885
21941
  });
21886
21942
  function shuffle(array) {
21887
21943
  const result = [...array];
@@ -21940,13 +21996,13 @@ Please add \`${key}Action\` when creating your handler.`);
21940
21996
  var _a;
21941
21997
  (_a = props.onDelete) === null || _a === void 0 ? void 0 : _a.call(props);
21942
21998
  });
21943
- const onBackspacePressStart = () => {
21999
+ const startContinueClear = () => {
21944
22000
  timeoutRef.current = window.setTimeout(() => {
21945
22001
  onDelete();
21946
22002
  intervalRef.current = window.setInterval(onDelete, 150);
21947
22003
  }, 700);
21948
22004
  };
21949
- const onBackspacePressEnd = () => {
22005
+ const stopContinueClear = () => {
21950
22006
  clearTimeout(timeoutRef.current);
21951
22007
  clearInterval(intervalRef.current);
21952
22008
  };
@@ -22006,14 +22062,15 @@ Please add \`${key}Action\` when creating your handler.`);
22006
22062
  key,
22007
22063
  className,
22008
22064
  onTouchStart: () => {
22065
+ stopContinueClear();
22009
22066
  if (key === "BACKSPACE") {
22010
- onBackspacePressStart();
22067
+ startContinueClear();
22011
22068
  }
22012
22069
  },
22013
22070
  onTouchEnd: (e2) => {
22014
22071
  onKeyPress(e2, key);
22015
22072
  if (key === "BACKSPACE") {
22016
- onBackspacePressEnd();
22073
+ stopContinueClear();
22017
22074
  }
22018
22075
  }
22019
22076
  }, ariaProps), key === "BACKSPACE" ? React$1.createElement(TextDeletionOutline, null) : key);
@@ -22045,11 +22102,11 @@ Please add \`${key}Action\` when creating your handler.`);
22045
22102
  }, React$1.createElement("div", {
22046
22103
  className: `${classPrefix$w}-key ${classPrefix$w}-key-extra ${classPrefix$w}-key-bs`,
22047
22104
  onTouchStart: () => {
22048
- onBackspacePressStart();
22105
+ startContinueClear();
22049
22106
  },
22050
22107
  onTouchEnd: (e2) => {
22051
22108
  onKeyPress(e2, "BACKSPACE");
22052
- onBackspacePressEnd();
22109
+ stopContinueClear();
22053
22110
  },
22054
22111
  onContextMenu: (e2) => {
22055
22112
  e2.preventDefault();
@@ -22617,14 +22674,33 @@ Please add \`${key}Action\` when creating your handler.`);
22617
22674
  className: classNames(`${classPrefix$p}-box`)
22618
22675
  }, props.allowHalf && renderStar(i2 + 0.5, true), renderStar(i2 + 1, false)))));
22619
22676
  };
22620
- const classPrefix$o = `adm-result`;
22621
- const iconRecord$1 = {
22622
- success: CheckCircleFill,
22623
- error: CloseCircleFill,
22624
- info: InformationCircleFill,
22625
- waiting: ClockCircleFill,
22626
- warning: ExclamationCircleFill
22677
+ const useResultIcon = (status) => {
22678
+ const {
22679
+ result: componentConfig = {}
22680
+ } = useConfig();
22681
+ const {
22682
+ successIcon = React$1.createElement(CheckCircleFill, null),
22683
+ errorIcon = React$1.createElement(CloseCircleFill, null),
22684
+ infoIcon = React$1.createElement(InformationCircleFill, null),
22685
+ waitingIcon = React$1.createElement(ClockCircleFill, null),
22686
+ warningIcon = React$1.createElement(ExclamationCircleFill, null)
22687
+ } = componentConfig || {};
22688
+ switch (status) {
22689
+ case "success":
22690
+ return successIcon;
22691
+ case "error":
22692
+ return errorIcon;
22693
+ case "info":
22694
+ return infoIcon;
22695
+ case "waiting":
22696
+ return waitingIcon;
22697
+ case "warning":
22698
+ return warningIcon;
22699
+ default:
22700
+ return null;
22701
+ }
22627
22702
  };
22703
+ const classPrefix$o = `adm-result`;
22628
22704
  const defaultProps$i = {
22629
22705
  status: "info"
22630
22706
  };
@@ -22636,27 +22712,20 @@ Please add \`${key}Action\` when creating your handler.`);
22636
22712
  description,
22637
22713
  icon
22638
22714
  } = props;
22715
+ const fallbackIcon = useResultIcon(status);
22639
22716
  if (!status)
22640
22717
  return null;
22641
- const resultIcon = icon || React$1.createElement(iconRecord$1[status]);
22642
22718
  return withNativeProps(props, React$1.createElement("div", {
22643
22719
  className: classNames(classPrefix$o, `${classPrefix$o}-${status}`)
22644
22720
  }, React$1.createElement("div", {
22645
22721
  className: `${classPrefix$o}-icon`
22646
- }, resultIcon), React$1.createElement("div", {
22722
+ }, icon || fallbackIcon), React$1.createElement("div", {
22647
22723
  className: `${classPrefix$o}-title`
22648
22724
  }, title), !!description && React$1.createElement("div", {
22649
22725
  className: `${classPrefix$o}-description`
22650
22726
  }, description)));
22651
22727
  };
22652
22728
  const classPrefix$n = `adm-result-page`;
22653
- const iconRecord = {
22654
- success: CheckCircleFill,
22655
- error: CloseCircleFill,
22656
- info: InformationCircleFill,
22657
- waiting: ClockCircleFill,
22658
- warning: ExclamationCircleFill
22659
- };
22660
22729
  const defaultProps$h = {
22661
22730
  status: "info",
22662
22731
  details: []
@@ -22674,7 +22743,7 @@ Please add \`${key}Action\` when creating your handler.`);
22674
22743
  onPrimaryButtonClick,
22675
22744
  onSecondaryButtonClick
22676
22745
  } = props;
22677
- const resultIcon = icon || React$1.createElement(iconRecord[status]);
22746
+ const fallbackIcon = useResultIcon(status);
22678
22747
  const [collapse, setCollapse] = React$1.useState(true);
22679
22748
  const showSecondaryButton = isNodeWithContent(secondaryButtonText);
22680
22749
  const showPrimaryButton = isNodeWithContent(primaryButtonText);
@@ -22684,7 +22753,7 @@ Please add \`${key}Action\` when creating your handler.`);
22684
22753
  className: `${classPrefix$n}-header`
22685
22754
  }, React$1.createElement("div", {
22686
22755
  className: `${classPrefix$n}-icon`
22687
- }, resultIcon), React$1.createElement("div", {
22756
+ }, icon || fallbackIcon), React$1.createElement("div", {
22688
22757
  className: `${classPrefix$n}-title`
22689
22758
  }, title), isNodeWithContent(description) ? React$1.createElement("div", {
22690
22759
  className: `${classPrefix$n}-description`
@@ -22740,17 +22809,18 @@ Please add \`${key}Action\` when creating your handler.`);
22740
22809
  onlyShowClearWhenFocus: false,
22741
22810
  showCancelButton: false,
22742
22811
  defaultValue: "",
22743
- clearOnCancel: true,
22744
- icon: React$1.createElement(SearchOutline, null)
22812
+ clearOnCancel: true
22745
22813
  };
22746
- const SearchBar = React$1.forwardRef((p, ref) => {
22814
+ const SearchBar = React$1.forwardRef((props, ref) => {
22747
22815
  const {
22748
- locale
22816
+ locale,
22817
+ searchBar: componentConfig = {}
22749
22818
  } = useConfig();
22750
- const props = mergeProps(defaultProps$g, {
22819
+ const mergedProps = mergeProps(defaultProps$g, componentConfig, {
22751
22820
  cancelText: locale.common.cancel
22752
- }, p);
22753
- const [value, setValue2] = usePropsValue(props);
22821
+ }, props);
22822
+ const searchIcon = mergeProp(React$1.createElement(SearchOutline, null), componentConfig.searchIcon, props.icon, props.searchIcon);
22823
+ const [value, setValue2] = usePropsValue(mergedProps);
22754
22824
  const [hasFocus, setHasFocus] = React$1.useState(false);
22755
22825
  const inputRef = React$1.useRef(null);
22756
22826
  const composingRef = React$1.useRef(false);
@@ -22774,10 +22844,10 @@ Please add \`${key}Action\` when creating your handler.`);
22774
22844
  }));
22775
22845
  const renderCancelButton = () => {
22776
22846
  let isShowCancel;
22777
- if (typeof props.showCancelButton === "function") {
22778
- isShowCancel = props.showCancelButton(hasFocus, value);
22847
+ if (typeof mergedProps.showCancelButton === "function") {
22848
+ isShowCancel = mergedProps.showCancelButton(hasFocus, value);
22779
22849
  } else {
22780
- isShowCancel = props.showCancelButton && hasFocus;
22850
+ isShowCancel = mergedProps.showCancelButton && hasFocus;
22781
22851
  }
22782
22852
  return isShowCancel && React$1.createElement("div", {
22783
22853
  className: `${classPrefix$l}-suffix`
@@ -22786,66 +22856,66 @@ Please add \`${key}Action\` when creating your handler.`);
22786
22856
  className: `${classPrefix$l}-cancel-button`,
22787
22857
  onClick: () => {
22788
22858
  var _a, _b, _c;
22789
- if (props.clearOnCancel) {
22859
+ if (mergedProps.clearOnCancel) {
22790
22860
  (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.clear();
22791
22861
  }
22792
22862
  (_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.blur();
22793
- (_c = props.onCancel) === null || _c === void 0 ? void 0 : _c.call(props);
22863
+ (_c = mergedProps.onCancel) === null || _c === void 0 ? void 0 : _c.call(mergedProps);
22794
22864
  },
22795
22865
  onMouseDown: (e2) => {
22796
22866
  e2.preventDefault();
22797
22867
  }
22798
- }, props.cancelText));
22868
+ }, mergedProps.cancelText));
22799
22869
  };
22800
- return withNativeProps(props, React$1.createElement("div", {
22870
+ return withNativeProps(mergedProps, React$1.createElement("div", {
22801
22871
  className: classNames(classPrefix$l, {
22802
22872
  [`${classPrefix$l}-active`]: hasFocus
22803
22873
  })
22804
22874
  }, React$1.createElement("div", {
22805
22875
  className: `${classPrefix$l}-input-box`
22806
- }, props.icon && React$1.createElement("div", {
22876
+ }, searchIcon && React$1.createElement("div", {
22807
22877
  className: `${classPrefix$l}-input-box-icon`
22808
- }, props.icon), React$1.createElement(Input, {
22878
+ }, searchIcon), React$1.createElement(Input, {
22809
22879
  ref: inputRef,
22810
22880
  className: classNames(`${classPrefix$l}-input`, {
22811
- [`${classPrefix$l}-input-without-icon`]: !props.icon
22881
+ [`${classPrefix$l}-input-without-icon`]: !searchIcon
22812
22882
  }),
22813
22883
  value,
22814
22884
  onChange: setValue2,
22815
- maxLength: props.maxLength,
22816
- placeholder: props.placeholder,
22817
- clearable: props.clearable,
22818
- onlyShowClearWhenFocus: props.onlyShowClearWhenFocus,
22885
+ maxLength: mergedProps.maxLength,
22886
+ placeholder: mergedProps.placeholder,
22887
+ clearable: mergedProps.clearable,
22888
+ onlyShowClearWhenFocus: mergedProps.onlyShowClearWhenFocus,
22819
22889
  onFocus: (e2) => {
22820
22890
  var _a;
22821
22891
  setHasFocus(true);
22822
- (_a = props.onFocus) === null || _a === void 0 ? void 0 : _a.call(props, e2);
22892
+ (_a = mergedProps.onFocus) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
22823
22893
  },
22824
22894
  onBlur: (e2) => {
22825
22895
  var _a;
22826
22896
  setHasFocus(false);
22827
- (_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props, e2);
22897
+ (_a = mergedProps.onBlur) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
22828
22898
  },
22829
- onClear: props.onClear,
22899
+ onClear: mergedProps.onClear,
22830
22900
  type: "search",
22831
22901
  enterKeyHint: "search",
22832
22902
  onEnterPress: () => {
22833
22903
  var _a, _b;
22834
22904
  if (!composingRef.current) {
22835
22905
  (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.blur();
22836
- (_b = props.onSearch) === null || _b === void 0 ? void 0 : _b.call(props, value);
22906
+ (_b = mergedProps.onSearch) === null || _b === void 0 ? void 0 : _b.call(mergedProps, value);
22837
22907
  }
22838
22908
  },
22839
22909
  "aria-label": locale.SearchBar.name,
22840
22910
  onCompositionStart: (e2) => {
22841
22911
  var _a;
22842
22912
  composingRef.current = true;
22843
- (_a = props.onCompositionStart) === null || _a === void 0 ? void 0 : _a.call(props, e2);
22913
+ (_a = mergedProps.onCompositionStart) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
22844
22914
  },
22845
22915
  onCompositionEnd: (e2) => {
22846
22916
  var _a;
22847
22917
  composingRef.current = false;
22848
- (_a = props.onCompositionEnd) === null || _a === void 0 ? void 0 : _a.call(props, e2);
22918
+ (_a = mergedProps.onCompositionEnd) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
22849
22919
  }
22850
22920
  })), renderCancelButton()));
22851
22921
  });
@@ -25444,15 +25514,17 @@ Please add \`${key}Action\` when creating your handler.`);
25444
25514
  const defaultProps$2 = {
25445
25515
  defaultValue: ""
25446
25516
  };
25447
- const VirtualInput = React$1.forwardRef((p, ref) => {
25448
- const props = mergeProps(defaultProps$2, p);
25449
- const [value, setValue2] = usePropsValue(props);
25517
+ const VirtualInput = React$1.forwardRef((props, ref) => {
25518
+ const {
25519
+ locale,
25520
+ input: componentConfig = {}
25521
+ } = useConfig();
25522
+ const mergedProps = mergeProps(defaultProps$2, componentConfig, props);
25523
+ const [value, setValue2] = usePropsValue(mergedProps);
25450
25524
  const rootRef = React$1.useRef(null);
25451
25525
  const contentRef = React$1.useRef(null);
25452
25526
  const [hasFocus, setHasFocus] = React$1.useState(false);
25453
- const {
25454
- locale
25455
- } = useConfig();
25527
+ const clearIcon = mergeProp(React$1.createElement(CloseCircleFill, null), componentConfig.clearIcon, props.clearIcon);
25456
25528
  function scrollToEnd() {
25457
25529
  const root2 = rootRef.current;
25458
25530
  if (!root2)
@@ -25486,14 +25558,14 @@ Please add \`${key}Action\` when creating your handler.`);
25486
25558
  function onFocus() {
25487
25559
  var _a;
25488
25560
  setHasFocus(true);
25489
- (_a = props.onFocus) === null || _a === void 0 ? void 0 : _a.call(props);
25561
+ (_a = mergedProps.onFocus) === null || _a === void 0 ? void 0 : _a.call(mergedProps);
25490
25562
  }
25491
25563
  function onBlur() {
25492
25564
  var _a;
25493
25565
  setHasFocus(false);
25494
- (_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props);
25566
+ (_a = mergedProps.onBlur) === null || _a === void 0 ? void 0 : _a.call(mergedProps);
25495
25567
  }
25496
- const keyboard = props.keyboard;
25568
+ const keyboard = mergedProps.keyboard;
25497
25569
  const keyboardElement = keyboard && React$1.cloneElement(keyboard, {
25498
25570
  onInput: (v) => {
25499
25571
  var _a, _b;
@@ -25518,38 +25590,38 @@ Please add \`${key}Action\` when creating your handler.`);
25518
25590
  },
25519
25591
  getContainer: null
25520
25592
  });
25521
- return withNativeProps(props, React$1.createElement("div", {
25593
+ return withNativeProps(mergedProps, React$1.createElement("div", {
25522
25594
  ref: rootRef,
25523
25595
  className: classNames(classPrefix$2, {
25524
- [`${classPrefix$2}-disabled`]: props.disabled
25596
+ [`${classPrefix$2}-disabled`]: mergedProps.disabled
25525
25597
  }),
25526
- tabIndex: props.disabled ? void 0 : 0,
25598
+ tabIndex: mergedProps.disabled ? void 0 : 0,
25527
25599
  role: "textbox",
25528
25600
  onFocus,
25529
25601
  onBlur,
25530
- onClick: props.onClick
25602
+ onClick: mergedProps.onClick
25531
25603
  }, React$1.createElement("div", {
25532
25604
  className: `${classPrefix$2}-content`,
25533
25605
  ref: contentRef,
25534
- "aria-disabled": props.disabled,
25535
- "aria-label": props.placeholder
25606
+ "aria-disabled": mergedProps.disabled,
25607
+ "aria-label": mergedProps.placeholder
25536
25608
  }, value, React$1.createElement("div", {
25537
25609
  className: `${classPrefix$2}-caret-container`
25538
25610
  }, hasFocus && React$1.createElement("div", {
25539
25611
  className: `${classPrefix$2}-caret`
25540
- }))), props.clearable && !!value && hasFocus && React$1.createElement("div", {
25612
+ }))), mergedProps.clearable && !!value && hasFocus && React$1.createElement("div", {
25541
25613
  className: `${classPrefix$2}-clear`,
25542
25614
  onClick: (e2) => {
25543
25615
  var _a;
25544
25616
  e2.stopPropagation();
25545
25617
  setValue2("");
25546
- (_a = props.onClear) === null || _a === void 0 ? void 0 : _a.call(props);
25618
+ (_a = mergedProps.onClear) === null || _a === void 0 ? void 0 : _a.call(mergedProps);
25547
25619
  },
25548
25620
  role: "button",
25549
25621
  "aria-label": locale.Input.clear
25550
- }, React$1.createElement(CloseCircleFill, null)), [void 0, null, ""].includes(value) && React$1.createElement("div", {
25622
+ }, clearIcon), [void 0, null, ""].includes(value) && React$1.createElement("div", {
25551
25623
  className: `${classPrefix$2}-placeholder`
25552
- }, props.placeholder), keyboardElement));
25624
+ }, mergedProps.placeholder), keyboardElement));
25553
25625
  });
25554
25626
  const classPrefix$1 = `adm-water-mark`;
25555
25627
  const defaultProps$1 = {