@nutui/nutui-react-taro 1.3.9 → 1.3.10

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 (85) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/esm/Address.js +4 -2
  3. package/dist/esm/Audio.js +3 -3
  4. package/dist/esm/Button.js +2 -2
  5. package/dist/esm/Card.js +4 -4
  6. package/dist/esm/Checkbox.js +2 -3
  7. package/dist/esm/CheckboxGroup.js +4 -2
  8. package/dist/esm/Dialog.js +3 -3
  9. package/dist/esm/Elevator.js +2 -2
  10. package/dist/esm/Input.js +2 -2
  11. package/dist/esm/Menu.js +2 -2
  12. package/dist/esm/MenuItem.js +2 -2
  13. package/dist/esm/NoticeBar.js +2 -2
  14. package/dist/esm/Price.js +2 -2
  15. package/dist/esm/Radio.js +1 -3
  16. package/dist/esm/RadioGroup.js +4 -2
  17. package/dist/esm/Signature.js +3 -3
  18. package/dist/esm/TabbarItem.js +2 -2
  19. package/dist/esm/Tag.js +2 -2
  20. package/dist/esm/Uploader.js +3 -3
  21. package/dist/esm/{address.taro-f16cef31.js → address.taro-8d642b4a.js} +11 -1
  22. package/dist/esm/{audio.taro-c2f9948a.js → audio.taro-b42a082b.js} +1 -1
  23. package/dist/esm/{button.taro-a9ebb937.js → button.taro-7e924b72.js} +3 -1
  24. package/dist/esm/{card.taro-1bc35ebe.js → card.taro-59f65b66.js} +2 -2
  25. package/dist/esm/checkbox.taro-d8656076.js +249 -0
  26. package/dist/esm/{dialog.taro-492e2b9a.js → dialog.taro-0c35b35f.js} +1 -1
  27. package/dist/esm/{elevator.taro-ead49158.js → elevator.taro-d7d65470.js} +1 -1
  28. package/dist/esm/index.taro-c092d216.js +227 -0
  29. package/dist/esm/{input.taro-39b99dbc.js → input.taro-cc46bbc3.js} +11 -4
  30. package/dist/esm/{menu.taro-f8ca86db.js → menu.taro-4abed328.js} +3 -2
  31. package/dist/esm/{menuitem.taro-7bf564c9.js → menuitem.taro-06a135a5.js} +1 -2
  32. package/dist/esm/{noticebar.taro-77b5a2c9.js → noticebar.taro-4915fed3.js} +12 -16
  33. package/dist/esm/nutui-react.es.js +17 -19
  34. package/dist/esm/{price.taro-97393d8f.js → price.taro-8801462e.js} +28 -22
  35. package/dist/esm/{signature.taro-0b3abea5.js → signature.taro-57f8de06.js} +1 -1
  36. package/dist/esm/{tabbaritem.taro-94cd62c2.js → tabbaritem.taro-fb90f659.js} +6 -5
  37. package/dist/esm/{tag.taro-95d7f5c2.js → tag.taro-84d40117.js} +6 -4
  38. package/dist/esm/types/src/packages/checkbox/checkbox.d.ts +6 -1
  39. package/dist/esm/types/src/packages/checkbox/checkbox.taro.d.ts +6 -1
  40. package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.d.ts +2 -0
  41. package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.taro.d.ts +2 -0
  42. package/dist/esm/types/src/packages/checkboxgroup/type.d.ts +6 -0
  43. package/dist/esm/types/src/packages/input/input.d.ts +1 -0
  44. package/dist/esm/types/src/packages/input/input.taro.d.ts +1 -0
  45. package/dist/esm/types/src/packages/nutui.react.taro.scss.d.ts +91 -0
  46. package/dist/esm/types/src/packages/price/price.d.ts +2 -0
  47. package/dist/esm/types/src/packages/price/price.taro.d.ts +2 -0
  48. package/dist/esm/types/src/packages/radiogroup/radiogroup.d.ts +2 -0
  49. package/dist/esm/types/src/packages/radiogroup/radiogroup.taro.d.ts +2 -0
  50. package/dist/esm/types/src/packages/radiogroup/type.d.ts +7 -0
  51. package/dist/esm/types/src/packages/tabbaritem/tabbaritem.d.ts +1 -1
  52. package/dist/esm/types/src/packages/tabbaritem/tabbaritem.taro.d.ts +1 -1
  53. package/dist/esm/{uploader.taro-63a36a30.js → uploader.taro-a03bb003.js} +1 -1
  54. package/dist/locales/base.js +1 -1
  55. package/dist/locales/en-US.js +1 -1
  56. package/dist/locales/id-ID.js +1 -1
  57. package/dist/locales/zh-CN.js +1 -1
  58. package/dist/locales/zh-TW.js +1 -1
  59. package/dist/nutui.react.es.js +170 -78
  60. package/dist/nutui.react.umd.js +169 -77
  61. package/dist/packages/badge/badge.scss +10 -10
  62. package/dist/packages/button/button.scss +3 -3
  63. package/dist/packages/cell/cell.scss +1 -4
  64. package/dist/packages/cellgroup/cellgroup.scss +8 -0
  65. package/dist/packages/countdown/countdown.scss +1 -1
  66. package/dist/packages/infiniteloading/infiniteloading.scss +1 -1
  67. package/dist/packages/inputnumber/inputnumber.scss +3 -3
  68. package/dist/packages/noticebar/noticebar.scss +3 -0
  69. package/dist/packages/price/price.scss +27 -11
  70. package/dist/packages/radio/radio.scss +8 -7
  71. package/dist/packages/shortpassword/shortpassword.scss +4 -4
  72. package/dist/packages/skeleton/skeleton.scss +1 -1
  73. package/dist/packages/swiper/swiper.scss +4 -4
  74. package/dist/packages/switch/switch.scss +8 -8
  75. package/dist/packages/timepannel/timepannel.scss +3 -3
  76. package/dist/packages/timeselect/timeselect.scss +4 -4
  77. package/dist/style.css +1 -1
  78. package/dist/style.es.js +1 -1
  79. package/dist/styles/variables.scss +573 -248
  80. package/dist/types/index.d.ts +19 -3
  81. package/package.json +1 -1
  82. package/dist/esm/checkbox.taro-104557c1.js +0 -121
  83. package/dist/esm/checkboxgroup.taro-3d380042.js +0 -110
  84. package/dist/esm/radio.taro-95d43860.js +0 -112
  85. package/dist/esm/radiogroup.taro-b5dad516.js +0 -95
