@hi-ui/layout 5.0.0-canary.10 → 5.0.0-canary.12
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 +26 -0
- package/lib/cjs/AppList.js +7 -7
- package/lib/cjs/Profile.js +9 -10
- package/lib/cjs/SearchTrigger.js +2 -3
- package/lib/cjs/styles/index.scss.js +1 -1
- package/lib/esm/AppList.js +3 -4
- package/lib/esm/Profile.js +3 -5
- package/lib/esm/SearchTrigger.js +1 -2
- package/lib/esm/styles/index.scss.js +1 -1
- package/package.json +9 -6
- package/lib/cjs/packages/hooks/use-id/lib/esm/index.js +0 -51
- package/lib/cjs/packages/hooks/use-id/node_modules/uuid/dist/esm-browser/regex.js +0 -16
- package/lib/cjs/packages/hooks/use-id/node_modules/uuid/dist/esm-browser/rng.js +0 -33
- package/lib/cjs/packages/hooks/use-id/node_modules/uuid/dist/esm-browser/stringify.js +0 -41
- package/lib/cjs/packages/hooks/use-id/node_modules/uuid/dist/esm-browser/v4.js +0 -33
- package/lib/cjs/packages/hooks/use-id/node_modules/uuid/dist/esm-browser/validate.js +0 -19
- package/lib/cjs/packages/hooks/use-latest/lib/esm/index.js +0 -56
- package/lib/cjs/packages/hooks/use-timeout/lib/esm/index.js +0 -50
- package/lib/cjs/packages/hooks/use-toggle/lib/esm/index.js +0 -71
- package/lib/cjs/packages/hooks/use-unmount-effect/lib/esm/index.js +0 -44
- package/lib/cjs/packages/icons/lib/esm/components/alert/check-outlined.js +0 -65
- package/lib/cjs/packages/icons/lib/esm/components/common/search-outlined.js +0 -65
- package/lib/cjs/packages/icons/lib/esm/components/direction/right-outlined.js +0 -65
- package/lib/cjs/packages/icons/lib/esm/styles/index.scss.js +0 -35
- package/lib/cjs/packages/ui/popover/lib/esm/Popover.js +0 -111
- package/lib/cjs/packages/ui/popover/lib/esm/index.js +0 -31
- package/lib/cjs/packages/ui/popover/lib/esm/styles/index.scss.js +0 -35
- package/lib/cjs/packages/ui/popover/lib/esm/types.js +0 -31
- package/lib/cjs/packages/ui/popover/lib/esm/use-popover.js +0 -187
- package/lib/cjs/packages/ui/popover/lib/esm/utils/container/lib/esm/index.js +0 -67
- package/lib/cjs/packages/ui/popover/lib/esm/with-api.js +0 -84
- package/lib/cjs/packages/utils/array-utils/lib/esm/index.js +0 -33
- package/lib/cjs/packages/utils/dom-utils/lib/esm/index.js +0 -47
- package/lib/cjs/packages/utils/react-utils/lib/esm/index.js +0 -72
- package/lib/cjs/packages/utils/type-assertion/lib/esm/index.js +0 -36
- package/lib/esm/packages/hooks/use-id/lib/esm/index.js +0 -45
- package/lib/esm/packages/hooks/use-id/node_modules/uuid/dist/esm-browser/regex.js +0 -11
- package/lib/esm/packages/hooks/use-id/node_modules/uuid/dist/esm-browser/rng.js +0 -27
- package/lib/esm/packages/hooks/use-id/node_modules/uuid/dist/esm-browser/stringify.js +0 -36
- package/lib/esm/packages/hooks/use-id/node_modules/uuid/dist/esm-browser/v4.js +0 -28
- package/lib/esm/packages/hooks/use-id/node_modules/uuid/dist/esm-browser/validate.js +0 -14
- package/lib/esm/packages/hooks/use-latest/lib/esm/index.js +0 -50
- package/lib/esm/packages/hooks/use-timeout/lib/esm/index.js +0 -45
- package/lib/esm/packages/hooks/use-toggle/lib/esm/index.js +0 -66
- package/lib/esm/packages/hooks/use-unmount-effect/lib/esm/index.js +0 -39
- package/lib/esm/packages/icons/lib/esm/components/alert/check-outlined.js +0 -53
- package/lib/esm/packages/icons/lib/esm/components/common/search-outlined.js +0 -53
- package/lib/esm/packages/icons/lib/esm/components/direction/right-outlined.js +0 -53
- package/lib/esm/packages/icons/lib/esm/styles/index.scss.js +0 -23
- package/lib/esm/packages/ui/popover/lib/esm/Popover.js +0 -97
- package/lib/esm/packages/ui/popover/lib/esm/index.js +0 -25
- package/lib/esm/packages/ui/popover/lib/esm/styles/index.scss.js +0 -23
- package/lib/esm/packages/ui/popover/lib/esm/types.js +0 -25
- package/lib/esm/packages/ui/popover/lib/esm/use-popover.js +0 -175
- package/lib/esm/packages/ui/popover/lib/esm/utils/container/lib/esm/index.js +0 -60
- package/lib/esm/packages/ui/popover/lib/esm/with-api.js +0 -79
- package/lib/esm/packages/utils/array-utils/lib/esm/index.js +0 -28
- package/lib/esm/packages/utils/dom-utils/lib/esm/index.js +0 -42
- package/lib/esm/packages/utils/react-utils/lib/esm/index.js +0 -65
- package/lib/esm/packages/utils/type-assertion/lib/esm/index.js +0 -29
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @hi-ui/layout
|
|
2
2
|
|
|
3
|
+
## 5.0.0-canary.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 22db9cf70: style: fix ui bug (5.0)
|
|
8
|
+
- Updated dependencies [d97cc24eb]
|
|
9
|
+
- Updated dependencies [1f9c6e335]
|
|
10
|
+
- Updated dependencies [22db9cf70]
|
|
11
|
+
- @hi-ui/menu@5.0.0-canary.13
|
|
12
|
+
- @hi-ui/popover@5.0.0-canary.8
|
|
13
|
+
- @hi-ui/popper@5.0.0-canary.9
|
|
14
|
+
- @hi-ui/core@5.0.0-canary.6
|
|
15
|
+
|
|
16
|
+
## 5.0.0-canary.11
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 86877b241: style: 修改样式问题 (5.0)
|
|
21
|
+
- Updated dependencies [86877b241]
|
|
22
|
+
- Updated dependencies [922686dcc]
|
|
23
|
+
- @hi-ui/menu@5.0.0-canary.12
|
|
24
|
+
- @hi-ui/popover@5.0.0-canary.7
|
|
25
|
+
- @hi-ui/popper@5.0.0-canary.8
|
|
26
|
+
- @hi-ui/core@5.0.0-canary.5
|
|
27
|
+
- @hi-ui/icons@5.0.0-canary.5
|
|
28
|
+
|
|
3
29
|
## 5.0.0-canary.10
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/lib/cjs/AppList.js
CHANGED
|
@@ -18,16 +18,16 @@ var React = require('react');
|
|
|
18
18
|
var classname = require('@hi-ui/classname');
|
|
19
19
|
var env = require('@hi-ui/env');
|
|
20
20
|
var useUncontrolledState = require('@hi-ui/use-uncontrolled-state');
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
require('
|
|
24
|
-
var checkOutlined = require('./packages/icons/lib/esm/components/alert/check-outlined.js');
|
|
21
|
+
var useToggle = require('@hi-ui/use-toggle');
|
|
22
|
+
var Popover = require('@hi-ui/popover');
|
|
23
|
+
var icons = require('@hi-ui/icons');
|
|
25
24
|
function _interopDefaultCompat(e) {
|
|
26
25
|
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
27
26
|
'default': e
|
|
28
27
|
};
|
|
29
28
|
}
|
|
30
29
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
30
|
+
var Popover__default = /*#__PURE__*/_interopDefaultCompat(Popover);
|
|
31
31
|
var APP_LIST_PREFIX = classname.getPrefixCls('app-list');
|
|
32
32
|
/**
|
|
33
33
|
* 应用列表组件
|
|
@@ -90,7 +90,7 @@ var AppList = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
90
90
|
className: prefixCls + "-item__title"
|
|
91
91
|
}, (titleRender === null || titleRender === void 0 ? void 0 : titleRender(item)) || title), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
92
92
|
className: prefixCls + "-item__checked"
|
|
93
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
93
|
+
}, /*#__PURE__*/React__default["default"].createElement(icons.CheckOutlined, null)));
|
|
94
94
|
})));
|
|
95
95
|
});
|
|
96
96
|
var IconBgColorMap = {
|
|
@@ -117,7 +117,7 @@ var AppListPopover = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
117
117
|
titleRender = _a.titleRender,
|
|
118
118
|
onItemClick = _a.onItemClick,
|
|
119
119
|
restProps = tslib.__rest(_a, ["onOpen", "onClose", "visible", "children", "data", "defaultActiveId", "activeId", "titleRender", "onItemClick"]);
|
|
120
|
-
var _useUncontrolledToggl =
|
|
120
|
+
var _useUncontrolledToggl = useToggle.useUncontrolledToggle({
|
|
121
121
|
defaultVisible: false,
|
|
122
122
|
visible: visibleProp
|
|
123
123
|
}),
|
|
@@ -131,7 +131,7 @@ var AppListPopover = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
131
131
|
visibleAction.off();
|
|
132
132
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
133
133
|
}, [onClose, visibleAction]);
|
|
134
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
134
|
+
return /*#__PURE__*/React__default["default"].createElement(Popover__default["default"], Object.assign({
|
|
135
135
|
style: {
|
|
136
136
|
boxSizing: 'border-box',
|
|
137
137
|
paddingLeft: 12,
|
package/lib/cjs/Profile.js
CHANGED
|
@@ -17,11 +17,9 @@ var tslib = require('tslib');
|
|
|
17
17
|
var React = require('react');
|
|
18
18
|
var classname = require('@hi-ui/classname');
|
|
19
19
|
var env = require('@hi-ui/env');
|
|
20
|
-
var
|
|
21
|
-
require('
|
|
22
|
-
var
|
|
23
|
-
var rightOutlined = require('./packages/icons/lib/esm/components/direction/right-outlined.js');
|
|
24
|
-
var index$1 = require('./packages/hooks/use-toggle/lib/esm/index.js');
|
|
20
|
+
var Popover = require('@hi-ui/popover');
|
|
21
|
+
var icons = require('@hi-ui/icons');
|
|
22
|
+
var useToggle = require('@hi-ui/use-toggle');
|
|
25
23
|
var useUncontrolledState = require('@hi-ui/use-uncontrolled-state');
|
|
26
24
|
function _interopDefaultCompat(e) {
|
|
27
25
|
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
@@ -29,6 +27,7 @@ function _interopDefaultCompat(e) {
|
|
|
29
27
|
};
|
|
30
28
|
}
|
|
31
29
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
30
|
+
var Popover__default = /*#__PURE__*/_interopDefaultCompat(Popover);
|
|
32
31
|
var PROFILE_PREFIX = classname.getPrefixCls('profile');
|
|
33
32
|
var Profile = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
34
33
|
var _b;
|
|
@@ -55,7 +54,7 @@ var Profile = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
55
54
|
className: prefixCls + "__settings"
|
|
56
55
|
}, settings === null || settings === void 0 ? void 0 : settings.data.map(function (item) {
|
|
57
56
|
var _a, _b, _c, _d;
|
|
58
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
57
|
+
return /*#__PURE__*/React__default["default"].createElement(Popover__default["default"], Object.assign({
|
|
59
58
|
style: {
|
|
60
59
|
boxSizing: 'border-box',
|
|
61
60
|
width: 200,
|
|
@@ -90,7 +89,7 @@ var Profile = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
90
89
|
className: prefixCls + "__settings-item-leaf__title"
|
|
91
90
|
}, child.title), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
92
91
|
className: prefixCls + "__settings-item-leaf__checked"
|
|
93
|
-
}, checked && /*#__PURE__*/React__default["default"].createElement(
|
|
92
|
+
}, checked && /*#__PURE__*/React__default["default"].createElement(icons.CheckOutlined, null)));
|
|
94
93
|
}))
|
|
95
94
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
96
95
|
className: prefixCls + "__settings-item",
|
|
@@ -106,7 +105,7 @@ var Profile = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
106
105
|
className: prefixCls + "__settings-item__subtitle"
|
|
107
106
|
}, item.subtitle)) : null), ((_d = item.children) === null || _d === void 0 ? void 0 : _d.length) ? ( /*#__PURE__*/React__default["default"].createElement("div", {
|
|
108
107
|
className: prefixCls + "__settings-item__arrow"
|
|
109
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
108
|
+
}, /*#__PURE__*/React__default["default"].createElement(icons.RightOutlined, null))) : null));
|
|
110
109
|
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
111
110
|
className: prefixCls + "__footer"
|
|
112
111
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -126,7 +125,7 @@ var ProfilePopover = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
126
125
|
trigger = _a$trigger === void 0 ? 'click' : _a$trigger,
|
|
127
126
|
children = _a.children,
|
|
128
127
|
restProps = tslib.__rest(_a, ["onOpen", "onClose", "visible", "placement", "trigger", "children"]);
|
|
129
|
-
var _useUncontrolledToggl =
|
|
128
|
+
var _useUncontrolledToggl = useToggle.useUncontrolledToggle({
|
|
130
129
|
defaultVisible: false,
|
|
131
130
|
visible: visibleProp
|
|
132
131
|
}),
|
|
@@ -140,7 +139,7 @@ var ProfilePopover = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
140
139
|
visibleAction.off();
|
|
141
140
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
142
141
|
}, [onClose, visibleAction]);
|
|
143
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
142
|
+
return /*#__PURE__*/React__default["default"].createElement(Popover__default["default"], {
|
|
144
143
|
style: {
|
|
145
144
|
boxSizing: 'border-box',
|
|
146
145
|
padding: 0,
|
package/lib/cjs/SearchTrigger.js
CHANGED
|
@@ -18,8 +18,7 @@ var React = require('react');
|
|
|
18
18
|
var classname = require('@hi-ui/classname');
|
|
19
19
|
var env = require('@hi-ui/env');
|
|
20
20
|
var core = require('@hi-ui/core');
|
|
21
|
-
require('
|
|
22
|
-
var searchOutlined = require('./packages/icons/lib/esm/components/common/search-outlined.js');
|
|
21
|
+
var icons = require('@hi-ui/icons');
|
|
23
22
|
var Popper = require('@hi-ui/popper');
|
|
24
23
|
var menu = require('@hi-ui/menu');
|
|
25
24
|
function _interopDefaultCompat(e) {
|
|
@@ -67,7 +66,7 @@ var SearchTrigger = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
67
66
|
role: role,
|
|
68
67
|
className: cls,
|
|
69
68
|
onClick: handleClick
|
|
70
|
-
}, rest), /*#__PURE__*/React__default["default"].createElement(
|
|
69
|
+
}, rest), /*#__PURE__*/React__default["default"].createElement(icons.SearchOutlined, null), !mini && ( /*#__PURE__*/React__default["default"].createElement("span", {
|
|
71
70
|
className: prefixCls + "__placeholder"
|
|
72
71
|
}, placeholder || i18n.menuSearch.search))), /*#__PURE__*/React__default["default"].createElement(Popper__default["default"], {
|
|
73
72
|
classNames: {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
Object.defineProperty(exports, '__esModule', {
|
|
13
13
|
value: true
|
|
14
14
|
});
|
|
15
|
-
var css_248z = ".hi-v5-layout {-webkit-box-sizing: border-box;box-sizing: border-box;-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;display: -webkit-box;display: -ms-flexbox;display: flex;position: relative;min-width: 0;min-height: 0;}.hi-v5-layout--direction-row {-webkit-box-orient: horizontal;-webkit-box-direction: normal;-ms-flex-direction: row;flex-direction: row;}.hi-v5-layout--direction-column {-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;}.hi-v5-header {-webkit-box-sizing: border-box;box-sizing: border-box;-webkit-box-flex: 0;-ms-flex: 0 0 auto;flex: 0 0 auto;display: -webkit-box;display: -ms-flexbox;display: flex;}.hi-v5-sider {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;position: relative;width: auto;height: 100%;overflow: hidden;-webkit-box-shadow: 1px 0 0 0 var(--hi-v5-color-gray-200, #e6e8eb);box-shadow: 1px 0 0 0 var(--hi-v5-color-gray-200, #e6e8eb);}.hi-v5-sider--collapsed {-webkit-transition: width 0.4s;transition: width 0.4s;}.hi-v5-sider__resizable-handler {-webkit-box-sizing: content-box;box-sizing: content-box;position: absolute;z-index: 9;top: 0;right: -2px;width: 2px;height: 100%;border-left: 2px solid transparent;border-right: 2px solid transparent;cursor: col-resize;background-color: #2b64ff;background-clip: content-box;opacity: 0;-webkit-transition: opacity 0.2s;transition: opacity 0.2s;}.hi-v5-sider__resizable-handler:hover {opacity: 1;}.hi-v5-sider .hi-v5-scrollbar__wrapper {width: auto;}.hi-v5-sider .hi-v5-menu {width: auto;height: auto;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner {margin-bottom: var(--hi-v5-spacing-4, 8px) !important;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner:not(.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--active):hover {background-color: rgba(124, 135, 166, 0.15);}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--active {background-color: #fff;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--active .hi-v5-menu-item__icon {color: #2b64ff;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--active-p .hi-v5-menu-item__icon {color: #2b64ff;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--mini .hi-v5-menu-item__inner--active-p {background-color: var(--hi-v5-color-static-white, #fff);}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--mini .hi-v5-menu-item__inner--active-p .hi-v5-menu-item__icon {color: #2b64ff;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--mini .hi-v5-menu-item__inner--active-p-p .hi-v5-menu-item__icon {color: #2b64ff;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--mini .hi-v5-menu-item__inner--active-p:hover {background-color: var(--hi-v5-color-static-white, #fff) !important;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__icon {color: #7c87a6;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__arrow {color: #60636b;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-submenu .hi-v5-menu-item__inner {margin-bottom: 0 !important;}.hi-v5-menu-popmenu {width: 160px !important;}.hi-v5-content {-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;padding: 0 16px;overflow: auto;}.hi-v5-footer {-webkit-box-sizing: border-box;box-sizing: border-box;-webkit-box-flex: 0;-ms-flex: 0 0 auto;flex: 0 0 auto;display: -webkit-box;display: -ms-flexbox;display: flex;}.hi-v5-search-trigger {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-ms-flex-negative: 0;flex-shrink: 0;gap: 8px;height: 32px;margin: 0 8px 12px;font-size: 16px;color: var(--hi-v5-color-gray-500, #91959e);background-color: rgba(113, 126, 163, 0.1);cursor: pointer;border-radius: 9999px;}.hi-v5-search-trigger:not(.hi-v5-search-trigger--mini) {padding: 0 12px;}.hi-v5-search-trigger--mini {-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;width: 32px;margin-left: auto;margin-right: auto;}.hi-v5-search-trigger__placeholder {font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);}.hi-v5-search-trigger__popper-container {border-radius: var(--hi-v5-border-radius-xl, 8px) !important;border: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-100, #edeff2);}.hi-v5-float-menu-container {-webkit-box-sizing: border-box;box-sizing: border-box;position: relative;width: 0;height: 100%;background: transparent;}.hi-v5-float-menu-container-content {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;position: absolute;top: 0;left: 0;height: 100%;padding: var(--hi-v5-spacing-6, 12px) 0;background-color: #f5f8fc;opacity: 0;-webkit-transition: opacity 0.3s;transition: opacity 0.3s;}.hi-v5-float-menu-container-content-wrapper {-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;overflow: auto;}.hi-v5-float-menu-container-content--show {opacity: 1;}.hi-v5-float-menu-container-content--collapsed {z-index: 2000;border-top-right-radius: 12px;border-bottom-right-radius: 12px;-webkit-box-shadow: 6px 0 18px 6px rgba(26, 29, 38, 0.03), 4px 0 4px 0 rgba(26, 29, 38, 0.03);box-shadow: 6px 0 18px 6px rgba(26, 29, 38, 0.03), 4px 0 4px 0 rgba(26, 29, 38, 0.03);}.hi-v5-float-menu-container-content--collapsed .hi-v5-float-menu-container-collapse-icon {-webkit-transform: scaleX(-1);transform: scaleX(-1);}.hi-v5-float-menu-container-collapse {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;height: var(--hi-v5-height-6, 24px);padding: 0 var(--hi-v5-spacing-4, 8px);color: var(--hi-v5-color-gray-600, #60636b);cursor: pointer;white-space: nowrap;}.hi-v5-float-menu-container-collapse:hover {border-radius: var(--hi-v5-border-radius-lg, 6px);color: #565a66;background-color: var(--hi-v5-color-gray-200, #e6e8eb);}.hi-v5-float-menu-container-collapse-wrapper {display: -webkit-box;display: -ms-flexbox;display: flex;padding: var(--hi-v5-spacing-4, 8px) var(--hi-v5-spacing-8, 16px);}.hi-v5-float-menu-container-collapse-icon {display: -webkit-inline-box;display: -ms-inline-flexbox;display: inline-flex;font-size: var(--hi-v5-text-size-lg, 1rem);}.hi-v5-float-menu-container-collapse-text {font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);margin-left: var(--hi-v5-spacing-2, 4px);}.hi-v5-app-list-wrapper {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;gap: 8px;}.hi-v5-app-list-item {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-ms-flex-negative: 0;flex-shrink: 0;gap: 8px;width: 256px;height: var(--hi-v5-height-12, 48px);padding: 0 var(--hi-v5-spacing-6, 12px);border: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-100, #edeff2);border-radius: var(--hi-v5-border-radius-lg, 6px);overflow: hidden;cursor: pointer;}.hi-v5-app-list-item:hover {background-color: var(--hi-v5-color-gray-50, #f2f4f7);}.hi-v5-app-list-item__icon {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-inline-box;display: -ms-inline-flexbox;display: inline-flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;overflow: hidden;width: var(--hi-v5-height-6, 24px);height: var(--hi-v5-height-6, 24px);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);border-radius: var(--hi-v5-border-radius-lg, 6px);font-size: var(--hi-v5-text-size-md, 0.875rem);font-weight: var(--hi-v5-text-weight-medium, 500);color: var(--hi-v5-color-static-white, #fff);background-color: var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));}.hi-v5-app-list-item__title {-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}.hi-v5-app-list-item__checked {display: none;font-size: var(--hi-v5-text-size-md, 0.875rem);color: var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));}.hi-v5-app-list-item--active .hi-v5-app-list-item__title {font-weight: var(--hi-v5-text-weight-medium, 500);}.hi-v5-app-list-item--active .hi-v5-app-list-item__checked {display: block;}.hi-v5-profile {width: 240px;}.hi-v5-profile__header {padding: var(--hi-v5-spacing-8, 16px) var(--hi-v5-spacing-8, 16px) var(--hi-v5-spacing-4, 8px);font-size: var(--hi-v5-text-size-lg, 1rem);line-height: var(--hi-v5-text-lineheight-lg, 1.5rem);font-weight: var(--hi-v5-text-weight-medium, 500);}.hi-v5-profile__settings {padding: var(--hi-v5-spacing-4, 8px);}.hi-v5-profile__settings-item {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: start;-ms-flex-align: start;align-items: flex-start;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;padding: var(--hi-v5-spacing-4, 8px);border-radius: var(--hi-v5-border-radius-lg, 6px);cursor: pointer;}.hi-v5-profile__settings-item:hover {background-color: var(--hi-v5-color-gray-50, #f2f4f7);}.hi-v5-profile__settings-item__title {font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);}.hi-v5-profile__settings-item__subtitle {font-size: var(--hi-v5-text-size-sm, 0.75rem);line-height: var(--hi-v5-text-lineheight-sm, 1.25rem);font-weight: var(--hi-v5-text-weight-medium, 500);color: var(--hi-v5-color-gray-500, #91959e);}.hi-v5-profile__settings-item__arrow {font-size: var(--hi-v5-text-size-lg, 1rem);color: var(--hi-v5-color-gray-500, #91959e);}.hi-v5-profile__settings-item-leaf {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;height: 40px;padding: var(--hi-v5-spacing-4, 8px);border-radius: var(--hi-v5-border-radius-md, 4px);cursor: pointer;font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);}.hi-v5-profile__settings-item-leaf:hover {background-color: var(--hi-v5-color-gray-50, #f2f4f7);}.hi-v5-profile__settings-item-leaf--checked {color: var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));}.hi-v5-profile__footer {padding: var(--hi-v5-spacing-4, 8px);border-top: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-200, #e6e8eb);}.hi-v5-profile__footer__content {-webkit-box-sizing: border-box;box-sizing: border-box;height: 40px;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;padding: var(--hi-v5-spacing-4, 8px);border-radius: var(--hi-v5-border-radius-lg, 6px);cursor: pointer;font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);}.hi-v5-profile__footer__content:hover {background-color: var(--hi-v5-color-gray-50, #f2f4f7);}";
|
|
15
|
+
var css_248z = ".hi-v5-layout {-webkit-box-sizing: border-box;box-sizing: border-box;-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;display: -webkit-box;display: -ms-flexbox;display: flex;position: relative;min-width: 0;min-height: 0;}.hi-v5-layout--direction-row {-webkit-box-orient: horizontal;-webkit-box-direction: normal;-ms-flex-direction: row;flex-direction: row;}.hi-v5-layout--direction-column {-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;}.hi-v5-header {-webkit-box-sizing: border-box;box-sizing: border-box;-webkit-box-flex: 0;-ms-flex: 0 0 auto;flex: 0 0 auto;display: -webkit-box;display: -ms-flexbox;display: flex;}.hi-v5-sider {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;position: relative;width: auto;height: 100%;overflow: hidden;-webkit-box-shadow: 1px 0 0 0 var(--hi-v5-color-gray-300, #e6e8eb);box-shadow: 1px 0 0 0 var(--hi-v5-color-gray-300, #e6e8eb);}.hi-v5-sider--collapsed {-webkit-transition: width 0.4s;transition: width 0.4s;}.hi-v5-sider__resizable-handler {-webkit-box-sizing: content-box;box-sizing: content-box;position: absolute;z-index: 9;top: 0;right: -2px;width: 2px;height: 100%;border-left: 2px solid transparent;border-right: 2px solid transparent;cursor: col-resize;background-color: #2b64ff;background-clip: content-box;opacity: 0;-webkit-transition: opacity 0.2s;transition: opacity 0.2s;}.hi-v5-sider__resizable-handler:hover {opacity: 1;}.hi-v5-sider .hi-v5-scrollbar__wrapper {width: auto;}.hi-v5-sider .hi-v5-menu {width: auto;height: auto;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner {margin-bottom: var(--hi-v5-spacing-4, 8px) !important;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner:not(.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--active):hover {background-color: rgba(124, 135, 166, 0.15);}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--active {background-color: #fff;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--active .hi-v5-menu-item__icon {color: #2b64ff;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--active-p .hi-v5-menu-item__icon {color: #2b64ff;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--mini .hi-v5-menu-item__inner--active-p {background-color: var(--hi-v5-color-static-white, #fff);}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--mini .hi-v5-menu-item__inner--active-p .hi-v5-menu-item__icon {color: #2b64ff;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--mini .hi-v5-menu-item__inner--active-p-p .hi-v5-menu-item__icon {color: #2b64ff;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--mini .hi-v5-menu-item__inner--active-p:hover {background-color: var(--hi-v5-color-static-white, #fff) !important;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__icon {color: #7c87a6;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__arrow {color: #60636b;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-submenu .hi-v5-menu-item__inner {margin-bottom: 0 !important;}.hi-v5-menu-popmenu {width: 160px !important;}.hi-v5-content {-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;padding: 0 16px;overflow: auto;}.hi-v5-footer {-webkit-box-sizing: border-box;box-sizing: border-box;-webkit-box-flex: 0;-ms-flex: 0 0 auto;flex: 0 0 auto;display: -webkit-box;display: -ms-flexbox;display: flex;}.hi-v5-search-trigger {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-ms-flex-negative: 0;flex-shrink: 0;gap: 8px;height: 32px;margin: 0 8px 12px;font-size: 16px;color: var(--hi-v5-color-gray-600, #91959e);background-color: rgba(113, 126, 163, 0.1);cursor: pointer;border-radius: 9999px;}.hi-v5-search-trigger:not(.hi-v5-search-trigger--mini) {padding: 0 12px;}.hi-v5-search-trigger--mini {-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;width: 32px;margin-left: auto;margin-right: auto;}.hi-v5-search-trigger__placeholder {font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);}.hi-v5-search-trigger__popper-container {border-radius: var(--hi-v5-border-radius-xl, 8px) !important;border: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-200, #edeff2);}.hi-v5-float-menu-container {-webkit-box-sizing: border-box;box-sizing: border-box;position: relative;width: 0;height: 100%;background: transparent;}.hi-v5-float-menu-container-content {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;position: absolute;top: 0;left: 0;height: 100%;padding: var(--hi-v5-spacing-6, 12px) 0;background-color: #f5f8fc;opacity: 0;-webkit-transition: opacity 0.3s;transition: opacity 0.3s;}.hi-v5-float-menu-container-content-wrapper {-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;overflow: auto;}.hi-v5-float-menu-container-content--show {opacity: 1;}.hi-v5-float-menu-container-content--collapsed {z-index: 2000;border-top-right-radius: 12px;border-bottom-right-radius: 12px;-webkit-box-shadow: 6px 0 18px 6px rgba(26, 29, 38, 0.03), 4px 0 4px 0 rgba(26, 29, 38, 0.03);box-shadow: 6px 0 18px 6px rgba(26, 29, 38, 0.03), 4px 0 4px 0 rgba(26, 29, 38, 0.03);}.hi-v5-float-menu-container-content--collapsed .hi-v5-float-menu-container-collapse-icon {-webkit-transform: scaleX(-1);transform: scaleX(-1);}.hi-v5-float-menu-container-collapse {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;height: var(--hi-v5-height-6, 24px);padding: 0 var(--hi-v5-spacing-4, 8px);color: var(--hi-v5-color-gray-700, #60636b);cursor: pointer;white-space: nowrap;}.hi-v5-float-menu-container-collapse:hover {border-radius: var(--hi-v5-border-radius-lg, 6px);color: #565a66;background-color: var(--hi-v5-color-gray-300, #e6e8eb);}.hi-v5-float-menu-container-collapse-wrapper {display: -webkit-box;display: -ms-flexbox;display: flex;padding: var(--hi-v5-spacing-4, 8px) var(--hi-v5-spacing-8, 16px);}.hi-v5-float-menu-container-collapse-icon {display: -webkit-inline-box;display: -ms-inline-flexbox;display: inline-flex;font-size: var(--hi-v5-text-size-lg, 1rem);}.hi-v5-float-menu-container-collapse-text {font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);margin-left: var(--hi-v5-spacing-2, 4px);}.hi-v5-app-list-wrapper {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;gap: 8px;}.hi-v5-app-list-item {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-ms-flex-negative: 0;flex-shrink: 0;gap: 8px;width: 256px;height: var(--hi-v5-height-12, 48px);padding: 0 var(--hi-v5-spacing-6, 12px);border: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-200, #edeff2);border-radius: var(--hi-v5-border-radius-lg, 6px);overflow: hidden;cursor: pointer;}.hi-v5-app-list-item:hover {background-color: var(--hi-v5-color-gray-100, #f2f4f7);}.hi-v5-app-list-item__icon {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-inline-box;display: -ms-inline-flexbox;display: inline-flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;overflow: hidden;width: var(--hi-v5-height-6, 24px);height: var(--hi-v5-height-6, 24px);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);border-radius: var(--hi-v5-border-radius-lg, 6px);font-size: var(--hi-v5-text-size-md, 0.875rem);font-weight: var(--hi-v5-text-weight-medium, 500);color: var(--hi-v5-color-static-white, #fff);background-color: var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));}.hi-v5-app-list-item__title {-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}.hi-v5-app-list-item__checked {display: none;font-size: var(--hi-v5-text-size-md, 0.875rem);color: var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));}.hi-v5-app-list-item--active .hi-v5-app-list-item__title {font-weight: var(--hi-v5-text-weight-medium, 500);}.hi-v5-app-list-item--active .hi-v5-app-list-item__checked {display: block;}.hi-v5-profile {width: 240px;}.hi-v5-profile__header {padding: var(--hi-v5-spacing-8, 16px) var(--hi-v5-spacing-8, 16px) var(--hi-v5-spacing-4, 8px);font-size: var(--hi-v5-text-size-lg, 1rem);line-height: var(--hi-v5-text-lineheight-lg, 1.5rem);font-weight: var(--hi-v5-text-weight-medium, 500);}.hi-v5-profile__settings {padding: var(--hi-v5-spacing-4, 8px);}.hi-v5-profile__settings-item {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: start;-ms-flex-align: start;align-items: flex-start;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;padding: var(--hi-v5-spacing-4, 8px);border-radius: var(--hi-v5-border-radius-lg, 6px);cursor: pointer;}.hi-v5-profile__settings-item:hover {background-color: var(--hi-v5-color-gray-100, #f2f4f7);}.hi-v5-profile__settings-item__title {font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);}.hi-v5-profile__settings-item__subtitle {font-size: var(--hi-v5-text-size-sm, 0.75rem);line-height: var(--hi-v5-text-lineheight-sm, 1.25rem);font-weight: var(--hi-v5-text-weight-medium, 500);color: var(--hi-v5-color-gray-600, #91959e);}.hi-v5-profile__settings-item__arrow {font-size: var(--hi-v5-text-size-lg, 1rem);color: var(--hi-v5-color-gray-600, #91959e);}.hi-v5-profile__settings-item-leaf {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;height: 40px;padding: var(--hi-v5-spacing-4, 8px);border-radius: var(--hi-v5-border-radius-md, 4px);cursor: pointer;font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);}.hi-v5-profile__settings-item-leaf:hover {background-color: var(--hi-v5-color-gray-100, #f2f4f7);}.hi-v5-profile__settings-item-leaf--checked {color: var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));}.hi-v5-profile__footer {padding: var(--hi-v5-spacing-4, 8px);border-top: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-300, #e6e8eb);}.hi-v5-profile__footer__content {-webkit-box-sizing: border-box;box-sizing: border-box;height: 40px;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;padding: var(--hi-v5-spacing-4, 8px);border-radius: var(--hi-v5-border-radius-lg, 6px);cursor: pointer;font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);}.hi-v5-profile__footer__content:hover {background-color: var(--hi-v5-color-gray-100, #f2f4f7);}";
|
|
16
16
|
var __styleInject__ = require('@hi-ui/style-inject')["default"];
|
|
17
17
|
__styleInject__(css_248z);
|
|
18
18
|
exports["default"] = css_248z;
|
package/lib/esm/AppList.js
CHANGED
|
@@ -12,10 +12,9 @@ import React, { forwardRef, useCallback } from 'react';
|
|
|
12
12
|
import { getPrefixCls, cx } from '@hi-ui/classname';
|
|
13
13
|
import { __DEV__ } from '@hi-ui/env';
|
|
14
14
|
import { useUncontrolledState } from '@hi-ui/use-uncontrolled-state';
|
|
15
|
-
import { useUncontrolledToggle } from '
|
|
16
|
-
import
|
|
17
|
-
import '
|
|
18
|
-
import { CheckOutlined } from './packages/icons/lib/esm/components/alert/check-outlined.js';
|
|
15
|
+
import { useUncontrolledToggle } from '@hi-ui/use-toggle';
|
|
16
|
+
import Popover from '@hi-ui/popover';
|
|
17
|
+
import { CheckOutlined } from '@hi-ui/icons';
|
|
19
18
|
var APP_LIST_PREFIX = getPrefixCls('app-list');
|
|
20
19
|
/**
|
|
21
20
|
* 应用列表组件
|
package/lib/esm/Profile.js
CHANGED
|
@@ -11,11 +11,9 @@ import { __rest } from 'tslib';
|
|
|
11
11
|
import React, { forwardRef, useCallback } from 'react';
|
|
12
12
|
import { getPrefixCls, cx } from '@hi-ui/classname';
|
|
13
13
|
import { __DEV__ } from '@hi-ui/env';
|
|
14
|
-
import
|
|
15
|
-
import '
|
|
16
|
-
import {
|
|
17
|
-
import { RightOutlined } from './packages/icons/lib/esm/components/direction/right-outlined.js';
|
|
18
|
-
import { useUncontrolledToggle } from './packages/hooks/use-toggle/lib/esm/index.js';
|
|
14
|
+
import Popover from '@hi-ui/popover';
|
|
15
|
+
import { CheckOutlined, RightOutlined } from '@hi-ui/icons';
|
|
16
|
+
import { useUncontrolledToggle } from '@hi-ui/use-toggle';
|
|
19
17
|
import { useUncontrolledState } from '@hi-ui/use-uncontrolled-state';
|
|
20
18
|
var PROFILE_PREFIX = getPrefixCls('profile');
|
|
21
19
|
var Profile = /*#__PURE__*/forwardRef(function (_a, ref) {
|
package/lib/esm/SearchTrigger.js
CHANGED
|
@@ -12,8 +12,7 @@ import React, { forwardRef } from 'react';
|
|
|
12
12
|
import { getPrefixCls, cx } from '@hi-ui/classname';
|
|
13
13
|
import { __DEV__ } from '@hi-ui/env';
|
|
14
14
|
import { useLocaleContext } from '@hi-ui/core';
|
|
15
|
-
import '
|
|
16
|
-
import { SearchOutlined } from './packages/icons/lib/esm/components/common/search-outlined.js';
|
|
15
|
+
import { SearchOutlined } from '@hi-ui/icons';
|
|
17
16
|
import Popper from '@hi-ui/popper';
|
|
18
17
|
import { MenuSearch } from '@hi-ui/menu';
|
|
19
18
|
var SEARCH_TRIGGER_PREFIX = getPrefixCls('search-trigger');
|
|
@@ -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 = ".hi-v5-layout {-webkit-box-sizing: border-box;box-sizing: border-box;-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;display: -webkit-box;display: -ms-flexbox;display: flex;position: relative;min-width: 0;min-height: 0;}.hi-v5-layout--direction-row {-webkit-box-orient: horizontal;-webkit-box-direction: normal;-ms-flex-direction: row;flex-direction: row;}.hi-v5-layout--direction-column {-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;}.hi-v5-header {-webkit-box-sizing: border-box;box-sizing: border-box;-webkit-box-flex: 0;-ms-flex: 0 0 auto;flex: 0 0 auto;display: -webkit-box;display: -ms-flexbox;display: flex;}.hi-v5-sider {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;position: relative;width: auto;height: 100%;overflow: hidden;-webkit-box-shadow: 1px 0 0 0 var(--hi-v5-color-gray-200, #e6e8eb);box-shadow: 1px 0 0 0 var(--hi-v5-color-gray-200, #e6e8eb);}.hi-v5-sider--collapsed {-webkit-transition: width 0.4s;transition: width 0.4s;}.hi-v5-sider__resizable-handler {-webkit-box-sizing: content-box;box-sizing: content-box;position: absolute;z-index: 9;top: 0;right: -2px;width: 2px;height: 100%;border-left: 2px solid transparent;border-right: 2px solid transparent;cursor: col-resize;background-color: #2b64ff;background-clip: content-box;opacity: 0;-webkit-transition: opacity 0.2s;transition: opacity 0.2s;}.hi-v5-sider__resizable-handler:hover {opacity: 1;}.hi-v5-sider .hi-v5-scrollbar__wrapper {width: auto;}.hi-v5-sider .hi-v5-menu {width: auto;height: auto;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner {margin-bottom: var(--hi-v5-spacing-4, 8px) !important;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner:not(.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--active):hover {background-color: rgba(124, 135, 166, 0.15);}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--active {background-color: #fff;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--active .hi-v5-menu-item__icon {color: #2b64ff;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--active-p .hi-v5-menu-item__icon {color: #2b64ff;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--mini .hi-v5-menu-item__inner--active-p {background-color: var(--hi-v5-color-static-white, #fff);}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--mini .hi-v5-menu-item__inner--active-p .hi-v5-menu-item__icon {color: #2b64ff;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--mini .hi-v5-menu-item__inner--active-p-p .hi-v5-menu-item__icon {color: #2b64ff;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--mini .hi-v5-menu-item__inner--active-p:hover {background-color: var(--hi-v5-color-static-white, #fff) !important;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__icon {color: #7c87a6;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__arrow {color: #60636b;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-submenu .hi-v5-menu-item__inner {margin-bottom: 0 !important;}.hi-v5-menu-popmenu {width: 160px !important;}.hi-v5-content {-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;padding: 0 16px;overflow: auto;}.hi-v5-footer {-webkit-box-sizing: border-box;box-sizing: border-box;-webkit-box-flex: 0;-ms-flex: 0 0 auto;flex: 0 0 auto;display: -webkit-box;display: -ms-flexbox;display: flex;}.hi-v5-search-trigger {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-ms-flex-negative: 0;flex-shrink: 0;gap: 8px;height: 32px;margin: 0 8px 12px;font-size: 16px;color: var(--hi-v5-color-gray-500, #91959e);background-color: rgba(113, 126, 163, 0.1);cursor: pointer;border-radius: 9999px;}.hi-v5-search-trigger:not(.hi-v5-search-trigger--mini) {padding: 0 12px;}.hi-v5-search-trigger--mini {-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;width: 32px;margin-left: auto;margin-right: auto;}.hi-v5-search-trigger__placeholder {font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);}.hi-v5-search-trigger__popper-container {border-radius: var(--hi-v5-border-radius-xl, 8px) !important;border: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-100, #edeff2);}.hi-v5-float-menu-container {-webkit-box-sizing: border-box;box-sizing: border-box;position: relative;width: 0;height: 100%;background: transparent;}.hi-v5-float-menu-container-content {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;position: absolute;top: 0;left: 0;height: 100%;padding: var(--hi-v5-spacing-6, 12px) 0;background-color: #f5f8fc;opacity: 0;-webkit-transition: opacity 0.3s;transition: opacity 0.3s;}.hi-v5-float-menu-container-content-wrapper {-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;overflow: auto;}.hi-v5-float-menu-container-content--show {opacity: 1;}.hi-v5-float-menu-container-content--collapsed {z-index: 2000;border-top-right-radius: 12px;border-bottom-right-radius: 12px;-webkit-box-shadow: 6px 0 18px 6px rgba(26, 29, 38, 0.03), 4px 0 4px 0 rgba(26, 29, 38, 0.03);box-shadow: 6px 0 18px 6px rgba(26, 29, 38, 0.03), 4px 0 4px 0 rgba(26, 29, 38, 0.03);}.hi-v5-float-menu-container-content--collapsed .hi-v5-float-menu-container-collapse-icon {-webkit-transform: scaleX(-1);transform: scaleX(-1);}.hi-v5-float-menu-container-collapse {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;height: var(--hi-v5-height-6, 24px);padding: 0 var(--hi-v5-spacing-4, 8px);color: var(--hi-v5-color-gray-600, #60636b);cursor: pointer;white-space: nowrap;}.hi-v5-float-menu-container-collapse:hover {border-radius: var(--hi-v5-border-radius-lg, 6px);color: #565a66;background-color: var(--hi-v5-color-gray-200, #e6e8eb);}.hi-v5-float-menu-container-collapse-wrapper {display: -webkit-box;display: -ms-flexbox;display: flex;padding: var(--hi-v5-spacing-4, 8px) var(--hi-v5-spacing-8, 16px);}.hi-v5-float-menu-container-collapse-icon {display: -webkit-inline-box;display: -ms-inline-flexbox;display: inline-flex;font-size: var(--hi-v5-text-size-lg, 1rem);}.hi-v5-float-menu-container-collapse-text {font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);margin-left: var(--hi-v5-spacing-2, 4px);}.hi-v5-app-list-wrapper {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;gap: 8px;}.hi-v5-app-list-item {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-ms-flex-negative: 0;flex-shrink: 0;gap: 8px;width: 256px;height: var(--hi-v5-height-12, 48px);padding: 0 var(--hi-v5-spacing-6, 12px);border: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-100, #edeff2);border-radius: var(--hi-v5-border-radius-lg, 6px);overflow: hidden;cursor: pointer;}.hi-v5-app-list-item:hover {background-color: var(--hi-v5-color-gray-50, #f2f4f7);}.hi-v5-app-list-item__icon {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-inline-box;display: -ms-inline-flexbox;display: inline-flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;overflow: hidden;width: var(--hi-v5-height-6, 24px);height: var(--hi-v5-height-6, 24px);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);border-radius: var(--hi-v5-border-radius-lg, 6px);font-size: var(--hi-v5-text-size-md, 0.875rem);font-weight: var(--hi-v5-text-weight-medium, 500);color: var(--hi-v5-color-static-white, #fff);background-color: var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));}.hi-v5-app-list-item__title {-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}.hi-v5-app-list-item__checked {display: none;font-size: var(--hi-v5-text-size-md, 0.875rem);color: var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));}.hi-v5-app-list-item--active .hi-v5-app-list-item__title {font-weight: var(--hi-v5-text-weight-medium, 500);}.hi-v5-app-list-item--active .hi-v5-app-list-item__checked {display: block;}.hi-v5-profile {width: 240px;}.hi-v5-profile__header {padding: var(--hi-v5-spacing-8, 16px) var(--hi-v5-spacing-8, 16px) var(--hi-v5-spacing-4, 8px);font-size: var(--hi-v5-text-size-lg, 1rem);line-height: var(--hi-v5-text-lineheight-lg, 1.5rem);font-weight: var(--hi-v5-text-weight-medium, 500);}.hi-v5-profile__settings {padding: var(--hi-v5-spacing-4, 8px);}.hi-v5-profile__settings-item {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: start;-ms-flex-align: start;align-items: flex-start;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;padding: var(--hi-v5-spacing-4, 8px);border-radius: var(--hi-v5-border-radius-lg, 6px);cursor: pointer;}.hi-v5-profile__settings-item:hover {background-color: var(--hi-v5-color-gray-50, #f2f4f7);}.hi-v5-profile__settings-item__title {font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);}.hi-v5-profile__settings-item__subtitle {font-size: var(--hi-v5-text-size-sm, 0.75rem);line-height: var(--hi-v5-text-lineheight-sm, 1.25rem);font-weight: var(--hi-v5-text-weight-medium, 500);color: var(--hi-v5-color-gray-500, #91959e);}.hi-v5-profile__settings-item__arrow {font-size: var(--hi-v5-text-size-lg, 1rem);color: var(--hi-v5-color-gray-500, #91959e);}.hi-v5-profile__settings-item-leaf {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;height: 40px;padding: var(--hi-v5-spacing-4, 8px);border-radius: var(--hi-v5-border-radius-md, 4px);cursor: pointer;font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);}.hi-v5-profile__settings-item-leaf:hover {background-color: var(--hi-v5-color-gray-50, #f2f4f7);}.hi-v5-profile__settings-item-leaf--checked {color: var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));}.hi-v5-profile__footer {padding: var(--hi-v5-spacing-4, 8px);border-top: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-200, #e6e8eb);}.hi-v5-profile__footer__content {-webkit-box-sizing: border-box;box-sizing: border-box;height: 40px;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;padding: var(--hi-v5-spacing-4, 8px);border-radius: var(--hi-v5-border-radius-lg, 6px);cursor: pointer;font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);}.hi-v5-profile__footer__content:hover {background-color: var(--hi-v5-color-gray-50, #f2f4f7);}";
|
|
11
|
+
var css_248z = ".hi-v5-layout {-webkit-box-sizing: border-box;box-sizing: border-box;-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;display: -webkit-box;display: -ms-flexbox;display: flex;position: relative;min-width: 0;min-height: 0;}.hi-v5-layout--direction-row {-webkit-box-orient: horizontal;-webkit-box-direction: normal;-ms-flex-direction: row;flex-direction: row;}.hi-v5-layout--direction-column {-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;}.hi-v5-header {-webkit-box-sizing: border-box;box-sizing: border-box;-webkit-box-flex: 0;-ms-flex: 0 0 auto;flex: 0 0 auto;display: -webkit-box;display: -ms-flexbox;display: flex;}.hi-v5-sider {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;position: relative;width: auto;height: 100%;overflow: hidden;-webkit-box-shadow: 1px 0 0 0 var(--hi-v5-color-gray-300, #e6e8eb);box-shadow: 1px 0 0 0 var(--hi-v5-color-gray-300, #e6e8eb);}.hi-v5-sider--collapsed {-webkit-transition: width 0.4s;transition: width 0.4s;}.hi-v5-sider__resizable-handler {-webkit-box-sizing: content-box;box-sizing: content-box;position: absolute;z-index: 9;top: 0;right: -2px;width: 2px;height: 100%;border-left: 2px solid transparent;border-right: 2px solid transparent;cursor: col-resize;background-color: #2b64ff;background-clip: content-box;opacity: 0;-webkit-transition: opacity 0.2s;transition: opacity 0.2s;}.hi-v5-sider__resizable-handler:hover {opacity: 1;}.hi-v5-sider .hi-v5-scrollbar__wrapper {width: auto;}.hi-v5-sider .hi-v5-menu {width: auto;height: auto;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner {margin-bottom: var(--hi-v5-spacing-4, 8px) !important;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner:not(.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--active):hover {background-color: rgba(124, 135, 166, 0.15);}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--active {background-color: #fff;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--active .hi-v5-menu-item__icon {color: #2b64ff;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--active-p .hi-v5-menu-item__icon {color: #2b64ff;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--mini .hi-v5-menu-item__inner--active-p {background-color: var(--hi-v5-color-static-white, #fff);}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--mini .hi-v5-menu-item__inner--active-p .hi-v5-menu-item__icon {color: #2b64ff;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--mini .hi-v5-menu-item__inner--active-p-p .hi-v5-menu-item__icon {color: #2b64ff;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__inner--mini .hi-v5-menu-item__inner--active-p:hover {background-color: var(--hi-v5-color-static-white, #fff) !important;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__icon {color: #7c87a6;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-item__arrow {color: #60636b;}.hi-v5-sider .hi-v5-menu--vertical .hi-v5-menu-submenu .hi-v5-menu-item__inner {margin-bottom: 0 !important;}.hi-v5-menu-popmenu {width: 160px !important;}.hi-v5-content {-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;padding: 0 16px;overflow: auto;}.hi-v5-footer {-webkit-box-sizing: border-box;box-sizing: border-box;-webkit-box-flex: 0;-ms-flex: 0 0 auto;flex: 0 0 auto;display: -webkit-box;display: -ms-flexbox;display: flex;}.hi-v5-search-trigger {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-ms-flex-negative: 0;flex-shrink: 0;gap: 8px;height: 32px;margin: 0 8px 12px;font-size: 16px;color: var(--hi-v5-color-gray-600, #91959e);background-color: rgba(113, 126, 163, 0.1);cursor: pointer;border-radius: 9999px;}.hi-v5-search-trigger:not(.hi-v5-search-trigger--mini) {padding: 0 12px;}.hi-v5-search-trigger--mini {-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;width: 32px;margin-left: auto;margin-right: auto;}.hi-v5-search-trigger__placeholder {font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);}.hi-v5-search-trigger__popper-container {border-radius: var(--hi-v5-border-radius-xl, 8px) !important;border: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-200, #edeff2);}.hi-v5-float-menu-container {-webkit-box-sizing: border-box;box-sizing: border-box;position: relative;width: 0;height: 100%;background: transparent;}.hi-v5-float-menu-container-content {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;position: absolute;top: 0;left: 0;height: 100%;padding: var(--hi-v5-spacing-6, 12px) 0;background-color: #f5f8fc;opacity: 0;-webkit-transition: opacity 0.3s;transition: opacity 0.3s;}.hi-v5-float-menu-container-content-wrapper {-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;overflow: auto;}.hi-v5-float-menu-container-content--show {opacity: 1;}.hi-v5-float-menu-container-content--collapsed {z-index: 2000;border-top-right-radius: 12px;border-bottom-right-radius: 12px;-webkit-box-shadow: 6px 0 18px 6px rgba(26, 29, 38, 0.03), 4px 0 4px 0 rgba(26, 29, 38, 0.03);box-shadow: 6px 0 18px 6px rgba(26, 29, 38, 0.03), 4px 0 4px 0 rgba(26, 29, 38, 0.03);}.hi-v5-float-menu-container-content--collapsed .hi-v5-float-menu-container-collapse-icon {-webkit-transform: scaleX(-1);transform: scaleX(-1);}.hi-v5-float-menu-container-collapse {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;height: var(--hi-v5-height-6, 24px);padding: 0 var(--hi-v5-spacing-4, 8px);color: var(--hi-v5-color-gray-700, #60636b);cursor: pointer;white-space: nowrap;}.hi-v5-float-menu-container-collapse:hover {border-radius: var(--hi-v5-border-radius-lg, 6px);color: #565a66;background-color: var(--hi-v5-color-gray-300, #e6e8eb);}.hi-v5-float-menu-container-collapse-wrapper {display: -webkit-box;display: -ms-flexbox;display: flex;padding: var(--hi-v5-spacing-4, 8px) var(--hi-v5-spacing-8, 16px);}.hi-v5-float-menu-container-collapse-icon {display: -webkit-inline-box;display: -ms-inline-flexbox;display: inline-flex;font-size: var(--hi-v5-text-size-lg, 1rem);}.hi-v5-float-menu-container-collapse-text {font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);margin-left: var(--hi-v5-spacing-2, 4px);}.hi-v5-app-list-wrapper {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;gap: 8px;}.hi-v5-app-list-item {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-ms-flex-negative: 0;flex-shrink: 0;gap: 8px;width: 256px;height: var(--hi-v5-height-12, 48px);padding: 0 var(--hi-v5-spacing-6, 12px);border: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-200, #edeff2);border-radius: var(--hi-v5-border-radius-lg, 6px);overflow: hidden;cursor: pointer;}.hi-v5-app-list-item:hover {background-color: var(--hi-v5-color-gray-100, #f2f4f7);}.hi-v5-app-list-item__icon {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-inline-box;display: -ms-inline-flexbox;display: inline-flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;overflow: hidden;width: var(--hi-v5-height-6, 24px);height: var(--hi-v5-height-6, 24px);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);border-radius: var(--hi-v5-border-radius-lg, 6px);font-size: var(--hi-v5-text-size-md, 0.875rem);font-weight: var(--hi-v5-text-weight-medium, 500);color: var(--hi-v5-color-static-white, #fff);background-color: var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));}.hi-v5-app-list-item__title {-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}.hi-v5-app-list-item__checked {display: none;font-size: var(--hi-v5-text-size-md, 0.875rem);color: var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));}.hi-v5-app-list-item--active .hi-v5-app-list-item__title {font-weight: var(--hi-v5-text-weight-medium, 500);}.hi-v5-app-list-item--active .hi-v5-app-list-item__checked {display: block;}.hi-v5-profile {width: 240px;}.hi-v5-profile__header {padding: var(--hi-v5-spacing-8, 16px) var(--hi-v5-spacing-8, 16px) var(--hi-v5-spacing-4, 8px);font-size: var(--hi-v5-text-size-lg, 1rem);line-height: var(--hi-v5-text-lineheight-lg, 1.5rem);font-weight: var(--hi-v5-text-weight-medium, 500);}.hi-v5-profile__settings {padding: var(--hi-v5-spacing-4, 8px);}.hi-v5-profile__settings-item {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: start;-ms-flex-align: start;align-items: flex-start;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;padding: var(--hi-v5-spacing-4, 8px);border-radius: var(--hi-v5-border-radius-lg, 6px);cursor: pointer;}.hi-v5-profile__settings-item:hover {background-color: var(--hi-v5-color-gray-100, #f2f4f7);}.hi-v5-profile__settings-item__title {font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);}.hi-v5-profile__settings-item__subtitle {font-size: var(--hi-v5-text-size-sm, 0.75rem);line-height: var(--hi-v5-text-lineheight-sm, 1.25rem);font-weight: var(--hi-v5-text-weight-medium, 500);color: var(--hi-v5-color-gray-600, #91959e);}.hi-v5-profile__settings-item__arrow {font-size: var(--hi-v5-text-size-lg, 1rem);color: var(--hi-v5-color-gray-600, #91959e);}.hi-v5-profile__settings-item-leaf {-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;height: 40px;padding: var(--hi-v5-spacing-4, 8px);border-radius: var(--hi-v5-border-radius-md, 4px);cursor: pointer;font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);}.hi-v5-profile__settings-item-leaf:hover {background-color: var(--hi-v5-color-gray-100, #f2f4f7);}.hi-v5-profile__settings-item-leaf--checked {color: var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));}.hi-v5-profile__footer {padding: var(--hi-v5-spacing-4, 8px);border-top: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-300, #e6e8eb);}.hi-v5-profile__footer__content {-webkit-box-sizing: border-box;box-sizing: border-box;height: 40px;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;padding: var(--hi-v5-spacing-4, 8px);border-radius: var(--hi-v5-border-radius-lg, 6px);cursor: pointer;font-size: var(--hi-v5-text-size-md, 0.875rem);line-height: var(--hi-v5-text-lineheight-md, 1.375rem);}.hi-v5-profile__footer__content:hover {background-color: var(--hi-v5-color-gray-100, #f2f4f7);}";
|
|
12
12
|
__styleInject__(css_248z);
|
|
13
13
|
export { css_248z as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hi-ui/layout",
|
|
3
|
-
"version": "5.0.0-canary.
|
|
3
|
+
"version": "5.0.0-canary.12",
|
|
4
4
|
"description": "A sub-package for @hi-ui/hiui.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "HiUI <mi-hiui@xiaomi.com>",
|
|
@@ -46,18 +46,21 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@hi-ui/classname": "^5.0.0-canary.2",
|
|
48
48
|
"@hi-ui/env": "^5.0.0-canary.2",
|
|
49
|
-
"@hi-ui/
|
|
50
|
-
"@hi-ui/
|
|
49
|
+
"@hi-ui/icons": "^5.0.0-canary.5",
|
|
50
|
+
"@hi-ui/menu": "^5.0.0-canary.13",
|
|
51
|
+
"@hi-ui/popper": "^5.0.0-canary.9",
|
|
52
|
+
"@hi-ui/popover": "^5.0.0-canary.8",
|
|
53
|
+
"@hi-ui/use-toggle": "^5.0.0-canary.2",
|
|
51
54
|
"@hi-ui/use-uncontrolled-state": "^5.0.0-canary.2"
|
|
52
55
|
},
|
|
53
56
|
"peerDependencies": {
|
|
54
|
-
"@hi-ui/core": ">=5.0.0-canary.
|
|
57
|
+
"@hi-ui/core": ">=5.0.0-canary.6",
|
|
55
58
|
"react": ">=16.8.6",
|
|
56
59
|
"react-dom": ">=16.8.6"
|
|
57
60
|
},
|
|
58
61
|
"devDependencies": {
|
|
59
|
-
"@hi-ui/core": "^5.0.0-canary.
|
|
60
|
-
"@hi-ui/core-css": "^5.0.0-canary.
|
|
62
|
+
"@hi-ui/core": "^5.0.0-canary.6",
|
|
63
|
+
"@hi-ui/core-css": "^5.0.0-canary.9",
|
|
61
64
|
"react": "^17.0.1",
|
|
62
65
|
"react-dom": "^17.0.1"
|
|
63
66
|
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/** @LICENSE
|
|
2
|
-
* @hi-ui/layout
|
|
3
|
-
* https://github.com/XiaoMi/hiui/tree/master/packages/ui/layout#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
|
-
var v4 = require('../../node_modules/uuid/dist/esm-browser/v4.js');
|
|
17
|
-
|
|
18
|
-
/** @LICENSE
|
|
19
|
-
* @hi-ui/use-id
|
|
20
|
-
* https://github.com/XiaoMi/hiui/tree/master/packages/hooks/use-id#readme
|
|
21
|
-
*
|
|
22
|
-
* Copyright (c) HiUI <mi-hiui@xiaomi.com>.
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the MIT license found in the
|
|
25
|
-
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Generate a uuid.
|
|
30
|
-
*/
|
|
31
|
-
var uuid = function uuid() {
|
|
32
|
-
return v4["default"]();
|
|
33
|
-
};
|
|
34
|
-
var IdGenerator = function IdGenerator() {
|
|
35
|
-
var _this = this;
|
|
36
|
-
this.id = 0;
|
|
37
|
-
this.next = function () {
|
|
38
|
-
return ++_this.id;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
var idGenerator = new IdGenerator();
|
|
42
|
-
/**
|
|
43
|
-
* A hook to generate a uid
|
|
44
|
-
*/
|
|
45
|
-
var useUID = function useUID(prefix) {
|
|
46
|
-
return React.useMemo(function () {
|
|
47
|
-
return prefix + '-' + idGenerator.next();
|
|
48
|
-
}, [prefix]);
|
|
49
|
-
};
|
|
50
|
-
exports.useUID = useUID;
|
|
51
|
-
exports.uuid = uuid;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/** @LICENSE
|
|
2
|
-
* @hi-ui/layout
|
|
3
|
-
* https://github.com/XiaoMi/hiui/tree/master/packages/ui/layout#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 REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
16
|
-
exports["default"] = REGEX;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/** @LICENSE
|
|
2
|
-
* @hi-ui/layout
|
|
3
|
-
* https://github.com/XiaoMi/hiui/tree/master/packages/ui/layout#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
|
-
|
|
16
|
-
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
17
|
-
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
18
|
-
// generators (like Math.random()).
|
|
19
|
-
var getRandomValues;
|
|
20
|
-
var rnds8 = new Uint8Array(16);
|
|
21
|
-
function rng() {
|
|
22
|
-
// lazy load so that environments that need to polyfill have a chance to do so
|
|
23
|
-
if (!getRandomValues) {
|
|
24
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
|
|
25
|
-
// find the complete implementation of crypto (msCrypto) on IE11.
|
|
26
|
-
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
|
|
27
|
-
if (!getRandomValues) {
|
|
28
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return getRandomValues(rnds8);
|
|
32
|
-
}
|
|
33
|
-
exports["default"] = rng;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/** @LICENSE
|
|
2
|
-
* @hi-ui/layout
|
|
3
|
-
* https://github.com/XiaoMi/hiui/tree/master/packages/ui/layout#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 validate = require('./validate.js');
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Convert array of 16 byte values to UUID string format of the form:
|
|
19
|
-
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
var byteToHex = [];
|
|
23
|
-
for (var i = 0; i < 256; ++i) {
|
|
24
|
-
byteToHex.push((i + 0x100).toString(16).substr(1));
|
|
25
|
-
}
|
|
26
|
-
function stringify(arr) {
|
|
27
|
-
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
28
|
-
// Note: Be careful editing this code! It's been tuned for performance
|
|
29
|
-
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
30
|
-
var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
|
|
31
|
-
// of the following:
|
|
32
|
-
// - One or more input array values don't map to a hex octet (leading to
|
|
33
|
-
// "undefined" in the uuid)
|
|
34
|
-
// - Invalid input values for the RFC `version` or `variant` fields
|
|
35
|
-
|
|
36
|
-
if (!validate["default"](uuid)) {
|
|
37
|
-
throw TypeError('Stringified UUID is invalid');
|
|
38
|
-
}
|
|
39
|
-
return uuid;
|
|
40
|
-
}
|
|
41
|
-
exports["default"] = stringify;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/** @LICENSE
|
|
2
|
-
* @hi-ui/layout
|
|
3
|
-
* https://github.com/XiaoMi/hiui/tree/master/packages/ui/layout#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 rng = require('./rng.js');
|
|
16
|
-
var stringify = require('./stringify.js');
|
|
17
|
-
function v4(options, buf, offset) {
|
|
18
|
-
options = options || {};
|
|
19
|
-
var rnds = options.random || (options.rng || rng["default"])(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
20
|
-
|
|
21
|
-
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
22
|
-
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
23
|
-
|
|
24
|
-
if (buf) {
|
|
25
|
-
offset = offset || 0;
|
|
26
|
-
for (var i = 0; i < 16; ++i) {
|
|
27
|
-
buf[offset + i] = rnds[i];
|
|
28
|
-
}
|
|
29
|
-
return buf;
|
|
30
|
-
}
|
|
31
|
-
return stringify["default"](rnds);
|
|
32
|
-
}
|
|
33
|
-
exports["default"] = v4;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/** @LICENSE
|
|
2
|
-
* @hi-ui/layout
|
|
3
|
-
* https://github.com/XiaoMi/hiui/tree/master/packages/ui/layout#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 regex = require('./regex.js');
|
|
16
|
-
function validate(uuid) {
|
|
17
|
-
return typeof uuid === 'string' && regex["default"].test(uuid);
|
|
18
|
-
}
|
|
19
|
-
exports["default"] = validate;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/** @LICENSE
|
|
2
|
-
* @hi-ui/layout
|
|
3
|
-
* https://github.com/XiaoMi/hiui/tree/master/packages/ui/layout#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/use-latest
|
|
19
|
-
* https://github.com/XiaoMi/hiui/tree/master/packages/hooks/use-latest#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
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Keep value up-to-date if it changes.
|
|
29
|
-
*
|
|
30
|
-
* @param value
|
|
31
|
-
* @returns
|
|
32
|
-
*/
|
|
33
|
-
var useLatestRef = function useLatestRef(value) {
|
|
34
|
-
var ref = React.useRef(value);
|
|
35
|
-
ref.current = value;
|
|
36
|
-
return ref;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Keep callback function up-to-date if it changes.
|
|
40
|
-
*
|
|
41
|
-
* @param callback
|
|
42
|
-
* @returns
|
|
43
|
-
*/
|
|
44
|
-
var useLatestCallback = function useLatestCallback(callback) {
|
|
45
|
-
var ref = useLatestRef(callback);
|
|
46
|
-
return React.useCallback(function () {
|
|
47
|
-
var _a2;
|
|
48
|
-
var _a;
|
|
49
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
50
|
-
args[_key] = arguments[_key];
|
|
51
|
-
}
|
|
52
|
-
return (_a = ref.current) === null || _a === void 0 ? void 0 : (_a2 = _a).call.apply(_a2, [ref].concat(args));
|
|
53
|
-
}, []);
|
|
54
|
-
};
|
|
55
|
-
exports.useLatestCallback = useLatestCallback;
|
|
56
|
-
exports.useLatestRef = useLatestRef;
|