@nutui/nutui-react 1.4.5 → 1.4.6

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 (39) hide show
  1. package/CHANGELOG.md +36 -9
  2. package/dist/esm/Address.js +7 -7
  3. package/dist/esm/Cascader.js +1 -1
  4. package/dist/esm/Form.js +1 -1
  5. package/dist/esm/FormItem.js +2 -2
  6. package/dist/esm/Icon.js +2 -2
  7. package/dist/esm/Image.js +76 -11
  8. package/dist/esm/NoticeBar.js +0 -2
  9. package/dist/esm/Notify.js +2 -2
  10. package/dist/esm/Picker.js +0 -1
  11. package/dist/esm/Popup.js +4 -4
  12. package/dist/esm/Progress.js +15 -7
  13. package/dist/esm/SearchBar.js +5 -4
  14. package/dist/esm/Sticky.js +7 -1
  15. package/dist/esm/{formitem-5a7034ff.js → formitem-9d18eb24.js} +4 -0
  16. package/dist/esm/{icon-8dc4de10.js → icon-2242973e.js} +15 -7
  17. package/dist/esm/types/src/packages/image/image.d.ts +3 -0
  18. package/dist/locales/base.js +1 -1
  19. package/dist/locales/en-US.js +1 -1
  20. package/dist/locales/id-ID.js +1 -1
  21. package/dist/locales/zh-CN.js +1 -1
  22. package/dist/locales/zh-TW.js +1 -1
  23. package/dist/locales/zh-UG.js +1 -1
  24. package/dist/nutui.react.es.js +158 -75
  25. package/dist/nutui.react.umd.js +158 -75
  26. package/dist/packages/calendar/calendar.scss +19 -1
  27. package/dist/packages/fixednav/fixednav.scss +1 -1
  28. package/dist/packages/image/image.scss +2 -0
  29. package/dist/packages/input/input.scss +3 -18
  30. package/dist/packages/notify/notify.scss +23 -19
  31. package/dist/packages/popup/popup.scss +130 -93
  32. package/dist/packages/searchbar/searchbar.scss +6 -20
  33. package/dist/packages/sticky/sticky.scss +3 -0
  34. package/dist/packages/tag/tag.scss +6 -1
  35. package/dist/style.css +1 -1
  36. package/dist/style.es.js +1 -1
  37. package/dist/styles/variables.scss +1 -3
  38. package/dist/types/index.d.ts +3 -0
  39. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.4.5 Wed Feb 01 2023 15:10:14 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v1.4.6 Wed Feb 08 2023 16:17:39 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -46,7 +46,7 @@ classname_production_min.cn = e, classname_production_min.withNaming = r;
46
46
  classname.exports = classname_production_min;
47
47
  }
48
48
  const cn = classname.exports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
