@cloudtower/eagle 0.30.2 → 0.30.4

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.
@@ -1,5 +1,14 @@
1
1
  const Animation = {
2
- loading: "loading 1600ms ease-out infinite"
2
+ loading: "loading 1600ms ease-out infinite",
3
+ circleRotate: "rotate 1200ms cubic-bezier(0.33, 0, 0.67, 1) infinite"
4
+ };
5
+ const Keyframes = {
6
+ rotate: `
7
+ @keyframes rotate {
8
+ from { transform: rotate(0deg); }
9
+ to { transform: rotate(360deg); }
10
+ }
11
+ `
3
12
  };
4
13
 
5
- export { Animation };
14
+ export { Animation, Keyframes };
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
2
- export type LoadingComponentType = React.FunctionComponent<{
1
+ import React from "react";
2
+ export type LoadingComponentType = React.FunctionComponent<React.HTMLAttributes<HTMLDivElement> & {
3
3
  fullView?: boolean;
4
4
  }>;
@@ -0,0 +1,3 @@
1
+ import { LoadingComponentType } from "../../core/Loading/loading.type";
2
+ declare const CircleLoading: LoadingComponentType;
3
+ export default CircleLoading;
@@ -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
+ };
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { SiderProps } from "./Sider.type";
3
+ declare const Sider: React.FC<SiderProps>;
4
+ export default Sider;
5
+ export * from "./Sider.type";
@@ -13,11 +13,13 @@ 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";
19
20
  export * from "./TabMenu";
20
21
  export * from "./UnitWithChart";
22
+ export * from "./CircleLoading";
21
23
  export { default as BarChart } from "./BarChart";
22
24
  export { default as BatchOperation } from "./BatchOperation";
23
25
  export { default as ChartWithTooltip } from "./ChartWithTooltip";
@@ -32,8 +34,10 @@ export { default as I18nNameTag } from "./I18nNameTag";
32
34
  export { default as NamesTooltip } from "./NamesTooltip";
33
35
  export { default as OverflowTooltip } from "./OverflowTooltip";
34
36
  export { default as SidebarSubtitle } from "./SidebarSubtitle";
37
+ export { default as Sider } from "./Sider";
35
38
  export { default as SortableList } from "./SortableList";
36
39
  export { default as SummaryTable } from "./SummaryTable";
37
40
  export { default as SwitchWithText } from "./SwitchWithText";
38
41
  export { default as TabMenu } from "./TabMenu";
39
42
  export { default as UnitWithChart } from "./UnitWithChart";
43
+ export { default as CircleLoading } from "./CircleLoading";
@@ -1,3 +1,7 @@
1
1
  export declare const Animation: {
2
2
  loading: string;
3
+ circleRotate: string;
4
+ };
5
+ export declare const Keyframes: {
6
+ rotate: string;
3
7
  };
@@ -1,11 +1,11 @@
1
1
  import React from "react";
2
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0fc72a6d").R, {
2
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0fc72a6d").R, React.HTMLAttributes<HTMLDivElement> & {
3
3
  fullView?: boolean | undefined;
4
4
  } & {
5
5
  children?: React.ReactNode;
6
6
  }>;
7
7
  export default _default;
8
- export declare const Basic: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, {
8
+ export declare const Basic: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, React.HTMLAttributes<HTMLDivElement> & {
9
9
  fullView?: boolean | undefined;
10
10
  } & {
11
11
  children?: React.ReactNode;
@@ -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>;
@@ -0,0 +1,20 @@
1
+ import CircleLoading from "../../../src/coreX/CircleLoading";
2
+ import { StoryObj } from "@storybook/react";
3
+ /**
4
+ *
5
+ * 目前应用场景:
6
+ * * arcfra 中取代三角 loading
7
+ */
8
+ declare const _default: {
9
+ title: string;
10
+ component: import("../../../src").LoadingComponentType;
11
+ parameters: {
12
+ design: {
13
+ type: string;
14
+ url: string;
15
+ };
16
+ };
17
+ };
18
+ export default _default;
19
+ type Story = StoryObj<typeof CircleLoading>;
20
+ export declare const Basic: Story;