@lobehub/ui 1.26.3 → 1.27.0
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/README.md +4 -1
- package/es/Conversation/ChatList/MessageItem/index.js +1 -1
- package/es/Header/index.d.ts +7 -1
- package/es/Header/index.js +45 -12
- package/es/Highlighter/SyntaxHighlighter/style.js +2 -2
- package/es/Layout/index.d.ts +21 -0
- package/es/Layout/index.js +113 -35
- package/es/Layout/style.js +1 -1
- package/es/MessageModal/style.js +1 -1
- package/es/ThemeProvider/GlobalStyle.js +14 -2
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -106,7 +106,7 @@ $ pnpm start
|
|
|
106
106
|
|
|
107
107
|
<!-- CONTRIBUTION GROUP -->
|
|
108
108
|
|
|
109
|
-
> 📊 Total: <kbd>**
|
|
109
|
+
> 📊 Total: <kbd>**5**</kbd>
|
|
110
110
|
|
|
111
111
|
<a href="https://github.com/canisminor1990" title="canisminor1990">
|
|
112
112
|
<img src="https://avatars.githubusercontent.com/u/17870709?v=4" width="50" />
|
|
@@ -120,6 +120,9 @@ $ pnpm start
|
|
|
120
120
|
<a href="https://github.com/actions-user" title="actions-user">
|
|
121
121
|
<img src="https://avatars.githubusercontent.com/u/65916846?v=4" width="50" />
|
|
122
122
|
</a>
|
|
123
|
+
<a href="https://github.com/meganjohnson96" title="meganjohnson96">
|
|
124
|
+
<img src="https://avatars.githubusercontent.com/u/136729222?v=4" width="50" />
|
|
125
|
+
</a>
|
|
123
126
|
|
|
124
127
|
<!-- CONTRIBUTION END -->
|
|
125
128
|
|
|
@@ -27,7 +27,7 @@ var useStyles = createStyles(function (_ref) {
|
|
|
27
27
|
choiceActive: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n background: ", ";\n "])), token.colorTextLightSolid, token.colorPrimary),
|
|
28
28
|
container: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: relative;\n padding: 12px;\n border-radius: 4px;\n\n ", " {\n padding-inline: 0;\n }\n\n &:hover {\n background: ", ";\n\n .", " {\n opacity: 1;\n }\n }\n "])), responsive.mobile, token.colorFillQuaternary, toolbarClassName),
|
|
29
29
|
floatAction: cx(toolbarClassName, css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: ", ";\n top: 4px;\n right: 4px;\n\n opacity: 0;\n "])), token.zIndexPopupBase - 100)),
|
|
30
|
-
md: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n overflow:
|
|
30
|
+
md: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n overflow-x: hidden;\n overflow-y: auto;\n max-width: 100%;\n .", " {\n max-width: 100%;\n }\n "])), responsive.mobile),
|
|
31
31
|
system: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n filter: invert(1);\n "]))),
|
|
32
32
|
user: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n background: linear-gradient(to right, ", ", ", ");\n "])), token.green3, token.gold3)
|
|
33
33
|
};
|
package/es/Header/index.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { DivProps } from "../types";
|
|
3
3
|
export interface HeaderProps extends DivProps {
|
|
4
4
|
actions?: ReactNode;
|
|
5
|
+
actionsClassName?: string;
|
|
6
|
+
actionsStyle?: CSSProperties;
|
|
5
7
|
logo?: ReactNode;
|
|
8
|
+
logoClassName?: string;
|
|
9
|
+
logoStyle?: CSSProperties;
|
|
6
10
|
nav?: ReactNode;
|
|
11
|
+
navClassName?: string;
|
|
12
|
+
navStyle?: CSSProperties;
|
|
7
13
|
}
|
|
8
14
|
declare const Header: import("react").NamedExoticComponent<HeaderProps>;
|
|
9
15
|
export default Header;
|
package/es/Header/index.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["actionsClassName", "navClassName", "logoClassName", "nav", "logo", "actions", "actionsStyle", "logoStyle", "navStyle", "className"];
|
|
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
|
+
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; }
|
|
1
6
|
import { useResponsive } from 'antd-style';
|
|
2
7
|
import { memo } from 'react';
|
|
3
8
|
import { Flexbox } from 'react-layout-kit';
|
|
@@ -6,15 +11,25 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
6
11
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
7
12
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
13
|
var Header = /*#__PURE__*/memo(function (_ref) {
|
|
9
|
-
var
|
|
14
|
+
var actionsClassName = _ref.actionsClassName,
|
|
15
|
+
navClassName = _ref.navClassName,
|
|
16
|
+
logoClassName = _ref.logoClassName,
|
|
17
|
+
nav = _ref.nav,
|
|
10
18
|
logo = _ref.logo,
|
|
11
|
-
actions = _ref.actions
|
|
19
|
+
actions = _ref.actions,
|
|
20
|
+
actionsStyle = _ref.actionsStyle,
|
|
21
|
+
logoStyle = _ref.logoStyle,
|
|
22
|
+
navStyle = _ref.navStyle,
|
|
23
|
+
className = _ref.className,
|
|
24
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
12
25
|
var _useResponsive = useResponsive(),
|
|
13
26
|
mobile = _useResponsive.mobile;
|
|
14
27
|
var _useStyles = useStyles(),
|
|
28
|
+
cx = _useStyles.cx,
|
|
15
29
|
styles = _useStyles.styles;
|
|
16
|
-
return /*#__PURE__*/_jsx("section", {
|
|
17
|
-
className: styles.header,
|
|
30
|
+
return /*#__PURE__*/_jsx("section", _objectSpread(_objectSpread({
|
|
31
|
+
className: cx(styles.header, className)
|
|
32
|
+
}, props), {}, {
|
|
18
33
|
children: /*#__PURE__*/_jsx(Flexbox, {
|
|
19
34
|
align: 'center',
|
|
20
35
|
className: styles.content,
|
|
@@ -23,27 +38,45 @@ var Header = /*#__PURE__*/memo(function (_ref) {
|
|
|
23
38
|
width: 'auto',
|
|
24
39
|
children: mobile ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
25
40
|
children: [/*#__PURE__*/_jsx(Flexbox, {
|
|
41
|
+
className: actionsClassName,
|
|
42
|
+
style: _objectSpread({
|
|
43
|
+
flex: 0
|
|
44
|
+
}, navStyle),
|
|
26
45
|
children: nav
|
|
27
46
|
}), /*#__PURE__*/_jsx(Flexbox, {
|
|
28
|
-
className: styles.left,
|
|
47
|
+
className: cx(styles.left, logoClassName),
|
|
29
48
|
horizontal: true,
|
|
49
|
+
style: _objectSpread({
|
|
50
|
+
flex: 1,
|
|
51
|
+
overflow: 'hidden'
|
|
52
|
+
}, logoStyle),
|
|
30
53
|
children: logo
|
|
31
54
|
}), /*#__PURE__*/_jsx(Flexbox, {
|
|
55
|
+
className: actionsClassName,
|
|
56
|
+
style: _objectSpread({
|
|
57
|
+
flex: 0
|
|
58
|
+
}, actionsStyle),
|
|
32
59
|
children: actions
|
|
33
60
|
})]
|
|
34
61
|
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
35
62
|
children: [/*#__PURE__*/_jsx(Flexbox, {
|
|
36
|
-
className: styles.left,
|
|
63
|
+
className: cx(styles.left, logoClassName),
|
|
37
64
|
horizontal: true,
|
|
65
|
+
style: _objectSpread({
|
|
66
|
+
flex: 0
|
|
67
|
+
}, logoStyle),
|
|
38
68
|
children: logo
|
|
39
69
|
}), /*#__PURE__*/_jsx(Flexbox, {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
70
|
+
className: navClassName,
|
|
71
|
+
style: _objectSpread({
|
|
72
|
+
flex: 1,
|
|
73
|
+
marginLeft: 48,
|
|
74
|
+
overflow: 'hidden'
|
|
75
|
+
}, navStyle),
|
|
44
76
|
children: nav
|
|
45
77
|
}), /*#__PURE__*/_jsxs("section", {
|
|
46
|
-
className: styles.right,
|
|
78
|
+
className: cx(styles.right, actionsClassName),
|
|
79
|
+
style: actionsStyle,
|
|
47
80
|
children: [/*#__PURE__*/_jsx("div", {}), /*#__PURE__*/_jsx(Flexbox, {
|
|
48
81
|
align: 'center',
|
|
49
82
|
gap: 8,
|
|
@@ -53,6 +86,6 @@ var Header = /*#__PURE__*/memo(function (_ref) {
|
|
|
53
86
|
})]
|
|
54
87
|
})
|
|
55
88
|
})
|
|
56
|
-
});
|
|
89
|
+
}));
|
|
57
90
|
});
|
|
58
91
|
export default Header;
|
|
@@ -10,7 +10,7 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
10
10
|
var prefix = "".concat(prefixCls, "-highlighter");
|
|
11
11
|
return {
|
|
12
12
|
loading: cx(stylish.blur, css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 10;\n top: 0;\n right: 0;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n height: 34px;\n padding: 0 8px;\n\n font-family: ", ";\n color: ", ";\n\n border-radius: ", ";\n "])), token.fontFamilyCode, token.colorTextTertiary, token.borderRadius)),
|
|
13
|
-
prism: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n pre {\n overflow
|
|
14
|
-
shiki: cx("".concat(prefix, "-shiki"), css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .shiki {\n overflow-x:
|
|
13
|
+
prism: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n pre {\n overflow: auto;\n font-family: ", " !important;\n }\n "])), token.fontFamilyCode),
|
|
14
|
+
shiki: cx("".concat(prefix, "-shiki"), css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .shiki {\n overflow-x: auto;\n background: none !important;\n }\n "]))))
|
|
15
15
|
};
|
|
16
16
|
});
|
package/es/Layout/index.d.ts
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { DivProps } from "../types";
|
|
3
|
+
export interface LayoutHeaderProps extends DivProps {
|
|
4
|
+
headerHeight?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare const LayoutHeader: import("react").NamedExoticComponent<LayoutHeaderProps>;
|
|
7
|
+
export declare type LayoutMainProps = DivProps;
|
|
8
|
+
export declare const LayoutMain: import("react").NamedExoticComponent<DivProps>;
|
|
9
|
+
export interface LayoutSidebarProps extends DivProps {
|
|
10
|
+
headerHeight?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const LayoutSidebar: import("react").NamedExoticComponent<LayoutSidebarProps>;
|
|
13
|
+
export interface LayoutSidebarInnerProps extends DivProps {
|
|
14
|
+
headerHeight?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare const LayoutSidebarInner: import("react").NamedExoticComponent<LayoutSidebarInnerProps>;
|
|
17
|
+
export interface LayoutTocProps extends DivProps {
|
|
18
|
+
tocWidth?: number;
|
|
19
|
+
}
|
|
20
|
+
export declare const LayoutToc: import("react").NamedExoticComponent<LayoutTocProps>;
|
|
21
|
+
export declare type LayoutFooterProps = DivProps;
|
|
22
|
+
export declare const LayoutFooter: import("react").NamedExoticComponent<DivProps>;
|
|
2
23
|
export interface LayoutProps {
|
|
3
24
|
asideWidth?: number;
|
|
4
25
|
children?: ReactNode;
|
package/es/Layout/index.js
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["headerHeight", "children"],
|
|
5
|
+
_excluded2 = ["children"],
|
|
6
|
+
_excluded3 = ["headerHeight", "children"],
|
|
7
|
+
_excluded4 = ["headerHeight", "children"],
|
|
8
|
+
_excluded5 = ["tocWidth", "children"],
|
|
9
|
+
_excluded6 = ["children"];
|
|
10
|
+
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; }
|
|
11
|
+
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; }
|
|
2
12
|
import { useResponsive } from 'antd-style';
|
|
3
13
|
import { memo, useEffect, useState } from 'react';
|
|
4
14
|
import DraggablePanel from "../DraggablePanel";
|
|
@@ -6,19 +16,100 @@ import { useStyles } from "./style";
|
|
|
6
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
18
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
_ref$headerHeight = _ref.headerHeight,
|
|
12
|
-
headerHeight = _ref$headerHeight === void 0 ? 64 : _ref$headerHeight,
|
|
13
|
-
header = _ref.header,
|
|
14
|
-
footer = _ref.footer,
|
|
15
|
-
sidebar = _ref.sidebar,
|
|
16
|
-
asideWidth = _ref.asideWidth,
|
|
17
|
-
toc = _ref.toc,
|
|
19
|
+
export var LayoutHeader = /*#__PURE__*/memo(function (_ref) {
|
|
20
|
+
var headerHeight = _ref.headerHeight,
|
|
18
21
|
children = _ref.children,
|
|
19
|
-
|
|
22
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
23
|
var _useStyles = useStyles(headerHeight),
|
|
21
24
|
styles = _useStyles.styles;
|
|
25
|
+
return /*#__PURE__*/_jsxs("header", _objectSpread(_objectSpread({
|
|
26
|
+
className: styles.header,
|
|
27
|
+
style: {
|
|
28
|
+
height: headerHeight
|
|
29
|
+
}
|
|
30
|
+
}, props), {}, {
|
|
31
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
32
|
+
className: styles.glass
|
|
33
|
+
}), children]
|
|
34
|
+
}));
|
|
35
|
+
});
|
|
36
|
+
export var LayoutMain = /*#__PURE__*/memo(function (_ref2) {
|
|
37
|
+
var children = _ref2.children,
|
|
38
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
39
|
+
var _useStyles2 = useStyles(),
|
|
40
|
+
styles = _useStyles2.styles;
|
|
41
|
+
return /*#__PURE__*/_jsx("main", _objectSpread(_objectSpread({
|
|
42
|
+
className: styles.main
|
|
43
|
+
}, props), {}, {
|
|
44
|
+
children: children
|
|
45
|
+
}));
|
|
46
|
+
});
|
|
47
|
+
export var LayoutSidebar = /*#__PURE__*/memo(function (_ref3) {
|
|
48
|
+
var headerHeight = _ref3.headerHeight,
|
|
49
|
+
children = _ref3.children,
|
|
50
|
+
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
51
|
+
var _useStyles3 = useStyles(headerHeight),
|
|
52
|
+
styles = _useStyles3.styles;
|
|
53
|
+
return /*#__PURE__*/_jsx("aside", _objectSpread(_objectSpread({
|
|
54
|
+
className: styles.aside,
|
|
55
|
+
style: {
|
|
56
|
+
top: headerHeight
|
|
57
|
+
}
|
|
58
|
+
}, props), {}, {
|
|
59
|
+
children: children
|
|
60
|
+
}));
|
|
61
|
+
});
|
|
62
|
+
export var LayoutSidebarInner = /*#__PURE__*/memo(function (_ref4) {
|
|
63
|
+
var headerHeight = _ref4.headerHeight,
|
|
64
|
+
children = _ref4.children,
|
|
65
|
+
props = _objectWithoutProperties(_ref4, _excluded4);
|
|
66
|
+
var _useStyles4 = useStyles(headerHeight),
|
|
67
|
+
styles = _useStyles4.styles;
|
|
68
|
+
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
|
|
69
|
+
className: styles.asideInner
|
|
70
|
+
}, props), {}, {
|
|
71
|
+
children: children
|
|
72
|
+
}));
|
|
73
|
+
});
|
|
74
|
+
export var LayoutToc = /*#__PURE__*/memo(function (_ref5) {
|
|
75
|
+
var tocWidth = _ref5.tocWidth,
|
|
76
|
+
children = _ref5.children,
|
|
77
|
+
props = _objectWithoutProperties(_ref5, _excluded5);
|
|
78
|
+
var _useStyles5 = useStyles(),
|
|
79
|
+
styles = _useStyles5.styles;
|
|
80
|
+
return /*#__PURE__*/_jsx("nav", _objectSpread(_objectSpread({
|
|
81
|
+
className: styles.toc,
|
|
82
|
+
style: {
|
|
83
|
+
width: tocWidth
|
|
84
|
+
}
|
|
85
|
+
}, props), {}, {
|
|
86
|
+
children: children
|
|
87
|
+
}));
|
|
88
|
+
});
|
|
89
|
+
export var LayoutFooter = /*#__PURE__*/memo(function (_ref6) {
|
|
90
|
+
var children = _ref6.children,
|
|
91
|
+
props = _objectWithoutProperties(_ref6, _excluded6);
|
|
92
|
+
var _useStyles6 = useStyles(),
|
|
93
|
+
styles = _useStyles6.styles;
|
|
94
|
+
return /*#__PURE__*/_jsx("footer", _objectSpread(_objectSpread({
|
|
95
|
+
className: styles.footer
|
|
96
|
+
}, props), {}, {
|
|
97
|
+
children: children
|
|
98
|
+
}));
|
|
99
|
+
});
|
|
100
|
+
var Layout = /*#__PURE__*/memo(function (_ref7) {
|
|
101
|
+
var helmet = _ref7.helmet,
|
|
102
|
+
_ref7$headerHeight = _ref7.headerHeight,
|
|
103
|
+
headerHeight = _ref7$headerHeight === void 0 ? 64 : _ref7$headerHeight,
|
|
104
|
+
header = _ref7.header,
|
|
105
|
+
footer = _ref7.footer,
|
|
106
|
+
sidebar = _ref7.sidebar,
|
|
107
|
+
asideWidth = _ref7.asideWidth,
|
|
108
|
+
toc = _ref7.toc,
|
|
109
|
+
children = _ref7.children,
|
|
110
|
+
tocWidth = _ref7.tocWidth;
|
|
111
|
+
var _useStyles7 = useStyles(headerHeight),
|
|
112
|
+
styles = _useStyles7.styles;
|
|
22
113
|
var _useResponsive = useResponsive(),
|
|
23
114
|
mobile = _useResponsive.mobile,
|
|
24
115
|
laptop = _useResponsive.laptop;
|
|
@@ -30,50 +121,37 @@ var Layout = /*#__PURE__*/memo(function (_ref) {
|
|
|
30
121
|
setExpand(Boolean(laptop));
|
|
31
122
|
}, [laptop]);
|
|
32
123
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
33
|
-
children: [helmet, header && /*#__PURE__*/_jsxs(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
children: [/*#__PURE__*/_jsx("div", {
|
|
39
|
-
className: styles.glass
|
|
40
|
-
}), header, mobile && toc && /*#__PURE__*/_jsx("nav", {
|
|
41
|
-
className: styles.toc,
|
|
124
|
+
children: [helmet, header && /*#__PURE__*/_jsxs(LayoutHeader, {
|
|
125
|
+
headerHeight: headerHeight,
|
|
126
|
+
children: [header, mobile && toc && /*#__PURE__*/_jsx(LayoutToc, {
|
|
127
|
+
tocWidth: tocWidth,
|
|
42
128
|
children: toc
|
|
43
129
|
})]
|
|
44
|
-
}), /*#__PURE__*/_jsxs(
|
|
45
|
-
className: styles.main,
|
|
130
|
+
}), /*#__PURE__*/_jsxs(LayoutMain, {
|
|
46
131
|
children: [!mobile && !sidebar && /*#__PURE__*/_jsx("nav", {
|
|
47
132
|
style: {
|
|
48
133
|
width: tocWidth
|
|
49
134
|
}
|
|
50
|
-
}), !mobile && sidebar && /*#__PURE__*/_jsx(
|
|
51
|
-
|
|
52
|
-
style: {
|
|
53
|
-
top: headerHeight
|
|
54
|
-
},
|
|
135
|
+
}), !mobile && sidebar && /*#__PURE__*/_jsx(LayoutSidebar, {
|
|
136
|
+
headerHeight: headerHeight,
|
|
55
137
|
children: /*#__PURE__*/_jsx(DraggablePanel, {
|
|
56
138
|
expand: expand,
|
|
57
139
|
maxWidth: asideWidth,
|
|
58
140
|
onExpandChange: setExpand,
|
|
59
141
|
placement: "left",
|
|
60
|
-
children: /*#__PURE__*/_jsx(
|
|
61
|
-
|
|
142
|
+
children: /*#__PURE__*/_jsx(LayoutSidebarInner, {
|
|
143
|
+
headerHeight: headerHeight,
|
|
62
144
|
children: sidebar
|
|
63
145
|
})
|
|
64
146
|
})
|
|
65
147
|
}), /*#__PURE__*/_jsx("section", {
|
|
66
148
|
className: styles.content,
|
|
67
149
|
children: children
|
|
68
|
-
}), !mobile && toc && /*#__PURE__*/_jsx(
|
|
69
|
-
|
|
70
|
-
style: {
|
|
71
|
-
width: tocWidth
|
|
72
|
-
},
|
|
150
|
+
}), !mobile && toc && /*#__PURE__*/_jsx(LayoutToc, {
|
|
151
|
+
tocWidth: tocWidth,
|
|
73
152
|
children: toc
|
|
74
153
|
})]
|
|
75
|
-
}), footer && /*#__PURE__*/_jsx(
|
|
76
|
-
className: styles.footer,
|
|
154
|
+
}), footer && /*#__PURE__*/_jsx(LayoutFooter, {
|
|
77
155
|
children: footer
|
|
78
156
|
})]
|
|
79
157
|
});
|
package/es/Layout/style.js
CHANGED
|
@@ -9,7 +9,7 @@ export var useStyles = createStyles(function (_ref, headerHeight) {
|
|
|
9
9
|
return {
|
|
10
10
|
app: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n overflow-x: hidden;\n overflow-y: auto;\n height: 100vh;\n "]))),
|
|
11
11
|
aside: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: sticky;\n z-index: 2;\n height: 100%;\n "]))),
|
|
12
|
-
asideInner: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n overflow-x: hidden;\n overflow-y: auto;\n width: 100%;\n height: calc(100vh -
|
|
12
|
+
asideInner: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n overflow-x: hidden;\n overflow-y: auto;\n width: 100%;\n height: calc(100vh - ", "px);\n "])), headerHeight),
|
|
13
13
|
content: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: relative;\n flex: 1;\n max-width: 100%;\n "]))),
|
|
14
14
|
footer: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n position: relative;\n max-width: 100%;\n "]))),
|
|
15
15
|
glass: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n z-index: 0;\n\n &::before {\n ", ";\n ", ";\n mask-image: linear-gradient(to bottom, black ", "px, transparent);\n }\n\n &::after {\n ", ";\n }\n "])), stylish.blur, baseGlass, headerHeight, baseGlass),
|
package/es/MessageModal/style.js
CHANGED
|
@@ -5,7 +5,7 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
5
5
|
var css = _ref.css,
|
|
6
6
|
prefixCls = _ref.prefixCls;
|
|
7
7
|
return {
|
|
8
|
-
body: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow-y:
|
|
8
|
+
body: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow-x: hidden;\n overflow-y: auto;\n max-height: 70vh;\n "]))),
|
|
9
9
|
modal: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: 70%;\n .", "-modal-header {\n margin-bottom: 24px;\n }\n "])), prefixCls)
|
|
10
10
|
};
|
|
11
11
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
3
|
import { createGlobalStyle } from 'antd-style';
|
|
4
|
-
var GlobalStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\n html,body {\n --font-settings: \"cv01\", \"tnum\", \"kern\";\n --font-variations: \"opsz\" auto, tabular-nums;\n\n overflow-x: hidden;\n\n margin: 0;\n padding: 0;\n\n font-family: ", ";\n font-size: ", "px;\n font-feature-settings: var(--font-settings);\n font-variation-settings: var(--font-variations);\n line-height: 1;\n color: ", ";\n text-size-adjust: none;\n text-rendering: optimizelegibility;\n vertical-align: baseline;\n\n color-scheme: dark;\n background-color: ", ";\n\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-tap-highlight-color: transparent;\n }\n\n body {\n overflow-x: hidden;\n
|
|
4
|
+
var GlobalStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\n html,body {\n --font-settings: \"cv01\", \"tnum\", \"kern\";\n --font-variations: \"opsz\" auto, tabular-nums;\n\n overflow-x: hidden;\n overflow-y: auto;\n\n margin: 0;\n padding: 0;\n\n font-family: ", ";\n font-size: ", "px;\n font-feature-settings: var(--font-settings);\n font-variation-settings: var(--font-variations);\n line-height: 1;\n color: ", ";\n text-size-adjust: none;\n text-rendering: optimizelegibility;\n vertical-align: baseline;\n\n color-scheme: dark;\n background-color: ", ";\n\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-overflow-scrolling:touch;\n -webkit-tap-highlight-color: transparent;\n }\n\n body {\n overflow-x: hidden;\n height: 100vh;\n }\n\n #root {\n min-height: 100vh;\n }\n\n code {\n font-family: ", " !important;\n\n span {\n font-family: ", " !important;\n }\n }\n\n p {\n text-align: justify;\n word-wrap: break-word;\n }\n\n ::selection {\n color: #000;\n background: ", ";\n }\n\n @media only screen and (min-width: 574px) {\n * {\n box-sizing: border-box;\n vertical-align: baseline;\n\n ::-webkit-scrollbar {\n cursor: pointer;\n width: 4px;\n height: 4px;\n background-color: transparent;\n }\n\n ::-webkit-scrollbar-thumb {\n cursor: pointer;\n background-color: transparent;\n border-radius: 2px;\n transition: background-color 500ms ", ";\n\n &:hover {\n background-color: ", ";\n }\n }\n\n ::-webkit-scrollbar-corner {\n display: none;\n width: 0;\n height: 0;\n }\n\n &:hover {\n ::-webkit-scrollbar-thumb {\n background-color: ", ";\n }\n }\n }\n }\n"])), function (_ref) {
|
|
5
5
|
var theme = _ref.theme;
|
|
6
6
|
return theme.fontFamily;
|
|
7
7
|
}, function (_ref2) {
|
|
@@ -15,9 +15,21 @@ var GlobalStyle = createGlobalStyle(_templateObject || (_templateObject = _tagge
|
|
|
15
15
|
return theme.colorBgLayout;
|
|
16
16
|
}, function (_ref5) {
|
|
17
17
|
var theme = _ref5.theme;
|
|
18
|
-
return theme.
|
|
18
|
+
return theme.fontFamilyCode;
|
|
19
19
|
}, function (_ref6) {
|
|
20
20
|
var theme = _ref6.theme;
|
|
21
21
|
return theme.fontFamilyCode;
|
|
22
|
+
}, function (_ref7) {
|
|
23
|
+
var theme = _ref7.theme;
|
|
24
|
+
return theme.yellow9;
|
|
25
|
+
}, function (_ref8) {
|
|
26
|
+
var theme = _ref8.theme;
|
|
27
|
+
return theme.motionEaseOut;
|
|
28
|
+
}, function (_ref9) {
|
|
29
|
+
var theme = _ref9.theme;
|
|
30
|
+
return theme.colorText;
|
|
31
|
+
}, function (_ref10) {
|
|
32
|
+
var theme = _ref10.theme;
|
|
33
|
+
return theme.colorFill;
|
|
22
34
|
});
|
|
23
35
|
export default GlobalStyle;
|
package/es/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export { default as Hero, type HeroAction, type HeroProps } from './Hero';
|
|
|
22
22
|
export { default as Highlighter, type HighlighterProps, SyntaxHighlighter, type SyntaxHighlighterProps, } from './Highlighter';
|
|
23
23
|
export { default as Icon, type IconProps, type IconSize } from './Icon';
|
|
24
24
|
export { Input, type InputProps, TextArea, type TextAreaProps } from './Input';
|
|
25
|
-
export { default as Layout, type LayoutProps } from './Layout';
|
|
25
|
+
export { default as Layout, LayoutFooter, type LayoutFooterProps, LayoutHeader, type LayoutHeaderProps, LayoutMain, type LayoutMainProps, type LayoutProps, LayoutSidebar, LayoutSidebarInner, type LayoutSidebarInnerProps, type LayoutSidebarProps, LayoutToc, type LayoutTocProps, } from './Layout';
|
|
26
26
|
export { default as List } from './List';
|
|
27
27
|
export { default as Logo, type LogoProps } from './Logo';
|
|
28
28
|
export { default as Markdown, type MarkdownProps } from './Markdown';
|
package/es/index.js
CHANGED
|
@@ -21,7 +21,7 @@ export { default as Hero } from "./Hero";
|
|
|
21
21
|
export { default as Highlighter, SyntaxHighlighter } from "./Highlighter";
|
|
22
22
|
export { default as Icon } from "./Icon";
|
|
23
23
|
export { Input, TextArea } from "./Input";
|
|
24
|
-
export { default as Layout } from "./Layout";
|
|
24
|
+
export { default as Layout, LayoutFooter, LayoutHeader, LayoutMain, LayoutSidebar, LayoutSidebarInner, LayoutToc } from "./Layout";
|
|
25
25
|
export { default as List } from "./List";
|
|
26
26
|
export { default as Logo } from "./Logo";
|
|
27
27
|
export { default as Markdown } from "./Markdown";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.27.0",
|
|
4
4
|
"description": "Lobe UI is an open-source UI component library for building chatbot web apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lobehub",
|
|
@@ -91,7 +91,6 @@
|
|
|
91
91
|
"prism-react-renderer": "^2",
|
|
92
92
|
"rc-footer": "^0",
|
|
93
93
|
"re-resizable": "^6",
|
|
94
|
-
"react-font-loader": "^2",
|
|
95
94
|
"react-layout-kit": "^1",
|
|
96
95
|
"react-markdown": "^8",
|
|
97
96
|
"react-rnd": "^10",
|