@hi-ui/check-tree-select 4.6.2 → 5.0.0-canary.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,54 @@
1
1
  # @hi-ui/check-tree-select
2
2
 
3
+ ## 5.0.0-canary.1
4
+
5
+ ### Minor Changes
6
+
7
+ - 6c4bf35af: feat: 下拉选择类组件 appearance 参数增加 contained 类型 (5.0)
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [6c4bf35af]
12
+ - @hi-ui/tag-input@5.0.0-canary.2
13
+
14
+ ## 5.0.0-canary.0
15
+
16
+ ### Major Changes
17
+
18
+ - 225ebaa51: feat: 组件的 package.json 中的 exports 统一加上 types 配置 (5.0)
19
+
20
+ ### Minor Changes
21
+
22
+ - 428716024: <br>
23
+ - feat(picker): 下拉选择类组件增加 xs 尺寸 (5.0)
24
+ - feat(input): 输入框组件增加 xs 尺寸 (5.0)
25
+
26
+ ### Patch Changes
27
+
28
+ - Updated dependencies [428716024]
29
+ - Updated dependencies [225ebaa51]
30
+ - Updated dependencies [192de8767]
31
+ - Updated dependencies [428716024]
32
+ - @hi-ui/picker@5.0.0-canary.0
33
+ - @hi-ui/tag-input@5.0.0-canary.0
34
+ - @hi-ui/core@5.0.0-canary.0
35
+ - @hi-ui/use-check@5.0.0-canary.0
36
+ - @hi-ui/use-data-source@5.0.0-canary.0
37
+ - @hi-ui/use-search-mode@5.0.0-canary.0
38
+ - @hi-ui/use-toggle@5.0.0-canary.0
39
+ - @hi-ui/use-uncontrolled-state@5.0.0-canary.0
40
+ - @hi-ui/icons@5.0.0-canary.0
41
+ - @hi-ui/checkbox@5.0.0-canary.0
42
+ - @hi-ui/highlighter@5.0.0-canary.0
43
+ - @hi-ui/popper@5.0.0-canary.0
44
+ - @hi-ui/tree@5.0.0-canary.0
45
+ - @hi-ui/array-utils@5.0.0-canary.0
46
+ - @hi-ui/classname@5.0.0-canary.0
47
+ - @hi-ui/env@5.0.0-canary.0
48
+ - @hi-ui/func-utils@5.0.0-canary.0
49
+ - @hi-ui/tree-utils@5.0.0-canary.0
50
+ - @hi-ui/type-assertion@5.0.0-canary.0
51
+
3
52
  ## 4.6.2
4
53
 
5
54
  ### Patch Changes
@@ -98,7 +98,8 @@ var CheckTreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
98
98
  customRender = _a.customRender,
99
99
  prefix = _a.prefix,
100
100
  suffix = _a.suffix,
101
- rest = tslib.__rest(_a, ["prefixCls", "role", "className", "data", "dataSource", "disabled", "visible", "onOpen", "onClose", "fieldNames", "checkedMode", "defaultExpandAll", "expandedIds", "defaultExpandedIds", "onExpand", "defaultValue", "value", "onChange", "searchable", "searchMode", "onLoadChildren", "render", "filterOption", "keyword", "onSearch", "clearable", "invalid", "displayRender", "placeholder", "appearance", "virtual", "itemHeight", "height", "showCheckAll", "showOnlyShowChecked", "tagInputProps", "size", "customRender", "prefix", "suffix"]);
101
+ label = _a.label,
102
+ rest = tslib.__rest(_a, ["prefixCls", "role", "className", "data", "dataSource", "disabled", "visible", "onOpen", "onClose", "fieldNames", "checkedMode", "defaultExpandAll", "expandedIds", "defaultExpandedIds", "onExpand", "defaultValue", "value", "onChange", "searchable", "searchMode", "onLoadChildren", "render", "filterOption", "keyword", "onSearch", "clearable", "invalid", "displayRender", "placeholder", "appearance", "virtual", "itemHeight", "height", "showCheckAll", "showOnlyShowChecked", "tagInputProps", "size", "customRender", "prefix", "suffix", "label"]);
102
103
  var i18n = core.useLocaleContext();
103
104
  var placeholder = typeAssertion.isUndef(placeholderProp) ? i18n.get('checkTreeSelect.placeholder') : placeholderProp;