@@ -1,10 +1,10 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.3.9-beta.0 Wed Nov 02 2022 15:21:20 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.3.10 Wed Nov 09 2022 13:51:43 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import * as React from "react";
7
- import React__default, { useCallback, useState, useEffect, useRef, createContext as createContext$1, useContext as useContext$1, useImperativeHandle, useLayoutEffect, forwardRef, useMemo, memo, Component } from "react";
7
+ import React__default, { useCallback, useState, useEffect, useRef, createContext as createContext$1, useContext as useContext$1, useImperativeHandle, forwardRef, useLayoutEffect, useMemo, memo, Component } from "react";
8
8
  import Taro, { usePageScroll, eventCenter, getCurrentInstance, nextTick, useReady, createSelectorQuery } from "@tarojs/taro";
9
9
  import ReactDOM, { createPortal, unstable_batchedUpdates } from "react-dom";
10
10
  function getAugmentedNamespace(n2) {
@@ -239,7 +239,9 @@ const Button = (props) => {
239
239
  classPrefix: iconClassPrefix,
240
240
  fontClassName: iconFontClassName,
241
241
  name: icon
242
- }) : "", children));
242
+ }) : "", /* @__PURE__ */ React__default.createElement("div", {
243
+ className: "text"
244
+ }, children)));
243
245
  };
244
246
  Button.defaultProps = defaultProps$1n;
245
247
  Button.displayName = "NutButton";
