@lobehub/ui 2.20.2 → 2.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/Avatar/Avatar.js
CHANGED
|
@@ -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 = ["bordered", "className", "avatar", "title", "animation", "borderedColor", "size", "shape", "background", "style", "unoptimized", "alt", "variant", "shadow", "loading", "sliceText", "ref"];
|
|
4
|
+
var _excluded = ["bordered", "className", "avatar", "title", "animation", "borderedColor", "size", "shape", "background", "style", "unoptimized", "alt", "variant", "shadow", "loading", "sliceText", "emojiScaleWithBackground", "ref"];
|
|
5
5
|
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; }
|
|
6
6
|
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; }
|
|
7
7
|
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; }
|
|
@@ -44,6 +44,7 @@ var Avatar = /*#__PURE__*/memo(function (_ref) {
|
|
|
44
44
|
loading = _ref.loading,
|
|
45
45
|
_ref$sliceText = _ref.sliceText,
|
|
46
46
|
sliceText = _ref$sliceText === void 0 ? true : _ref$sliceText,
|
|
47
|
+
emojiScaleWithBackground = _ref.emojiScaleWithBackground,
|
|
47
48
|
ref = _ref.ref,
|
|
48
49
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
49
50
|
var isStringAvatar = typeof avatar === 'string';
|
|
@@ -92,7 +93,7 @@ var Avatar = /*#__PURE__*/memo(function (_ref) {
|
|
|
92
93
|
}) : avatar;
|
|
93
94
|
var customAvatar = emoji ? /*#__PURE__*/_jsx(FluentEmoji, {
|
|
94
95
|
emoji: emoji,
|
|
95
|
-
size: size * 0.8,
|
|
96
|
+
size: emojiScaleWithBackground ? background ? size * 0.8 : size : size * 0.8,
|
|
96
97
|
type: animation ? 'anim' : '3d',
|
|
97
98
|
unoptimized: unoptimized
|
|
98
99
|
}) : sliceText ? text === null || text === void 0 ? void 0 : text.toUpperCase().slice(0, 2) : text === null || text === void 0 ? void 0 : text.toUpperCase();
|
|
@@ -108,7 +109,7 @@ var Avatar = /*#__PURE__*/memo(function (_ref) {
|
|
|
108
109
|
size: size,
|
|
109
110
|
src: isDefaultAntAvatar ? defualtAvatar : undefined,
|
|
110
111
|
style: _objectSpread({
|
|
111
|
-
background:
|
|
112
|
+
background: background,
|
|
112
113
|
boxShadow: bordered ? "".concat(theme.colorBgLayout, " 0 0 0 2px, ").concat(borderedColor || theme.colorTextTertiary, " 0 0 0 4px") : undefined,
|
|
113
114
|
color: readableColor(background || theme.colorBorder),
|
|
114
115
|
cursor: rest !== null && rest !== void 0 && rest.onClick ? 'pointer' : undefined,
|
package/es/Avatar/type.d.ts
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createLucideIcon } from 'lucide-react';
|
|
2
|
+
var CreateBotIcon = createLucideIcon('CreateBot', [['path', {
|
|
3
|
+
d: 'M12 8V4H8M20 10C20 8.895 19.105 8 18 8H6C4.895 8 4 8.895 4 10V18C4 19.105 4.895 20 6 20H10M2 14H4M15 13V15M9 13V15M21.378 16.626C21.776 16.228 22 15.687 22 15.124 22 14.561 21.776 14.02 21.378 13.622 20.98 13.224 20.439 13 19.876 13 19.313 13 18.772 13.224 18.374 13.622L14.364 17.634C14.126 17.872 13.952 18.165 13.858 18.488L13.021 21.358C12.996 21.444 12.994 21.535 13.017 21.622 13.039 21.709 13.084 21.788 13.148 21.852 13.211 21.915 13.29 21.96 13.377 21.982 13.464 22.005 13.555 22.003 13.641 21.978L16.511 21.141C16.834 21.047 17.127 20.873 17.365 20.635L21.378 16.626Z',
|
|
4
|
+
key: '1'
|
|
5
|
+
}]]);
|
|
6
|
+
CreateBotIcon.displayName = 'CreateBotIcon';
|
|
7
|
+
export default CreateBotIcon;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default as BotPromptIcon } from './BotPromptIcon';
|
|
2
|
+
export { default as CreateBotIcon } from './CreateBotIcon';
|
|
2
3
|
export { default as DiscordIcon } from './DiscordIcon';
|
|
3
4
|
export { default as GlobeOffIcon } from './GlobeOffIcon';
|
|
4
5
|
export { default as GroupBotIcon } from './GroupBotIcon';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default as BotPromptIcon } from "./BotPromptIcon";
|
|
2
|
+
export { default as CreateBotIcon } from "./CreateBotIcon";
|
|
2
3
|
export { default as DiscordIcon } from "./DiscordIcon";
|
|
3
4
|
export { default as GlobeOffIcon } from "./GlobeOffIcon";
|
|
4
5
|
export { default as GroupBotIcon } from "./GroupBotIcon";
|