@hi-ui/check-cascader 5.0.0-experimental.2 → 5.0.0-rc.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.
Files changed (24) hide show
  1. package/CHANGELOG.md +39 -73
  2. package/lib/cjs/CheckCascader.js +4 -1
  3. package/lib/cjs/CheckCascaderMenu.js +2 -5
  4. package/lib/cjs/icons/index.js +7 -2
  5. package/lib/cjs/ui/virtual-list/lib/esm/node_modules/rc-resize-observer/node_modules/rc-util/es/Children/toArray.js +1 -1
  6. package/lib/cjs/ui/virtual-list/lib/esm/node_modules/rc-resize-observer/node_modules/rc-util/es/ref.js +1 -1
  7. package/lib/cjs/ui/virtual-list/lib/esm/node_modules/{rc-resize-observer/node_modules/react-is → react-is}/cjs/react-is.development.js +1 -1
  8. package/lib/cjs/ui/virtual-list/lib/esm/node_modules/{rc-resize-observer/node_modules/react-is → react-is}/cjs/react-is.production.min.js +1 -1
  9. package/lib/cjs/ui/virtual-list/lib/esm/node_modules/{rc-resize-observer/node_modules/react-is → react-is}/index.js +3 -3
  10. package/lib/esm/CheckCascader.js +4 -1
  11. package/lib/esm/CheckCascaderMenu.js +3 -6
  12. package/lib/esm/icons/index.js +8 -3
  13. package/lib/esm/ui/virtual-list/lib/esm/node_modules/rc-resize-observer/node_modules/rc-util/es/Children/toArray.js +1 -1
  14. package/lib/esm/ui/virtual-list/lib/esm/node_modules/rc-resize-observer/node_modules/rc-util/es/ref.js +1 -1
  15. package/lib/esm/ui/virtual-list/lib/esm/node_modules/{rc-resize-observer/node_modules/react-is → react-is}/cjs/react-is.development.js +1 -1
  16. package/lib/esm/ui/virtual-list/lib/esm/node_modules/{rc-resize-observer/node_modules/react-is → react-is}/cjs/react-is.production.min.js +1 -1
  17. package/lib/esm/ui/virtual-list/lib/esm/node_modules/{rc-resize-observer/node_modules/react-is → react-is}/index.js +3 -3
  18. package/lib/types/CheckCascader.d.ts +4 -4
  19. package/lib/types/hooks/use-async-switch.d.ts +1 -1
  20. package/lib/types/hooks/use-check.d.ts +2 -2
  21. package/lib/types/icons/index.d.ts +1 -1
  22. package/lib/types/types.d.ts +2 -2
  23. package/lib/types/utils/index.d.ts +4 -4
  24. package/package.json +27 -27
package/CHANGELOG.md CHANGED
@@ -1,44 +1,6 @@
1
1
  # @hi-ui/check-cascader
2
2
 
3
- ## 5.0.0-experimental.2
4
-
5
- ### Minor Changes
6
-
7
- - 59cef699f: feat: 组件语义化样式改造,增加 styles 和 classNames 属性 (5.0)
8
-
9
- ### Patch Changes
10
-
11
- - eb17c4697: style: 修复 UI/样式问题 (5.0)
12
- - Updated dependencies [7f204c892]
13
- - Updated dependencies [eb17c4697]
14
- - Updated dependencies [eb17c4697]
15
- - Updated dependencies [c407744fe]
16
- - Updated dependencies [59cef699f]
17
- - @hi-ui/icons@5.0.0-experimental.1
18
- - @hi-ui/core@5.0.0-experimental.1
19
- - @hi-ui/checkbox@5.0.0-experimental.1
20
- - @hi-ui/input@5.0.0-experimental.2
21
- - @hi-ui/picker@5.0.0-experimental.2
22
- - @hi-ui/popper@5.0.0-experimental.1
23
- - @hi-ui/tag-input@5.0.0-experimental.2
24
- - @hi-ui/use-merge-semantic@5.0.0-experimental.0
25
- - @hi-ui/spinner@5.0.0-experimental.1
26
-
27
- ## 5.0.0-experimental.1
28
-
29
- ### Patch Changes
30
-
31
- - 8f23e9322: style: 表单类组件统一调整后缀颜色、placeholder 颜色 (5.0)
32
- - 发布 hiui experimental 版本
33
- - Updated dependencies [8f23e9322]
34
- - Updated dependencies [b27483796]
35
- - Updated dependencies [900c6c2f0]
36
- - Updated dependencies
37
- - @hi-ui/input@5.0.0-experimental.1
38
- - @hi-ui/picker@5.0.0-experimental.1
39
- - @hi-ui/tag-input@5.0.0-experimental.1
40
-
41
- ## 5.0.0-experimental.0
3
+ ## 5.0.0-rc.0
42
4
 
43
5
  ### Major Changes
44
6
 