@@ -3062,7 +3064,7 @@ const defaultProps$18 = {
3062
3064
  ...ComponentDefaults,
3063
3065
  dot: false,
3064
3066
  size: "",
3065
- classPrefix: "nutui-iconfont",
3067
+ className: "",
3066
3068
  tabTitle: "",
3067
3069
  icon: "",
3068
3070
  href: "",
@@ -3079,7 +3081,8 @@ const TabbarItem = (props) => {
3079
3081
  const {
3080
3082
  dot,
3081
3083
  size,
3082
- classPrefix,
3084
+ className,
3085
+ style,
3083
3086
  tabTitle,
3084
3087
  icon,
3085
3088
  href,
@@ -3109,8 +3112,9 @@ const TabbarItem = (props) => {
3109
3112
  }
3110
3113
  }, [active, history, href, to2]);
3111
3114
  return /* @__PURE__ */ React__default.createElement("div", {
3112
- className: `${b2({ active })}`,
3115
+ className: `${b2({ active })} ${className}`,
3113
3116
  style: {
3117
+ ...style,
3114
3118
  color: active ? activeColor : unactiveColor
3115
3119
  },
3116
3120
  onClick: () => {
@@ -3210,7 +3214,8 @@ const Elevator = (props) => {
3210
3214
  const query = Taro.createSelectorQuery();
3211
3215
  query.selectAll(`.${className} .elevator__item__${i}`).boundingClientRect();
3212
3216
  query.exec((res) => {
3213
- height2 += res[0][0].height;
3217
+ if (res[0][0])
3218
+ height2 += res[0][0].height;
3214
3219
  state.current.listHeight.push(height2);
3215
3220
  });
3216
3221
  }
@@ -3969,7 +3974,7 @@ const Menu = (props) => {
3969
3974
  }, React__default.Children.toArray(children).map((child, index) => {
3970
3975
  if (!child)
3971
3976
  return null;
3972
- const { disabled, title, value, direction, options } = child.props;
3977
+ const { disabled, title, value, direction, options, className: className2 } = child.props;
3973
3978
  const currentTitle = options == null ? void 0 : options.filter(
3974
3979
  (option) => option.value === value
3975
3980
  );
@@ -3986,7 +3991,7 @@ const Menu = (props) => {
3986
3991
  className: `nut-menu__item ${classNames({
3987
3992
  active: itemShow[index],
3988
3993
  disabled
3989
- })}`,
3994
+ })} ${className2}`,
3990
3995
  style: { color: itemShow[index] ? activeColor : "" },
3991
3996
  key: index,
3992
3997
  onClick: () => {
@@ -4027,7 +4032,6 @@ const MenuItem = (props) => {
4027
4032
  useConfig$1();
4028
4033
  const mergedProps = { ...defaultProps$$, ...props };
4029
4034
  const {
4030
- className,
4031
4035
  style,
4032
4036
  options,
4033
4037
  value,
@@ -4111,7 +4115,7 @@ const MenuItem = (props) => {
4111
4115
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", {
4112
4116
  className: `placeholder-element ${classNames({
4113
4117
  up: direction === "up"
4114
- })} ${className}`,
4118
+ })}`,
4115
4119
  style: placeholderStyle(),
4116
4120
  onClick: () => parent.toggleItemShow(orderKey)
4117
4121
  }), /* @__PURE__ */ React__default.createElement(Overlay, {
@@ -5444,13 +5448,22 @@ const defaultProps$V = {
5444
5448
  checkedValue: [],
5445
5449
  max: void 0,
5446
5450
  onChange: (value) => {
5447
- }
5451
+ },
5452
+ options: []
5448
5453
  };
5449
5454
  const CheckboxGroup = React__default.forwardRef(
5450
5455
  (props, ref) => {
5451
5456
  const { children } = { ...defaultProps$V, ...props };
5452
5457
  const b2 = cn("checkboxgroup");
5453
- const { className, disabled, onChange, checkedValue, max, ...rest } = props;
5458
+ const {
5459
+ className,
5460
+ disabled,
5461
+ onChange,
5462
+ checkedValue,
5463
+ max,
5464
+ options,
5465
+ ...rest
5466
+ } = props;
5454
5467
  const [innerDisabled, setInnerDisabled] = useState(disabled);
5455
5468
  const [innerValue, setInnerValue] = useState(checkedValue);
5456
5469
  useImperativeHandle(ref, () => ({
@@ -5461,7 +5474,6 @@ const CheckboxGroup = React__default.forwardRef(
5461
5474
  const childrenLabel = [];
5462
5475
  React__default.Children.map(children, (child) => {
5463
5476
  const childProps = child.props;
5464
- console.log(child);
5465
5477
  childrenLabel.push(childProps.label || child.children);
5466
5478
  });
5467
5479
  setInnerValue(childrenLabel);
@@ -5503,6 +5515,11 @@ const CheckboxGroup = React__default.forwardRef(
5503
5515
  return false;
5504
5516
  return (innerValue == null ? void 0 : innerValue.indexOf(child.props.label || child.children)) > -1;
5505
5517
  }
5518
+ function validateChecked(value) {
5519
+ if (innerValue === null)
5520
+ return false;
5521
+ return innerValue === value;
5522
+ }
5506
5523
  function getParentVals() {
5507
5524
  return innerValue;
5508
5525
  }
@@ -5521,10 +5538,26 @@ const CheckboxGroup = React__default.forwardRef(
5521
5538
  });
5522
5539
  });
5523
5540
  }
5541
+ const renderOptionsChildren = useCallback(() => {
5542
+ return options == null ? void 0 : options.map(({ label, value, disabled: disabled2, onChange: onChange2, ...rest2 }) => {
5543
+ const childChecked = validateChecked(value);
5544
+ return /* @__PURE__ */ React__default.createElement(Checkbox, {
5545
+ key: value == null ? void 0 : value.toString(),
5546
+ children: label,
5547
+ label: value,
5548
+ disabled: innerDisabled ? true : disabled2,
5549
+ onChange: handleChildChange,
5550
+ ...rest2,
5551
+ max,
5552
+ getParentVals,
5553
+ checked: childChecked
5554
+ });
5555
+ });
5556
+ }, [innerValue]);
5524
5557
  return /* @__PURE__ */ React__default.createElement("div", {
5525
5558
  className: `${b2()} ${className || ""}`,
5526
5559
  ...rest
5527
- }, cloneChildren());
5560
+ }, (options == null ? void 0 : options.length) ? renderOptionsChildren() : cloneChildren());
5528
5561
  }
5529
5562
  );
5530
5563
  CheckboxGroup.defaultProps = defaultProps$V;
@@ -6584,6 +6617,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
6584
6617
  const defaultProps$R = {
6585
6618
  ...ComponentDefaults,
6586
6619
  type: "text",
6620
+ name: "",
6587
6621
  defaultValue: "",
6588
6622
  placeholder: "",
6589
6623
  label: "",
@@ -6616,11 +6650,12 @@ const defaultProps$R = {
6616
6650
  slotButton: null,
6617
6651
  slotInput: null
6618
6652
  };
6619
- const Input = (props) => {
6653
+ const Input = forwardRef((props, ref) => {
6620
6654
  const { locale } = useConfig$1();
6621
6655
  const {
6622
6656
  children,
6623
6657
  type,
6658
+ name,
6624
6659
  defaultValue,
6625
6660
  placeholder,
6626
6661
  label,
@@ -6700,6 +6735,9 @@ const Input = (props) => {
6700
6735
  resetValidation();
6701
6736
  }
6702
6737
  }, [inputValue]);
6738
+ useImperativeHandle(ref, () => {
6739
+ return inputRef.current;
6740
+ });
6703
6741
  const inputClass = useCallback(() => {
6704
6742
  const prefixCls = "nut-input";
6705
6743
  return [
@@ -6831,6 +6869,7 @@ const Input = (props) => {
6831
6869
  handleClickInput(e2);
6832
6870
  }
6833
6871
  }, type === "textarea" ? /* @__PURE__ */ React__default.createElement("textarea", {
6872
+ name,
6834
6873
  className: "input-text",
6835
6874
  ref: inputRef,
6836
6875
  style: {
@@ -6853,6 +6892,7 @@ const Input = (props) => {
6853
6892
  handleInput(e2);
6854
6893
  }
6855
6894
  }) : /* @__PURE__ */ React__default.createElement("input", {
6895
+ name,
6856
6896
  className: "input-text",
6857
6897
  ref: inputRef,
6858
6898
  style: { textAlign: inputAlign },
@@ -6903,7 +6943,7 @@ const Input = (props) => {
6903
6943
  textAlign: errorMessageAlign
6904
6944
  }
6905
6945
  }, errorMessage) : null)));
6906
- };
6946
+ });
6907
6947
  Input.defaultProps = defaultProps$R;
6908
6948
  Input.displayName = "NutInput";
6909
6949
  const radioContext = {
@@ -6916,13 +6956,22 @@ const defaultProps$Q = {
6916
6956
  textPosition: "right",
6917
6957
  onChange: (value) => {
6918
6958
  },
6919
- direction: "vertical"
6959
+ direction: "vertical",
6960
+ options: []
6920
6961
  };
6921
6962
  const RadioGroup = React__default.forwardRef(
6922
6963
  (props, ref) => {
6923
6964
  const { children } = { ...defaultProps$Q, ...props };
6924
6965
  cn("RadioGroup");
6925
- const { className, value, onChange, textPosition, direction, ...rest } = props;
6966
+ const {
6967
+ className,
6968
+ value,
6969
+ onChange,
6970
+ textPosition,
6971
+ direction,
6972
+ options,
6973
+ ...rest
6974
+ } = props;
6926
6975
  const [val2State, setVal2State] = useState(value);
6927
6976
  useEffect(() => {
6928
6977
  setVal2State(value);
@@ -6932,6 +6981,11 @@ const RadioGroup = React__default.forwardRef(
6932
6981
  return false;
6933
6982
  return val2State === child.props.value;
6934
6983
  }
6984
+ function validateChecked(value2) {
6985
+ if (val2State === null)
6986
+ return false;
6987
+ return val2State === value2;
6988
+ }
6935
6989
  function cloneChildren() {
6936
6990
  return React__default.Children.map(children, (child, index) => {
6937
6991
  const childChecked = validateChildChecked(child);
@@ -6944,6 +6998,21 @@ const RadioGroup = React__default.forwardRef(
6944
6998
  });
6945
6999
  });
6946
7000
  }
7001
+ const renderOptionsChildren = useCallback(() => {
7002
+ return options == null ? void 0 : options.map(({ label, value: value2, disabled, onChange: onChange2, ...rest2 }) => {
7003
+ const childChecked = validateChecked(value2);
7004
+ return /* @__PURE__ */ React__default.createElement(Radio, {
7005
+ key: value2 == null ? void 0 : value2.toString(),
7006
+ children: label,
7007
+ value: value2,
7008
+ disabled,
7009
+ onChange: onChange2,
7010
+ ...rest2,
7011
+ textPosition,
7012
+ checked: childChecked
7013
+ });
7014
+ });
7015
+ }, [val2State]);
6947
7016
  return /* @__PURE__ */ React__default.createElement(RadioContext.Provider, {
6948
7017
  value: {
6949
7018
  onChange: (val) => {
@@ -6952,9 +7021,9 @@ const RadioGroup = React__default.forwardRef(
6952
7021
  }
6953
7022
  }
6954
7023
  }, /* @__PURE__ */ React__default.createElement("div", {
6955
- className: `nut-radiogroup nut-radiogroup--${props.direction}`,
7024
+ className: `nut-radiogroup nut-radiogroup--${props.direction} ${className || ""}`,
6956
7025
  ...rest
6957
- }, cloneChildren()));
7026
+ }, (options == null ? void 0 : options.length) ? renderOptionsChildren() : cloneChildren()));
6958
7027
  }
6959
7028
  );
6960
7029
  RadioGroup.defaultProps = defaultProps$Q;
@@ -6972,7 +7041,7 @@ const defaultProps$P = {
6972
7041
  onChange: (e2) => {
6973
7042
  }
6974
7043
  };
6975
- const Radio = (props) => {
7044
+ const Radio$1 = (props) => {
6976
7045
  const { children } = {
6977
7046
  ...defaultProps$P,
6978
7047
  ...props
@@ -7054,9 +7123,10 @@ const Radio = (props) => {
7054
7123
  ...rest
7055
7124
  }, renderRadioItem());
7056
7125
  };
7057
- Radio.defaultProps = defaultProps$P;
7058
- Radio.displayName = "NutRadio";
7059
- Radio.RadioGroup = RadioGroup;
7126
+ Radio$1.defaultProps = defaultProps$P;
7127
+ Radio$1.displayName = "NutRadio";
7128
+ Radio$1.RadioGroup = RadioGroup;
7129
+ var Radio = Radio$1;
7060
7130
  const defaultProps$O = {
7061
7131
  ...ComponentDefaults,
7062
7132
  count: 5,
@@ -10810,6 +10880,9 @@ _objectSpread2(_objectSpread2({}, commonConfigResolver), {}, {
10810
10880
  if (value === void 0)
10811
10881
  return "ctrlKey";
10812
10882
  return value;
10883
+ },
10884
+ pinchOnWheel(value = true) {
10885
+ return value;
10813
10886
  }
10814
10887
  });
10815
10888
  _objectSpread2(_objectSpread2({}, coordinatesConfigResolver), {}, {
@@ -11053,10 +11126,16 @@ class Controller$1 {
11053
11126
  }
11054
11127
  const nativeBindFunction = bindToProps(props, sharedConfig.eventOptions, !!target);
11055
11128
  for (const eventKey in this.nativeHandlers) {
11056
- nativeBindFunction(eventKey, "", (event) => this.nativeHandlers[eventKey](_objectSpread2(_objectSpread2({}, this.state.shared), {}, {
11057
- event,
11058
- args
11059
- })), void 0, true);
11129
+ nativeBindFunction(
11130
+ eventKey,
11131
+ "",
11132
+ (event) => this.nativeHandlers[eventKey](_objectSpread2(_objectSpread2({}, this.state.shared), {}, {
11133
+ event,
11134
+ args
11135
+ })),
11136
+ void 0,
11137
+ true
11138
+ );
11060
11139
  }
11061
11140
  }
11062
11141
  for (const handlerProp in props) {
@@ -14829,13 +14908,11 @@ const NoticeBar = (props) => {
14829
14908
  }
14830
14909
  }, n2 * speed);
14831
14910
  };
14832
- const go = (item) => {
14833
- click && click(item);
14834
- onClick && onClick(item);
14835
- };
14836
- const handleClickIcon = () => {
14837
- close && close(scrollList[0]);
14838
- onClose && onClose(scrollList[0]);
14911
+ const handleClickIcon = (event) => {
14912
+ event.stopPropagation();
14913
+ SetShowNoticeBar(!closeMode);
14914
+ close && close(event);
14915
+ onClose && onClose(event);
14839
14916
  };
14840
14917
  const iconShow = () => {
14841
14918
  if (leftIcon === "close") {
@@ -14911,9 +14988,10 @@ const NoticeBar = (props) => {
14911
14988
  fontClassName: iconFontClassName,
14912
14989
  name: rightIcon || "close",
14913
14990
  color
14914
- })) : null) : null, scrollList.current.length > 0 && direction === "vertical" ? /* @__PURE__ */ React__default.createElement("div", {
14991
+ })) : null) : null, showNoticeBar && scrollList.current.length > 0 && direction === "vertical" ? /* @__PURE__ */ React__default.createElement("div", {
14915
14992
  className: "nut-noticebar-vertical",
14916
- style: barStyle
14993
+ style: barStyle,
14994
+ onClick: handleClick2
14917
14995
  }, children ? /* @__PURE__ */ React__default.createElement("div", {
14918
14996
  className: "horseLamp_list",
14919
14997
  style: horseLampStyle
@@ -14926,20 +15004,17 @@ const NoticeBar = (props) => {
14926
15004
  return /* @__PURE__ */ React__default.createElement("li", {
14927
15005
  className: "horseLamp_list_item",
14928
15006
  style: { height },
14929
- key: index,
14930
- onClick: () => {
14931
- go(item);
14932
- }
15007
+ key: index
14933
15008
  }, item);
14934
15009
  })), /* @__PURE__ */ React__default.createElement("div", {
14935
15010
  className: "go",
14936
- onClick: () => {
14937
- handleClickIcon();
15011
+ onClick: (e2) => {
15012
+ handleClickIcon(e2);
14938
15013
  }
14939
15014
  }, rightIcon || (closeMode ? /* @__PURE__ */ React__default.createElement(Icon$1, {
14940
15015
  classPrefix: iconClassPrefix,
14941
15016
  fontClassName: iconFontClassName,
14942
- name: "cross",
15017
+ name: rightIcon || "close",
14943
15018
  color,
14944
15019
  size: "11px"
14945
15020
  }) : null))) : null);