49
- const defaultProps$1s = {
49
+ const defaultProps$1t = {
50
50
  name: "",
51
51
  size: "",
52
52
  classPrefix: "nut-icon",
@@ -58,7 +58,13 @@ const defaultProps$1s = {
58
58
  className: ""
59
59
  };
60
60
  function pxCheck$3(value) {
61
- return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
61
+ if (value === "") {
62
+ return value;
63
+ }
64
+ if (Number.isNaN(Number(value))) {
65
+ return String(value);
66
+ }
67
+ return `${value}px`;
62
68
  }
63
69
  function Icon$1(props) {
64
70
  const {
@@ -74,7 +80,7 @@ function Icon$1(props) {
74
80
  onClick,
75
81
  ...rest
76
82
  } = {
77
- ...defaultProps$1s,
83
+ ...defaultProps$1t,
78
84
  ...props
79
85
  };
80
86
  const isImage = name ? name.indexOf("/") !== -1 : false;
@@ -90,15 +96,18 @@ function Icon$1(props) {
90
96
  return { src: name };
91
97
  return {};
92
98
  };
99
+ const styles = {};
100
+ const checkedSize = pxCheck$3(size);
101
+ if (checkedSize) {
102
+ styles.width = styles.height = styles.fontSize = checkedSize;
103
+ }
93
104
  return React__default.createElement(
94
105
  type4,
95
106
  {
96
107
  className: isImage ? `${b("img")} ${className || ""} ` : `${fontClassName} ${b(null)} ${classPrefix}-${name} ${className || ""}`,
97
108
  style: {
98
109
  color,
99
- fontSize: pxCheck$3(size),
100
- width: pxCheck$3(size),
101
- height: pxCheck$3(size),
110
+ ...styles,
102
111
  ...style
103
112
  },
104
113
  ...rest,
@@ -108,13 +117,13 @@ function Icon$1(props) {
108
117
  children
109
118
  );
110
119
  }
111
- Icon$1.defaultProps = defaultProps$1s;
120
+ Icon$1.defaultProps = defaultProps$1t;
112
121
  Icon$1.displayName = "NutIcon";
113
122
  const ComponentDefaults = {
114
123
  iconClassPrefix: "nut-icon",
115
124
  iconFontClassName: "nutui-iconfont"
116
125
  };
117
- const defaultProps$1r = {
126
+ const defaultProps$1s = {
118
127
  ...ComponentDefaults,
119
128
  className: "",
120
129
  color: "",
@@ -150,7 +159,7 @@ const Button = (props) => {
150
159
  iconFontClassName,
151
160
  ...rest
152
161
  } = {
153
- ...defaultProps$1r,
162
+ ...defaultProps$1s,
154
163
  ...props
155
164
  };
156
165
  const getStyle = useCallback(() => {
@@ -228,9 +237,9 @@ const Button = (props) => {
228
237
  className: icon || loading ? "text" : ""
229
238
  }, children)));
230
239
  };
231
- Button.defaultProps = defaultProps$1r;
240
+ Button.defaultProps = defaultProps$1s;
232
241
  Button.displayName = "NutButton";
233
- const defaultProps$1q = {
242
+ const defaultProps$1r = {
234
243
  ...ComponentDefaults,
235
244
  title: null,
236
245
  subTitle: null,
@@ -272,7 +281,7 @@ const Cell = (props) => {
272
281
  iconFontClassName,
273
282
  ...rest
274
283
  } = {
275
- ...defaultProps$1q,
284
+ ...defaultProps$1r,
276
285
  ...props
277
286
  };
278
287
  const b = cn("cell");
@@ -322,9 +331,9 @@ const Cell = (props) => {
322
331
  className: b("link")
323
332
  }) : linkSlot));
324
333
  };
325
- Cell.defaultProps = defaultProps$1q;
334
+ Cell.defaultProps = defaultProps$1r;
326
335
  Cell.displayName = "NutCell";
327
- const defaultProps$1p = {
336
+ const defaultProps$1q = {
328
337
  title: "",
329
338
  desc: "",
330
339
  className: "",
@@ -333,7 +342,7 @@ const defaultProps$1p = {
333
342
  };
334
343
  const CellGroup = (props) => {
335
344
  const { children, className, title, desc, titleSlot, descSlot } = {
336
- ...defaultProps$1p,
345
+ ...defaultProps$1q,
337
346
  ...props
338
347
  };
339
348
  const b = cn("cell-group");
@@ -347,7 +356,7 @@ const CellGroup = (props) => {
347
356
  className: b("wrap")
348
357
  }, children));
349
358
  };
350
- CellGroup.defaultProps = defaultProps$1p;
359
+ CellGroup.defaultProps = defaultProps$1q;
351
360
  CellGroup.displayName = "NutCellGroup";
352
361
  var INFINITY = 1 / 0;
353
362
  var symbolTag = "[object Symbol]";
@@ -759,7 +768,7 @@ const zhCN = {
759
768
  errorCanvasTips: "\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301Canvas"
760
769
  }
761
770
  };
762
- const defaultProps$1o = {
771
+ const defaultProps$1p = {
763
772
  locale: zhCN
764
773
  };
765
774
  const defaultConfigRef = {
@@ -783,7 +792,7 @@ function convertThemeVarsToCSSVars(themeVars) {
783
792
  return cssVars;
784
793
  }
785
794
  const ConfigProvider = (props) => {
786
- const { children, ...config2 } = { ...defaultProps$1o, ...props };
795
+ const { children, ...config2 } = { ...defaultProps$1p, ...props };
787
796
  const parentConfig = useConfig();
788
797
  const theme = config2.theme || {};
789
798
  const style = useMemo(
@@ -799,9 +808,9 @@ const ConfigProvider = (props) => {
799
808
  style
800
809
  }, children));
801
810
  };
802
- ConfigProvider.defaultProps = defaultProps$1o;
811
+ ConfigProvider.defaultProps = defaultProps$1p;
803
812
  ConfigProvider.displayName = "NutConfigProvider";
804
- const defaultProps$1n = {
813
+ const defaultProps$1o = {
805
814
  fit: "fill",
806
815
  position: "center",
807
816
  alt: "",
@@ -809,7 +818,8 @@ const defaultProps$1n = {
809
818
  height: "",
810
819
  round: false,
811
820
  showError: true,
812
- showLoading: true
821
+ showLoading: true,
822
+ isLazy: false
813
823
  };
814
824
  const Image$1 = (props) => {
815
825
  useConfig();
@@ -829,14 +839,19 @@ const Image$1 = (props) => {
829
839
  showLoading,
830
840
  slotError,
831
841
  slotLoding,
842
+ isLazy,
843
+ loadingImg,
844
+ errorImg,
832
845
  onClick,
833
846
  onLoad,
834
847
  onError
835
- } = { ...defaultProps$1n, ...props };
848
+ } = { ...defaultProps$1o, ...props };
836
849
  const [loading, setLoading] = useState(true);
837
850
  const [isError, setIsError] = useState(false);
851
+ const [_src, setSrc] = useState("");
838
852
  useEffect(() => {
839
853
  if (src) {
854
+ setSrc(src);
840
855
  setIsError(false);
841
856
  setLoading(true);
842
857
  }
@@ -864,6 +879,46 @@ const Image$1 = (props) => {
864
879
  objectPosition: position,
865
880
  ...style
866
881
  };
882
+ const observer = useRef(null);
883
+ const initObserver = () => {
884
+ const imgs = document.querySelectorAll(".nut-img.lazyload");
885
+ const options2 = {
886
+ threshold: [0],
887
+ rootMargin: "0px"
888
+ };
889
+ observer.current = new IntersectionObserver((entires, self2) => {
890
+ entires.forEach((item) => {
891
+ if (item.isIntersecting) {
892
+ setTimeout(() => {
893
+ const img = item.target;
894
+ if (img.dataset.src) {
895
+ img.src = img.dataset.src;
896
+ img.removeAttribute("data-src");
897
+ }
898
+ observer.current.unobserve(item.target);
899
+ }, 300);
900
+ }
901
+ });
902
+ }, options2);
903
+ imgs.forEach((item) => {
904
+ observer.current.observe(item);
905
+ });
906
+ };
907
+ const resetObserver = () => {
908
+ observer.current.disconnect && observer.current.disconnect();
909
+ };
910
+ useEffect(() => {
911
+ isLazy && initObserver();
912
+ return () => {
913
+ isLazy && resetObserver();
914
+ };
915
+ }, [isLazy]);
916
+ const loadingBg = {
917
+ backgroundImage: loadingImg ? `url('${loadingImg}')` : ""
918
+ };
919
+ const errorBg = {
920
+ backgroundImage: errorImg ? `url('${errorImg}')` : ""
921
+ };
867
922
  const imageClick = (event) => {
868
923
  onClick && onClick(event);
869
924
  };
@@ -873,24 +928,34 @@ const Image$1 = (props) => {
873
928
  onClick: (e2) => {
874
929
  imageClick(e2);
875
930
  }
876
- }, /* @__PURE__ */ React__default.createElement("img", {
931
+ }, isLazy ? /* @__PURE__ */ React__default.createElement("img", {
932
+ className: "nut-img lazyload",
933
+ style: styles,
934
+ "data-src": _src,
935
+ alt,
936
+ loading: "lazy",
937
+ onLoad: load,
938
+ onError: error
939
+ }) : /* @__PURE__ */ React__default.createElement("img", {
877
940
  className: "nut-img",
878
941
  style: styles,
879
- src,
942
+ src: _src,
880
943
  alt,
881
944
  onLoad: load,
882
945
  onError: error
883
- }), showLoading && loading ? /* @__PURE__ */ React__default.createElement("div", {
884
- className: "nut-img-loading"
885
- }, slotLoding || children || /* @__PURE__ */ React__default.createElement(Icon$1, {
946
+ }), loading && showLoading ? /* @__PURE__ */ React__default.createElement("div", {
947
+ className: "nut-img-loading",
948
+ style: loadingBg
949
+ }, !loadingImg && (slotLoding || children || /* @__PURE__ */ React__default.createElement(Icon$1, {
886
950
  name: "image"
887
- })) : null, showError && isError && !loading ? /* @__PURE__ */ React__default.createElement("div", {
888
- className: "nut-img-error"
889
- }, slotError || children || /* @__PURE__ */ React__default.createElement(Icon$1, {
951
+ }))) : null, isError && showError && !loading ? /* @__PURE__ */ React__default.createElement("div", {
952
+ className: "nut-img-error",
953
+ style: errorBg
954
+ }, !errorImg && (slotError || children || /* @__PURE__ */ React__default.createElement(Icon$1, {
890
955
  name: "image-error"
891
- })) : null);
956
+ }))) : null);
892
957
  };
893
- Image$1.defaultProps = defaultProps$1n;
958
+ Image$1.defaultProps = defaultProps$1o;
894
959
  Image$1.displayName = "NutImage";
895
960
  var classnames = { exports: {} };
896
961
  /*!
@@ -1483,7 +1548,7 @@ CSSTransition.defaultProps = {
1483
1548
  };
1484
1549
  CSSTransition.propTypes = {};
1485
1550
  var CSSTransition$1 = CSSTransition;
1486
- const defaultProps$1m = {
1551
+ const defaultProps$1n = {
1487
1552
  ...ComponentDefaults,
1488
1553
  position: "center",
1489
1554
  transition: "",
@@ -1565,15 +1630,15 @@ const Popup = (props) => {
1565
1630
  const classes = classNames(
1566
1631
  {
1567
1632
  round,
1568
- [`popup-${position}`]: true,
1633
+ [`nut-popup-${position}`]: true,
1569
1634
  [`${popClass}`]: true,
1570
1635
  [`${className}`]: true
1571
1636
  },
1572
1637
  b("")
1573
1638
  );
1574
1639
  const closeClasses = classNames({
1575
- "nutui-popup__close-icon": true,
1576
- [`nutui-popup__close-icon--${closeIconPosition}`]: true
1640
+ "nut-popup__close-icon": true,
1641
+ [`nut-popup__close-icon--${closeIconPosition}`]: true
1577
1642
  });
1578
1643
  const open = () => {
1579
1644
  if (!innerVisible) {
@@ -1665,14 +1730,14 @@ const Popup = (props) => {
1665
1730
  !visible && close();
1666
1731
  }, [visible]);
1667
1732
  useEffect(() => {
1668
- setTransitionName(transition || `popup-slide-${position}`);
1733
+ setTransitionName(transition || `nut-popup-slide-${position}`);
1669
1734
  }, [position]);
1670
1735
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderToContainer(teleport, renderNode()));
1671
1736
  };
1672
- Popup.defaultProps = defaultProps$1m;
1737
+ Popup.defaultProps = defaultProps$1n;
1673
1738
  Popup.displayName = "NutPopup";
1674
1739
  const DataContext$2 = createContext({});
1675
- const defaultProps$1l = {
1740
+ const defaultProps$1m = {
1676
1741
  span: "24",
1677
1742
  offset: "0",
1678
1743
  gutter: "0"
@@ -1685,7 +1750,7 @@ const Col = (props) => {
1685
1750
  offset,
1686
1751
  children,
1687
1752
  onClick
1688
- } = { ...defaultProps$1l, ...props };
1753
+ } = { ...defaultProps$1m, ...props };
1689
1754
  const [colName, setColName] = useState("");
1690
1755
  const [colStyle, setColStyle] = useState({});
1691
1756
  const { gutter } = useContext(DataContext$2);
@@ -1711,9 +1776,9 @@ const Col = (props) => {
1711
1776
  }
1712
1777
  }, children);
1713
1778
  };
1714
- Col.defaultProps = defaultProps$1l;
1779
+ Col.defaultProps = defaultProps$1m;
1715
1780
  Col.displayName = "NutCol";
1716
- const defaultProps$1k = {
1781
+ const defaultProps$1l = {
1717
1782
  contentPosition: "center",
1718
1783
  dashed: false,
1719
1784
  hairline: true,
@@ -1730,7 +1795,7 @@ const Divider = (props) => {
1730
1795
  direction,
1731
1796
  ...rest
1732
1797
  } = {
1733
- ...defaultProps$1k,
1798
+ ...defaultProps$1l,
1734
1799
  ...props
1735
1800
  };
1736
1801
  const dividerBem = cn("divider");
@@ -1751,14 +1816,14 @@ const Divider = (props) => {
1751
1816
  ...rest
1752
1817
  }, children);
1753
1818
  };
1754
- Divider.defaultProps = defaultProps$1k;
1819
+ Divider.defaultProps = defaultProps$1l;
1755
1820
  Divider.displayName = "NutDivider";
1756
1821
  const gridContext = {
1757
1822
  onClick: (item, index) => {
1758
1823
  }
1759
1824
  };
1760
1825
  var GridContext = React__default.createContext(gridContext);
1761
- const defaultProps$1j = {
1826
+ const defaultProps$1k = {
1762
1827
  columnNum: 4,
1763
1828
  border: true,
1764
1829
  gutter: 0,
@@ -1786,7 +1851,7 @@ const Grid = (props) => {
1786
1851
  className,
1787
1852
  onClick,
1788
1853
  ...rest
1789
- } = { ...defaultProps$1j, ...props };
1854
+ } = { ...defaultProps$1k, ...props };
1790
1855
  const childrenDom = React__default.Children.toArray(children);
1791
1856
  const pxCheck2 = (value) => {
1792
1857
  return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
@@ -1827,9 +1892,9 @@ const Grid = (props) => {
1827
1892
  });
1828
1893
  })));
1829
1894
  };
1830
- Grid.defaultProps = defaultProps$1j;
1895
+ Grid.defaultProps = defaultProps$1k;
1831
1896
  Grid.displayName = "NutGrid";
1832
- const defaultProps$1i = {
1897
+ const defaultProps$1j = {
1833
1898
  ...ComponentDefaults,
1834
1899
  text: "",
1835
1900
  fontSize: "",
@@ -1872,7 +1937,7 @@ const GridItem = (props) => {
1872
1937
  onClick,
1873
1938
  ...rest
1874
1939
  } = {
1875
- ...defaultProps$1i,
1940
+ ...defaultProps$1j,
1876
1941
  ...props
1877
1942
  };
1878
1943
  const b = cn("grid-item");
@@ -1943,18 +2008,18 @@ const GridItem = (props) => {
1943
2008
  style: { fontSize, color }
1944
2009
  }, text), children && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children)));
1945
2010
  };
1946
- GridItem.defaultProps = defaultProps$1i;
2011
+ GridItem.defaultProps = defaultProps$1j;
1947
2012
  GridItem.displayName = "NutGridItem";
1948
- const defaultProps$1h = {};
2013
+ const defaultProps$1i = {};
1949
2014
  const Layout = (props) => {
1950
- ({ ...defaultProps$1h, ...props });
2015
+ ({ ...defaultProps$1i, ...props });
1951
2016
  return /* @__PURE__ */ React__default.createElement("div", {
1952
2017
  className: "nut-layout"
1953
2018
  }, "Layout");
1954
2019
  };
1955
- Layout.defaultProps = defaultProps$1h;
2020
+ Layout.defaultProps = defaultProps$1i;
1956
2021
  Layout.displayName = "NutLayout";
1957
- const defaultProps$1g = {
2022
+ const defaultProps$1h = {
1958
2023
  type: "",
1959
2024
  justify: "start",
1960
2025
  align: "flex-start",
@@ -1973,7 +2038,7 @@ const Row = (props) => {
1973
2038
  gutter,
1974
2039
  onClick
1975
2040
  } = {
1976
- ...defaultProps$1g,
2041
+ ...defaultProps$1h,
1977
2042
  ...props
1978
2043
  };
1979
2044
  const prefixCls = "nut-row";
@@ -2008,7 +2073,7 @@ const Row = (props) => {
2008
2073
  children
2009
2074
  ));
2010
2075
  };
2011
- Row.defaultProps = defaultProps$1g;
2076
+ Row.defaultProps = defaultProps$1h;
2012
2077
  Row.displayName = "NutRow";
2013
2078
  const canUseDom = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
2014
2079
  const defaultRoot = canUseDom ? window : void 0;
@@ -2083,6 +2148,12 @@ function useWatch(dep, callback, config2 = { immediate: false }) {
2083
2148
  stop2.current = true;
2084
2149
  };
2085
2150
  }
2151
+ const defaultProps$1g = {
2152
+ position: "top",
2153
+ top: 0,
2154
+ bottom: 0,
2155
+ zIndex: 2e3
2156
+ };
2086
2157
  const Sticky = (props) => {
2087
2158
  const {
2088
2159
  position = "top",
@@ -2221,6 +2292,7 @@ const Sticky = (props) => {
2221
2292
  style: stickyStyle
2222
2293
  }, children));
2223
2294
  };
