@lobehub/ui 1.23.1 → 1.25.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.
Files changed (58) hide show
  1. package/es/Chat/store/index.d.ts +1 -1
  2. package/es/DraggablePanel/index.js +4 -4
  3. package/es/DraggablePanel/style.d.ts +1 -1
  4. package/es/DraggablePanel/style.js +1 -1
  5. package/es/Features/Item.d.ts +20 -0
  6. package/es/Features/Item.js +105 -0
  7. package/es/Features/Item.style.d.ts +12 -0
  8. package/es/Features/Item.style.js +34 -0
  9. package/es/Features/index.d.ts +12 -0
  10. package/es/Features/index.js +33 -0
  11. package/es/Features/style.d.ts +3 -0
  12. package/es/Features/style.js +18 -0
  13. package/es/Footer/index.d.ts +10 -0
  14. package/es/Footer/index.js +27 -0
  15. package/es/Footer/style.d.ts +7 -0
  16. package/es/Footer/style.js +15 -0
  17. package/es/GradientButton/index.d.ts +7 -0
  18. package/es/GradientButton/index.js +28 -0
  19. package/es/GradientButton/style.d.ts +5 -0
  20. package/es/GradientButton/style.js +14 -0
  21. package/es/Header/index.d.ts +9 -0
  22. package/es/Header/index.js +58 -0
  23. package/es/Header/style.d.ts +6 -0
  24. package/es/Header/style.js +16 -0
  25. package/es/Hero/index.d.ts +15 -0
  26. package/es/Hero/index.js +85 -0
  27. package/es/Hero/style.d.ts +7 -0
  28. package/es/Hero/style.js +27 -0
  29. package/es/Layout/style.js +3 -2
  30. package/es/Snippet/index.js +1 -1
  31. package/es/Snippet/style.d.ts +3 -1
  32. package/es/Snippet/style.js +3 -1
  33. package/es/ThemeProvider/index.js +10 -18
  34. package/es/Toc/TocMobile.d.ts +27 -0
  35. package/es/Toc/TocMobile.js +108 -0
  36. package/es/Toc/index.d.ts +7 -0
  37. package/es/Toc/index.js +39 -0
  38. package/es/Toc/style.d.ts +9 -0
  39. package/es/Toc/style.js +20 -0
  40. package/es/index.d.ts +6 -0
  41. package/es/index.js +6 -0
  42. package/es/styles/algorithms/generateCustomStylish.js +9 -5
  43. package/es/types/customStylish.d.ts +2 -0
  44. package/package.json +8 -6
  45. package/es/Menu/MenuItem/icons.d.ts +0 -4
  46. package/es/Menu/MenuItem/icons.js +0 -73
  47. package/es/Menu/MenuItem/index.d.ts +0 -12
  48. package/es/Menu/MenuItem/index.js +0 -73
  49. package/es/Menu/MenuItem/style.d.ts +0 -7
  50. package/es/Menu/MenuItem/style.js +0 -16
  51. package/es/Menu/index.d.ts +0 -17
  52. package/es/Menu/index.js +0 -248
  53. package/es/Menu/style.d.ts +0 -4
  54. package/es/Menu/style.js +0 -12
  55. package/es/Menu/types/index.d.ts +0 -5
  56. package/es/Menu/types/index.js +0 -2
  57. package/es/Menu/types/menuItem.d.ts +0 -21
  58. package/es/Menu/types/menuItem.js +0 -1
@@ -8,7 +8,7 @@ export declare const createChatStore: (showDevtools?: boolean) => import("zustan
8
8
  }>;
