@lobehub/ui 2.5.6 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
 
3
3
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
4
  var _excluded = ["variant", "disabled", "shadow", "glass", "actionIconProps", "items", "horizontal", "menu", "onActionClick", "className", "size", "ref"],
5
- _excluded2 = ["icon", "key", "label", "onClick", "danger"];
5
+ _excluded2 = ["icon", "key", "label", "onClick", "danger", "loading"];
6
6
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
7
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
8
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -92,10 +92,12 @@ var ActionIconGroup = /*#__PURE__*/memo(function (_ref) {
92
92
  label = item.label,
93
93
  _onClick = item.onClick,
94
94
  danger = item.danger,
95
+ loading = item.loading,
95
96
  itemRest = _objectWithoutProperties(item, _excluded2);
96
97
  return /*#__PURE__*/_jsx(ActionIcon, _objectSpread(_objectSpread({
97
98
  danger: danger,
98
99
  icon: icon,
100
+ loading: loading,
99
101
  onClick: function onClick(e) {
100
102
  onActionClick === null || onActionClick === void 0 || onActionClick({
101
103
  domEvent: e,
@@ -110,7 +112,7 @@ var ActionIconGroup = /*#__PURE__*/memo(function (_ref) {
110
112
  placement: tooltipPlacement
111
113
  }
112
114
  }, actionIconProps), {}, {
113
- disabled: disabled || (itemRest === null || itemRest === void 0 ? void 0 : itemRest.disabled)
115
+ disabled: disabled || loading || (itemRest === null || itemRest === void 0 ? void 0 : itemRest.disabled)
114
116
  }), key);
115
117
  }), menu && /*#__PURE__*/_jsx(Dropdown, {
116
118
  menu: _objectSpread(_objectSpread({}, menu), {}, {
package/es/Menu/type.d.ts CHANGED
@@ -5,6 +5,7 @@ import type { IconContentConfig, IconProps } from "../Icon";
5
5
  export interface MenuItemType extends RcMenuItemType {
6
6
  danger?: boolean;
7
7
  icon?: IconProps['icon'];
8
+ loading?: boolean;
8
9
  title?: string;
9
10
  }
10
11
  export interface SubMenuType<T extends MenuItemType = MenuItemType> extends Omit<RcSubMenuType, 'children'> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "2.5.6",
3
+ "version": "2.6.0",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",