2295
+ Sticky.defaultProps = defaultProps$1g;
2224
2296
  Sticky.displayName = "NutSticky";
2225
2297
  function clamp$1(v, min, max) {
2226
2298
  return Math.max(min, Math.min(v, max));
@@ -10467,7 +10539,6 @@ const InternalPicker = (props, ref) => {
10467
10539
  }
10468
10540
  }, [defaultValueData]);
10469
10541
  useEffect(() => {
10470
- console.log("\u4FEE\u6539");
10471
10542
  onChange && onChange(columnIndex, chooseValueData, selectedOptions());
10472
10543
  if (isConfirmEvent.current) {
10473
10544
  isConfirmEvent.current = false;
@@ -12122,6 +12193,10 @@ class FormItem extends React__default.Component {
12122
12193
  return {
12123
12194
  value: getFieldValue(name),
12124
12195
  onChange: (event) => {
12196
+ const originOnChange = children.props.onChange;
12197
+ if (originOnChange) {
12198
+ originOnChange(event);
12199
+ }
12125
12200
  let newValue = event;
12126
12201
  switch (type4) {
12127
12202
  case "checkbox":
@@ -13989,7 +14064,7 @@ const SearchBar = (props) => {
13989
14064
  return /* @__PURE__ */ React__default.createElement("input", {
13990
14065
  className: `${searchbarBem("input")} ${searchbarBem(alignClass)} ${shape === "round" ? searchbarBem("round") : ""} ${clearable ? searchbarBem("input-clear") : ""}`,
13991
14066
  ref: searchRef,
13992
- style: { ...props.style, background: props.inputBackground },
14067
+ style: { ...props.style },
13993
14068
  value: value || "",
13994
14069
  placeholder: placeholder || locale.placeholder,
13995
14070
  disabled,
@@ -14103,7 +14178,8 @@ const SearchBar = (props) => {
14103
14178
  className: `${searchbarBem()} ${disabled ? searchbarBem("disabled") : ""} ${className || ""}`,
14104
14179
  style: { ...props.style, background: props.background }
14105
14180
  }, renderLeftoutIcon(), renderLabel(), /* @__PURE__ */ React__default.createElement("div", {
14106
- className: `${searchbarBem("content")}`
14181
+ className: `${searchbarBem("content")}`,
14182
+ style: { background: props.inputBackground }
14107
14183
  }, renderLeftinIcon(), renderField(), renderRightinIcon(), clearable && value && handleClear()), renderRightoutIcon(), renderRightLabel());
14108
14184
  };
14109
14185
  SearchBar.defaultProps = defaultProps$O;
@@ -14417,7 +14493,13 @@ const defaultProps$L = {
14417
14493
  className: ""
14418
14494
  };
14419
14495
  function pxCheck(value) {
14420
- return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
14496
+ if (value === "") {
14497
+ return value;
14498
+ }
14499
+ if (Number.isNaN(Number(value))) {
14500
+ return String(value);
14501
+ }
14502
+ return `${value}px`;
14421
14503
  }
14422
14504
  function Icon(props) {
14423
14505
  const {
@@ -14449,15 +14531,18 @@ function Icon(props) {
14449
14531
  return { src: name };
14450
14532
  return {};
14451
14533
  };
14534
+ const styles = {};
14535
+ const checkedSize = pxCheck(size);
14536
+ if (checkedSize) {
14537
+ styles.width = styles.height = styles.fontSize = checkedSize;
14538
+ }
14452
14539
  return React__default.createElement(
14453
14540
  type4,
14454
14541
  {
14455
14542
  className: isImage ? `${b("img")} ${className || ""} ` : `${fontClassName} ${b(null)} ${classPrefix}-${name} ${className || ""}`,
14456
14543
  style: {
14457
14544
  color,
14458
- fontSize: pxCheck(size),
14459
- width: pxCheck(size),
14460
- height: pxCheck(size),
14545
+ ...styles,
14461
14546
  ...style
14462
14547
  },
14463
14548
  ...rest,
@@ -15924,8 +16009,8 @@ class Notification extends React.PureComponent {
15924
16009
  this.state;
15925
16010
  cn("notify");
15926
16011
  const classes = classNames({
15927
- "popup-top": position === "top",
15928
- "popup-bottom": position === "bottom",
16012
+ "nut-notify--popup-top": position === "top",
16013
+ "nut-notify--popup-bottom": position === "bottom",
15929
16014
  "nut-notify": true,
15930
16015
  [`nut-notify--${type4}`]: true
15931
16016
  });
@@ -18720,8 +18805,6 @@ const NoticeBar = (props) => {
18720
18805
  }
18721
18806
  return () => {
18722
18807
  clearInterval(timer);
18723
- startRoll();
18724
- startRollEasy();
18725
18808
  };
18726
18809
  }, []);
18727
18810
  useEffect(() => {
@@ -20260,7 +20343,7 @@ const defaultProps$8 = {
20260
20343
  defaultIcon: "location2",
20261
20344
  selectedIcon: "Check",
20262
20345
  isShowCustomAddress: true,
20263
- customAndExistTitle: "\u9009\u62E9\u5176\u4ED6\u5730\u5740"
20346
+ customAndExistTitle: ""
20264
20347
  };
20265
20348
  const ExistRender = (props) => {
20266
20349
  const { locale } = useConfig();
@@ -20335,7 +20418,7 @@ const ExistRender = (props) => {
20335
20418
  onClick: switchModule
20336
20419
  }, /* @__PURE__ */ React__default.createElement("div", {
20337
20420
  className: b("choose-other-btn")
20338
- }, locale.address.chooseAnotherAddress || customAndExistTitle)));
20421
+ }, customAndExistTitle || locale.address.chooseAnotherAddress)));
20339
20422
  };
20340
20423
  const defaultProps$7 = {
20341
20424
  modelValue: [],
@@ -20618,15 +20701,15 @@ const defaultProps$6 = {
20618
20701
  modelValue: false,
20619
20702
  modelSelect: [],
20620
20703
  type: "custom",
20621
- customAddressTitle: "\u8BF7\u9009\u62E9\u6240\u5728\u5730\u533A",
20704
+ customAddressTitle: "",
20622
20705
  province: [],
20623
20706
  city: [],
20624
20707
  country: [],
20625
20708
  town: [],
20626
20709
  isShowCustomAddress: true,
20627
20710
  existAddress: [],
20628
- existAddressTitle: "\u914D\u9001\u81F3",
20629
- customAndExistTitle: "\u9009\u62E9\u5176\u4ED6\u5730\u5740",
20711
+ existAddressTitle: "",
20712
+ customAndExistTitle: "",
20630
20713
  height: "200px",
20631
20714
  defaultIcon: "location2",
20632
20715
  selectedIcon: "Check",
@@ -20767,7 +20850,7 @@ const Address = (props) => {
20767
20850
  color: "#cccccc"
20768
20851
  })), /* @__PURE__ */ React__default.createElement("div", {
20769
20852
  className: b("header__title")
20770
- }, privateType === "custom" ? locale.address.selectRegion || customAddressTitle : locale.address.deliveryTo || existAddressTitle), /* @__PURE__ */ React__default.createElement("div", {
20853
+ }, privateType === "custom" ? customAddressTitle || locale.address.selectRegion : existAddressTitle || locale.address.deliveryTo), /* @__PURE__ */ React__default.createElement("div", {
20771
20854
  onClick: () => handClose()
20772
20855
  }, closeBtnIcon && /* @__PURE__ */ React__default.createElement(Icon$1, {
20773
20856
  classPrefix: iconClassPrefix,
@@ -20817,7 +20900,7 @@ const Address = (props) => {
20817
20900
  selectedIcon,
20818
20901
  defaultIcon,
20819
20902
  isShowCustomAddress,
20820
- customAndExistTitle: locale.address.chooseAnotherAddress || customAndExistTitle,
20903
+ customAndExistTitle: customAndExistTitle || locale.address.chooseAnotherAddress,
20821
20904
  onSelected: selectedExist,
20822
20905
  onSwitchModule
20823
20906
  }))));