@@ -55,21 +17,21 @@
55
17
  - 6dca7795c: feat: 下拉选择组件增加 showIndicator 参数 & 修改 appearance 中的 unset 样式 (5.0)
56
18
  - 77d969c2e: feat: 下拉选择类组件 appearance 参数增加 contained 类型 (5.0)
57
19
  - 58ad82e94: feat: 输入框和选择器组件增加 borderless 形态 (5.0)
20
+ - 59cef699f: feat: 组件语义化样式改造,增加 styles 和 classNames 属性 (5.0)
58
21
 
59
22
  ### Patch Changes
60
23
 
61
- - 6fb223e3a: style: fix ui bug (5.0)
62
24
  - 9b34d99bc: chore: 将代码中 v4 改为 v5 (5.0)
63
- - 1662753e0: style: fix ui bug (5.0)
64
25
  - cf89262c7: style(picker): 移除 picker 组件中的 \_\_text 样式定义 (5.0)
65
26
  - 68dccedb1: fix(check-cascader): 修复非平铺展示搜索结果时显示出层级问题 (5.0)
66
27
  - 9b34d99bc: fix: 修复 5.0 UI 问题 (5.0)
67
28
  - 1dbc23ca5: feat(check-cascader): 增加全选功能
68
29
  - cb9d8f6db: fix(tag-input): 修复 contained 模式下 displayRender 设置无效问题 (5.0)
69
- - be5a59325: style: 修改样式问题 (5.0)
70
30
  - 79ea480f3: feat(global-context): 增加 size api 全局配置 (5.0)
71
31
  - 2e56529f7: styles: 主题定制功能完善&&样式变量化写法改造&&兼容 RTL (5.0)
72
32
  - 95abba983: fix: 修改 UI 问题 (5.0)
33
+ - 8f23e9322: style: 表单类组件统一调整后缀颜色、placeholder 颜色 (5.0)
34
+ - eb17c4697: style: 修复 UI/样式问题 (5.0)
73
35
  - de8d058dc: perf: 对下拉选择类组件的 customRender 的内容增加 memoization 以优化性能 (5.0)
74
36
  - 5210770d9: feat(picker): add header api (5.0)
75
37
  - 424700fc5: style(cascader&check-cascader): 调整下拉框样式,增加搜索框宽度设置 (5.0)
@@ -97,72 +59,76 @@
97
59
  - Updated dependencies [1e226cd66]
98
60
  - Updated dependencies [cce71cdfa]
99
61
  - Updated dependencies [b9989e482]
100
- - Updated dependencies [1662753e0]
62
+ - Updated dependencies [7f204c892]
101
63
  - Updated dependencies [122d1d859]
102
64
  - Updated dependencies [f1ab51725]
103
65
  - Updated dependencies [41552be0b]
66
+ - Updated dependencies [eb17c4697]
104
67
  - Updated dependencies [8c0ee78f0]
105
68
  - Updated dependencies [9b34d99bc]
106
69
  - Updated dependencies [8f3aa85e4]
107
- - Updated dependencies [f4fc0ef30]
108
70
  - Updated dependencies [cb9d8f6db]
109
71
  - Updated dependencies [ec4c7faa2]
110
72
  - Updated dependencies [29cae09ea]
111
73
  - Updated dependencies [fd4c20bbd]
112
- - Updated dependencies [be5a59325]
113
- - Updated dependencies [71fc15e5c]
114
74
  - Updated dependencies [f8acad4e1]
115
75
  - Updated dependencies [79ea480f3]
116
76
  - Updated dependencies [2e56529f7]
77
+ - Updated dependencies [3a7186e4b]
117
78
  - Updated dependencies [277c5033a]
118
79
  - Updated dependencies [4e0ed3a31]
119
80
  - Updated dependencies [95abba983]
81
+ - Updated dependencies [8f23e9322]
120
82
  - Updated dependencies [4a31cea53]
83
+ - Updated dependencies [b27483796]
84
+ - Updated dependencies [eb17c4697]
121
85
  - Updated dependencies [976ec929d]
122
86
  - Updated dependencies [f1ab51725]
123
87
  - Updated dependencies [6dca7795c]
88
+ - Updated dependencies [900c6c2f0]
124
89
  - Updated dependencies [7b956b1eb]
125
90
  - Updated dependencies [5210770d9]
126
- - Updated dependencies [e2d184e74]
127
91
  - Updated dependencies [4006b2c8c]
92
+ - Updated dependencies [c407744fe]
93
+ - Updated dependencies [d91a8bb0f]
128
94
  - Updated dependencies [77d969c2e]
129
95
  - Updated dependencies [9ecf354ba]
130
96
  - Updated dependencies [e42e2badf]
131
97
  - Updated dependencies [33da3144e]
132
98
  - Updated dependencies [e7b64347e]
133
- - Updated dependencies [7f3abee55]
134
99
  - Updated dependencies [6fcda9bf2]
135
100
  - Updated dependencies [0a4e90dbd]
