@elementor/editor-ui 4.0.0-564 → 4.0.0-573
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.mts +23 -5
- package/dist/index.d.ts +23 -5
- package/dist/index.js +289 -210
- package/dist/index.mjs +222 -142
- package/package.json +2 -2
- package/src/components/collapsible-content.tsx +66 -0
- package/src/components/confirmation-dialog.tsx +59 -13
- package/src/components/promotions/promotion-popover.tsx +7 -2
- package/src/index.ts +1 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _emotion_styled from '@emotion/styled';
|
|
2
2
|
import * as _mui_system from '@mui/system';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
|
-
import { ReactNode, PropsWithChildren, ReactElement, MouseEvent as MouseEvent$1, ComponentProps, ElementType, ComponentType
|
|
4
|
+
import { ReactNode, PropsWithChildren, ReactElement, MouseEvent as MouseEvent$1, RefObject, ComponentProps, ElementType, ComponentType } from 'react';
|
|
5
5
|
import * as _mui_material from '@mui/material';
|
|
6
6
|
import { MenuItemProps, MenuItemTextProps, TypographyProps, AlertProps, InfotipProps, BoxProps, ButtonProps, MenuList, DialogProps, DialogContentTextProps } from '@elementor/ui';
|
|
7
7
|
|
|
@@ -10,6 +10,16 @@ declare const CollapseIcon: _emotion_styled.StyledComponent<Omit<_mui_material.S
|
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
}, {}, {}>;
|
|
12
12
|
|
|
13
|
+
type StaticItem<T = unknown> = T extends (...args: unknown[]) => unknown ? never : T;
|
|
14
|
+
type CallbackItem<T> = (isOpen: boolean) => T;
|
|
15
|
+
type CollapsibleValue<T> = CallbackItem<T> | StaticItem<T>;
|
|
16
|
+
type CollapsibleContentProps = React$1.PropsWithChildren<{
|
|
17
|
+
defaultOpen?: boolean;
|
|
18
|
+
titleEnd?: CollapsibleValue<ReactNode | string> | null;
|
|
19
|
+
}>;
|
|
20
|
+
declare const CollapsibleContent: ({ children, defaultOpen, titleEnd }: CollapsibleContentProps) => React$1.JSX.Element;
|
|
21
|
+
declare function getCollapsibleValue<T>(value: CollapsibleValue<T>, isOpen: boolean): T;
|
|
22
|
+
|
|
13
23
|
type EllipsisWithTooltipProps<T extends React$1.ElementType> = {
|
|
14
24
|
maxWidth?: React$1.CSSProperties['maxWidth'];
|
|
15
25
|
title: string;
|
|
@@ -121,8 +131,9 @@ type PromotionPopoverProps = React$1.PropsWithChildren<PromotionPopoverCardProps
|
|
|
121
131
|
open: boolean;
|
|
122
132
|
placement?: InfotipProps['placement'];
|
|
123
133
|
slotProps?: InfotipProps['slotProps'];
|
|
134
|
+
anchorRef?: RefObject<HTMLElement | null>;
|
|
124
135
|
}>;
|
|
125
|
-
declare const PromotionPopover: ({ children, open, placement, slotProps, ...cardProps }: PromotionPopoverProps) => React$1.JSX.Element;
|
|
136
|
+
declare const PromotionPopover: ({ children, open, placement, slotProps, anchorRef, ...cardProps }: PromotionPopoverProps) => React$1.JSX.Element;
|
|
126
137
|
|
|
127
138
|
declare const PromotionChip: React$1.ForwardRefExoticComponent<React$1.RefAttributes<HTMLDivElement>>;
|
|
128
139
|
|
|
@@ -224,16 +235,23 @@ declare const useDialog: () => {
|
|
|
224
235
|
type ConfirmationDialogProps = Pick<DialogProps, 'open' | 'onClose' | 'children'>;
|
|
225
236
|
declare const ConfirmationDialog: {
|
|
226
237
|
({ open, onClose, children }: ConfirmationDialogProps): React$1.JSX.Element;
|
|
227
|
-
Title: ({ children }:
|
|
238
|
+
Title: ({ children, icon: Icon, iconColor, }: ConfirmationDialogTitleProps) => React$1.JSX.Element;
|
|
228
239
|
Content: ({ children }: React$1.PropsWithChildren) => React$1.JSX.Element;
|
|
229
240
|
ContentText: (props: DialogContentTextProps) => React$1.JSX.Element;
|
|
230
|
-
Actions: ({ onClose, onConfirm, cancelLabel, confirmLabel, }: ConfirmationDialogActionsProps) => React$1.JSX.Element;
|
|
241
|
+
Actions: ({ onClose, onConfirm, cancelLabel, confirmLabel, color, onSuppressMessage, suppressLabel, }: ConfirmationDialogActionsProps) => React$1.JSX.Element;
|
|
231
242
|
};
|
|
243
|
+
type ConfirmationDialogTitleProps = React$1.PropsWithChildren<{
|
|
244
|
+
icon?: React$1.ElementType;
|
|
245
|
+
iconColor?: 'error' | 'secondary';
|
|
246
|
+
}>;
|
|
232
247
|
type ConfirmationDialogActionsProps = {
|
|
233
248
|
onClose: () => void;
|
|
234
249
|
onConfirm: () => void;
|
|
235
250
|
cancelLabel?: string;
|
|
236
251
|
confirmLabel?: string;
|
|
252
|
+
color?: 'error' | 'secondary';
|
|
253
|
+
onSuppressMessage?: () => void;
|
|
254
|
+
suppressLabel?: string;
|
|
237
255
|
};
|
|
238
256
|
|
|
239
257
|
declare const SectionRefContext: React$1.Context<RefObject<HTMLElement> | null>;
|
|
@@ -269,4 +287,4 @@ declare const useTextFieldAutoSelect: () => React$1.RefObject<HTMLInputElement>;
|
|
|
269
287
|
|
|
270
288
|
declare const useCanvasClickHandler: (isActive: boolean, onClickAway: (e: MouseEvent) => void) => void;
|
|
271
289
|
|
|
272
|
-
export { CollapseIcon, ConfirmationDialog, CtaButton, EditableField, EllipsisWithTooltip, FloatingActionsBar, Form, GlobalDialog, ITEM_HEIGHT, InfoAlert, InfoTipCard, IntroductionModal, MenuItemInfotip, MenuListItem, PopoverAction, type PopoverActionProps, PopoverBody, PopoverHeader, PopoverMenuList, type PopoverMenuListProps, PromotionAlert, PromotionChip, PromotionInfotip, PromotionPopover, SaveChangesDialog, SearchField, SectionPopoverBody, SectionRefContext, StyledMenuList, ThemeProvider, type VirtualizedItem, WarningInfotip, closeDialog, openDialog, useCanvasClickHandler, useDialog, useEditable, useFloatingActionsBar, useSectionWidth, useTextFieldAutoSelect };
|
|
290
|
+
export { CollapseIcon, CollapsibleContent, type CollapsibleValue, ConfirmationDialog, CtaButton, EditableField, EllipsisWithTooltip, FloatingActionsBar, Form, GlobalDialog, ITEM_HEIGHT, InfoAlert, InfoTipCard, IntroductionModal, MenuItemInfotip, MenuListItem, PopoverAction, type PopoverActionProps, PopoverBody, PopoverHeader, PopoverMenuList, type PopoverMenuListProps, PromotionAlert, PromotionChip, PromotionInfotip, PromotionPopover, SaveChangesDialog, SearchField, SectionPopoverBody, SectionRefContext, StyledMenuList, ThemeProvider, type VirtualizedItem, WarningInfotip, closeDialog, getCollapsibleValue, openDialog, useCanvasClickHandler, useDialog, useEditable, useFloatingActionsBar, useSectionWidth, useTextFieldAutoSelect };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _emotion_styled from '@emotion/styled';
|
|
2
2
|
import * as _mui_system from '@mui/system';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
|
-
import { ReactNode, PropsWithChildren, ReactElement, MouseEvent as MouseEvent$1, ComponentProps, ElementType, ComponentType
|
|
4
|
+
import { ReactNode, PropsWithChildren, ReactElement, MouseEvent as MouseEvent$1, RefObject, ComponentProps, ElementType, ComponentType } from 'react';
|
|
5
5
|
import * as _mui_material from '@mui/material';
|
|
6
6
|
import { MenuItemProps, MenuItemTextProps, TypographyProps, AlertProps, InfotipProps, BoxProps, ButtonProps, MenuList, DialogProps, DialogContentTextProps } from '@elementor/ui';
|
|
7
7
|
|
|
@@ -10,6 +10,16 @@ declare const CollapseIcon: _emotion_styled.StyledComponent<Omit<_mui_material.S
|
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
}, {}, {}>;
|
|
12
12
|
|
|
13
|
+
type StaticItem<T = unknown> = T extends (...args: unknown[]) => unknown ? never : T;
|
|
14
|
+
type CallbackItem<T> = (isOpen: boolean) => T;
|
|
15
|
+
type CollapsibleValue<T> = CallbackItem<T> | StaticItem<T>;
|
|
16
|
+
type CollapsibleContentProps = React$1.PropsWithChildren<{
|
|
17
|
+
defaultOpen?: boolean;
|
|
18
|
+
titleEnd?: CollapsibleValue<ReactNode | string> | null;
|
|
19
|
+
}>;
|
|
20
|
+
declare const CollapsibleContent: ({ children, defaultOpen, titleEnd }: CollapsibleContentProps) => React$1.JSX.Element;
|
|
21
|
+
declare function getCollapsibleValue<T>(value: CollapsibleValue<T>, isOpen: boolean): T;
|
|
22
|
+
|
|
13
23
|
type EllipsisWithTooltipProps<T extends React$1.ElementType> = {
|
|
14
24
|
maxWidth?: React$1.CSSProperties['maxWidth'];
|
|
15
25
|
title: string;
|
|
@@ -121,8 +131,9 @@ type PromotionPopoverProps = React$1.PropsWithChildren<PromotionPopoverCardProps
|
|
|
121
131
|
open: boolean;
|
|
122
132
|
placement?: InfotipProps['placement'];
|
|
123
133
|
slotProps?: InfotipProps['slotProps'];
|
|
134
|
+
anchorRef?: RefObject<HTMLElement | null>;
|
|
124
135
|
}>;
|
|
125
|
-
declare const PromotionPopover: ({ children, open, placement, slotProps, ...cardProps }: PromotionPopoverProps) => React$1.JSX.Element;
|
|
136
|
+
declare const PromotionPopover: ({ children, open, placement, slotProps, anchorRef, ...cardProps }: PromotionPopoverProps) => React$1.JSX.Element;
|
|
126
137
|
|
|
127
138
|
declare const PromotionChip: React$1.ForwardRefExoticComponent<React$1.RefAttributes<HTMLDivElement>>;
|
|
128
139
|
|
|
@@ -224,16 +235,23 @@ declare const useDialog: () => {
|
|
|
224
235
|
type ConfirmationDialogProps = Pick<DialogProps, 'open' | 'onClose' | 'children'>;
|
|
225
236
|
declare const ConfirmationDialog: {
|
|
226
237
|
({ open, onClose, children }: ConfirmationDialogProps): React$1.JSX.Element;
|
|
227
|
-
Title: ({ children }:
|
|
238
|
+
Title: ({ children, icon: Icon, iconColor, }: ConfirmationDialogTitleProps) => React$1.JSX.Element;
|
|
228
239
|
Content: ({ children }: React$1.PropsWithChildren) => React$1.JSX.Element;
|
|
229
240
|
ContentText: (props: DialogContentTextProps) => React$1.JSX.Element;
|
|
230
|
-
Actions: ({ onClose, onConfirm, cancelLabel, confirmLabel, }: ConfirmationDialogActionsProps) => React$1.JSX.Element;
|
|
241
|
+
Actions: ({ onClose, onConfirm, cancelLabel, confirmLabel, color, onSuppressMessage, suppressLabel, }: ConfirmationDialogActionsProps) => React$1.JSX.Element;
|
|
231
242
|
};
|
|
243
|
+
type ConfirmationDialogTitleProps = React$1.PropsWithChildren<{
|
|
244
|
+
icon?: React$1.ElementType;
|
|
245
|
+
iconColor?: 'error' | 'secondary';
|
|
246
|
+
}>;
|
|
232
247
|
type ConfirmationDialogActionsProps = {
|
|
233
248
|
onClose: () => void;
|
|
234
249
|
onConfirm: () => void;
|
|
235
250
|
cancelLabel?: string;
|
|
236
251
|
confirmLabel?: string;
|
|
252
|
+
color?: 'error' | 'secondary';
|
|
253
|
+
onSuppressMessage?: () => void;
|
|
254
|
+
suppressLabel?: string;
|
|
237
255
|
};
|
|
238
256
|
|
|
239
257
|
declare const SectionRefContext: React$1.Context<RefObject<HTMLElement> | null>;
|
|
@@ -269,4 +287,4 @@ declare const useTextFieldAutoSelect: () => React$1.RefObject<HTMLInputElement>;
|
|
|
269
287
|
|
|
270
288
|
declare const useCanvasClickHandler: (isActive: boolean, onClickAway: (e: MouseEvent) => void) => void;
|
|
271
289
|
|
|
272
|
-
export { CollapseIcon, ConfirmationDialog, CtaButton, EditableField, EllipsisWithTooltip, FloatingActionsBar, Form, GlobalDialog, ITEM_HEIGHT, InfoAlert, InfoTipCard, IntroductionModal, MenuItemInfotip, MenuListItem, PopoverAction, type PopoverActionProps, PopoverBody, PopoverHeader, PopoverMenuList, type PopoverMenuListProps, PromotionAlert, PromotionChip, PromotionInfotip, PromotionPopover, SaveChangesDialog, SearchField, SectionPopoverBody, SectionRefContext, StyledMenuList, ThemeProvider, type VirtualizedItem, WarningInfotip, closeDialog, openDialog, useCanvasClickHandler, useDialog, useEditable, useFloatingActionsBar, useSectionWidth, useTextFieldAutoSelect };
|
|
290
|
+
export { CollapseIcon, CollapsibleContent, type CollapsibleValue, ConfirmationDialog, CtaButton, EditableField, EllipsisWithTooltip, FloatingActionsBar, Form, GlobalDialog, ITEM_HEIGHT, InfoAlert, InfoTipCard, IntroductionModal, MenuItemInfotip, MenuListItem, PopoverAction, type PopoverActionProps, PopoverBody, PopoverHeader, PopoverMenuList, type PopoverMenuListProps, PromotionAlert, PromotionChip, PromotionInfotip, PromotionPopover, SaveChangesDialog, SearchField, SectionPopoverBody, SectionRefContext, StyledMenuList, ThemeProvider, type VirtualizedItem, WarningInfotip, closeDialog, getCollapsibleValue, openDialog, useCanvasClickHandler, useDialog, useEditable, useFloatingActionsBar, useSectionWidth, useTextFieldAutoSelect };
|