@lobehub/ui 1.120.13 → 1.120.14

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/Image/index.js CHANGED
@@ -4,7 +4,7 @@ var _excluded = ["wrapperClassName", "style", "preview", "isLoading", "minSize",
4
4
  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; }
5
5
  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; }
6
6
  import { Image as AntImage, Skeleton } from 'antd';
7
- import { useResponsive } from 'antd-style';
7
+ import { useResponsive, useThemeMode } from 'antd-style';
8
8
  import { Eye } from 'lucide-react';
9
9
  import { memo } from 'react';
10
10
  import { Flexbox } from 'react-layout-kit';
@@ -30,6 +30,8 @@ var Image = /*#__PURE__*/memo(function (_ref) {
30
30
  rest = _objectWithoutProperties(_ref, _excluded);
31
31
  var _useResponsive = useResponsive(),
32
32
  mobile = _useResponsive.mobile;
33
+ var _useThemeMode = useThemeMode(),
34
+ isDarkMode = _useThemeMode.isDarkMode;
33
35
  var _useStyles = useStyles({
34
36
  alwaysShowActions: alwaysShowActions,
35
37
  minSize: minSize,
@@ -57,7 +59,7 @@ var Image = /*#__PURE__*/memo(function (_ref) {
57
59
  className: styles.actions,
58
60
  children: actions
59
61
  }), /*#__PURE__*/_jsx(AntImage, _objectSpread({
60
- fallback: styles.imageOff,
62
+ fallback: isDarkMode ? 'https://gw.alipayobjects.com/zos/kitchen/nhzBb%24r0Cm/image_off_dark.webp' : 'https://gw.alipayobjects.com/zos/kitchen/QAvkgt30Ys/image_off_light.webp',
61
63
  loading: 'lazy',
62
64
  preview: _objectSpread({
63
65
  mask: mobile ? false : actions ? /*#__PURE__*/_jsx("div", {}) : /*#__PURE__*/_jsx(Icon, {
@@ -6,7 +6,6 @@ export declare const useStyles: (props?: {
6
6
  } | undefined) => import("antd-style").ReturnStyles<{
7
7
  actions: string;
8
8
  image: import("antd-style").SerializedStyles;
9
- imageOff: string;
10
9
  imageWrapper: import("antd-style").SerializedStyles;
11
10
  toolbar: string;
12
11
  }>;
package/es/Image/style.js CHANGED
@@ -6,8 +6,7 @@ export var useStyles = createStyles(function (_ref) {
6
6
  var css = _ref.css,
7
7
  token = _ref.token,
8
8
  cx = _ref.cx,
9
- stylish = _ref.stylish,
10
- isDarkMode = _ref.isDarkMode;
9
+ stylish = _ref.stylish;
11
10
  var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
12
11
  minSize = _ref2.minSize,
13
12
  size = _ref2.size,
@@ -19,7 +18,6 @@ export var useStyles = createStyles(function (_ref) {
19
18
  return {
20
19
  actions: actions,
21
20
  image: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n width: 100%;\n height: 100%;\n\n img {\n width: ", " !important;\n min-width: ", " !important;\n height: ", " !important;\n min-height: ", " !important;\n\n object-fit: ", ";\n }\n "])), SIZE, MIN_SIZE, SIZE, MIN_SIZE, objectFit || 'cover'),
22
- imageOff: isDarkMode ? 'https://gw.alipayobjects.com/zos/kitchen/BpCkC%26aex5/image_off_dark.webp' : 'https://gw.alipayobjects.com/zos/kitchen/AYB4XBJBSA/image_off_light.webp',
23
21
  imageWrapper: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n\n overflow: hidden;\n\n width: ", ";\n min-width: ", ";\n height: ", ";\n min-height: ", ";\n margin-block: 0 1em;\n\n background: ", ";\n border-radius: ", "px;\n box-shadow: 0 0 0 1px ", ";\n\n &:hover {\n .", " {\n opacity: 1;\n }\n }\n "])), SIZE, MIN_SIZE, SIZE, MIN_SIZE, rgba(token.colorBgLayout, 0.25), token.borderRadius, token.colorFillTertiary, actions),
24
22
  toolbar: cx(stylish.blur, css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: 4px;\n background: ", ";\n border-radius: ", "px;\n "])), rgba(token.colorBgMask, 0.1), token.borderRadiusLG))
25
23
  };
@@ -51,6 +51,7 @@ var Markdown = /*#__PURE__*/memo(function (_ref) {
51
51
  };
52
52
  return /*#__PURE__*/_jsx(Typography, {
53
53
  className: className,
54
+ "data-code-type": "markdown",
54
55
  onDoubleClick: onDoubleClick,
55
56
  style: style,
56
57
  children: /*#__PURE__*/_jsx(ImageGallery, {
@@ -17,6 +17,7 @@ export interface TabsNavProps {
17
17
  * @description Callback function that is triggered when a tab is changed
18
18
  */
19
19
  onChange?: (activeKey: string) => void;
20
+ variant?: 'default' | 'compact';
20
21
  }
21
22
  declare const TabsNav: import("react").NamedExoticComponent<TabsNavProps>;
22
23
  export default TabsNav;
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- var _excluded = ["className"];
3
+ var _excluded = ["className", "variant"];
4
4
  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; }
5
5
  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; }
6
6
  import { Tabs } from 'antd';
@@ -9,12 +9,13 @@ import { useStyles } from "./style";
9
9
  import { jsx as _jsx } from "react/jsx-runtime";
10
10
  var TabsNav = /*#__PURE__*/memo(function (_ref) {
11
11
  var className = _ref.className,
12
+ variant = _ref.variant,
12
13
  rest = _objectWithoutProperties(_ref, _excluded);
13
14
  var _useStyles = useStyles(),
14
15
  styles = _useStyles.styles,
15
16
  cx = _useStyles.cx;
16
17
  return /*#__PURE__*/_jsx(Tabs, _objectSpread({
17
- className: cx(styles.tabs, className)
18
+ className: cx(styles.tabs, variant === 'compact' && styles.compact, className)
18
19
  }, rest));
19
20
  });
20
21
  export default TabsNav;
@@ -1,3 +1,4 @@
1
1
  export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
+ compact: import("antd-style").SerializedStyles;
2
3
  tabs: import("antd-style").SerializedStyles;
3
4
  }>;
@@ -1,5 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
- var _templateObject;
2
+ var _templateObject, _templateObject2;
3
3
  import { createStyles } from 'antd-style';
4
4
  export var useStyles = createStyles(function (_ref) {
5
5
  var css = _ref.css,
@@ -9,6 +9,7 @@ export var useStyles = createStyles(function (_ref) {
9
9
  var marginHoriz = 16;
10
10
  var paddingVertical = 6;
11
11
  return {
12
- tabs: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "-tab + ", "-tab {\n margin: ", "px 4px !important;\n padding: 0 12px !important;\n }\n\n ", "-tab {\n color: ", ";\n transition: background-color 100ms ease-out;\n\n &:first-child {\n margin: ", "px 4px ", "px 0;\n padding: ", "px 12px !important;\n }\n\n &:hover {\n color: ", " !important;\n background: ", ";\n border-radius: ", "px;\n }\n }\n\n ", "-nav {\n margin-bottom: 0;\n\n &::before {\n display: none;\n }\n }\n "])), prefix, prefix, marginHoriz, prefix, token.colorTextSecondary, marginHoriz, marginHoriz, paddingVertical, token.colorText, token.colorFillTertiary, token.borderRadius, prefix)
12
+ compact: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", "-tabs-tab {\n margin: 4px !important;\n\n + .", "-tabs-tab {\n margin: 4px !important;\n }\n }\n "])), prefixCls, prefixCls),
13
+ tabs: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "-tab + ", "-tab {\n margin: ", "px 4px !important;\n padding: 0 12px !important;\n }\n\n ", "-tab {\n color: ", ";\n transition: background-color 100ms ease-out;\n\n &:first-child {\n margin: ", "px 4px ", "px 0;\n padding: ", "px 12px !important;\n }\n\n &:hover {\n color: ", " !important;\n background: ", ";\n border-radius: ", "px;\n }\n }\n\n ", "-nav {\n margin-bottom: 0;\n\n &::before {\n display: none;\n }\n }\n "])), prefix, prefix, marginHoriz, prefix, token.colorTextSecondary, marginHoriz, marginHoriz, paddingVertical, token.colorText, token.colorFillTertiary, token.borderRadius, prefix)
13
14
  };
14
15
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.120.13",
3
+ "version": "1.120.14",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",