@nutui/nutui-react-taro 3.0.19-cpp.23 → 3.0.19-cpp.24-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/cjs/packages/checkbox/checkbox.js +15 -6
  2. package/dist/cjs/packages/input/input.js +4 -3
  3. package/dist/cjs/packages/input/style/input.scss +1 -1
  4. package/dist/cjs/packages/input/style/style.css +1 -1
  5. package/dist/cjs/packages/input/style/style.harmony.css +1 -1
  6. package/dist/cjs/packages/input/style-jmapp/input.scss +1 -1
  7. package/dist/cjs/packages/input/style-jmapp/style.css +1 -1
  8. package/dist/cjs/packages/input/style-jrkf/input.scss +1 -1
  9. package/dist/cjs/packages/input/style-jrkf/style.css +1 -1
  10. package/dist/cjs/packages/navbar/style/style.css +1 -1
  11. package/dist/cjs/packages/navbar/style/style.harmony.css +1 -1
  12. package/dist/cjs/packages/radio/radio.js +7 -3
  13. package/dist/cjs/packages/toast/toast.js +2 -1
  14. package/dist/cjs/types/spec/input/base.d.ts +2 -1
  15. package/dist/cjs/utils/taro/get-system-info.d.ts +3 -0
  16. package/dist/cjs/utils/taro/get-system-info.js +4 -3
  17. package/dist/cjs/utils/taro/platform.js +6 -5
  18. package/dist/cjs/utils/taro/px-transform.js +3 -2
  19. package/dist/es/packages/checkbox/checkbox.js +19 -8
  20. package/dist/es/packages/input/input.js +4 -3
  21. package/dist/es/packages/input/style/input.scss +1 -1
  22. package/dist/es/packages/input/style/style.css +1 -1
  23. package/dist/es/packages/input/style/style.harmony.css +1 -1
  24. package/dist/es/packages/input/style-jmapp/input.scss +1 -1
  25. package/dist/es/packages/input/style-jmapp/style.css +1 -1
  26. package/dist/es/packages/input/style-jrkf/input.scss +1 -1
  27. package/dist/es/packages/input/style-jrkf/style.css +1 -1
  28. package/dist/es/packages/navbar/style/style.css +1 -1
  29. package/dist/es/packages/navbar/style/style.harmony.css +1 -1
  30. package/dist/es/packages/radio/radio.js +11 -5
  31. package/dist/es/packages/toast/toast.js +2 -1
  32. package/dist/es/types/spec/input/base.d.ts +5 -1
  33. package/dist/es/utils/taro/get-system-info.d.ts +3 -0
  34. package/dist/es/utils/taro/get-system-info.js +6 -3
  35. package/dist/es/utils/taro/platform.js +5 -5
  36. package/dist/es/utils/taro/px-transform.js +2 -2
  37. package/dist/nutui.react.umd.js +46 -23
  38. package/dist/style-jmapp.css +1 -1
  39. package/dist/style-jmapp.scss +42 -42
  40. package/dist/style-jrkf.css +1 -1
  41. package/dist/style-jrkf.scss +40 -40
  42. package/dist/style.css +1 -1
  43. package/dist/style.scss +47 -47
  44. package/dist/styles/theme-daojia.scss +369 -0
  45. package/dist/styles/theme-dark-daojia.scss +365 -0
  46. package/dist/styles/themes/daojia.css +1 -0
  47. package/dist/styles/themes/dark-daojia.css +1 -0
  48. package/dist/styles/variables-daojia.scss +2583 -0
  49. package/dist/styles/variables.scss +2 -2
  50. package/package.json +1 -1
@@ -87,33 +87,42 @@ var Checkbox = function Checkbox(props) {
87
87
  var renderIcon = function renderIcon() {
88
88
  if (innerDisabled) {
89
89
  if (innerIndeterminate) {
90
+ // @ts-ignore
90
91
  return /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.CheckDisabled, {
91
- className: color()
92
+ className: color(),
93
+ ariaHidden: true
92
94
  });
93
95
  }
94
96
  if (innerChecked) {
97
+ // @ts-ignore
95
98
  return /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.Checked, {
96
- className: color()
99
+ className: color(),
100
+ ariaHidden: true
97
101
  });
98
102
  }
103
+ // @ts-ignore
99
104
  return /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.CheckDisabled, {
100
- className: color()
105
+ className: color(),
106
+ ariaHidden: true
101
107
  });
102
108
  }
103
109
  if (!innerChecked) {
104
110
  return /*#__PURE__*/ _react.default.isValidElement(icon) ? icon : /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.CheckNormal, {
105
- className: color()
111
+ className: color(),
112
+ ariaHidden: true
106
113
  });
