@lobehub/ui 1.25.2 → 1.25.3

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.
@@ -65,21 +65,17 @@ var Item = /*#__PURE__*/memo(function (_ref2) {
65
65
  }, props), {}, {
66
66
  children: /*#__PURE__*/_jsxs("div", {
67
67
  className: styles.cell,
68
- children: [image && /*#__PURE__*/_jsx(Center, {
68
+ children: [image || FeatureIcon && /*#__PURE__*/_jsxs(Center, {
69
69
  className: styles.imgContainer,
70
70
  style: imageStyle,
71
- children: /*#__PURE__*/_jsx(Image, {
71
+ children: [FeatureIcon && /*#__PURE__*/_jsx(Icon, {
72
+ className: styles.img,
73
+ icon: FeatureIcon
74
+ }), image && /*#__PURE__*/_jsx(Image, {
72
75
  className: styles.img,
73
76
  image: image,
74
77
  title: title
75
- })
76
- }), FeatureIcon && /*#__PURE__*/_jsx(Center, {
77
- className: styles.imgContainer,
78
- style: imageStyle,
79
- children: /*#__PURE__*/_jsx(Icon, {
80
- className: styles.img,
81
- icon: FeatureIcon
82
- })
78
+ })]
83
79
  }), title && /*#__PURE__*/_jsx(Flexbox, {
84
80
  align: 'center',
85
81
  as: 'h3',
@@ -13,11 +13,7 @@ export var useStyles = createStyles(function (_ref, _ref2) {
13
13
  var descCls = "".concat(prefix, "-description");
14
14
  var titleCls = "".concat(prefix, "-title");
15
15
  var imgCls = "".concat(prefix, "-img");
16
-
17
- // 通过简单估计,缩放值乘以 rowNum 就可以得到合适的尺寸
18
16
  var scaleUnit = 20;
19
-
20
- // 尺寸工具
21
17
  var genSize = function genSize(size) {
22
18
  return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: ", "px;\n height: ", "px;\n font-size: ", "px;\n "])), size, size, size * (22 / 24));
23
19
  };
@@ -28,7 +24,7 @@ export var useStyles = createStyles(function (_ref, _ref2) {
28
24
  title: cx(titleCls, withTransition, css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n pointer-events: none;\n\n margin: 16px 0;\n\n font-size: 20px;\n line-height: ", ";\n color: ", ";\n "])), token.lineHeightHeading3, token.colorText)),
29
25
  desc: cx(descCls, withTransition, css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n pointer-events: none;\n color: ", ";\n\n quotient {\n position: relative;\n\n display: block;\n\n margin: 12px 0;\n padding-left: 12px;\n\n color: ", ";\n }\n "])), token.colorTextSecondary, token.colorTextDescription)),
30
26
  imgContainer: cx(coverCls, withTransition, css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n ", ";\n padding: 4px;\n opacity: 0.8;\n border-radius: ", "px;\n "])), genSize(24), token.borderRadius)),
31
- img: cx(imgCls, withTransition, css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n ", ";\n color: ", ";\n "])), genSize(20), token.colorWhite)),
27
+ img: cx(imgCls, withTransition, css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n ", ";\n color: ", ";\n "])), genSize(20), token.colorText)),
32
28
  link: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n ", ";\n margin-top: 24px;\n "])), withTransition)
33
29
  };
34
30
  });
@@ -19,10 +19,7 @@ export var StroyBook = /*#__PURE__*/memo(function (_ref) {
19
19
  props = _objectWithoutProperties(_ref, _excluded);
20
20
  var _useResponsive = useResponsive(),
21
21
  mobile = _useResponsive.mobile;
22
- var _useStyles = useStyles({
23
- noPadding: Boolean(noPadding),
24
- mobile: Boolean(mobile)
25
- }),
22
+ var _useStyles = useStyles(Boolean(noPadding)),
26
23
  styles = _useStyles.styles,
27
24
  cx = _useStyles.cx;
28
25
  return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
@@ -1,7 +1,4 @@
1
- export declare const useStyles: (props?: {
2
- mobile: boolean;
3
- noPadding: boolean;
4
- } | undefined) => import("antd-style").ReturnStyles<{
1
+ export declare const useStyles: (props?: boolean | undefined) => import("antd-style").ReturnStyles<{
5
2
  editor: import("antd-style").SerializedStyles;
6
3
  left: import("antd-style").SerializedStyles;
7
4
  right: import("antd-style").SerializedStyles;
@@ -1,15 +1,14 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
2
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
3
3
  import { createStyles } from 'antd-style';
4
- export var useStyles = createStyles(function (_ref, _ref2) {
4
+ export var useStyles = createStyles(function (_ref, noPadding) {
5
5
  var css = _ref.css,
6
- token = _ref.token;
7
- var noPadding = _ref2.noPadding,
8
- mobile = _ref2.mobile;
6
+ token = _ref.token,
7
+ responsive = _ref.responsive;
9
8
  return {
10
- editor: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: stretch;\n justify-content: stretch;\n\n width: inherit;\n min-height: inherit;\n ", "\n "])), mobile && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex-direction: column;\n "])))),
11
- left: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n overflow: auto;\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n\n ", "\n "])), !noPadding && css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: 40px 24px;\n "])))),
12
- right: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background: ", ";\n\n .draggable-panel-fixed {\n width: 100% !important;\n }\n "])), token.colorBgLayout),
13
- leva: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n --leva-sizes-controlWidth: 66%;\n --leva-colors-elevation1: ", ";\n --leva-colors-elevation2: transparent;\n --leva-colors-elevation3: ", ";\n --leva-colors-accent1: ", ";\n --leva-colors-accent2: ", ";\n --leva-colors-accent3: ", ";\n --leva-colors-highlight1: ", ";\n --leva-colors-highlight2: ", ";\n --leva-colors-highlight3: ", ";\n --leva-colors-vivid1: ", ";\n --leva-shadows-level1: unset;\n --leva-shadows-level2: unset;\n --leva-fonts-mono: ", ";\n\n overflow: auto;\n width: 100%;\n height: 100%;\n padding: 6px 0;\n\n > div {\n background: transparent;\n\n > div {\n background: transparent;\n }\n }\n\n input:checked + label > svg {\n stroke: ", ";\n }\n\n button {\n --leva-colors-accent2: ", ";\n }\n "])), token.colorFillSecondary, token.colorFillSecondary, token.colorPrimary, token.colorPrimaryHover, token.colorPrimaryActive, token.colorTextTertiary, token.colorTextSecondary, token.colorText, token.colorWarning, token.fontFamilyCode, token.colorBgLayout, token.colorFillSecondary)
9
+ editor: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: stretch;\n justify-content: stretch;\n\n width: inherit;\n min-height: inherit;\n\n ", " {\n flex-direction: column;\n }\n "])), responsive.mobile),
10
+ left: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n overflow: auto;\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n\n ", "\n "])), !noPadding && css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 40px 24px;\n "])))),
11
+ right: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background: ", ";\n\n ", " {\n .draggable-panel-fixed {\n width: 100% !important;\n }\n }\n "])), token.colorBgLayout, responsive.mobile),
12
+ leva: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n --leva-sizes-controlWidth: 66%;\n --leva-colors-elevation1: ", ";\n --leva-colors-elevation2: transparent;\n --leva-colors-elevation3: ", ";\n --leva-colors-accent1: ", ";\n --leva-colors-accent2: ", ";\n --leva-colors-accent3: ", ";\n --leva-colors-highlight1: ", ";\n --leva-colors-highlight2: ", ";\n --leva-colors-highlight3: ", ";\n --leva-colors-vivid1: ", ";\n --leva-shadows-level1: unset;\n --leva-shadows-level2: unset;\n --leva-fonts-mono: ", ";\n\n overflow: auto;\n width: 100%;\n height: 100%;\n padding: 6px 0;\n\n > div {\n background: transparent;\n\n > div {\n background: transparent;\n }\n }\n\n input:checked + label > svg {\n stroke: ", ";\n }\n\n button {\n --leva-colors-accent2: ", ";\n }\n "])), token.colorFillSecondary, token.colorFillSecondary, token.colorPrimary, token.colorPrimaryHover, token.colorPrimaryActive, token.colorTextTertiary, token.colorTextSecondary, token.colorText, token.colorWarning, token.fontFamilyCode, token.colorBgLayout, token.colorFillSecondary)
14
13
  };
15
14
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.25.2",
3
+ "version": "1.25.3",
4
4
  "description": "Lobe UI is an open-source UI component library for building chatbot web apps",
5
5
  "keywords": [
6
6
  "lobehub",