@hi-ui/check-select 4.3.5 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @hi-ui/check-select
2
2
 
3
+ ## 4.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#2746](https://github.com/XiaoMi/hiui/pull/2746) [`b3a13135c`](https://github.com/XiaoMi/hiui/commit/b3a13135c77e75291d5864ff7fcf63ddb2ff46b8) Thanks [@zyprepare](https://github.com/zyprepare)! - feat: add prefix api
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`a9b9c93fc`](https://github.com/XiaoMi/hiui/commit/a9b9c93fc3a3fea60d14052a5afeef9daf7efa1b), [`b3a13135c`](https://github.com/XiaoMi/hiui/commit/b3a13135c77e75291d5864ff7fcf63ddb2ff46b8), [`ca008e4ae`](https://github.com/XiaoMi/hiui/commit/ca008e4ae9753bc1f11efcdcbf09121d1ef07b56)]:
12
+ - @hi-ui/input@4.1.0
13
+ - @hi-ui/tag-input@4.1.0
14
+ - @hi-ui/tree-utils@4.1.6
15
+
16
+ ## 4.3.6
17
+
18
+ ### Patch Changes
19
+
20
+ - [#2682](https://github.com/XiaoMi/hiui/pull/2682) [`41765fbed`](https://github.com/XiaoMi/hiui/commit/41765fbed0b3b9c8a574a0d7358b2d3f876162c5) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 下拉框盒模型设置为 content-box
21
+
22
+ - Updated dependencies [[`ba6e0265d`](https://github.com/XiaoMi/hiui/commit/ba6e0265da07964423d3a684dd068dcf50865dbc), [`41765fbed`](https://github.com/XiaoMi/hiui/commit/41765fbed0b3b9c8a574a0d7358b2d3f876162c5)]:
23
+ - @hi-ui/popper@4.1.4
24
+ - @hi-ui/picker@4.1.5
25
+
3
26
  ## 4.3.5
4
27
 
5
28
  ### Patch Changes
@@ -36,14 +36,14 @@ var useSearchMode = require('@hi-ui/use-search-mode');
36
36
  require('@hi-ui/use-children');
37
37
  var useFlattenData = require('./hooks/use-flatten-data.js');
38
38
  var index = require('./utils/index.js');
39
- function _interopDefaultLegacy(e) {
39
+ function _interopDefaultCompat(e) {
40
40
  return e && _typeof(e) === 'object' && 'default' in e ? e : {
41
41
  'default': e
42
42
  };
43
43
  }
44
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
45
- var Checkbox__default = /*#__PURE__*/_interopDefaultLegacy(Checkbox);
46
- var VirtualList__default = /*#__PURE__*/_interopDefaultLegacy(VirtualList);
44
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
45
+ var Checkbox__default = /*#__PURE__*/_interopDefaultCompat(Checkbox);
46
+ var VirtualList__default = /*#__PURE__*/_interopDefaultCompat(VirtualList);
47
47
  var _role = 'check-select';
48
48
  var _prefix = classname.getPrefixCls(_role);
49
49
  var DEFAULT_FIELD_NAMES = {};
@@ -89,8 +89,10 @@ var CheckSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
89
89
  tagInputProps = _a.tagInputProps,
90
90
  _a$size = _a.size,
91
91
  size = _a$size === void 0 ? 'md' : _a$size,
92
+ prefix = _a.prefix,
93
+ suffix = _a.suffix,
92
94
  onKeyDownProp = _a.onKeyDown,
93
- rest = tslib.__rest(_a, ["prefixCls", "role", "className", "children", "disabled", "clearable", "showCheckAll", "showOnlyShowChecked", "placeholder", "displayRender", "onSelect", "height", "itemHeight", "virtual", "visible", "onOpen", "onClose", "appearance", "invalid", "dataSource", "filterOption", "searchable", "render", "renderExtraFooter", "onSearch", "fieldNames", "customRender", "tagInputProps", "size", "onKeyDown"]);
95
+ rest = tslib.__rest(_a, ["prefixCls", "role", "className", "children", "disabled", "clearable", "showCheckAll", "showOnlyShowChecked", "placeholder", "displayRender", "onSelect", "height", "itemHeight", "virtual", "visible", "onOpen", "onClose", "appearance", "invalid", "dataSource", "filterOption", "searchable", "render", "renderExtraFooter", "onSearch", "fieldNames", "customRender", "tagInputProps", "size", "prefix", "suffix", "onKeyDown"]);
94
96
  var i18n = core.useLocaleContext();
95
97
  var placeholder = typeAssertion.isUndef(placeholderProp) ? i18n.get('checkSelect.placeholder') : placeholderProp;
96
98
  // ************************** Picker ************************* //
@@ -295,7 +297,8 @@ var CheckSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
295
297
  placeholder: placeholder,
296
298
  // @ts-ignore
297
299
  displayRender: displayRender,
298
- suffix: menuVisible ? /*#__PURE__*/React__default["default"].createElement(icons.UpOutlined, null) : /*#__PURE__*/React__default["default"].createElement(icons.DownOutlined, null),
300
+ prefix: prefix,
301
+ suffix: [menuVisible ? /*#__PURE__*/React__default["default"].createElement(icons.UpOutlined, null) : /*#__PURE__*/React__default["default"].createElement(icons.DownOutlined, null), suffix],
299
302
  focused: menuVisible,
300
303
  appearance: appearance,
301
304
  value: value,
@@ -75,8 +75,10 @@ var CheckSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
75
75
  tagInputProps = _a.tagInputProps,
76
76
  _a$size = _a.size,
77
77
  size = _a$size === void 0 ? 'md' : _a$size,
78
+ prefix = _a.prefix,
79
+ suffix = _a.suffix,
78
80
  onKeyDownProp = _a.onKeyDown,
79
- rest = __rest(_a, ["prefixCls", "role", "className", "children", "disabled", "clearable", "showCheckAll", "showOnlyShowChecked", "placeholder", "displayRender", "onSelect", "height", "itemHeight", "virtual", "visible", "onOpen", "onClose", "appearance", "invalid", "dataSource", "filterOption", "searchable", "render", "renderExtraFooter", "onSearch", "fieldNames", "customRender", "tagInputProps", "size", "onKeyDown"]);
81
+ rest = __rest(_a, ["prefixCls", "role", "className", "children", "disabled", "clearable", "showCheckAll", "showOnlyShowChecked", "placeholder", "displayRender", "onSelect", "height", "itemHeight", "virtual", "visible", "onOpen", "onClose", "appearance", "invalid", "dataSource", "filterOption", "searchable", "render", "renderExtraFooter", "onSearch", "fieldNames", "customRender", "tagInputProps", "size", "prefix", "suffix", "onKeyDown"]);
80
82
  var i18n = useLocaleContext();
81
83
  var placeholder = isUndef(placeholderProp) ? i18n.get('checkSelect.placeholder') : placeholderProp;
82
84
  // ************************** Picker ************************* //
@@ -281,7 +283,8 @@ var CheckSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
281
283
  placeholder: placeholder,
282
284
  // @ts-ignore
283
285
  displayRender: displayRender,
284
- suffix: menuVisible ? /*#__PURE__*/React.createElement(UpOutlined, null) : /*#__PURE__*/React.createElement(DownOutlined, null),
286
+ prefix: prefix,
287
+ suffix: [menuVisible ? /*#__PURE__*/React.createElement(UpOutlined, null) : /*#__PURE__*/React.createElement(DownOutlined, null), suffix],
285
288
  focused: menuVisible,
286
289
  appearance: appearance,
287
290
  value: value,
@@ -75,9 +75,13 @@ export interface CheckSelectProps extends Omit<PickerProps, 'trigger' | 'scrolla
75
75
  */
76
76
  renderExtraFooter?: () => React.ReactNode;
77
77
  /**
78
- * 自定义 input 后缀 icon
78
+ * 选择框前置内容
79
79
  */
80
- suffixIcon?: React.ReactNode;
80
+ prefix?: React.ReactNode;
81
+ /**
82
+ * 选择框后置内容
83
+ */
84
+ suffix?: React.ReactNode;
81
85
  /**
82
86
  * 自定义清除 tags 的 icon
83
87
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hi-ui/check-select",
3
- "version": "4.3.5",
3
+ "version": "4.4.0",
4
4
  "description": "A sub-package for @hi-ui/hiui.",
5
5
  "keywords": [],
6
6
  "author": "HiUI <mi-hiui@xiaomi.com>",
@@ -51,12 +51,12 @@
51
51
  "@hi-ui/func-utils": "^4.0.4",
52
52
  "@hi-ui/highlighter": "^4.0.8",
53
53
  "@hi-ui/icons": "^4.0.18",
54
- "@hi-ui/input": "^4.0.13",
55
- "@hi-ui/picker": "^4.1.4",
56
- "@hi-ui/popper": "^4.1.3",
57
- "@hi-ui/tag-input": "^4.0.10",
54
+ "@hi-ui/input": "^4.1.0",
55
+ "@hi-ui/picker": "^4.1.5",
56
+ "@hi-ui/popper": "^4.1.4",
57
+ "@hi-ui/tag-input": "^4.1.0",
58
58
  "@hi-ui/times": "^4.0.4",
59
- "@hi-ui/tree-utils": "^4.1.4",
59
+ "@hi-ui/tree-utils": "^4.1.6",
60
60
  "@hi-ui/type-assertion": "^4.0.4",
61
61
  "@hi-ui/use-check": "^4.0.5",
62
62
  "@hi-ui/use-children": "^4.0.4",