9
9
  export declare const Provider: ({ createStore, children }: {
10
10
  createStore: () => StoreApi<ChatStore>;
11
- children: any;
11
+ children: import("react").ReactNode;
12
12
  }) => import("react").FunctionComponentElement<import("react").ProviderProps<StoreApi<ChatStore> | undefined>>, useStore: import("zustand-utils").UseContextStore<StoreApi<ChatStore>>, useStoreApi: () => {
13
13
  setState: (partial: ChatStore | Partial<ChatStore> | ((state: ChatStore) => ChatStore | Partial<ChatStore>), replace?: boolean | undefined) => void;
14
14
  getState: () => ChatStore;
@@ -8,7 +8,7 @@ import { Resizable } from 're-resizable';
8
8
  import { memo, useEffect, useMemo, useRef, useState } from 'react';
9
9
  import { Center } from 'react-layout-kit';
10
10
  import useControlledState from 'use-merge-value';
11
- import { useStyle } from "./style";
11
+ import { useStyles } from "./style";
12
12
  import { revesePlacement } from "./utils";
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
14
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -46,9 +46,9 @@ var DraggablePanel = /*#__PURE__*/memo(function (_ref) {
46
46
  var ref = useRef(null);
47
47
  var isHovering = useHover(ref);
48
48
  var isVertical = placement === 'top' || placement === 'bottom';
49
- var _useStyle = useStyle('draggable-panel'),
50
- styles = _useStyle.styles,
51
- cx = _useStyle.cx;
49
+ var _useStyles = useStyles('draggable-panel'),
50
+ styles = _useStyles.styles,
51
+ cx = _useStyles.cx;
52
52
  var _useControlledState = useControlledState(defaultExpand, {
53
53
  value: expand,
54
54
  onChange: onExpandChange
@@ -1,4 +1,4 @@
1
- export declare const useStyle: (props?: string | undefined) => import("antd-style").ReturnStyles<{
1
+ export declare const useStyles: (props?: string | undefined) => import("antd-style").ReturnStyles<{
2
2
  container: string;
3
3
  fixed: import("antd-style").SerializedStyles;
4
4
  leftFloat: string;
@@ -4,7 +4,7 @@ import { createStyles, css, cx } from 'antd-style';
4
4
  var offset = 16;
5
5
  var toggleLength = 40;
6
6
  var toggleShort = 16;
7
- export var useStyle = createStyles(function (_ref, prefix) {
7
+ export var useStyles = createStyles(function (_ref, prefix) {
8
8
  var token = _ref.token;
9
9
  var commonHandle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n\n &::before {\n content: '';\n position: absolute;\n z-index: 50;\n transition: all 0.2s ", ";\n }\n\n &:hover,\n &:active {\n &::before {\n background: ", " !important;\n }\n }\n "])), token.motionEaseOut, token.colorPrimary);
10
10
  var commonToggle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 1001;\n opacity: 0;\n transition: all 0.2s ", ";\n\n &:hover {\n opacity: 1 !important;\n }\n\n &:active {\n opacity: 1 !important;\n }\n\n > div {\n cursor: pointer;\n\n position: absolute;\n\n color: ", ";\n\n background: ", ";\n border-color: ", ";\n border-style: solid;\n border-width: 1px;\n border-radius: 4px;\n\n transition: all 0.2s ", ";\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n\n &:active {\n color: ", ";\n background: ", ";\n }\n }\n "])), token.motionEaseOut, token.colorTextTertiary, token.colorFillTertiary, token.colorBorderSecondary, token.motionEaseOut, token.colorTextSecondary, token.colorFillSecondary, token.colorText, token.colorFill);
@@ -0,0 +1,20 @@
1
+ import { ImageContainerType } from 'dumi-theme-lobehub/src';
2
+ import { CSSProperties } from 'react';
3
+ import type { DivProps } from "../types";
4
+ export interface FeatureItem {
5
+ column?: number;
6
+ description?: string;
7
+ hero?: boolean;
8
+ icon?: string;
9
+ image?: string;
10
+ imageStyle?: CSSProperties;
11
+ imageType?: ImageContainerType;
12
+ link?: string;
13
+ openExternal?: boolean;
14
+ row?: number;
15
+ title: string;
16
+ }
17
+ export interface FeatureItemProps extends FeatureItem, DivProps {
18
+ }
19
+ declare const Item: import("react").NamedExoticComponent<FeatureItemProps>;
20
+ export default Item;
@@ -0,0 +1,105 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["style", "className", "row", "column", "description", "image", "title", "link", "icon", "imageStyle", "openExternal"];
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 { Icon } from "./..";
7
+ import { Link, history } from 'dumi';
8
+ import * as LucideIcon from 'lucide-react';
9
+ import { memo } from 'react';
10
+ import { Center, Flexbox } from 'react-layout-kit';
11
+ import { useStyles } from "./Item.style";
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { jsxs as _jsxs } from "react/jsx-runtime";
14
+ var Image = /*#__PURE__*/memo(function (_ref) {
15
+ var image = _ref.image,
16
+ className = _ref.className,
17
+ title = _ref.title;
18
+ return image.startsWith('http') ? /*#__PURE__*/_jsx("img", {
19
+ alt: title,
20
+ className: className,
21
+ src: image
22
+ }) : /*#__PURE__*/_jsx(Center, {
23
+ className: className,
24
+ children: image
25
+ });
26
+ });
27
+ var Item = /*#__PURE__*/memo(function (_ref2) {
28
+ var style = _ref2.style,
29
+ className = _ref2.className,
30
+ row = _ref2.row,
31
+ column = _ref2.column,
32
+ description = _ref2.description,
33
+ image = _ref2.image,
34
+ title = _ref2.title,
35
+ link = _ref2.link,
36
+ icon = _ref2.icon,
37
+ imageStyle = _ref2.imageStyle,
38
+ openExternal = _ref2.openExternal,
39
+ props = _objectWithoutProperties(_ref2, _excluded);
40
+ var rowNum = row || 7;
41
+ var _useStyles = useStyles({
42
+ rowNum: rowNum,
43
+ hasLink: Boolean(link)
44
+ }),
45
+ styles = _useStyles.styles,
46
+ cx = _useStyles.cx;
47
+
48
+ // @ts-ignore
49
+ var FeatureIcon = icon && LucideIcon[icon];
50
+ return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
51
+ className: cx(styles.container, className),
52
+ onClick: function onClick() {
53
+ if (!link) return;
54
+ if (openExternal) {
55
+ window.open(link);
56
+ } else {
57
+ history.push(link);
58
+ }
59
+ },
60
+ style: _objectSpread({
61
+ gridRow: "span ".concat(rowNum),
62
+ gridColumn: "span ".concat(column || 1),
63
+ cursor: link ? 'pointer' : 'default'
64
+ }, style)
65
+ }, props), {}, {
66
+ children: /*#__PURE__*/_jsxs("div", {
67
+ className: styles.cell,
68
+ children: [image && /*#__PURE__*/_jsx(Center, {
69
+ className: styles.imgContainer,
70
+ style: imageStyle,
71
+ children: /*#__PURE__*/_jsx(Image, {
72
+ className: styles.img,
73
+ image: image,
74
+ title: title
75
+ })
76
+ }), FeatureIcon && /*#__PURE__*/_jsx(Center, {
77
+ className: styles.imgContainer,
78
+ style: imageStyle,
79
+ children: /*#__PURE__*/_jsx(Icon, {
80
+ className: styles.img,
81
+ icon: FeatureIcon
82
+ })
83
+ }), title && /*#__PURE__*/_jsx(Flexbox, {
84
+ align: 'center',
85
+ as: 'h3',
86
+ className: styles.title,
87
+ gap: 8,
88
+ horizontal: true,
89
+ children: title
90
+ }), description && /*#__PURE__*/_jsx("p", {
91
+ className: styles.desc,
92
+ dangerouslySetInnerHTML: {
93
+ __html: description
94
+ }
95
+ }), link && /*#__PURE__*/_jsx("div", {
96
+ className: styles.link,
97
+ children: /*#__PURE__*/_jsx(Link, {
98
+ to: link,
99
+ children: "Read More"
100
+ })
101
+ })]
102
+ })
103
+ }));
104
+ });
105
+ export default Item;
@@ -0,0 +1,12 @@
1
+ export declare const useStyles: (props?: {
2
+ hasLink?: boolean | undefined;
3
+ rowNum: number;
4
+ } | undefined) => import("antd-style").ReturnStyles<{
5
+ cell: import("antd-style").SerializedStyles;
6
+ container: import("antd-style").SerializedStyles;
7
+ title: string;
8
+ desc: string;
9
+ imgContainer: string;
10
+ img: string;
11
+ link: import("antd-style").SerializedStyles;
12
+ }>;
@@ -0,0 +1,34 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
3
+ import { createStyles } from 'antd-style';
4
+ export var useStyles = createStyles(function (_ref, _ref2) {
5
+ var token = _ref.token,
6
+ prefixCls = _ref.prefixCls,
7
+ css = _ref.css,
8
+ cx = _ref.cx;
9
+ var rowNum = _ref2.rowNum,
10
+ hasLink = _ref2.hasLink;
11
+ var prefix = "".concat(prefixCls, "-features");
12
+ var coverCls = "".concat(prefix, "-cover");
13
+ var descCls = "".concat(prefix, "-description");
14
+ var titleCls = "".concat(prefix, "-title");
15
+ var imgCls = "".concat(prefix, "-img");
16
+
17
+ // 通过简单估计,缩放值乘以 rowNum 就可以得到合适的尺寸
18
+ var scaleUnit = 20;
19
+
20
+ // 尺寸工具
21
+ var genSize = function genSize(size) {
22
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: ", "px;\n height: ", "px;\n font-size: ", "px;\n "])), size, size, size * (22 / 24));
23
+ };
24
+ var withTransition = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n transition: all ", " ", ";\n "])), token.motionDurationSlow, token.motionEaseInOutCirc);
25
+ return {
26
+ cell: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n overflow: hidden;\n "]))),
27
+ container: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", ";\n position: relative;\n z-index: 1;\n\n padding: 24px;\n\n background: ", ";\n border-radius: ", "px;\n\n p {\n font-size: 16px;\n line-height: 1.2;\n text-align: justify;\n word-wrap: break-word;\n }\n\n &:hover {\n .", " {\n width: 100%;\n height: ", "px;\n padding: 0;\n background: ", ";\n }\n\n .", " {\n ", ";\n }\n\n .", " {\n position: absolute;\n visibility: hidden;\n opacity: 0;\n }\n\n .", " {\n font-size: ", "px;\n }\n }\n "])), withTransition, token.colorBgContainer, token.borderRadiusLG, coverCls, scaleUnit * rowNum, token.colorFillContent, imgCls, genSize(100), descCls, titleCls, hasLink ? 14 : 20),
28
+ title: cx(titleCls, withTransition, css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n pointer-events: none;\n\n margin: 16px 0;\n\n font-size: 20px;\n line-height: ", ";\n color: ", ";\n "])), token.lineHeightHeading3, token.colorText)),
29
+ desc: cx(descCls, withTransition, css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n pointer-events: none;\n color: ", ";\n\n quotient {\n position: relative;\n\n display: block;\n\n margin: 12px 0;\n padding-left: 12px;\n\n color: ", ";\n }\n "])), token.colorTextSecondary, token.colorTextDescription)),
30
+ imgContainer: cx(coverCls, withTransition, css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n ", ";\n padding: 4px;\n opacity: 0.8;\n border-radius: ", "px;\n "])), genSize(24), token.borderRadius)),
31
+ img: cx(imgCls, withTransition, css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n ", ";\n color: ", ";\n "])), genSize(20), token.colorWhite)),
32
+ link: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n ", ";\n margin-top: 24px;\n "])), withTransition)
33
+ };
34
+ });
@@ -0,0 +1,12 @@
1
+ import { CSSProperties } from 'react';
2
+ import { DivProps } from "../types";
3
+ import { type FeatureItem } from './Item';
4
+ export type { FeatureItem } from './Item';
5
+ export interface FeaturesProps extends DivProps {
6
+ contentMaxWidth?: number;
7
+ itemClassName?: string;
8
+ itemStyle?: CSSProperties;
9
+ items: FeatureItem[];
10
+ }
11
+ declare const Features: import("react").NamedExoticComponent<FeaturesProps>;
12
+ export default Features;
@@ -0,0 +1,33 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["items", "contentMaxWidth", "className", "itemClassName", "itemStyle"];
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 { memo } from 'react';
7
+ import { default as Item } from "./Item";
8
+ import { useStyles } from "./style";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ var Features = /*#__PURE__*/memo(function (_ref) {
11
+ var items = _ref.items,
12
+ _ref$contentMaxWidth = _ref.contentMaxWidth,
13
+ contentMaxWidth = _ref$contentMaxWidth === void 0 ? 960 : _ref$contentMaxWidth,
14
+ className = _ref.className,
15
+ itemClassName = _ref.itemClassName,
16
+ itemStyle = _ref.itemStyle,
17
+ props = _objectWithoutProperties(_ref, _excluded);
18
+ var _useStyles = useStyles(contentMaxWidth),
19
+ cx = _useStyles.cx,
20
+ styles = _useStyles.styles;
21
+ if (!(items !== null && items !== void 0 && items.length)) return null;
22
+ return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
23
+ className: cx(styles.container, className)
24
+ }, props), {}, {
25
+ children: items.map(function (item) {
26
+ return /*#__PURE__*/_jsx(Item, _objectSpread({
27
+ className: itemClassName,
28
+ style: itemStyle
29
+ }, item), item.title);
30
+ })
31
+ }));
32
+ });
33
+ export default Features;
@@ -0,0 +1,3 @@
1
+ export declare const useStyles: (props?: number | undefined) => import("antd-style").ReturnStyles<{
2
+ container: string;
3
+ }>;
@@ -0,0 +1,18 @@
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, contentMaxWidth) {
5
+ var prefixCls = _ref.prefixCls,
6
+ responsive = _ref.responsive,
7
+ css = _ref.css,
8
+ cx = _ref.cx;
9
+ var prefix = "".concat(prefixCls, "-features");
10
+ return {
11
+ container: cx(prefix, css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: grid;\n grid-auto-flow: row dense;\n grid-auto-rows: 18px;\n grid-template-columns: repeat(3, 1fr);\n gap: 16px;\n\n max-width: ", "px;\n\n ", "\n "])), contentMaxWidth, responsive({
12
+ mobile: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n "]))),
13
+ laptop: {
14
+ gridTemplateColumns: 'repeat(2, 1fr)'
15
+ }
16
+ })))
17
+ };
18
+ });
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { FooterProps as RcProps } from 'rc-footer';
3
+ export interface FooterProps {
4
+ bottom?: RcProps['bottom'];
5
+ columns: RcProps['columns'];
6
+ contentMaxWidth?: number;
7
+ theme?: RcProps['theme'];
8
+ }
9
+ declare const Footer: import("react").NamedExoticComponent<FooterProps>;
10
+ export default Footer;
@@ -0,0 +1,27 @@
1
+ import RcFooter from 'rc-footer';
2
+ import { memo } from 'react';
3
+ import { useStyles } from "./style";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ var Footer = /*#__PURE__*/memo(function (_ref) {
6
+ var columns = _ref.columns,
7
+ bottom = _ref.bottom,
8
+ theme = _ref.theme,
9
+ _ref$contentMaxWidth = _ref.contentMaxWidth,
10
+ contentMaxWidth = _ref$contentMaxWidth === void 0 ? 960 : _ref$contentMaxWidth;
11
+ var isEmpty = !columns || (columns === null || columns === void 0 ? void 0 : columns.length) === 0;
12
+ var _useStyles = useStyles({
13
+ isEmpty: isEmpty,
14
+ contentMaxWidth: contentMaxWidth
15
+ }),
16
+ styles = _useStyles.styles;
17
+ return /*#__PURE__*/_jsx("section", {
18
+ className: styles.container,
19
+ children: /*#__PURE__*/_jsx(RcFooter, {
20
+ bottom: bottom,
21
+ className: styles.footer,
22
+ columns: columns,
23
+ theme: theme
24
+ })
25
+ });
26
+ });
27
+ export default Footer;
@@ -0,0 +1,7 @@
1
+ export declare const useStyles: (props?: {
2
+ contentMaxWidth: number;
3
+ isEmpty: boolean;
4
+ } | undefined) => import("antd-style").ReturnStyles<{
5
+ container: import("antd-style").SerializedStyles;
6
+ footer: import("antd-style").SerializedStyles;
7
+ }>;
@@ -0,0 +1,15 @@
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, _ref2) {
5
+ var css = _ref.css,
6
+ responsive = _ref.responsive,
7
+ token = _ref.token;
8
+ var isEmpty = _ref2.isEmpty,
9
+ contentMaxWidth = _ref2.contentMaxWidth;
10
+ var prefix = "rc-footer";
11
+ return {
12
+ container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n grid-area: footer;\n align-self: stretch;\n\n color: ", ";\n text-align: center;\n\n border-top: 1px solid ", ";\n\n ", " {\n flex-direction: column;\n border: none;\n }\n "])), token.colorTextDescription, token.colorSplit, responsive.mobile),
13
+ footer: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: 14px;\n line-height: 1.5;\n color: ", ";\n background-color: ", ";\n\n &.", " {\n a {\n color: ", ";\n text-decoration: none;\n transition: all 0.3s;\n\n &:hover {\n color: ", ";\n }\n }\n }\n\n .", " {\n &-container {\n width: 100%;\n max-width: ", "px;\n margin: auto;\n padding: ", ";\n }\n\n &-columns {\n display: flex;\n justify-content: space-around;\n }\n\n &-column {\n text-align: left;\n\n h2 {\n position: relative;\n\n margin: 0 auto;\n\n font-size: 16px;\n font-weight: 500;\n color: ", ";\n }\n\n &-icon {\n position: relative;\n top: -1px;\n\n display: inline-block;\n\n width: 22px;\n margin-inline-end: 0.5em;\n\n text-align: center;\n vertical-align: middle;\n\n > span,\n > svg,\n img {\n display: block;\n width: 100%;\n }\n }\n }\n\n &-item {\n margin: 12px 0;\n\n &-icon {\n position: relative;\n top: -1px;\n\n display: inline-block;\n\n width: 16px;\n margin-inline-end: 0.4em;\n\n text-align: center;\n vertical-align: middle;\n\n > span,\n > svg,\n img {\n display: block;\n width: 100%;\n }\n }\n\n &-separator {\n margin: 0 0.3em;\n }\n }\n\n &-bottom {\n color: ", ";\n\n &-container {\n width: 100%;\n max-width: ", "px;\n margin: 0 auto;\n padding: 16px 0;\n\n line-height: 32px;\n text-align: center;\n }\n }\n\n &-light {\n color: rgba(0, 0, 0, 85%);\n background-color: transparent;\n\n h2,\n a {\n color: rgba(0, 0, 0, 85%);\n }\n }\n\n &-light &-bottom-container {\n border-top-color: #e8e8e8;\n }\n\n &-light &-item-separator,\n &-light &-item-description {\n color: rgba(0, 0, 0, 45%);\n }\n }\n\n ", " {\n .", " {\n &-container {\n padding: 40px 0;\n }\n\n &-columns {\n display: block;\n }\n\n &-column {\n display: block;\n margin-bottom: 40px;\n text-align: center;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n }\n }\n "])), token.colorTextSecondary, token.colorBgLayout, prefix, token.colorTextTertiary, token.colorLinkHover, prefix, contentMaxWidth, isEmpty ? '0' : '60px 0 20px', token.colorText, token.colorTextDescription, contentMaxWidth, responsive.mobile, prefix)
14
+ };
15
+ });
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { ButtonProps } from 'antd';
3
+ export interface GradientButtonProps extends ButtonProps {
4
+ spin?: boolean;
5
+ }
6
+ declare const GradientButton: import("react").NamedExoticComponent<GradientButtonProps>;
7
+ export default GradientButton;
@@ -0,0 +1,28 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["children", "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; }
6
+ import { Button } from 'antd';
7
+ import { memo } from 'react';
8
+ import { useStyles } from "./style";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ import { jsxs as _jsxs } from "react/jsx-runtime";
11
+ var GradientButton = /*#__PURE__*/memo(function (_ref) {
12
+ var children = _ref.children,
13
+ className = _ref.className,
14
+ props = _objectWithoutProperties(_ref, _excluded);
15
+ var _useStyles = useStyles(),
16
+ styles = _useStyles.styles,
17
+ cx = _useStyles.cx;
18
+ return /*#__PURE__*/_jsxs(Button, _objectSpread(_objectSpread({
19
+ className: cx(styles.button, className)
20
+ }, props), {}, {
21
+ children: [/*#__PURE__*/_jsx("div", {
22
+ className: styles.glow
23
+ }), /*#__PURE__*/_jsx("div", {
24
+ className: styles.bg
25
+ }), children]
26
+ }));
27
+ });
28
+ export default GradientButton;
@@ -0,0 +1,5 @@
1
+ export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
+ button: import("antd-style").SerializedStyles;
3
+ bg: import("antd-style").SerializedStyles;
4
+ glow: import("antd-style").SerializedStyles;
5
+ }>;
@@ -0,0 +1,14 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
+ var _templateObject, _templateObject2, _templateObject3;
3
+ import { createStyles } from 'antd-style';
4
+ export var useStyles = createStyles(function (_ref) {
5
+ var css = _ref.css,
6
+ token = _ref.token,
7
+ isDarkMode = _ref.isDarkMode,
8
+ stylish = _ref.stylish;
9
+ return {
10
+ button: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n z-index: 1;\n background: ", ";\n border: none;\n\n &::before {\n ", "\n content: '';\n\n position: absolute;\n z-index: 0;\n inset: 0;\n\n overflow: hidden;\n\n padding: 1px;\n\n mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);\n\n mask-composite: xor;\n }\n\n > span {\n position: relative;\n z-index: 10;\n }\n\n &:hover {\n &::before {\n mask: unset;\n }\n }\n "])), token.colorBgLayout, stylish.gradientAnimation),
11
+ bg: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: -1;\n top: 0;\n left: 0;\n\n width: 100%;\n height: 100%;\n\n background: ", ";\n border-radius: inherit;\n "])), token.colorBgLayout),
12
+ glow: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", "\n position: absolute;\n z-index: -1;\n top: 0;\n left: 0;\n\n width: 100%;\n height: 100%;\n\n opacity: ", ";\n filter: blur(", "em);\n border-radius: inherit;\n "])), stylish.gradientAnimation, isDarkMode ? 0.5 : 0.3, isDarkMode ? 1.5 : 1)
13
+ };
14
+ });
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ import { DivProps } from "../types";
3
+ export interface HeaderProps extends DivProps {
4
+ actions?: ReactNode;
5
+ logo?: ReactNode;
6
+ nav?: ReactNode;
7
+ }
8
+ declare const Header: import("react").NamedExoticComponent<HeaderProps>;
9
+ export default Header;
@@ -0,0 +1,58 @@
1
+ import { useResponsive } from 'antd-style';
2
+ import { memo } from 'react';
3
+ import { Flexbox } from 'react-layout-kit';
4
+ import { useStyles } from "./style";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ import { Fragment as _Fragment } from "react/jsx-runtime";
7
+ import { jsxs as _jsxs } from "react/jsx-runtime";
8
+ var Header = /*#__PURE__*/memo(function (_ref) {
9
+ var nav = _ref.nav,
10
+ logo = _ref.logo,
11
+ actions = _ref.actions;
12
+ var _useResponsive = useResponsive(),
13
+ mobile = _useResponsive.mobile;
14
+ var _useStyles = useStyles(),
15
+ styles = _useStyles.styles;
16
+ return /*#__PURE__*/_jsx("section", {
17
+ className: styles.header,
18
+ children: /*#__PURE__*/_jsx(Flexbox, {
19
+ align: 'center',
20
+ className: styles.content,
21
+ distribution: 'space-between',
22
+ horizontal: true,
23
+ width: 'auto',
24
+ children: mobile ? /*#__PURE__*/_jsxs(_Fragment, {
25
+ children: [/*#__PURE__*/_jsx(Flexbox, {
26
+ children: nav
27
+ }), /*#__PURE__*/_jsx(Flexbox, {
28
+ className: styles.left,
29
+ horizontal: true,
30
+ children: logo
31
+ }), /*#__PURE__*/_jsx(Flexbox, {
32
+ children: actions
33
+ })]
34
+ }) : /*#__PURE__*/_jsxs(_Fragment, {
35
+ children: [/*#__PURE__*/_jsx(Flexbox, {
36
+ className: styles.left,
37
+ horizontal: true,
38
+ children: logo
39
+ }), /*#__PURE__*/_jsx(Flexbox, {
40
+ style: {
41
+ marginLeft: 48,
42
+ alignSelf: 'end'
43
+ },
44
+ children: nav
45
+ }), /*#__PURE__*/_jsxs("section", {
46
+ className: styles.right,
47
+ children: [/*#__PURE__*/_jsx("div", {}), /*#__PURE__*/_jsx(Flexbox, {
48
+ align: 'center',
49
+ gap: 8,
50
+ horizontal: true,
51
+ children: actions
52
+ })]
53
+ })]
54
+ })
55
+ })
56
+ });
57
+ });
58
+ export default Header;
@@ -0,0 +1,6 @@
1
+ export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
+ header: string;
3
+ content: import("antd-style").SerializedStyles;
4
+ left: import("antd-style").SerializedStyles;
5
+ right: import("antd-style").SerializedStyles;
6
+ }>;
@@ -0,0 +1,16 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
3
+ import { createStyles } from 'antd-style';
4
+ import { rgba } from 'polished';
5
+ export var useStyles = createStyles(function (_ref) {
6
+ var css = _ref.css,
7
+ responsive = _ref.responsive,
8
+ token = _ref.token,
9
+ cx = _ref.cx;
10
+ return {
11
+ header: cx(css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n grid-area: head;\n align-self: stretch;\n width: 100%;\n "])))),
12
+ content: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: 64px;\n padding: 0 24px;\n background-color: ", ";\n border-bottom: 1px solid ", ";\n\n ", " {\n padding: 0 12px;\n }\n "])), rgba(token.colorBgLayout, 0.4), token.colorSplit, responsive.mobile),
13
+ left: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n z-index: 10;\n "]))),
14
+ right: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n z-index: 10;\n display: flex;\n flex: 1;\n justify-content: space-between;\n\n &-aside {\n display: flex;\n align-items: center;\n\n ", " {\n justify-content: center;\n margin: 8px 16px;\n padding-top: 24px;\n border-top: 1px solid ", ";\n }\n }\n "])), responsive.mobile, token.colorBorder)
15
+ };
16
+ });
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ export interface HeroAction {
3
+ icon?: string;
4
+ link: string;
5
+ openExternal?: boolean;
6
+ text: string;
7
+ type?: 'primary' | 'default';
8
+ }
9
+ export interface HeroProps {
10
+ actions?: HeroAction[];
11
+ description?: string;
12
+ title?: string;
13
+ }
14
+ declare const Hero: import("react").NamedExoticComponent<HeroProps>;
15
+ export default Hero;
@@ -0,0 +1,85 @@
1
+ import { GradientButton, Icon } from "./..";
2
+ import { Button, ConfigProvider, Space } from 'antd';
3
+ import { useResponsive } from 'antd-style';
4
+ import { Link } from 'dumi';
5
+ import * as LucideIcon from 'lucide-react';
6
+ import { memo, useCallback } from 'react';
7
+ import { Center, Flexbox } from 'react-layout-kit';
8
+ import { useStyles } from "./style";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ import { jsxs as _jsxs } from "react/jsx-runtime";
11
+ var Hero = /*#__PURE__*/memo(function (_ref) {
12
+ var title = _ref.title,
13
+ description = _ref.description,
14
+ actions = _ref.actions;
15
+ var _useStyles = useStyles(),
16
+ styles = _useStyles.styles;
17
+ var _useResponsive = useResponsive(),
18
+ mobile = _useResponsive.mobile;
19
+ var ButtonGroups = useCallback(function () {
20
+ return Boolean(actions === null || actions === void 0 ? void 0 : actions.length) && /*#__PURE__*/_jsx(Space, {
21
+ className: styles.actions,
22
+ direction: mobile ? 'vertical' : 'horizontal',
23
+ size: 24,
24
+ children: actions.map(function (_ref2, index) {
25
+ var text = _ref2.text,
26
+ link = _ref2.link,
27
+ openExternal = _ref2.openExternal,
28
+ icon = _ref2.icon,
29
+ type = _ref2.type;
30
+ // @ts-ignore
31
+ var ButtonIcon = icon && LucideIcon[icon];
32
+ return /*#__PURE__*/_jsx(Link, {
33
+ rel: "noreferrer",
34
+ target: openExternal ? '_blank' : undefined,
35
+ to: link,
36
+ children: type === 'primary' ? /*#__PURE__*/_jsx(GradientButton, {
37
+ size: "large",
38
+ children: text
39
+ }, index) : /*#__PURE__*/_jsx(Button, {
40
+ size: "large",
41
+ type: "primary",
42
+ children: /*#__PURE__*/_jsxs(Space, {
43
+ align: "center",
44
+ children: [ButtonIcon && /*#__PURE__*/_jsx(Icon, {
45
+ icon: ButtonIcon,
46
+ size: {
47
+ fontSize: 18,
48
+ strokeWidth: 2
49
+ }
50
+ }), text]
51
+ })
52
+ }, index)
53
+ }, text);
54
+ })
55
+ });
56
+ }, [actions]);
57
+ return /*#__PURE__*/_jsx(ConfigProvider, {
58
+ theme: {
59
+ token: {
60
+ fontSize: 16
61
+ }
62
+ },
63
+ children: /*#__PURE__*/_jsxs(Flexbox, {
64
+ className: styles.container,
65
+ distribution: 'center',
66
+ horizontal: true,
67
+ children: [/*#__PURE__*/_jsx("div", {
68
+ className: styles.canvas
69
+ }), /*#__PURE__*/_jsxs(Center, {
70
+ children: [title && /*#__PURE__*/_jsx("h1", {
71
+ className: styles.title,
72
+ dangerouslySetInnerHTML: {
73
+ __html: title
74
+ }
75
+ }), description && /*#__PURE__*/_jsx("p", {
76
+ className: styles.desc,
77
+ dangerouslySetInnerHTML: {
78
+ __html: description
79
+ }
80
+ }), /*#__PURE__*/_jsx(ButtonGroups, {})]
81
+ })]
82
+ })
83
+ });
84
+ });
85
+ export default Hero;
@@ -0,0 +1,7 @@
1
+ export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
+ container: import("antd-style").SerializedStyles;
3
+ title: import("antd-style").SerializedStyles;
4
+ desc: import("antd-style").SerializedStyles;
5
+ actions: import("antd-style").SerializedStyles;
6
+ canvas: import("antd-style").SerializedStyles;
7
+ }>;