@lobehub/ui 2.12.4 → 2.12.6

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.
@@ -1,7 +1,7 @@
1
1
  'use client';
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
- var _excluded = ["items", "max", "gap", "variant", "bordered", "shadow", "size", "background", "animation", "draggable", "classNames", "shape", "styles", "onClick", "ref"],
4
+ var _excluded = ["items", "max", "gap", "variant", "bordered", "shadow", "size", "background", "animation", "draggable", "classNames", "shape", "styles", "onClick", "ref", "zIndexReverse"],
5
5
  _excluded2 = ["key", "style", "className"];
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; }
@@ -34,6 +34,7 @@ var AvatarGroup = /*#__PURE__*/memo(function (_ref) {
34
34
  customStyles = _ref.styles,
35
35
  _onClick = _ref.onClick,
36
36
  ref = _ref.ref,
37
+ zIndexReverse = _ref.zIndexReverse,
37
38
  rest = _objectWithoutProperties(_ref, _excluded);
38
39
  var _useStyles = useStyles(),
39
40
  cx = _useStyles.cx,
@@ -74,7 +75,8 @@ var AvatarGroup = /*#__PURE__*/memo(function (_ref) {
74
75
  });
75
76
  },
76
77
  style: _objectSpread(_objectSpread({
77
- marginLeft: index === 0 ? 0 : gapValue
78
+ marginLeft: index === 0 ? 0 : gapValue,
79
+ zIndex: zIndexReverse ? items.length - index : index
78
80
  }, customStyles === null || customStyles === void 0 ? void 0 : customStyles.avatar), avatarStyle)
79
81
  }, avatarProps), restAvatarProps), key);
80
82
  }), max && restAvatars.length > 0 && /*#__PURE__*/_jsx(Avatar, _objectSpread(_objectSpread({}, avatarProps), {}, {
@@ -83,7 +85,8 @@ var AvatarGroup = /*#__PURE__*/memo(function (_ref) {
83
85
  className: cx(styles.avatar, styles.count, classNames === null || classNames === void 0 ? void 0 : classNames.count),
84
86
  sliceText: false,
85
87
  style: _objectSpread({
86
- marginLeft: gapValue
88
+ marginLeft: gapValue,
89
+ zIndex: zIndexReverse ? 0 : avatars.length
87
90
  }, customStyles === null || customStyles === void 0 ? void 0 : customStyles.count)
88
91
  }))]
89
92
  }));
@@ -38,4 +38,5 @@ export interface AvatarGroupProps extends Pick<AvatarProps, 'variant' | 'bordere
38
38
  avatar?: CSSProperties;
39
39
  count?: CSSProperties;
40
40
  };
41
+ zIndexReverse?: boolean;
41
42
  }
@@ -1,7 +1,7 @@
1
1
  'use client';
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
- var _excluded = ["node"],
4
+ var _excluded = ["node", "href"],
5
5
  _excluded2 = ["children"];
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; }
@@ -54,8 +54,12 @@ var DefaultFootnotes = /*#__PURE__*/memo(function (_ref) {
54
54
  props = _ref2.props;
55
55
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
56
56
  var node = props.node,
57
+ href = props.href,
57
58
  rest = _objectWithoutProperties(props, _excluded);
58
- return /*#__PURE__*/_createElement(A, _objectSpread(_objectSpread({}, rest), {}, {
59
+ var Container = href ? A : 'div';
60
+ return /*#__PURE__*/_createElement(Container, _objectSpread(_objectSpread({}, href ? _objectSpread({
61
+ href: href
62
+ }, rest) : rest), {}, {
59
63
  key: index
60
64
  }), /*#__PURE__*/_jsxs(Block, {
61
65
  align: 'stretch',
@@ -94,9 +98,9 @@ var Footnotes = /*#__PURE__*/memo(function (_ref3) {
94
98
  rest = _objectWithoutProperties(_ref3, _excluded2);
95
99
  var links = useMemo(function () {
96
100
  try {
97
- return JSON.parse(rest['data-footnote-links'] || '');
101
+ return JSON.parse(rest['data-footnote-links'] || '[]');
98
102
  } catch (error) {
99
- console.error(error);
103
+ console.error('Failed to parse footnote links:', error);
100
104
  return [];
101
105
  }
102
106
  }, [rest['data-footnote-links']]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "2.12.4",
3
+ "version": "2.12.6",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",