@lobehub/ui 1.7.1 → 1.7.2
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/Highlighter/SyntaxHighlighter/style.js +1 -1
- package/es/Highlighter/style.js +1 -1
- package/es/Logo/style.js +1 -1
- package/es/Markdown/style.js +1 -1
- package/es/Snippet/style.js +1 -1
- package/es/StroyBook/style.js +3 -3
- package/es/ThemeProvider/GlobalStyle.js +4 -3
- package/es/Tooltip/style.js +1 -1
- package/es/styles/customStylish.js +4 -4
- package/es/styles/theme/base.js +6 -2
- package/lib/Highlighter/SyntaxHighlighter/style.js +4 -1
- package/lib/Highlighter/style.js +11 -13
- package/lib/Logo/style.js +1 -1
- package/lib/Markdown/style.js +27 -37
- package/lib/Snippet/style.js +16 -12
- package/lib/StroyBook/style.js +5 -2
- package/lib/ThemeProvider/GlobalStyle.js +23 -9
- package/lib/Tooltip/style.js +8 -5
- package/lib/styles/customStylish.js +6 -5
- package/lib/styles/theme/base.js +6 -2
- package/package.json +10 -2
|
@@ -10,6 +10,6 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
10
10
|
return {
|
|
11
11
|
shiki: cx("".concat(prefix, "-shiki"), css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .shiki {\n overflow-x: scroll;\n background: none !important;\n }\n "])))),
|
|
12
12
|
prism: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n pre {\n overflow-x: scroll;\n font-family: ", " !important;\n }\n "])), token.fontFamilyCode),
|
|
13
|
-
loading: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n right: 0;\n
|
|
13
|
+
loading: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n right: 0;\n\n padding: 4px 8px;\n\n color: ", ";\n\n backdrop-filter: saturate(180%) blur(10px);\n border-radius: ", ";\n "])), token.colorTextTertiary, token.borderRadiusSM)
|
|
14
14
|
};
|
|
15
15
|
});
|
package/es/Highlighter/style.js
CHANGED
|
@@ -11,7 +11,7 @@ export var useStyles = createStyles(function (_ref, type) {
|
|
|
11
11
|
var buttonHoverCls = "".concat(prefix, "-hover-btn");
|
|
12
12
|
var langHoverCls = "".concat(prefix, "-hover-lang");
|
|
13
13
|
return {
|
|
14
|
-
container: cx(prefix, css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n
|
|
14
|
+
container: cx(prefix, css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n\n overflow: auto;\n\n background-color: ", ";\n border-radius: ", "px;\n\n transition: background-color 100ms ", ";\n ", "\n &:hover {\n background-color: ", ";\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 margin: 0 !important;\n padding: ", " !important;\n background: none !important;\n }\n\n code {\n background: transparent !important;\n }\n "])), type === 'block' ? rgba(token.colorBgElevated, 0.6) : 'transparent', token.borderRadius, token.motionEaseOut, type === 'ghost' && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n "])), token.colorBorder), type === 'prue' ? 'transparent' : token.colorFillTertiary, buttonHoverCls, langHoverCls, type === 'prue' ? 0 : "16px 24px")),
|
|
15
15
|
button: cx(buttonHoverCls, css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 51;\n top: 8px;\n right: 8px;\n\n opacity: 0;\n "])))),
|
|
16
16
|
lang: cx(langHoverCls, css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 50;\n right: 8px;\n bottom: 8px;\n\n color: ", ";\n\n opacity: 0;\n\n transition: opacity 0.1s;\n "])), token.colorTextPlaceholder))
|
|
17
17
|
};
|
package/es/Logo/style.js
CHANGED
|
@@ -5,6 +5,6 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
5
5
|
var css = _ref.css;
|
|
6
6
|
return {
|
|
7
7
|
flexCenter: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n "]))),
|
|
8
|
-
extraTitle: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n
|
|
8
|
+
extraTitle: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-weight: 300;\n white-space: nowrap;\n "])))
|
|
9
9
|
};
|
|
10
10
|
});
|
package/es/Markdown/style.js
CHANGED
|
@@ -6,7 +6,7 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
6
6
|
token = _ref.token,
|
|
7
7
|
isDarkMode = _ref.isDarkMode;
|
|
8
8
|
return {
|
|
9
|
-
container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n
|
|
9
|
+
container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n\n p {\n margin: 20px auto;\n\n font-size: 14px;\n line-height: 2;\n color: ", ";\n word-wrap: break-word;\n }\n\n blockquote {\n margin: 16px 0;\n padding: 0 12px;\n p {\n font-style: italic;\n color: ", ";\n }\n }\n\n p:not(:last-child) {\n margin-bottom: 1em;\n }\n\n a {\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n\n &:active {\n color: ", ";\n }\n }\n\n img {\n max-width: 100%;\n }\n\n > :not([data-code-type='highlighter']) code {\n padding: 2px 6px;\n color: ", ";\n background: ", ";\n border-radius: 4px;\n }\n\n table {\n border-spacing: 0;\n\n width: 100%;\n margin-block-start: 1em;\n margin-block-end: 1em;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n padding: 8px;\n\n border: 1px solid ", ";\n border-radius: ", "px;\n }\n\n th,\n td {\n padding-block-start: 10px;\n padding-block-end: 10px;\n padding-inline-start: 16px;\n padding-inline-end: 16px;\n }\n\n thead {\n tr {\n th {\n background: ", ";\n &:first-child {\n border-top-left-radius: ", "px;\n border-bottom-left-radius: ", "px;\n }\n &:last-child {\n border-top-right-radius: ", "px;\n border-bottom-right-radius: ", "px;\n }\n }\n }\n }\n\n ul li {\n line-height: 1.8;\n }\n "])), isDarkMode ? token.colorTextSecondary : token.colorText, token.colorText, token.colorTextDescription, token.colorLink, token.colorLinkHover, token.colorLinkActive, isDarkMode ? token['cyan-7'] : token.colorPrimaryText, isDarkMode ? token['cyan-1'] : token.colorPrimaryBg, token.colorBorder, token.borderRadius, token.colorFillTertiary, token.borderRadius, token.borderRadius, token.borderRadius, token.borderRadius),
|
|
10
10
|
code: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 2px 4px;\n font-family: ", " !important;\n color: ", ";\n border-radius: 4px;\n "])), token.fontFamilyCode, isDarkMode ? token.cyan8 : token.pink7)
|
|
11
11
|
};
|
|
12
12
|
});
|
package/es/Snippet/style.js
CHANGED
|
@@ -5,5 +5,5 @@ import { rgba } from 'polished';
|
|
|
5
5
|
export var useStyles = createStyles(function (_ref, type) {
|
|
6
6
|
var css = _ref.css,
|
|
7
7
|
token = _ref.token;
|
|
8
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n
|
|
8
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n\n display: flex;\n gap: 8px;\n align-items: center;\n\n max-width: 100%;\n height: 36px;\n padding: 0 8px 0 12px;\n\n border-radius: ", "px;\n\n transition: background-color 100ms ", ";\n ", "\n\n &:hover {\n background-color: ", ";\n }\n\n .ant-highlighter-shiki {\n overflow: auto;\n flex: 1;\n }\n .prism-code {\n background: none !important;\n }\n\n pre {\n margin: 0 !important;\n padding-top: 6px !important;\n line-height: 1;\n background: none !important;\n }\n\n code[class*='language-'] {\n background: none !important;\n }\n "])), token.borderRadius, token.motionEaseOut, type === 'block' ? css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), rgba(token.colorBgElevated, 0.6)) : css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n "])), token.colorBorder), token.colorFillTertiary);
|
|
9
9
|
});
|
package/es/StroyBook/style.js
CHANGED
|
@@ -7,8 +7,8 @@ export var useStyles = createStyles(function (_ref, _ref2) {
|
|
|
7
7
|
var noPadding = _ref2.noPadding,
|
|
8
8
|
mobile = _ref2.mobile;
|
|
9
9
|
return {
|
|
10
|
-
editor: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: stretch;\n justify-content: stretch;\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
|
|
12
|
-
right: 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 padding: 6px 0;\n background: ", ";\n > div {\n background: transparent;\n > div {\n background: transparent;\n }\n }\n input:checked + label > svg {\n stroke: ", ";\n }\n "])), token.colorFillSecondary, token.colorFillSecondary, token.colorPrimary, token.colorPrimaryHover, token.colorPrimaryActive, token.colorTextTertiary, token.colorTextSecondary, token.colorText, token.colorWarning, token.colorBgLayout, token.colorBorder)
|
|
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 --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\n padding: 6px 0;\n background: ", ";\n > div {\n background: transparent;\n > div {\n background: transparent;\n }\n }\n input:checked + label > svg {\n stroke: ", ";\n }\n "])), token.colorFillSecondary, token.colorFillSecondary, token.colorPrimary, token.colorPrimaryHover, token.colorPrimaryActive, token.colorTextTertiary, token.colorTextSecondary, token.colorText, token.colorWarning, token.colorBgLayout, token.colorBorder)
|
|
13
13
|
};
|
|
14
14
|
});
|
|
@@ -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 body {\n font-family: ", ";\n font-size: ", "px;\n line-height: 1;\n color: ", ";\n
|
|
4
|
+
var GlobalStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\n html,body {\n --font-settings: \"cv01\";\n --font-variations: \"opsz\" auto;\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\n * {\n box-sizing: border-box;\n vertical-align: baseline;\n }\n\n #root {\n\t min-height: 100vh;\n }\n\n ::-webkit-scrollbar {\n width: 0;\n height: 4px;\n background-color: transparent;\n\n &-thumb {\n background-color: ", ";\n border-radius: 4px;\n }\n\n &-corner {\n display: none;\n }\n }\n"])), function (_ref) {
|
|
5
5
|
var theme = _ref.theme;
|
|
6
6
|
return theme.fontFamily;
|
|
7
7
|
}, function (_ref2) {
|
|
@@ -10,10 +10,11 @@ var GlobalStyle = createGlobalStyle(_templateObject || (_templateObject = _tagge
|
|
|
10
10
|
}, function (_ref3) {
|
|
11
11
|
var theme = _ref3.theme;
|
|
12
12
|
return theme.colorTextBase;
|
|
13
|
-
}, function (p) {
|
|
14
|
-
return p.theme.colorBgLayout;
|
|
15
13
|
}, function (_ref4) {
|
|
16
14
|
var theme = _ref4.theme;
|
|
15
|
+
return theme.colorBgLayout;
|
|
16
|
+
}, function (_ref5) {
|
|
17
|
+
var theme = _ref5.theme;
|
|
17
18
|
return theme.colorFill;
|
|
18
19
|
});
|
|
19
20
|
export default GlobalStyle;
|
package/es/Tooltip/style.js
CHANGED
|
@@ -5,6 +5,6 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
5
5
|
var css = _ref.css,
|
|
6
6
|
token = _ref.token;
|
|
7
7
|
return {
|
|
8
|
-
tooltip: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-tooltip-inner {\n
|
|
8
|
+
tooltip: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-tooltip-inner {\n display: flex;\n align-items: center;\n justify-content: center;\n\n min-height: unset;\n padding: 4px 8px;\n\n color: ", ";\n\n background-color: ", ";\n border-radius: ", "px;\n }\n .ant-tooltip-arrow {\n &:before,\n &:after {\n background: ", ";\n }\n }\n "])), token.colorBgLayout, token.colorText, token.borderRadiusSM, token.colorText)
|
|
9
9
|
};
|
|
10
10
|
});
|
|
@@ -11,9 +11,9 @@ export var getCustomStylish = function getCustomStylish(_ref) {
|
|
|
11
11
|
heroButtonGradient: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background: linear-gradient(90deg, ", " 0%, ", " 100%);\n "])), token.gradientColor1, token.gradientColor2),
|
|
12
12
|
heroGradient: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background-image: ", ";\n background-size: 300% 300%;\n "])), token.gradientHeroBgG),
|
|
13
13
|
heroGradientFlow: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n animation: flow 5s ease infinite;\n\n @keyframes flow {\n 0% {\n background-position: 0 0;\n }\n\n 50% {\n background-position: 100% 100%;\n }\n\n 100% {\n background-position: 0 0;\n }\n }\n "]))),
|
|
14
|
-
heroTextShadow: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n will-change: transform;\n
|
|
15
|
-
heroBlurBall: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n
|
|
16
|
-
iconGradientDefault: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n radial-gradient(\n 100% 100% at 50% 0,\n ", " 0,\n ", " 100%\n )"])), rgba(token.colorSolid, 0.2), rgba(token.colorSolid, 0.1)),
|
|
17
|
-
blur: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n backdrop-filter: blur(7px);\n
|
|
14
|
+
heroTextShadow: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n will-change: transform;\n text-shadow: 0 8px 20px ", ",\n 0 8px 60px ", ",\n 0 8px 80px ", ";\n "])), rgba(token.gradientColor2, 0.2), rgba(token.gradientColor3, 0.2), rgba(token.cyan, isDarkMode ? 0.2 : 0.4)),
|
|
15
|
+
heroBlurBall: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n will-change: transform;\n\n background: linear-gradient(\n 135deg,\n ", " 0%,\n ", " 30%,\n ", " 70%,\n ", " 100%\n );\n background-size: 200% 200%;\n filter: blur(69px);\n\n animation: glow 10s ease infinite;\n\n @keyframes glow {\n 0% {\n background-position: 0 -100%;\n }\n\n 50% {\n background-position: 200% 50%;\n }\n\n 100% {\n background-position: 0 -100%;\n }\n }\n "])), token.gradientColor3, token.gradientColor1, token.red, token.cyan),
|
|
16
|
+
iconGradientDefault: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n background-image: radial-gradient(\n 100% 100% at 50% 0,\n ", " 0,\n ", " 100%\n );\n "])), rgba(token.colorSolid, 0.2), rgba(token.colorSolid, 0.1)),
|
|
17
|
+
blur: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n backdrop-filter: blur(7px);\n "])))
|
|
18
18
|
};
|
|
19
19
|
};
|
package/es/styles/theme/base.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
var fontEmoji = "\"\"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Segoe UI\", Apple Color Emoji\", \"Twemoji Mozilla\", \"Noto Color Emoji\", \"Android Emoji\"";
|
|
2
|
+
var fontEn = "\"Segoe UI\", \"SF Pro Display\",-apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, \"Open Sans\", \"Helvetica Neue\", sans-serif";
|
|
3
|
+
var fontCn = "\"PingFang SC\", \"Hiragino Sans GB\", \"Microsoft Yahei UI\", \"Microsoft Yahei\", \"Source Han Sans CN\", sans-serif";
|
|
4
|
+
var fontCode = "\"Hack Nerd Font Mono\", Hack, \"SFMono Regular\", Consolas, \"Liberation Mono\", Menlo, Courier, monospace";
|
|
1
5
|
export var baseTheme = {
|
|
2
6
|
token: {
|
|
3
7
|
colorInfo: '#0070f3',
|
|
@@ -9,7 +13,7 @@ export var baseTheme = {
|
|
|
9
13
|
borderRadiusSM: 3,
|
|
10
14
|
borderRadiusLG: 8,
|
|
11
15
|
controlHeight: 36,
|
|
12
|
-
fontFamily:
|
|
13
|
-
fontFamilyCode:
|
|
16
|
+
fontFamily: [fontEn, fontCn, fontEmoji].join(','),
|
|
17
|
+
fontFamilyCode: fontCode
|
|
14
18
|
}
|
|
15
19
|
};
|
|
@@ -45,8 +45,11 @@ var useStyles = (0, import_antd_style.createStyles)(({ css, token, cx, prefixCls
|
|
|
45
45
|
position: absolute;
|
|
46
46
|
top: 0;
|
|
47
47
|
right: 0;
|
|
48
|
-
|
|
48
|
+
|
|
49
49
|
padding: 4px 8px;
|
|
50
|
+
|
|
51
|
+
color: ${token.colorTextTertiary};
|
|
52
|
+
|
|
50
53
|
backdrop-filter: saturate(180%) blur(10px);
|
|
51
54
|
border-radius: ${token.borderRadiusSM};
|
|
52
55
|
`
|
package/lib/Highlighter/style.js
CHANGED
|
@@ -33,18 +33,26 @@ var useStyles = (0, import_antd_style.createStyles)(
|
|
|
33
33
|
container: cx(
|
|
34
34
|
prefix,
|
|
35
35
|
css`
|
|
36
|
-
overflow: auto;
|
|
37
36
|
position: relative;
|
|
38
|
-
|
|
37
|
+
|
|
38
|
+
overflow: auto;
|
|
39
|
+
|
|
39
40
|
background-color: ${type === "block" ? (0, import_polished.rgba)(token.colorBgElevated, 0.6) : "transparent"};
|
|
40
41
|
border-radius: ${token.borderRadius}px;
|
|
41
42
|
|
|
43
|
+
transition: background-color 100ms ${token.motionEaseOut};
|
|
42
44
|
${type === "ghost" && css`
|
|
43
45
|
border: 1px solid ${token.colorBorder};
|
|
44
46
|
`}
|
|
45
|
-
|
|
46
47
|
&:hover {
|
|
47
48
|
background-color: ${type === "prue" ? "transparent" : token.colorFillTertiary};
|
|
49
|
+
.${buttonHoverCls} {
|
|
50
|
+
opacity: 1;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.${langHoverCls} {
|
|
54
|
+
opacity: 1;
|
|
55
|
+
}
|
|
48
56
|
}
|
|
49
57
|
|
|
50
58
|
.prism-code {
|
|
@@ -60,16 +68,6 @@ var useStyles = (0, import_antd_style.createStyles)(
|
|
|
60
68
|
code {
|
|
61
69
|
background: transparent !important;
|
|
62
70
|
}
|
|
63
|
-
|
|
64
|
-
&:hover {
|
|
65
|
-
.${buttonHoverCls} {
|
|
66
|
-
opacity: 1;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.${langHoverCls} {
|
|
70
|
-
opacity: 1;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
71
|
`
|
|
74
72
|
),
|
|
75
73
|
button: cx(
|
package/lib/Logo/style.js
CHANGED
package/lib/Markdown/style.js
CHANGED
|
@@ -26,23 +26,30 @@ var import_antd_style = require("antd-style");
|
|
|
26
26
|
var useStyles = (0, import_antd_style.createStyles)(({ css, token, isDarkMode }) => {
|
|
27
27
|
return {
|
|
28
28
|
container: css`
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
color: ${isDarkMode ? token.colorTextSecondary : token.colorText};
|
|
32
30
|
|
|
33
31
|
p {
|
|
34
32
|
margin: 20px auto;
|
|
35
|
-
|
|
36
|
-
word-wrap: break-word;
|
|
33
|
+
|
|
37
34
|
font-size: 14px;
|
|
35
|
+
line-height: 2;
|
|
38
36
|
color: ${token.colorText};
|
|
37
|
+
word-wrap: break-word;
|
|
38
|
+
}
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
blockquote {
|
|
41
|
+
margin: 16px 0;
|
|
42
|
+
padding: 0 12px;
|
|
43
|
+
p {
|
|
44
|
+
font-style: italic;
|
|
45
|
+
color: ${token.colorTextDescription};
|
|
42
46
|
}
|
|
43
47
|
}
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
p:not(:last-child) {
|
|
50
|
+
margin-bottom: 1em;
|
|
51
|
+
}
|
|
52
|
+
|
|
46
53
|
a {
|
|
47
54
|
color: ${token.colorLink};
|
|
48
55
|
|
|
@@ -59,7 +66,6 @@ var useStyles = (0, import_antd_style.createStyles)(({ css, token, isDarkMode })
|
|
|
59
66
|
max-width: 100%;
|
|
60
67
|
}
|
|
61
68
|
|
|
62
|
-
// inline code
|
|
63
69
|
> :not([data-code-type='highlighter']) code {
|
|
64
70
|
padding: 2px 6px;
|
|
65
71
|
color: ${isDarkMode ? token["cyan-7"] : token.colorPrimaryText};
|
|
@@ -67,22 +73,26 @@ var useStyles = (0, import_antd_style.createStyles)(({ css, token, isDarkMode })
|
|
|
67
73
|
border-radius: 4px;
|
|
68
74
|
}
|
|
69
75
|
|
|
70
|
-
|
|
71
|
-
// table
|
|
72
76
|
table {
|
|
73
|
-
width: 100%;
|
|
74
77
|
border-spacing: 0;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
padding: 8px;
|
|
78
|
+
|
|
79
|
+
width: 100%;
|
|
78
80
|
margin-block-start: 1em;
|
|
79
81
|
margin-block-end: 1em;
|
|
80
82
|
margin-inline-start: 0px;
|
|
81
83
|
margin-inline-end: 0px;
|
|
82
|
-
|
|
84
|
+
padding: 8px;
|
|
83
85
|
|
|
84
|
-
|
|
86
|
+
border: 1px solid ${token.colorBorder};
|
|
87
|
+
border-radius: ${token.borderRadius}px;
|
|
88
|
+
}
|
|
85
89
|
|
|
90
|
+
th,
|
|
91
|
+
td {
|
|
92
|
+
padding-block-start: 10px;
|
|
93
|
+
padding-block-end: 10px;
|
|
94
|
+
padding-inline-start: 16px;
|
|
95
|
+
padding-inline-end: 16px;
|
|
86
96
|
}
|
|
87
97
|
|
|
88
98
|
thead {
|
|
@@ -101,29 +111,9 @@ var useStyles = (0, import_antd_style.createStyles)(({ css, token, isDarkMode })
|
|
|
101
111
|
}
|
|
102
112
|
}
|
|
103
113
|
|
|
104
|
-
th,
|
|
105
|
-
td {
|
|
106
|
-
padding-block-start: 10px;
|
|
107
|
-
padding-block-end: 10px;
|
|
108
|
-
padding-inline-start: 16px;
|
|
109
|
-
padding-inline-end: 16px;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// blockquote
|
|
113
|
-
blockquote {
|
|
114
|
-
margin: 16px 0;
|
|
115
|
-
padding: 0 12px;
|
|
116
|
-
p {
|
|
117
|
-
font-style: italic;
|
|
118
|
-
color: ${token.colorTextDescription};
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// list
|
|
123
114
|
ul li {
|
|
124
115
|
line-height: 1.8;
|
|
125
116
|
}
|
|
126
|
-
}
|
|
127
117
|
`,
|
|
128
118
|
code: css`
|
|
129
119
|
padding: 2px 4px;
|
package/lib/Snippet/style.js
CHANGED
|
@@ -26,21 +26,24 @@ var import_antd_style = require("antd-style");
|
|
|
26
26
|
var import_polished = require("polished");
|
|
27
27
|
var useStyles = (0, import_antd_style.createStyles)(
|
|
28
28
|
({ css, token }, type) => css`
|
|
29
|
-
display: flex;
|
|
30
|
-
max-width: 100%;
|
|
31
29
|
position: relative;
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
|
|
31
|
+
display: flex;
|
|
34
32
|
gap: 8px;
|
|
35
|
-
|
|
33
|
+
align-items: center;
|
|
34
|
+
|
|
35
|
+
max-width: 100%;
|
|
36
36
|
height: 36px;
|
|
37
|
-
|
|
37
|
+
padding: 0 8px 0 12px;
|
|
38
|
+
|
|
39
|
+
border-radius: ${token.borderRadius}px;
|
|
38
40
|
|
|
41
|
+
transition: background-color 100ms ${token.motionEaseOut};
|
|
39
42
|
${type === "block" ? css`
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
background-color: ${(0, import_polished.rgba)(token.colorBgElevated, 0.6)};
|
|
44
|
+
` : css`
|
|
45
|
+
border: 1px solid ${token.colorBorder};
|
|
46
|
+
`}
|
|
44
47
|
|
|
45
48
|
&:hover {
|
|
46
49
|
background-color: ${token.colorFillTertiary};
|
|
@@ -55,11 +58,12 @@ var useStyles = (0, import_antd_style.createStyles)(
|
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
pre {
|
|
58
|
-
background: none !important;
|
|
59
|
-
padding-top: 6px; !important;
|
|
60
61
|
margin: 0 !important;
|
|
62
|
+
padding-top: 6px !important;
|
|
61
63
|
line-height: 1;
|
|
64
|
+
background: none !important;
|
|
62
65
|
}
|
|
66
|
+
|
|
63
67
|
code[class*='language-'] {
|
|
64
68
|
background: none !important;
|
|
65
69
|
}
|
package/lib/StroyBook/style.js
CHANGED
|
@@ -30,6 +30,7 @@ var useStyles = (0, import_antd_style.createStyles)(
|
|
|
30
30
|
display: flex;
|
|
31
31
|
align-items: stretch;
|
|
32
32
|
justify-content: stretch;
|
|
33
|
+
|
|
33
34
|
width: inherit;
|
|
34
35
|
min-height: inherit;
|
|
35
36
|
${mobile && css`
|
|
@@ -37,11 +38,12 @@ var useStyles = (0, import_antd_style.createStyles)(
|
|
|
37
38
|
`}
|
|
38
39
|
`,
|
|
39
40
|
left: css`
|
|
40
|
-
|
|
41
|
+
overflow: auto;
|
|
41
42
|
display: flex;
|
|
43
|
+
flex: 1;
|
|
42
44
|
align-items: center;
|
|
43
45
|
justify-content: center;
|
|
44
|
-
|
|
46
|
+
|
|
45
47
|
${!noPadding && css`
|
|
46
48
|
padding: 40px 24px;
|
|
47
49
|
`}
|
|
@@ -60,6 +62,7 @@ var useStyles = (0, import_antd_style.createStyles)(
|
|
|
60
62
|
--leva-colors-vivid1: ${token.colorWarning};
|
|
61
63
|
--leva-shadows-level1: unset;
|
|
62
64
|
--leva-shadows-level2: unset;
|
|
65
|
+
|
|
63
66
|
padding: 6px 0;
|
|
64
67
|
background: ${token.colorBgLayout};
|
|
65
68
|
> div {
|
|
@@ -25,37 +25,51 @@ module.exports = __toCommonJS(GlobalStyle_exports);
|
|
|
25
25
|
var import_antd_style = require("antd-style");
|
|
26
26
|
var GlobalStyle = import_antd_style.createGlobalStyle`
|
|
27
27
|
|
|
28
|
-
body {
|
|
28
|
+
html,body {
|
|
29
|
+
--font-settings: "cv01";
|
|
30
|
+
--font-variations: "opsz" auto;
|
|
31
|
+
|
|
32
|
+
overflow-x: hidden;
|
|
33
|
+
|
|
34
|
+
margin: 0;
|
|
35
|
+
padding: 0;
|
|
36
|
+
|
|
29
37
|
font-family: ${({ theme }) => theme.fontFamily};
|
|
30
38
|
font-size: ${({ theme }) => theme.fontSize}px;
|
|
39
|
+
font-feature-settings: var(--font-settings);
|
|
40
|
+
font-variation-settings: var(--font-variations);
|
|
31
41
|
line-height: 1;
|
|
32
42
|
color: ${({ theme }) => theme.colorTextBase};
|
|
43
|
+
text-size-adjust: none;
|
|
44
|
+
text-rendering: optimizelegibility;
|
|
45
|
+
vertical-align: baseline;
|
|
33
46
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
background-color: ${(p) => p.theme.colorBgLayout};
|
|
47
|
+
color-scheme: dark;
|
|
48
|
+
background-color: ${({ theme }) => theme.colorBgLayout};
|
|
37
49
|
|
|
38
50
|
-webkit-font-smoothing: antialiased;
|
|
39
51
|
-moz-osx-font-smoothing: grayscale;
|
|
52
|
+
-webkit-tap-highlight-color: transparent;
|
|
40
53
|
}
|
|
41
54
|
|
|
55
|
+
|
|
42
56
|
* {
|
|
43
57
|
box-sizing: border-box;
|
|
58
|
+
vertical-align: baseline;
|
|
44
59
|
}
|
|
45
60
|
|
|
46
61
|
#root {
|
|
47
62
|
min-height: 100vh;
|
|
48
63
|
}
|
|
49
|
-
|
|
64
|
+
|
|
50
65
|
::-webkit-scrollbar {
|
|
51
66
|
width: 0;
|
|
52
67
|
height: 4px;
|
|
53
|
-
|
|
54
|
-
background-color: transparent; // 定义滚动槽的背景色
|
|
68
|
+
background-color: transparent;
|
|
55
69
|
|
|
56
70
|
&-thumb {
|
|
57
|
-
background-color: ${({ theme }) => theme.colorFill};
|
|
58
|
-
border-radius: 4px;
|
|
71
|
+
background-color: ${({ theme }) => theme.colorFill};
|
|
72
|
+
border-radius: 4px;
|
|
59
73
|
}
|
|
60
74
|
|
|
61
75
|
&-corner {
|
package/lib/Tooltip/style.js
CHANGED
|
@@ -27,14 +27,17 @@ var useStyles = (0, import_antd_style.createStyles)(({ css, token }) => {
|
|
|
27
27
|
return {
|
|
28
28
|
tooltip: css`
|
|
29
29
|
.ant-tooltip-inner {
|
|
30
|
-
background-color: ${token.colorText};
|
|
31
|
-
color: ${token.colorBgLayout};
|
|
32
|
-
padding: 4px 8px;
|
|
33
|
-
border-radius: ${token.borderRadiusSM}px;
|
|
34
|
-
min-height: unset;
|
|
35
30
|
display: flex;
|
|
36
31
|
align-items: center;
|
|
37
32
|
justify-content: center;
|
|
33
|
+
|
|
34
|
+
min-height: unset;
|
|
35
|
+
padding: 4px 8px;
|
|
36
|
+
|
|
37
|
+
color: ${token.colorBgLayout};
|
|
38
|
+
|
|
39
|
+
background-color: ${token.colorText};
|
|
40
|
+
border-radius: ${token.borderRadiusSM}px;
|
|
38
41
|
}
|
|
39
42
|
.ant-tooltip-arrow {
|
|
40
43
|
&:before,
|
|
@@ -67,14 +67,13 @@ var getCustomStylish = ({ css, token, isDarkMode }) => {
|
|
|
67
67
|
`,
|
|
68
68
|
heroTextShadow: css`
|
|
69
69
|
will-change: transform;
|
|
70
|
-
|
|
71
70
|
text-shadow: 0 8px 20px ${(0, import_polished.rgba)(token.gradientColor2, 0.2)},
|
|
72
71
|
0 8px 60px ${(0, import_polished.rgba)(token.gradientColor3, 0.2)},
|
|
73
72
|
0 8px 80px ${(0, import_polished.rgba)(token.cyan, isDarkMode ? 0.2 : 0.4)};
|
|
74
73
|
`,
|
|
75
74
|
heroBlurBall: css`
|
|
76
|
-
filter: blur(69px);
|
|
77
75
|
will-change: transform;
|
|
76
|
+
|
|
78
77
|
background: linear-gradient(
|
|
79
78
|
135deg,
|
|
80
79
|
${token.gradientColor3} 0%,
|
|
@@ -83,6 +82,8 @@ var getCustomStylish = ({ css, token, isDarkMode }) => {
|
|
|
83
82
|
${token.cyan} 100%
|
|
84
83
|
);
|
|
85
84
|
background-size: 200% 200%;
|
|
85
|
+
filter: blur(69px);
|
|
86
|
+
|
|
86
87
|
animation: glow 10s ease infinite;
|
|
87
88
|
|
|
88
89
|
@keyframes glow {
|
|
@@ -100,14 +101,14 @@ var getCustomStylish = ({ css, token, isDarkMode }) => {
|
|
|
100
101
|
}
|
|
101
102
|
`,
|
|
102
103
|
iconGradientDefault: css`
|
|
103
|
-
radial-gradient(
|
|
104
|
+
background-image: radial-gradient(
|
|
104
105
|
100% 100% at 50% 0,
|
|
105
106
|
${(0, import_polished.rgba)(token.colorSolid, 0.2)} 0,
|
|
106
107
|
${(0, import_polished.rgba)(token.colorSolid, 0.1)} 100%
|
|
107
|
-
)
|
|
108
|
+
);
|
|
109
|
+
`,
|
|
108
110
|
blur: css`
|
|
109
111
|
backdrop-filter: blur(7px);
|
|
110
|
-
// background: ${(0, import_polished.rgba)(token.colorBgBase, 0.5)};
|
|
111
112
|
`
|
|
112
113
|
};
|
|
113
114
|
};
|
package/lib/styles/theme/base.js
CHANGED
|
@@ -22,6 +22,10 @@ __export(base_exports, {
|
|
|
22
22
|
baseTheme: () => baseTheme
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(base_exports);
|
|
25
|
+
var fontEmoji = `""Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"`;
|
|
26
|
+
var fontEn = `"Segoe UI", "SF Pro Display",-apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif`;
|
|
27
|
+
var fontCn = `"PingFang SC", "Hiragino Sans GB", "Microsoft Yahei UI", "Microsoft Yahei", "Source Han Sans CN", sans-serif`;
|
|
28
|
+
var fontCode = `"Hack Nerd Font Mono", Hack, "SFMono Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace`;
|
|
25
29
|
var baseTheme = {
|
|
26
30
|
token: {
|
|
27
31
|
colorInfo: "#0070f3",
|
|
@@ -33,8 +37,8 @@ var baseTheme = {
|
|
|
33
37
|
borderRadiusSM: 3,
|
|
34
38
|
borderRadiusLG: 8,
|
|
35
39
|
controlHeight: 36,
|
|
36
|
-
fontFamily:
|
|
37
|
-
fontFamilyCode:
|
|
40
|
+
fontFamily: [fontEn, fontCn, fontEmoji].join(","),
|
|
41
|
+
fontFamilyCode: fontCode
|
|
38
42
|
}
|
|
39
43
|
};
|
|
40
44
|
// Annotate the CommonJS export names for ESM import in node:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/ui",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "Lobe UI is an open-source UI component library for building chatbot web apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lobehub",
|
|
@@ -38,12 +38,14 @@
|
|
|
38
38
|
"docs:build": "npm run build:theme && dumi build",
|
|
39
39
|
"doctor": "father doctor",
|
|
40
40
|
"lint": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
|
|
41
|
+
"lint:fix": "npm run lint --fix",
|
|
41
42
|
"prepare": "husky install && npm run setup",
|
|
42
43
|
"prepublishOnly": "father doctor && npm run build",
|
|
43
44
|
"prettier": "prettier -c --write \"**/**\"",
|
|
44
45
|
"release": "semantic-release",
|
|
45
46
|
"setup": "dumi setup",
|
|
46
47
|
"start": "dumi dev",
|
|
48
|
+
"stylelint": "stylelint \"{src,test}/**/*.{js,jsx,ts,tsx}\" --fix",
|
|
47
49
|
"test": "vitest --passWithNoTests",
|
|
48
50
|
"test:coverage": "vitest run --coverage --passWithNoTests",
|
|
49
51
|
"test:update": "vitest -u",
|
|
@@ -55,10 +57,12 @@
|
|
|
55
57
|
],
|
|
56
58
|
"*.{js,jsx}": [
|
|
57
59
|
"eslint --fix",
|
|
60
|
+
"stylelint --fix",
|
|
58
61
|
"prettier --write"
|
|
59
62
|
],
|
|
60
63
|
"*.{ts,tsx}": [
|
|
61
64
|
"eslint --fix",
|
|
65
|
+
"stylelint --fix",
|
|
62
66
|
"prettier --parser=typescript --write"
|
|
63
67
|
]
|
|
64
68
|
},
|
|
@@ -106,7 +110,7 @@
|
|
|
106
110
|
"commitlint-config-gitmoji": "^2",
|
|
107
111
|
"concurrently": "^8",
|
|
108
112
|
"cross-env": "^7",
|
|
109
|
-
"dumi": "
|
|
113
|
+
"dumi": "2",
|
|
110
114
|
"dumi-assets-types": "^1",
|
|
111
115
|
"dumi-theme-lobehub": "latest",
|
|
112
116
|
"eslint": "^8",
|
|
@@ -116,6 +120,7 @@
|
|
|
116
120
|
"husky": "^8",
|
|
117
121
|
"jsdom": "^22",
|
|
118
122
|
"lint-staged": "^13",
|
|
123
|
+
"postcss-styled-syntax": "^0.4",
|
|
119
124
|
"prettier": "^2",
|
|
120
125
|
"prettier-plugin-organize-imports": "^3",
|
|
121
126
|
"prettier-plugin-packagejson": "^2",
|
|
@@ -124,6 +129,9 @@
|
|
|
124
129
|
"semantic-release": "^21",
|
|
125
130
|
"semantic-release-config-gitmoji": "^1",
|
|
126
131
|
"stylelint": "^15",
|
|
132
|
+
"stylelint-config-clean-order": "^5",
|
|
133
|
+
"stylelint-config-recommended": "^12",
|
|
134
|
+
"stylelint-order": "^6",
|
|
127
135
|
"typescript": "^5",
|
|
128
136
|
"vitest": "latest"
|
|
129
137
|
},
|