@nutui/nutui-react 2.3.10 → 2.3.11

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 (129) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/esm/ActionSheet/style/style.css +1 -1
  3. package/dist/esm/ActionSheet.js +3 -3
  4. package/dist/esm/Address/style/style.css +1 -1
  5. package/dist/esm/Animate/style/style.css +1 -1
  6. package/dist/esm/Audio/style/style.css +1 -1
  7. package/dist/esm/BackTop.js +1 -1
  8. package/dist/esm/Badge/style/style.css +1 -1
  9. package/dist/esm/Barrage/style/style.css +1 -1
  10. package/dist/esm/Calendar/style/style.css +1 -1
  11. package/dist/esm/Card/style/style.css +1 -1
  12. package/dist/esm/Cascader/style/style.css +1 -1
  13. package/dist/esm/Checkbox/style/style.css +1 -1
  14. package/dist/esm/CheckboxGroup/style/style.css +1 -1
  15. package/dist/esm/Col/style/style.css +1 -1
  16. package/dist/esm/Collapse/style/style.css +1 -1
  17. package/dist/esm/CollapseItem/style/style.css +1 -1
  18. package/dist/esm/DatePicker/style/style.css +1 -1
  19. package/dist/esm/Dialog/style/style.css +1 -1
  20. package/dist/esm/Divider/style/style.css +1 -1
  21. package/dist/esm/Form/style/style.css +1 -1
  22. package/dist/esm/FormItem/style/style.css +1 -1
  23. package/dist/esm/Grid/style/style.css +1 -1
  24. package/dist/esm/GridItem/style/style.css +1 -1
  25. package/dist/esm/ImagePreview/style/style.css +1 -1
  26. package/dist/esm/Indicator/style/style.css +1 -1
  27. package/dist/esm/Input.js +4 -1
  28. package/dist/esm/InputNumber.js +107 -161
  29. package/dist/esm/Menu/style/style.css +1 -1
  30. package/dist/esm/MenuItem/style/style.css +1 -1
  31. package/dist/esm/NavBar/style/style.css +1 -1
  32. package/dist/esm/NoticeBar/style/style.css +1 -1
  33. package/dist/esm/NumberKeyboard/style/style.css +1 -1
  34. package/dist/esm/Picker/style/style.css +1 -1
  35. package/dist/esm/Popover/style/style.css +1 -1
  36. package/dist/esm/Popup/style/style.css +1 -1
  37. package/dist/esm/Price/style/style.css +1 -1
  38. package/dist/esm/Radio/style/style.css +1 -1
  39. package/dist/esm/RadioGroup/style/style.css +1 -1
  40. package/dist/esm/Range/style/style.css +1 -1
  41. package/dist/esm/SearchBar/style/style.css +1 -1
  42. package/dist/esm/ShortPassword/style/style.css +1 -1
  43. package/dist/esm/ShortPassword.js +1 -4
  44. package/dist/esm/SideNavBar/style/style.css +1 -1
  45. package/dist/esm/Skeleton/style/style.css +1 -1
  46. package/dist/esm/Skeleton.js +2 -4
  47. package/dist/esm/Step/style/style.css +1 -1
  48. package/dist/esm/Steps/style/style.css +1 -1
  49. package/dist/esm/Swipe/style/style.css +1 -1
  50. package/dist/esm/Swiper/style/style.css +1 -1
  51. package/dist/esm/Switch/style/style.css +1 -1
  52. package/dist/esm/Tabbar/style/style.css +1 -1
  53. package/dist/esm/TabbarItem/style/style.css +1 -1
  54. package/dist/esm/Table/style/style.css +1 -1
  55. package/dist/esm/Tabs/style/style.css +1 -1
  56. package/dist/esm/TextArea/style/style.css +1 -1
  57. package/dist/esm/TimeSelect/style/style.css +1 -1
  58. package/dist/esm/Tour/style/style.css +1 -1
  59. package/dist/esm/VirtualList/style/style.css +1 -1
  60. package/dist/esm/types/src/packages/inputnumber/inputnumber.d.ts +15 -15
  61. package/dist/esm/types/src/packages/inputnumber/inputnumber.taro.d.ts +15 -17
  62. package/dist/locales/base.js +1 -1
  63. package/dist/locales/en-US.js +1 -1
  64. package/dist/locales/id-ID.js +1 -1
  65. package/dist/locales/tr-TR.js +1 -1
  66. package/dist/locales/zh-CN.js +1 -1
  67. package/dist/locales/zh-TW.js +1 -1
  68. package/dist/locales/zh-UG.js +1 -1
  69. package/dist/nutui.react.es.js +135 -185
  70. package/dist/nutui.react.umd.js +135 -185
  71. package/dist/packages/animate/animate.scss +0 -27
  72. package/dist/packages/audio/audio.scss +0 -5
  73. package/dist/packages/avatarcropper/avatarcropper.scss +0 -2
  74. package/dist/packages/badge/badge.scss +7 -0
  75. package/dist/packages/barrage/barrage.scss +22 -3
  76. package/dist/packages/button/button.scss +0 -1
  77. package/dist/packages/calendar/calendar.scss +4 -4
  78. package/dist/packages/calendarcard/calendarcard.scss +0 -1
  79. package/dist/packages/cascader/cascader.scss +0 -1
  80. package/dist/packages/checkbox/checkbox.scss +0 -2
  81. package/dist/packages/checkboxgroup/checkboxgroup.scss +1 -3
  82. package/dist/packages/col/col.scss +2 -2
  83. package/dist/packages/collapseitem/collapseitem.scss +2 -3
  84. package/dist/packages/dialog/dialog.scss +4 -0
  85. package/dist/packages/divider/divider.scss +1 -1
  86. package/dist/packages/fixednav/fixednav.scss +0 -2
  87. package/dist/packages/form/form.scss +24 -26
  88. package/dist/packages/formitem/formitem.scss +0 -1
  89. package/dist/packages/grid/grid.scss +1 -1
  90. package/dist/packages/griditem/griditem.scss +28 -26
  91. package/dist/packages/imagepreview/imagepreview.scss +0 -1
  92. package/dist/packages/indicator/indicator.scss +2 -3
  93. package/dist/packages/menu/menu.scss +0 -7
  94. package/dist/packages/menuitem/menuitem.scss +14 -10
  95. package/dist/packages/navbar/navbar.scss +3 -5
  96. package/dist/packages/noticebar/noticebar.scss +20 -0
  97. package/dist/packages/numberkeyboard/numberkeyboard.scss +25 -18
  98. package/dist/packages/pagination/pagination.scss +0 -2
  99. package/dist/packages/picker/picker.scss +9 -0
  100. package/dist/packages/popover/popover.scss +0 -4
  101. package/dist/packages/popup/popup.scss +3 -19
  102. package/dist/packages/price/price.scss +1 -0
  103. package/dist/packages/radio/radio.scss +0 -1
  104. package/dist/packages/radiogroup/radiogroup.scss +10 -1
  105. package/dist/packages/range/range.scss +127 -127
  106. package/dist/packages/rate/rate.scss +0 -1
  107. package/dist/packages/searchbar/searchbar.scss +3 -2
  108. package/dist/packages/shortpassword/shortpassword.scss +4 -0
  109. package/dist/packages/skeleton/skeleton.scss +13 -3
  110. package/dist/packages/space/space.scss +0 -1
  111. package/dist/packages/step/step.scss +21 -25
  112. package/dist/packages/swipe/swipe.scss +0 -15
  113. package/dist/packages/swiper/swiper.scss +0 -1
  114. package/dist/packages/switch/switch.scss +11 -0
  115. package/dist/packages/table/table.scss +4 -5
  116. package/dist/packages/tabs/tabs.scss +2 -4
  117. package/dist/packages/tag/tag.scss +0 -1
  118. package/dist/packages/textarea/textarea.scss +1 -6
  119. package/dist/packages/timeselect/timeselect.scss +1 -6
  120. package/dist/packages/tour/tour.scss +1 -5
  121. package/dist/packages/trendarrow/trendarrow.scss +0 -1
  122. package/dist/packages/uploader/uploader.scss +0 -1
  123. package/dist/packages/virtuallist/virtuallist.scss +12 -12
  124. package/dist/style.css +1 -1
  125. package/dist/style.mjs +1 -1
  126. package/dist/styles/variables.scss +11 -7
  127. package/dist/types/packages/inputnumber/inputnumber.d.ts +28 -28
  128. package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +15 -17
  129. package/package.json +5 -5
