@cloudtower/eagle 0.0.0-commnader-ui-rc-3 → 0.0.0-config-rc-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 (77) hide show
  1. package/README.md +6 -10
  2. package/dist/cjs/UIKitProvider/index.js +15 -12
  3. package/dist/cjs/core/Antd5Anchor/index.js +30 -0
  4. package/dist/cjs/core/Antd5Dropdown/Antd5Dropdown.js +30 -0
  5. package/dist/cjs/core/Avatar/index.js +11 -2
  6. package/dist/cjs/core/Cascader/cascader.style.js +12 -10
  7. package/dist/cjs/core/Cascader/cascader.widget.js +22 -2
  8. package/dist/cjs/core/Cascader/index.js +1 -0
  9. package/dist/cjs/core/ConfigProvider/index.js +35 -0
  10. package/dist/cjs/{coreX/TruncatedTextWithTooltip → core/InputPassword}/index.js +31 -32
  11. package/dist/cjs/core/KitStoreProvider/index.js +42 -1
  12. package/dist/cjs/core/Modal/index.js +5 -3
  13. package/dist/cjs/core/ModalStack/index.js +2 -2
  14. package/dist/cjs/core/Progress/components.js +1 -1
  15. package/dist/cjs/core/Table/TableSkeleton.js +51 -0
  16. package/dist/cjs/core/Table/index.js +35 -12
  17. package/dist/cjs/core/index.js +24 -24
  18. package/dist/cjs/index.js +261 -247
  19. package/dist/cjs/legacy-antd.js +33 -35
  20. package/dist/cjs/stats1.html +1 -1
  21. package/dist/cjs/styles/token/color.js +3 -1
  22. package/dist/components.css +3055 -3012
  23. package/dist/esm/UIKitProvider/index.js +12 -11
  24. package/dist/esm/core/Antd5Anchor/index.js +24 -0
  25. package/dist/esm/core/Antd5Dropdown/Antd5Dropdown.js +24 -0
  26. package/dist/esm/core/Avatar/index.js +11 -2
  27. package/dist/esm/core/Cascader/cascader.style.js +12 -11
  28. package/dist/esm/core/Cascader/cascader.widget.js +23 -3
  29. package/dist/esm/core/Cascader/index.js +1 -1
  30. package/dist/esm/core/ConfigProvider/index.js +29 -0
  31. package/dist/esm/core/InputPassword/index.js +62 -0
  32. package/dist/esm/core/KitStoreProvider/index.js +42 -4
  33. package/dist/esm/core/Modal/index.js +5 -3
  34. package/dist/esm/core/ModalStack/index.js +2 -2
  35. package/dist/esm/core/Progress/components.js +2 -2
  36. package/dist/esm/core/Table/TableSkeleton.js +45 -0
  37. package/dist/esm/core/Table/index.js +36 -15
  38. package/dist/esm/index.js +10 -6
  39. package/dist/esm/legacy-antd.js +0 -2
  40. package/dist/esm/stats1.html +1 -1
  41. package/dist/esm/styles/token/color.js +3 -1
  42. package/dist/src/UIKitProvider/index.d.ts +2 -1
  43. package/dist/src/core/Antd5Anchor/Antd5Anchor.type.d.ts +7 -0
  44. package/dist/src/core/Antd5Anchor/index.d.ts +4 -0
  45. package/dist/src/core/Antd5Dropdown/Antd5Dropdown.d.ts +3 -0
  46. package/dist/src/core/Antd5Dropdown/Antd5Dropdown.type.d.ts +2 -0
  47. package/dist/src/core/Antd5Dropdown/index.d.ts +2 -0
  48. package/dist/src/core/Avatar/avatar.type.d.ts +4 -0
  49. package/dist/src/core/Cascader/cascader.style.d.ts +1 -0
  50. package/dist/src/core/ConfigProvider/index.d.ts +8 -0
  51. package/dist/src/core/InputPassword/index.d.ts +10 -0
  52. package/dist/src/core/KitStoreProvider/index.d.ts +4 -1
  53. package/dist/src/core/Modal/modal.type.d.ts +1 -0
  54. package/dist/src/core/Table/TableSkeleton.d.ts +7 -0
  55. package/dist/src/core/Table/TableWidget.d.ts +4 -0
  56. package/dist/src/core/Table/index.d.ts +2 -0
  57. package/dist/src/core/Table/table.type.d.ts +8 -0
  58. package/dist/src/core/index.d.ts +8 -2
  59. package/dist/src/coreX/index.d.ts +0 -2
  60. package/dist/src/hooks/useElementsSize.d.ts +3 -0
  61. package/dist/src/spec/base.d.ts +1 -2
  62. package/dist/src/store/index.d.ts +12 -0
  63. package/dist/src/styles/token/color.d.ts +2 -0
  64. package/dist/stories/docs/core/Antd5Anchor.stories.d.ts +13 -0
  65. package/dist/stories/docs/core/Antd5Dropdown.stories.d.ts +12 -0
  66. package/dist/stories/docs/core/Avatar.stories.d.ts +4 -0
  67. package/dist/stories/docs/core/Button.stories.d.ts +23 -20
  68. package/dist/stories/docs/core/Input.simple.stories.d.ts +8 -10
  69. package/dist/stories/docs/core/InputPassword.stories.d.ts +20 -0
  70. package/dist/stories/docs/core/KitStoreProvider.stories.d.ts +23 -0
  71. package/dist/stories/docs/core/Table.stories.d.ts +65 -16
  72. package/dist/style.css +3264 -3230
  73. package/package.json +4 -4
  74. package/dist/esm/coreX/TruncatedTextWithTooltip/index.js +0 -67
  75. package/dist/src/coreX/TruncatedTextWithTooltip/index.d.ts +0 -11
  76. package/dist/src/coreX/TruncatedTextWithTooltip/truncatedTextWithTooltip.type.d.ts +0 -5
  77. package/dist/stories/docs/coreX/TruncatedTextWithTooltip.stories.d.ts +0 -7