@@ -15701,6 +15776,8 @@ const defaultProps$o = {
15701
15776
  symbol: "¥",
15702
15777
  decimalDigits: 2,
15703
15778
  thousands: false,
15779
+ position: "before",
15780
+ size: "large",
15704
15781
  className: ""
15705
15782
  };
15706
15783
  const Price = (props) => {
@@ -15710,6 +15787,8 @@ const Price = (props) => {
15710
15787
  symbol,
15711
15788
  decimalDigits,
15712
15789
  thousands,
15790
+ position,
15791
+ size,
15713
15792
  className,
15714
15793
  ...rest
15715
15794
  } = {
@@ -15717,18 +15796,17 @@ const Price = (props) => {
15717
15796
  ...props
15718
15797
  };
15719
15798
  const b2 = cn("price");
15720
- const replaceSpecialChar = (symbol2) => {
15721
- let desSymbol = symbol2;
15722
- desSymbol = symbol2.replace(/"/g, '"');
15723
- desSymbol = symbol2.replace(/&/g, "&");
15724
- desSymbol = symbol2.replace(/&lt;/g, "<");
15725
- desSymbol = symbol2.replace(/&gt;/g, ">");
15726
- desSymbol = symbol2.replace(/&nbsp;/g, " ");
15727
- desSymbol = symbol2.replace(/&yen;/g, "\uFFE5");
15728
- return desSymbol;
15799
+ const replaceSpecialChar = (url) => {
15800
+ url = url.replace(/&quot;/g, '"');
15801
+ url = url.replace(/&amp;/g, "&");
15802
+ url = url.replace(/&lt;/g, "<");
15803
+ url = url.replace(/&gt;/g, ">");
15804
+ url = url.replace(/&nbsp;/g, " ");
15805
+ url = url.replace(/&yen;/g, "\uFFE5");
15806
+ return url;
15729
15807
  };
15730
15808
  const showSymbol = () => {
15731
- return { __html: (needSymbol ? replaceSpecialChar(symbol) : "") || "" };
15809
+ return { __html: needSymbol ? replaceSpecialChar(symbol) : "" };
15732
15810
  };
15733
15811
  const checkPoint = (price2) => {
15734
15812
  return String(price2).indexOf(".") > 0;
@@ -15754,7 +15832,7 @@ const Price = (props) => {
15754
15832
  }
15755
15833
  if (checkPoint(decimalNum)) {
15756
15834
  decimalNum = Number(decimalNum).toFixed(decimalDigits);
15757
- decimalNum = typeof decimalNum.split(".") === "string" ? 0 : decimalNum.split(".")[1];
15835
+ decimalNum = typeof decimalNum.split(".") === "string" ? 0 : decimalNum.split(".")[1] || 0;
15758
15836
  } else {
15759
15837
  decimalNum = 0;
15760
15838
  }
@@ -15762,19 +15840,22 @@ const Price = (props) => {
15762
15840
  const resultFixed = Number(result).toFixed(decimalDigits);
15763
15841
  return String(resultFixed).substring(2, resultFixed.length);
15764
15842
  };
15843
+ const renderSymbol = () => {
15844
+ return /* @__PURE__ */ React__default.createElement("div", {
15845
+ className: `${b2("symbol")} ${b2(`symbol-${size}`)}`,
15846
+ dangerouslySetInnerHTML: showSymbol()
15847
+ });
15848
+ };
15765
15849
  return /* @__PURE__ */ React__default.createElement("div", {
15766
15850
  className: `${b2()} ${className}`,
15767
15851
  ...rest
15768
- }, needSymbol ? /* @__PURE__ */ React__default.createElement("div", {
15769
- className: `${b2("symbol")}`,
15770
- dangerouslySetInnerHTML: showSymbol()
15771
- }) : null, /* @__PURE__ */ React__default.createElement("div", {
15772
- className: `${b2("big")}`
15773
- }, formatThousands(price)), /* @__PURE__ */ React__default.createElement("div", {
15774
- className: `${b2("point")}`
15775
- }, "."), /* @__PURE__ */ React__default.createElement("div", {
15776
- className: `${b2("small")}`
15777
- }, formatDecimal(price)));
15852
+ }, needSymbol && position === "before" ? renderSymbol() : null, /* @__PURE__ */ React__default.createElement("div", {
15853
+ className: `${b2("integer")} ${b2(`integer-${size}`)}`
15854
+ }, formatThousands(price)), decimalDigits !== 0 ? /* @__PURE__ */ React__default.createElement("div", {
15855
+ className: `${b2("decimal")} ${b2(`decimal-${size}`)}`
15856
+ }, ".") : null, /* @__PURE__ */ React__default.createElement("div", {
15857
+ className: `${b2("decimal")} ${b2(`decimal-${size}`)}`
15858
+ }, formatDecimal(price)), needSymbol && position === "after" ? renderSymbol() : null);
15778
15859
  };
15779
15860
  Price.defaultProps = defaultProps$o;
15780
15861
  Price.displayName = "NutPrice";
@@ -15857,6 +15938,8 @@ const defaultProps$m = {
15857
15938
  };
15858
15939
  const Tag = (props) => {
15859
15940
  const {
15941
+ className,
15942
+ style,
15860
15943
  color,
15861
15944
  plain,
15862
15945
  type,
@@ -15905,23 +15988,23 @@ const Tag = (props) => {
15905
15988
  }
15906
15989
  };
15907
15990
  const getStyle = () => {
15908
- const style = {};
15991
+ const style2 = {};
15909
15992
  if (textColor) {
15910
- style.color = textColor;
15993
+ style2.color = textColor;
15911
15994
  if (plain) {
15912
- style.background = "#fff";
15995
+ style2.background = "#fff";
15913
15996
  } else if (color) {
15914
- style.background = color;
15997
+ style2.background = color;
15915
15998
  }
15916
15999
  } else if (color) {
15917
- style.color = "#fff";
15918
- style.background = color;
16000
+ style2.color = "#fff";
16001
+ style2.background = color;
15919
16002
  }
15920
- return style;
16003
+ return style2;
15921
16004
  };
15922
16005
  return /* @__PURE__ */ React__default.createElement("div", null, closeable ? isTagShow && /* @__PURE__ */ React__default.createElement("div", {
15923
- className: `${btnName}`,
15924
- style: getStyle(),
16006
+ className: `${btnName} ${className}`,
16007
+ style: { ...style, ...getStyle() },
15925
16008
  onClick: (e2) => handleClick2(e2)
15926
16009
  }, children && /* @__PURE__ */ React__default.createElement("span", {
15927
16010
  className: "text"
@@ -15938,8 +16021,8 @@ const Tag = (props) => {
15938
16021
  }
15939
16022
  }
15940
16023
  })) : /* @__PURE__ */ React__default.createElement("div", {
15941
- className: `${btnName}`,
15942
- style: getStyle(),
16024
+ className: `${btnName} ${className}`,
16025
+ style: { ...style, ...getStyle() },
15943
16026
  onClick: (e2) => handleClick2(e2)
15944
16027
  }, children && /* @__PURE__ */ React__default.createElement("span", {
15945
16028
  className: "text"
@@ -17956,6 +18039,9 @@ const CustomRender = (props) => {
17956
18039
  lineAnimation(tagIndex);
17957
18040
  }
17958
18041
  };
18042
+ const handleElevatorItem = (key, item) => {
18043
+ nextAreaList(item);
18044
+ };
17959
18045
  useEffect(() => {
17960
18046
  const { province: province2 } = { ...defaultProps$7, ...props };
17961
18047
  setRegionList({
@@ -18030,7 +18116,13 @@ const CustomRender = (props) => {
18030
18116
  size: "13px"
18031
18117
  }), item.name));
18032
18118
  }
18033
- ))));
18119
+ ))), privateType === "custom2" && /* @__PURE__ */ React__default.createElement("div", {
18120
+ className: b2("elevator-group")
18121
+ }, /* @__PURE__ */ React__default.createElement(Elevator, {
18122
+ height,
18123
+ indexList: regionList[tabName[tabIndex]],
18124
+ onClickItem: handleElevatorItem
18125
+ })));
18034
18126
  };
18035
18127
  const defaultProps$6 = {
18036
18128
  ...ComponentDefaults,