@cloudtower/eagle 0.27.2 → 0.27.3-alpha.0

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.
@@ -56,9 +56,12 @@ import { MessageApi } from "../components/message";
56
56
  import { TableFormHandle, TableFormProps } from "../components/TableForm/types";
57
57
  import { TruncatePropTypes } from "../components/Truncate";
58
58
  import type { CloseButtonProps } from "../core/AccordionCard";
59
+ import { IChartWithUnitProps, ICWTProps } from "../coreX/ChartWithTooltip";
60
+ import { IDonutChartProps } from "../coreX/DonutChart";
61
+ import { IUnitWithChartProps } from "../coreX/UnitWithChart";
59
62
  import { SerializableObject } from "../utils/tower";
60
63
  import { FieldRenderProps } from "./react-final-form";
61
- import { Architecture, DropdownTransitionProps, IAccordionCardProps, IBreadcrumbProps, ICircleProgressProps, ICountingProps, IDetailCardProps, ISpaceProps, ITimeProps, ITimeZoneSelectProps } from "./type";
64
+ import { Architecture, DropdownTransitionProps, IAccordionCardProps, IBreadcrumbProps, ICircleProgressProps, ICountingProps, IDetailCardProps, ISpaceProps, ITimeProps, ITimeZoneSelectProps, PropsFrom } from "./type";
62
65
  export type AntdTableComponentType = <RecordType extends object = any>(props: AntdTableProps<RecordType>) => JSX.Element;
63
66
  export type AntdTreeSelectComponentType<T> = TreeSelect<T>;
64
67
  interface EmptyType extends React.FC<EmptyProps> {
@@ -526,6 +529,11 @@ export interface Kit<V = any, T extends HTMLElement = HTMLElement> {
526
529
  Counting: React.FC<ICountingProps>;
527
530
  Breadcrumb: React.FC<IBreadcrumbProps>;
528
531
  CircleProgress: React.FC<ICircleProgressProps>;
532
+ SwitchWithText: React.FC<SwitchWithTextProps>;
533
+ ChartWithTooltip: React.FC<ICWTProps>;
534
+ ChartWithUnit: React.FC<IChartWithUnitProps>;
535
+ DonutChart: React.FC<IDonutChartProps>;
536
+ UnitWithChart: React.FC<IUnitWithChartProps>;
529
537
  }
530
538
  export type ArchComponentType = React.FC<{
531
539
  architecture?: Architecture;
@@ -608,4 +616,10 @@ export type I18nNameTagType = {
608
616
  i18nKey: string;
609
617
  [key: string]: unknown;
610
618
  };
619
+ export type SwitchWithTextProps = PropsFrom<Kit["switch"]> & {
620
+ text?: {
621
+ checked: React.ReactNode;
622
+ unchecked: React.ReactNode;
623
+ };
624
+ };
611
625
  export {};
@@ -68,3 +68,4 @@ export interface ICircleProgressProps {
68
68
  color?: string;
69
69
  className?: string;
70
70
  }
71
+ export type PropsFrom<TComponent> = TComponent extends React.FC<infer Props> ? Props : TComponent extends React.Component<infer Props> ? Props : never;