@lobehub/ui 1.26.4 → 1.27.1
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/ActionIcon/style.js +1 -1
- package/es/Burger/index.d.ts +13 -0
- package/es/Burger/index.js +61 -0
- package/es/Burger/style.d.ts +7 -0
- package/es/Burger/style.js +16 -0
- package/es/ColorScales/style.js +3 -2
- package/es/Header/index.d.ts +7 -1
- package/es/Header/index.js +45 -12
- package/es/Hero/index.js +4 -4
- package/es/Hero/style.js +1 -5
- package/es/Icon/style.js +1 -1
- package/es/Layout/index.d.ts +21 -0
- package/es/Layout/index.js +127 -35
- package/es/Layout/style.js +1 -1
- package/es/Swatches/index.d.ts +5 -0
- package/es/Swatches/index.js +12 -14
- package/es/Swatches/style.d.ts +4 -0
- package/es/Swatches/style.js +11 -0
- package/es/ThemeProvider/GlobalStyle.js +1 -1
- package/es/Toc/style.js +1 -1
- package/es/index.d.ts +3 -3
- package/es/index.js +2 -1
- package/es/types/customStylish.d.ts +6 -6
- package/es/types/customStylish.js +1 -0
- package/es/types/customToken.d.ts +14 -45
- package/es/types/customToken.js +2 -0
- package/es/types/index.d.ts +5 -0
- package/es/types/index.js +5 -0
- package/package.json +1 -1
package/es/ActionIcon/style.js
CHANGED
|
@@ -9,6 +9,6 @@ export var useStyles = createStyles(function (_ref, _ref2) {
|
|
|
9
9
|
var active = _ref2.active,
|
|
10
10
|
glass = _ref2.glass;
|
|
11
11
|
return {
|
|
12
|
-
block: cx(glass && stylish.blur, css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n\n position: relative;\n\n display: flex;\n flex: none;\n align-items: center;\n justify-content: center;\n\n color: ", ";\n\n background: ", ";\n\n transition: color 600ms ", ",
|
|
12
|
+
block: cx(glass && stylish.blur, css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n\n position: relative;\n\n display: flex;\n flex: none;\n align-items: center;\n justify-content: center;\n\n color: ", ";\n\n background: ", ";\n\n transition: color 600ms ", ", scale 400ms ", ",\n background-color 100ms ", ";\n\n &:hover {\n color: ", ";\n background-color: ", ";\n }\n\n &:active {\n scale: 0.8;\n color: ", ";\n background-color: ", ";\n }\n "])), active ? token.colorText : token.colorTextTertiary, active ? token.colorFillTertiary : 'transparent', token.motionEaseOut, token.motionEaseOut, token.motionEaseOut, token.colorText, token.colorFillSecondary, token.colorText, token.colorFill))
|
|
13
13
|
};
|
|
14
14
|
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MenuProps } from 'antd';
|
|
3
|
+
import { DivProps } from "../types";
|
|
4
|
+
export interface BurgerProps extends DivProps {
|
|
5
|
+
headerHeight?: number;
|
|
6
|
+
items: MenuProps['items'];
|
|
7
|
+
openKeys?: MenuProps['openKeys'];
|
|
8
|
+
opened: boolean;
|
|
9
|
+
selectedKeys?: MenuProps['selectedKeys'];
|
|
10
|
+
setOpened: (state: boolean) => void;
|
|
11
|
+
}
|
|
12
|
+
declare const Burger: import("react").NamedExoticComponent<BurgerProps>;
|
|
13
|
+
export default Burger;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["items", "openKeys", "selectedKeys", "opened", "setOpened", "className", "headerHeight"];
|
|
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; }
|
|
6
|
+
import { Drawer, Menu } from 'antd';
|
|
7
|
+
import { MenuIcon, X } from 'lucide-react';
|
|
8
|
+
import { memo } from 'react';
|
|
9
|
+
import { Center } from 'react-layout-kit';
|
|
10
|
+
import ActionIcon from "../ActionIcon";
|
|
11
|
+
import { useStyles } from "./style";
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
var Burger = /*#__PURE__*/memo(function (_ref) {
|
|
15
|
+
var items = _ref.items,
|
|
16
|
+
openKeys = _ref.openKeys,
|
|
17
|
+
selectedKeys = _ref.selectedKeys,
|
|
18
|
+
opened = _ref.opened,
|
|
19
|
+
setOpened = _ref.setOpened,
|
|
20
|
+
className = _ref.className,
|
|
21
|
+
_ref$headerHeight = _ref.headerHeight,
|
|
22
|
+
headerHeight = _ref$headerHeight === void 0 ? 64 : _ref$headerHeight,
|
|
23
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
24
|
+
var _useStyles = useStyles(headerHeight),
|
|
25
|
+
cx = _useStyles.cx,
|
|
26
|
+
styles = _useStyles.styles;
|
|
27
|
+
return /*#__PURE__*/_jsxs(Center, _objectSpread(_objectSpread({
|
|
28
|
+
className: cx(styles.container, className),
|
|
29
|
+
onClick: function onClick() {
|
|
30
|
+
setOpened(!opened);
|
|
31
|
+
}
|
|
32
|
+
}, props), {}, {
|
|
33
|
+
children: [/*#__PURE__*/_jsx(ActionIcon, {
|
|
34
|
+
icon: opened ? X : MenuIcon,
|
|
35
|
+
size: "site"
|
|
36
|
+
}), /*#__PURE__*/_jsxs(Drawer, {
|
|
37
|
+
bodyStyle: {
|
|
38
|
+
padding: 0
|
|
39
|
+
},
|
|
40
|
+
className: styles.drawer,
|
|
41
|
+
closeIcon: undefined,
|
|
42
|
+
headerStyle: {
|
|
43
|
+
display: 'none'
|
|
44
|
+
},
|
|
45
|
+
open: opened,
|
|
46
|
+
placement: 'left',
|
|
47
|
+
rootClassName: styles.drawerRoot,
|
|
48
|
+
width: '100vw',
|
|
49
|
+
children: [/*#__PURE__*/_jsx(Menu, {
|
|
50
|
+
className: styles.menu,
|
|
51
|
+
items: items,
|
|
52
|
+
mode: 'inline',
|
|
53
|
+
openKeys: openKeys,
|
|
54
|
+
selectedKeys: selectedKeys
|
|
55
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
56
|
+
className: styles.fillRect
|
|
57
|
+
})]
|
|
58
|
+
})]
|
|
59
|
+
}));
|
|
60
|
+
});
|
|
61
|
+
export default Burger;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const useStyles: (props?: number | undefined) => import("antd-style").ReturnStyles<{
|
|
2
|
+
container: import("antd-style").SerializedStyles;
|
|
3
|
+
drawer: import("antd-style").SerializedStyles;
|
|
4
|
+
drawerRoot: import("antd-style").SerializedStyles;
|
|
5
|
+
fillRect: import("antd-style").SerializedStyles;
|
|
6
|
+
menu: import("antd-style").SerializedStyles;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
3
|
+
import { createStyles } from 'antd-style';
|
|
4
|
+
import { rgba } from 'polished';
|
|
5
|
+
export var useStyles = createStyles(function (_ref, headerHeight) {
|
|
6
|
+
var token = _ref.token,
|
|
7
|
+
css = _ref.css,
|
|
8
|
+
stylish = _ref.stylish;
|
|
9
|
+
return {
|
|
10
|
+
container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n width: ", "px;\n height: ", "px;\n border-radius: ", "px;\n "])), token.controlHeight, token.controlHeight, token.borderRadius),
|
|
11
|
+
drawer: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &.ant-drawer-content {\n background: transparent;\n }\n\n .ant-drawer-body {\n display: flex;\n flex-direction: column;\n }\n "]))),
|
|
12
|
+
drawerRoot: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n top: ", "px;\n\n :focus-visible {\n outline: none;\n }\n\n .ant-drawer {\n &-mask {\n ", ";\n background-color: ", ";\n }\n\n &-content-wrapper {\n box-shadow: none;\n }\n }\n "])), headerHeight + 1, stylish.blur, rgba(token.colorBgLayout, 0.5)),
|
|
13
|
+
fillRect: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n flex: 1;\n width: 100%;\n border-top: none;\n "]))),
|
|
14
|
+
menu: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background: transparent;\n border-inline-end: transparent !important;\n\n > .ant-menu-item-only-child,\n .ant-menu-submenu-title {\n width: 100%;\n margin: 0 !important;\n border-top: none;\n border-radius: 0;\n\n &:active {\n color: ", ";\n background-color: ", ";\n }\n }\n\n .ant-menu-item-only-child:first-child {\n border-top: none;\n }\n\n .ant-menu-submenu-title[aria-expanded='true'] {\n a {\n font-weight: 600;\n color: ", " !important;\n }\n }\n\n .ant-menu-item-group-title {\n padding-top: 4px;\n padding-bottom: 4px;\n\n font-size: 12px;\n font-weight: 500;\n text-overflow: ellipsis;\n text-transform: uppercase;\n white-space: nowrap;\n\n background: ", ";\n }\n\n .ant-menu-item {\n width: calc(100% - 16px) !important;\n margin: 8px !important;\n border-radius: ", "px;\n\n &:hover,\n &:active {\n color: ", " !important;\n background: ", " !important;\n }\n }\n\n .ant-menu-item-active {\n width: calc(100% - 16px) !important;\n margin: 8px !important;\n background: ", ";\n border-radius: ", "px;\n }\n\n .ant-menu-item-selected {\n font-weight: 600;\n color: ", ";\n background: ", ";\n\n &:hover,\n &:active {\n color: ", " !important;\n background: ", " !important;\n }\n }\n "])), token.colorText, token.colorFill, token.colorText, token.colorFillSecondary, token.borderRadius, token.colorText, token.colorFillSecondary, token.colorFillSecondary, token.borderRadius, token.colorBgLayout, token.colorText, token.colorBgLayout, token.colorText)
|
|
15
|
+
};
|
|
16
|
+
});
|
package/es/ColorScales/style.js
CHANGED
|
@@ -6,9 +6,10 @@ export var alphaBg = {
|
|
|
6
6
|
light: 'url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAFpJREFUWAntljEKADAIA23p6v//qQ+wfUEcCu1yriEgp0FHRJSJcnehmmWm1Dv/lO4HIg1AAAKjTqm03ea88zMCCEDgO4HV5bS757f+7wRoAAIQ4B9gByAAgQ3pfiDmXmAeEwAAAABJRU5ErkJggg==) 0% 0% / 26px'
|
|
7
7
|
};
|
|
8
8
|
export var useStyles = createStyles(function (_ref) {
|
|
9
|
-
var css = _ref.css
|
|
9
|
+
var css = _ref.css,
|
|
10
|
+
token = _ref.token;
|
|
10
11
|
return {
|
|
11
|
-
scaleBox: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n\n position: relative;\n\n width: 48px;\n height: 32px;\n\n background-position: 0 0, 0 8px, 8px -8px, -8px 0;\n background-size: 16px 16px;\n\n &:active {\n
|
|
12
|
+
scaleBox: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n\n position: relative;\n\n width: 48px;\n height: 32px;\n\n background-position: 0 0, 0 8px, 8px -8px, -8px 0;\n background-size: 16px 16px;\n\n transition: scale 400ms ", ";\n\n &:active {\n scale: 0.8;\n }\n "])), token.motionEaseOut),
|
|
12
13
|
scaleItem: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n\n width: 100%;\n height: 100%;\n "]))),
|
|
13
14
|
scaleRowTitle: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n width: 64px;\n height: 32px;\n "]))),
|
|
14
15
|
text: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n opacity: 0.5;\n "]))),
|
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;
|
package/es/Hero/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GradientButton, Icon } from "./..";
|
|
2
|
-
import { Button, ConfigProvider
|
|
2
|
+
import { Button, ConfigProvider } from 'antd';
|
|
3
3
|
import { useResponsive } from 'antd-style';
|
|
4
4
|
import * as LucideIcon from 'lucide-react';
|
|
5
5
|
import { memo, useCallback } from 'react';
|
|
@@ -16,10 +16,8 @@ var Hero = /*#__PURE__*/memo(function (_ref) {
|
|
|
16
16
|
var _useResponsive = useResponsive(),
|
|
17
17
|
mobile = _useResponsive.mobile;
|
|
18
18
|
var ButtonGroups = useCallback(function () {
|
|
19
|
-
return Boolean(actions === null || actions === void 0 ? void 0 : actions.length) && /*#__PURE__*/_jsx(
|
|
19
|
+
return Boolean(actions === null || actions === void 0 ? void 0 : actions.length) && /*#__PURE__*/_jsx("div", {
|
|
20
20
|
className: styles.actions,
|
|
21
|
-
direction: mobile ? 'vertical' : 'horizontal',
|
|
22
|
-
size: 24,
|
|
23
21
|
children: actions.map(function (_ref2, index) {
|
|
24
22
|
var text = _ref2.text,
|
|
25
23
|
link = _ref2.link,
|
|
@@ -33,12 +31,14 @@ var Hero = /*#__PURE__*/memo(function (_ref) {
|
|
|
33
31
|
rel: "noreferrer",
|
|
34
32
|
target: openExternal ? '_blank' : undefined,
|
|
35
33
|
children: type === 'primary' ? /*#__PURE__*/_jsx(GradientButton, {
|
|
34
|
+
block: mobile,
|
|
36
35
|
icon: ButtonIcon && /*#__PURE__*/_jsx(Icon, {
|
|
37
36
|
icon: ButtonIcon
|
|
38
37
|
}),
|
|
39
38
|
size: "large",
|
|
40
39
|
children: text
|
|
41
40
|
}, index) : /*#__PURE__*/_jsx(Button, {
|
|
41
|
+
block: mobile,
|
|
42
42
|
icon: ButtonIcon && /*#__PURE__*/_jsx(Icon, {
|
|
43
43
|
icon: ButtonIcon
|
|
44
44
|
}),
|
package/es/Hero/style.js
CHANGED
|
@@ -8,11 +8,7 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
8
8
|
token = _ref.token,
|
|
9
9
|
stylish = _ref.stylish;
|
|
10
10
|
return {
|
|
11
|
-
actions: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n margin-top: 24px;\n\n button {\n padding-inline: 32px !important;\n font-weight: 500;\n }\n\n ", "\n "])), responsive
|
|
12
|
-
mobile: {
|
|
13
|
-
marginTop: 24
|
|
14
|
-
}
|
|
15
|
-
})),
|
|
11
|
+
actions: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n gap: 24px;\n justify-content: center;\n margin-top: 24px;\n\n button {\n padding-inline: 32px !important;\n font-weight: 500;\n }\n\n ", " {\n flex-direction: column;\n gap: 16px;\n width: 100%;\n margin-top: 24px;\n\n button {\n width: 100%;\n }\n }\n "])), responsive.mobile),
|
|
16
12
|
canvas: cx(stylish.gradientAnimation, css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n pointer-events: none;\n\n position: absolute;\n z-index: 10;\n top: -250px;\n left: 50%;\n transform: translateX(-50%) scale(1.5);\n\n width: 600px;\n height: 400px;\n\n opacity: 0.2;\n filter: blur(100px);\n\n ", " {\n width: 200px;\n height: 300px;\n }\n "])), responsive.mobile)),
|
|
17
13
|
container: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n box-sizing: border-box;\n text-align: center;\n "]))),
|
|
18
14
|
desc: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-top: 0;\n font-size: ", "px;\n color: ", ";\n text-align: center;\n\n ", " {\n margin: 24px 16px;\n font-size: ", "px;\n }\n "])), token.fontSizeHeading3, token.colorTextSecondary, responsive.mobile, token.fontSizeHeading5),
|
package/es/Icon/style.js
CHANGED
|
@@ -3,7 +3,7 @@ var _templateObject, _templateObject2;
|
|
|
3
3
|
import { createStyles, keyframes } from 'antd-style';
|
|
4
4
|
export var useStyles = createStyles(function (_ref) {
|
|
5
5
|
var css = _ref.css;
|
|
6
|
-
var spin = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n
|
|
6
|
+
var spin = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n rotate: 0deg;\n }\n 100% {\n rotate: 360deg;\n }\n "])));
|
|
7
7
|
return {
|
|
8
8
|
spin: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n animation: ", " 1s linear infinite;\n "])), spin)
|
|
9
9
|
};
|
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", "className", "style"],
|
|
5
|
+
_excluded2 = ["children", "className"],
|
|
6
|
+
_excluded3 = ["headerHeight", "children", "className", "style"],
|
|
7
|
+
_excluded4 = ["headerHeight", "children", "className"],
|
|
8
|
+
_excluded5 = ["tocWidth", "style", "className", "children"],
|
|
9
|
+
_excluded6 = ["children", "className"];
|
|
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,115 @@ 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
|
+
className = _ref.className,
|
|
23
|
+
style = _ref.style,
|
|
24
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
25
|
var _useStyles = useStyles(headerHeight),
|
|
26
|
+
cx = _useStyles.cx,
|
|
21
27
|
styles = _useStyles.styles;
|
|
28
|
+
return /*#__PURE__*/_jsxs("header", _objectSpread(_objectSpread({
|
|
29
|
+
className: cx(styles.header, className),
|
|
30
|
+
style: _objectSpread({
|
|
31
|
+
height: headerHeight
|
|
32
|
+
}, style)
|
|
33
|
+
}, props), {}, {
|
|
34
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
35
|
+
className: styles.glass
|
|
36
|
+
}), children]
|
|
37
|
+
}));
|
|
38
|
+
});
|
|
39
|
+
export var LayoutMain = /*#__PURE__*/memo(function (_ref2) {
|
|
40
|
+
var children = _ref2.children,
|
|
41
|
+
className = _ref2.className,
|
|
42
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
43
|
+
var _useStyles2 = useStyles(),
|
|
44
|
+
cx = _useStyles2.cx,
|
|
45
|
+
styles = _useStyles2.styles;
|
|
46
|
+
return /*#__PURE__*/_jsx("main", _objectSpread(_objectSpread({
|
|
47
|
+
className: cx(styles.main, className)
|
|
48
|
+
}, props), {}, {
|
|
49
|
+
children: children
|
|
50
|
+
}));
|
|
51
|
+
});
|
|
52
|
+
export var LayoutSidebar = /*#__PURE__*/memo(function (_ref3) {
|
|
53
|
+
var headerHeight = _ref3.headerHeight,
|
|
54
|
+
children = _ref3.children,
|
|
55
|
+
className = _ref3.className,
|
|
56
|
+
style = _ref3.style,
|
|
57
|
+
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
58
|
+
var _useStyles3 = useStyles(headerHeight),
|
|
59
|
+
cx = _useStyles3.cx,
|
|
60
|
+
styles = _useStyles3.styles;
|
|
61
|
+
return /*#__PURE__*/_jsx("aside", _objectSpread(_objectSpread({
|
|
62
|
+
className: cx(styles.aside, className),
|
|
63
|
+
style: _objectSpread({
|
|
64
|
+
top: headerHeight
|
|
65
|
+
}, style)
|
|
66
|
+
}, props), {}, {
|
|
67
|
+
children: children
|
|
68
|
+
}));
|
|
69
|
+
});
|
|
70
|
+
export var LayoutSidebarInner = /*#__PURE__*/memo(function (_ref4) {
|
|
71
|
+
var headerHeight = _ref4.headerHeight,
|
|
72
|
+
children = _ref4.children,
|
|
73
|
+
className = _ref4.className,
|
|
74
|
+
props = _objectWithoutProperties(_ref4, _excluded4);
|
|
75
|
+
var _useStyles4 = useStyles(headerHeight),
|
|
76
|
+
cx = _useStyles4.cx,
|
|
77
|
+
styles = _useStyles4.styles;
|
|
78
|
+
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
|
|
79
|
+
className: cx(styles.asideInner, className)
|
|
80
|
+
}, props), {}, {
|
|
81
|
+
children: children
|
|
82
|
+
}));
|
|
83
|
+
});
|
|
84
|
+
export var LayoutToc = /*#__PURE__*/memo(function (_ref5) {
|
|
85
|
+
var tocWidth = _ref5.tocWidth,
|
|
86
|
+
style = _ref5.style,
|
|
87
|
+
className = _ref5.className,
|
|
88
|
+
children = _ref5.children,
|
|
89
|
+
props = _objectWithoutProperties(_ref5, _excluded5);
|
|
90
|
+
var _useStyles5 = useStyles(),
|
|
91
|
+
cx = _useStyles5.cx,
|
|
92
|
+
styles = _useStyles5.styles;
|
|
93
|
+
return /*#__PURE__*/_jsx("nav", _objectSpread(_objectSpread({
|
|
94
|
+
className: cx(styles.toc, className),
|
|
95
|
+
style: tocWidth ? _objectSpread({
|
|
96
|
+
width: tocWidth
|
|
97
|
+
}, style) : style
|
|
98
|
+
}, props), {}, {
|
|
99
|
+
children: children
|
|
100
|
+
}));
|
|
101
|
+
});
|
|
102
|
+
export var LayoutFooter = /*#__PURE__*/memo(function (_ref6) {
|
|
103
|
+
var children = _ref6.children,
|
|
104
|
+
className = _ref6.className,
|
|
105
|
+
props = _objectWithoutProperties(_ref6, _excluded6);
|
|
106
|
+
var _useStyles6 = useStyles(),
|
|
107
|
+
cx = _useStyles6.cx,
|
|
108
|
+
styles = _useStyles6.styles;
|
|
109
|
+
return /*#__PURE__*/_jsx("footer", _objectSpread(_objectSpread({
|
|
110
|
+
className: cx(styles.footer, className)
|
|
111
|
+
}, props), {}, {
|
|
112
|
+
children: children
|
|
113
|
+
}));
|
|
114
|
+
});
|
|
115
|
+
var Layout = /*#__PURE__*/memo(function (_ref7) {
|
|
116
|
+
var helmet = _ref7.helmet,
|
|
117
|
+
_ref7$headerHeight = _ref7.headerHeight,
|
|
118
|
+
headerHeight = _ref7$headerHeight === void 0 ? 64 : _ref7$headerHeight,
|
|
119
|
+
header = _ref7.header,
|
|
120
|
+
footer = _ref7.footer,
|
|
121
|
+
sidebar = _ref7.sidebar,
|
|
122
|
+
asideWidth = _ref7.asideWidth,
|
|
123
|
+
toc = _ref7.toc,
|
|
124
|
+
children = _ref7.children,
|
|
125
|
+
tocWidth = _ref7.tocWidth;
|
|
126
|
+
var _useStyles7 = useStyles(headerHeight),
|
|
127
|
+
styles = _useStyles7.styles;
|
|
22
128
|
var _useResponsive = useResponsive(),
|
|
23
129
|
mobile = _useResponsive.mobile,
|
|
24
130
|
laptop = _useResponsive.laptop;
|
|
@@ -30,50 +136,36 @@ var Layout = /*#__PURE__*/memo(function (_ref) {
|
|
|
30
136
|
setExpand(Boolean(laptop));
|
|
31
137
|
}, [laptop]);
|
|
32
138
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
33
|
-
children: [helmet, header && /*#__PURE__*/_jsxs(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
height: headerHeight
|
|
37
|
-
},
|
|
38
|
-
children: [/*#__PURE__*/_jsx("div", {
|
|
39
|
-
className: styles.glass
|
|
40
|
-
}), header, mobile && toc && /*#__PURE__*/_jsx("nav", {
|
|
41
|
-
className: styles.toc,
|
|
139
|
+
children: [helmet, header && /*#__PURE__*/_jsxs(LayoutHeader, {
|
|
140
|
+
headerHeight: headerHeight,
|
|
141
|
+
children: [header, mobile && toc && /*#__PURE__*/_jsx(LayoutToc, {
|
|
42
142
|
children: toc
|
|
43
143
|
})]
|
|
44
|
-
}), /*#__PURE__*/_jsxs(
|
|
45
|
-
className: styles.main,
|
|
144
|
+
}), /*#__PURE__*/_jsxs(LayoutMain, {
|
|
46
145
|
children: [!mobile && !sidebar && /*#__PURE__*/_jsx("nav", {
|
|
47
146
|
style: {
|
|
48
147
|
width: tocWidth
|
|
49
148
|
}
|
|
50
|
-
}), !mobile && sidebar && /*#__PURE__*/_jsx(
|
|
51
|
-
|
|
52
|
-
style: {
|
|
53
|
-
top: headerHeight
|
|
54
|
-
},
|
|
149
|
+
}), !mobile && sidebar && /*#__PURE__*/_jsx(LayoutSidebar, {
|
|
150
|
+
headerHeight: headerHeight,
|
|
55
151
|
children: /*#__PURE__*/_jsx(DraggablePanel, {
|
|
56
152
|
expand: expand,
|
|
57
153
|
maxWidth: asideWidth,
|
|
58
154
|
onExpandChange: setExpand,
|
|
59
155
|
placement: "left",
|
|
60
|
-
children: /*#__PURE__*/_jsx(
|
|
61
|
-
|
|
156
|
+
children: /*#__PURE__*/_jsx(LayoutSidebarInner, {
|
|
157
|
+
headerHeight: headerHeight,
|
|
62
158
|
children: sidebar
|
|
63
159
|
})
|
|
64
160
|
})
|
|
65
161
|
}), /*#__PURE__*/_jsx("section", {
|
|
66
162
|
className: styles.content,
|
|
67
163
|
children: children
|
|
68
|
-
}), !mobile && toc && /*#__PURE__*/_jsx(
|
|
69
|
-
|
|
70
|
-
style: {
|
|
71
|
-
width: tocWidth
|
|
72
|
-
},
|
|
164
|
+
}), !mobile && toc && /*#__PURE__*/_jsx(LayoutToc, {
|
|
165
|
+
tocWidth: tocWidth,
|
|
73
166
|
children: toc
|
|
74
167
|
})]
|
|
75
|
-
}), footer && /*#__PURE__*/_jsx(
|
|
76
|
-
className: styles.footer,
|
|
168
|
+
}), footer && /*#__PURE__*/_jsx(LayoutFooter, {
|
|
77
169
|
children: footer
|
|
78
170
|
})]
|
|
79
171
|
});
|
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/Swatches/index.d.ts
CHANGED
|
@@ -14,6 +14,11 @@ export interface SwatchesProps {
|
|
|
14
14
|
* @default undefined
|
|
15
15
|
*/
|
|
16
16
|
onSelect?: (c?: string | undefined) => void;
|
|
17
|
+
/**
|
|
18
|
+
* @description The size of swatch
|
|
19
|
+
* @default 24
|
|
20
|
+
*/
|
|
21
|
+
size?: number;
|
|
17
22
|
}
|
|
18
23
|
declare const Swatches: import("react").NamedExoticComponent<SwatchesProps>;
|
|
19
24
|
export default Swatches;
|
package/es/Swatches/index.js
CHANGED
|
@@ -1,41 +1,39 @@
|
|
|
1
1
|
import { useTheme } from 'antd-style';
|
|
2
2
|
import { memo } from 'react';
|
|
3
3
|
import { Flexbox } from 'react-layout-kit';
|
|
4
|
+
import { useStyles } from "./style";
|
|
4
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
6
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
7
|
var Swatches = /*#__PURE__*/memo(function (_ref) {
|
|
7
8
|
var colors = _ref.colors,
|
|
8
9
|
activeColor = _ref.activeColor,
|
|
9
|
-
onSelect = _ref.onSelect
|
|
10
|
+
onSelect = _ref.onSelect,
|
|
11
|
+
_ref$size = _ref.size,
|
|
12
|
+
size = _ref$size === void 0 ? 24 : _ref$size;
|
|
10
13
|
var theme = useTheme();
|
|
14
|
+
var _useStyles = useStyles(size),
|
|
15
|
+
cx = _useStyles.cx,
|
|
16
|
+
styles = _useStyles.styles;
|
|
11
17
|
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
12
18
|
gap: 8,
|
|
13
19
|
horizontal: true,
|
|
14
20
|
children: [/*#__PURE__*/_jsx(Flexbox, {
|
|
21
|
+
className: cx(styles.container, !activeColor && styles.active),
|
|
15
22
|
onClick: function onClick() {
|
|
16
23
|
onSelect === null || onSelect === void 0 ? void 0 : onSelect();
|
|
17
24
|
},
|
|
18
25
|
style: {
|
|
19
|
-
background: theme.colorBgContainer
|
|
20
|
-
borderRadius: '50%',
|
|
21
|
-
boxShadow: "inset 0 0 0px 2px ".concat(activeColor ? 'rgba(0,0,0,0.1)' : theme.colorPrimary),
|
|
22
|
-
cursor: 'pointer',
|
|
23
|
-
height: 24,
|
|
24
|
-
width: 24
|
|
26
|
+
background: theme.colorBgContainer
|
|
25
27
|
}
|
|
26
28
|
}), colors.map(function (c) {
|
|
27
|
-
var
|
|
29
|
+
var isActive = c === activeColor;
|
|
28
30
|
return /*#__PURE__*/_jsx(Flexbox, {
|
|
31
|
+
className: cx(styles.container, isActive && styles.active),
|
|
29
32
|
onClick: function onClick() {
|
|
30
33
|
onSelect === null || onSelect === void 0 ? void 0 : onSelect(c);
|
|
31
34
|
},
|
|
32
35
|
style: {
|
|
33
|
-
background: c
|
|
34
|
-
borderRadius: '50%',
|
|
35
|
-
boxShadow: "inset 0 0 0px 2px ".concat(borderColor),
|
|
36
|
-
cursor: 'pointer',
|
|
37
|
-
height: 24,
|
|
38
|
-
width: 24
|
|
36
|
+
background: c
|
|
39
37
|
}
|
|
40
38
|
}, c);
|
|
41
39
|
})]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject, _templateObject2;
|
|
3
|
+
import { createStyles } from 'antd-style';
|
|
4
|
+
export var useStyles = createStyles(function (_ref, size) {
|
|
5
|
+
var css = _ref.css,
|
|
6
|
+
token = _ref.token;
|
|
7
|
+
return {
|
|
8
|
+
active: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-shadow: inset 0 0 0 2px ", ";\n "])), token.colorPrimary),
|
|
9
|
+
container: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n cursor: pointer;\n\n width: ", "px;\n height: ", "px;\n\n background: ", ";\n border-radius: 50%;\n box-shadow: inset 0 0 0 1px ", ";\n\n transition: scale 400ms ", ";\n\n &:active {\n scale: 0.8;\n }\n "])), size, size, token.colorBgContainer, token.colorFill, token.motionEaseOut)
|
|
10
|
+
};
|
|
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 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
|
|
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 * {\n\t box-sizing: border-box;\n\t vertical-align: baseline;\n }\n\n @media only screen and (min-width: 574px) {\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) {
|
package/es/Toc/style.js
CHANGED
|
@@ -14,7 +14,7 @@ export var useStyles = createStyles(function (_ref, _ref2) {
|
|
|
14
14
|
return {
|
|
15
15
|
anchor: cx(stylish.blur, css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow-x: hidden;\n overflow-y: auto;\n max-height: 60vh !important;\n "])))),
|
|
16
16
|
container: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: sticky;\n top: ", "px;\n\n overscroll-behavior: contain;\n grid-area: toc;\n\n width: ", "px;\n margin-inline-end: 24px;\n\n border-radius: 3px;\n\n -webkit-overflow-scrolling: touch;\n\n ", " {\n position: relative;\n left: 0;\n width: 100%;\n margin-top: 0;\n }\n\n > h4 {\n margin: 0 0 8px;\n font-size: 12px;\n line-height: 1;\n color: ", ";\n }\n "])), headerHeight + 64, tocWidth, responsive.mobile, token.colorTextDescription),
|
|
17
|
-
expand: cx(stylish.blur, css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 100%;\n\n background-color: ", ";\n border-bottom: 1px solid ", ";\n border-radius: 0;\n box-shadow: ", ";\n\n .ant-collapse-content {\n overflow: auto;\n }\n\n .ant-collapse-header {\n z-index: 10;\n padding: 8px 16px !important;\n
|
|
17
|
+
expand: cx(stylish.blur, css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 100%;\n\n background-color: ", ";\n border-bottom: 1px solid ", ";\n border-radius: 0;\n box-shadow: ", ";\n\n .ant-collapse-content {\n overflow: auto;\n }\n\n .ant-collapse-header {\n z-index: 10;\n padding: 8px 16px !important;\n }\n "])), rgba(token.colorBgLayout, 0.5), token.colorSplit, token.boxShadowSecondary)),
|
|
18
18
|
mobileCtn: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n height: ", "px;\n\n .ant-collapse-expand-icon {\n color: ", ";\n }\n "])), fixHeight, token.colorTextQuaternary)
|
|
19
19
|
};
|
|
20
20
|
});
|
package/es/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as ActionIcon, type ActionIconProps, type ActionIconSize } from './ActionIcon';
|
|
2
2
|
export { default as ActionIconGroup, type ActionIconGroupProps } from './ActionIconGroup';
|
|
3
3
|
export { default as Avatar, type AvatarProps } from './Avatar';
|
|
4
|
+
export { default as Burger, type BurgerProps } from './Burger';
|
|
4
5
|
export type { ChatMessage, MessageRoleType } from './Chat';
|
|
5
6
|
export { default as ChatInputArea, type ChatInputAreaProps } from './ChatInputArea';
|
|
6
7
|
export { default as ChatItem, type ChatItemProps } from './ChatItem';
|
|
@@ -22,7 +23,7 @@ export { default as Hero, type HeroAction, type HeroProps } from './Hero';
|
|
|
22
23
|
export { default as Highlighter, type HighlighterProps, SyntaxHighlighter, type SyntaxHighlighterProps, } from './Highlighter';
|
|
23
24
|
export { default as Icon, type IconProps, type IconSize } from './Icon';
|
|
24
25
|
export { Input, type InputProps, TextArea, type TextAreaProps } from './Input';
|
|
25
|
-
export { default as Layout, type LayoutProps } from './Layout';
|
|
26
|
+
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
27
|
export { default as List } from './List';
|
|
27
28
|
export { default as Logo, type LogoProps } from './Logo';
|
|
28
29
|
export { default as Markdown, type MarkdownProps } from './Markdown';
|
|
@@ -41,5 +42,4 @@ export { default as ThemeSwitch, type ThemeSwitchProps } from './ThemeSwitch';
|
|
|
41
42
|
export { default as Toc, type TocProps } from './Toc';
|
|
42
43
|
export { default as TokenTag, type TokenTagProps } from './TokenTag';
|
|
43
44
|
export { default as Tooltip, type TooltipProps } from './Tooltip';
|
|
44
|
-
export
|
|
45
|
-
export { type LobeCustomToken } from './types/customToken';
|
|
45
|
+
export type * from './types';
|
package/es/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as ActionIcon } from "./ActionIcon";
|
|
2
2
|
export { default as ActionIconGroup } from "./ActionIconGroup";
|
|
3
3
|
export { default as Avatar } from "./Avatar";
|
|
4
|
+
export { default as Burger } from "./Burger";
|
|
4
5
|
export { default as ChatInputArea } from "./ChatInputArea";
|
|
5
6
|
export { default as ChatItem } from "./ChatItem";
|
|
6
7
|
export { default as ChatList } from "./ChatList";
|
|
@@ -21,7 +22,7 @@ export { default as Hero } from "./Hero";
|
|
|
21
22
|
export { default as Highlighter, SyntaxHighlighter } from "./Highlighter";
|
|
22
23
|
export { default as Icon } from "./Icon";
|
|
23
24
|
export { Input, TextArea } from "./Input";
|
|
24
|
-
export { default as Layout } from "./Layout";
|
|
25
|
+
export { default as Layout, LayoutFooter, LayoutHeader, LayoutMain, LayoutSidebar, LayoutSidebarInner, LayoutToc } from "./Layout";
|
|
25
26
|
export { default as List } from "./List";
|
|
26
27
|
export { default as Logo } from "./Logo";
|
|
27
28
|
export { default as Markdown } from "./Markdown";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export interface LobeCustomStylish {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
blur: string;
|
|
3
|
+
bottomScrollbar: string;
|
|
4
|
+
gradientAnimation: string;
|
|
5
|
+
markdown: string;
|
|
6
|
+
noScrollbar: string;
|
|
7
|
+
resetLinkColor: string;
|
|
8
8
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,48 +1,17 @@
|
|
|
1
|
-
const PresetColors
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
'green',
|
|
9
|
-
'cyan',
|
|
10
|
-
'blue',
|
|
11
|
-
'geekblue',
|
|
12
|
-
'purple',
|
|
13
|
-
'magenta',
|
|
14
|
-
'gray',
|
|
15
|
-
] as const;
|
|
16
|
-
|
|
17
|
-
export type PresetColorKey = (typeof PresetColors)[number];
|
|
18
|
-
|
|
19
|
-
export type PresetColorType = Record<PresetColorKey, string>;
|
|
20
|
-
|
|
21
|
-
type ColorPaletteKeyIndex = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
|
|
22
|
-
|
|
23
|
-
type ColorTokenKey =
|
|
24
|
-
| 'Bg'
|
|
25
|
-
| 'BgHover'
|
|
26
|
-
| 'Border'
|
|
27
|
-
| 'BorderSecondary'
|
|
28
|
-
| 'BorderHover'
|
|
29
|
-
| 'Hover'
|
|
30
|
-
| ''
|
|
31
|
-
| 'Active'
|
|
32
|
-
| 'TextHover'
|
|
33
|
-
| 'Text'
|
|
34
|
-
| 'TextActive';
|
|
35
|
-
|
|
36
|
-
export type ColorToken = {
|
|
37
|
-
[key in `${keyof PresetColorType}${ColorTokenKey}`]: string;
|
|
1
|
+
declare const PresetColors: readonly ["red", "volcano", "orange", "gold", "yellow", "lime", "green", "cyan", "blue", "geekblue", "purple", "magenta", "gray"];
|
|
2
|
+
export declare type PresetColorKey = (typeof PresetColors)[number];
|
|
3
|
+
export declare type PresetColorType = Record<PresetColorKey, string>;
|
|
4
|
+
declare type ColorPaletteKeyIndex = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
|
|
5
|
+
declare type ColorTokenKey = 'Bg' | 'BgHover' | 'Border' | 'BorderSecondary' | 'BorderHover' | 'Hover' | '' | 'Active' | 'TextHover' | 'Text' | 'TextActive';
|
|
6
|
+
export declare type ColorToken = {
|
|
7
|
+
[key in `${keyof PresetColorType}${ColorTokenKey}`]: string;
|
|
38
8
|
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
[key in `${keyof PresetColorType}${ColorPaletteKeyIndex}`]: string;
|
|
9
|
+
export declare type ColorPalettes = {
|
|
10
|
+
[key in `${keyof PresetColorType}${ColorPaletteKeyIndex}`]: string;
|
|
42
11
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
[key in `${keyof PresetColorType}${ColorPaletteKeyIndex}A`]: string;
|
|
12
|
+
export declare type ColorPalettesAlpha = {
|
|
13
|
+
[key in `${keyof PresetColorType}${ColorPaletteKeyIndex}A`]: string;
|
|
46
14
|
};
|
|
47
|
-
|
|
48
|
-
|
|
15
|
+
export interface LobeCustomToken extends ColorToken, ColorPalettes, ColorPalettesAlpha {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
package/es/types/index.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { type HTMLAttributes } from 'react';
|
|
2
|
+
export * from './chatMessage';
|
|
3
|
+
export * from './customStylish';
|
|
4
|
+
export * from './customToken';
|
|
5
|
+
export * from './llm';
|
|
6
|
+
export * from './meta';
|
|
2
7
|
export declare type DivProps = HTMLAttributes<HTMLDivElement>;
|
|
3
8
|
export declare type SvgProps = HTMLAttributes<SVGSVGElement>;
|
|
4
9
|
export declare type ImgProps = HTMLAttributes<HTMLImageElement>;
|
package/es/types/index.js
CHANGED