@lobehub/ui 1.170.6 → 1.170.8
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/Drawer/index.js +3 -3
- package/es/Highlighter/style.js +1 -1
- package/es/Markdown/markdown.style.js +1 -3
- package/es/Mermaid/style.js +1 -1
- package/es/Modal/index.js +56 -45
- package/es/Modal/style.js +1 -1
- package/es/Snippet/style.js +1 -1
- package/es/chat/ChatItem/style.js +2 -3
- package/es/color/colors/gray.js +1 -1
- package/es/mdx/mdxComponents/Pre.js +1 -1
- package/es/styles/theme/customToken.js +6 -2
- package/es/types/customToken.d.ts +1 -0
- package/package.json +1 -1
package/es/Drawer/index.js
CHANGED
|
@@ -102,7 +102,7 @@ var Drawer = /*#__PURE__*/memo(function (_ref) {
|
|
|
102
102
|
padding: '0 4px'
|
|
103
103
|
}, styles === null || styles === void 0 ? void 0 : styles.body),
|
|
104
104
|
content: _objectSpread({
|
|
105
|
-
background: sidebar ? "linear-gradient(to right, ".concat(theme.
|
|
105
|
+
background: sidebar ? "linear-gradient(to right, ".concat(theme.colorBgLayout, " 49.9%, ").concat(theme.colorBgContainer, " 50%)") : theme.colorBgContainer
|
|
106
106
|
}, styles === null || styles === void 0 ? void 0 : styles.content),
|
|
107
107
|
header: _objectSpread({
|
|
108
108
|
background: 'transparent',
|
|
@@ -146,7 +146,7 @@ var Drawer = /*#__PURE__*/memo(function (_ref) {
|
|
|
146
146
|
paddingBlock: 12,
|
|
147
147
|
paddingInline: 16,
|
|
148
148
|
style: _objectSpread({
|
|
149
|
-
background: theme.
|
|
149
|
+
background: theme.colorBgLayout,
|
|
150
150
|
borderRight: "1px solid ".concat(theme.colorBorderSecondary),
|
|
151
151
|
height: '100%',
|
|
152
152
|
overflowX: 'hidden',
|
|
@@ -160,7 +160,7 @@ var Drawer = /*#__PURE__*/memo(function (_ref) {
|
|
|
160
160
|
paddingBlock: 12,
|
|
161
161
|
paddingInline: 16,
|
|
162
162
|
style: _objectSpread({
|
|
163
|
-
background: theme.
|
|
163
|
+
background: theme.colorBgContainer,
|
|
164
164
|
height: '100%',
|
|
165
165
|
overflowX: 'hidden',
|
|
166
166
|
overflowY: 'auto'
|
package/es/Highlighter/style.js
CHANGED
|
@@ -10,7 +10,7 @@ export var useStyles = createStyles(function (_ref, type) {
|
|
|
10
10
|
var prefix = "".concat(prefixCls, "-highlighter");
|
|
11
11
|
var buttonHoverCls = "".concat(prefix, "-hover-btn");
|
|
12
12
|
var langHoverCls = "".concat(prefix, "-hover-lang");
|
|
13
|
-
var typeStylish = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border: 1px solid ", ";\n
|
|
13
|
+
var typeStylish = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border: 1px solid ", ";\n "])), type === 'block' ? token.colorFillQuaternary : 'transparent', type === 'block' ? 'transparent' : token.colorBorderSecondary);
|
|
14
14
|
return {
|
|
15
15
|
button: cx(buttonHoverCls, css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 2;\n inset-block-start: ", ";\n inset-inline-end: ", ";\n\n opacity: 0;\n "])), type === 'pure' ? 0 : '8px', type === 'pure' ? 0 : '8px')),
|
|
16
16
|
container: cx(prefix, type !== 'pure' && typeStylish, css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n border-radius: ", "px;\n transition: background-color 100ms ", ";\n\n &:hover {\n .", " {\n opacity: 1;\n }\n\n .", " {\n opacity: 1;\n }\n }\n\n .prism-code {\n background: none !important;\n }\n\n pre {\n overflow: auto hidden;\n\n margin: 0 !important;\n padding: ", " !important;\n\n white-space: break-spaces;\n\n background: none !important;\n }\n\n code {\n background: transparent !important;\n }\n "])), token.borderRadius, token.motionEaseOut, buttonHoverCls, langHoverCls, type === 'pure' ? 0 : "16px")),
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
3
|
import { createStyles } from 'antd-style';
|
|
4
|
-
import { rgba } from 'polished';
|
|
5
4
|
var IGNORE_CLASSNAME = '.ignore-markdown-style';
|
|
6
5
|
export var useStyles = createStyles(function (_ref, _ref2) {
|
|
7
6
|
var cx = _ref.cx,
|
|
8
7
|
token = _ref.token,
|
|
9
|
-
isDarkMode = _ref.isDarkMode,
|
|
10
8
|
css = _ref.css;
|
|
11
9
|
var _ref2$fontSize = _ref2.fontSize,
|
|
12
10
|
fontSize = _ref2$fontSize === void 0 ? 16 : _ref2$fontSize,
|
|
@@ -16,7 +14,7 @@ export var useStyles = createStyles(function (_ref, _ref2) {
|
|
|
16
14
|
marginMultiple = _ref2$marginMultiple === void 0 ? 1.5 : _ref2$marginMultiple,
|
|
17
15
|
_ref2$lineHeight = _ref2.lineHeight,
|
|
18
16
|
lineHeight = _ref2$lineHeight === void 0 ? 1.8 : _ref2$lineHeight;
|
|
19
|
-
var __root = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n --lobe-markdown-font-size: ", "px;\n --lobe-markdown-header-multiple: ", ";\n --lobe-markdown-margin-multiple: ", ";\n --lobe-markdown-line-height: ", ";\n --lobe-markdown-border-radius: ", ";\n --lobe-markdown-border-color: ", ";\n\n position: relative;\n\n width: 100%;\n max-width: 100%;\n padding-inline: 1px;\n\n font-size: var(--lobe-markdown-font-size);\n line-height: var(--lobe-markdown-line-height);\n word-break: break-word;\n\n ", " {\n font-size: 14px;\n line-height: 1.5;\n }\n "])), fontSize, headerMultiple, marginMultiple, lineHeight, token.borderRadiusLG,
|
|
17
|
+
var __root = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n --lobe-markdown-font-size: ", "px;\n --lobe-markdown-header-multiple: ", ";\n --lobe-markdown-margin-multiple: ", ";\n --lobe-markdown-line-height: ", ";\n --lobe-markdown-border-radius: ", ";\n --lobe-markdown-border-color: ", ";\n\n position: relative;\n\n width: 100%;\n max-width: 100%;\n padding-inline: 1px;\n\n font-size: var(--lobe-markdown-font-size);\n line-height: var(--lobe-markdown-line-height);\n word-break: break-word;\n\n ", " {\n font-size: 14px;\n line-height: 1.5;\n }\n "])), fontSize, headerMultiple, marginMultiple, lineHeight, token.borderRadiusLG, token.colorFillQuaternary, IGNORE_CLASSNAME);
|
|
20
18
|
var a = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n a:not(", " a) {\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n }\n "])), IGNORE_CLASSNAME, token.colorInfoText, token.colorInfoHover);
|
|
21
19
|
var blockquote = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n blockquote:not(", " blockquote) {\n margin-block: calc(var(--lobe-markdown-margin-multiple) * 1em);\n margin-inline: 0;\n padding-block: 0;\n padding-inline: 1em;\n\n color: ", ";\n\n border-inline-start: solid 4px ", ";\n }\n "])), IGNORE_CLASSNAME, token.colorTextSecondary, token.colorBorder);
|
|
22
20
|
var code = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n code:not(", " code) {\n &:not(:has(span)) {\n display: inline;\n\n margin-inline: 0.25em;\n padding-block: 0.2em;\n padding-inline: 0.4em;\n\n font-family: ", ";\n font-size: 0.875em;\n line-height: 1;\n word-break: break-word;\n white-space: break-spaces;\n\n background: ", ";\n border: 1px solid var(--lobe-markdown-border-color);\n border-radius: 0.25em;\n }\n }\n "])), IGNORE_CLASSNAME, token.fontFamilyCode, token.colorFillSecondary);
|
package/es/Mermaid/style.js
CHANGED
|
@@ -10,7 +10,7 @@ export var useStyles = createStyles(function (_ref, type) {
|
|
|
10
10
|
var prefix = "".concat(prefixCls, "-highlighter");
|
|
11
11
|
var buttonHoverCls = "".concat(prefix, "-hover-btn");
|
|
12
12
|
var langHoverCls = "".concat(prefix, "-hover-lang");
|
|
13
|
-
var typeStylish = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border: 1px solid ", ";\n
|
|
13
|
+
var typeStylish = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border: 1px solid ", ";\n "])), type === 'block' ? token.colorFillQuaternary : 'transparent', type === 'block' ? 'transparent' : token.colorBorderSecondary);
|
|
14
14
|
return {
|
|
15
15
|
button: cx(buttonHoverCls, css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 2;\n inset-block-start: ", ";\n inset-inline-end: ", ";\n\n opacity: 0;\n "])), type === 'pure' ? 0 : '8px', type === 'pure' ? 0 : '8px')),
|
|
16
16
|
container: cx(prefix, type !== 'pure' && typeStylish, css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n border-radius: ", "px;\n transition: background-color 100ms ", ";\n\n &:hover {\n .", " {\n opacity: 1;\n }\n\n .", " {\n opacity: 1;\n }\n }\n\n .prism-code {\n background: none !important;\n }\n\n pre {\n overflow: auto hidden;\n\n margin: 0 !important;\n padding: ", " !important;\n\n white-space: break-spaces;\n\n background: none !important;\n }\n\n code {\n background: transparent !important;\n }\n\n svg {\n height: fit-content;\n line-height: 1.2;\n }\n "])), token.borderRadius, token.motionEaseOut, buttonHoverCls, langHoverCls, type === 'pure' ? 0 : "16px")),
|
package/es/Modal/index.js
CHANGED
|
@@ -20,7 +20,6 @@ import { Modal as AntModal, Button, ConfigProvider, Drawer } from 'antd';
|
|
|
20
20
|
import { useResponsive } from 'antd-style';
|
|
21
21
|
import { isNumber } from 'lodash-es';
|
|
22
22
|
import { Maximize2, Minimize2, X } from 'lucide-react';
|
|
23
|
-
import { lighten } from 'polished';
|
|
24
23
|
import { memo, useState } from 'react';
|
|
25
24
|
import ActionIcon from "../ActionIcon";
|
|
26
25
|
import Icon from "../Icon";
|
|
@@ -71,57 +70,69 @@ var Modal = /*#__PURE__*/memo(function (_ref) {
|
|
|
71
70
|
var body = stylesProps.body,
|
|
72
71
|
restStyles = _objectWithoutProperties(stylesProps, _excluded2);
|
|
73
72
|
var hideFooter = footer === false || footer === null;
|
|
74
|
-
if (enableResponsive && mobile) return /*#__PURE__*/_jsx(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}),
|
|
79
|
-
destroyOnClose: destroyOnClose,
|
|
80
|
-
extra: allowFullscreen && /*#__PURE__*/_jsx(ActionIcon, {
|
|
81
|
-
icon: fullscreen ? Minimize2 : Maximize2,
|
|
82
|
-
onClick: function onClick() {
|
|
83
|
-
return setFullscreen(!fullscreen);
|
|
73
|
+
if (enableResponsive && mobile) return /*#__PURE__*/_jsx(ConfigProvider, {
|
|
74
|
+
theme: {
|
|
75
|
+
token: {
|
|
76
|
+
colorBgElevated: theme.colorBgContainer
|
|
84
77
|
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
children:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
78
|
+
},
|
|
79
|
+
children: /*#__PURE__*/_jsx(Drawer, _objectSpread(_objectSpread({
|
|
80
|
+
className: cx(styles.drawerContent, className),
|
|
81
|
+
closeIcon: /*#__PURE__*/_jsx(ActionIcon, {
|
|
82
|
+
icon: X
|
|
83
|
+
}),
|
|
84
|
+
destroyOnClose: destroyOnClose,
|
|
85
|
+
extra: allowFullscreen && /*#__PURE__*/_jsx(ActionIcon, {
|
|
86
|
+
icon: fullscreen ? Minimize2 : Maximize2,
|
|
87
|
+
onClick: function onClick() {
|
|
88
|
+
return setFullscreen(!fullscreen);
|
|
89
|
+
}
|
|
90
|
+
}),
|
|
91
|
+
footer: hideFooter ? null : footer || /*#__PURE__*/_jsxs(_Fragment, {
|
|
92
|
+
children: [/*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
|
|
93
|
+
color: 'default',
|
|
94
|
+
onClick: onCancel,
|
|
95
|
+
variant: 'filled'
|
|
96
|
+
}, cancelButtonProps), {}, {
|
|
97
|
+
children: cancelText || 'Cancel'
|
|
98
|
+
})), /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
|
|
99
|
+
loading: confirmLoading,
|
|
100
|
+
onClick: onOk,
|
|
101
|
+
type: "primary"
|
|
102
|
+
}, okButtonProps), {}, {
|
|
103
|
+
style: _objectSpread({
|
|
104
|
+
marginInlineStart: 8
|
|
105
|
+
}, okButtonProps === null || okButtonProps === void 0 ? void 0 : okButtonProps.style),
|
|
106
|
+
children: okText || 'OK'
|
|
107
|
+
}))]
|
|
108
|
+
}),
|
|
109
|
+
height: fullscreen ? 'calc(100% - env(safe-area-inset-top))' : maxHeight || '75vh',
|
|
110
|
+
maskClassName: cx(styles.wrap, wrapClassName),
|
|
111
|
+
onClose: onCancel,
|
|
112
|
+
open: open,
|
|
113
|
+
placement: 'bottom',
|
|
114
|
+
styles: _objectSpread({
|
|
115
|
+
body: _objectSpread({
|
|
116
|
+
paddingBlock: "16px ".concat(footer ? 0 : '16px'),
|
|
117
|
+
paddingInline: (_paddings$desktop = paddings === null || paddings === void 0 ? void 0 : paddings.desktop) !== null && _paddings$desktop !== void 0 ? _paddings$desktop : 16
|
|
118
|
+
}, body)
|
|
119
|
+
}, restStyles),
|
|
120
|
+
title: title
|
|
121
|
+
}, rest), {}, {
|
|
122
|
+
children: children
|
|
123
|
+
}))
|
|
124
|
+
});
|
|
117
125
|
return /*#__PURE__*/_jsx(ConfigProvider, {
|
|
118
126
|
theme: {
|
|
119
127
|
token: {
|
|
120
|
-
colorBgElevated:
|
|
128
|
+
colorBgElevated: theme.colorBgContainer
|
|
121
129
|
}
|
|
122
130
|
},
|
|
123
131
|
children: /*#__PURE__*/_jsx(AntModal, _objectSpread(_objectSpread({
|
|
124
|
-
cancelButtonProps:
|
|
132
|
+
cancelButtonProps: _objectSpread({
|
|
133
|
+
color: 'default',
|
|
134
|
+
variant: 'filled'
|
|
135
|
+
}, cancelButtonProps),
|
|
125
136
|
cancelText: cancelText,
|
|
126
137
|
className: cx(styles.content, className),
|
|
127
138
|
closable: true,
|
package/es/Modal/style.js
CHANGED
|
@@ -11,7 +11,7 @@ export var useStyles = createStyles(function (_ref, _ref2) {
|
|
|
11
11
|
var maxHeight = _ref2.maxHeight;
|
|
12
12
|
return {
|
|
13
13
|
content: cx(maxHeight && css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", "-modal-body {\n overflow: auto;\n max-height: ", ";\n }\n "])), prefixCls, maxHeight), css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", "-modal-footer {\n margin: 0;\n padding: 16px;\n }\n .", "-modal-header {\n display: flex;\n gap: 4px;\n align-items: center;\n justify-content: center;\n\n height: 56px;\n margin-block-end: 0;\n padding: 16px;\n }\n .", "-modal-content {\n overflow: hidden;\n padding: 0;\n border: 1px solid ", ";\n border-radius: ", "px;\n }\n "])), prefixCls, prefixCls, prefixCls, token.colorSplit, token.borderRadiusLG)),
|
|
14
|
-
drawerContent: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n
|
|
14
|
+
drawerContent: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .", "-drawer-close {\n padding: 0;\n }\n\n .", "-drawer-header {\n flex: none;\n height: ", "px !important;\n padding-block: 0;\n padding-inline: 16px;\n }\n\n .", "-drawer-footer {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n\n padding: 16px;\n\n border: none;\n }\n "])), prefixCls, prefixCls, HEADER_HEIGHT, prefixCls),
|
|
15
15
|
wrap: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n overflow: hidden auto;\n "])))
|
|
16
16
|
};
|
|
17
17
|
});
|
package/es/Snippet/style.js
CHANGED
|
@@ -6,7 +6,7 @@ export var useStyles = createStyles(function (_ref, type) {
|
|
|
6
6
|
cx = _ref.cx,
|
|
7
7
|
token = _ref.token,
|
|
8
8
|
prefixCls = _ref.prefixCls;
|
|
9
|
-
var typeStylish = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border: 1px solid ", ";\n "])), type === 'block' ? token.
|
|
9
|
+
var typeStylish = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border: 1px solid ", ";\n "])), type === 'block' ? token.colorFillQuaternary : 'transparent', type === 'block' ? 'transparent' : token.colorBorder);
|
|
10
10
|
return {
|
|
11
11
|
container: cx(typeStylish, css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n\n overflow: hidden;\n\n max-width: 100%;\n height: 38px;\n padding-block: 0;\n padding-inline: 12px 8px;\n\n border-radius: ", "px;\n\n transition: background-color 100ms ", ";\n\n &:hover {\n background-color: ", ";\n }\n\n .", "-highlighter-shiki {\n position: relative;\n overflow: hidden;\n flex: 1;\n }\n\n .prism-code {\n background: none !important;\n }\n\n pre {\n overflow: auto hidden !important;\n display: flex;\n align-items: center;\n\n width: 100%;\n height: 36px !important;\n margin: 0 !important;\n\n line-height: 1;\n text-wrap: nowrap !important;\n\n background: none !important;\n }\n\n code[class*='language-'] {\n background: none !important;\n }\n "])), token.borderRadius, token.motionEaseOut, token.colorFillTertiary, prefixCls))
|
|
12
12
|
};
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
3
|
import { createStyles } from 'antd-style';
|
|
4
|
+
import { rgba } from 'polished';
|
|
4
5
|
export var useStyles = createStyles(function (_ref, _ref2) {
|
|
5
6
|
var cx = _ref.cx,
|
|
6
7
|
css = _ref.css,
|
|
7
8
|
token = _ref.token,
|
|
8
|
-
isDarkMode = _ref.isDarkMode,
|
|
9
9
|
responsive = _ref.responsive;
|
|
10
10
|
var placement = _ref2.placement,
|
|
11
11
|
type = _ref2.type,
|
|
12
12
|
title = _ref2.title,
|
|
13
|
-
primary = _ref2.primary,
|
|
14
13
|
avatarSize = _ref2.avatarSize,
|
|
15
14
|
editing = _ref2.editing,
|
|
16
15
|
time = _ref2.time;
|
|
17
|
-
var blockStylish = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-block: 8px;\n padding-inline: 12px;\n\n background-color: ", ";\n border
|
|
16
|
+
var blockStylish = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-block: 8px;\n padding-inline: 12px;\n\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n "])), token.colorBgContainer, rgba(token.colorBorderSecondary, 0.66), token.borderRadiusLG);
|
|
18
17
|
var pureStylish = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding-block-start: ", ";\n "])), title ? 0 : '6px');
|
|
19
18
|
var pureContainerStylish = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-block-end: -16px;\n transition: background-color 100ms ", ";\n "])), token.motionEaseOut);
|
|
20
19
|
var typeStylish = type === 'block' ? blockStylish : pureStylish;
|
package/es/color/colors/gray.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var gray = {
|
|
2
|
-
dark: ['#000000', '#111111', '#
|
|
2
|
+
dark: ['#000000', '#111111', '#1a1a1a', '#222222', '#2d2d2d', '#444444', '#555555', '#666666', '#6f6f6f', '#777777', '#aaaaaa', '#dddddd', '#ffffff'],
|
|
3
3
|
darkA: ['rgba(255, 255, 255, 0.02)', 'rgba(255, 255, 255, 0.06)', 'rgba(255, 255, 255, 0.10)', 'rgba(255, 255, 255, 0.16)', 'rgba(255, 255, 255, 0.24)', 'rgba(255, 255, 255, 0.28)', 'rgba(255, 255, 255, 0.32)', 'rgba(255, 255, 255, 0.38)', 'rgba(255, 255, 255, 0.44)', 'rgba(255, 255, 255, 0.5)', 'rgba(255, 255, 255, 0.66)', 'rgba(255, 255, 255, 0.84)', '#ffffff'],
|
|
4
4
|
light: ['#ffffff', '#f8f8f8', '#eeeeee', '#e3e3e3', '#dddddd', '#cccccc', '#bbbbbb', '#aaaaaa', '#999999', '#888888', '#666666', '#333333', '#080808'],
|
|
5
5
|
lightA: ['rgba(0, 0, 0, 0.015)', 'rgba(0, 0, 0, 0.03)', 'rgba(0, 0, 0, 0.06)', 'rgba(0, 0, 0, 0.12)', 'rgba(0, 0, 0, 0.18)', 'rgba(0, 0, 0, 0.24)', 'rgba(0, 0, 0, 0.32)', 'rgba(0, 0, 0, 0.38)', 'rgba(0, 0, 0, 0.44)', 'rgba(0, 0, 0, 0.5)', 'rgba(0, 0, 0, 0.68)', 'rgba(0, 0, 0, 0.84)', 'rgba(0, 0, 0, 0.98)']
|
|
@@ -22,7 +22,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
22
22
|
var useStyles = createStyles(function (_ref) {
|
|
23
23
|
var css = _ref.css;
|
|
24
24
|
return {
|
|
25
|
-
container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n margin-block: 1em;\n border-radius: calc(var(--lobe-markdown-border-radius) * 1px);\n box-shadow: 0 0 0 1px var(--lobe-markdown-border-color);\n "])))
|
|
25
|
+
container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n margin-block: 1em;\n border-radius: calc(var(--lobe-markdown-border-radius) * 1px);\n box-shadow: 0 0 0 1px var(--lobe-markdown-border-color) inset;\n "])))
|
|
26
26
|
};
|
|
27
27
|
});
|
|
28
28
|
export var Pre = function Pre(_ref2) {
|
|
@@ -12,6 +12,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
12
12
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
13
13
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
14
|
import { camelCase } from 'lodash-es';
|
|
15
|
+
import { mix } from 'polished';
|
|
15
16
|
import { colorScales } from "../../color/colors";
|
|
16
17
|
var generateColorPalette = function generateColorPalette(_ref) {
|
|
17
18
|
var _ref2;
|
|
@@ -62,7 +63,8 @@ var generateCustomColorPalette = function generateCustomColorPalette(_ref3) {
|
|
|
62
63
|
}));
|
|
63
64
|
};
|
|
64
65
|
export var generateCustomToken = function generateCustomToken(_ref4) {
|
|
65
|
-
var isDarkMode = _ref4.isDarkMode
|
|
66
|
+
var isDarkMode = _ref4.isDarkMode,
|
|
67
|
+
token = _ref4.token;
|
|
66
68
|
var colorCustomToken = {};
|
|
67
69
|
for (var _i = 0, _Object$entries = Object.entries(colorScales); _i < _Object$entries.length; _i++) {
|
|
68
70
|
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
|
@@ -74,5 +76,7 @@ export var generateCustomToken = function generateCustomToken(_ref4) {
|
|
|
74
76
|
scale: scale
|
|
75
77
|
}));
|
|
76
78
|
}
|
|
77
|
-
return colorCustomToken
|
|
79
|
+
return _objectSpread(_objectSpread({}, colorCustomToken), {}, {
|
|
80
|
+
colorBgContainerSecondary: mix(0.5, token.colorBgLayout, token.colorBgContainer)
|
|
81
|
+
});
|
|
78
82
|
};
|