@hi-ui/menu 4.0.0-beta.3 → 4.0.0-beta.30

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.
@@ -15,6 +15,8 @@ Object.defineProperty(exports, '__esModule', {
15
15
  value: true
16
16
  });
17
17
 
18
+ var tslib = require('tslib');
19
+
18
20
  var React = require('react');
19
21
 
20
22
  var classname = require('@hi-ui/classname');
@@ -25,10 +27,16 @@ var icons = require('@hi-ui/icons');
25
27
 
26
28
  var context = require('./context.js');
27
29
 
28
- var popper = require('@hi-ui/popper');
30
+ var Popper = require('@hi-ui/popper');
29
31
 
30
32
  var Expander = require('./Expander.js');
31
33
 
34
+ var typeAssertion = require('@hi-ui/type-assertion');
35
+
36
+ var arrayUtils = require('@hi-ui/array-utils');
37
+
38
+ var useMergeRefs = require('@hi-ui/use-merge-refs');
39
+
32
40
  function _interopDefaultLegacy(e) {
33
41
  return e && _typeof(e) === 'object' && 'default' in e ? e : {
34
42
  'default': e
@@ -37,24 +45,38 @@ function _interopDefaultLegacy(e) {
37
45
 
38
46
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
39
47
 
40
- var MENU_PREFIX = classname.getPrefixCls('menu');
48
+ var Popper__default = /*#__PURE__*/_interopDefaultLegacy(Popper);
41
49
 
42
- var MenuItem = function MenuItem(_ref) {
50
+ var MENU_PREFIX = classname.getPrefixCls('menu');
51
+ var hiddenStyle = {
52
+ position: 'absolute',
53
+ opacity: 0,
54
+ order: 9999,
55
+ visibility: 'hidden'
56
+ };
57
+ var MenuItem = /*#__PURE__*/React.forwardRef(function (_a, ref) {
43
58
  var _cx, _cx2;
44
59
 
45
- var _ref$prefixCls = _ref.prefixCls,
46
- prefixCls = _ref$prefixCls === void 0 ? MENU_PREFIX : _ref$prefixCls,
47
- icon = _ref.icon,
48
- title = _ref.title,
49
- disabled = _ref.disabled,
50
- id = _ref.id,
51
- _ref$level = _ref.level,
52
- level = _ref$level === void 0 ? 1 : _ref$level,
53
- children = _ref.children,
54
- parentIds = _ref.parentIds;
60
+ var _a$prefixCls = _a.prefixCls,
61
+ prefixCls = _a$prefixCls === void 0 ? MENU_PREFIX : _a$prefixCls,
62
+ className = _a.className,
63
+ icon = _a.icon,
64
+ title = _a.title,
65
+ disabled = _a.disabled,
66
+ id = _a.id,
67
+ _a$level = _a.level,
68
+ level = _a$level === void 0 ? 1 : _a$level,
69
+ children = _a.children,
70
+ parentIds = _a.parentIds,
71
+ _a$hidden = _a.hidden,
72
+ hidden = _a$hidden === void 0 ? false : _a$hidden,
73
+ render = _a.render,
74
+ raw = _a.raw,
75
+ rest = tslib.__rest(_a, ["prefixCls", "className", "icon", "title", "disabled", "id", "level", "children", "parentIds", "hidden", "render", "raw"]);
76
+
55
77
  var itemRef = React.useRef(null);
56
78
 
57
- var _useContext = React.useContext(context['default']),
79
+ var _useContext = React.useContext(context["default"]),
58
80
  placement = _useContext.placement,
59
81
  expandedType = _useContext.expandedType,
60
82
  showAllSubMenus = _useContext.showAllSubMenus,
@@ -69,50 +91,71 @@ var MenuItem = function MenuItem(_ref) {
69
91
 
70
92
  var _parentIds = (parentIds || []).concat(id);
71
93
 
72
- return /*#__PURE__*/React__default['default'].createElement("li", {
73
- ref: itemRef,
74
- className: classname.cx(prefixCls + "-item", (_cx = {}, _cx[prefixCls + "-item--disabled"] = disabled, _cx[prefixCls + "-item--active"] = placement === 'horizontal' && (activeId === id || (activeParents === null || activeParents === void 0 ? void 0 : activeParents.includes(id))) && level === 1, _cx))
75
- }, /*#__PURE__*/React__default['default'].createElement("div", {
76
- className: classname.cx(prefixCls + "-item__inner", (_cx2 = {}, _cx2[prefixCls + "-item__inner--mini"] = mini, _cx2[prefixCls + "-item__inner--active"] = activeId === id, _cx2[prefixCls + "-item__inner--active-p"] = activeParents === null || activeParents === void 0 ? void 0 : activeParents.includes(id), _cx2)),
94
+ var hasChildren = typeAssertion.isArrayNonEmpty(children);
95
+ var mergedRef = useMergeRefs.useMergeRefs(itemRef, ref);
96
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("li", Object.assign({
97
+ ref: mergedRef,
98
+ className: classname.cx(prefixCls + "-item", (_cx = {}, _cx[prefixCls + "-item__inner--mini"] = mini, _cx[prefixCls + "-item--disabled"] = disabled, _cx[prefixCls + "-item--active"] = placement === 'horizontal' && (activeId === id || (activeParents === null || activeParents === void 0 ? void 0 : activeParents.includes(id))) && level === 1, _cx), className),
99
+ style: hidden ? hiddenStyle : undefined
100
+ }, rest), /*#__PURE__*/React__default["default"].createElement("div", {
101
+ className: classname.cx(prefixCls + "-item__inner", (_cx2 = {}, _cx2[prefixCls + "-item__inner--active"] = activeId === id, _cx2[prefixCls + "-item__inner--active-p"] = activeParents === null || activeParents === void 0 ? void 0 : activeParents.includes(id), _cx2[prefixCls + "-item__inner--expanded"] = expandedIds === null || expandedIds === void 0 ? void 0 : expandedIds.includes(id), _cx2)),
77
102
  onClick: function onClick() {
78
- if (children === null || children === void 0 ? void 0 : children.length) {
103
+ if (typeAssertion.isArrayNonEmpty(children)) {
79
104
  if (clickSubMenu) {
80
105
  clickSubMenu(id);
81
106
  }
82
107
  } else {
83
108
  if (clickMenu) {
84
- clickMenu(id);
109
+ // @ts-ignore
110
+ clickMenu(id, raw);
85
111
  }
86
112
 
87
113
  if (closeAllPopper && !(placement === 'vertical' && expandedType === 'collapse' && mini === false)) {
88
114
  closeAllPopper();
89
115
  }
90
116
  }
91
- },
92
- style: placement === 'vertical' && expandedType === 'collapse' && !mini ? {
93
- paddingLeft: level > 1 ? 12 + (level - 1 > 0 ? 1 : 0) * 20 + (level - 2 || 0) * 16 : 12
94
- } : {}
95
- }, icon, /*#__PURE__*/React__default['default'].createElement("span", {
96
- className: prefixCls + "-item__content"
97
- }, title), (children === null || children === void 0 ? void 0 : children.length) && !mini && placement === 'vertical' && expandedType === 'collapse' && !showAllSubMenus && ((expandedIds === null || expandedIds === void 0 ? void 0 : expandedIds.includes(id)) ? /*#__PURE__*/React__default['default'].createElement(icons.UpOutlined, null) : /*#__PURE__*/React__default['default'].createElement(icons.DownOutlined, null)), (children === null || children === void 0 ? void 0 : children.length) && mini && level > 1 && placement === 'vertical' && /*#__PURE__*/React__default['default'].createElement(icons.RightOutlined, null), (children === null || children === void 0 ? void 0 : children.length) && !mini && placement === 'vertical' && (expandedType === 'pop' || showAllSubMenus) && /*#__PURE__*/React__default['default'].createElement(icons.RightOutlined, null), (children === null || children === void 0 ? void 0 : children.length) && placement === 'horizontal' && level > 1 && /*#__PURE__*/React__default['default'].createElement(icons.RightOutlined, null), (children === null || children === void 0 ? void 0 : children.length) && placement === 'horizontal' && level === 1 && ((expandedIds === null || expandedIds === void 0 ? void 0 : expandedIds.includes(id)) ? /*#__PURE__*/React__default['default'].createElement(icons.UpOutlined, {
98
- style: {
99
- marginLeft: 4
100
- }
101
- }) : /*#__PURE__*/React__default['default'].createElement(icons.DownOutlined, {
102
- style: {
103
- marginLeft: 4
104
117
  }
105
- }))), (children === null || children === void 0 ? void 0 : children.length) && placement === 'vertical' && !mini && !showAllSubMenus && expandedType === 'collapse' && /*#__PURE__*/React__default['default'].createElement(Expander.Expander, {
118
+ }, placement === 'vertical' && expandedType === 'collapse' && !mini ? renderIndent({
119
+ prefixCls: prefixCls + "-item",
120
+ depth: level - 1
121
+ }) : null, icon ? /*#__PURE__*/React__default["default"].createElement("span", {
122
+ className: prefixCls + "-item__icon"
123
+ }, icon) : null, /*#__PURE__*/React__default["default"].createElement("span", {
124
+ className: prefixCls + "-item__content"
125
+ }, typeAssertion.isFunction(render) ? render({
126
+ id: id,
127
+ icon: icon,
128
+ title: title
129
+ }) : title), hasChildren && !mini && placement === 'vertical' && expandedType === 'collapse' && !showAllSubMenus && ((expandedIds === null || expandedIds === void 0 ? void 0 : expandedIds.includes(id)) ? /*#__PURE__*/React__default["default"].createElement(Arrow, {
130
+ prefixCls: prefixCls + "-item",
131
+ direction: "up"
132
+ }) : /*#__PURE__*/React__default["default"].createElement(Arrow, {
133
+ prefixCls: prefixCls + "-item",
134
+ direction: "down"
135
+ })), hasChildren && mini && level > 1 && placement === 'vertical' ? /*#__PURE__*/React__default["default"].createElement(Arrow, {
136
+ prefixCls: prefixCls + "-item"
137
+ }) : null, hasChildren && !mini && placement === 'vertical' && (expandedType === 'pop' || showAllSubMenus) ? /*#__PURE__*/React__default["default"].createElement(Arrow, {
138
+ prefixCls: prefixCls + "-item"
139
+ }) : null, hasChildren && placement === 'horizontal' && level > 1 ? /*#__PURE__*/React__default["default"].createElement(Arrow, {
140
+ prefixCls: prefixCls + "-item"
141
+ }) : null, hasChildren && placement === 'horizontal' && level === 1 && ((expandedIds === null || expandedIds === void 0 ? void 0 : expandedIds.includes(id)) ? /*#__PURE__*/React__default["default"].createElement(Arrow, {
142
+ prefixCls: prefixCls + "-item",
143
+ direction: "up"
144
+ }) : /*#__PURE__*/React__default["default"].createElement(Arrow, {
145
+ prefixCls: prefixCls + "-item",
146
+ direction: "down"
147
+ }))), hasChildren && placement === 'vertical' && !mini && !showAllSubMenus && expandedType === 'collapse' ? /*#__PURE__*/React__default["default"].createElement(Expander.Expander, {
106
148
  visible: !!(expandedIds === null || expandedIds === void 0 ? void 0 : expandedIds.includes(id))
107
- }, /*#__PURE__*/React__default['default'].createElement("ul", {
149
+ }, /*#__PURE__*/React__default["default"].createElement("ul", {
108
150
  className: prefixCls + "-submenu"
109
151
  }, children.map(function (child) {
110
- return /*#__PURE__*/React__default['default'].createElement(MenuItem, Object.assign({}, child, {
152
+ return /*#__PURE__*/React__default["default"].createElement(MenuItem, Object.assign({}, child, {
111
153
  key: child.id,
112
154
  level: level + 1,
113
- parentIds: _parentIds
155
+ parentIds: _parentIds,
156
+ raw: child
114
157
  }));
115
- }))), (children === null || children === void 0 ? void 0 : children.length) && placement === 'vertical' && mini && !showAllSubMenus && expandedType === 'collapse' && (level === 1 ? /*#__PURE__*/React__default['default'].createElement(popper.PopperPortal, {
158
+ }))) : null), hasChildren && placement === 'vertical' && mini && !showAllSubMenus && expandedType === 'collapse' && (level === 1 ? /*#__PURE__*/React__default["default"].createElement(Popper__default["default"], {
116
159
  visible: !!(expandedIds === null || expandedIds === void 0 ? void 0 : expandedIds.includes(id)),
117
160
  attachEl: itemRef.current,
118
161
  placement: 'right-start',
@@ -122,33 +165,34 @@ var MenuItem = function MenuItem(_ref) {
122
165
  closePopper(id);
123
166
  }
124
167
  }
125
- }, /*#__PURE__*/React__default['default'].createElement("ul", {
168
+ }, /*#__PURE__*/React__default["default"].createElement("ul", {
126
169
  className: prefixCls + "-popmenu"
127
170
  }, children.map(function (child) {
128
- return /*#__PURE__*/React__default['default'].createElement(MenuItem, Object.assign({}, child, {
171
+ return /*#__PURE__*/React__default["default"].createElement(MenuItem, Object.assign({}, child, {
129
172
  key: child.id,
130
173
  level: level + 1,
131
174
  parentIds: _parentIds
132
175
  }));
133
- }))) : /*#__PURE__*/React__default['default'].createElement(popper.Popper, {
176
+ }))) : /*#__PURE__*/React__default["default"].createElement(Popper__default["default"], {
134
177
  visible: !!(expandedIds === null || expandedIds === void 0 ? void 0 : expandedIds.includes(id)),
135
178
  attachEl: itemRef.current,
136
179
  placement: 'right-start',
137
180
  gutterGap: 16,
181
+ disabledPortal: true,
138
182
  onClose: function onClose() {
139
183
  if (closePopper) {
140
184
  closePopper(id);
141
185
  }
142
186
  }
143
- }, /*#__PURE__*/React__default['default'].createElement("ul", {
187
+ }, /*#__PURE__*/React__default["default"].createElement("ul", {
144
188
  className: prefixCls + "-popmenu"
145
189
  }, children.map(function (child) {
146
- return /*#__PURE__*/React__default['default'].createElement(MenuItem, Object.assign({}, child, {
190
+ return /*#__PURE__*/React__default["default"].createElement(MenuItem, Object.assign({}, child, {
147
191
  key: child.id,
148
192
  level: level + 1,
149
193
  parentIds: _parentIds
150
194
  }));
151
- })))), (children === null || children === void 0 ? void 0 : children.length) && placement === 'vertical' && !showAllSubMenus && expandedType === 'pop' && (level === 1 ? /*#__PURE__*/React__default['default'].createElement(popper.PopperPortal, {
195
+ })))), hasChildren && placement === 'vertical' && !showAllSubMenus && expandedType === 'pop' && (level === 1 ? /*#__PURE__*/React__default["default"].createElement(Popper__default["default"], {
152
196
  visible: !!(expandedIds === null || expandedIds === void 0 ? void 0 : expandedIds.includes(id)),
153
197
  attachEl: itemRef.current,
154
198
  placement: 'right-start',
@@ -158,17 +202,18 @@ var MenuItem = function MenuItem(_ref) {
158
202
  closePopper(id);
159
203
  }
160
204
  }
161
- }, /*#__PURE__*/React__default['default'].createElement("ul", {
205
+ }, /*#__PURE__*/React__default["default"].createElement("ul", {
162
206
  className: prefixCls + "-popmenu"
163
207
  }, children.map(function (child) {
164
- return /*#__PURE__*/React__default['default'].createElement(MenuItem, Object.assign({}, child, {
208
+ return /*#__PURE__*/React__default["default"].createElement(MenuItem, Object.assign({}, child, {
165
209
  key: child.id,
166
210
  level: level + 1,
167
211
  parentIds: _parentIds
168
212
  }));
169
- }))) : /*#__PURE__*/React__default['default'].createElement(popper.Popper, {
213
+ }))) : /*#__PURE__*/React__default["default"].createElement(Popper__default["default"], {
170
214
  visible: !!(expandedIds === null || expandedIds === void 0 ? void 0 : expandedIds.includes(id)),
171
215
  attachEl: itemRef.current,
216
+ disabledPortal: true,
172
217
  placement: 'right-start',
173
218
  gutterGap: 16,
174
219
  onClose: function onClose() {
@@ -176,15 +221,15 @@ var MenuItem = function MenuItem(_ref) {
176
221
  closePopper(id);
177
222
  }
178
223
  }
179
- }, /*#__PURE__*/React__default['default'].createElement("ul", {
224
+ }, /*#__PURE__*/React__default["default"].createElement("ul", {
180
225
  className: prefixCls + "-popmenu"
181
226
  }, children.map(function (child) {
182
- return /*#__PURE__*/React__default['default'].createElement(MenuItem, Object.assign({}, child, {
227
+ return /*#__PURE__*/React__default["default"].createElement(MenuItem, Object.assign({}, child, {
183
228
  key: child.id,
184
229
  level: level + 1,
185
230
  parentIds: _parentIds
186
231
  }));
187
- })))), (children === null || children === void 0 ? void 0 : children.length) && placement === 'vertical' && showAllSubMenus && /*#__PURE__*/React__default['default'].createElement(popper.PopperPortal, {
232
+ })))), hasChildren && placement === 'vertical' && showAllSubMenus ? /*#__PURE__*/React__default["default"].createElement(Popper__default["default"], {
188
233
  visible: !!(expandedIds === null || expandedIds === void 0 ? void 0 : expandedIds.includes(id)),
189
234
  attachEl: itemRef.current,
190
235
  placement: 'right-start',
@@ -194,23 +239,21 @@ var MenuItem = function MenuItem(_ref) {
194
239
  closePopper(id);
195
240
  }
196
241
  }
197
- }, /*#__PURE__*/React__default['default'].createElement("div", {
242
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
198
243
  className: prefixCls + "-fat-menu"
199
244
  }, children.map(function (child) {
200
- var _a;
201
-
202
- return /*#__PURE__*/React__default['default'].createElement("div", {
245
+ return /*#__PURE__*/React__default["default"].createElement("div", {
203
246
  key: child.id,
204
247
  className: prefixCls + "-fat-menu__group"
205
- }, /*#__PURE__*/React__default['default'].createElement("div", {
248
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
206
249
  className: prefixCls + "-group-item"
207
- }, child.title), ((_a = child === null || child === void 0 ? void 0 : child.children) === null || _a === void 0 ? void 0 : _a.length) && /*#__PURE__*/React__default['default'].createElement("ul", null, child.children.map(function (item) {
250
+ }, child.title), child && typeAssertion.isArrayNonEmpty(child.children) ? /*#__PURE__*/React__default["default"].createElement("ul", null, child.children.map(function (item) {
208
251
  var _cx3;
209
252
 
210
- return /*#__PURE__*/React__default['default'].createElement("div", {
253
+ return /*#__PURE__*/React__default["default"].createElement("div", {
211
254
  onClick: function onClick() {
212
255
  if (clickMenu) {
213
- clickMenu(item.id);
256
+ clickMenu(item.id, item);
214
257
  }
215
258
 
216
259
  if (closePopper) {
@@ -220,8 +263,8 @@ var MenuItem = function MenuItem(_ref) {
220
263
  className: classname.cx(prefixCls + "-item", (_cx3 = {}, _cx3[prefixCls + "-item--active"] = activeId === item.id, _cx3)),
221
264
  key: item.id
222
265
  }, item.title);
223
- })));
224
- }))), (children === null || children === void 0 ? void 0 : children.length) && placement === 'horizontal' && !showAllSubMenus && (level === 1 ? /*#__PURE__*/React__default['default'].createElement(popper.PopperPortal, {
266
+ })) : null);
267
+ }))) : null, hasChildren && placement === 'horizontal' && !showAllSubMenus && (level === 1 ? /*#__PURE__*/React__default["default"].createElement(Popper__default["default"], {
225
268
  visible: !!(expandedIds === null || expandedIds === void 0 ? void 0 : expandedIds.includes(id)),
226
269
  attachEl: itemRef.current,
227
270
  placement: level === 1 ? 'bottom-start' : 'right-start',
@@ -231,17 +274,18 @@ var MenuItem = function MenuItem(_ref) {
231
274
  closePopper(id);
232
275
  }
233
276
  }
234
- }, /*#__PURE__*/React__default['default'].createElement("ul", {
277
+ }, /*#__PURE__*/React__default["default"].createElement("ul", {
235
278
  className: prefixCls + "-popmenu"
236
279
  }, children.map(function (child) {
237
- return /*#__PURE__*/React__default['default'].createElement(MenuItem, Object.assign({}, child, {
280
+ return /*#__PURE__*/React__default["default"].createElement(MenuItem, Object.assign({}, child, {
238
281
  key: child.id,
239
282
  level: level + 1,
240
283
  parentIds: _parentIds
241
284
  }));
242
- }))) : /*#__PURE__*/React__default['default'].createElement(popper.Popper, {
285
+ }))) : /*#__PURE__*/React__default["default"].createElement(Popper__default["default"], {
243
286
  visible: !!(expandedIds === null || expandedIds === void 0 ? void 0 : expandedIds.includes(id)),
244
287
  attachEl: itemRef.current,
288
+ disabledPortal: true,
245
289
  placement: level === 1 ? 'bottom-start' : 'right-start',
246
290
  gutterGap: level === 1 ? 8 : 16,
247
291
  onClose: function onClose() {
@@ -249,15 +293,15 @@ var MenuItem = function MenuItem(_ref) {
249
293
  closePopper(id);
250
294
  }
251
295
  }
252
- }, /*#__PURE__*/React__default['default'].createElement("ul", {
296
+ }, /*#__PURE__*/React__default["default"].createElement("ul", {
253
297
  className: prefixCls + "-popmenu"
254
298
  }, children.map(function (child) {
255
- return /*#__PURE__*/React__default['default'].createElement(MenuItem, Object.assign({}, child, {
299
+ return /*#__PURE__*/React__default["default"].createElement(MenuItem, Object.assign({}, child, {
256
300
  key: child.id,
257
301
  level: level + 1,
258
302
  parentIds: _parentIds
259
303
  }));
260
- })))), (children === null || children === void 0 ? void 0 : children.length) && placement === 'horizontal' && showAllSubMenus && /*#__PURE__*/React__default['default'].createElement(popper.PopperPortal, {
304
+ })))), hasChildren && placement === 'horizontal' && showAllSubMenus ? /*#__PURE__*/React__default["default"].createElement(Popper__default["default"], {
261
305
  visible: !!(expandedIds === null || expandedIds === void 0 ? void 0 : expandedIds.includes(id)),
262
306
  attachEl: itemRef.current,
263
307
  placement: 'bottom-start',
@@ -267,24 +311,22 @@ var MenuItem = function MenuItem(_ref) {
267
311
  closePopper(id);
268
312
  }
269
313
  }
270
- }, /*#__PURE__*/React__default['default'].createElement("div", {
314
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
271
315
  className: prefixCls + "-fat-menu"
272
316
  }, children.map(function (child) {
273
- var _a;
274
-
275
- return /*#__PURE__*/React__default['default'].createElement("div", {
317
+ return /*#__PURE__*/React__default["default"].createElement("div", {
276
318
  key: child.id,
277
319
  className: prefixCls + "-fat-menu__group"
278
- }, /*#__PURE__*/React__default['default'].createElement("div", {
320
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
279
321
  className: prefixCls + "-group-item"
280
- }, child.title), ((_a = child === null || child === void 0 ? void 0 : child.children) === null || _a === void 0 ? void 0 : _a.length) && /*#__PURE__*/React__default['default'].createElement("ul", null, child.children.map(function (item) {
322
+ }, child.title), child && typeAssertion.isArrayNonEmpty(child.children) ? /*#__PURE__*/React__default["default"].createElement("ul", null, child.children.map(function (item) {
281
323
  var _cx4;
282
324
 
283
- return /*#__PURE__*/React__default['default'].createElement("div", {
325
+ return /*#__PURE__*/React__default["default"].createElement("div", {
284
326
  className: classname.cx(prefixCls + "-item", (_cx4 = {}, _cx4[prefixCls + "-item--active"] = activeId === item.id, _cx4)),
285
327
  onClick: function onClick() {
286
328
  if (clickMenu) {
287
- clickMenu(item.id);
329
+ clickMenu(item.id, item);
288
330
  }
289
331
 
290
332
  if (closePopper) {
@@ -293,13 +335,50 @@ var MenuItem = function MenuItem(_ref) {
293
335
  },
294
336
  key: item.id
295
337
  }, item.title);
296
- })));
297
- }))));
298
- };
338
+ })) : null);
339
+ }))) : null);
340
+ });
299
341
 
300
342
  if (env.__DEV__) {
301
343
  MenuItem.displayName = 'MenuItem';
302
344
  }
303
345
 
346
+ var Arrow = function Arrow(_ref) {
347
+ var prefixCls = _ref.prefixCls,
348
+ direction = _ref.direction;
349
+ var icon = null;
350
+
351
+ switch (direction) {
352
+ case 'up':
353
+ icon = /*#__PURE__*/React__default["default"].createElement(icons.UpOutlined, null);
354
+ break;
355
+
356
+ case 'down':
357
+ icon = /*#__PURE__*/React__default["default"].createElement(icons.DownOutlined, null);
358
+ break;
359
+
360
+ default:
361
+ icon = /*#__PURE__*/React__default["default"].createElement(icons.RightOutlined, null);
362
+ }
363
+
364
+ return /*#__PURE__*/React__default["default"].createElement("span", {
365
+ className: prefixCls + "__arrow"
366
+ }, icon);
367
+ };
368
+ /**
369
+ * 渲染空白占位
370
+ */
371
+
372
+
373
+ var renderIndent = function renderIndent(_ref2) {
374
+ var prefixCls = _ref2.prefixCls,
375
+ depth = _ref2.depth;
376
+ return arrayUtils.times(depth, function (index) {
377
+ return /*#__PURE__*/React__default["default"].createElement("span", {
378
+ className: prefixCls + "__indent",
379
+ key: index
380
+ });
381
+ });
382
+ };
383
+
304
384
  exports.MenuItem = MenuItem;
305
- //# sourceMappingURL=MenuItem.js.map
@@ -17,4 +17,3 @@ var React = require('react');
17
17
 
18
18
  var MenuContext = /*#__PURE__*/React.createContext({});
19
19
  exports["default"] = MenuContext;
20
- //# sourceMappingURL=context.js.map
package/lib/cjs/index.js CHANGED
@@ -19,4 +19,3 @@ var Menu = require('./Menu.js');
19
19
 
20
20
  exports.Menu = Menu.Menu;
21
21
  exports["default"] = Menu.Menu;
22
- //# sourceMappingURL=index.js.map
@@ -12,11 +12,10 @@
12
12
  Object.defineProperty(exports, '__esModule', {
13
13
  value: true
14
14
  });
15
- var css_248z = "@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n.hi-v4-menu-fat-menu {\n background-color: var(--hi-v4-color-static-white, #fff);\n margin: 0;\n font-size: var(--hi-v4-text-size-normal, 0.875rem);\n padding: var(--hi-v4-spacing-4, 8px);\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n color: var(--hi-v4-color-gray-700, #1f2733);\n border-radius: var(--hi-v4-border-radius-normal, 4px);\n -ms-flex-wrap: wrap;\n flex-wrap: wrap; }\n.hi-v4-menu-fat-menu__group:not(:last-of-type) {\n margin-right: var(--hi-v4-spacing-18, 36px); }\n.hi-v4-menu-fat-menu .hi-v4-menu-group-item {\n height: 40px;\n margin: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n padding: 0 var(--hi-v4-spacing-6, 12px);\n color: var(--hi-v4-color-gray-500, #929aa6); }\n.hi-v4-menu-fat-menu .hi-v4-menu-item {\n height: 40px;\n margin: 0;\n border-radius: var(--hi-v4-border-radius-normal, 4px);\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n padding: 0 var(--hi-v4-spacing-6, 12px); }\n.hi-v4-menu-fat-menu .hi-v4-menu-item--active {\n color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));\n background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }\n.hi-v4-menu-fat-menu .hi-v4-menu-item:not(.hi-v4-menu-item--active):hover {\n background-color: var(--hi-v4-color-gray-100, #f2f4f7); }\n.hi-v4-menu-fat-menu ul {\n padding: 0;\n margin: 0; }\n.hi-v4-menu-fat-menu ul li {\n list-style-type: none; }\n.hi-v4-menu-popmenu {\n background-color: var(--hi-v4-color-static-white, #fff);\n border-radius: var(--hi-v4-border-radius-normal, 4px);\n margin: 0;\n font-size: var(--hi-v4-text-size-normal, 0.875rem);\n padding: var(--hi-v4-spacing-4, 8px);\n color: var(--hi-v4-color-gray-700, #1f2733); }\n.hi-v4-menu-popmenu .hi-v4-menu-item {\n height: 40px;\n margin: 0; }\n.hi-v4-menu-popmenu .hi-v4-menu-item__inner {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n height: 40px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n margin-bottom: var(--hi-v4-spacing-4, 8px);\n padding: 0 var(--hi-v4-spacing-6, 12px);\n border-radius: var(--hi-v4-border-radius-normal, 4px); }\n.hi-v4-menu-popmenu .hi-v4-menu-item__inner--active {\n color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));\n background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }\n.hi-v4-menu-popmenu .hi-v4-menu-item__inner--active-p {\n color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }\n.hi-v4-menu-popmenu .hi-v4-menu-item__inner:not(.hi-v4-menu-item__inner--active):hover {\n background-color: var(--hi-v4-color-gray-100, #f2f4f7); }\n.hi-v4-menu-popmenu .hi-v4-menu-item__content {\n -webkit-box-flex: 1;\n -ms-flex: 1 1;\n flex: 1 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 100px;\n padding-right: var(--hi-v4-spacing-4, 8px); }\n.hi-v4-menu {\n background-color: var(--hi-v4-color-static-white, #fff);\n color: var(--hi-v4-color-gray-700, #1f2733);\n font-size: var(--hi-v4-text-size-normal, 0.875rem);\n line-height: var(--hi-v4-text-lineheight-normal, 1.375rem);\n -webkit-box-sizing: border-box;\n box-sizing: border-box; }\n.hi-v4-menu ul {\n margin: 0;\n padding: 0; }\n.hi-v4-menu-item {\n list-style: none;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n cursor: pointer;\n -webkit-transition: all 0.3s;\n transition: all 0.3s; }\n.hi-v4-menu__wrapper {\n padding: 0;\n margin: 0; }\n.hi-v4-menu--horizontal {\n width: 100%;\n overflow: auto; }\n.hi-v4-menu--horizontal .hi-v4-menu__wrapper {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex; }\n.hi-v4-menu--horizontal .hi-v4-menu-item {\n margin: 0 var(--hi-v4-spacing-10, 20px);\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n height: 56px;\n border-bottom: 2px solid transparent;\n font-size: var(--hi-v4-text-size-lg, 1rem); }\n.hi-v4-menu--horizontal .hi-v4-menu-item:hover {\n color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));\n border-bottom: 2px solid var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }\n.hi-v4-menu--horizontal .hi-v4-menu-item--active {\n color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));\n border-bottom: 2px solid var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }\n.hi-v4-menu--horizontal .hi-v4-menu-item--active-p {\n color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }\n.hi-v4-menu--horizontal .hi-v4-menu-item__inner {\n height: 100%;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center; }\n.hi-v4-menu--horizontal .hi-v4-menu-item__content {\n -webkit-box-flex: 1;\n -ms-flex: 1 1;\n flex: 1 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 100px; }\n.hi-v4-menu--vertical {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n padding: var(--hi-v4-spacing-4, 8px);\n width: 232px;\n height: 100%;\n -webkit-transition: width 0.3s;\n transition: width 0.3s; }\n.hi-v4-menu--vertical .hi-v4-menu__wrapper {\n -webkit-box-flex: 1;\n -ms-flex: 1 1;\n flex: 1 1;\n overflow: auto; }\n.hi-v4-menu--vertical.hi-v4-menu--mini {\n width: 56px;\n overflow-x: hidden; }\n.hi-v4-menu--vertical .hi-v4-menu__toggle {\n width: 40px;\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n border-radius: var(--hi-v4-border-radius-normal, 4px);\n height: 40px; }\n.hi-v4-menu--vertical .hi-v4-menu__toggle:hover {\n background-color: var(--hi-v4-color-gray-100, #f2f4f7); }\n.hi-v4-menu--vertical .hi-v4-menu-item__inner {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n height: 40px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n margin-bottom: var(--hi-v4-spacing-4, 8px);\n padding: 0 var(--hi-v4-spacing-6, 12px);\n border-radius: var(--hi-v4-border-radius-normal, 4px);\n -webkit-transition: all 0.3s;\n transition: all 0.3s; }\n.hi-v4-menu--vertical .hi-v4-menu-item__inner--active {\n color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));\n background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }\n.hi-v4-menu--vertical .hi-v4-menu-item__inner--active-p {\n color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }\n.hi-v4-menu--vertical .hi-v4-menu-item__inner:not(.hi-v4-menu-item__inner--active):hover {\n background-color: var(--hi-v4-color-gray-100, #f2f4f7); }\n.hi-v4-menu--vertical .hi-v4-menu-item svg[class^=hi-v4-icon] {\n -ms-flex-negative: 0;\n flex-shrink: 0;\n margin-right: var(--hi-v4-spacing-4, 8px);\n margin-left: 1px; }\n.hi-v4-menu--vertical .hi-v4-menu-item__content {\n -webkit-box-flex: 1;\n -ms-flex: 1 1;\n flex: 1 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-indent: 0.5px; }\n";
15
+ var css_248z = ".hi-v4-menu-fat-menu {background-color: var(--hi-v4-color-static-white, #fff);margin: 0;font-size: var(--hi-v4-text-size-md, 0.875rem);padding: var(--hi-v4-spacing-4, 8px);display: -webkit-box;display: -ms-flexbox;display: flex;color: var(--hi-v4-color-gray-700, #1f2733);border-radius: var(--hi-v4-border-radius-md, 4px);-ms-flex-wrap: wrap;flex-wrap: wrap; }.hi-v4-menu-fat-menu__group:not(:last-of-type) {margin-right: var(--hi-v4-spacing-18, 36px); }.hi-v4-menu-fat-menu .hi-v4-menu-group-item {height: 40px;margin: 0;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;padding: 0 var(--hi-v4-spacing-6, 12px);color: var(--hi-v4-color-gray-500, #929aa6); }.hi-v4-menu-fat-menu .hi-v4-menu-item {height: 40px;margin: 0;border-radius: var(--hi-v4-border-radius-md, 4px);display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;padding: 0 var(--hi-v4-spacing-4, 8px) 0 var(--hi-v4-spacing-6, 12px); }.hi-v4-menu-fat-menu .hi-v4-menu-item--active {color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }.hi-v4-menu-fat-menu .hi-v4-menu-item:not(.hi-v4-menu-item--active):hover {background-color: var(--hi-v4-color-gray-100, #f2f4f7); }.hi-v4-menu-fat-menu ul {padding: 0;margin: 0; }.hi-v4-menu-fat-menu ul li {list-style-type: none; }.hi-v4-menu-popmenu {background-color: var(--hi-v4-color-static-white, #fff);border-radius: var(--hi-v4-border-radius-md, 4px);margin: 0;font-size: var(--hi-v4-text-size-md, 0.875rem);padding: var(--hi-v4-spacing-4, 8px);color: var(--hi-v4-color-gray-700, #1f2733);width: 216px;-webkit-box-sizing: border-box;box-sizing: border-box; }.hi-v4-menu-popmenu .hi-v4-menu-item {height: 40px;margin: 0; }.hi-v4-menu-popmenu .hi-v4-menu-item__inner {-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;margin-bottom: var(--hi-v4-spacing-4, 8px);padding: 0 var(--hi-v4-spacing-4, 8px) 0 var(--hi-v4-spacing-6, 12px);border-radius: var(--hi-v4-border-radius-md, 4px); }.hi-v4-menu-popmenu .hi-v4-menu-item__inner--active {color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }.hi-v4-menu-popmenu .hi-v4-menu-item__inner--active-p {color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }.hi-v4-menu-popmenu .hi-v4-menu-item__inner--expanded {background-color: var(--hi-v4-color-gray-100, #f2f4f7); }.hi-v4-menu-popmenu .hi-v4-menu-item__inner:not(.hi-v4-menu-item__inner--active):hover {background-color: var(--hi-v4-color-gray-100, #f2f4f7); }.hi-v4-menu-popmenu .hi-v4-menu-item__content {-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;max-width: 100%;padding-right: var(--hi-v4-spacing-4, 8px); }.hi-v4-menu {background-color: var(--hi-v4-color-static-white, #fff);color: var(--hi-v4-color-gray-700, #1f2733);font-size: var(--hi-v4-text-size-md, 0.875rem);line-height: var(--hi-v4-text-lineheight-md, 1.375rem);-webkit-box-sizing: border-box;box-sizing: border-box; }.hi-v4-menu ul {margin: 0;padding: 0; }.hi-v4-menu-item {list-style: none;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: pointer;-webkit-transition: all 0.3s;transition: all 0.3s; }.hi-v4-menu-item__icon {color: var(--hi-v4-color-gray-500, #929aa6);-webkit-margin-end: var(--hi-v4-spacing-4, 8px);margin-inline-end: var(--hi-v4-spacing-4, 8px); }.hi-v4-menu-item__icon svg[class^=hi-v4-icon] {font-size: var(--hi-v4-text-size-lg, 1rem); }.hi-v4-menu-item__arrow {color: var(--hi-v4-color-gray-500, #929aa6);font-size: var(--hi-v4-text-size-lg, 1rem); }.hi-v4-menu-item__indent {display: inline-block;width: 24px;height: 100%;-ms-flex-negative: 0;flex-shrink: 0; }.hi-v4-menu__wrapper {padding: 0;margin: 0; }.hi-v4-menu--horizontal {width: 100%;overflow: hidden; }.hi-v4-menu--horizontal .hi-v4-menu__wrapper {display: -webkit-box;display: -ms-flexbox;display: flex;overflow: visible;width: -webkit-max-content;width: -moz-max-content;width: max-content;-webkit-box-sizing: border-box;box-sizing: border-box; }.hi-v4-menu--horizontal .hi-v4-menu-item {padding: 0 var(--hi-v4-spacing-10, 20px);display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;-webkit-box-align: center;-ms-flex-align: center;align-items: center;height: 56px;border: none;font-size: var(--hi-v4-text-size-lg, 1rem); }.hi-v4-menu--horizontal .hi-v4-menu-item__arrow {-webkit-margin-start: var(--hi-v4-spacing-2, 4px);margin-inline-start: var(--hi-v4-spacing-2, 4px); }.hi-v4-menu--horizontal .hi-v4-menu-item:hover {color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }.hi-v4-menu--horizontal .hi-v4-menu-item:hover .hi-v4-menu-item__inner {border-bottom: 2px solid var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }.hi-v4-menu--horizontal .hi-v4-menu-item--active {color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }.hi-v4-menu--horizontal .hi-v4-menu-item--active .hi-v4-menu-item__inner {border-bottom: 2px solid var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }.hi-v4-menu--horizontal .hi-v4-menu-item--active .hi-v4-menu-item__icon {color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }.hi-v4-menu--horizontal .hi-v4-menu-item--active-p {color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }.hi-v4-menu--horizontal .hi-v4-menu-item--active-p .hi-v4-menu-item__icon {color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }.hi-v4-menu--horizontal .hi-v4-menu-item__inner {height: 100%;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-sizing: border-box;box-sizing: border-box;border-bottom: 2px solid transparent; }.hi-v4-menu--horizontal .hi-v4-menu-item__inner--expanded {border-bottom: 2px solid var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }.hi-v4-menu--horizontal .hi-v4-menu-item__content {-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;white-space: nowrap;max-width: none; }.hi-v4-menu--vertical {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;padding: var(--hi-v4-spacing-4, 8px);width: 216px;-webkit-box-sizing: border-box;box-sizing: border-box;height: 100%;-webkit-transition: width 0.3s;transition: width 0.3s; }.hi-v4-menu--vertical .hi-v4-menu__wrapper {-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;overflow: auto; }.hi-v4-menu--vertical.hi-v4-menu--mini {width: 56px;overflow-x: hidden; }.hi-v4-menu--vertical.hi-v4-menu--popup .hi-v4-menu-item__inner--expanded {background-color: var(--hi-v4-color-gray-100, #f2f4f7); }.hi-v4-menu--vertical .hi-v4-menu__toggle {width: 40px;cursor: pointer;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;border-radius: var(--hi-v4-border-radius-md, 4px);color: var(--hi-v4-color-gray-500, #929aa6);height: 40px;-ms-flex-negative: 0;flex-shrink: 0;-webkit-transition-duration: var(--hi-v4-motion-duration-normal, 200ms);transition-duration: var(--hi-v4-motion-duration-normal, 200ms);-webkit-transition-timing-function: var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1));transition-timing-function: var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1));-webkit-transition-property: background-color;transition-property: background-color; }.hi-v4-menu--vertical .hi-v4-menu__toggle:hover {background-color: var(--hi-v4-color-gray-100, #f2f4f7); }.hi-v4-menu--vertical .hi-v4-menu-item__inner {-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;margin-bottom: var(--hi-v4-spacing-4, 8px);padding: 0 var(--hi-v4-spacing-4, 8px) 0 var(--hi-v4-spacing-6, 12px);border-radius: var(--hi-v4-border-radius-md, 4px);-webkit-transition: all 0.3s;transition: all 0.3s; }.hi-v4-menu--vertical .hi-v4-menu-item__inner--active {color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe)); }.hi-v4-menu--vertical .hi-v4-menu-item__inner--active .hi-v4-menu-item__icon {color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }.hi-v4-menu--vertical .hi-v4-menu-item__inner--active-p {color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }.hi-v4-menu--vertical .hi-v4-menu-item__inner--active-p .hi-v4-menu-item__icon {color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }.hi-v4-menu--vertical .hi-v4-menu-item__inner:not(.hi-v4-menu-item__inner--active):hover {background-color: var(--hi-v4-color-gray-100, #f2f4f7); }.hi-v4-menu--vertical .hi-v4-menu-item__content {-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;text-indent: 0.5px; }";
16
16
 
17
- var __styleInject__ = require('style-inject/dist/style-inject.es.js')["default"];
17
+ var __styleInject__ = require('inject-head-style')["default"];
18
18
 
19
19
  __styleInject__(css_248z);
20
20
 
21
21
  exports["default"] = css_248z;
22
- //# sourceMappingURL=index.scss.js.map
package/lib/cjs/util.js CHANGED
@@ -45,4 +45,3 @@ var getAncestorIds = function getAncestorIds(id, data, arr) {
45
45
 
46
46
  exports.getAncestorIds = getAncestorIds;
47
47
  exports.getParentId = getParentId;
48
- //# sourceMappingURL=util.js.map
@@ -49,4 +49,3 @@ var Expander = function Expander(_ref) {
49
49
  };
50
50
 
51
51
  export { Expander };
52
- //# sourceMappingURL=Expander.js.map