@lax-wp/design-system 0.2.8 → 0.2.9

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.
@@ -1,32 +1,21 @@
1
- import { type ReactNode } from "react";
1
+ import { type ModalProps as AntDModalProps } from "antd";
2
+ import type { ReactNode } from "react";
2
3
  /**
3
4
  * Modal size variants
4
5
  */
5
6
  export type ModalSize = "sm" | "md" | "lg" | "xl" | "full";
6
- /**
7
- * Modal appearance variants
8
- */
9
- export type ModalAppearance = "default" | "centered" | "fullscreen";
10
7
  /**
11
8
  * Props for the Modal component
12
9
  */
13
- export interface ModalProps {
14
- /** Whether the modal is open */
15
- open: boolean;
16
- /** Modal content */
17
- children: ReactNode;
18
- /** Modal title */
19
- title?: string | ReactNode;
20
- /** Whether to show the backdrop mask */
21
- mask?: boolean;
10
+ export interface ModalProps extends Omit<AntDModalProps, "title" | "footer"> {
22
11
  /** Whether to show only the body content without header */
23
12
  onlyBody?: boolean;
24
13
  /** Whether to add spacing to the body */
25
14
  bodySpacing?: boolean;
26
- /** Custom header content on the right side */
27
- headerRightContent?: ReactNode;
28
15
  /** Container element ID for portal rendering */
29
16
  parentContainer?: string;
17
+ /** Custom header content on the right side */
18
+ headerRightContent?: ReactNode;
30
19
  /** Whether to add a line after the header */
31
20
  addLineAfterHeader?: boolean;
32
21
  /** Custom z-index for the modal */
@@ -41,28 +30,12 @@ export interface ModalProps {
41
30
  noPadding?: boolean;
42
31
  /** Close handler */
43
32
  onClose?: () => void;
44
- /** Cancel handler */
45
- onCancel?: () => void;
46
- /** Upload handler function */
47
- onUpload?: (files: FileList | null) => void;
48
- /** Modal size */
49
- size?: ModalSize;
50
- /** Modal appearance */
51
- appearance?: ModalAppearance;
52
- /** Additional CSS classes */
53
- className?: string;
54
- /** Custom width */
55
- width?: number | string;
56
- /** Custom height */
57
- height?: number | string;
33
+ /** Modal title - can be string or ReactNode */
34
+ title?: string | ReactNode;
58
35
  /** Footer content */
59
36
  footer?: ReactNode;
60
- /** Whether the modal is closable by clicking outside */
61
- closable?: boolean;
62
- /** Whether to center the modal */
63
- centered?: boolean;
64
- /** Custom styles */
65
- style?: React.CSSProperties;
37
+ /** Modal size */
38
+ size?: ModalSize;
66
39
  }
67
40
  /**
68
41
  * Modal component for displaying overlay content
@@ -74,4 +47,7 @@ export interface ModalProps {
74
47
  * </Modal>
75
48
  * ```
76
49
  */
77
- export declare const Modal: import("react").ForwardRefExoticComponent<ModalProps & import("react").RefAttributes<HTMLDivElement>>;
50
+ export declare const Modal: {
51
+ (props: ModalProps): import("react").ReactPortal;
52
+ displayName: string;
53
+ };
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from 'react';
1
+ import React, { type ReactNode } from 'react';
2
2
  export interface TooltipProps {
3
3
  title: ReactNode;
4
4
  placement?: 'top' | 'bottom' | 'left' | 'right';
@@ -6,3 +6,4 @@ export interface TooltipProps {
6
6
  className?: string;
7
7
  }
8
8
  export declare const Tooltip: React.FC<TooltipProps>;
9
+ export default Tooltip;
package/dist/index.d.ts CHANGED
@@ -29,7 +29,7 @@ export type { StatusColorMappingProps, StatusColor, } from "./components/data-di
29
29
  export { Badge } from "./components/data-display/badge/Badge";
30
30
  export type { BadgeProps, BadgeStatus, BadgeAppearance, BadgeSize, } from "./components/data-display/badge/Badge";
31
31
  export { Modal } from "./components/data-display/modal/Modal";
32
- export type { ModalProps, ModalSize, ModalAppearance, } from "./components/data-display/modal/Modal";
32
+ export type { ModalProps, ModalSize, } from "./components/data-display/modal/Modal";
33
33
  export { Tag } from "./components/data-display/tag/Tag";
34
34
  export type { TagProps, TagSize, TagColor, ThemeMode, UploadHandler, } from "./components/data-display/tag/Tag";
35
35
  export { LabelValue } from "./components/data-display/label-value/LabelValue";