@hi-ui/hiui 4.9.0 → 4.10.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,33 @@
1
1
  # @hi-ui/hiui
2
2
 
3
+ ## 4.10.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#3070](https://github.com/XiaoMi/hiui/pull/3070) [`e3ce5be`](https://github.com/XiaoMi/hiui/commit/e3ce5be69208fa6fcd3ea9e1c8b7badb2744e055) Thanks [@zyprepare](https://github.com/zyprepare)! - chore(hiui): add portal-context package
8
+
9
+ ## 4.10.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#3068](https://github.com/XiaoMi/hiui/pull/3068) [`69f8f07`](https://github.com/XiaoMi/hiui/commit/69f8f07006b4aeeea554de424389aeb93e0f1770) Thanks [@zyprepare](https://github.com/zyprepare)! - feat(portal-context): Provider 增加 portal 参数,支持配置全局 container (#3060)
14
+
15
+ ### Patch Changes
16
+
17
+ - [#3068](https://github.com/XiaoMi/hiui/pull/3068) [`69f8f07`](https://github.com/XiaoMi/hiui/commit/69f8f07006b4aeeea554de424389aeb93e0f1770) Thanks [@zyprepare](https://github.com/zyprepare)! - fix(locale-context): 修改英文前往(#3062)
18
+
19
+ - [#3068](https://github.com/XiaoMi/hiui/pull/3068) [`69f8f07`](https://github.com/XiaoMi/hiui/commit/69f8f07006b4aeeea554de424389aeb93e0f1770) Thanks [@zyprepare](https://github.com/zyprepare)! - perf(date-picker): 范围选择交互优化 (#3055)
20
+
21
+ - Updated dependencies [[`69f8f07`](https://github.com/XiaoMi/hiui/commit/69f8f07006b4aeeea554de424389aeb93e0f1770), [`69f8f07`](https://github.com/XiaoMi/hiui/commit/69f8f07006b4aeeea554de424389aeb93e0f1770), [`69f8f07`](https://github.com/XiaoMi/hiui/commit/69f8f07006b4aeeea554de424389aeb93e0f1770)]:
22
+ - @hi-ui/core@4.0.9
23
+ - @hi-ui/drawer@4.3.0
24
+ - @hi-ui/loading@4.3.0
25
+ - @hi-ui/modal@4.3.0
26
+ - @hi-ui/preview@4.2.0
27
+ - @hi-ui/provider@4.1.0
28
+ - @hi-ui/picker@4.1.7
29
+ - @hi-ui/date-picker@4.9.1
30
+
3
31
  ## 4.9.0
4
32
 
5
33
  ### Minor Changes
package/lib/cjs/index.js CHANGED
@@ -41,6 +41,8 @@ var list = require('@hi-ui/list');
41
41
  var loading = require('@hi-ui/loading');
42
42
  var LocaleContext = require('./ui/locale-context/lib/esm/LocaleContext.js');
43
43
  var LocaleProvider = require('./ui/locale-context/lib/esm/LocaleProvider.js');
44
+ var PortalContext = require('./ui/portal-context/lib/esm/PortalContext.js');
45
+ var PortalProvider = require('./ui/portal-context/lib/esm/PortalProvider.js');
44
46
  var menu = require('@hi-ui/menu');
45
47
  var message = require('@hi-ui/message');
46
48
  var modal = require('@hi-ui/modal');
@@ -245,6 +247,9 @@ exports.getLanguage = LocaleContext.getLanguage;
245
247
  exports.useLocaleContext = LocaleContext.useLocaleContext;
246
248
  exports.LocaleContext = LocaleProvider.LocaleProvider;
247
249
  exports.LocaleProvider = LocaleProvider.LocaleProvider;
250
+ exports.usePortalContext = PortalContext.usePortalContext;
251
+ exports.PortalContext = PortalProvider.PortalProvider;
252
+ exports.PortalProvider = PortalProvider.PortalProvider;
248
253
  Object.defineProperty(exports, 'Menu', {
249
254
  enumerable: true,
250
255
  get: function get() {
@@ -69,7 +69,7 @@ var enUS = {
69
69
  simple: ['The', 'page', '', 'pages', 'items'],
70
70
  item: '',
71
71
  itemPerPage: 'page',
72
- "goto": 'Goto',
72
+ "goto": 'Go to',
73
73
  page: ''
74
74
  },
75
75
  cascader: {
@@ -0,0 +1,32 @@
1
+ /** @LICENSE
2
+ * @hi-ui/hiui
3
+ * https://github.com/XiaoMi/hiui/tree/master/packages/ui/hiui#readme
4
+ *
5
+ * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+ 'use strict';
11
+
12
+ Object.defineProperty(exports, '__esModule', {
13
+ value: true
14
+ });
15
+ var React = require('react');
16
+
17
+ /** @LICENSE
18
+ * @hi-ui/portal-context
19
+ * https://github.com/XiaoMi/hiui/tree/master/packages/ui/container-context#readme
20
+ *
21
+ * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */
26
+ var PortalContext = /*#__PURE__*/React.createContext(null);
27
+ var usePortalContext = function usePortalContext() {
28
+ var context = React.useContext(PortalContext);
29
+ return context;
30
+ };
31
+ exports.PortalContext = PortalContext;
32
+ exports.usePortalContext = usePortalContext;
@@ -0,0 +1,45 @@
1
+ /** @LICENSE
2
+ * @hi-ui/hiui
3
+ * https://github.com/XiaoMi/hiui/tree/master/packages/ui/hiui#readme
4
+ *
5
+ * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+ 'use strict';
11
+
12
+ var _typeof = require("@babel/runtime/helpers/typeof");
13
+ Object.defineProperty(exports, '__esModule', {
14
+ value: true
15
+ });
16
+ var React = require('react');
17
+ var PortalContext = require('./PortalContext.js');
18
+ var index = require('../../../../utils/env/lib/esm/index.js');
19
+ function _interopDefaultCompat(e) {
20
+ return e && _typeof(e) === 'object' && 'default' in e ? e : {
21
+ 'default': e
22
+ };
23
+ }
24
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
25
+
26
+ /** @LICENSE
27
+ * @hi-ui/portal-context
28
+ * https://github.com/XiaoMi/hiui/tree/master/packages/ui/container-context#readme
29
+ *
30
+ * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */
35
+ var PortalProvider = function PortalProvider(_ref) {
36
+ var children = _ref.children,
37
+ portal = _ref.portal;
38
+ return /*#__PURE__*/React__default["default"].createElement(PortalContext.PortalContext.Provider, {
39
+ value: portal
40
+ }, children);
41
+ };
42
+ if (index.__DEV__) {
43
+ PortalProvider.displayName = 'PortalProvider';
44
+ }
45
+ exports.PortalProvider = PortalProvider;
package/lib/esm/index.js CHANGED
@@ -63,6 +63,8 @@ export * from '@hi-ui/loading';
63
63
  export { default as Loading } from '@hi-ui/loading';
64
64
  export { getLanguage, useLocaleContext } from './ui/locale-context/lib/esm/LocaleContext.js';
65
65
  export { LocaleProvider as LocaleContext, LocaleProvider } from './ui/locale-context/lib/esm/LocaleProvider.js';
66
+ export { usePortalContext } from './ui/portal-context/lib/esm/PortalContext.js';
67
+ export { PortalProvider as PortalContext, PortalProvider } from './ui/portal-context/lib/esm/PortalProvider.js';
66
68
  export * from '@hi-ui/menu';
67
69
  export { default as Menu } from '@hi-ui/menu';
68
70
  export * from '@hi-ui/message';
@@ -63,7 +63,7 @@ var enUS = {
63
63
  simple: ['The', 'page', '', 'pages', 'items'],
64
64
  item: '',
65
65
  itemPerPage: 'page',
66
- "goto": 'Goto',
66
+ "goto": 'Go to',
67
67
  page: ''
68
68
  },
69
69
  cascader: {
@@ -0,0 +1,26 @@
1
+ /** @LICENSE
2
+ * @hi-ui/hiui
3
+ * https://github.com/XiaoMi/hiui/tree/master/packages/ui/hiui#readme
4
+ *
5
+ * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+ import { useContext, createContext } from 'react';
11
+
12
+ /** @LICENSE
13
+ * @hi-ui/portal-context
14
+ * https://github.com/XiaoMi/hiui/tree/master/packages/ui/container-context#readme
15
+ *
16
+ * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
17
+ *
18
+ * This source code is licensed under the MIT license found in the
19
+ * LICENSE file in the root directory of this source tree.
20
+ */
21
+ var PortalContext = /*#__PURE__*/createContext(null);
22
+ var usePortalContext = function usePortalContext() {
23
+ var context = useContext(PortalContext);
24
+ return context;
25
+ };
26
+ export { PortalContext, usePortalContext };
@@ -0,0 +1,33 @@
1
+ /** @LICENSE
2
+ * @hi-ui/hiui
3
+ * https://github.com/XiaoMi/hiui/tree/master/packages/ui/hiui#readme
4
+ *
5
+ * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+ import React from 'react';
11
+ import { PortalContext } from './PortalContext.js';
12
+ import { __DEV__ } from '../../../../utils/env/lib/esm/index.js';
13
+
14
+ /** @LICENSE
15
+ * @hi-ui/portal-context
16
+ * https://github.com/XiaoMi/hiui/tree/master/packages/ui/container-context#readme
17
+ *
18
+ * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
19
+ *
20
+ * This source code is licensed under the MIT license found in the
21
+ * LICENSE file in the root directory of this source tree.
22
+ */
23
+ var PortalProvider = function PortalProvider(_ref) {
24
+ var children = _ref.children,
25
+ portal = _ref.portal;
26
+ return /*#__PURE__*/React.createElement(PortalContext.Provider, {
27
+ value: portal
28
+ }, children);
29
+ };
30
+ if (__DEV__) {
31
+ PortalProvider.displayName = 'PortalProvider';
32
+ }
33
+ export { PortalProvider };
@@ -60,6 +60,8 @@ export * from '@hi-ui/locale-context';
60
60
  * @deprecated Please use the `Provider` instead of it.
61
61
  */
62
62
  export { default as LocaleContext } from '@hi-ui/locale-context';
63
+ export * from '@hi-ui/portal-context';
64
+ export { default as PortalContext } from '@hi-ui/portal-context';
63
65
  export * from '@hi-ui/menu';
64
66
  export { default as Menu } from '@hi-ui/menu';
65
67
  export * from '@hi-ui/message';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hi-ui/hiui",
3
- "version": "4.9.0",
3
+ "version": "4.10.1",
4
4
  "description": "The root-package for @hi-ui/hiui.",
5
5
  "keywords": [],
6
6
  "author": "HiUI <mi-hiui@xiaomi.com>",
@@ -59,9 +59,9 @@
59
59
  "@hi-ui/checkbox": "^4.0.10",
60
60
  "@hi-ui/collapse": "^4.1.6",
61
61
  "@hi-ui/counter": "^4.1.9",
62
- "@hi-ui/date-picker": "^4.9.0",
62
+ "@hi-ui/date-picker": "^4.9.1",
63
63
  "@hi-ui/descriptions": "^4.5.0",
64
- "@hi-ui/drawer": "^4.2.1",
64
+ "@hi-ui/drawer": "^4.3.0",
65
65
  "@hi-ui/dropdown": "^4.2.2",
66
66
  "@hi-ui/ellipsis-tooltip": "^4.1.8",
67
67
  "@hi-ui/empty-state": "^4.1.1",
@@ -72,19 +72,19 @@
72
72
  "@hi-ui/input": "^4.2.1",
73
73
  "@hi-ui/input-group": "^4.0.7",
74
74
  "@hi-ui/list": "^4.1.0",
75
- "@hi-ui/loading": "^4.2.1",
75
+ "@hi-ui/loading": "^4.3.0",
76
76
  "@hi-ui/menu": "^4.3.1",
77
77
  "@hi-ui/message": "^4.1.0",
78
- "@hi-ui/modal": "^4.2.0",
78
+ "@hi-ui/modal": "^4.3.0",
79
79
  "@hi-ui/notification": "^4.2.1",
80
80
  "@hi-ui/number-input": "^4.2.0",
81
81
  "@hi-ui/pagination": "^4.2.0",
82
- "@hi-ui/picker": "^4.1.6",
82
+ "@hi-ui/picker": "^4.1.7",
83
83
  "@hi-ui/pop-confirm": "^4.2.5",
84
84
  "@hi-ui/popover": "^4.1.1",
85
- "@hi-ui/preview": "^4.1.1",
85
+ "@hi-ui/preview": "^4.2.0",
86
86
  "@hi-ui/progress": "^4.0.10",
87
- "@hi-ui/provider": "^4.0.9",
87
+ "@hi-ui/provider": "^4.1.0",
88
88
  "@hi-ui/radio": "^4.1.4",
89
89
  "@hi-ui/rating": "^4.0.10",
90
90
  "@hi-ui/result": "^4.0.8",
@@ -112,12 +112,12 @@
112
112
  "@hi-ui/zen-mode": "^4.0.8"
113
113
  },
114
114
  "peerDependencies": {
115
- "@hi-ui/core": ">=4.0.8",
115
+ "@hi-ui/core": ">=4.0.9",
116
116
  "react": ">=16.8.6",
117
117
  "react-dom": ">=16.8.6"
118
118
  },
119
119
  "devDependencies": {
120
- "@hi-ui/core": "^4.0.8",
120
+ "@hi-ui/core": "^4.0.9",
121
121
  "@hi-ui/core-css": "^4.1.5",
122
122
  "react": "^17.0.1",
123
123
  "react-dom": "^17.0.1"