104
105
  var _useUncontrolledToggl = useToggle.useUncontrolledToggle({
@@ -305,8 +306,13 @@ var CheckTreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
305
306
  onSearch: funcUtils.callAllFuncs(onSearchProp, onSearch),
306
307
  footer: renderDefaultFooter(),
307
308
  loading: rest.loading !== undefined ? rest.loading : loading,
308
- trigger: customRender ? typeof customRender === 'function' ? customRender(checkedNodes) : customRender : ( /*#__PURE__*/React__default["default"].createElement(tagInput.TagInputMock, Object.assign({}, tagInputProps, {
309
+ trigger: customRender ? typeof customRender === 'function' ? customRender(checkedNodes) : customRender : ( /*#__PURE__*/React__default["default"].createElement(tagInput.TagInputMock, Object.assign({
310
+ style: {
311
+ maxWidth: appearance === 'contained' ? '360px' : undefined
312
+ }
313
+ }, tagInputProps, {
309
314
  size: size,
315
+ label: label,
310
316
  // ref={targetElementRef}
311
317
  // onClick={openMenu}
312
318
  // disabled={disabled}
@@ -85,7 +85,8 @@ var CheckTreeSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
85
85
  customRender = _a.customRender,
86
86
  prefix = _a.prefix,
87
87
  suffix = _a.suffix,
88
- rest = __rest(_a, ["prefixCls", "role", "className", "data", "dataSource", "disabled", "visible", "onOpen", "onClose", "fieldNames", "checkedMode", "defaultExpandAll", "expandedIds", "defaultExpandedIds", "onExpand", "defaultValue", "value", "onChange", "searchable", "searchMode", "onLoadChildren", "render", "filterOption", "keyword", "onSearch", "clearable", "invalid", "displayRender", "placeholder", "appearance", "virtual", "itemHeight", "height", "showCheckAll", "showOnlyShowChecked", "tagInputProps", "size", "customRender", "prefix", "suffix"]);
88
+ label = _a.label,
89
+ rest = __rest(_a, ["prefixCls", "role", "className", "data", "dataSource", "disabled", "visible", "onOpen", "onClose", "fieldNames", "checkedMode", "defaultExpandAll", "expandedIds", "defaultExpandedIds", "onExpand", "defaultValue", "value", "onChange", "searchable", "searchMode", "onLoadChildren", "render", "filterOption", "keyword", "onSearch", "clearable", "invalid", "displayRender", "placeholder", "appearance", "virtual", "itemHeight", "height", "showCheckAll", "showOnlyShowChecked", "tagInputProps", "size", "customRender", "prefix", "suffix", "label"]);
89
90
  var i18n = useLocaleContext();
90
91
  var placeholder = isUndef(placeholderProp) ? i18n.get('checkTreeSelect.placeholder') : placeholderProp;
91
92
  var _useUncontrolledToggl = useUncontrolledToggle({
@@ -292,8 +293,13 @@ var CheckTreeSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
292
293
  onSearch: callAllFuncs(onSearchProp, onSearch),
293
294
  footer: renderDefaultFooter(),
294
295
  loading: rest.loading !== undefined ? rest.loading : loading,
295
- trigger: customRender ? typeof customRender === 'function' ? customRender(checkedNodes) : customRender : ( /*#__PURE__*/React.createElement(TagInputMock, Object.assign({}, tagInputProps, {
296
+ trigger: customRender ? typeof customRender === 'function' ? customRender(checkedNodes) : customRender : ( /*#__PURE__*/React.createElement(TagInputMock, Object.assign({
297
+ style: {
298
+ maxWidth: appearance === 'contained' ? '360px' : undefined
299
+ }
300
+ }, tagInputProps, {
296
301
  size: size,
302
+ label: label,
297
303
  // ref={targetElementRef}
298
304
  // onClick={openMenu}
299
305
  // disabled={disabled}
@@ -119,6 +119,10 @@ export interface CheckTreeSelectProps extends Omit<PickerProps, 'data' | 'onChan
119
119
  * 设置展现形式
120
120
  */
121
121
  appearance?: CheckTreeSelectAppearanceEnum;
122
+ /**
123
+ * 设置输入框 label 内容,仅在 appearance 为 contained 时生效
124
+ */
125
+ label?: React.ReactNode;
122
126
  /**
123
127
  * 设置虚拟滚动容器的可视高度。暂不对外暴露
124
128
  * @private
@@ -77,4 +77,4 @@ export interface CheckTreeSelectDataSource<T = any> {
77
77
  }
78
78
  export interface CheckTreeSelectItemEventData extends TreeNodeEventData {
79
79
  }
80
- export declare type CheckTreeSelectAppearanceEnum = HiBaseAppearanceEnum | undefined;
80
+ export declare type CheckTreeSelectAppearanceEnum = HiBaseAppearanceEnum | 'contained' | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hi-ui/check-tree-select",
3
- "version": "4.6.2",
3
+ "version": "5.0.0-canary.1",
4
4
  "description": "A sub-package for @hi-ui/hiui.",
5
5
  "keywords": [],
6
6
  "author": "HiUI <mi-hiui@xiaomi.com>",
@@ -20,7 +20,8 @@
20
20
  "exports": {
21
21
  ".": {
22
22
  "require": "./lib/cjs/index.js",
23
- "default": "./lib/esm/index.js"
23
+ "default": "./lib/esm/index.js",
24
+ "types": "./lib/types/index.d.ts"
24
25
  }
25
26
  },
26
27
  "publishConfig": {
@@ -43,33 +44,33 @@
43
44
  "url": "https://github.com/XiaoMi/hiui/issues"
44
45
  },
45
46
  "dependencies": {
46
- "@hi-ui/array-utils": "^4.0.5",
47
- "@hi-ui/checkbox": "^4.0.10",
48
- "@hi-ui/classname": "^4.0.5",
49
- "@hi-ui/env": "^4.0.5",
50
- "@hi-ui/func-utils": "^4.0.4",
51
- "@hi-ui/highlighter": "^4.1.0",
52
- "@hi-ui/icons": "^4.0.19",
53
- "@hi-ui/picker": "^4.1.6",
54
- "@hi-ui/popper": "^4.1.5",
55
- "@hi-ui/tag-input": "^4.1.3",
56
- "@hi-ui/tree": "^4.6.1",
57
- "@hi-ui/tree-utils": "^4.1.6",
58
- "@hi-ui/type-assertion": "^4.0.4",
59
- "@hi-ui/use-check": "^4.0.5",
60
- "@hi-ui/use-data-source": "^4.0.4",
61
- "@hi-ui/use-search-mode": "^4.1.4",
62
- "@hi-ui/use-toggle": "^4.0.4",
63
- "@hi-ui/use-uncontrolled-state": "^4.0.4"
47
+ "@hi-ui/array-utils": "^5.0.0-canary.0",
48
+ "@hi-ui/checkbox": "^5.0.0-canary.0",
49
+ "@hi-ui/classname": "^5.0.0-canary.0",
50
+ "@hi-ui/env": "^5.0.0-canary.0",
51
+ "@hi-ui/func-utils": "^5.0.0-canary.0",
52
+ "@hi-ui/highlighter": "^5.0.0-canary.0",
53
+ "@hi-ui/icons": "^5.0.0-canary.0",
54
+ "@hi-ui/picker": "^5.0.0-canary.0",
55
+ "@hi-ui/popper": "^5.0.0-canary.0",
56
+ "@hi-ui/tag-input": "^5.0.0-canary.2",
57
+ "@hi-ui/tree": "^5.0.0-canary.0",
58
+ "@hi-ui/tree-utils": "^5.0.0-canary.0",
59
+ "@hi-ui/type-assertion": "^5.0.0-canary.0",
60
+ "@hi-ui/use-check": "^5.0.0-canary.0",
61
+ "@hi-ui/use-data-source": "^5.0.0-canary.0",
62
+ "@hi-ui/use-search-mode": "^5.0.0-canary.0",
63
+ "@hi-ui/use-toggle": "^5.0.0-canary.0",
64
+ "@hi-ui/use-uncontrolled-state": "^5.0.0-canary.0"
64
65
  },
65
66
  "peerDependencies": {
66
- "@hi-ui/core": ">=4.0.8",
67
+ "@hi-ui/core": ">=5.0.0-canary.0",
67
68
  "react": ">=16.8.6",
68
69
  "react-dom": ">=16.8.6"
69
70
  },
70
71
  "devDependencies": {
71
- "@hi-ui/core": "^4.0.8",
72
- "@hi-ui/core-css": "^4.1.5",
72
+ "@hi-ui/core": "^5.0.0-canary.0",
73
+ "@hi-ui/core-css": "^5.0.0-canary.0",
73
74
  "react": "^17.0.1",
74
75
  "react-dom": "^17.0.1"
75
76
  }