@cloudtower/eagle 0.27.17 → 0.27.21

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/index.d.ts CHANGED
@@ -2,6 +2,8 @@ import "./styles/index.scss";
2
2
  export type { CardProps, DateRange, GraphType, IconProps, IDataPoint, } from "./components";
3
3
  export { antdKit, BaseIcon, Button, ButtonStyle, CannotOperationInfo, ContentWrapper, createBatchMessageMethods, Desc, FailedLoad, FullView, Icon, InputTagItem, KitStoreProvider, LightDesc, ModalStack, RadioDesc, radioStyle, tableStyleCover, tickFormatter, Truncate, Typo, useKitDispatch, useKitSelector, WizardBody, } from "./components";
4
4
  export * from "./components/TableForm/types";
5
+ export { RenderMenuItem } from "./core/DropdownMenu";
6
+ export { default as DropdownMenu } from "./core/DropdownMenu";
5
7
  export * from "./coreX";
6
8
  export { useElementsSize } from "./hooks";
7
9
  export type { AntdInputComponentType, AntdTreeSelectComponentType, BaseEnumProps, ButtonProps, DateTimeRangeProps, EnumProps, FloatProps, InputSize, IntegerFieldProps, IntFieldProps, IntProps, Kit, KitSelectProps, ModalProps, RequiredColumnProps, SorterOrder, StringProps, SummaryTableItem, TableProps, TagColor, TextAreaProps, TooltipProps, WizardSteps, } from "./spec";
@@ -5,7 +5,7 @@ import { AutoCompleteProps } from "antd/lib/auto-complete";
5
5
  import { BadgeProps } from "antd/lib/badge";
6
6
  import { ButtonProps as AntdButtonProps, ButtonType } from "antd/lib/button";
7
7
  import { CalendarProps } from "antd/lib/calendar/generateCalendar";
8
- import { CascaderProps } from "antd/lib/cascader";
8
+ import { CascaderProps } from "antd5/lib/cascader";
9
9
  import { CheckboxGroupProps, CheckboxProps } from "antd/lib/checkbox";
10
10
  import { ColProps } from "antd/lib/col";
11
11
  import { CollapsePanelProps, CollapseProps } from "antd/lib/collapse";
@@ -64,7 +64,7 @@ import { IDonutChartProps } from "../coreX/DonutChart";
64
64
  import { IUnitWithChartProps } from "../coreX/UnitWithChart";
65
65
  import { SerializableObject } from "../utils/tower";
66
66
  import { FieldRenderProps } from "./react-final-form";
67
- import { Architecture, DropdownTransitionProps, HistoryType, IAccordionCardProps, IBreadcrumbProps, ICircleProgressProps, ICountingProps, IDetailCardProps, ISpaceProps, ITimeProps, ITimeZoneSelectProps, PropsFrom } from "./type";
67
+ import { Architecture, DropdownTransitionProps, HistoryType, IAccordionCardProps, IBreadcrumbProps, ICircleProgressProps, ICountingProps, IDetailCardProps, IDropdownMenuProps, ISpaceProps, ITimeProps, ITimeZoneSelectProps, PropsFrom } from "./type";
68
68
  export type AntdTableComponentType = <RecordType extends object = any>(props: AntdTableProps<RecordType>) => JSX.Element;
69
69
  export type AntdTreeSelectComponentType<T> = TreeSelect<T>;
70
70
  interface EmptyType extends React.FC<EmptyProps> {
@@ -368,6 +368,7 @@ export type IStepsProps = {
368
368
  stepsConfig: Array<StepProps>;
369
369
  containerClassname?: string;
370
370
  disabled?: boolean;
371
+ preview?: boolean;
371
372
  };
372
373
  export interface ISimplePaginationProps {
373
374
  className?: string;
@@ -544,6 +545,8 @@ export interface Kit<V = any, T extends HTMLElement = HTMLElement> {
544
545
  SummaryTable: SummaryTableComponentType;
545
546
  SortableList: SortableListComponentType;
546
547
  SidebarSubtitle: SidebarSubtitleComponentType;
548
+ Link: LinkComponentType;
549
+ DropdownMenu: React.FC<IDropdownMenuProps>;
547
550
  }
548
551
  export type ArchComponentType = React.FC<{
549
552
  architecture?: Architecture;
@@ -703,4 +706,8 @@ export type SidebarSubtitleComponentType = React.FC<{
703
706
  title: string;
704
707
  className?: string;
705
708
  }>;
709
+ type LinkProps = Omit<ButtonProps, "type"> & {
710
+ type?: "default" | "subtle";
711
+ };
712
+ export type LinkComponentType = React.ForwardRefExoticComponent<PropsWithChildren<LinkProps> & React.RefAttributes<HTMLButtonElement>>;
706
713
  export {};
@@ -80,3 +80,30 @@ export type HistoryType = Omit<History, "push" | "replace" | "location" | "lengt
80
80
  (location: any): void;
81
81
  };
82
82
  };
83
+ export interface IDropDownMenuItem {
84
+ type?: "single" | "group" | "divider";
85
+ key: string;
86
+ disabled?: boolean;
87
+ text?: string;
88
+ icon?: React.ReactElement;
89
+ hidden?: boolean;
90
+ onClick?: () => void;
91
+ danger?: boolean;
92
+ tooltip?: string;
93
+ }
94
+ export type Placement = "topLeft" | "topCenter" | "topRight" | "bottomLeft" | "bottomCenter" | "bottomRight";
95
+ export interface IDropdownMenuProps {
96
+ items: Array<IDropDownMenuItem & {
97
+ title?: string;
98
+ children?: Array<IDropDownMenuItem>;
99
+ }>;
100
+ disabled?: boolean;
101
+ placement?: Placement;
102
+ trigger?: ("click" | "hover" | "contextMenu")[];
103
+ customStyle?: {
104
+ content: string;
105
+ };
106
+ slotsElements: {
107
+ trigger?: (args: object) => string | React.ReactNode;
108
+ };
109
+ }