@hi-ui/check-tree-select 5.0.0-canary.0 → 5.0.0-canary.2

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,29 @@
1
1
  # @hi-ui/check-tree-select
2
2
 
3
+ ## 5.0.0-canary.2
4
+
5
+ ### Patch Changes
6
+
7
+ - df3615e78: <br>
8
+ - style(tag-input): 间距调整 (5.0)
9
+ - style(select): 选择类组件选项圆角改为 4px (5.0)
10
+ - style(picker): 搜索框样式调整 (5.0)
11
+ - Updated dependencies [3cb3377dc]
12
+ - Updated dependencies [df3615e78]
13
+ - @hi-ui/picker@5.0.0-canary.3
14
+ - @hi-ui/tag-input@5.0.0-canary.4
15
+
16
+ ## 5.0.0-canary.1
17
+
18
+ ### Minor Changes
19
+
20
+ - 6c4bf35af: feat: 下拉选择类组件 appearance 参数增加 contained 类型 (5.0)
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [6c4bf35af]
25
+ - @hi-ui/tag-input@5.0.0-canary.2
26
+
3
27
  ## 5.0.0-canary.0
4
28
 
5
29
  ### Major 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}
@@ -12,7 +12,7 @@
12
12
  Object.defineProperty(exports, '__esModule', {
13
13
  value: true
14
14
  });
15
- var css_248z = "";
15
+ var css_248z = ".hi-v5-check-tree-select__tree .hi-v5-tree-node__wrap {border-radius: var(--hi-v5-border-radius-md, 4px);}";
16
16
  var __styleInject__ = require('@hi-ui/style-inject')["default"];
17
17
  __styleInject__(css_248z);
18
18
  exports["default"] = css_248z;
@@ -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}
@@ -8,6 +8,6 @@
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
10
  import __styleInject__ from '@hi-ui/style-inject';
11
- var css_248z = "";
11
+ var css_248z = ".hi-v5-check-tree-select__tree .hi-v5-tree-node__wrap {border-radius: var(--hi-v5-border-radius-md, 4px);}";
12
12
  __styleInject__(css_248z);
13
13
  export { css_248z as default };
@@ -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": "5.0.0-canary.0",
3
+ "version": "5.0.0-canary.2",
4
4
  "description": "A sub-package for @hi-ui/hiui.",
5
5
  "keywords": [],
6
6
  "author": "HiUI <mi-hiui@xiaomi.com>",
@@ -51,9 +51,9 @@
51
51
  "@hi-ui/func-utils": "^5.0.0-canary.0",
52
52
  "@hi-ui/highlighter": "^5.0.0-canary.0",
53
53
  "@hi-ui/icons": "^5.0.0-canary.0",
54
- "@hi-ui/picker": "^5.0.0-canary.0",
54
+ "@hi-ui/picker": "^5.0.0-canary.3",
55
55
  "@hi-ui/popper": "^5.0.0-canary.0",
56
- "@hi-ui/tag-input": "^5.0.0-canary.0",
56
+ "@hi-ui/tag-input": "^5.0.0-canary.4",
57
57
  "@hi-ui/tree": "^5.0.0-canary.0",
58
58
  "@hi-ui/tree-utils": "^5.0.0-canary.0",
59
59
  "@hi-ui/type-assertion": "^5.0.0-canary.0",
@@ -70,7 +70,7 @@
70
70
  },
71
71
  "devDependencies": {
72
72
  "@hi-ui/core": "^5.0.0-canary.0",
73
- "@hi-ui/core-css": "^5.0.0-canary.0",
73
+ "@hi-ui/core-css": "^5.0.0-canary.2",
74
74
  "react": "^17.0.1",
75
75
  "react-dom": "^17.0.1"
76
76
  }