@lobehub/ui 1.158.1 → 1.160.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/A/index.js +2 -2
- package/es/ActionIcon/index.js +15 -11
- package/es/ActionIconGroup/index.js +47 -45
- package/es/Alert/index.js +50 -43
- package/es/Avatar/index.js +12 -10
- package/es/Burger/index.js +35 -30
- package/es/CodeEditor/index.js +43 -38
- package/es/Collapse/index.js +3 -3
- package/es/ColorScales/ScaleRow.js +43 -39
- package/es/ColorScales/index.js +59 -57
- package/es/ConfigProvider/index.js +5 -3
- package/es/ContextMenu/index.js +3 -2
- package/es/CopyButton/index.js +4 -3
- package/es/DraggablePanel/components/DraggablePanelBody.js +3 -2
- package/es/DraggablePanel/components/DraggablePanelContainer.js +3 -2
- package/es/DraggablePanel/components/DraggablePanelFooter.js +3 -2
- package/es/DraggablePanel/components/DraggablePanelHeader.js +9 -5
- package/es/DraggablePanel/index.js +32 -25
- package/es/EditableText/index.js +16 -13
- package/es/EmojiPicker/AvatarUploader.js +71 -60
- package/es/EmojiPicker/index.js +110 -101
- package/es/EmptyCard/index.js +31 -23
- package/es/FileTypeIcon/index.js +55 -44
- package/es/FluentEmoji/index.js +6 -4
- package/es/Footer/index.js +10 -8
- package/es/Form/components/FormDivider.js +2 -2
- package/es/Form/components/FormFlatGroup.js +9 -4
- package/es/Form/components/FormFooter.js +6 -3
- package/es/Form/components/FormGroup.js +21 -15
- package/es/Form/components/FormItem.js +17 -10
- package/es/Form/components/FormTitle.js +23 -15
- package/es/Form/index.js +30 -26
- package/es/FormModal/index.js +34 -30
- package/es/Grid/index.js +6 -3
- package/es/Header/index.js +65 -49
- package/es/Highlighter/FullFeatured.js +51 -41
- package/es/Highlighter/SyntaxHighlighter/index.js +30 -19
- package/es/Highlighter/index.js +29 -19
- package/es/Icon/icons/DiscordIcon.js +3 -2
- package/es/Icon/index.js +16 -13
- package/es/Image/ImageGallery.js +5 -3
- package/es/Image/Preview.js +5 -3
- package/es/Image/index.js +38 -34
- package/es/Image/usePreview.js +37 -33
- package/es/Img/index.js +2 -2
- package/es/Input/index.js +3 -3
- package/es/Layout/index.js +63 -35
- package/es/List/ListItem/index.js +67 -53
- package/es/Markdown/CodeBlock.js +16 -10
- package/es/Markdown/Typography.js +6 -3
- package/es/Markdown/index.js +22 -18
- package/es/MaterialFileTypeIcon/index.js +20 -17
- package/es/MaterialFileTypeIcon/utils.d.ts +2 -2
- package/es/Mermaid/FullFeatured.js +45 -35
- package/es/Mermaid/index.js +26 -17
- package/es/Mermaid/useMermaid.d.ts +1 -2
- package/es/Mermaid/useMermaid.js +5 -3
- package/es/Modal/index.js +60 -48
- package/es/SearchBar/index.js +51 -47
- package/es/SelectWithImg/index.js +40 -34
- package/es/SideNav/index.js +22 -15
- package/es/SliderWithInput/index.js +38 -35
- package/es/Snippet/index.js +15 -10
- package/es/SortableList/DragHandle.js +3 -3
- package/es/SortableList/SortableItem.js +19 -16
- package/es/SortableList/SortableOverlay.js +5 -3
- package/es/SortableList/index.js +23 -15
- package/es/Swatches/index.js +20 -18
- package/es/TabsNav/index.js +3 -2
- package/es/Tag/index.js +12 -7
- package/es/ThemeProvider/Meta.js +58 -53
- package/es/ThemeProvider/index.js +23 -17
- package/es/ThemeSwitch/index.js +19 -15
- package/es/Toc/TocMobile.js +52 -47
- package/es/Toc/index.js +13 -8
- package/es/Tooltip/index.js +3 -2
- package/es/Video/index.js +47 -41
- package/es/awesome/AuroraBackground/index.js +18 -11
- package/es/awesome/Features/Item.js +45 -37
- package/es/awesome/Features/index.js +4 -5
- package/es/awesome/GaussianBackground/index.js +13 -8
- package/es/awesome/Giscus/index.js +15 -13
- package/es/awesome/GradientButton/index.js +9 -5
- package/es/awesome/GridBackground/Grid.js +61 -49
- package/es/awesome/GridBackground/GridShowcase.js +28 -24
- package/es/awesome/GridBackground/index.js +33 -27
- package/es/awesome/Hero/index.js +74 -63
- package/es/awesome/Spline/ParentSize.js +8 -7
- package/es/awesome/Spline/index.js +13 -10
- package/es/awesome/Spotlight/index.js +3 -2
- package/es/awesome/SpotlightCard/SpotlightCardItem.js +8 -5
- package/es/awesome/SpotlightCard/index.js +12 -9
- package/es/brand/BrandLoading/index.js +3 -2
- package/es/brand/LobeChat/index.js +38 -29
- package/es/brand/LobeChatText/index.js +13 -8
- package/es/brand/LobeHub/index.js +38 -29
- package/es/brand/LobeHubText/index.js +9 -4
- package/es/brand/Logo3d/index.js +3 -2
- package/es/brand/LogoFlat/index.js +49 -44
- package/es/brand/LogoMono/index.js +53 -48
- package/es/brand/LogoThree/Loading.js +11 -9
- package/es/brand/LogoThree/LogoSpline.js +12 -10
- package/es/brand/LogoThree/index.js +25 -23
- package/es/brand/components/Divider.js +6 -4
- package/es/chat/BackBottom/index.js +6 -4
- package/es/chat/ChatHeader/ChatHeaderTitle.js +31 -22
- package/es/chat/ChatHeader/index.js +42 -35
- package/es/chat/ChatInputArea/ChatInputActionBar.js +21 -16
- package/es/chat/ChatInputArea/ChatInputArea.js +23 -19
- package/es/chat/ChatInputArea/ChatInputAreaInner.js +3 -2
- package/es/chat/ChatInputArea/SendButton.js +51 -36
- package/es/chat/ChatItem/components/Actions.js +5 -3
- package/es/chat/ChatItem/components/Avatar.js +21 -17
- package/es/chat/ChatItem/components/BorderSpacing.js +2 -1
- package/es/chat/ChatItem/components/ErrorContent.js +11 -9
- package/es/chat/ChatItem/components/Loading.js +12 -10
- package/es/chat/ChatItem/components/MessageContent.js +10 -6
- package/es/chat/ChatItem/components/Title.js +8 -3
- package/es/chat/ChatItem/index.js +53 -47
- package/es/chat/ChatList/ActionsBar.js +3 -2
- package/es/chat/ChatList/HistoryDivider.js +11 -6
- package/es/chat/ChatList/Item.js +12 -14
- package/es/chat/ChatList/index.js +29 -25
- package/es/chat/EditableMessage/index.js +32 -26
- package/es/chat/EditableMessageList/index.js +76 -72
- package/es/chat/MessageInput/index.js +43 -35
- package/es/chat/MessageModal/index.js +51 -41
- package/es/chat/TokenTag/index.js +11 -7
- package/es/components/ControlInput.js +22 -18
- package/es/hooks/useHighlight.d.ts +1 -1
- package/es/mdx/Callout/index.js +19 -13
- package/es/mdx/Cards/Card.js +59 -46
- package/es/mdx/Cards/index.js +6 -3
- package/es/mdx/FileTree/File.js +11 -5
- package/es/mdx/FileTree/Folder.js +22 -13
- package/es/mdx/FileTree/index.js +6 -3
- package/es/mdx/Mdx/index.js +9 -7
- package/es/mdx/Steps/index.js +6 -3
- package/es/mdx/Tabs/Tab.js +8 -3
- package/es/mdx/Tabs/index.js +21 -17
- package/es/mdx/mdxComponents/CodeBlock.js +14 -9
- package/es/mdx/mdxComponents/Image.js +2 -2
- package/es/mdx/mdxComponents/Link.js +3 -2
- package/es/mdx/mdxComponents/Pre.js +14 -7
- package/es/mdx/mdxComponents/Video.js +2 -2
- package/es/mobile/MobileChatInputArea/SendButton.js +4 -3
- package/es/mobile/MobileChatInputArea/index.js +79 -69
- package/es/mobile/MobileNavBar/MobileNavBarTitle.js +37 -26
- package/es/mobile/MobileNavBar/index.js +48 -41
- package/es/mobile/MobileSafeArea/index.js +3 -2
- package/es/mobile/MobileTabBar/index.js +35 -29
- package/es/storybook/StoryBook/index.js +26 -19
- package/package.json +1 -90
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
5
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
5
6
|
var _excluded = ["children"];
|
|
@@ -7,6 +8,8 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
7
8
|
import { createStyles, keyframes } from 'antd-style';
|
|
8
9
|
import { memo } from 'react';
|
|
9
10
|
import { Flexbox } from 'react-layout-kit';
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
13
|
var useStyles = createStyles(function (_ref) {
|
|
11
14
|
var isDarkMode = _ref.isDarkMode,
|
|
12
15
|
css = _ref.css,
|
|
@@ -25,16 +28,20 @@ var AuroraBackground = /*#__PURE__*/memo(function (_ref2) {
|
|
|
25
28
|
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
26
29
|
var _useStyles = useStyles(),
|
|
27
30
|
styles = _useStyles.styles;
|
|
28
|
-
return /*#__PURE__*/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({}, rest), {}, {
|
|
32
|
+
children: [/*#__PURE__*/_jsx(Flexbox, {
|
|
33
|
+
className: styles.wrapper,
|
|
34
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
35
|
+
className: styles.bg
|
|
36
|
+
})
|
|
37
|
+
}), /*#__PURE__*/_jsx(Flexbox, {
|
|
38
|
+
flex: 1,
|
|
39
|
+
style: {
|
|
40
|
+
zIndex: 1
|
|
41
|
+
},
|
|
42
|
+
width: '100%',
|
|
43
|
+
children: children
|
|
44
|
+
})]
|
|
45
|
+
}));
|
|
39
46
|
});
|
|
40
47
|
export default AuroraBackground;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
3
|
var _excluded = ["style", "className", "row", "column", "description", "image", "title", "link", "icon", "imageStyle", "openExternal"];
|
|
@@ -10,21 +9,23 @@ import Img from "../../Img";
|
|
|
10
9
|
import { useStyles } from "./style";
|
|
11
10
|
|
|
12
11
|
// @ts-ignore
|
|
13
|
-
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
var Image = /*#__PURE__*/memo(function (_ref) {
|
|
15
15
|
var image = _ref.image,
|
|
16
16
|
className = _ref.className,
|
|
17
17
|
title = _ref.title,
|
|
18
18
|
style = _ref.style;
|
|
19
|
-
return image.startsWith('http') ? /*#__PURE__*/
|
|
19
|
+
return image.startsWith('http') ? /*#__PURE__*/_jsx(Img, {
|
|
20
20
|
alt: title,
|
|
21
21
|
className: className,
|
|
22
22
|
src: image,
|
|
23
23
|
style: style
|
|
24
|
-
}) : /*#__PURE__*/
|
|
24
|
+
}) : /*#__PURE__*/_jsx(Center, {
|
|
25
25
|
className: className,
|
|
26
|
-
style: style
|
|
27
|
-
|
|
26
|
+
style: style,
|
|
27
|
+
children: image
|
|
28
|
+
});
|
|
28
29
|
});
|
|
29
30
|
var Item = /*#__PURE__*/memo(function (_ref2) {
|
|
30
31
|
var style = _ref2.style,
|
|
@@ -46,41 +47,48 @@ var Item = /*#__PURE__*/memo(function (_ref2) {
|
|
|
46
47
|
}),
|
|
47
48
|
styles = _useStyles.styles,
|
|
48
49
|
cx = _useStyles.cx;
|
|
49
|
-
return /*#__PURE__*/
|
|
50
|
+
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
|
|
50
51
|
className: cx(styles.container, className),
|
|
51
52
|
style: _objectSpread({
|
|
52
53
|
gridColumn: "span ".concat(column || 1),
|
|
53
54
|
gridRow: "span ".concat(rowNumber)
|
|
54
55
|
}, style)
|
|
55
|
-
}, rest),
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
56
|
+
}, rest), {}, {
|
|
57
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
58
|
+
className: styles.cell,
|
|
59
|
+
children: [image || icon && /*#__PURE__*/_jsxs(Center, {
|
|
60
|
+
className: styles.imgContainer,
|
|
61
|
+
style: imageStyle,
|
|
62
|
+
children: [icon && /*#__PURE__*/_jsx(Icon, {
|
|
63
|
+
className: styles.img,
|
|
64
|
+
icon: icon
|
|
65
|
+
}), image && /*#__PURE__*/_jsx(Image, {
|
|
66
|
+
className: styles.img,
|
|
67
|
+
image: image,
|
|
68
|
+
title: title
|
|
69
|
+
})]
|
|
70
|
+
}), title && /*#__PURE__*/_jsx(Flexbox, {
|
|
71
|
+
align: 'center',
|
|
72
|
+
as: 'h3',
|
|
73
|
+
className: styles.title,
|
|
74
|
+
gap: 8,
|
|
75
|
+
horizontal: true,
|
|
76
|
+
children: title
|
|
77
|
+
}), description && /*#__PURE__*/_jsx("p", {
|
|
78
|
+
className: styles.desc,
|
|
79
|
+
dangerouslySetInnerHTML: {
|
|
80
|
+
__html: description
|
|
81
|
+
}
|
|
82
|
+
}), link && /*#__PURE__*/_jsx("div", {
|
|
83
|
+
className: styles.link,
|
|
84
|
+
children: /*#__PURE__*/_jsx(A, {
|
|
85
|
+
href: link,
|
|
86
|
+
rel: "noreferrer",
|
|
87
|
+
target: openExternal ? '_blank' : undefined,
|
|
88
|
+
children: "Read More"
|
|
89
|
+
})
|
|
90
|
+
})]
|
|
91
|
+
})
|
|
92
|
+
}));
|
|
85
93
|
});
|
|
86
94
|
export default Item;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
5
|
var _excluded = ["items", "className", "itemClassName", "itemStyle", "maxWidth", "style"];
|
|
7
6
|
import { memo } from 'react';
|
|
8
7
|
import SpotlightCard from "../SpotlightCard";
|
|
9
8
|
import { default as Item } from "./Item";
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
var Features = /*#__PURE__*/memo(function (_ref) {
|
|
11
11
|
var items = _ref.items,
|
|
12
12
|
className = _ref.className,
|
|
@@ -17,15 +17,14 @@ var Features = /*#__PURE__*/memo(function (_ref) {
|
|
|
17
17
|
style = _ref.style,
|
|
18
18
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
19
19
|
if (!(items !== null && items !== void 0 && items.length)) return;
|
|
20
|
-
return /*#__PURE__*/
|
|
20
|
+
return /*#__PURE__*/_jsx(SpotlightCard, _objectSpread({
|
|
21
21
|
className: className,
|
|
22
22
|
items: items,
|
|
23
23
|
renderItem: function renderItem(item) {
|
|
24
|
-
return /*#__PURE__*/
|
|
24
|
+
return /*#__PURE__*/_jsx(Item, _objectSpread({
|
|
25
25
|
className: itemClassName,
|
|
26
|
-
key: item.title,
|
|
27
26
|
style: itemStyle
|
|
28
|
-
}, item));
|
|
27
|
+
}, item), item.title);
|
|
29
28
|
},
|
|
30
29
|
style: _objectSpread({
|
|
31
30
|
maxWidth: maxWidth
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
5
|
var _excluded = ["layers", "options", "className", "children", "classNames", "style"];
|
|
6
6
|
import { memo, useEffect, useRef } from 'react';
|
|
7
7
|
import { Flexbox } from 'react-layout-kit';
|
|
8
8
|
import { useStyles } from "./style";
|
|
9
9
|
import { useGaussianBackground } from "./useGaussianBackground";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
12
|
var DEFAULT_OPTIONS = {
|
|
11
13
|
blurRadius: 16,
|
|
12
14
|
fpsCap: 60,
|
|
@@ -30,14 +32,17 @@ var GaussianBackground = /*#__PURE__*/memo(function (_ref) {
|
|
|
30
32
|
if (!run) return;
|
|
31
33
|
run(layers, options);
|
|
32
34
|
}, [run, options, layers]);
|
|
33
|
-
return /*#__PURE__*/
|
|
35
|
+
return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
|
|
34
36
|
className: cx(styles.container, className),
|
|
35
37
|
style: style
|
|
36
|
-
}, rest),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
}, rest), {}, {
|
|
39
|
+
children: [/*#__PURE__*/_jsx("canvas", {
|
|
40
|
+
className: cx(styles.canvas, classNames === null || classNames === void 0 ? void 0 : classNames.canvas),
|
|
41
|
+
ref: ref
|
|
42
|
+
}), /*#__PURE__*/_jsx(Flexbox, {
|
|
43
|
+
className: cx(styles.content, classNames === null || classNames === void 0 ? void 0 : classNames.content),
|
|
44
|
+
children: children
|
|
45
|
+
})]
|
|
46
|
+
}));
|
|
42
47
|
});
|
|
43
48
|
export default GaussianBackground;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
5
|
var _excluded = ["style", "className", "reactionsEnabled", "mapping", "lang", "inputPosition", "id", "loading", "emitMetadata"];
|
|
6
6
|
import GiscusComponent from '@giscus/react';
|
|
7
7
|
import { useTheme, useThemeMode } from 'antd-style';
|
|
8
8
|
import { memo, useMemo } from 'react';
|
|
9
9
|
import { formatLang, genStyles } from "./style";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
11
|
var Giscus = /*#__PURE__*/memo(function (_ref) {
|
|
11
12
|
var style = _ref.style,
|
|
12
13
|
className = _ref.className,
|
|
@@ -31,18 +32,19 @@ var Giscus = /*#__PURE__*/memo(function (_ref) {
|
|
|
31
32
|
var giscusTheme = useMemo(function () {
|
|
32
33
|
return btoa(genStyles(token, isDarkMode).styles);
|
|
33
34
|
}, [isDarkMode, token]);
|
|
34
|
-
return /*#__PURE__*/
|
|
35
|
+
return /*#__PURE__*/_jsx("div", {
|
|
35
36
|
className: className,
|
|
36
|
-
style: style
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
style: style,
|
|
38
|
+
children: /*#__PURE__*/_jsx(GiscusComponent, _objectSpread({
|
|
39
|
+
emitMetadata: emitMetadata,
|
|
40
|
+
id: id,
|
|
41
|
+
inputPosition: inputPosition,
|
|
42
|
+
lang: formatLang(lang),
|
|
43
|
+
loading: loading,
|
|
44
|
+
mapping: mapping,
|
|
45
|
+
reactionsEnabled: reactionsEnabled,
|
|
46
|
+
theme: "data:text/css;base64,".concat(giscusTheme)
|
|
47
|
+
}, rest))
|
|
48
|
+
});
|
|
47
49
|
});
|
|
48
50
|
export default Giscus;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
5
|
var _excluded = ["glow", "children", "className", "size"];
|
|
6
6
|
import { Button } from 'antd';
|
|
7
7
|
import { memo } from 'react';
|
|
8
8
|
import { useStyles } from "./style";
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
11
|
var GradientButton = /*#__PURE__*/memo(function (_ref) {
|
|
10
12
|
var _ref$glow = _ref.glow,
|
|
11
13
|
glow = _ref$glow === void 0 ? true : _ref$glow,
|
|
@@ -17,11 +19,13 @@ var GradientButton = /*#__PURE__*/memo(function (_ref) {
|
|
|
17
19
|
var _useStyles = useStyles(size),
|
|
18
20
|
styles = _useStyles.styles,
|
|
19
21
|
cx = _useStyles.cx;
|
|
20
|
-
return /*#__PURE__*/
|
|
22
|
+
return /*#__PURE__*/_jsxs(Button, _objectSpread(_objectSpread({
|
|
21
23
|
className: cx(styles.button, className),
|
|
22
24
|
size: size
|
|
23
|
-
}, rest),
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
}, rest), {}, {
|
|
26
|
+
children: [glow && /*#__PURE__*/_jsx("div", {
|
|
27
|
+
className: styles.glow
|
|
28
|
+
}), children]
|
|
29
|
+
}));
|
|
26
30
|
});
|
|
27
31
|
export default GradientButton;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
1
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
3
|
var _excluded = ["color", "strokeWidth", "linePick"];
|
|
3
4
|
import { isUndefined } from 'lodash-es';
|
|
4
5
|
import { memo, useCallback } from 'react';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
9
|
var Line = /*#__PURE__*/function (Line) {
|
|
6
10
|
Line[Line["l7"] = 0] = "l7";
|
|
7
11
|
Line[Line["l6"] = 1] = "l6";
|
|
@@ -31,55 +35,63 @@ var Grid = /*#__PURE__*/memo(function (_ref) {
|
|
|
31
35
|
var showLine = useCallback(function (l) {
|
|
32
36
|
return isUnpick || linePick === l;
|
|
33
37
|
}, [linePick]);
|
|
34
|
-
var vLine = /*#__PURE__*/
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
38
|
+
var vLine = /*#__PURE__*/_jsxs(_Fragment, {
|
|
39
|
+
children: [showLine(Line.l7) && /*#__PURE__*/_jsx("path", {
|
|
40
|
+
d: "M2 420v-60.343c0-21.82 14.15-41.12 34.959-47.684L1026 0h0"
|
|
41
|
+
}), showLine(Line.l6) && /*#__PURE__*/_jsx("path", {
|
|
42
|
+
d: "M268 420v-62.077c0-20.977 13.094-39.724 32.789-46.944L1149 0h0"
|
|
43
|
+
}), showLine(Line.l5) && /*#__PURE__*/_jsx("path", {
|
|
44
|
+
d: "M534 420v-64.358a50 50 0 0129.884-45.775L1269 0h0"
|
|
45
|
+
}), showLine(Line.l4) && /*#__PURE__*/_jsx("path", {
|
|
46
|
+
d: "M800 420v-67.395a50 50 0 0125.958-43.84L1389 0h0"
|
|
47
|
+
}), showLine(Line.l3) && /*#__PURE__*/_jsx("path", {
|
|
48
|
+
d: "M1066 420v-71.645a50 50 0 0120.456-40.337L1507 0h0"
|
|
49
|
+
}), showLine(Line.l2) && /*#__PURE__*/_jsx("path", {
|
|
50
|
+
d: "M1332 420v-77.506a50 50 0 0113.194-33.843L1629 0h0"
|
|
51
|
+
}), showLine(Line.l1) && /*#__PURE__*/_jsx("path", {
|
|
52
|
+
d: "M1598 420v-86.225a50 50 0 014.438-20.594L1744 0h0"
|
|
53
|
+
}), showLine(Line.center) && /*#__PURE__*/_jsx("path", {
|
|
54
|
+
d: "M1864 420V0h0"
|
|
55
|
+
}), showLine(Line.r1) && /*#__PURE__*/_jsx("path", {
|
|
56
|
+
d: "M2130 420v-86.225a50 50 0 00-4.438-20.594L1984 0h0"
|
|
57
|
+
}), showLine(Line.r2) && /*#__PURE__*/_jsx("path", {
|
|
58
|
+
d: "M2396 420v-77.506a50 50 0 00-13.194-33.843L2099 0h0"
|
|
59
|
+
}), showLine(Line.r3) && /*#__PURE__*/_jsx("path", {
|
|
60
|
+
d: "M2662 420v-71.645a50 50 0 00-20.456-40.337L2221 0h0"
|
|
61
|
+
}), showLine(Line.r4) && /*#__PURE__*/_jsx("path", {
|
|
62
|
+
d: "M2928 420v-67.395a50 50 0 00-25.958-43.84L2339 0h0"
|
|
63
|
+
}), showLine(Line.r5) && /*#__PURE__*/_jsx("path", {
|
|
64
|
+
d: "M3194 420v-64.358a50 50 0 00-29.884-45.775L2459 0h0"
|
|
65
|
+
}), showLine(Line.r6) && /*#__PURE__*/_jsx("path", {
|
|
66
|
+
d: "M3460 420v-62.077c0-20.977-13.094-39.724-32.789-46.944L2579 0h0"
|
|
67
|
+
}), showLine(Line.r7) && /*#__PURE__*/_jsx("path", {
|
|
68
|
+
d: "M3726 420v-60.343c0-21.82-14.15-41.12-34.959-47.684L2702 0h0"
|
|
69
|
+
})]
|
|
70
|
+
});
|
|
71
|
+
var hLine = isUnpick && /*#__PURE__*/_jsxs(_Fragment, {
|
|
72
|
+
children: [/*#__PURE__*/_jsx("path", {
|
|
73
|
+
d: "M2835 42H892"
|
|
74
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
75
|
+
d: "M595 136h2538"
|
|
76
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
77
|
+
d: "M237 249h3254"
|
|
78
|
+
})]
|
|
79
|
+
});
|
|
80
|
+
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, rest), {}, {
|
|
81
|
+
children: /*#__PURE__*/_jsx("svg", {
|
|
82
|
+
style: {
|
|
83
|
+
width: '100%'
|
|
84
|
+
},
|
|
85
|
+
viewBox: "0 0 3728 422",
|
|
86
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
87
|
+
children: /*#__PURE__*/_jsxs("g", {
|
|
88
|
+
fill: "none",
|
|
89
|
+
fillRule: "evenodd",
|
|
90
|
+
stroke: color,
|
|
91
|
+
strokeWidth: strokeWidth,
|
|
92
|
+
children: [vLine, hLine]
|
|
93
|
+
})
|
|
94
|
+
})
|
|
64
95
|
}));
|
|
65
|
-
var hLine = isUnpick && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("path", {
|
|
66
|
-
d: "M2835 42H892"
|
|
67
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
68
|
-
d: "M595 136h2538"
|
|
69
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
70
|
-
d: "M237 249h3254"
|
|
71
|
-
}));
|
|
72
|
-
return /*#__PURE__*/React.createElement("div", rest, /*#__PURE__*/React.createElement("svg", {
|
|
73
|
-
style: {
|
|
74
|
-
width: '100%'
|
|
75
|
-
},
|
|
76
|
-
viewBox: "0 0 3728 422",
|
|
77
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
78
|
-
}, /*#__PURE__*/React.createElement("g", {
|
|
79
|
-
fill: "none",
|
|
80
|
-
fillRule: "evenodd",
|
|
81
|
-
stroke: color,
|
|
82
|
-
strokeWidth: strokeWidth
|
|
83
|
-
}, vLine, hLine)));
|
|
84
96
|
});
|
|
85
97
|
export default Grid;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
5
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
5
|
var _excluded = ["style", "children", "backgroundColor", "innerProps"];
|
|
@@ -9,6 +8,8 @@ import { rgba } from 'polished';
|
|
|
9
8
|
import { memo } from 'react';
|
|
10
9
|
import { Flexbox } from 'react-layout-kit';
|
|
11
10
|
import GridBackground from "./index";
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
13
|
var GridShowcase = /*#__PURE__*/memo(function (_ref) {
|
|
13
14
|
var style = _ref.style,
|
|
14
15
|
children = _ref.children,
|
|
@@ -17,32 +18,35 @@ var GridShowcase = /*#__PURE__*/memo(function (_ref) {
|
|
|
17
18
|
innerProps = _ref.innerProps,
|
|
18
19
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
19
20
|
var theme = useTheme();
|
|
20
|
-
return /*#__PURE__*/
|
|
21
|
+
return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
|
|
21
22
|
style: _objectSpread({
|
|
22
23
|
position: 'relative'
|
|
23
24
|
}, style)
|
|
24
|
-
}, rest),
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
25
|
+
}, rest), {}, {
|
|
26
|
+
children: [/*#__PURE__*/_jsx(GridBackground, {
|
|
27
|
+
animation: true,
|
|
28
|
+
colorBack: rgba(theme.colorText, 0.12),
|
|
29
|
+
colorFront: rgba(theme.colorText, 0.6),
|
|
30
|
+
flip: true
|
|
31
|
+
}), /*#__PURE__*/_jsx(Flexbox, _objectSpread(_objectSpread({
|
|
32
|
+
align: 'center'
|
|
33
|
+
}, innerProps), {}, {
|
|
34
|
+
style: _objectSpread({
|
|
35
|
+
zIndex: 4
|
|
36
|
+
}, innerProps === null || innerProps === void 0 ? void 0 : innerProps.style),
|
|
37
|
+
children: children
|
|
38
|
+
})), /*#__PURE__*/_jsx(GridBackground, {
|
|
39
|
+
animation: true,
|
|
40
|
+
backgroundColor: backgroundColor,
|
|
41
|
+
colorBack: rgba(theme.colorText, 0.24),
|
|
42
|
+
colorFront: theme.colorText,
|
|
43
|
+
random: true,
|
|
44
|
+
reverse: true,
|
|
45
|
+
showBackground: true,
|
|
46
|
+
style: {
|
|
47
|
+
zIndex: 0
|
|
48
|
+
}
|
|
49
|
+
})]
|
|
46
50
|
}));
|
|
47
51
|
});
|
|
48
52
|
export default GridShowcase;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
6
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
7
6
|
var _excluded = ["flip", "reverse", "showBackground", "backgroundColor", "random", "animationDuration", "className", "colorFront", "colorBack", "strokeWidth", "style", "animation"];
|
|
@@ -10,6 +9,9 @@ import { shuffle } from 'lodash-es';
|
|
|
10
9
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
11
10
|
import Grid from "./Grid";
|
|
12
11
|
import { useStyles } from "./style";
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
15
|
var initialGroup = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];
|
|
14
16
|
var GridBackground = /*#__PURE__*/memo(function (_ref) {
|
|
15
17
|
var flip = _ref.flip,
|
|
@@ -50,41 +52,45 @@ var GridBackground = /*#__PURE__*/memo(function (_ref) {
|
|
|
50
52
|
setGroup(random ? shuffle(initialGroup) : undefined);
|
|
51
53
|
}, [random]);
|
|
52
54
|
var HighlightGrid = useCallback(function () {
|
|
53
|
-
if (!group) return /*#__PURE__*/
|
|
55
|
+
if (!group) return /*#__PURE__*/_jsx(Grid, _objectSpread({
|
|
54
56
|
style: {
|
|
55
57
|
'--duration': "".concat(animationDuration, "s")
|
|
56
58
|
}
|
|
57
59
|
}, gridProps));
|
|
58
|
-
return /*#__PURE__*/
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
60
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
61
|
+
children: group.map(function (item, index) {
|
|
62
|
+
return /*#__PURE__*/_jsx(Grid, _objectSpread({
|
|
63
|
+
linePick: item,
|
|
64
|
+
style: {
|
|
65
|
+
'--delay': "".concat(index + Math.random(), "s"),
|
|
66
|
+
'--duration': "".concat(animationDuration, "s")
|
|
67
|
+
}
|
|
68
|
+
}, gridProps), item);
|
|
69
|
+
})
|
|
70
|
+
});
|
|
68
71
|
}, [group, animationDuration, gridProps]);
|
|
69
|
-
return /*#__PURE__*/
|
|
72
|
+
return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
|
|
70
73
|
className: cx(styles.container, className),
|
|
71
74
|
ref: ref,
|
|
72
75
|
style: flip ? _objectSpread({
|
|
73
76
|
transform: 'scaleY(-1)'
|
|
74
77
|
}, style) : style
|
|
75
|
-
}, rest),
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
78
|
+
}, rest), {}, {
|
|
79
|
+
children: [/*#__PURE__*/_jsx(Grid, {
|
|
80
|
+
color: colorBack || theme.colorBorder,
|
|
81
|
+
strokeWidth: strokeWidth,
|
|
82
|
+
style: {
|
|
83
|
+
zIndex: 2
|
|
84
|
+
}
|
|
85
|
+
}), animation && /*#__PURE__*/_jsx(HighlightGrid, {}), showBackground && /*#__PURE__*/_jsx("div", {
|
|
86
|
+
className: styles.backgroundContainer,
|
|
87
|
+
style: size ? {
|
|
88
|
+
fontSize: size.width / 80
|
|
89
|
+
} : {},
|
|
90
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
91
|
+
className: styles.background
|
|
92
|
+
})
|
|
93
|
+
})]
|
|
94
|
+
}));
|
|
89
95
|
});
|
|
90
96
|
export default GridBackground;
|