zs_library 0.9.4 → 0.9.5

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.
@@ -2,7 +2,7 @@ export interface ContextMenuProps {
2
2
  animationOrigin?: string;
3
3
  isOpen?: boolean;
4
4
  }
5
- declare const ContextMenu: ({ animationOrigin, isOpen, }: ContextMenuProps) => import("react/jsx-runtime").JSX.Element | null;
5
+ declare const ContextMenu: ({ animationOrigin, isOpen, }: ContextMenuProps) => import("react/jsx-runtime").JSX.Element;
6
6
  export default ContextMenu;
7
7
  export { MenuItem } from './menu-item';
8
8
  export { SubMenuItem } from './sub-menu-item';
@@ -5,5 +5,6 @@ export interface SubMenuItemProps {
5
5
  children: React.ReactNode;
6
6
  color?: string;
7
7
  textColor?: string;
8
+ isRootMenuOpen?: boolean;
8
9
  }
9
- export declare const SubMenuItem: ({ text, index, children, color, textColor, ...props }: SubMenuItemProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const SubMenuItem: ({ text, index, children, color, textColor, isRootMenuOpen, ...props }: SubMenuItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,22 +1,37 @@
1
- import { ReactNode } from 'react';
1
+ import { CSSProperties, ReactNode } from 'react';
2
2
  import { Theme } from '../themes';
3
+ type BaseModalSlot = "overlay" | "content" | "panel" | "header" | "body" | "inner" | "footer" | "close";
4
+ type BaseModalClassNames = Partial<Record<BaseModalSlot, string>>;
5
+ type BaseModalStyles = Partial<Record<BaseModalSlot, CSSProperties>>;
3
6
  export interface BaseModalProps {
7
+ /** 是否显示弹窗 */
4
8
  visible: boolean;
9
+ /** 关闭弹窗时触发 */
5
10
  onClose: () => void;
11
+ /** 弹窗标题 */
6
12
  title?: ReactNode;
13
+ /** 弹窗内容 */
7
14
  children?: ReactNode;
15
+ /** 弹窗宽度 */
8
16
  width?: number;
17
+ /** 弹窗展开动画的鼠标位置 */
9
18
  mousePosition?: {
10
19
  x: number;
11
20
  y: number;
12
21
  } | null;
22
+ /** 关闭后是否销毁内容 */
13
23
  destroyOnClose?: boolean;
24
+ /** 是否显示关闭按钮 */
14
25
  closable?: boolean;
26
+ /** 弹窗底部内容 */
15
27
  footer?: ReactNode;
16
- className?: string;
17
- rootClassName?: string;
18
- contentClassName?: string;
28
+ /** 各区域 className 配置 */
29
+ classNames?: BaseModalClassNames;
30
+ /** 各区域内联样式配置 */
31
+ styles?: BaseModalStyles;
32
+ /** 是否禁用默认最大高度限制 */
19
33
  disableMaxHeight?: boolean;
34
+ /** 主题配置 */
20
35
  theme?: Theme;
21
36
  }
22
37
  declare const BaseModal: (props: BaseModalProps) => import("react/jsx-runtime").JSX.Element;