package/dist/style.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.3.10 Tue Feb 06 2024 16:13:11 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.3.11 Fri Feb 23 2024 19:38:29 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1340,13 +1340,14 @@ $radio-button-disabled-active-color: var(
1340
1340
  --nutui-radio-button-disabled-active-color,
1341
1341
  $white
1342
1342
  ) !default;
1343
- $radiogroup-radio-margin: var(
1343
+ $radiogroup-radio-margin: var(--nutui-radiogroup-radio-margin, 20px) !default;
1344
+ $radiogroup-radio-margin-bottom: var(
1344
1345
  --nutui-radiogroup-radio-margin,
1345
- 0 20px 5px 0
1346
+ 5px
1346
1347
  ) !default;
1347
1348
  $radiogroup-radio-label-margin: var(
1348
1349
  --nutui-radiogroup-radio-label-margin,
1349
- 0 5px 0 5px
1350
+ 0 5px
1350
1351
  ) !default;
1351
1352
 
1352
1353
  // signature(✅)
@@ -1912,7 +1913,7 @@ $form-item-label-margin-right: var(
1912
1913
  ) !default;
1913
1914
  $form-item-label-text-align: var(
1914
1915
  --nutui-form-item-label-text-align,
1915
- left
1916
+ start
1916
1917
  ) !default;
1917
1918
  $form-item-required-margin-right: var(
1918
1919
  --nutui-form-item-required-margin-right,
@@ -1924,17 +1925,20 @@ $form-item-body-font-size: var(
1924
1925
  ) !default;
1925
1926
  $form-item-body-slots-text-align: var(
1926
1927
  --nutui-form-item-body-slots-text-align,
1927
- left
1928
+ start
1928
1929
  ) !default;
1929
1930
  $form-item-body-input-text-align: var(
1930
1931
  --nutui-form-item-body-input-text-align,
1931
- left
1932
+ start
1932
1933
  ) !default;
1933
1934
  $form-item-tip-font-size: var(
1934
1935
  --nutui-form-item-tip-font-size,
1935
1936
  $font-size-xs
1936
1937
  ) !default;
1937
- $form-item-tip-text-align: var(--nutui-form-item-tip-text-align, left) !default;
1938
+ $form-item-tip-text-align: var(
1939
+ --nutui-form-item-tip-text-align,
1940
+ start
1941
+ ) !default;
1938
1942
 
1939
1943
  // skeleton(✅)
1940
1944
  $skeleton-background: var(
@@ -1,51 +1,51 @@
1
- import React, { FunctionComponent, ChangeEvent, FocusEvent } from 'react';
1
+ import React, { FunctionComponent, ChangeEvent } from 'react';
2
2
  import { BasicComponent } from '../../utils/typings';
3
3
  export interface InputNumberProps extends BasicComponent {
4
4
  /**
5
- * 禁用所有功能
5
+ * 当前值,受控值
6
+ * @default -
7
+ */
8
+ value: number | string
9
+ /**
10
+ * 默认值
11
+ * @default 0
12
+ */
13
+ defaultValue: number | string
14
+ /**
15
+ * 是否允许内容为空
6
16
  * @default false
7
17
  */
8
- disabled: boolean
18
+ allowEmpty: boolean
9
19
  /**
10
20
  * 最小值限制
11
21
  * @default 1
12
22
  */
13
- min: string | number
23
+ min: number | string
14
24
  /**
15
25
  * 最大值限制
16
26
  * @default 9999
17
27
  */
18
- max: string | number
28
+ max: number | string
19
29
  /**
20
- * 只读状态禁用输入框操作行为
30
+ * 禁用所有功能
21
31
  * @default false
22
32
  */
23
- readOnly: boolean
24
- /**
25
- * 当前值,受控值
26
- * @default -
27
- */
28
- value: string | number
29
- /**
30
- * 默认值
31
- * @default 0
32
- */
33
- defaultValue: string | number
33
+ disabled: boolean
34
34
  /**
35
- * 是否允许内容为空
35
+ * 只读状态禁用输入框操作行为
36
36
  * @default false
37
37
  */
38
- allowEmpty: boolean
38
+ readOnly: boolean
39
39
  /**
40
40
  * 步长
41
41
  * @default 1
42
42
  */
43
- step: string | number
43
+ step: number
44
44
  /**
45
45
  * 设置保留的小数位
46
46
  * @default 0
47
47
  */
48
- digits: string | number
48
+ digits: number
49
49
  /**
50
50
  * 支持异步修改
51
51
  * @default false
@@ -55,36 +55,36 @@ export interface InputNumberProps extends BasicComponent {
55
55
  * 指定输入框展示值的格式
56
56
  * @default -
57
57
  */
58
- formatter?: (displayValue: string | number) => string
58
+ formatter?: (value?: string | number) => string
59
59
  /**
60
60
  * 点击增加按钮时触发
61
61
  * @default -
62
62
  */
63
- onPlus: (e: MouseEvent) => void
63
+ onPlus: (e: React.MouseEvent) => void
64
64
  /**
65
65
  * 点击减少按钮时触发
66
66
  * @default -
67
67
  */
68
- onMinus: (e: MouseEvent) => void
68
+ onMinus: (e: React.MouseEvent) => void
69
69
  /**
70
70
  * 点击不可用的按钮时触发
71
71
  * @default -
72
72
  */
73
- onOverlimit: (e: MouseEvent) => void
73
+ onOverlimit: (e: React.MouseEvent) => void
74
74
  /**
75
75
  * 输入框失去焦点时触发
76
76
  * @default -
77
77
  */
78
- onBlur: (e: ChangeEvent<HTMLInputElement>) => void
78
+ onBlur: (e: React.FocusEvent<HTMLInputElement>) => void
79
79
  /**
80
80
  * 输入框获得焦点时触发
81
81
  * @default -
82
82
  */
83
- onFocus: (e: FocusEvent<HTMLInputElement>) => void
83
+ onFocus: (e: React.FocusEvent<HTMLInputElement>) => void
84
84
  /**
85
85
  * 值改变时触发
86
86
  * @default -
87
87
  */
88
- onChange: (param: string | number, e: MouseEvent | ChangeEvent<HTMLInputElement>) => void
88
+ onChange: (param: string | number, e: React.MouseEvent | ChangeEvent<HTMLInputElement>) => void
89
89
  }
90
90
  export declare const InputNumber: FunctionComponent<Partial<InputNumberProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onBlur'>>;
@@ -1,24 +1,22 @@
1
- import React, { FunctionComponent, ChangeEvent, FocusEvent } from 'react';
1
+ import React, { FunctionComponent, ChangeEvent } from 'react';
2
2
  import { BasicComponent } from '../../utils/typings';
3
3
  export interface InputNumberProps extends BasicComponent {
4
+ value: number | string;
5
+ defaultValue: number | string;
6
+ allowEmpty: boolean;
7
+ min: number | string;
8
+ max: number | string;
4
9
  disabled: boolean;
5
- min: string | number;
6
- max: string | number;
7
10
  readOnly: boolean;
8
- value: string | number;
9
- defaultValue: string | number;
10
- allowEmpty: boolean;
11
- step: string | number;
12
- digits: string | number;
11
+ step: number;
12
+ digits: number;
13
13
  async: boolean;
14
- className: string;
15
- style: React.CSSProperties;
16
- formatter?: (displayValue: string | number) => string;
17
- onPlus: (e: MouseEvent) => void;
18
- onMinus: (e: MouseEvent) => void;
19
- onOverlimit: (e: MouseEvent) => void;
20
- onBlur: (e: ChangeEvent<HTMLInputElement>) => void;
21
- onFocus: (e: FocusEvent<HTMLInputElement>) => void;
22
- onChange: (param: string | number, e: MouseEvent | ChangeEvent<HTMLInputElement>) => void;
14
+ formatter?: (value?: string | number) => string;
15
+ onPlus: (e: React.MouseEvent) => void;
16
+ onMinus: (e: React.MouseEvent) => void;
17
+ onOverlimit: (e: React.MouseEvent) => void;
18
+ onBlur: (e: React.FocusEvent<HTMLInputElement>) => void;
19
+ onFocus: (e: React.FocusEvent<HTMLInputElement>) => void;
20
+ onChange: (param: string | number, e: React.MouseEvent | ChangeEvent<HTMLInputElement>) => void;
23
21
  }
24
22
  export declare const InputNumber: FunctionComponent<Partial<InputNumberProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onBlur'>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nutui/nutui-react",
3
- "version": "2.3.10",
3
+ "version": "2.3.11",
4
4
  "style": "dist/style.css",
5
5
  "main": "dist/nutui.react.umd.js",
6
6
  "module": "dist/esm/nutui-react.es.js",
@@ -51,13 +51,13 @@
51
51
  "*.{ts,tsx,js,md}": "eslint"
52
52
  },
53
53
  "dependencies": {
54
- "@babel/runtime": "^7.21.0",
54
+ "@babel/runtime": "^7.23.9",
55
55
  "@nutui/icons-react": "^1.0.2",
56
56
  "@nutui/touch-emulator": "^1.0.0",
57
57
  "@react-spring/web": "~9.6.1",
58
58
  "@use-gesture/react": "10.2.20",
59
59
  "async-validator": "^4.2.5",
60
- "classnames": "^2.3.2",
60
+ "classnames": "^2.5.1",
61
61
  "lodash.isequal": "^4.5.0",
62
62
  "lodash.kebabcase": "^4.1.1",
63
63
  "react-transition-group": "^4.4.5"
@@ -66,7 +66,7 @@
66
66
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
67
67
  },
68
68
  "resolutions": {
69
- "@types/react": "18",
70
- "@types/react-dom": "18"
69
+ "@types/react": "^18.2.57",
70
+ "@types/react-dom": "^18.2.19"
71
71
  }
72
72
  }