gz-ui-web 1.0.6-beta.0 → 1.1.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 +82 -82
- package/gz-ui-web-lib/{ValuationLogDataChart-gUnqDlS-.js → ValuationLogDataChart-GC_ceWlw.js} +288 -287
- package/gz-ui-web-lib/{ValuationLogDataChart-BbAC7-QU.cjs → ValuationLogDataChart-qgQixKkS.cjs} +4 -4
- package/gz-ui-web-lib/business-components/list-panel/ItemContent.d.ts +14 -0
- package/gz-ui-web-lib/business-components/list-panel/ListPanel.d.ts +2 -0
- package/gz-ui-web-lib/business-components/list-panel/TreeList.d.ts +10 -0
- package/gz-ui-web-lib/business-components/list-panel/index.d.ts +2 -0
- package/gz-ui-web-lib/business-components/list-panel/theme.d.ts +10 -0
- package/gz-ui-web-lib/business-components/list-panel/treeChecking.d.ts +10 -0
- package/gz-ui-web-lib/business-components/list-panel/types.d.ts +138 -0
- package/gz-ui-web-lib/business-components/list-panel/useCollapseMotion.d.ts +5 -0
- package/gz-ui-web-lib/business-components/list-panel/usePanelState.d.ts +2 -0
- package/gz-ui-web-lib/business-components/list-panel/useSearchExpansion.d.ts +3 -0
- package/gz-ui-web-lib/business-components/list-panel/utils.d.ts +4 -0
- package/gz-ui-web-lib/business-components/pcs/index.cjs +1 -1
- package/gz-ui-web-lib/business-components/pcs/index.js +1 -1
- package/gz-ui-web-lib/components/cascader/Panel.d.ts +3 -0
- package/gz-ui-web-lib/components/splitter/Splitter.d.ts +9 -0
- package/gz-ui-web-lib/components/splitter/index.d.ts +11 -0
- package/gz-ui-web-lib/gz-ui-web.css +1 -1
- package/gz-ui-web-lib/index.cjs +57 -1
- package/gz-ui-web-lib/index.d.ts +3 -0
- package/gz-ui-web-lib/index.js +1778 -747
- package/package.json +132 -132
package/README.md
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
# GZ UI Web 组件库
|
|
2
|
-
|
|
3
|
-
## 安装
|
|
4
|
-
|
|
5
|
-
要求项目使用 React `^19.2.5`、ReactDOM `^19.2.5` 和 Ant Design `^6.5.1`。
|
|
6
|
-
|
|
7
|
-
普通组件项目安装主包:
|
|
8
|
-
|
|
9
|
-
```shell
|
|
10
|
-
npm install gz-ui-web
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
项目使用 `Table` 或 `gz-ui-web/gz-table` 时,还要安装表格相关的 peer dependencies:
|
|
14
|
-
|
|
15
|
-
```shell
|
|
16
|
-
npm install ag-grid-community@36.0.1 ag-grid-enterprise@36.0.1 ag-grid-react@36.0.1
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## 使用
|
|
20
|
-
|
|
21
|
-
### 1. 根组件包裹(main.tsx)
|
|
22
|
-
|
|
23
|
-
```ts
|
|
24
|
-
import 'gz-ui-web/gz-ui-web.css';
|
|
25
|
-
import { createRoot } from 'react-dom/client';
|
|
26
|
-
import { RouterProvider } from 'react-router-dom';
|
|
27
|
-
import { ConfigProvider, type GZThemeMode } from 'gz-ui-web';
|
|
28
|
-
import { router } from '@/router';
|
|
29
|
-
|
|
30
|
-
const themeMode: GZThemeMode = 'gold-dark';
|
|
31
|
-
|
|
32
|
-
createRoot(document.getElementById('root')!).render(
|
|
33
|
-
<ConfigProvider themeMode={themeMode}>
|
|
34
|
-
<RouterProvider router={router} />
|
|
35
|
-
</ConfigProvider>,
|
|
36
|
-
);
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
### 2. 组件使用
|
|
41
|
-
|
|
42
|
-
- 以 Button 组件为例
|
|
43
|
-
|
|
44
|
-
```ts
|
|
45
|
-
import { Button } from 'gz-ui-web';
|
|
46
|
-
|
|
47
|
-
const App = () => {
|
|
48
|
-
return (
|
|
49
|
-
<div>
|
|
50
|
-
<Button>默认按钮</Button>
|
|
51
|
-
</div>
|
|
52
|
-
);
|
|
53
|
-
};
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### 3. Table 和 AG Grid API
|
|
57
|
-
|
|
58
|
-
`Table` 从主包导入;AG Grid 类型、底层 API 和 gz-ui-web 生成的 Grid Token 从 `gz-table` 子入口导入:
|
|
59
|
-
|
|
60
|
-
```tsx
|
|
61
|
-
import { Table } from 'gz-ui-web';
|
|
62
|
-
import {
|
|
63
|
-
goldDarkAgGridTokens,
|
|
64
|
-
type ColDef,
|
|
65
|
-
} from 'gz-ui-web/gz-table';
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
`Table` 在 Gold 主题下会自动使用对应的 AG Grid Token。详见 [Table 文档](./src/components/table/index.md) 和 [AG Grid Token 文档](./docs/tokens/ag-grid-table.md)。
|
|
69
|
-
|
|
70
|
-
项目图表技术栈统一使用 ECharts,不单独维护图表 Token。图表颜色、文字和背景直接通过 `getDesignTokens({ themeMode }).globalToken` 获取,完整示例见 [全局 Tokens](./docs/tokens.md)。
|
|
71
|
-
|
|
72
|
-
## 导入 UI Design Tokens
|
|
73
|
-
|
|
74
|
-
在仓库根目录执行,一次完成 UI 交付包导入与 Token、文档生成:
|
|
75
|
-
|
|
76
|
-
```shell
|
|
77
|
-
npm run tokens:import -- "/path/to/UI 交付包目录"
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
这是日常导入的唯一入口,已包含 Token 转换和文档生成,无需再执行其他生成命令。
|
|
81
|
-
|
|
82
|
-
自动导入交付目录中 `gold-theme/`、`blue-theme/` 下的所有主题及明暗模式,统一生成一次;追加 `--dry-run` 可只预览。没有主题标识的单主题旧包需用 `--theme gold` 或 `--theme blue` 指明归属。交付包结构、失败恢复及验证说明见 [Design Tokens 源文件维护指南](./guozhi-design-tokens-origin/README.md)。
|
|
1
|
+
# GZ UI Web 组件库
|
|
2
|
+
|
|
3
|
+
## 安装
|
|
4
|
+
|
|
5
|
+
要求项目使用 React `^19.2.5`、ReactDOM `^19.2.5` 和 Ant Design `^6.5.1`。
|
|
6
|
+
|
|
7
|
+
普通组件项目安装主包:
|
|
8
|
+
|
|
9
|
+
```shell
|
|
10
|
+
npm install gz-ui-web
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
项目使用 `Table` 或 `gz-ui-web/gz-table` 时,还要安装表格相关的 peer dependencies:
|
|
14
|
+
|
|
15
|
+
```shell
|
|
16
|
+
npm install ag-grid-community@36.0.1 ag-grid-enterprise@36.0.1 ag-grid-react@36.0.1
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 使用
|
|
20
|
+
|
|
21
|
+
### 1. 根组件包裹(main.tsx)
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import 'gz-ui-web/gz-ui-web.css';
|
|
25
|
+
import { createRoot } from 'react-dom/client';
|
|
26
|
+
import { RouterProvider } from 'react-router-dom';
|
|
27
|
+
import { ConfigProvider, type GZThemeMode } from 'gz-ui-web';
|
|
28
|
+
import { router } from '@/router';
|
|
29
|
+
|
|
30
|
+
const themeMode: GZThemeMode = 'gold-dark';
|
|
31
|
+
|
|
32
|
+
createRoot(document.getElementById('root')!).render(
|
|
33
|
+
<ConfigProvider themeMode={themeMode}>
|
|
34
|
+
<RouterProvider router={router} />
|
|
35
|
+
</ConfigProvider>,
|
|
36
|
+
);
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### 2. 组件使用
|
|
41
|
+
|
|
42
|
+
- 以 Button 组件为例
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
import { Button } from 'gz-ui-web';
|
|
46
|
+
|
|
47
|
+
const App = () => {
|
|
48
|
+
return (
|
|
49
|
+
<div>
|
|
50
|
+
<Button>默认按钮</Button>
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 3. Table 和 AG Grid API
|
|
57
|
+
|
|
58
|
+
`Table` 从主包导入;AG Grid 类型、底层 API 和 gz-ui-web 生成的 Grid Token 从 `gz-table` 子入口导入:
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
import { Table } from 'gz-ui-web';
|
|
62
|
+
import {
|
|
63
|
+
goldDarkAgGridTokens,
|
|
64
|
+
type ColDef,
|
|
65
|
+
} from 'gz-ui-web/gz-table';
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
`Table` 在 Gold 主题下会自动使用对应的 AG Grid Token。详见 [Table 文档](./src/components/table/index.md) 和 [AG Grid Token 文档](./docs/tokens/ag-grid-table.md)。
|
|
69
|
+
|
|
70
|
+
项目图表技术栈统一使用 ECharts,不单独维护图表 Token。图表颜色、文字和背景直接通过 `getDesignTokens({ themeMode }).globalToken` 获取,完整示例见 [全局 Tokens](./docs/tokens.md)。
|
|
71
|
+
|
|
72
|
+
## 导入 UI Design Tokens
|
|
73
|
+
|
|
74
|
+
在仓库根目录执行,一次完成 UI 交付包导入与 Token、文档生成:
|
|
75
|
+
|
|
76
|
+
```shell
|
|
77
|
+
npm run tokens:import -- "/path/to/UI 交付包目录"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
这是日常导入的唯一入口,已包含 Token 转换和文档生成,无需再执行其他生成命令。
|
|
81
|
+
|
|
82
|
+
自动导入交付目录中 `gold-theme/`、`blue-theme/` 下的所有主题及明暗模式,统一生成一次;追加 `--dry-run` 可只预览。没有主题标识的单主题旧包需用 `--theme gold` 或 `--theme blue` 指明归属。交付包结构、失败恢复及验证说明见 [Design Tokens 源文件维护指南](./guozhi-design-tokens-origin/README.md)。
|