aha-components 1.6.4 → 1.7.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/index.d.ts CHANGED
@@ -770,6 +770,8 @@ interface MenuItemType {
770
770
  label: React.ReactNode;
771
771
  /** 菜单项图标 */
772
772
  icon?: React.ReactNode;
773
+ /** 菜单项右侧图标 */
774
+ suffixIcon?: React.ReactNode;
773
775
  /** 是否禁用 */
774
776
  disabled?: boolean;
775
777
  /** 是否危险项(红色) */
@@ -879,6 +881,93 @@ interface TooltipProps {
879
881
  }
880
882
  declare const Tooltip: React.FC<TooltipProps>;
881
883
 
884
+ type PopoverTrigger = "click" | "hover";
885
+ type PopoverPlacement = "top" | "right" | "bottom" | "left";
886
+ interface PopoverProps {
887
+ /** 触发节点 */
888
+ children: React.ReactNode;
889
+ /** Popover 内容 */
890
+ content: React.ReactNode;
891
+ /** 触发模式 */
892
+ trigger?: PopoverTrigger;
893
+ /** 是否显示(受控) */
894
+ open?: boolean;
895
+ /** 默认是否显示(非受控) */
896
+ defaultOpen?: boolean;
897
+ /** 显示状态变化回调 */
898
+ onOpenChange?: (open: boolean) => void;
899
+ /** 展示方向 */
900
+ placement?: PopoverPlacement;
901
+ /** 内容宽度 */
902
+ width?: string | number;
903
+ /** 触发节点和 Popover 的间距 */
904
+ offset?: number;
905
+ /** 自定义容器类名 */
906
+ className?: string;
907
+ /** 自定义 Popover 类名 */
908
+ popoverClassName?: string;
909
+ /** 是否禁用 */
910
+ disabled?: boolean;
911
+ }
912
+ declare const Popover: React.FC<PopoverProps>;
913
+
914
+ type DrawerPlacement = "left" | "right" | "top" | "bottom";
915
+ interface DrawerProps {
916
+ /** 是否打开(受控) */
917
+ open?: boolean;
918
+ /** 默认是否打开(非受控) */
919
+ defaultOpen?: boolean;
920
+ /** 关闭回调 */
921
+ onClose?: (e?: React.MouseEvent | React.KeyboardEvent) => void;
922
+ /** 打开/关闭动画结束回调 */
923
+ afterOpenChange?: (open: boolean) => void;
924
+ /** 抽屉标题 */
925
+ title?: React.ReactNode;
926
+ /** 头部右侧内容 */
927
+ extra?: React.ReactNode;
928
+ /** 底部内容 */
929
+ footer?: React.ReactNode;
930
+ /** 内容 */
931
+ children?: React.ReactNode;
932
+ /** 打开方向 */
933
+ placement?: DrawerPlacement;
934
+ /** PC 端宽度(移动端始终使用 100vw) */
935
+ width?: number | string;
936
+ /** 高度(top/bottom 生效,移动端同样支持) */
937
+ height?: number | string;
938
+ /** 是否显示遮罩 */
939
+ mask?: boolean;
940
+ /** 点击遮罩是否关闭 */
941
+ maskClosable?: boolean;
942
+ /** 是否显示右上角关闭按钮 */
943
+ closable?: boolean;
944
+ /** 自定义关闭图标 */
945
+ closeIcon?: React.ReactNode;
946
+ /** 是否支持 Esc 关闭 */
947
+ keyboard?: boolean;
948
+ /** 是否在关闭后销毁内容 */
949
+ destroyOnClose?: boolean;
950
+ /** 层级 */
951
+ zIndex?: number;
952
+ /** 移动端断点 */
953
+ mobileBreakpoint?: number;
954
+ /** 容器类名 */
955
+ className?: string;
956
+ /** 容器样式 */
957
+ style?: React.CSSProperties;
958
+ /** 抽屉面板类名 */
959
+ drawerStyle?: React.CSSProperties;
960
+ /** 头部样式 */
961
+ headerStyle?: React.CSSProperties;
962
+ /** 内容样式 */
963
+ bodyStyle?: React.CSSProperties;
964
+ /** 底部样式 */
965
+ footerStyle?: React.CSSProperties;
966
+ /** 遮罩样式 */
967
+ maskStyle?: React.CSSProperties;
968
+ }
969
+ declare const Drawer: React.FC<DrawerProps>;
970
+
882
971
  interface ThemeConfig {
883
972
  primaryColor?: string;
884
973
  }
@@ -898,4 +987,4 @@ declare const MinusIcon: React.FC<{
898
987
  style?: React.CSSProperties;
899
988
  }>;
900
989
 
901
- export { Alert, AlertProps, Button, ButtonProps, CheckIcon, Checkbox, CheckboxProps, ColumnType, DatePicker, DatePickerProps, DateRange, FormWithItem as Form, FormInstance, FormItemProps, FormProps, Input, InputProps, MenuGroupType, MenuItemType, MenuList, MenuListProps, MinusIcon, Pagination, PaginationProps, Progress, ProgressProps, ProgressStatus, ProgressType, Radio, RadioProps, Select, SelectOption, SelectProps, SortOrder, SorterResult, Switch, SwitchProps, Tab, TabItem, TabLayout, TabProps, TabVariant, Table, TableCurrentDataSource, TableLayout, TableProps, TableRowSelection, TableSize, Tag, TagProps, Textarea, TextareaProps, ThemeConfig, ThemeProvider, ThemeProviderProps, Toast, ToastPosition, ToastProps, ToastProvider, ToastType, Tooltip, TooltipPosition, TooltipProps, UserProfileType, clearAllToasts, closeToast, debugToast, toast, toastError, toastInfo, toastQuestion, toastSuccess, useTheme };
990
+ export { Alert, AlertProps, Button, ButtonProps, CheckIcon, Checkbox, CheckboxProps, ColumnType, DatePicker, DatePickerProps, DateRange, Drawer, DrawerPlacement, DrawerProps, FormWithItem as Form, FormInstance, FormItemProps, FormProps, Input, InputProps, MenuGroupType, MenuItemType, MenuList, MenuListProps, MinusIcon, Pagination, PaginationProps, Popover, PopoverPlacement, PopoverProps, PopoverTrigger, Progress, ProgressProps, ProgressStatus, ProgressType, Radio, RadioProps, Select, SelectOption, SelectProps, SortOrder, SorterResult, Switch, SwitchProps, Tab, TabItem, TabLayout, TabProps, TabVariant, Table, TableCurrentDataSource, TableLayout, TableProps, TableRowSelection, TableSize, Tag, TagProps, Textarea, TextareaProps, ThemeConfig, ThemeProvider, ThemeProviderProps, Toast, ToastPosition, ToastProps, ToastProvider, ToastType, Tooltip, TooltipPosition, TooltipProps, UserProfileType, clearAllToasts, closeToast, debugToast, toast, toastError, toastInfo, toastQuestion, toastSuccess, useTheme };