@lax-wp/design-system 0.3.6 → 0.3.7
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/components/feedback/confirmation-modal/ConfirmationModal.d.ts +26 -16
- package/dist/components/tooltip/Tooltip.d.ts +10 -5
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +16662 -16661
- package/dist/index.umd.js +77 -77
- package/package.json +1 -1
|
@@ -1,17 +1,31 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type IButtonStatus } from '../../button/Button';
|
|
3
3
|
export interface ConfirmationModalProps {
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
/** Callback when
|
|
7
|
-
|
|
8
|
-
/** Callback when
|
|
9
|
-
|
|
4
|
+
/** Whether the modal is visible */
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
/** Callback when modal is closed */
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
/** Callback when confirmed */
|
|
9
|
+
onConfirm?: () => void;
|
|
10
10
|
/** Title of the confirmation popup */
|
|
11
|
-
title
|
|
11
|
+
title?: React.ReactNode;
|
|
12
12
|
/** Content/message of the confirmation popup */
|
|
13
|
-
content
|
|
14
|
-
/**
|
|
13
|
+
content?: React.ReactNode;
|
|
14
|
+
/** Whether the action is in loading state */
|
|
15
|
+
isLoading?: boolean;
|
|
16
|
+
/** Variant of the modal ('destructive' for delete actions) */
|
|
17
|
+
variant?: 'destructive' | 'default';
|
|
18
|
+
/** Width of the modal in pixels */
|
|
19
|
+
width?: number;
|
|
20
|
+
/** Container element ID for portal rendering */
|
|
21
|
+
parentContainer?: string;
|
|
22
|
+
/** Child element that triggers the popup when clicked (optional) - legacy support */
|
|
23
|
+
children?: React.ReactElement;
|
|
24
|
+
/** Callback when cancel is triggered - legacy support */
|
|
25
|
+
onCancel?: (closeByIcon?: boolean) => void;
|
|
26
|
+
/** Callback when OK is clicked - legacy support */
|
|
27
|
+
onOk?: () => void;
|
|
28
|
+
/** Footer configuration - legacy support */
|
|
15
29
|
footer?: {
|
|
16
30
|
/** Justify content alignment (e.g., 'justify-end', 'justify-center') */
|
|
17
31
|
justify?: string;
|
|
@@ -24,18 +38,14 @@ export interface ConfirmationModalProps {
|
|
|
24
38
|
/** Button style for cancel button */
|
|
25
39
|
cancelBtnType?: IButtonStatus;
|
|
26
40
|
};
|
|
27
|
-
/** Async handler that receives a callback with error status */
|
|
41
|
+
/** Async handler that receives a callback with error status - legacy support */
|
|
28
42
|
async?: (cb: ({ error }: {
|
|
29
43
|
error: boolean;
|
|
30
44
|
}) => void) => Promise<void>;
|
|
31
|
-
/**
|
|
32
|
-
width?: number;
|
|
33
|
-
/** Control visibility from outside */
|
|
45
|
+
/** Control visibility from outside - legacy support */
|
|
34
46
|
isVisibleOutside?: boolean;
|
|
35
|
-
/** Whether clicking children can open the popup */
|
|
47
|
+
/** Whether clicking children can open the popup - legacy support */
|
|
36
48
|
ableToConfirmByChildren?: boolean;
|
|
37
|
-
/** Container element ID for portal rendering */
|
|
38
|
-
parentContainer?: string;
|
|
39
49
|
}
|
|
40
50
|
/**
|
|
41
51
|
* ConfirmationModal component for displaying confirmation dialogs
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import './styles.css';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type TooltipPlacement = 'auto' | 'auto-start' | 'auto-end' | 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
|
|
2
4
|
export interface TooltipProps {
|
|
3
|
-
title: ReactNode;
|
|
4
|
-
placement?:
|
|
5
|
-
children: ReactNode;
|
|
5
|
+
title: React.ReactNode;
|
|
6
|
+
placement?: TooltipPlacement;
|
|
7
|
+
children: React.ReactNode;
|
|
6
8
|
className?: string;
|
|
9
|
+
hideTooltip?: boolean;
|
|
10
|
+
delayShow?: boolean;
|
|
11
|
+
whiteSpace?: 'normal' | 'nowrap' | 'pre' | 'pre-wrap' | 'pre-line' | 'initial' | 'inherit';
|
|
7
12
|
}
|
|
8
|
-
|
|
13
|
+
declare const Tooltip: ({ children, title, hideTooltip, delayShow, whiteSpace, placement, className, }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
14
|
export default Tooltip;
|
package/dist/index.d.ts
CHANGED
|
@@ -42,6 +42,8 @@ export { PdfViewer } from "./components/data-display/pdf-viewer/PdfViewer";
|
|
|
42
42
|
export type { PdfViewerProps } from "./components/data-display/pdf-viewer/PdfViewer";
|
|
43
43
|
export { Popper } from "./components/data-display/popper/Popper";
|
|
44
44
|
export type { PopperProps, PopperPlacement, } from "./components/data-display/popper/Popper";
|
|
45
|
+
export { default as Tooltip } from "./components/tooltip/Tooltip";
|
|
46
|
+
export type { TooltipProps, TooltipPlacement, } from "./components/tooltip/Tooltip";
|
|
45
47
|
export { default as Toast, toast } from "./components/feedback/toast/Toast";
|
|
46
48
|
export type { ToastContainerProps, ToastType, ToastPosition, } from "./components/feedback/toast/Toast";
|
|
47
49
|
export { ConfirmationModal } from "./components/feedback/confirmation-modal/ConfirmationModal";
|