@@ -267,7 +267,9 @@ const Color = {
267
267
  "purple-a10-50": "#7E41FF1A"
268
268
  },
269
269
  gradient: {
270
- loading: "linear-gradient(90deg, #0080ff 0%, #9ecfff 50%, #0080ff 100%)"
270
+ loading: "linear-gradient(90deg, #0080ff 0%, #9ecfff 50%, #0080ff 100%)",
271
+ "light-blue": "linear-gradient(180deg,rgba(0, 136, 255, 0.2) 0%,rgba(0, 136, 255, 0.6) 100%)",
272
+ "dark-blue": "radial-gradient(133.15% 133.15% at 4.69% 7.03%, #5BCAFF 0%, #06F 100%)"
271
273
  }
272
274
  };
273
275
 
@@ -3,6 +3,7 @@ import { BatchHelper } from "../core";
3
3
  import { MessageApi } from "../core/message";
4
4
  import React, { PropsWithChildren } from "react";
5
5
  import { Kit } from "../spec";
6
+ import { ConfigProps } from "../core/ConfigProvider";
6
7
  export interface IProps {
7
8
  kit?: Kit;
8
9
  message?: {
@@ -10,7 +11,7 @@ export interface IProps {
10
11
  maxCount?: number;
11
12
  };
12
13
  lng?: ParrotI18nSupportLng;
13
- getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
14
+ config?: ConfigProps;
14
15
  }
15
16
  export declare const kitContext: React.Context<Kit<any, HTMLElement>>;
16
17
  export declare const MessageContext: React.Context<MessageApi>;
@@ -0,0 +1,7 @@
1
+ import { AnchorLinkProps, AnchorProps } from "antd5";
2
+ import { FC } from "react";
3
+ export type Antd5AnchorComponentType = FC<AnchorProps> & {
4
+ Link: FC<AnchorLinkProps>;
5
+ };
6
+ export type Antd5AnchorProps = AnchorProps;
7
+ export type Antd5AnchorLinkProps = AnchorLinkProps;
@@ -0,0 +1,4 @@
1
+ import { Antd5AnchorComponentType } from "./Antd5Anchor.type";
2
+ declare const Antd5Anchor: Antd5AnchorComponentType;
3
+ export default Antd5Anchor;
4
+ export * from "./Antd5Anchor.type";
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { Antd5DropdownProps } from "./Antd5Dropdown.type";
3
+ export declare const Antd5Dropdown: React.FC<Antd5DropdownProps>;
@@ -0,0 +1,2 @@
1
+ import { DropdownProps } from "antd5";
2
+ export type Antd5DropdownProps = DropdownProps;
@@ -0,0 +1,2 @@
1
+ export * from "./Antd5Dropdown";
2
+ export * from "./Antd5Dropdown.type";
@@ -4,4 +4,8 @@ export type AvatarProps = {
4
4
  */
5
5
  username: string;
6
6
  className?: string;
7
+ /**
8
+ * 背景色
9
+ */
10
+ background?: "light-blue" | "dark-blue";
7
11
  };
@@ -1,3 +1,4 @@
1
+ export declare const Hide: import("@linaria/core").LinariaClassName;
1
2
  export declare const DoubleRowOptionStyleWrapper: import("@linaria/core").LinariaClassName;
2
3
  export declare const CascaderDefaultOptionLabel: import("@linaria/core").LinariaClassName;
3
4
  export declare const CascaderNotData: import("@linaria/core").LinariaClassName;
@@ -0,0 +1,8 @@
1
+ import { ConfigProviderProps } from "antd/lib/config-provider";
2
+ import { ConfigProviderProps as Antd5ConfigProviderProps } from "antd5";
3
+ import React from "react";
4
+ export type ConfigProps = {
5
+ antd4Configs?: ConfigProviderProps;
6
+ antd5Configs?: Antd5ConfigProviderProps;
7
+ };
8
+ export declare const ConfigProvider: React.FC<ConfigProps>;
@@ -0,0 +1,10 @@
1
+ import { PasswordProps } from "antd/lib/input";
2
+ import React from "react";
3
+ export declare const AntdPasswordInputStyled: import("@linaria/react").StyledMeta & React.ForwardRefExoticComponent<PasswordProps & React.RefAttributes<unknown>>;
4
+ declare const InputPassword: React.FC<PasswordProps & {
5
+ /**
6
+ * 使用变量控制是否显示 error 效果
7
+ */
8
+ error?: boolean;
9
+ }>;
10
+ export default InputPassword;
@@ -1,4 +1,4 @@
1
- import { Actions, KitRootState } from "../../store";
1
+ import { Actions, IModalProps, KitRootState, ModalType } from "../../store";
2
2
  import React, { PropsWithChildren } from "react";
3
3
  interface IProps {
4
4
  }
@@ -6,3 +6,6 @@ declare const KitStoreProvider: (props: PropsWithChildren<IProps>) => React.JSX.
6
6
  export default KitStoreProvider;
7
7
  export declare const useKitDispatch: () => import("redux").Dispatch<Actions>;
8
8
  export declare const useKitSelector: <Selected extends unknown>(selector: (state: KitRootState) => Selected, equalityFn?: ((previous: Selected, next: Selected) => boolean) | undefined) => Selected;
9
+ export declare const usePushModal: () => <K extends string | number>(modal: ModalType<IModalProps[K]>) => void;
10
+ export declare const useCloseModal: () => (id: number) => void;
11
+ export declare const usePopModal: () => () => void;
@@ -24,6 +24,7 @@ export type ModalProps = Omit<AntdModalProps, "okType"> & {
24
24
  children?: React.ReactNode;
25
25
  showCancel?: boolean;
26
26
  showOk?: boolean;
27
+ closeIcon?: React.ReactNode;
27
28
  wizard?: {
28
29
  step: number;
29
30
  onStepChange?: (step: number) => void;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ export interface ITableSkeletonProps {
3
+ rowsCount?: number;
4
+ headerHeight?: number;
5
+ itemHeight?: number;
6
+ }
7
+ export declare const TableSkeleton: (props: ITableSkeletonProps) => React.JSX.Element;
@@ -1,4 +1,8 @@
1
1
  import React from "react";
2
+ /**
3
+ * @deprecated
4
+ * use TableSkeleton instead
5
+ */
2
6
  export declare const TableLoading: React.FC;
3
7
  export declare const KitTableContext: React.Context<{
4
8
  onClearSearchButtonEffect?: ((base: string) => void) | undefined;
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import { TableProps } from "./table.type";
3
+ export declare const emptyTableStyle: import("@linaria/core").LinariaClassName;
3
4
  export declare const tableStyleCover: import("@linaria/core").LinariaClassName;
4
5
  declare const Table: <T extends {
5
6
  id: string;
@@ -7,4 +8,5 @@ declare const Table: <T extends {
7
8
  export default Table;
8
9
  export * from "./common";
9
10
  export * from "./table.type";
11
+ export * from "./TableSkeleton";
10
12
  export * from "./TableWidget";
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { ColumnsType, ColumnType, TableProps as AntdTableProps } from "antd/lib/table";
3
3
  import { TableRowSelection } from "antd/lib/table/interface";
4
+ import { ITableSkeletonProps } from "./TableSkeleton";
4
5
  interface IdObject {
5
6
  id: string;
6
7
  }
@@ -29,6 +30,9 @@ export interface TableProps<T extends {
29
30
  }> {
30
31
  bordered?: boolean;
31
32
  loading?: boolean;
33
+ /**
34
+ * This means errorEl.
35
+ */
32
36
  error?: React.ReactNode | string;
33
37
  dataSource: T[] | undefined;
34
38
  columns: RequiredColumnProps<T>[];
@@ -61,6 +65,9 @@ export interface TableProps<T extends {
61
65
  rowSelection?: TableRowSelection<T>;
62
66
  empty?: string | React.ReactNode;
63
67
  tableLayout?: "fixed" | "auto";
68
+ /**
69
+ * @deprecated use loading instead
70
+ */
64
71
  initLoading?: boolean;
65
72
  rowKey?: AntdTableProps<T>["rowKey"];
66
73
  wrapper?: React.MutableRefObject<HTMLDivElement | null>;
@@ -69,5 +76,6 @@ export interface TableProps<T extends {
69
76
  pageSize: number;
70
77
  };
71
78
  onRow?: AntdTableProps<T>["onRow"];
79
+ skeletonProps?: ITableSkeletonProps;
72
80
  }
73
81
  export {};
@@ -1,5 +1,7 @@
1
1
  export * from "./AccordionCard";
2
2
  export * from "./Alert";
3
+ export * from "./Antd5Anchor";
4
+ export * from "./Antd5Dropdown";
3
5
  export * from "./Arch";
4
6
  export * from "./Badge";
5
7
  export * from "./BaseIcon";
@@ -34,6 +36,7 @@ export * from "./Input";
34
36
  export * from "./InputGroup";
35
37
  export * from "./InputInteger";
36
38
  export * from "./InputNumber";
39
+ export * from "./InputPassword";
37
40
  export * from "./InputTagItem";
38
41
  export * from "./KitStoreProvider";
39
42
  export * from "./Link";
@@ -82,6 +85,7 @@ export * from "./Tooltip";
82
85
  export * from "./Truncate";
83
86
  export * from "./Typo";
84
87
  export * from "./Units";
88
+ export * from "./ConfigProvider";
85
89
  export declare const units: {
86
90
  Percent: import("./Units").PercentFn;
87
91
  Byte: import("./Units").UnitFn;
@@ -95,7 +99,9 @@ export declare const units: {
95
99
  export { units as Units };
96
100
  export { default as AccordionCard } from "./AccordionCard";
97
101
  export { default as Alert } from "./Alert";
102
+ export { default as Antd5Anchor } from "./Antd5Anchor";
98
103
  export { default as Arch } from "./Arch";
104
+ export { default as Avatar } from "./Avatar";
99
105
  export { default as Badge } from "./Badge";
100
106
  export { default as BaseIcon } from "./BaseIcon";
101
107
  export { default as Bit } from "./Bit";
@@ -125,6 +131,7 @@ export { default as Input } from "./Input";
125
131
  export { default as InputGroup } from "./InputGroup";
126
132
  export { default as InputInteger } from "./InputInteger";
127
133
  export { default as InputNumber } from "./InputNumber";
134
+ export { default as InputPassword } from "./InputPassword";
128
135
  export { default as InputTagItem } from "./InputTagItem";
129
136
  export { default as KitStoreProvider } from "./KitStoreProvider";
130
137
  export { default as Link } from "./Link";
@@ -133,6 +140,7 @@ export { default as message } from "./message";
133
140
  export { default as Metric } from "./Metric";
134
141
  export { default as Modal } from "./Modal";
135
142
  export { default as ModalStack } from "./ModalStack";
143
+ export { default as Nav } from "./Nav";
136
144
  export { default as Overflow } from "./Overflow";
137
145
  export { default as Pagination } from "./Pagination";
138
146
  export { default as Percent } from "./Percent";
@@ -157,5 +165,3 @@ export { default as TimeZoneSelect } from "./TimeZoneSelect";
157
165
  export { default as Token } from "./Token";
158
166
  export { default as Tooltip } from "./Tooltip";
159
167
  export { default as Truncate } from "./Truncate";
160
- export { default as Avator } from "./Avatar";
161
- export { default as Nav } from "./Nav";
@@ -17,7 +17,6 @@ export * from "./SortableList";
17
17
  export * from "./SummaryTable";
18
18
  export * from "./SwitchWithText";
19
19
  export * from "./TabMenu";
20
- export * from "./TruncatedTextWithTooltip";
21
20
  export * from "./UnitWithChart";
22
21
  export { default as BarChart } from "./BarChart";
23
22
  export { default as BatchOperation } from "./BatchOperation";
@@ -37,5 +36,4 @@ export { default as SortableList } from "./SortableList";
37
36
  export { default as SummaryTable } from "./SummaryTable";
38
37
  export { default as SwitchWithText } from "./SwitchWithText";
39
38
  export { default as TabMenu } from "./TabMenu";
40
- export { default as TruncatedTextWithTooltip } from "./TruncatedTextWithTooltip";
41
39
  export { default as UnitWithChart } from "./UnitWithChart";
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @deprecated
3
+ */
1
4
  export default function useElementsSize<K extends string>(classMap: Record<K, string>, config: {
2
5
  prevent?: boolean;
3
6
  key?: string;
@@ -1,5 +1,5 @@
1
1
  import type { AlertComponentType, ArchComponentType, BadgeComponentType, BaseEnumProps, ButtonGroupType, ButtonProps, CalendarComponentType, CardProps, CloseButtonProps, FieldBaseProps, FieldRenderProps, IAccordionCardProps, IBreadcrumbProps, ICircleProgressProps, IDetailCardProps, IDonutChartProps, IDropdownMenuProps, InputGroupComponentType, InputSize, IntFieldProps, ISegmentedControlProps, ISimplePaginationProps, ISpaceProps, IStepsProps, ITimeProps, ITimeZoneSelectProps, LinkComponentType, LoadingComponentType, MessageApi, ModalProps, PaginationProps, PercentFn, RadioButtonProps, RadioProps, SearchInputProps, SelectComponentType, StatusCapsuleComponentType, StringProps, SwitchProps, TableComponent, TableFormHandle, TableFormProps, TagComponentType, TextAreaProps, TokenComponentType, TooltipProps, TruncatePropTypes, UnitFn } from "../core";
2
- import type { CronCalendarProps, CronPlanProps, DateRangePickerProps, DeprecatedIDonutChartProps, DropdownTransitionProps, GoBackButtonType, I18nNameTagType, IBatchOperation, IChartWithUnitProps, ICountingProps, ICWTProps, IUnitWithChartProps, NamesTooltipType, OverflowTooltipProps, SidebarSubtitleComponentType, SortableListComponentType, SummaryTableComponentType, SwitchWithTextProps, TruncateTextWithTooltipType } from "../coreX";
2
+ import type { CronCalendarProps, CronPlanProps, DateRangePickerProps, DeprecatedIDonutChartProps, DropdownTransitionProps, GoBackButtonType, I18nNameTagType, IBatchOperation, IChartWithUnitProps, ICountingProps, ICWTProps, IUnitWithChartProps, NamesTooltipType, OverflowTooltipProps, SidebarSubtitleComponentType, SortableListComponentType, SummaryTableComponentType, SwitchWithTextProps } from "../coreX";
3
3
  import { AutoCompleteProps } from "antd/lib/auto-complete";
4
4
  import { BadgeProps } from "antd/lib/badge";
5
5
  import { ButtonProps as AntdButtonProps } from "antd/lib/button";
@@ -239,7 +239,6 @@ export interface Kit<V = any, T extends HTMLElement = HTMLElement> {
239
239
  CloseButton: React.FC<CloseButtonProps>;
240
240
  };
241
241
  DetailCard: React.FC<IDetailCardProps>;
242
- TruncatedTextWithTooltip: React.FC<TruncateTextWithTooltipType>;
243
242
  Counting: React.FC<ICountingProps>;
244
243
  Breadcrumb: React.FC<IBreadcrumbProps>;
245
244
  CircleProgress: React.FC<ICircleProgressProps>;
@@ -17,8 +17,20 @@ export declare const UIKitStore: import("redux").Store<import("redux").EmptyObje
17
17
  chart: ChartState;
18
18
  modal: ModalState;
19
19
  }, Actions>;
20
+ /**
21
+ *
22
+ * @deprecated
23
+ */
20
24
  export declare function pushModal<K extends keyof IModalProps>(modal: ModalType<IModalProps[K]>): void;
25
+ /**
26
+ *
27
+ * @deprecated
28
+ */
21
29
  export declare function popModal(): void;
30
+ /**
31
+ *
32
+ * @deprecated
33
+ */
22
34
  export declare function closeModal(id: number): void;
23
35
  export type GetModalProps<K extends keyof IModalProps> = IModalProps[K] & CloseCb;
24
36
  export * from "./chart";
@@ -268,5 +268,7 @@ export declare const Color: {
268
268
  };
269
269
  readonly gradient: {
270
270
  readonly loading: "linear-gradient(90deg, #0080ff 0%, #9ecfff 50%, #0080ff 100%)";
271
+ readonly "light-blue": "linear-gradient(180deg,rgba(0, 136, 255, 0.2) 0%,rgba(0, 136, 255, 0.6) 100%)";
272
+ readonly "dark-blue": "radial-gradient(133.15% 133.15% at 4.69% 7.03%, #5BCAFF 0%, #06F 100%)";
271
273
  };
272
274
  };
@@ -0,0 +1,13 @@
1
+ import { Antd5AnchorProps } from "../../../src/core";
2
+ import { Meta, StoryObj } from "@storybook/react";
3
+ import React from "react";
4
+ type Story = StoryObj<React.FC<Antd5AnchorProps>>;
5
+ /**
6
+ * Antd5Anchor 是 antd5 的 Anchor 组件。
7
+ *
8
+ * 详细用法参考:https://ant.design/components/anchor-cn
9
+ * API 保持一致
10
+ */
11
+ declare const meta: Meta<React.FC<Antd5AnchorProps>>;
12
+ export default meta;
13
+ export declare const Basic: Story;
@@ -0,0 +1,12 @@
1
+ import { Antd5DropdownProps } from "../../../src/core";
2
+ import { Meta, StoryObj } from "@storybook/react";
3
+ import React from "react";
4
+ type Story = StoryObj<React.FC<Antd5DropdownProps>>;
5
+ /**
6
+ * 本Dropdown是 antd5 的 Dropdown 组件。
7
+ *
8
+ * 详细用法参考:https://ant.design/components/dropdown-cn
9
+ */
10
+ declare const meta: Meta<React.FC<Antd5DropdownProps>>;
11
+ export default meta;
12
+ export declare const Basic: Story;
@@ -7,3 +7,7 @@ type Story = StoryObj<typeof Avatar>;
7
7
  * 用来代表用户或事物
8
8
  */
9
9
  export declare const Basic: Story;
10
+ /**
11
+ * 默认支持两种背景色 'light-blue' 和 'dark-blue',也可以传递自定义的背景色
12
+ */
13
+ export declare const Background: Story;
@@ -1,20 +1,23 @@
1
- import React from "react";
2
- export declare const Basic: {
3
- (): React.JSX.Element;
4
- story: {
5
- name: string;
6
- parameters: {
7
- design: {
8
- type: string;
9
- url: string;
10
- };
11
- };
12
- };
13
- };
14
- export declare const RoundedIcon: () => React.JSX.Element;
15
- export declare const CustomChildren: () => React.JSX.Element;
16
- export declare const Link: () => React.JSX.Element;
17
- declare const story: {
18
- title: string;
19
- };
20
- export default story;
1
+ import Button from "../../../src/core/Button";
2
+ import { Meta, StoryObj } from "@storybook/react";
3
+ declare const meta: Meta<typeof Button>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Button>;
6
+ export declare const Basic: Story;
7
+ /**
8
+ * 为了避免与 suffixIcon 和 prefixIcon 属性混淆使用,移除了 icon
9
+ 属性。如果您需要单独的图标按钮,请使用 suffixIcon 或 prefixIcon
10
+ 属性,并且不需要传递 children。
11
+ */
12
+ export declare const Rounded: Story;
13
+ /**
14
+ * children 结构稍微复杂的情况,比如在 children 组合使用 Icon +
15
+ text,需要使用者自己保证 Icon 和文字的间距
16
+ */
17
+ export declare const CustomChildren: Story;
18
+ /**
19
+ * * 当 type 传入 'link'时,会呈现为超链接文本的形式
20
+ * * 不建议通过 type='link' 的形式使用 button 来实现超链接的效果,应该使用 Link 组件
21
+ * * 这里仅对已有的用法进行展示
22
+ */
23
+ export declare const Link: Story;
@@ -1,12 +1,10 @@
1
- import React from "react";
2
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0fc72a6d").R, import("antd/lib/input").InputProps & {
1
+ /// <reference types="react" />
2
+ import Input from "../../../src/core/Input";
3
+ import { CoreMeta } from "../../types";
4
+ import { StoryObj } from "@storybook/react";
5
+ declare const _default: CoreMeta<import("react").FC<import("antd/lib/input").InputProps & {
3
6
  error?: boolean | undefined;
4
- } & {
5
- children?: React.ReactNode;
6
- }>;
7
+ }>>;
7
8
  export default _default;
8
- export declare const NumberInput: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("antd/lib/input").InputProps & {
9
- error?: boolean | undefined;
10
- } & {
11
- children?: React.ReactNode;
12
- }>;
9
+ type Story = StoryObj<typeof Input>;
10
+ export declare const NumberInput: Story;
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ import InputPassword from "../../../src/core/InputPassword";
3
+ import { StoryObj } from "@storybook/react";
4
+ declare const meta: {
5
+ component: import("react").FC<import("antd/lib/input").PasswordProps & {
6
+ error?: boolean | undefined;
7
+ }>;
8
+ title: "Core/InputPassword | 密码输入";
9
+ parameters: {
10
+ design: {
11
+ type: string;
12
+ url: string;
13
+ };
14
+ };
15
+ };
16
+ export default meta;
17
+ type Story = StoryObj<typeof InputPassword>;
18
+ export declare const SmallSize: Story;
19
+ export declare const MiddleSize: Story;
20
+ export declare const LargeSize: Story;
@@ -0,0 +1,23 @@
1
+ import Button from "../../../src/core/Button";
2
+ import { Meta, StoryObj } from "@storybook/react";
3
+ import React from "react";
4
+ declare const Demo: (props: {
5
+ name?: string;
6
+ }) => React.JSX.Element;
7
+ /**
8
+ *
9
+ * KitStoreProvider 提供 modal store 环境,并且相互隔离。
10
+ *
11
+ * ModalStack 需要放置于 KitStoreProvider 的子层级中。
12
+ *
13
+ * ModalStack 会向上查找 KitStoreContext, 如果未查找到,会使用 eagle 提供的默认 store。
14
+ *
15
+ * usePushModal,usePopModal,useCloseModal 与 ModalStack 同理。
16
+ */
17
+ declare const meta: Meta<typeof Demo>;
18
+ export default meta;
19
+ type Story = StoryObj<typeof Button>;
20
+ export declare const WithKitStoreProviderPrimary: Story;
21
+ export declare const WithKitStoreProviderSecondary: Story;
22
+ export declare const WithoutKitStoreProviderPrimary: Story;
23
+ export declare const WithoutKitStoreProviderSecondary: Story;
@@ -1,16 +1,65 @@
1
- import Table from "../../../src/core/Table";
2
- import { ComponentStory } from "@storybook/react";
3
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0fc72a6d").R, import("../../../src/core/Table").TableProps<{
4
- id: string;
5
- }>>;
6
- export default _default;
7
- interface DataType {
8
- id: string;
9
- name: string;
10
- age: number;
11
- address: string;
12
- }
13
- export declare const Simple: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("../../../src/core/Table").TableProps<DataType>>;
14
- export declare const SortSimpleTitle: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("../../../src/core/Table").TableProps<DataType>>;
15
- export declare const SortCustomTitle: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("../../../src/core/Table").TableProps<DataType>>;
16
- export declare const OnRowPropCustom: ComponentStory<typeof Table<DataType>>;
1
+ import { Table } from "../../../src/core";
2
+ import { StoryObj } from "@storybook/react";
3
+ import React from "react";
4
+ declare const meta: {
5
+ component: <T extends {
6
+ id: string;
7
+ }>(props: import("../../../src/core").TableProps<T>) => React.JSX.Element;
8
+ title: "Core/Table | 表格组件";
9
+ };
10
+ export default meta;
11
+ type Story = StoryObj<typeof Table>;
12
+ /**
13
+ * 在 loading error 不存在的情况下
14
+ *
15
+ * 显示表格数据
16
+ */
17
+ export declare const ShowData: Story;
18
+ /**
19
+ * 自定义骨架屏表头,表身高度
20
+ */
21
+ export declare const CustomHeight: Story;
22
+ /**
23
+ * 初始化 loading
24
+ */
25
+ export declare const InitLoading: Story;
26
+ /**
27
+ * 使用分页作为骨架数量 loading
28
+ */
29
+ export declare const LoadingSkeletonWithPageSize: Story;
30
+ /**
31
+ * 在 loading error dataSource 存在值的情况下
32
+ *
33
+ * 显示 loading
34
+ */
35
+ export declare const ShowLoadingWithDataAndError: Story;
36
+ /**
37
+ * 在 error dataSource 存在值的情况下
38
+ *
39
+ * 显示 error
40
+ */
41
+ export declare const ShowError: Story;
42
+ /**
43
+ * 在 loading dataSource 存在值的情况下
44
+ *
45
+ * 显示 loading
46
+ */
47
+ export declare const ShowLoadingWithData: Story;
48
+ /**
49
+ * 在 error loading dataSource 不存在值的情况下
50
+ *
51
+ * 显示空表格
52
+ */
53
+ export declare const ShowEmpty: Story;
54
+ /**
55
+ * 仅存在 loading 的情况
56
+ *
57
+ * 显示 Loading
58
+ */
59
+ export declare const ShowLoadingWithEmpty: Story;
60
+ /**
61
+ * 在 error false 的情况
62
+ *
63
+ * 显示 data
64
+ */
65
+ export declare const ErrorFalse: Story;