136
101
  - Updated dependencies [58ad82e94]
137
- - Updated dependencies [a0f0c9d6b]
102
+ - Updated dependencies [95d930354]
138
103
  - Updated dependencies [f2be367e9]
139
104
  - Updated dependencies [1972fd16a]
105
+ - Updated dependencies [59cef699f]
140
106
  - Updated dependencies [99801c2d1]
141
- - Updated dependencies [86910f5e2]
142
107
  - Updated dependencies [cb7b794d0]
143
- - @hi-ui/picker@5.0.0-experimental.0
144
- - @hi-ui/input@5.0.0-experimental.0
145
- - @hi-ui/popper@5.0.0-experimental.0
146
- - @hi-ui/tag-input@5.0.0-experimental.0
147
- - @hi-ui/icons@5.0.0-experimental.0
148
- - @hi-ui/core@5.0.0-experimental.0
149
- - @hi-ui/use-check@5.0.0-experimental.0
150
- - @hi-ui/use-data-source@5.0.0-experimental.0
151
- - @hi-ui/use-latest@5.0.0-experimental.0
152
- - @hi-ui/use-merge-refs@5.0.0-experimental.0
153
- - @hi-ui/use-outside-click@5.0.0-experimental.0
154
- - @hi-ui/use-search-mode@5.0.0-experimental.0
155
- - @hi-ui/use-toggle@5.0.0-experimental.0
156
- - @hi-ui/use-uncontrolled-state@5.0.0-experimental.0
157
- - @hi-ui/checkbox@5.0.0-experimental.0
158
- - @hi-ui/spinner@5.0.0-experimental.0
159
- - @hi-ui/array-utils@5.0.0-experimental.0
160
- - @hi-ui/classname@5.0.0-experimental.0
161
- - @hi-ui/env@5.0.0-experimental.0
162
- - @hi-ui/func-utils@5.0.0-experimental.0
163
- - @hi-ui/times@5.0.0-experimental.0
164
- - @hi-ui/tree-utils@5.0.0-experimental.0
165
- - @hi-ui/type-assertion@5.0.0-experimental.0
108
+ - @hi-ui/picker@5.0.0-rc.0
109
+ - @hi-ui/input@5.0.0-rc.0
110
+ - @hi-ui/popper@5.0.0-rc.0
111
+ - @hi-ui/tag-input@5.0.0-rc.0
112
+ - @hi-ui/icons@5.0.0-rc.0
113
+ - @hi-ui/core@5.0.0-rc.0
114
+ - @hi-ui/use-check@5.0.0-rc.0
115
+ - @hi-ui/use-data-source@5.0.0-rc.0
116
+ - @hi-ui/use-latest@5.0.0-rc.0
117
+ - @hi-ui/use-merge-refs@5.0.0-rc.0
118
+ - @hi-ui/use-outside-click@5.0.0-rc.0
119
+ - @hi-ui/use-search-mode@5.0.0-rc.0
120
+ - @hi-ui/use-toggle@5.0.0-rc.0
121
+ - @hi-ui/use-uncontrolled-state@5.0.0-rc.0
122
+ - @hi-ui/checkbox@5.0.0-rc.0
123
+ - @hi-ui/spinner@5.0.0-rc.0
124
+ - @hi-ui/array-utils@5.0.0-rc.0
125
+ - @hi-ui/classname@5.0.0-rc.0
126
+ - @hi-ui/env@5.0.0-rc.0
127
+ - @hi-ui/func-utils@5.0.0-rc.0
128
+ - @hi-ui/times@5.0.0-rc.0
129
+ - @hi-ui/tree-utils@5.0.0-rc.0
130
+ - @hi-ui/type-assertion@5.0.0-rc.0
131
+ - @hi-ui/use-merge-semantic@5.0.0-rc.0
166
132
 
167
133
  ## 4.5.2
168
134
 
