dumi-theme-lobehub 1.8.5 → 1.8.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,26 +1,20 @@
1
- import { Alert } from 'antd';
2
- import { useStyles } from "./style";
1
+ import { Alert, Typography } from '@lobehub/ui';
3
2
  import { jsx as _jsx } from "react/jsx-runtime";
4
3
  var Container = function Container(_ref) {
5
4
  var type = _ref.type,
6
5
  title = _ref.title,
7
6
  children = _ref.children;
8
- var _useStyles = useStyles(),
9
- styles = _useStyles.styles,
10
- cx = _useStyles.cx;
11
- return /*#__PURE__*/_jsx("div", {
12
- className: styles.container,
13
- "data-type": type,
7
+ return /*#__PURE__*/_jsx(Typography, {
8
+ fontSize: 14,
9
+ headerMultiple: 0.25,
10
+ marginMultiple: 0,
14
11
  children: /*#__PURE__*/_jsx(Alert, {
15
- className: styles.alert,
16
- description: /*#__PURE__*/_jsx("div", {
17
- className: cx(styles.desc,
18
- // 为了让 markdown 的样式生效,需要在这里添加一个额外的 class
19
- 'markdown'),
20
- children: children
21
- }),
12
+ description: children,
22
13
  message: title || type.toUpperCase(),
23
14
  showIcon: true,
15
+ style: {
16
+ marginBlock: '1em'
17
+ },
24
18
  type: type
25
19
  })
26
20
  });
@@ -7,6 +7,6 @@ export var useStyles = createStyles(function (_ref, isPure) {
7
7
  responsive = _ref.responsive,
8
8
  css = _ref.css;
9
9
  return {
10
- content: cx(!isPure && css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 24px 48px;\n background-color: ", ";\n border-radius: 10px;\n\n ", " {\n padding: 8px 16px;\n border-radius: 0;\n }\n "])), token.colorBgContainer, responsive.mobile), css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex: 1;\n box-sizing: border-box;\n width: 100%;\n min-height: 400px;\n\n &:has([data-page-tabs='true']) {\n padding-top: 8px;\n }\n "]))))
10
+ content: cx(!isPure && css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 24px 48px;\n background-color: ", ";\n border-radius: 10px;\n\n ", " {\n padding: 8px 16px;\n border-radius: 0;\n }\n "])), token.colorBgContainer, responsive.mobile), css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex: 1;\n box-sizing: border-box;\n width: 100%;\n min-height: 400px;\n\n &:has([data-page-tabs='true']) {\n padding-top: 8px;\n }\n\n .dumi-default-table-content {\n overflow: visible !important;\n font-size: 14px;\n }\n\n .dumi-default-badge {\n &:not([type]) {\n color: ", ";\n background: ", ";\n border: 1px solid ", ";\n }\n\n &[type='warning'] {\n color: ", ";\n background: ", ";\n border: 1px solid ", ";\n }\n\n &[type='error'] {\n color: ", ";\n background: ", ";\n border: 1px solid ", ";\n }\n\n &[type='success'] {\n color: ", ";\n background: ", ";\n border: 1px solid ", ";\n }\n }\n "])), token.colorInfoText, token.colorInfoBg, token.colorInfoBorder, token.colorWarningText, token.colorWarningBg, token.colorWarningBorder, token.colorErrorText, token.colorErrorBg, token.colorErrorBorder, token.colorSuccessText, token.colorSuccessBg, token.colorSuccessBorder))
11
11
  };
12
12
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dumi-theme-lobehub",
3
- "version": "1.8.5",
3
+ "version": "1.8.6",
4
4
  "description": "dumi-theme-lobehub is a documentation site theme package designed for dumi2. It provides a more beautiful and user-friendly development and reading experience based on @lobehub/ui",
5
5
  "keywords": [
6
6
  "lobehub",
@@ -1,5 +0,0 @@
1
- export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
- alert: import("antd-style").SerializedStyles;
3
- container: import("antd-style").SerializedStyles;
4
- desc: import("antd-style").SerializedStyles;
5
- }>;
@@ -1,27 +0,0 @@
1
- var _templateObject, _templateObject2, _templateObject3, _templateObject4;
2
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
- import { createStyles } from 'antd-style';
4
- var toCamelCase = function toCamelCase(string_) {
5
- return string_.replace(/( |^)[a-z]/g, function (L) {
6
- return L.toUpperCase();
7
- });
8
- };
9
- export var useStyles = createStyles(function (_ref) {
10
- var token = _ref.token,
11
- prefixCls = _ref.prefixCls,
12
- css = _ref.css;
13
- // 把首字母大写
14
-
15
- var overwriteAlert = function overwriteAlert(type) {
16
- var tokens = {
17
- background: token["color".concat(toCamelCase(type), "Bg")],
18
- text: token["color".concat(toCamelCase(type), "Text")]
19
- };
20
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", "-alert-", " {\n background: ", ";\n\n .", "-alert-message {\n font-weight: bold;\n color: ", ";\n }\n\n .", "-alert-description {\n .markdown {\n color: ", ";\n }\n }\n }\n "])), prefixCls, type, tokens.background, prefixCls, tokens.text, prefixCls, tokens.text);
21
- };
22
- return {
23
- alert: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border: none;\n\n .", "-alert-message {\n font-weight: bold;\n }\n "])), prefixCls),
24
- container: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin: 8px 0;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n "])), overwriteAlert('info'), overwriteAlert('warning'), overwriteAlert('success'), overwriteAlert('error')),
25
- desc: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n p {\n margin: 0;\n }\n "])))
26
- };
27
- });