@lobehub/ui 1.72.1 → 1.72.2

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.
@@ -62,5 +62,5 @@ export interface ListItemProps {
62
62
  */
63
63
  title: ReactNode;
64
64
  }
65
- declare const ListItem: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<ListItemProps & HTMLAttributes<any> & import("react").RefAttributes<HTMLDivElement>>>;
65
+ declare const ListItem: import("react").ForwardRefExoticComponent<ListItemProps & HTMLAttributes<any> & import("react").RefAttributes<HTMLDivElement>>;
66
66
  export default ListItem;
@@ -4,7 +4,7 @@ var _excluded = ["active", "avatar", "loading", "description", "date", "title",
4
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
6
  import { LoadingOutlined, MessageOutlined } from '@ant-design/icons';
7
- import { forwardRef, memo } from 'react';
7
+ import { forwardRef } from 'react';
8
8
  import { Flexbox } from 'react-layout-kit';
9
9
  import { useStyles } from "./style";
10
10
  import { getChatItemTime } from "./time";
@@ -15,7 +15,7 @@ import { getChatItemTime } from "./time";
15
15
  import { jsx as _jsx } from "react/jsx-runtime";
16
16
  import { jsxs as _jsxs } from "react/jsx-runtime";
17
17
  import { Fragment as _Fragment } from "react/jsx-runtime";
18
- var ListItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, ref) {
18
+ var ListItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
19
19
  var active = _ref.active,
20
20
  avatar = _ref.avatar,
21
21
  loading = _ref.loading,
@@ -28,16 +28,15 @@ var ListItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, ref) {
28
28
  style = _ref.style,
29
29
  showAction = _ref.showAction,
30
30
  children = _ref.children,
31
- _ref$classNames = _ref.classNames,
32
- classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
31
+ classNames = _ref.classNames,
33
32
  addon = _ref.addon,
34
33
  pin = _ref.pin,
35
34
  props = _objectWithoutProperties(_ref, _excluded);
36
- var _useStyles = useStyles(pin),
35
+ var _useStyles = useStyles(),
37
36
  styles = _useStyles.styles,
38
37
  cx = _useStyles.cx;
39
38
  return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
40
- className: cx(styles.container, active && styles.active, className),
39
+ className: cx(styles.container, active && styles.active, pin && styles.pin, className),
41
40
  onMouseEnter: function onMouseEnter() {
42
41
  onHoverChange === null || onHoverChange === void 0 ? void 0 : onHoverChange(true);
43
42
  },
@@ -88,7 +87,7 @@ var ListItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, ref) {
88
87
  },
89
88
  children: actions
90
89
  }), date && /*#__PURE__*/_jsx("div", {
91
- className: cx(styles.time, classNames.time),
90
+ className: cx(styles.time, classNames === null || classNames === void 0 ? void 0 : classNames.time),
92
91
  style: showAction ? {
93
92
  opacity: 0
94
93
  } : {},
@@ -97,5 +96,5 @@ var ListItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, ref) {
97
96
  }), children]
98
97
  })
99
98
  }));
100
- }));
99
+ });
101
100
  export default ListItem;
@@ -1,4 +1,4 @@
1
- export declare const useStyles: (props?: boolean | undefined) => import("antd-style").ReturnStyles<{
1
+ export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
2
  actions: import("antd-style").SerializedStyles;
3
3
  active: import("antd-style").SerializedStyles;
4
4
  container: import("antd-style").SerializedStyles;
@@ -1,16 +1,16 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
2
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
3
3
  import { createStyles } from 'antd-style';
4
- export var useStyles = createStyles(function (_ref, pin) {
4
+ export var useStyles = createStyles(function (_ref) {
5
5
  var css = _ref.css,
6
6
  token = _ref.token;
7
7
  return {
8
8
  actions: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n top: 50%;\n right: 16px;\n transform: translateY(-50%);\n "]))),
9
9
  active: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n background-color: ", ";\n\n &:hover {\n background-color: ", ";\n }\n "])), token.colorText, token.colorFillSecondary, token.colorFill),
10
- container: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n cursor: pointer;\n color: ", ";\n background: ", ";\n transition: background-color 200ms ", ";\n\n &:active {\n background-color: ", " !important;\n }\n\n &:hover {\n background-color: ", ";\n }\n "])), token.colorTextTertiary, pin ? token.colorFillTertiary : 'transparent', token.motionEaseOut, pin ? token.colorFill : token.colorFillSecondary, pin ? token.colorFill : token.colorFillTertiary),
10
+ container: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n cursor: pointer;\n color: ", ";\n background: transparent;\n transition: background-color 200ms ", ";\n\n &:active {\n background-color: ", ";\n }\n\n &:hover {\n background-color: ", ";\n }\n "])), token.colorTextTertiary, token.motionEaseOut, token.colorFillSecondary, token.colorFillTertiary),
11
11
  content: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n flex: 1;\n padding-top: 6px;\n "]))),
12
12
  desc: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n overflow: hidden;\n\n width: 100%;\n\n font-size: 12px;\n line-height: 1;\n color: ", ";\n text-overflow: ellipsis;\n white-space: nowrap;\n "])), token.colorTextDescription),
13
- pin: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), token.colorFillTertiary),
13
+ pin: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n background-color: ", ";\n\n &:active {\n background-color: ", " !important;\n }\n\n &:hover {\n background-color: ", ";\n }\n "])), token.colorFillTertiary, token.colorFill, token.colorFill),
14
14
  time: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n font-size: 12px;\n color: ", ";\n "])), token.colorTextPlaceholder),
15
15
  title: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n overflow: hidden;\n\n width: 100%;\n\n font-size: 16px;\n line-height: 1;\n color: ", ";\n text-overflow: ellipsis;\n white-space: nowrap;\n "])), token.colorText)
16
16
  };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  declare const List: {
3
- Item: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./ListItem").ListItemProps & import("react").HTMLAttributes<any> & import("react").RefAttributes<HTMLDivElement>>>;
3
+ Item: import("react").ForwardRefExoticComponent<import("./ListItem").ListItemProps & import("react").HTMLAttributes<any> & import("react").RefAttributes<HTMLDivElement>>;
4
4
  };
5
5
  export default List;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.72.1",
3
+ "version": "1.72.2",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",