@cloudtower/eagle 0.31.0 → 0.31.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.
- package/dist/cjs/coreX/Sider/index.js +109 -0
- package/dist/cjs/index.js +14 -12
- package/dist/cjs/stats1.html +1 -1
- package/dist/components.css +2243 -2108
- package/dist/esm/coreX/Sider/index.js +102 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/stats1.html +1 -1
- package/dist/src/coreX/Sider/Sider.type.d.ts +42 -0
- package/dist/src/coreX/Sider/index.d.ts +5 -0
- package/dist/src/coreX/index.d.ts +2 -0
- package/dist/stories/docs/core/Sider.stories.d.ts +21 -0
- package/dist/style.css +2271 -2158
- package/package.json +4 -4
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { SiderProps as AntdSiderProps } from "antd5/lib/layout/Sider";
|
|
2
|
+
import { SrcType } from "../../core/BaseIcon";
|
|
3
|
+
export type SiderMenuItem = {
|
|
4
|
+
icon: {
|
|
5
|
+
normal: SrcType;
|
|
6
|
+
active: SrcType;
|
|
7
|
+
};
|
|
8
|
+
title: string;
|
|
9
|
+
hidden?: boolean;
|
|
10
|
+
onClick?: (key: string) => void;
|
|
11
|
+
key: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type SiderMenuItemGroup = {
|
|
15
|
+
key: string;
|
|
16
|
+
title: string;
|
|
17
|
+
hidden?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* 下面是否展示分割线
|
|
20
|
+
*/
|
|
21
|
+
isShowDivider?: boolean;
|
|
22
|
+
items: SiderMenuItem[];
|
|
23
|
+
};
|
|
24
|
+
export type SiderProps = {
|
|
25
|
+
/**
|
|
26
|
+
* 侧边栏的配置
|
|
27
|
+
*/
|
|
28
|
+
config: Array<SiderMenuItemGroup | SiderMenuItem>;
|
|
29
|
+
/**
|
|
30
|
+
* 选中高亮的 item 的 Key
|
|
31
|
+
*/
|
|
32
|
+
selectedKeys: string[];
|
|
33
|
+
/**
|
|
34
|
+
* 收缩模式
|
|
35
|
+
*/
|
|
36
|
+
isShrink?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* 点击 item 的回调
|
|
39
|
+
*/
|
|
40
|
+
onClick?: (key: string) => void;
|
|
41
|
+
antdSiderProps: AntdSiderProps;
|
|
42
|
+
};
|
|
@@ -13,6 +13,7 @@ export * from "./I18nNameTag";
|
|
|
13
13
|
export * from "./NamesTooltip";
|
|
14
14
|
export * from "./OverflowTooltip";
|
|
15
15
|
export * from "./SidebarSubtitle";
|
|
16
|
+
export * from "./Sider";
|
|
16
17
|
export * from "./SortableList";
|
|
17
18
|
export * from "./SummaryTable";
|
|
18
19
|
export * from "./SwitchWithText";
|
|
@@ -32,6 +33,7 @@ export { default as I18nNameTag } from "./I18nNameTag";
|
|
|
32
33
|
export { default as NamesTooltip } from "./NamesTooltip";
|
|
33
34
|
export { default as OverflowTooltip } from "./OverflowTooltip";
|
|
34
35
|
export { default as SidebarSubtitle } from "./SidebarSubtitle";
|
|
36
|
+
export { default as Sider } from "./Sider";
|
|
35
37
|
export { default as SortableList } from "./SortableList";
|
|
36
38
|
export { default as SummaryTable } from "./SummaryTable";
|
|
37
39
|
export { default as SwitchWithText } from "./SwitchWithText";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SiderProps } from "../../../src/coreX/Sider";
|
|
2
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* Sider 组件用于展示侧边栏。
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
declare const meta: Meta<SiderProps>;
|
|
9
|
+
export default meta;
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* Sider 的基本用法
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
export declare const Default: StoryObj<SiderProps>;
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* Sider 的收缩模式
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export declare const Shrink: StoryObj<SiderProps>;
|