107
114
  }
108
115
  if (innerIndeterminate) {
109
116
  return /*#__PURE__*/ _react.default.isValidElement(indeterminateIcon) ? indeterminateIcon : /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.CheckDisabled, {
110
- className: color()
117
+ className: color(),
118
+ ariaHidden: true
111
119
  });
112
120
  }
113
121
  return /*#__PURE__*/ _react.default.isValidElement(activeIcon) ? activeIcon : /*#__PURE__*/ _react.default.createElement(_components.View, {
114
122
  className: "".concat(classPrefix, "-icon-wrap")
115
123
  }, /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.Checked, {
116
- className: color()
124
+ className: color(),
125
+ ariaHidden: true
117
126
  }));
118
127
  };
119
128
  var color = function color() {
@@ -53,7 +53,7 @@ var Input = /*#__PURE__*/ (0, _react.forwardRef)(function(props, ref) {
53
53
  var classPrefix = 'nut-input';
54
54
  var rtl = (0, _index.useRtl)();
55
55
  var locale = (0, _index.useConfig)().locale;
56
- var _ref = (0, _object_spread._)({}, defaultProps, props), focus = _ref.focus, type = _ref.type, name = _ref.name, placeholder = _ref.placeholder, align = _ref.align, disabled = _ref.disabled, readOnly = _ref.readOnly, maxLength = _ref.maxLength, clearable = _ref.clearable, clearIcon = _ref.clearIcon, formatTrigger = _ref.formatTrigger, autoFocus = _ref.autoFocus, style = _ref.style, className = _ref.className, plain = _ref.plain, onChange = _ref.onChange, onFocus = _ref.onFocus, onBlur = _ref.onBlur, onClear = _ref.onClear, formatter = _ref.formatter, onClick = _ref.onClick, confirmType = _ref.confirmType, defaultValue = _ref.defaultValue, _value = _ref.value, rest = (0, _object_without_properties._)(_ref, [
56
+ var _ref = (0, _object_spread._)({}, defaultProps, props), focus = _ref.focus, type = _ref.type, name = _ref.name, placeholder = _ref.placeholder, align = _ref.align, disabled = _ref.disabled, readOnly = _ref.readOnly, maxLength = _ref.maxLength, clearable = _ref.clearable, clearIcon = _ref.clearIcon, formatTrigger = _ref.formatTrigger, autoFocus = _ref.autoFocus, style = _ref.style, className = _ref.className, plain = _ref.plain, inputStyle = _ref.inputStyle, onChange = _ref.onChange, onFocus = _ref.onFocus, onBlur = _ref.onBlur, onClear = _ref.onClear, formatter = _ref.formatter, onClick = _ref.onClick, confirmType = _ref.confirmType, defaultValue = _ref.defaultValue, _value = _ref.value, rest = (0, _object_without_properties._)(_ref, [
57
57
  "focus",
58
58
  "type",
59
59
  "name",
@@ -69,6 +69,7 @@ var Input = /*#__PURE__*/ (0, _react.forwardRef)(function(props, ref) {
69
69
  "style",
70
70
  "className",
71
71
  "plain",
72
+ "inputStyle",
72
73
  "onChange",
73
74
  "onFocus",
74
75
  "onBlur",
@@ -187,9 +188,9 @@ var Input = /*#__PURE__*/ (0, _react.forwardRef)(function(props, ref) {
187
188
  name: name,
188
189
  className: "nut-input-native",
189
190
  ref: inputRef,
190
- style: {
191
+ style: (0, _object_spread._)({}, {
191
192
  textAlign: getTextAlign()
192
- },
193
+ }, inputStyle),
193
194
  type: inputType(type),
194
195
  password: type === 'password',
195
196
  maxlength: maxLength,
@@ -31,7 +31,7 @@
31
31
 
32
32
  .nut-input-native {
33
33
  flex: 1;
34
- color: $color-title;
34
+ color: $input-color;
35
35
  font-size: $input-font-size;
36
36
  padding: 0;
37
37
  border: 0;
@@ -32,7 +32,7 @@
32
32
 
33
33
  .nut-input-native {
34
34
  flex: 1;
35
- color: var(--nutui-color-title, #1a1a1a);
35
+ color: var(--nutui-input-color, var(--nutui-color-title, #1a1a1a));
36
36
  font-size: var(--nutui-input-font-size, var(--nutui-font-size-base, 14px));
37
37
  padding: 0;
38
38
  border: 0;
@@ -32,7 +32,7 @@
32
32
 
33
33
  .nut-input-native {
34
34
  flex: 1;
35
- color: var(--nutui-color-title, #1a1a1a);
35
+ color: var(--nutui-input-color, var(--nutui-color-title, #1a1a1a));
36
36
  font-size: var(--nutui-input-font-size, var(--nutui-font-size-base, 14px));
37
37
  padding: 0;
38
38
  border: 0;
@@ -31,7 +31,7 @@
31
31
 
32
32
  .nut-input-native {
33
33
  flex: 1;
34
- color: $color-title;
34
+ color: $input-color;
35
35
  font-size: $input-font-size;
36
36
  padding: 0;
37
37
  border: 0;
@@ -32,7 +32,7 @@
32
32
 
33
33
  .nut-input-native {
34
34
  flex: 1;
35
- color: var(--nutui-color-title);
35
+ color: var(--nutui-input-color, var(--nutui-color-text));
36
36
  font-size: var(--nutui-input-font-size, var(--nutui-font-text));
37
37
  padding: 0;
38
38
  border: 0;
@@ -31,7 +31,7 @@
31
31
 
32
32
  .nut-input-native {
33
33
  flex: 1;
34
- color: $color-title;
34
+ color: $input-color;
35
35
  font-size: $input-font-size;
36
36
  padding: 0;
37
37
  border: 0;
@@ -32,7 +32,7 @@
32
32
 
33
33
  .nut-input-native {
34
34
  flex: 1;
35
- color: var(--nutui-color-title);
35
+ color: var(--nutui-input-color, var(--nutui-color-text));
36
36
  font-size: var(--nutui-input-font-size, var(--nutui-font-text));
37
37
  padding: 0;
38
38
  border: 0;
@@ -12,7 +12,7 @@
12
12
  height: var(--nutui-navbar-height, 44px);
13
13
  box-sizing: border-box;
14
14
  background: var(--nutui-navbar-background, #ffffff);
15
- box-shadow: var(--nutui-navbar-box-shadow, 0 0 transparent);
15
+ box-shadow: var(--nutui-navbar-box-shadow, none);
16
16
  font-size: var(--nutui-navbar-font-size, var(--nutui-font-size-base, 14px));
17
17
  color: var(--nutui-navbar-color, var(--nutui-color-title, #1a1a1a));
18
18
  overflow: hidden;
@@ -12,7 +12,7 @@
12
12
  height: var(--nutui-navbar-height, 44px);
13
13
  box-sizing: border-box;
14
14
  background: var(--nutui-navbar-background, #ffffff);
15
- box-shadow: var(--nutui-navbar-box-shadow, 0 0 transparent);
15
+ box-shadow: var(--nutui-navbar-box-shadow, none);
16
16
  font-size: var(--nutui-navbar-font-size, var(--nutui-font-size-base, 14px));
17
17
  color: var(--nutui-navbar-color, var(--nutui-color-title, #1a1a1a));
18
18
  overflow: hidden;
@@ -79,21 +79,25 @@ var Radio = function Radio(props) {
79
79
  var renderIcon = function renderIcon() {
80
80
  var icon = props.icon, activeIcon = props.activeIcon;
81
81
  if (disabled && !checkedStatement) {
82
+ // @ts-ignore
82
83
  return /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.CheckDisabled, {
83
- className: (0, _classnames.default)(color())
84
+ className: (0, _classnames.default)(color()),
85
+ ariaHidden: true
84
86
  });
85
87
  }
86
88
  if (checkedStatement) {
87
89
  return /*#__PURE__*/ _react.default.isValidElement(activeIcon) ? /*#__PURE__*/ _react.default.cloneElement(activeIcon, (0, _object_spread_props._)((0, _object_spread._)({}, activeIcon.props), {
88
90
  className: (0, _classnames.default)(activeIcon.props.className, color())
89
91
  })) : /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.CheckChecked, {
90
- className: (0, _classnames.default)(color())
92
+ className: (0, _classnames.default)(color()),
93
+ ariaHidden: true
91
94
  });
92
95
  }
93
96
  return /*#__PURE__*/ _react.default.isValidElement(icon) ? /*#__PURE__*/ _react.default.cloneElement(icon, (0, _object_spread_props._)((0, _object_spread._)({}, icon.props), {
94
97
  className: (0, _classnames.default)(icon.props.className, color())
95
98
  })) : /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.CheckNormal, {
96
- className: (0, _classnames.default)(color())
99
+ className: (0, _classnames.default)(color()),
100
+ ariaHidden: true
97
101
  });
98
102
  };
99
103
  var renderLabel = function renderLabel() {
@@ -156,7 +156,8 @@ var Toast = function Toast(props) {
156
156
  }, /*#__PURE__*/ _react.default.createElement(_components.View, {
157
157
  className: (0, _classnames.default)("".concat(classPrefix, "-inner"), "".concat(classPrefix, "-").concat(position), contentClassName, "".concat(classPrefix, "-inner-").concat(size), "".concat(classPrefix, "-inner-").concat(wordBreak), (0, _define_property._)({}, "".concat(classPrefix, "-inner-descrption"), content)),
158
158
  style: (0, _object_spread._)({}, styles, contentStyle),
159
- ariaRole: "alert"
159
+ ariaRole: "alert",
160
+ ariaLabel: title + content
160
161
  }, renderIcon(), title && /*#__PURE__*/ _react.default.createElement(_components.Text, {
161
162
  className: "".concat(classPrefix, "-title")
162
163
  }, title), content && ((0, _platform.td)() ? /*#__PURE__*/ _react.default.createElement(_components.Text, {
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import { CSSProperties, ReactNode } from 'react';
2
2
  import { Align } from '../../base/atoms';
3
3
  import { BaseProps } from '../../base/props';
4
4
  export type InputFormatTrigger = 'onChange' | 'onBlur';
@@ -19,6 +19,7 @@ export interface BaseInput<INPUT_TYPE, CONFIRM_TYPE = InputConfirmType> extends
19
19
  autoFocus: boolean;
20
20
  confirmType: CONFIRM_TYPE;
21
21
  plain: boolean;
22
+ inputStyle?: CSSProperties;
22
23
  formatter?: (value: string) => string;
23
24
  onChange?: (value: string) => void;
24
25
  onBlur?: (value: string) => void;
@@ -3,11 +3,14 @@ interface IDeviceInfo extends Omit<Taro.getDeviceInfo.Result, 'deviceAbi' | 'CPU
3
3
  }
4
4
  /**
5
5
  * 获取设备基础信息,兼容新旧 API
6
+ * Android&iOS 这边新包提供 getDeviceInfo 的支持,但是鸿蒙短期内不会支持 canIUse,组件库代码可以使用 Taro.getDeviceInfo 然后 Taro
7
+ .getSystemInfo 兜底
6
8
  * @returns {IDeviceInfo} 设备基础信息
7
9
  */
8
10
  export declare const getDeviceInfo: () => IDeviceInfo;
9
11
  /**
10
12
  * 获取窗口信息,兼容新旧 API
13
+ * 鸿蒙短期内不会支持 canIUse
11
14
  * @returns {Taro.getWindowInfo.Result} 窗口信息
12
15
  */
13
16
  export declare const getWindowInfo: () => Taro.getWindowInfo.Result;
@@ -16,11 +16,12 @@ _export(exports, {
16
16
  return getWindowInfo;
17
17
  }
18
18
  });
19
- var _taro = require("@tarojs/taro");
19
+ var _interop_require_default = require("@swc/helpers/_/_interop_require_default");
20
+ var _taro = /*#__PURE__*/ _interop_require_default._(require("@tarojs/taro"));
20
21
  var getDeviceInfo = function getDeviceInfo() {
21
- return (0, _taro.canIUse)('getDeviceInfo') ? (0, _taro.getDeviceInfo)() : (0, _taro.getSystemInfoSync)();
22
+ return typeof _taro.default.getDeviceInfo === 'function' ? _taro.default.getDeviceInfo() : _taro.default.getSystemInfoSync();
22
23
  };
23
24
  var getWindowInfo = function getWindowInfo() {
24
- return (0, _taro.canIUse)('getWindowInfo') ? (0, _taro.getWindowInfo)() : (0, _taro.getSystemInfoSync)();
25
+ return typeof _taro.default.getWindowInfo === 'function' ? _taro.default.getWindowInfo() : _taro.default.getSystemInfoSync();
25
26
  } // /**
26
27
  ;
@@ -22,26 +22,27 @@ _export(exports, {
22
22
  return web;
23
23
  }
24
24
  });
25
- var _taro = require("@tarojs/taro");
25
+ var _interop_require_default = require("@swc/helpers/_/_interop_require_default");
26
+ var _taro = /*#__PURE__*/ _interop_require_default._(require("@tarojs/taro"));
26
27
  var harmony = function harmony() {
27
28
  return [
28
29
  'harmony',
29
30
  'harmonyhybrid',
30
31
  'jdharmony'
31
- ].includes((0, _taro.getEnv)().toLowerCase());
32
+ ].includes(_taro.default.getEnv().toLowerCase());
32
33
  };
33
34
  var web = function web() {
34
35
  return [
35
36
  'web'
36
- ].includes((0, _taro.getEnv)().toLowerCase());
37
+ ].includes(_taro.default.getEnv().toLowerCase());
37
38
  };
38
39
  var miniprogram = function miniprogram() {
39
40
  return [
40
41
  'mini'
41
- ].includes((0, _taro.getEnv)().toLowerCase());
42
+ ].includes(_taro.default.getEnv().toLowerCase());
42
43
  };
43
44
  var td = function td() {
44
45
  return [
45
46
  'dynamic'
46
- ].includes((0, _taro.getEnv)().toLowerCase());
47
+ ].includes(_taro.default.getEnv().toLowerCase());
47
48
  };
@@ -8,10 +8,11 @@ Object.defineProperty(exports, "pxTransform", {
8
8
  return pxTransform;
9
9
  }
10
10
  });
11
- var _taro = require("@tarojs/taro");
11
+ var _interop_require_default = require("@swc/helpers/_/_interop_require_default");
12
+ var _taro = /*#__PURE__*/ _interop_require_default._(require("@tarojs/taro"));
12
13
  var _platform = require("./platform");
13
14
  function pxTransform(value, radix) {
14
15
  // @ts-ignore
15
- if ((0, _platform.harmony)() || (0, _platform.td)()) return (0, _taro.pxTransform)(value, radix || 375);
16
+ if ((0, _platform.harmony)() || (0, _platform.td)()) return _taro.default.pxTransform(value, radix || 375);
16
17
  return "".concat(value, "px");
17
18
  }
@@ -75,33 +75,44 @@ export var Checkbox = function(props) {
75
75
  var renderIcon = function() {
76
76
  if (innerDisabled) {
77
77
  if (innerIndeterminate) {
78
+ // @ts-ignore
78
79
  return /*#__PURE__*/ React.createElement(CheckDisabled, {
79
- className: color()
80
+ className: color(),
81
+ ariaHidden: true
80
82
  });
81
83
  }
82
84
  if (innerChecked) {
85
+ // @ts-ignore
83
86
  return /*#__PURE__*/ React.createElement(Checked, {
84
- className: color()
87
+ className: color(),
88
+ ariaHidden: true
85
89
  });
86
90
  }
91
+ // @ts-ignore
87
92
  return /*#__PURE__*/ React.createElement(CheckDisabled, {
88
- className: color()
93
+ className: color(),
94
+ ariaHidden: true
89
95
  });
90
96
  }
91
97
  if (!innerChecked) {
92
- return /*#__PURE__*/ React.isValidElement(icon) ? icon : /*#__PURE__*/ React.createElement(CheckNormal, {
93
- className: color()
98
+ return /*#__PURE__*/ React.isValidElement(icon) ? icon : // @ts-ignore
99
+ /*#__PURE__*/ React.createElement(CheckNormal, {
100
+ className: color(),
101
+ ariaHidden: true
94
102
  });
95
103
  }
96
104
  if (innerIndeterminate) {
97
- return /*#__PURE__*/ React.isValidElement(indeterminateIcon) ? indeterminateIcon : /*#__PURE__*/ React.createElement(CheckDisabled, {
98
- className: color()
105
+ return /*#__PURE__*/ React.isValidElement(indeterminateIcon) ? indeterminateIcon : // @ts-ignore
106
+ /*#__PURE__*/ React.createElement(CheckDisabled, {
107
+ className: color(),
108
+ ariaHidden: true
99
109
  });
100
110
  }
101
111
  return /*#__PURE__*/ React.isValidElement(activeIcon) ? activeIcon : /*#__PURE__*/ React.createElement(View, {
102
112
  className: "".concat(classPrefix, "-icon-wrap")
103
113
  }, /*#__PURE__*/ React.createElement(Checked, {
104
- className: color()
114
+ className: color(),
115
+ ariaHidden: true
105
116
  }));
106
117
  };
107
118
  var color = function() {
@@ -42,7 +42,7 @@ export var Input = /*#__PURE__*/ forwardRef(function(props, ref) {
42
42
  var classPrefix = 'nut-input';
43
43
  var rtl = useRtl();
44
44
  var locale = useConfig().locale;
45
- var _ref = _object_spread({}, defaultProps, props), focus = _ref.focus, type = _ref.type, name = _ref.name, placeholder = _ref.placeholder, align = _ref.align, disabled = _ref.disabled, readOnly = _ref.readOnly, maxLength = _ref.maxLength, clearable = _ref.clearable, clearIcon = _ref.clearIcon, formatTrigger = _ref.formatTrigger, autoFocus = _ref.autoFocus, style = _ref.style, className = _ref.className, plain = _ref.plain, onChange = _ref.onChange, onFocus = _ref.onFocus, onBlur = _ref.onBlur, onClear = _ref.onClear, formatter = _ref.formatter, onClick = _ref.onClick, confirmType = _ref.confirmType, defaultValue = _ref.defaultValue, _value = _ref.value, rest = _object_without_properties(_ref, [
45
+ var _ref = _object_spread({}, defaultProps, props), focus = _ref.focus, type = _ref.type, name = _ref.name, placeholder = _ref.placeholder, align = _ref.align, disabled = _ref.disabled, readOnly = _ref.readOnly, maxLength = _ref.maxLength, clearable = _ref.clearable, clearIcon = _ref.clearIcon, formatTrigger = _ref.formatTrigger, autoFocus = _ref.autoFocus, style = _ref.style, className = _ref.className, plain = _ref.plain, inputStyle = _ref.inputStyle, onChange = _ref.onChange, onFocus = _ref.onFocus, onBlur = _ref.onBlur, onClear = _ref.onClear, formatter = _ref.formatter, onClick = _ref.onClick, confirmType = _ref.confirmType, defaultValue = _ref.defaultValue, _value = _ref.value, rest = _object_without_properties(_ref, [
46
46
  "focus",
47
47
  "type",
48
48
  "name",
@@ -58,6 +58,7 @@ export var Input = /*#__PURE__*/ forwardRef(function(props, ref) {
58
58
  "style",
59
59
  "className",
60
60
  "plain",
61
+ "inputStyle",
61
62
  "onChange",
62
63
  "onFocus",
63
64
  "onBlur",
@@ -176,9 +177,9 @@ export var Input = /*#__PURE__*/ forwardRef(function(props, ref) {
176
177
  name: name,
177
178
  className: "nut-input-native",
178
179
  ref: inputRef,
179
- style: {
180
+ style: _object_spread({}, {
180
181
  textAlign: getTextAlign()
181
- },
182
+ }, inputStyle),
182
183
  type: inputType(type),
183
184
  password: type === 'password',
184
185
  maxlength: maxLength,
@@ -31,7 +31,7 @@
31
31
 
32
32
  .nut-input-native {
33
33
  flex: 1;
34
- color: $color-title;
34
+ color: $input-color;
35
35
  font-size: $input-font-size;
36
36
  padding: 0;
37
37
  border: 0;
@@ -32,7 +32,7 @@
32
32
 
33
33
  .nut-input-native {
34
34
  flex: 1;
35
- color: var(--nutui-color-title, #1a1a1a);
35
+ color: var(--nutui-input-color, var(--nutui-color-title, #1a1a1a));
36
36
  font-size: var(--nutui-input-font-size, var(--nutui-font-size-base, 14px));
37
37
  padding: 0;
38
38
  border: 0;
@@ -32,7 +32,7 @@
32
32
 
33
33
  .nut-input-native {
34
34
  flex: 1;
35
- color: var(--nutui-color-title, #1a1a1a);
35
+ color: var(--nutui-input-color, var(--nutui-color-title, #1a1a1a));
36
36
  font-size: var(--nutui-input-font-size, var(--nutui-font-size-base, 14px));
37
37
  padding: 0;
38
38
  border: 0;
@@ -31,7 +31,7 @@
31
31
 
32
32
  .nut-input-native {
33
33
  flex: 1;
34
- color: $color-title;
34
+ color: $input-color;
35
35
  font-size: $input-font-size;
36
36
  padding: 0;
37
37
  border: 0;
@@ -32,7 +32,7 @@
32
32
 
33
33
  .nut-input-native {
34
34
  flex: 1;
35
- color: var(--nutui-color-title);
35
+ color: var(--nutui-input-color, var(--nutui-color-text));
36
36
  font-size: var(--nutui-input-font-size, var(--nutui-font-text));
37
37
  padding: 0;
38
38
  border: 0;
@@ -31,7 +31,7 @@
31
31
 
32
32
  .nut-input-native {
33
33
  flex: 1;
34
- color: $color-title;
34
+ color: $input-color;
35
35
  font-size: $input-font-size;
36
36
  padding: 0;
37
37
  border: 0;
@@ -32,7 +32,7 @@
32
32
 
33
33
  .nut-input-native {
34
34
  flex: 1;
35
- color: var(--nutui-color-title);
35
+ color: var(--nutui-input-color, var(--nutui-color-text));
36
36
  font-size: var(--nutui-input-font-size, var(--nutui-font-text));
37
37
  padding: 0;
38
38
  border: 0;
@@ -12,7 +12,7 @@
12
12
  height: var(--nutui-navbar-height, 44px);
13
13
  box-sizing: border-box;
14
14
  background: var(--nutui-navbar-background, #ffffff);
15
- box-shadow: var(--nutui-navbar-box-shadow, 0 0 transparent);
15
+ box-shadow: var(--nutui-navbar-box-shadow, none);
16
16
  font-size: var(--nutui-navbar-font-size, var(--nutui-font-size-base, 14px));
17
17
  color: var(--nutui-navbar-color, var(--nutui-color-title, #1a1a1a));
18
18
  overflow: hidden;
@@ -12,7 +12,7 @@
12
12
  height: var(--nutui-navbar-height, 44px);
13
13
  box-sizing: border-box;
14
14
  background: var(--nutui-navbar-background, #ffffff);
15
- box-shadow: var(--nutui-navbar-box-shadow, 0 0 transparent);
15
+ box-shadow: var(--nutui-navbar-box-shadow, none);
16
16
  font-size: var(--nutui-navbar-font-size, var(--nutui-font-size-base, 14px));
17
17
  color: var(--nutui-navbar-color, var(--nutui-color-title, #1a1a1a));
18
18
  overflow: hidden;
@@ -67,21 +67,27 @@ export var Radio = function(props) {
67
67
  var renderIcon = function() {
68
68
  var icon = props.icon, activeIcon = props.activeIcon;
69
69
  if (disabled && !checkedStatement) {
70
+ // @ts-ignore
70
71
  return /*#__PURE__*/ React.createElement(CheckDisabled, {
71
- className: classNames(color())
72
+ className: classNames(color()),
73
+ ariaHidden: true
72
74
  });
73
75
  }
74
76
  if (checkedStatement) {
75
77
  return /*#__PURE__*/ React.isValidElement(activeIcon) ? /*#__PURE__*/ React.cloneElement(activeIcon, _object_spread_props(_object_spread({}, activeIcon.props), {
76
78
  className: classNames(activeIcon.props.className, color())
77
- })) : /*#__PURE__*/ React.createElement(CheckChecked, {
78
- className: classNames(color())
79
+ })) : // @ts-ignore
80
+ /*#__PURE__*/ React.createElement(CheckChecked, {
81
+ className: classNames(color()),
82
+ ariaHidden: true
79
83
  });
80
84
  }
81
85
  return /*#__PURE__*/ React.isValidElement(icon) ? /*#__PURE__*/ React.cloneElement(icon, _object_spread_props(_object_spread({}, icon.props), {
82
86
  className: classNames(icon.props.className, color())
83
- })) : /*#__PURE__*/ React.createElement(CheckNormal, {
84
- className: classNames(color())
87
+ })) : // @ts-ignore
88
+ /*#__PURE__*/ React.createElement(CheckNormal, {
89
+ className: classNames(color()),
90
+ ariaHidden: true
85
91
  });
86
92
  };
87
93
  var renderLabel = function() {
@@ -133,7 +133,8 @@ export var Toast = function(props) {
133
133
  }, /*#__PURE__*/ React.createElement(View, {
134
134
  className: classNames("".concat(classPrefix, "-inner"), "".concat(classPrefix, "-").concat(position), contentClassName, "".concat(classPrefix, "-inner-").concat(size), "".concat(classPrefix, "-inner-").concat(wordBreak), _define_property({}, "".concat(classPrefix, "-inner-descrption"), content)),
135
135
  style: _object_spread({}, styles, contentStyle),
136
- ariaRole: "alert"
136
+ ariaRole: "alert",
137
+ ariaLabel: title + content
137
138
  }, renderIcon(), title && /*#__PURE__*/ React.createElement(Text, {
138
139
  className: "".concat(classPrefix, "-title")
139
140
  }, title), content && (td() ? /*#__PURE__*/ React.createElement(Text, {
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import { CSSProperties, ReactNode } from 'react';
2
2
  import { Align } from '../../base/atoms';
3
3
  import { BaseProps } from '../../base/props';
4
4
  export type InputFormatTrigger = 'onChange' | 'onBlur';
@@ -65,6 +65,10 @@ export interface BaseInput<INPUT_TYPE, CONFIRM_TYPE = InputConfirmType> extends
65
65
  */
66
66
  plain: boolean
67
67
  /**
68
+ * 输入框样式
69
+ */
70
+ inputStyle?: CSSProperties
71
+ /**
68
72
  * 输入内容格式化函数
69
73
  */
70
74
  formatter?: (value: string) => string
@@ -3,11 +3,14 @@ interface IDeviceInfo extends Omit<Taro.getDeviceInfo.Result, 'deviceAbi' | 'CPU
3
3
  }
4
4
  /**
5
5
  * 获取设备基础信息,兼容新旧 API
6
+ * Android&iOS 这边新包提供 getDeviceInfo 的支持,但是鸿蒙短期内不会支持 canIUse,组件库代码可以使用 Taro.getDeviceInfo 然后 Taro
7
+ .getSystemInfo 兜底
6
8
  * @returns {IDeviceInfo} 设备基础信息
7
9
  */
8
10
  export declare const getDeviceInfo: () => IDeviceInfo;
9
11
  /**
10
12
  * 获取窗口信息,兼容新旧 API
13
+ * 鸿蒙短期内不会支持 canIUse
11
14
  * @returns {Taro.getWindowInfo.Result} 窗口信息
12
15
  */
13
16
  export declare const getWindowInfo: () => Taro.getWindowInfo.Result;
@@ -1,15 +1,18 @@
1
- import { canIUse, getDeviceInfo as taroGetDeviceInfo, getSystemInfoSync, getWindowInfo as taroGetWindowInfo } from "@tarojs/taro";
1
+ import Taro from "@tarojs/taro";
2
2
  /**
3
3
  * 获取设备基础信息,兼容新旧 API
4
+ * Android&iOS 这边新包提供 getDeviceInfo 的支持,但是鸿蒙短期内不会支持 canIUse,组件库代码可以使用 Taro.getDeviceInfo 然后 Taro
5
+ .getSystemInfo 兜底
4
6
  * @returns {IDeviceInfo} 设备基础信息
5
7
  */ export var getDeviceInfo = function() {
6
- return canIUse('getDeviceInfo') ? taroGetDeviceInfo() : getSystemInfoSync();
8
+ return typeof Taro.getDeviceInfo === 'function' ? Taro.getDeviceInfo() : Taro.getSystemInfoSync();
7
9
  };
8
10
  /**
9
11
  * 获取窗口信息,兼容新旧 API
12
+ * 鸿蒙短期内不会支持 canIUse
10
13
  * @returns {Taro.getWindowInfo.Result} 窗口信息
11
14
  */ export var getWindowInfo = function() {
12
- return canIUse('getWindowInfo') ? taroGetWindowInfo() : getSystemInfoSync();
15
+ return typeof Taro.getWindowInfo === 'function' ? Taro.getWindowInfo() : Taro.getSystemInfoSync();
13
16
  } // /**
14
17
  // * 获取应用基础信息,兼容新旧 API
15
18
  // * @returns {Taro.getAppBaseInfo.Result} 应用基础信息
@@ -1,23 +1,23 @@
1
- import { getEnv } from "@tarojs/taro";
1
+ import Taro from "@tarojs/taro";
2
2
  export var harmony = function() {
3
3
  return [
4
4
  'harmony',
5
5
  'harmonyhybrid',
6
6
  'jdharmony'
7
- ].includes(getEnv().toLowerCase());
7
+ ].includes(Taro.getEnv().toLowerCase());
8
8
  };
9
9
  export var web = function() {
10
10
  return [
11
11
  'web'
12
- ].includes(getEnv().toLowerCase());
12
+ ].includes(Taro.getEnv().toLowerCase());
13
13
  };
14
14
  export var miniprogram = function() {
15
15
  return [
16
16
  'mini'
17
- ].includes(getEnv().toLowerCase());
17
+ ].includes(Taro.getEnv().toLowerCase());
18
18
  };
19
19
  export var td = function() {
20
20
  return [
21
21
  'dynamic'
22
- ].includes(getEnv().toLowerCase());
22
+ ].includes(Taro.getEnv().toLowerCase());
23
23
  };
@@ -1,8 +1,8 @@
1
- import { pxTransform as transform } from "@tarojs/taro";
1
+ import Taro from "@tarojs/taro";
2
2
  import { harmony, td } from "./platform";
3
3
  // td todo
4
4
  export function pxTransform(value, radix) {
5
5
  // @ts-ignore
6
- if (harmony() || td()) return transform(value, radix || 375);
6
+ if (harmony() || td()) return Taro.pxTransform(value, radix || 375);
7
7
  return "".concat(value, "px");
8
8
  }