@@ -108,6 +108,8 @@ var CheckCascader = /*#__PURE__*/React.forwardRef(function (_a, ref) {
108
108
  globalSize = _useGlobalContext.size,
109
109
  checkCascaderConfig = _useGlobalContext.checkCascader;
110
110
  var size = (_b = sizeProp !== null && sizeProp !== void 0 ? sizeProp : globalSize) !== null && _b !== void 0 ? _b : 'md';
111
+ var _useGlobalContext2 = core.useGlobalContext(),
112
+ direction = _useGlobalContext2.direction;
111
113
  var i18n = core.useLocaleContext();
112
114
  var _useMergeSemantic = useMergeSemantic.useMergeSemantic({
113
115
  classNamesList: [checkCascaderConfig === null || checkCascaderConfig === void 0 ? void 0 : checkCascaderConfig.classNames, classNamesProp],
@@ -332,7 +334,8 @@ var CheckCascader = /*#__PURE__*/React.forwardRef(function (_a, ref) {
332
334
  }, rest, {
333
335
  // 这种展现形式宽度是不固定的,关掉宽度匹配策略
334
336
  overlay: Object.assign({
335
- matchWidth: false
337
+ matchWidth: false,
338
+ placement: direction === 'rtl' ? 'bottom-end' : 'bottom-start'
336
339
  }, rest.overlay),
337
340
  visible: menuVisible,
338
341
  onOpen: function onOpen() {
@@ -181,11 +181,8 @@ var renderSuffix = function renderSuffix(prefixCls, node, loading, onLoadChildre
181
181
  var canLoadChildren = onLoadChildren && !node.children && !node.isLeaf;
182
182
  if (hasChildren || canLoadChildren) {
183
183
  return /*#__PURE__*/React__default["default"].createElement("span", {
184
- className: classname.cx(prefixCls + "-switcher"),
185
- style: {
186
- transform: "rotate(-90deg)"
187
- }
188
- }, index$1.defaultSuffixIcon);
184
+ className: classname.cx(prefixCls + "-switcher")
185
+ }, /*#__PURE__*/React__default["default"].createElement(index$1.DefaultSuffixIcon, null));
189
186
  }
190
187
  return /*#__PURE__*/React__default["default"].createElement("span", {
191
188
  className: classname.cx(prefixCls + "-switcher", prefixCls + "-switcher--noop")
@@ -16,17 +16,22 @@ Object.defineProperty(exports, '__esModule', {
16
16
  var React = require('react');
17
17
  var icons = require('@hi-ui/icons');
18
18
  var spinner = require('@hi-ui/spinner');
19
+ var core = require('@hi-ui/core');
19
20
  function _interopDefaultCompat(e) {
20
21
  return e && _typeof(e) === 'object' && 'default' in e ? e : {
21
22
  'default': e
22
23
  };
23
24
  }
24
25
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
25
- var defaultSuffixIcon = /*#__PURE__*/React__default["default"].createElement(icons.DownOutlined, null);
26
+ var DefaultSuffixIcon = function DefaultSuffixIcon() {
27
+ var _useGlobalContext = core.useGlobalContext(),
28
+ direction = _useGlobalContext.direction;
29
+ return direction === 'rtl' ? /*#__PURE__*/React__default["default"].createElement(icons.LeftOutlined, null) : /*#__PURE__*/React__default["default"].createElement(icons.RightOutlined, null);
30
+ };
26
31
  var defaultLeafIcon = null;
27
32
  var defaultLoadingIcon = /*#__PURE__*/React__default["default"].createElement(spinner.Spinner, {
28
33
  size: "sm"
29
34
  });
35
+ exports.DefaultSuffixIcon = DefaultSuffixIcon;
30
36
  exports.defaultLeafIcon = defaultLeafIcon;
31
37
  exports.defaultLoadingIcon = defaultLoadingIcon;
32
- exports.defaultSuffixIcon = defaultSuffixIcon;
@@ -14,7 +14,7 @@ Object.defineProperty(exports, '__esModule', {
14
14
  value: true
15
15
  });
16
16
  var React = require('react');
17
- require('../../../react-is/index.js');
17
+ require('../../../../../react-is/index.js');
18
18
  var index2 = require('../../../../../../_virtual/index2.js');
19
19
  function _interopDefaultCompat(e) {
20
20
  return e && _typeof(e) === 'object' && 'default' in e ? e : {
@@ -14,7 +14,7 @@ Object.defineProperty(exports, '__esModule', {
14
14
  value: true
15
15
  });
16
16
  var _typeof = require('@babel/runtime/helpers/esm/typeof');
17
- require('../../react-is/index.js');
17
+ require('../../../../react-is/index.js');
18
18
  var index2 = require('../../../../../_virtual/index2.js');
19
19
  function _interopDefaultCompat(e) {
20
20
  return e && _typeof2(e) === 'object' && 'default' in e ? e : {
@@ -14,7 +14,7 @@ Object.defineProperty(exports, '__esModule', {
14
14
  value: true
15
15
  });
16
16
  var _typeof = require('@babel/runtime/helpers/esm/typeof');
17
- var reactIs_development = require('../../../../../_virtual/react-is.development.js');
17
+ var reactIs_development = require('../../../_virtual/react-is.development.js');
18
18
  function _interopDefaultCompat(e) {
19
19
  return e && _typeof2(e) === 'object' && 'default' in e ? e : {
20
20
  'default': e
@@ -14,7 +14,7 @@ Object.defineProperty(exports, '__esModule', {
14
14
  value: true
15
15
  });
16
16
  var _typeof = require('@babel/runtime/helpers/esm/typeof');
17
- var reactIs_production_min = require('../../../../../_virtual/react-is.production.min.js');
17
+ var reactIs_production_min = require('../../../_virtual/react-is.production.min.js');
18
18
  function _interopDefaultCompat(e) {
19
19
  return e && _typeof2(e) === 'object' && 'default' in e ? e : {
20
20
  'default': e
@@ -9,11 +9,11 @@
9
9
  */
10
10
  'use strict';
11
11
 
12
- var index2 = require('../../../../_virtual/index2.js');
12
+ var index2 = require('../../_virtual/index2.js');
13
13
  require('./cjs/react-is.production.min.js');
14
14
  require('./cjs/react-is.development.js');
15
- var reactIs_production_min = require('../../../../_virtual/react-is.production.min.js');
16
- var reactIs_development = require('../../../../_virtual/react-is.development.js');
15
+ var reactIs_production_min = require('../../_virtual/react-is.production.min.js');
16
+ var reactIs_development = require('../../_virtual/react-is.development.js');
17
17
 
18
18
  /** @LICENSE
19
19
  * @hi-ui/virtual-list
@@ -95,6 +95,8 @@ var CheckCascader = /*#__PURE__*/forwardRef(function (_a, ref) {
95
95
  globalSize = _useGlobalContext.size,
96
96
  checkCascaderConfig = _useGlobalContext.checkCascader;
97
97
  var size = (_b = sizeProp !== null && sizeProp !== void 0 ? sizeProp : globalSize) !== null && _b !== void 0 ? _b : 'md';
98
+ var _useGlobalContext2 = useGlobalContext(),
99
+ direction = _useGlobalContext2.direction;
98
100
  var i18n = useLocaleContext();
99
101
  var _useMergeSemantic = useMergeSemantic({
100
102
  classNamesList: [checkCascaderConfig === null || checkCascaderConfig === void 0 ? void 0 : checkCascaderConfig.classNames, classNamesProp],
@@ -319,7 +321,8 @@ var CheckCascader = /*#__PURE__*/forwardRef(function (_a, ref) {
319
321
  }, rest, {
320
322
  // 这种展现形式宽度是不固定的,关掉宽度匹配策略
321
323
  overlay: Object.assign({
322
- matchWidth: false
324
+ matchWidth: false,
325
+ placement: direction === 'rtl' ? 'bottom-end' : 'bottom-start'
323
326
  }, rest.overlay),
324
327
  visible: menuVisible,
325
328
  onOpen: function onOpen() {
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import React__default, { forwardRef, useCallback } from 'react';
11
11
  import { getPrefixCls, cx } from '@hi-ui/classname';
12
- import { defaultLoadingIcon, defaultSuffixIcon, defaultLeafIcon } from './icons/index.js';
12
+ import { defaultLoadingIcon, DefaultSuffixIcon, defaultLeafIcon } from './icons/index.js';
13
13
  import Checkbox from '@hi-ui/checkbox';
14
14
  import { useCheckCascaderContext } from './context.js';
15
15
  import { getCascaderItemEventData } from './utils/index.js';
@@ -168,11 +168,8 @@ var renderSuffix = function renderSuffix(prefixCls, node, loading, onLoadChildre
168
168
  var canLoadChildren = onLoadChildren && !node.children && !node.isLeaf;
169
169
  if (hasChildren || canLoadChildren) {
170
170
  return /*#__PURE__*/React__default.createElement("span", {
171
- className: cx(prefixCls + "-switcher"),
172
- style: {
173
- transform: "rotate(-90deg)"
174
- }
175
- }, defaultSuffixIcon);
171
+ className: cx(prefixCls + "-switcher")
172
+ }, /*#__PURE__*/React__default.createElement(DefaultSuffixIcon, null));
176
173
  }
177
174
  return /*#__PURE__*/React__default.createElement("span", {
178
175
  className: cx(prefixCls + "-switcher", prefixCls + "-switcher--noop")
@@ -8,11 +8,16 @@
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
10
  import React__default from 'react';
11
- import { DownOutlined } from '@hi-ui/icons';
11
+ import { LeftOutlined, RightOutlined } from '@hi-ui/icons';
12
12
  import { Spinner } from '@hi-ui/spinner';
13
- var defaultSuffixIcon = /*#__PURE__*/React__default.createElement(DownOutlined, null);
13
+ import { useGlobalContext } from '@hi-ui/core';
14
+ var DefaultSuffixIcon = function DefaultSuffixIcon() {
15
+ var _useGlobalContext = useGlobalContext(),
16
+ direction = _useGlobalContext.direction;
17
+ return direction === 'rtl' ? /*#__PURE__*/React__default.createElement(LeftOutlined, null) : /*#__PURE__*/React__default.createElement(RightOutlined, null);
18
+ };
14
19
  var defaultLeafIcon = null;
15
20
  var defaultLoadingIcon = /*#__PURE__*/React__default.createElement(Spinner, {
16
21
  size: "sm"
17
22
  });
18
- export { defaultLeafIcon, defaultLoadingIcon, defaultSuffixIcon };
23
+ export { DefaultSuffixIcon, defaultLeafIcon, defaultLoadingIcon };
@@ -8,7 +8,7 @@
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
10
  import React__default from 'react';
11
- import '../../../react-is/index.js';
11
+ import '../../../../../react-is/index.js';
12
12
  import { r as reactIs } from '../../../../../../_virtual/index2.js';
13
13
 
14
14
  /** @LICENSE
@@ -8,7 +8,7 @@
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
10
  import _typeof from '@babel/runtime/helpers/esm/typeof';
11
- import '../../react-is/index.js';
11
+ import '../../../../react-is/index.js';
12
12
  import { r as reactIs } from '../../../../../_virtual/index2.js';
13
13
 
14
14
  /** @LICENSE
@@ -8,7 +8,7 @@
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
10
  import _typeof from '@babel/runtime/helpers/esm/typeof';
11
- import { __exports as reactIs_development } from '../../../../../_virtual/react-is.development.js';
11
+ import { __exports as reactIs_development } from '../../../_virtual/react-is.development.js';
12
12
 
13
13
  /** @license React v16.13.1
14
14
  * react-is.development.js
@@ -8,7 +8,7 @@
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
10
  import _typeof from '@babel/runtime/helpers/esm/typeof';
11
- import { __exports as reactIs_production_min } from '../../../../../_virtual/react-is.production.min.js';
11
+ import { __exports as reactIs_production_min } from '../../../_virtual/react-is.production.min.js';
12
12
 
13
13
  /** @license React v16.13.1
14
14
  * react-is.production.min.js
@@ -7,11 +7,11 @@
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
- import { r as reactIs } from '../../../../_virtual/index2.js';
10
+ import { r as reactIs } from '../../_virtual/index2.js';
11
11
  import './cjs/react-is.production.min.js';
12
12
  import './cjs/react-is.development.js';
13
- import { __exports as reactIs_production_min } from '../../../../_virtual/react-is.production.min.js';
14
- import { __exports as reactIs_development } from '../../../../_virtual/react-is.development.js';
13
+ import { __exports as reactIs_production_min } from '../../_virtual/react-is.production.min.js';
14
+ import { __exports as reactIs_development } from '../../_virtual/react-is.development.js';
15
15
 
16
16
  /** @LICENSE
17
17
  * @hi-ui/virtual-list
@@ -8,10 +8,10 @@ import { HiBaseFieldNames, HiBaseSizeEnum } from '@hi-ui/core';
8
8
  * 多项级联选择器
9
9
  */
10
10
  export declare const CheckCascader: React.ForwardRefExoticComponent<CheckCascaderProps & React.RefAttributes<HTMLDivElement | null>>;
11
- export type CheckCascaderSemanticName = PickerSemanticName | 'menuList' | 'menu' | 'option';
12
- export type CheckCascaderSemanticClassNames = SemanticClassNamesType<CheckCascaderProps, CheckCascaderSemanticName>;
13
- export type CheckCascaderSemanticStyles = SemanticStylesType<CheckCascaderProps, CheckCascaderSemanticName>;
14
- export type CheckCascaderSemantic = ComponentSemantic<CheckCascaderSemanticClassNames, CheckCascaderSemanticStyles>;
11
+ export declare type CheckCascaderSemanticName = PickerSemanticName | 'menuList' | 'menu' | 'option';
12
+ export declare type CheckCascaderSemanticClassNames = SemanticClassNamesType<CheckCascaderProps, CheckCascaderSemanticName>;
13
+ export declare type CheckCascaderSemanticStyles = SemanticStylesType<CheckCascaderProps, CheckCascaderSemanticName>;
14
+ export declare type CheckCascaderSemantic = ComponentSemantic<CheckCascaderSemanticClassNames, CheckCascaderSemanticStyles>;
15
15
  export interface CheckCascaderProps extends Omit<PickerProps, 'trigger' | 'scrollable' | 'header' | 'footer' | 'classNames' | 'styles'>, CheckCascaderSemantic {
16
16
  /**
17
17
  * 设置选择项数据源
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { CheckCascaderDataItem, CheckCascaderItemEventData } from '../types';
3
- export declare const useAsyncSwitch: (setCascaderData: React.Dispatch<React.SetStateAction<CheckCascaderDataItem[]>>, onExpand?: (selectedOption: CheckCascaderItemEventData) => void, onLoadChildren?: (item: CheckCascaderItemEventData, idPaths: React.ReactText[]) => Promise<CheckCascaderDataItem[] | void> | void) => readonly [(id: React.ReactText) => boolean, (node: CheckCascaderItemEventData) => Promise<void>];
3
+ export declare const useAsyncSwitch: (setCascaderData: React.Dispatch<React.SetStateAction<CheckCascaderDataItem[]>>, onExpand?: ((selectedOption: CheckCascaderItemEventData) => void) | undefined, onLoadChildren?: ((item: CheckCascaderItemEventData, idPaths: React.ReactText[]) => Promise<CheckCascaderDataItem[] | void> | void) | undefined) => readonly [(id: React.ReactText) => boolean, (node: CheckCascaderItemEventData) => Promise<void>];
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { CheckCascaderItemEventData, FlattedCheckCascaderDataItem } from '../types';
3
- export declare const useCheck: (checkedMode: string, disabled: boolean, flattedData: FlattedCheckCascaderDataItem[], defaultCheckedIds?: React.ReactText[], checkedIdsProp?: React.ReactText[], onCheck?: (checkedInfo: {
3
+ export declare const useCheck: (checkedMode: string, disabled: boolean, flattedData: FlattedCheckCascaderDataItem[], defaultCheckedIds?: React.ReactText[], checkedIdsProp?: React.ReactText[] | undefined, onCheck?: ((checkedInfo: {
4
4
  checkedIds: React.ReactText[];
5
5
  semiCheckedIds: React.ReactText[];
6
- }, node: CheckCascaderItemEventData, checked: boolean) => void) => readonly [(targetItem: import("@hi-ui/use-check").UseCascadeCheckItem, shouldChecked: boolean) => void, (id: React.ReactText) => boolean, (id: React.ReactText) => boolean];
6
+ }, node: CheckCascaderItemEventData, checked: boolean) => void) | undefined) => readonly [(targetItem: import("@hi-ui/use-check").UseCascadeCheckItem, shouldChecked: boolean) => void, (id: React.ReactText) => boolean, (id: React.ReactText) => boolean];
@@ -1,3 +1,3 @@
1
- export declare const defaultSuffixIcon: JSX.Element;
1
+ export declare const DefaultSuffixIcon: () => JSX.Element;
2
2
  export declare const defaultLeafIcon: null;
3
3
  export declare const defaultLoadingIcon: JSX.Element;
@@ -63,5 +63,5 @@ export interface CheckCascaderDataItemRequiredProps {
63
63
  }
64
64
  export interface CheckCascaderItemEventData extends FlattedCheckCascaderDataItem, CheckCascaderDataItemRequiredProps {
65
65
  }
66
- export type CheckCascaderExpandTriggerEnum = 'click' | 'hover';
67
- export type CheckCascaderAppearanceEnum = HiBaseAppearanceEnum | 'contained' | undefined;
66
+ export declare type CheckCascaderExpandTriggerEnum = 'click' | 'hover';
67
+ export declare type CheckCascaderAppearanceEnum = HiBaseAppearanceEnum | 'contained' | undefined;
@@ -7,10 +7,10 @@ import { CheckCascaderDataItemRequiredProps, CheckCascaderItemEventData, CheckCa
7
7
  * @param treeData
8
8
  * @returns
9
9
  */
10
- export declare const flattenTreeData: (treeData: CheckCascaderDataItem[], fieldNames?: HiBaseFieldNames) => FlattedCheckCascaderDataItem[];
11
- export declare const getActiveMenus: (data: FlattedCheckCascaderDataItem[], selectedIds?: React.ReactText) => FlattedCheckCascaderDataItem[][];
10
+ export declare const flattenTreeData: (treeData: CheckCascaderDataItem[], fieldNames?: HiBaseFieldNames | undefined) => FlattedCheckCascaderDataItem[];
11
+ export declare const getActiveMenus: (data: FlattedCheckCascaderDataItem[], selectedIds?: React.ReactText | undefined) => FlattedCheckCascaderDataItem[][];
12
12
  export declare const getFlattedMenus: (data: FlattedCheckCascaderDataItem[]) => FlattedCheckCascaderDataItem[][];
13
- export declare const getActiveMenuIds: (data: FlattedCheckCascaderDataItem[], selectedIds?: React.ReactText) => React.ReactText[];
13
+ export declare const getActiveMenuIds: (data: FlattedCheckCascaderDataItem[], selectedIds?: React.ReactText | undefined) => React.ReactText[];
14
14
  export declare function getCascaderItemEventData(node: FlattedCheckCascaderDataItem, requiredProps: CheckCascaderDataItemRequiredProps): CheckCascaderItemEventData;
15
15
  /**
16
16
  * 处理选中的回显数据
@@ -23,7 +23,7 @@ export declare const processCheckedIds: (type: string, checkedIds: React.ReactTe
23
23
  /**
24
24
  * 根据传入的 checkedIds 解析全选/半选数据
25
25
  */
26
- export declare const parseCheckDataDirty: (type: string, checkedIds: React.ReactText[], flattenData: any, allowCheck?: (node: any) => boolean) => React.ReactText[];
26
+ export declare const parseCheckDataDirty: (type: string, checkedIds: React.ReactText[], flattenData: any, allowCheck?: ((node: any) => boolean) | undefined) => React.ReactText[];
27
27
  export declare const allowCheck: (targetItem: CheckCascaderItemEventData) => boolean;
28
28
  export declare const getAllCheckedStatus: (flattedData: any[], values: React.ReactText[]) => boolean[];
29
29
  export declare const getFilteredMenuList: (menuList: FlattedCheckCascaderDataItem[][], searchedData: any[]) => any[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hi-ui/check-cascader",
3
- "version": "5.0.0-experimental.2",
3
+ "version": "5.0.0-rc.0",
4
4
  "description": "A sub-package for @hi-ui/hiui.",
5
5
  "keywords": [],
6
6
  "author": "HiUI <mi-hiui@xiaomi.com>",
@@ -45,38 +45,38 @@
45
45
  "url": "https://github.com/XiaoMi/hiui/issues"
46
46
  },
47
47
  "dependencies": {
48
- "@hi-ui/array-utils": "^5.0.0-experimental.0",
49
- "@hi-ui/checkbox": "^5.0.0-experimental.1",
50
- "@hi-ui/classname": "^5.0.0-experimental.0",
51
- "@hi-ui/env": "^5.0.0-experimental.0",
52
- "@hi-ui/func-utils": "^5.0.0-experimental.0",
53
- "@hi-ui/icons": "^5.0.0-experimental.1",
54
- "@hi-ui/input": "^5.0.0-experimental.2",
55
- "@hi-ui/picker": "^5.0.0-experimental.2",
56
- "@hi-ui/popper": "^5.0.0-experimental.1",
57
- "@hi-ui/spinner": "^5.0.0-experimental.1",
58
- "@hi-ui/tag-input": "^5.0.0-experimental.2",
59
- "@hi-ui/times": "^5.0.0-experimental.0",
60
- "@hi-ui/tree-utils": "^5.0.0-experimental.0",
61
- "@hi-ui/type-assertion": "^5.0.0-experimental.0",
62
- "@hi-ui/use-check": "^5.0.0-experimental.0",
63
- "@hi-ui/use-data-source": "^5.0.0-experimental.0",
64
- "@hi-ui/use-latest": "^5.0.0-experimental.0",
65
- "@hi-ui/use-merge-refs": "^5.0.0-experimental.0",
66
- "@hi-ui/use-outside-click": "^5.0.0-experimental.0",
67
- "@hi-ui/use-search-mode": "^5.0.0-experimental.0",
68
- "@hi-ui/use-toggle": "^5.0.0-experimental.0",
69
- "@hi-ui/use-uncontrolled-state": "^5.0.0-experimental.0",
70
- "@hi-ui/use-merge-semantic": "^5.0.0-experimental.0"
48
+ "@hi-ui/array-utils": "^5.0.0-rc.0",
49
+ "@hi-ui/checkbox": "^5.0.0-rc.0",
50
+ "@hi-ui/classname": "^5.0.0-rc.0",
51
+ "@hi-ui/env": "^5.0.0-rc.0",
52
+ "@hi-ui/func-utils": "^5.0.0-rc.0",
53
+ "@hi-ui/icons": "^5.0.0-rc.0",
54
+ "@hi-ui/input": "^5.0.0-rc.0",
55
+ "@hi-ui/picker": "^5.0.0-rc.0",
56
+ "@hi-ui/popper": "^5.0.0-rc.0",
57
+ "@hi-ui/spinner": "^5.0.0-rc.0",
58
+ "@hi-ui/tag-input": "^5.0.0-rc.0",
59
+ "@hi-ui/times": "^5.0.0-rc.0",
60
+ "@hi-ui/tree-utils": "^5.0.0-rc.0",
61
+ "@hi-ui/type-assertion": "^5.0.0-rc.0",
62
+ "@hi-ui/use-check": "^5.0.0-rc.0",
63
+ "@hi-ui/use-data-source": "^5.0.0-rc.0",
64
+ "@hi-ui/use-latest": "^5.0.0-rc.0",
65
+ "@hi-ui/use-merge-refs": "^5.0.0-rc.0",
66
+ "@hi-ui/use-merge-semantic": "^5.0.0-rc.0",
67
+ "@hi-ui/use-outside-click": "^5.0.0-rc.0",
68
+ "@hi-ui/use-search-mode": "^5.0.0-rc.0",
69
+ "@hi-ui/use-toggle": "^5.0.0-rc.0",
70
+ "@hi-ui/use-uncontrolled-state": "^5.0.0-rc.0"
71
71
  },
72
72
  "peerDependencies": {
73
- "@hi-ui/core": ">=5.0.0-experimental.1",
73
+ "@hi-ui/core": ">=5.0.0-rc.0",
74
74
  "react": ">=16.8.6",
75
75
  "react-dom": ">=16.8.6"
76
76
  },
77
77
  "devDependencies": {
78
- "@hi-ui/core": "^5.0.0-experimental.1",
79
- "@hi-ui/core-css": "^5.0.0-experimental.2",
78
+ "@hi-ui/core": "^5.0.0-rc.0",
79
+ "@hi-ui/core-css": "^5.0.0-rc.0",
80
80
  "react": "^17.0.1",
81
81
  "react-dom": "^17.0.1"
82
82
  }