@lobehub/ui 1.118.2 → 1.119.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/README.md +5 -9
- package/README.zh-CN.md +207 -0
- package/es/ActionIcon/index.d.ts +1 -1
- package/es/ActionIcon/index.js +13 -23
- package/es/Alert/index.js +4 -2
- package/es/Alert/style.d.ts +1 -0
- package/es/Alert/style.js +12 -11
- package/es/LogoThree/LogoSpline.js +9 -17
- package/es/LogoThree/index.js +9 -17
- package/es/Tooltip/style.js +1 -1
- package/es/styles/theme/customStylish.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
Lobe UI is an open-source UI component library for building _AIGC_ web apps
|
|
12
12
|
|
|
13
|
-
[Changelog](./CHANGELOG.md) · [Report Bug][github-issues-link] · [Request Feature][github-issues-link]
|
|
13
|
+
English ・ [简体中文](./README.zh-CN.md) ・ [Changelog](./CHANGELOG.md) · [Report Bug][github-issues-link] · [Request Feature][github-issues-link]
|
|
14
14
|
|
|
15
15
|
<!-- SHIELD GROUP -->
|
|
16
16
|
|
|
@@ -37,13 +37,10 @@ Lobe UI is an open-source UI component library for building _AIGC_ web apps
|
|
|
37
37
|
#### TOC
|
|
38
38
|
|
|
39
39
|
- [📦 Installation](#-installation)
|
|
40
|
-
|
|
41
40
|
- [Compile with NextJS](#compile-with-nextjs)
|
|
42
|
-
|
|
41
|
+
- [🤯 Usage](#-usage)
|
|
43
42
|
- [⌨️ Local Development](#️-local-development)
|
|
44
|
-
|
|
45
43
|
- [🤝 Contributing](#-contributing)
|
|
46
|
-
|
|
47
44
|
- [🔗 More Products](#-more-products)
|
|
48
45
|
|
|
49
46
|
####
|
|
@@ -52,7 +49,7 @@ Lobe UI is an open-source UI component library for building _AIGC_ web apps
|
|
|
52
49
|
|
|
53
50
|
## 📦 Installation
|
|
54
51
|
|
|
55
|
-
>
|
|
52
|
+
> \[!IMPORTANT]\
|
|
56
53
|
> This package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
|
|
57
54
|
|
|
58
55
|
To install Lobe UI, run the following command:
|
|
@@ -65,7 +62,7 @@ $ bun add @lobehub/ui
|
|
|
65
62
|
|
|
66
63
|
### Compile with NextJS
|
|
67
64
|
|
|
68
|
-
>
|
|
65
|
+
> \[!NOTE]\
|
|
69
66
|
> By work correct with nextjs ssr, add `transpilePackages: ['@lobehub/ui']` to `next.config.js`. For example:
|
|
70
67
|
|
|
71
68
|
```js
|
|
@@ -85,7 +82,7 @@ const nextConfig = {
|
|
|
85
82
|
|
|
86
83
|
## 🤯 Usage
|
|
87
84
|
|
|
88
|
-
>
|
|
85
|
+
> \[!NOTE]\
|
|
89
86
|
> The LobeUI components are developed based on [Antd](https://ant.design/components/overview/), fully compatible with Antd components,
|
|
90
87
|
> and it is recommended to use [antd-style](https://ant-design.github.io/antd-style/) as the default css-in-js styling solution.
|
|
91
88
|
|
|
@@ -106,7 +103,6 @@ export default () => (
|
|
|
106
103
|
|
|
107
104
|
</div>
|
|
108
105
|
|
|
109
|
-
|
|
110
106
|
## ⌨️ Local Development
|
|
111
107
|
|
|
112
108
|
You can use Github Codespaces for online development:
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
<a name="readme-top"></a>
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
<img height="120" src="https://registry.npmmirror.com/@lobehub/assets-logo/1.0.0/files/assets/logo-3d.webp">
|
|
6
|
+
<img height="120" src="https://gw.alipayobjects.com/zos/kitchen/qJ3l3EPsdW/split.svg">
|
|
7
|
+
<img height="120" src="https://registry.npmmirror.com/@lobehub/assets-emoji/1.3.0/files/assets/lollipop.webp">
|
|
8
|
+
|
|
9
|
+
<h1>Lobe UI</h1>
|
|
10
|
+
|
|
11
|
+
Lobe UI 是一个用于构建 _AIGC_ 网页应用的开源 UI 组件库
|
|
12
|
+
|
|
13
|
+
[English](./README.md) ・ 简体中文 ・ [更新日志](./CHANGELOG.md) · [报告问题][github-issues-link] · [请求功能][github-issues-link]
|
|
14
|
+
|
|
15
|
+
<!-- SHIELD GROUP -->
|
|
16
|
+
|
|
17
|
+
[![][npm-release-shield]][npm-release-link]
|
|
18
|
+
[![][vercel-shield]][vercel-link]
|
|
19
|
+
[![][discord-shield]][discord-link]
|
|
20
|
+
[![][npm-downloads-shield]][npm-downloads-link]
|
|
21
|
+
[![][github-releasedate-shield]][github-releasedate-link]
|
|
22
|
+
[![][github-action-test-shield]][github-action-test-link]
|
|
23
|
+
[![][github-action-release-shield]][github-action-release-link]<br/>
|
|
24
|
+
[![][github-contributors-shield]][github-contributors-link]
|
|
25
|
+
[![][github-forks-shield]][github-forks-link]
|
|
26
|
+
[![][github-stars-shield]][github-stars-link]
|
|
27
|
+
[![][github-issues-shield]][github-issues-link]
|
|
28
|
+
[![][github-license-shield]][github-license-link]
|
|
29
|
+
|
|
30
|
+
[![][banner]][vercel-link]
|
|
31
|
+
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<details>
|
|
35
|
+
<summary><kbd>目录</kbd></summary>
|
|
36
|
+
|
|
37
|
+
#### 目录
|
|
38
|
+
|
|
39
|
+
- [📦 安装](#-安装)
|
|
40
|
+
- [使用 NextJS 编译](#使用-nextjs-编译)
|
|
41
|
+
- [🤯 使用](#-使用)
|
|
42
|
+
- [⌨️ 本地开发](#️-本地开发)
|
|
43
|
+
- [🤝 贡献](#-贡献)
|
|
44
|
+
- [🔗 更多产品](#-更多产品)
|
|
45
|
+
|
|
46
|
+
####
|
|
47
|
+
|
|
48
|
+
</details>
|
|
49
|
+
|
|
50
|
+
## 📦 安装
|
|
51
|
+
|
|
52
|
+
> \[!IMPORTANT]\
|
|
53
|
+
> 该包仅支持 [ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c)。
|
|
54
|
+
|
|
55
|
+
要安装 Lobe UI,请运行以下命令:
|
|
56
|
+
|
|
57
|
+
[![][bun-shield]][bun-link]
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
$ bun add @lobehub/ui
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### 使用 NextJS 编译
|
|
64
|
+
|
|
65
|
+
> \[!NOTE]\
|
|
66
|
+
> 为了正确使用 nextjs ssr,请在 `next.config.js` 中添加 `transpilePackages: ['@lobehub/ui']`。例如:
|
|
67
|
+
|
|
68
|
+
```js
|
|
69
|
+
// next.config.js
|
|
70
|
+
const nextConfig = {
|
|
71
|
+
// ...其他配置
|
|
72
|
+
|
|
73
|
+
transpilePackages: ['@lobehub/ui'],
|
|
74
|
+
};
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
<div align="right">
|
|
78
|
+
|
|
79
|
+
[![][back-to-top]](#readme-top)
|
|
80
|
+
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
## 🤯 使用
|
|
84
|
+
|
|
85
|
+
> \[!NOTE]\
|
|
86
|
+
> LobeUI 组件是基于 [Antd](https://ant.design/components/overview/) 开发的,完全兼容 Antd 组件,
|
|
87
|
+
> 推荐使用 [antd-style](https://ant-design.github.io/antd-style/) 作为默认的 css-in-js 样式解决方案。
|
|
88
|
+
|
|
89
|
+
```tsx
|
|
90
|
+
import { ThemeProvider, Button } from '@lobehub/ui'
|
|
91
|
+
import { Button } from 'antd'
|
|
92
|
+
|
|
93
|
+
export default () => (
|
|
94
|
+
<ThemeProvider>
|
|
95
|
+
<Button>Hello AIGC</Button>
|
|
96
|
+
</ThemeProvider>
|
|
97
|
+
)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
<div align="right">
|
|
101
|
+
|
|
102
|
+
[![][back-to-top]](#readme-top)
|
|
103
|
+
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
## ⌨️ 本地开发
|
|
107
|
+
|
|
108
|
+
您可以使用 Github Codespaces 进行在线开发:
|
|
109
|
+
|
|
110
|
+
[![][codespaces-shield]][codespaces-link]
|
|
111
|
+
|
|
112
|
+
或者克隆到本地进行开发:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
$ git clone https://github.com/lobehub/lobe-ui.git
|
|
116
|
+
$ cd lobe-ui
|
|
117
|
+
$ bun install
|
|
118
|
+
$ bun start
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
<div align="right">
|
|
122
|
+
|
|
123
|
+
[![][back-to-top]](#readme-top)
|
|
124
|
+
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
## 🤝 贡献
|
|
128
|
+
|
|
129
|
+
欢迎各种类型的贡献,如果您有兴趣贡献代码,请随时查看我们的 GitHub [问题][github-issues-link],并展示您的才华。
|
|
130
|
+
|
|
131
|
+
[![][pr-welcome-shield]][pr-welcome-link]
|
|
132
|
+
|
|
133
|
+
[![][contributors-contrib]][contributors-link]
|
|
134
|
+
|
|
135
|
+
<div align="right">
|
|
136
|
+
|
|
137
|
+
[![][back-to-top]](#readme-top)
|
|
138
|
+
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
## 🔗 更多产品
|
|
142
|
+
|
|
143
|
+
- **[🤖 Lobe Chat][lobe-chat] :** 一个开源、可扩展(函数调用)、高性能的聊天机器人框架。支持一键免费部署私有 ChatGPT/LLM 网页应用程序。
|
|
144
|
+
- **[🤯 Lobe Theme][lobe-theme] :** 稳定扩散 WebUI 的现代主题,精美的界面设计,高度可定制的 UI 和提高效率的功能。
|
|
145
|
+
- **[🌏 Lobe i18n][lobe-i18n] :** Lobe i18n 是一个由 ChatGPT 提供支持的自动化工具,用于 i18n(国际化)翻译过程。它支持诸如大文件的自动拆分、增量更新和对 OpenAI 模型、API 代理和温度的自定义选项等功能。
|
|
146
|
+
- **[💌 Lobe Commit][lobe-commit] :** Lobe Commit 是一个利用 Langchain/ChatGPT 生成基于 Gitmoji 的提交消息的 CLI 工具。
|
|
147
|
+
|
|
148
|
+
<div align="right">
|
|
149
|
+
|
|
150
|
+
[![][back-to-top]](#readme-top)
|
|
151
|
+
|
|
152
|
+
</div>
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
<details><summary><h4>📝 License</h4></summary>
|
|
157
|
+
|
|
158
|
+
[![][fossa-license-shield]][fossa-license-link]
|
|
159
|
+
|
|
160
|
+
</details>
|
|
161
|
+
|
|
162
|
+
Copyright © 2023 [LobeHub][profile-link]. <br />
|
|
163
|
+
This project is [MIT](./LICENSE) licensed.
|
|
164
|
+
|
|
165
|
+
<!-- LINK GROUP -->
|
|
166
|
+
|
|
167
|
+
[back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square
|
|
168
|
+
[banner]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/268452017-960ab8a1-e4b7-4648-beb1-77daf4b6034a.png
|
|
169
|
+
[bun-link]: https://bun.sh
|
|
170
|
+
[bun-shield]: https://img.shields.io/badge/-speedup%20with%20bun-black?logo=bun&style=for-the-badge
|
|
171
|
+
[codespaces-link]: https://codespaces.new/lobehub/lobe-ui
|
|
172
|
+
[codespaces-shield]: https://github.com/codespaces/badge.svg
|
|
173
|
+
[contributors-contrib]: https://contrib.rocks/image?repo=lobehub/lobe-ui
|
|
174
|
+
[contributors-link]: https://github.com/lobehub/lobe-ui/graphs/contributors
|
|
175
|
+
[discord-link]: https://discord.gg/AYFPHvv2jT
|
|
176
|
+
[discord-shield]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square
|
|
177
|
+
[fossa-license-link]: https://app.fossa.com/projects/git%2Bgithub.com%2Flobehub%2Flobe-ui
|
|
178
|
+
[fossa-license-shield]: https://app.fossa.com/api/projects/git%2Bgithub.com%2Flobehub%2Flobe-ui.svg?type=large
|
|
179
|
+
[github-action-release-link]: https://github.com/actions/workflows/lobehub/lobe-ui/release.yml
|
|
180
|
+
[github-action-release-shield]: https://img.shields.io/github/actions/workflow/status/lobehub/lobe-ui/release.yml?label=release&labelColor=black&logo=githubactions&logoColor=white&style=flat-square
|
|
181
|
+
[github-action-test-link]: https://github.com/actions/workflows/lobehub/lobe-ui/test.yml
|
|
182
|
+
[github-action-test-shield]: https://img.shields.io/github/actions/workflow/status/lobehub/lobe-ui/test.yml?label=test&labelColor=black&logo=githubactions&logoColor=white&style=flat-square
|
|
183
|
+
[github-contributors-link]: https://github.com/lobehub/lobe-ui/graphs/contributors
|
|
184
|
+
[github-contributors-shield]: https://img.shields.io/github/contributors/lobehub/lobe-ui?color=c4f042&labelColor=black&style=flat-square
|
|
185
|
+
[github-forks-link]: https://github.com/lobehub/lobe-ui/network/members
|
|
186
|
+
[github-forks-shield]: https://img.shields.io/github/forks/lobehub/lobe-ui?color=8ae8ff&labelColor=black&style=flat-square
|
|
187
|
+
[github-issues-link]: https://github.com/lobehub/lobe-ui/issues
|
|
188
|
+
[github-issues-shield]: https://img.shields.io/github/issues/lobehub/lobe-ui?color=ff80eb&labelColor=black&style=flat-square
|
|
189
|
+
[github-license-link]: https://github.com/lobehub/lobe-ui/blob/master/LICENSE
|
|
190
|
+
[github-license-shield]: https://img.shields.io/github/license/lobehub/lobe-ui?color=white&labelColor=black&style=flat-square
|
|
191
|
+
[github-releasedate-link]: https://github.com/lobehub/lobe-ui/releases
|
|
192
|
+
[github-releasedate-shield]: https://img.shields.io/github/release-date/lobehub/lobe-ui?labelColor=black&style=flat-square
|
|
193
|
+
[github-stars-link]: https://github.com/lobehub/lobe-ui/network/stargazers
|
|
194
|
+
[github-stars-shield]: https://img.shields.io/github/stars/lobehub/lobe-ui?color=ffcb47&labelColor=black&style=flat-square
|
|
195
|
+
[lobe-chat]: https://github.com/lobehub/lobe-chat
|
|
196
|
+
[lobe-commit]: https://github.com/lobehub/lobe-commit/tree/master/packages/lobe-commit
|
|
197
|
+
[lobe-i18n]: https://github.com/lobehub/lobe-commit/tree/master/packages/lobe-i18n
|
|
198
|
+
[lobe-theme]: https://github.com/lobehub/sd-webui-lobe-theme
|
|
199
|
+
[npm-downloads-link]: https://www.npmjs.com/package/@lobehub/ui
|
|
200
|
+
[npm-downloads-shield]: https://img.shields.io/npm/dt/@lobehub/ui?labelColor=black&style=flat-square
|
|
201
|
+
[npm-release-link]: https://www.npmjs.com/package/@lobehub/ui
|
|
202
|
+
[npm-release-shield]: https://img.shields.io/npm/v/@lobehub/ui?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square
|
|
203
|
+
[pr-welcome-link]: https://github.com/lobehub/lobe-chat/pulls
|
|
204
|
+
[pr-welcome-shield]: https://img.shields.io/badge/🤯_pr_welcome-%E2%86%92-ffcb47?labelColor=black&style=for-the-badge
|
|
205
|
+
[profile-link]: https://github.com/lobehub
|
|
206
|
+
[vercel-link]: https://ui.lobehub.com
|
|
207
|
+
[vercel-shield]: https://img.shields.io/website?down_message=offline&label=vercel&labelColor=black&logo=vercel&style=flat-square&up_message=online&url=https%3A%2F%2Fui.lobehub.com
|
package/es/ActionIcon/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type IconProps, type IconSizeConfig, type IconSizeType } from "../Icon";
|
|
3
|
-
import type
|
|
3
|
+
import { type TooltipProps } from "../Tooltip";
|
|
4
4
|
interface ActionIconSizeConfig extends IconSizeConfig {
|
|
5
5
|
blockSize?: number;
|
|
6
6
|
borderRadius?: number;
|
package/es/ActionIcon/index.js
CHANGED
|
@@ -4,18 +4,14 @@ var _excluded = ["color", "fill", "className", "active", "icon", "size", "style"
|
|
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
6
|
import { Loader2 } from 'lucide-react';
|
|
7
|
-
import {
|
|
7
|
+
import { forwardRef, useMemo } from 'react';
|
|
8
8
|
import Icon from "../Icon";
|
|
9
|
+
import Spotlight from "../Spotlight";
|
|
10
|
+
import Tooltip from "../Tooltip";
|
|
9
11
|
import { calcSize } from "./calcSize";
|
|
10
12
|
import { useStyles } from "./style";
|
|
11
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
var Tooltip = /*#__PURE__*/lazy(function () {
|
|
14
|
-
return import("../Tooltip");
|
|
15
|
-
});
|
|
16
|
-
var Spotlight = /*#__PURE__*/lazy(function () {
|
|
17
|
-
return import("../Spotlight");
|
|
18
|
-
});
|
|
19
15
|
var ActionIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
20
16
|
var color = _ref.color,
|
|
21
17
|
fill = _ref.fill,
|
|
@@ -78,24 +74,18 @@ var ActionIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
78
74
|
width: blockSize
|
|
79
75
|
}, style)
|
|
80
76
|
}, rest), {}, {
|
|
81
|
-
children: [/*#__PURE__*/_jsx(
|
|
82
|
-
fallback: null,
|
|
83
|
-
children: spotlight && /*#__PURE__*/_jsx(Spotlight, {})
|
|
84
|
-
}), loading ? spin : content, children]
|
|
77
|
+
children: [spotlight && /*#__PURE__*/_jsx(Spotlight, {}), loading ? spin : content, children]
|
|
85
78
|
}));
|
|
86
79
|
if (!title) return actionIconBlock;
|
|
87
|
-
return /*#__PURE__*/_jsx(
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
title: title,
|
|
97
|
-
children: actionIconBlock
|
|
98
|
-
})
|
|
80
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
|
81
|
+
arrow: arrow,
|
|
82
|
+
mouseEnterDelay: tooltipDelay,
|
|
83
|
+
overlayStyle: {
|
|
84
|
+
pointerEvents: 'none'
|
|
85
|
+
},
|
|
86
|
+
placement: placement,
|
|
87
|
+
title: title,
|
|
88
|
+
children: actionIconBlock
|
|
99
89
|
});
|
|
100
90
|
});
|
|
101
91
|
export default ActionIcon;
|
package/es/Alert/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["closeIcon", "closable", "description", "showIcon", "type", "variant", "icon", "colorfulText", "style", "extra", "classNames", "text", "extraDefaultExpand", "extraIsolate"];
|
|
4
|
+
var _excluded = ["closeIcon", "closable", "description", "showIcon", "type", "variant", "icon", "colorfulText", "style", "extra", "classNames", "text", "extraDefaultExpand", "extraIsolate", "banner"];
|
|
5
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
import { Alert as AntdAlert, message } from 'antd';
|
|
@@ -47,6 +47,7 @@ var Alert = /*#__PURE__*/memo(function (_ref) {
|
|
|
47
47
|
_ref$extraDefaultExpa = _ref.extraDefaultExpand,
|
|
48
48
|
extraDefaultExpand = _ref$extraDefaultExpa === void 0 ? false : _ref$extraDefaultExpa,
|
|
49
49
|
extraIsolate = _ref.extraIsolate,
|
|
50
|
+
banner = _ref.banner,
|
|
50
51
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
51
52
|
var _useState = useState(extraDefaultExpand),
|
|
52
53
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -62,6 +63,7 @@ var Alert = /*#__PURE__*/memo(function (_ref) {
|
|
|
62
63
|
cx = _useStyles.cx;
|
|
63
64
|
var isInsideExtra = !extraIsolate && !!extra;
|
|
64
65
|
var alert = /*#__PURE__*/_jsx(AntdAlert, _objectSpread({
|
|
66
|
+
banner: banner,
|
|
65
67
|
className: cx(styles.container, colorfulText && styles.colorfulText, !!isInsideExtra && styles.hasExtra, variant === 'block' && styles.variantBlock, variant === 'ghost' && styles.variantGhost, variant === 'pure' && styles.variantPure, classNames === null || classNames === void 0 ? void 0 : classNames.alert, !isInsideExtra && styles.container),
|
|
66
68
|
closable: closable,
|
|
67
69
|
closeIcon: closeIcon || /*#__PURE__*/_jsx(ActionIcon, {
|
|
@@ -91,7 +93,7 @@ var Alert = /*#__PURE__*/memo(function (_ref) {
|
|
|
91
93
|
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
92
94
|
className: classNames === null || classNames === void 0 ? void 0 : classNames.container,
|
|
93
95
|
children: [alert, /*#__PURE__*/_jsxs(Flexbox, {
|
|
94
|
-
className: cx(styles.extra, variant === 'block' && styles.variantBlock, variant === 'ghost' && styles.variantGhost, variant === 'pure' && styles.variantPure),
|
|
96
|
+
className: cx(styles.extra, banner && styles.banner, variant === 'block' && styles.variantBlock, variant === 'ghost' && styles.variantGhost, variant === 'pure' && styles.variantPure),
|
|
95
97
|
style: {
|
|
96
98
|
background: colors(theme, type, 'bg'),
|
|
97
99
|
borderColor: colors(theme, type, 'border'),
|
package/es/Alert/style.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export declare const useStyles: (props?: {
|
|
|
3
3
|
hasTitle?: boolean | undefined;
|
|
4
4
|
showIcon?: boolean | undefined;
|
|
5
5
|
} | undefined) => import("antd-style").ReturnStyles<{
|
|
6
|
+
banner: import("antd-style").SerializedStyles;
|
|
6
7
|
colorfulText: import("antd-style").SerializedStyles;
|
|
7
8
|
container: string;
|
|
8
9
|
extra: import("antd-style").SerializedStyles;
|
package/es/Alert/style.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
|
|
3
3
|
import { createStyles } from 'antd-style';
|
|
4
4
|
export var useStyles = createStyles(function (_ref, _ref2) {
|
|
5
5
|
var cx = _ref.cx,
|
|
@@ -12,15 +12,16 @@ export var useStyles = createStyles(function (_ref, _ref2) {
|
|
|
12
12
|
var baseBlockPadding = hasTitle ? 16 : 8;
|
|
13
13
|
var baseInlinePadding = hasTitle ? 16 : 12;
|
|
14
14
|
return {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
banner: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border: none;\n border-radius: 0;\n "]))),
|
|
16
|
+
colorfulText: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", "-alert-message,.", "-alert-description {\n color: inherit;\n }\n "])), prefixCls, prefixCls),
|
|
17
|
+
container: cx(css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n\n display: flex;\n flex-direction: row;\n gap: ", "px;\n align-items: flex-start;\n\n max-width: 100%;\n padding-right: ", "px;\n padding-left: ", "px;\n padding-block: ", "px;\n\n .", "-alert-message {\n font-weight: ", ";\n line-height: 24px;\n word-break: break-all;\n }\n .", "-alert-icon {\n display: flex;\n align-items: center;\n height: 24px;\n margin: 0;\n }\n .", "-alert-close-icon {\n display: flex;\n align-items: center;\n height: 24px;\n margin: 0;\n }\n "])), hasTitle ? 12 : 8, closable ? baseInlinePadding : baseInlinePadding * 1.5, showIcon ? baseInlinePadding : baseInlinePadding * 1.5, baseBlockPadding, prefixCls, hasTitle ? 600 : 400, prefixCls, prefixCls), hasTitle && css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .", "-alert-description {\n line-height: 1.5;\n word-break: break-all;\n opacity: 0.75;\n }\n "])), prefixCls)),
|
|
18
|
+
extra: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: relative;\n\n overflow: hidden;\n\n max-width: 100%;\n\n border: 1px solid;\n border-top: none;\n border-bottom-right-radius: ", "px;\n border-bottom-left-radius: ", "px;\n "])), token.borderRadiusLG, token.borderRadiusLG),
|
|
19
|
+
extraBody: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n overflow-x: auto;\n width: 100%;\n padding-block: ", "px;\n padding-inline: ", "px;\n "])), baseBlockPadding, baseInlinePadding),
|
|
20
|
+
extraHeader: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n padding-block: ", "px;\n padding-inline: ", "px;\n border-top: 1px dashed;\n "])), baseBlockPadding * 0.75, baseInlinePadding * 0.75),
|
|
21
|
+
hasExtra: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n border-bottom: none;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n "]))),
|
|
22
|
+
variantBlock: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n border: none;\n "]))),
|
|
23
|
+
variantGhost: css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n background: transparent !important;\n "]))),
|
|
24
|
+
variantPure: css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n padding: 0 !important;\n background: transparent !important;\n border: none;\n "]))),
|
|
25
|
+
variantPureExtraHeader: css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n margin-top: ", "px;\n margin-left: ", "px;\n padding-inline: 0;\n "])), baseBlockPadding, -baseInlinePadding * 0.25)
|
|
25
26
|
};
|
|
26
27
|
});
|
|
@@ -2,15 +2,12 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
import Spline from '@splinetool/react-spline';
|
|
5
6
|
import { useThemeMode } from 'antd-style';
|
|
6
|
-
import {
|
|
7
|
+
import { memo, useState } from 'react';
|
|
7
8
|
import Loading from "./Loading";
|
|
8
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
var Spline = /*#__PURE__*/lazy(function () {
|
|
12
|
-
return import('@splinetool/react-spline');
|
|
13
|
-
});
|
|
14
11
|
var LIGHT = 'https://gw.alipayobjects.com/os/kitchen/J9jiHITGrs/scene.splinecode';
|
|
15
12
|
var DARK = 'https://gw.alipayobjects.com/os/kitchen/CzQKKvSE8a/scene.splinecode';
|
|
16
13
|
var LogoSpline = /*#__PURE__*/memo(function (_ref) {
|
|
@@ -24,24 +21,19 @@ var LogoSpline = /*#__PURE__*/memo(function (_ref) {
|
|
|
24
21
|
_useState2 = _slicedToArray(_useState, 2),
|
|
25
22
|
loading = _useState2[0],
|
|
26
23
|
setLoading = _useState2[1];
|
|
27
|
-
return /*#__PURE__*/
|
|
24
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
28
25
|
className: className,
|
|
29
26
|
style: _objectSpread({
|
|
30
27
|
height: height,
|
|
31
28
|
position: 'relative',
|
|
32
29
|
width: width
|
|
33
30
|
}, style),
|
|
34
|
-
children: /*#__PURE__*/_jsx(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
scene: isDarkMode ? DARK : LIGHT
|
|
42
|
-
})]
|
|
43
|
-
})
|
|
44
|
-
})
|
|
31
|
+
children: [loading && /*#__PURE__*/_jsx(Loading, {}), /*#__PURE__*/_jsx(Spline, {
|
|
32
|
+
onLoad: function onLoad() {
|
|
33
|
+
return setLoading(false);
|
|
34
|
+
},
|
|
35
|
+
scene: isDarkMode ? DARK : LIGHT
|
|
36
|
+
})]
|
|
45
37
|
});
|
|
46
38
|
});
|
|
47
39
|
export default LogoSpline;
|
package/es/LogoThree/index.js
CHANGED
|
@@ -2,14 +2,11 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
-
import
|
|
5
|
+
import Spline from '@splinetool/react-spline';
|
|
6
|
+
import { memo, useState } from 'react';
|
|
6
7
|
import Loading from "./Loading";
|
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
9
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
-
var Spline = /*#__PURE__*/lazy(function () {
|
|
11
|
-
return import('@splinetool/react-spline');
|
|
12
|
-
});
|
|
13
10
|
var LogoThree = /*#__PURE__*/memo(function (_ref) {
|
|
14
11
|
var className = _ref.className,
|
|
15
12
|
style = _ref.style,
|
|
@@ -18,24 +15,19 @@ var LogoThree = /*#__PURE__*/memo(function (_ref) {
|
|
|
18
15
|
_useState2 = _slicedToArray(_useState, 2),
|
|
19
16
|
loading = _useState2[0],
|
|
20
17
|
setLoading = _useState2[1];
|
|
21
|
-
return /*#__PURE__*/
|
|
18
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
22
19
|
className: className,
|
|
23
20
|
style: _objectSpread({
|
|
24
21
|
height: size,
|
|
25
22
|
position: 'relative',
|
|
26
23
|
width: size
|
|
27
24
|
}, style),
|
|
28
|
-
children: /*#__PURE__*/_jsx(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
scene: 'https://gw.alipayobjects.com/os/kitchen/8LH7slSv3s/logo.splinecode'
|
|
36
|
-
})]
|
|
37
|
-
})
|
|
38
|
-
})
|
|
25
|
+
children: [loading && /*#__PURE__*/_jsx(Loading, {}), /*#__PURE__*/_jsx(Spline, {
|
|
26
|
+
onLoad: function onLoad() {
|
|
27
|
+
return setLoading(false);
|
|
28
|
+
},
|
|
29
|
+
scene: 'https://gw.alipayobjects.com/os/kitchen/8LH7slSv3s/logo.splinecode'
|
|
30
|
+
})]
|
|
39
31
|
});
|
|
40
32
|
});
|
|
41
33
|
export default LogoThree;
|
package/es/Tooltip/style.js
CHANGED
|
@@ -6,6 +6,6 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
6
6
|
token = _ref.token,
|
|
7
7
|
prefixCls = _ref.prefixCls;
|
|
8
8
|
return {
|
|
9
|
-
tooltip: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", "-tooltip-inner {\n display: flex;\n align-items: center;\n justify-content: center;\n\n min-height: unset;\n padding: 4px 8px;\n\n color: ", ";\n\n background-color: ", ";\n border-radius: ", "px;\n }\n\n .", "-tooltip-arrow {\n &::before,\n &::after {\n background: ", ";\n }\n }\n "])), prefixCls, token.colorBgLayout, token.colorText, token.borderRadiusSM, prefixCls, token.colorText)
|
|
9
|
+
tooltip: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", "-tooltip-inner {\n display: flex;\n align-items: center;\n justify-content: center;\n\n min-height: unset;\n padding: 4px 8px;\n\n color: ", ";\n\n background-color: ", ";\n border-radius: ", "px;\n\n word-break: break-all;\n }\n\n .", "-tooltip-arrow {\n &::before,\n &::after {\n background: ", ";\n }\n }\n "])), prefixCls, token.colorBgLayout, token.colorText, token.borderRadiusSM, prefixCls, token.colorText)
|
|
10
10
|
};
|
|
11
11
|
});
|
|
@@ -13,8 +13,8 @@ export var generateCustomStylish = function generateCustomStylish(_ref) {
|
|
|
13
13
|
blurStrong: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n backdrop-filter: blur(36px);\n "]))),
|
|
14
14
|
bottomScrollbar: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ::-webkit-scrollbar {\n width: 0;\n height: 4px;\n background-color: transparent;\n\n &-thumb {\n background-color: ", ";\n border-radius: 4px;\n transition: background-color 500ms ", ";\n }\n\n &-corner {\n display: none;\n width: 0;\n height: 0;\n }\n }\n "])), token.colorFill, token.motionEaseOut),
|
|
15
15
|
gradientAnimation: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background-image: linear-gradient(\n -45deg,\n ", ",\n ", ",\n ", ",\n ", "\n );\n background-size: 400% 400%;\n border-radius: inherit;\n animation: 5s ", " 5s ease infinite;\n "])), token.gold, token.magenta, token.geekblue, token.cyan, gradient),
|
|
16
|
-
markdown: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n color: ", ";\n\n h1,\n h2,\n h3,\n h4,\n h5 {\n font-weight: 600;\n }\n\n p {\n margin-block: 0 0;\n
|
|
17
|
-
markdownInChat: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n h1 {\n margin-top: 0;\n margin-block-start: 0;\n font-size: 1.6em;\n }\n\n h2 {\n margin-top: 0;\n margin-block-start: 0;\n font-size: 1.4em;\n }\n\n h3 {\n margin-top: 0;\n margin-block-start: 0;\n font-size: 1.2em;\n }\n\n h4 {\n margin-top: 0;\n margin-block-start: 0;\n font-size: 1.1em;\n }\n\n h5 {\n margin-top: 0;\n margin-block-start: 0;\n font-size: 1em;\n }\n\n > *:last-child {\n margin-bottom: 0 !important;\n }\n\n p {\n line-height: 1.8 !important;\n\n + * {\n margin-block-end: 0.5em !important;\n }\n\n &:not(:last-child) {\n margin-bottom: 1em !important;\n }\n }\n "]))),
|
|
16
|
+
markdown: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n color: ", ";\n\n h1,\n h2,\n h3,\n h4,\n h5 {\n font-weight: 600;\n }\n\n p {\n margin-block: 0 0;\n font-size: 14px;\n line-height: 2;\n color: ", ";\n\n + * {\n margin-block-end: 1em;\n }\n\n &:not(:last-child) {\n margin-bottom: 1.5em;\n }\n }\n\n blockquote {\n margin: 16px 0;\n padding: 0 12px;\n\n p {\n font-style: italic;\n color: ", ";\n }\n }\n\n a {\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n\n &:active {\n color: ", ";\n }\n }\n\n img {\n max-width: 100%;\n }\n\n pre,\n [data-code-type='highlighter'] {\n border: none;\n border-radius: ", "px;\n\n > code {\n padding: 0 !important;\n border: none !important;\n }\n }\n\n > :not([data-code-type='highlighter']) code {\n padding: 2px 6px;\n\n font-size: ", "px;\n color: ", ";\n\n background: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n }\n\n table {\n border-spacing: 0;\n\n width: 100%;\n margin-block: 1em 1em;\n margin-inline: 0 0;\n padding: 8px;\n\n border: 1px solid ", ";\n border-radius: ", "px;\n\n code {\n display: inline-flex;\n }\n }\n\n th,\n td {\n padding-block: 10px 10px;\n padding-inline: 16px 16px;\n }\n\n thead {\n tr {\n th {\n background: ", ";\n\n &:first-child {\n border-top-left-radius: ", "px;\n border-bottom-left-radius: ", "px;\n }\n\n &:last-child {\n border-top-right-radius: ", "px;\n border-bottom-right-radius: ", "px;\n }\n }\n }\n }\n\n > ol > li::marker {\n color: ", " !important;\n }\n\n > ul > li {\n line-height: 1.8;\n list-style-type: disc;\n\n &::marker {\n color: ", " !important;\n }\n }\n\n ol,\n ul {\n > li::marker {\n color: ", ";\n }\n }\n\n details {\n margin-bottom: 1em;\n padding: 12px 16px;\n\n background: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n\n transition: all 400ms ", ";\n }\n\n details[open] {\n summary {\n padding-bottom: 12px;\n border-bottom: 1px solid ", ";\n }\n }\n "])), token.colorText, token.colorText, token.colorTextDescription, token.colorLink, token.colorLinkHover, token.colorLinkActive, token.borderRadius, token.fontSizeSM, cyanColor, cyanBackground, isDarkMode ? token.cyan1A : token.cyan6A, token.borderRadiusSM, token.colorBorderSecondary, token.borderRadius, token.colorFillTertiary, token.borderRadius, token.borderRadius, token.borderRadius, token.borderRadius, isDarkMode ? token.cyan9A : token.cyan10A, isDarkMode ? token.cyan9A : token.cyan10A, token.colorTextDescription, token.colorFillTertiary, token.colorBorderSecondary, token.borderRadiusLG, token.motionEaseOut, token.colorBorder),
|
|
17
|
+
markdownInChat: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n h1 {\n margin-top: 0;\n margin-block-start: 0;\n font-size: 1.6em;\n }\n\n h2 {\n margin-top: 0;\n margin-block-start: 0;\n font-size: 1.4em;\n }\n\n h3 {\n margin-top: 0;\n margin-block-start: 0;\n font-size: 1.2em;\n }\n\n h4 {\n margin-top: 0;\n margin-block-start: 0;\n font-size: 1.1em;\n }\n\n h5 {\n margin-top: 0;\n margin-block-start: 0;\n font-size: 1em;\n }\n\n > *:last-child {\n margin-bottom: 0 !important;\n }\n\n p {\n line-height: 1.8 !important;\n white-space: pre-wrap !important;\n\n + * {\n margin-block-end: 0.5em !important;\n }\n\n &:not(:last-child) {\n margin-bottom: 1em !important;\n }\n }\n "]))),
|
|
18
18
|
noScrollbar: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n ::-webkit-scrollbar {\n display: none;\n width: 0;\n height: 0;\n background-color: transparent;\n }\n "]))),
|
|
19
19
|
resetLinkColor: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n cursor: pointer;\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n "])), token.colorTextSecondary, token.colorText)
|
|
20
20
|
};
|