@elementor/editor-ui 3.35.0-341 → 3.35.0-342

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 CHANGED
@@ -1,7 +1,13 @@
1
+ import * as _emotion_styled from '@emotion/styled';
2
+ import * as _mui_system from '@mui/system';
1
3
  import * as React$1 from 'react';
2
4
  import { ReactNode, PropsWithChildren, ReactElement } from 'react';
5
+ import * as _mui_material from '@mui/material';
3
6
  import { MenuItemProps, MenuItemTextProps, TypographyProps, AlertProps, InfotipProps, BoxProps, MenuList, DialogProps, DialogContentTextProps } from '@elementor/ui';
4
- import * as _emotion_styled from '@emotion/styled';
7
+
8
+ declare const CollapseIcon: _emotion_styled.StyledComponent<Omit<_mui_material.SvgIconProps, "ref"> & React$1.RefAttributes<SVGSVGElement> & _mui_system.MUIStyledCommonProps<_mui_material.Theme> & {
9
+ open: boolean;
10
+ }, {}, {}>;
5
11
 
6
12
  type EllipsisWithTooltipProps<T extends React$1.ElementType> = {
7
13
  maxWidth?: React$1.CSSProperties['maxWidth'];
@@ -180,4 +186,4 @@ declare const useEditable: ({ value, onSubmit, validation, onClick, onError }: U
180
186
  };
181
187
  };
182
188
 
183
- export { EditableField, EllipsisWithTooltip, Form, GlobalDialog, ITEM_HEIGHT, InfoAlert, InfoTipCard, IntroductionModal, MenuItemInfotip, MenuListItem, PopoverBody, PopoverHeader, PopoverMenuList, type PopoverMenuListProps, SaveChangesDialog, SearchField, StyledMenuList, ThemeProvider, type VirtualizedItem, WarningInfotip, closeDialog, openDialog, useDialog, useEditable };
189
+ export { CollapseIcon, EditableField, EllipsisWithTooltip, Form, GlobalDialog, ITEM_HEIGHT, InfoAlert, InfoTipCard, IntroductionModal, MenuItemInfotip, MenuListItem, PopoverBody, PopoverHeader, PopoverMenuList, type PopoverMenuListProps, SaveChangesDialog, SearchField, StyledMenuList, ThemeProvider, type VirtualizedItem, WarningInfotip, closeDialog, openDialog, useDialog, useEditable };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,13 @@
1
+ import * as _emotion_styled from '@emotion/styled';
2
+ import * as _mui_system from '@mui/system';
1
3
  import * as React$1 from 'react';
2
4
  import { ReactNode, PropsWithChildren, ReactElement } from 'react';
5
+ import * as _mui_material from '@mui/material';
3
6
  import { MenuItemProps, MenuItemTextProps, TypographyProps, AlertProps, InfotipProps, BoxProps, MenuList, DialogProps, DialogContentTextProps } from '@elementor/ui';
4
- import * as _emotion_styled from '@emotion/styled';
7
+
8
+ declare const CollapseIcon: _emotion_styled.StyledComponent<Omit<_mui_material.SvgIconProps, "ref"> & React$1.RefAttributes<SVGSVGElement> & _mui_system.MUIStyledCommonProps<_mui_material.Theme> & {
9
+ open: boolean;
10
+ }, {}, {}>;
5
11
 
6
12
  type EllipsisWithTooltipProps<T extends React$1.ElementType> = {
7
13
  maxWidth?: React$1.CSSProperties['maxWidth'];
@@ -180,4 +186,4 @@ declare const useEditable: ({ value, onSubmit, validation, onClick, onError }: U
180
186
  };
181
187
  };
182
188
 
183
- export { EditableField, EllipsisWithTooltip, Form, GlobalDialog, ITEM_HEIGHT, InfoAlert, InfoTipCard, IntroductionModal, MenuItemInfotip, MenuListItem, PopoverBody, PopoverHeader, PopoverMenuList, type PopoverMenuListProps, SaveChangesDialog, SearchField, StyledMenuList, ThemeProvider, type VirtualizedItem, WarningInfotip, closeDialog, openDialog, useDialog, useEditable };
189
+ export { CollapseIcon, EditableField, EllipsisWithTooltip, Form, GlobalDialog, ITEM_HEIGHT, InfoAlert, InfoTipCard, IntroductionModal, MenuItemInfotip, MenuListItem, PopoverBody, PopoverHeader, PopoverMenuList, type PopoverMenuListProps, SaveChangesDialog, SearchField, StyledMenuList, ThemeProvider, type VirtualizedItem, WarningInfotip, closeDialog, openDialog, useDialog, useEditable };
package/dist/index.js CHANGED
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
+ CollapseIcon: () => CollapseIcon,
33
34
  EditableField: () => EditableField,
34
35
  EllipsisWithTooltip: () => EllipsisWithTooltip,
35
36
  Form: () => Form,
@@ -55,10 +56,22 @@ __export(index_exports, {
55
56
  });
56
57
  module.exports = __toCommonJS(index_exports);
57
58
 
59
+ // src/components/collapse-icon.tsx
60
+ var import_icons = require("@elementor/icons");
61
+ var import_ui = require("@elementor/ui");
62
+ var CollapseIcon = (0, import_ui.styled)(import_icons.ChevronDownIcon, {
63
+ shouldForwardProp: (prop) => prop !== "open"
64
+ })(({ theme, open }) => ({
65
+ transform: open ? "rotate(180deg)" : "rotate(0deg)",
66
+ transition: theme.transitions.create("transform", {
67
+ duration: theme.transitions.duration.standard
68
+ })
69
+ }));
70
+
58
71
  // src/components/ellipsis-with-tooltip.tsx
59
72
  var React = __toESM(require("react"));
60
73
  var import_react = require("react");
61
- var import_ui = require("@elementor/ui");
74
+ var import_ui2 = require("@elementor/ui");
62
75
  var EllipsisWithTooltip = ({
63
76
  maxWidth,
64
77
  title,
@@ -67,12 +80,12 @@ var EllipsisWithTooltip = ({
67
80
  }) => {
68
81
  const [setRef, isOverflowing] = useIsOverflowing();
69
82
  if (isOverflowing) {
70
- return /* @__PURE__ */ React.createElement(import_ui.Tooltip, { title, placement: "top" }, /* @__PURE__ */ React.createElement(Content, { maxWidth, ref: setRef, as, ...props }, title));
83
+ return /* @__PURE__ */ React.createElement(import_ui2.Tooltip, { title, placement: "top" }, /* @__PURE__ */ React.createElement(Content, { maxWidth, ref: setRef, as, ...props }, title));
71
84
  }
72
85
  return /* @__PURE__ */ React.createElement(Content, { maxWidth, ref: setRef, as, ...props }, title);
73
86
  };
74
87
  var Content = React.forwardRef(
75
- ({ maxWidth, as: Component = import_ui.Box, ...props }, ref) => /* @__PURE__ */ React.createElement(
88
+ ({ maxWidth, as: Component = import_ui2.Box, ...props }, ref) => /* @__PURE__ */ React.createElement(
76
89
  Component,
77
90
  {
78
91
  ref,
@@ -102,13 +115,13 @@ var useIsOverflowing = () => {
102
115
  // src/components/editable-field.tsx
103
116
  var React2 = __toESM(require("react"));
104
117
  var import_react2 = require("react");
105
- var import_ui2 = require("@elementor/ui");
118
+ var import_ui3 = require("@elementor/ui");
106
119
  var EditableField = (0, import_react2.forwardRef)(
107
120
  ({ value, error, as = "span", sx, ...props }, ref) => {
108
- return /* @__PURE__ */ React2.createElement(import_ui2.Tooltip, { title: error, open: !!error, placement: "top" }, /* @__PURE__ */ React2.createElement(StyledField, { ref, component: as, ...props }, value));
121
+ return /* @__PURE__ */ React2.createElement(import_ui3.Tooltip, { title: error, open: !!error, placement: "top" }, /* @__PURE__ */ React2.createElement(StyledField, { ref, component: as, ...props }, value));
109
122
  }
110
123
  );
111
- var StyledField = (0, import_ui2.styled)(import_ui2.Box)`
124
+ var StyledField = (0, import_ui3.styled)(import_ui3.Box)`
112
125
  width: 100%;
113
126
  &:focus {
114
127
  outline: none;
@@ -118,25 +131,25 @@ var StyledField = (0, import_ui2.styled)(import_ui2.Box)`
118
131
  // src/components/introduction-modal.tsx
119
132
  var React3 = __toESM(require("react"));
120
133
  var import_react3 = require("react");
121
- var import_ui3 = require("@elementor/ui");
134
+ var import_ui4 = require("@elementor/ui");
122
135
  var import_i18n = require("@wordpress/i18n");
123
136
  var IntroductionModal = ({ open, handleClose, title, children }) => {
124
137
  const [shouldShowAgain, setShouldShowAgain] = (0, import_react3.useState)(true);
125
- return /* @__PURE__ */ React3.createElement(import_ui3.Dialog, { open, onClose: handleClose, maxWidth: "sm", TransitionComponent: Transition }, title && /* @__PURE__ */ React3.createElement(import_ui3.DialogHeader, { logo: false }, /* @__PURE__ */ React3.createElement(import_ui3.DialogTitle, null, title)), children, /* @__PURE__ */ React3.createElement(import_ui3.DialogActions, null, /* @__PURE__ */ React3.createElement(
126
- import_ui3.FormControlLabel,
138
+ return /* @__PURE__ */ React3.createElement(import_ui4.Dialog, { open, onClose: handleClose, maxWidth: "sm", TransitionComponent: Transition }, title && /* @__PURE__ */ React3.createElement(import_ui4.DialogHeader, { logo: false }, /* @__PURE__ */ React3.createElement(import_ui4.DialogTitle, null, title)), children, /* @__PURE__ */ React3.createElement(import_ui4.DialogActions, null, /* @__PURE__ */ React3.createElement(
139
+ import_ui4.FormControlLabel,
127
140
  {
128
141
  sx: { marginRight: "auto" },
129
142
  control: /* @__PURE__ */ React3.createElement(
130
- import_ui3.Checkbox,
143
+ import_ui4.Checkbox,
131
144
  {
132
145
  checked: !shouldShowAgain,
133
146
  onChange: () => setShouldShowAgain(!shouldShowAgain)
134
147
  }
135
148
  ),
136
- label: /* @__PURE__ */ React3.createElement(import_ui3.Typography, { variant: "body2" }, (0, import_i18n.__)("Don't show this again", "elementor"))
149
+ label: /* @__PURE__ */ React3.createElement(import_ui4.Typography, { variant: "body2" }, (0, import_i18n.__)("Don't show this again", "elementor"))
137
150
  }
138
151
  ), /* @__PURE__ */ React3.createElement(
139
- import_ui3.Button,
152
+ import_ui4.Button,
140
153
  {
141
154
  size: "medium",
142
155
  variant: "contained",
@@ -147,7 +160,7 @@ var IntroductionModal = ({ open, handleClose, title, children }) => {
147
160
  )));
148
161
  };
149
162
  var Transition = React3.forwardRef((props, ref) => /* @__PURE__ */ React3.createElement(
150
- import_ui3.Fade,
163
+ import_ui4.Fade,
151
164
  {
152
165
  ref,
153
166
  ...props,
@@ -160,7 +173,7 @@ var Transition = React3.forwardRef((props, ref) => /* @__PURE__ */ React3.create
160
173
 
161
174
  // src/components/theme-provider.tsx
162
175
  var React4 = __toESM(require("react"));
163
- var import_ui4 = require("@elementor/ui");
176
+ var import_ui5 = require("@elementor/ui");
164
177
 
165
178
  // src/hooks/use-color-scheme.ts
166
179
  var import_react4 = require("react");
@@ -189,22 +202,22 @@ function getV1ColorScheme() {
189
202
  var EDITOR_PALLETTE = "unstable";
190
203
  function ThemeProvider({ children }) {
191
204
  const colorScheme = useColorScheme();
192
- return /* @__PURE__ */ React4.createElement(import_ui4.ThemeProvider, { colorScheme, palette: EDITOR_PALLETTE }, children);
205
+ return /* @__PURE__ */ React4.createElement(import_ui5.ThemeProvider, { colorScheme, palette: EDITOR_PALLETTE }, children);
193
206
  }
194
207
 
195
208
  // src/components/menu-item.tsx
196
209
  var React6 = __toESM(require("react"));
197
210
  var import_react5 = require("react");
198
- var import_ui6 = require("@elementor/ui");
211
+ var import_ui7 = require("@elementor/ui");
199
212
 
200
213
  // src/components/info-alert.tsx
201
214
  var React5 = __toESM(require("react"));
202
- var import_icons = require("@elementor/icons");
203
- var import_ui5 = require("@elementor/ui");
215
+ var import_icons2 = require("@elementor/icons");
216
+ var import_ui6 = require("@elementor/ui");
204
217
  var InfoAlert = (props) => /* @__PURE__ */ React5.createElement(
205
- import_ui5.Alert,
218
+ import_ui6.Alert,
206
219
  {
207
- icon: /* @__PURE__ */ React5.createElement(import_icons.InfoCircleFilledIcon, { fontSize: "small", color: "secondary" }),
220
+ icon: /* @__PURE__ */ React5.createElement(import_icons2.InfoCircleFilledIcon, { fontSize: "small", color: "secondary" }),
208
221
  variant: "standard",
209
222
  color: "secondary",
210
223
  elevation: 0,
@@ -221,7 +234,7 @@ var MenuListItem = ({
221
234
  ...props
222
235
  }) => {
223
236
  return /* @__PURE__ */ React6.createElement(
224
- import_ui6.MenuItem,
237
+ import_ui7.MenuItem,
225
238
  {
226
239
  dense: true,
227
240
  ...props,
@@ -230,7 +243,7 @@ var MenuListItem = ({
230
243
  }
231
244
  },
232
245
  /* @__PURE__ */ React6.createElement(
233
- import_ui6.MenuItemText,
246
+ import_ui7.MenuItemText,
234
247
  {
235
248
  primary: children,
236
249
  primaryTypographyProps,
@@ -245,7 +258,7 @@ var MenuItemInfotip = (0, import_react5.forwardRef)(
245
258
  return /* @__PURE__ */ React6.createElement(React6.Fragment, null, children);
246
259
  }
247
260
  return /* @__PURE__ */ React6.createElement(
248
- import_ui6.Infotip,
261
+ import_ui7.Infotip,
249
262
  {
250
263
  ref,
251
264
  placement: "right",
@@ -259,10 +272,10 @@ var MenuItemInfotip = (0, import_react5.forwardRef)(
259
272
 
260
273
  // src/components/infotip-card.tsx
261
274
  var React7 = __toESM(require("react"));
262
- var import_ui7 = require("@elementor/ui");
275
+ var import_ui8 = require("@elementor/ui");
263
276
  var InfoTipCard = ({ content, svgIcon, learnMoreButton, ctaButton }) => {
264
- return /* @__PURE__ */ React7.createElement(import_ui7.Card, { elevation: 0, sx: { width: 320 } }, /* @__PURE__ */ React7.createElement(import_ui7.CardContent, { sx: { pb: 0 } }, /* @__PURE__ */ React7.createElement(import_ui7.Box, { display: "flex", alignItems: "start" }, /* @__PURE__ */ React7.createElement(import_ui7.SvgIcon, { fontSize: "tiny", sx: { mr: 0.5 } }, svgIcon), /* @__PURE__ */ React7.createElement(import_ui7.Typography, { variant: "body2" }, content, learnMoreButton && /* @__PURE__ */ React7.createElement(React7.Fragment, null, "\xA0", /* @__PURE__ */ React7.createElement(import_ui7.Link, { color: "info.main", href: learnMoreButton.href, target: "_blank" }, learnMoreButton.label))))), ctaButton && /* @__PURE__ */ React7.createElement(import_ui7.CardActions, { sx: { justifyContent: "flex-start" } }, /* @__PURE__ */ React7.createElement(
265
- import_ui7.Button,
277
+ return /* @__PURE__ */ React7.createElement(import_ui8.Card, { elevation: 0, sx: { width: 320 } }, /* @__PURE__ */ React7.createElement(import_ui8.CardContent, { sx: { pb: 0 } }, /* @__PURE__ */ React7.createElement(import_ui8.Box, { display: "flex", alignItems: "start" }, /* @__PURE__ */ React7.createElement(import_ui8.SvgIcon, { fontSize: "tiny", sx: { mr: 0.5 } }, svgIcon), /* @__PURE__ */ React7.createElement(import_ui8.Typography, { variant: "body2" }, content, learnMoreButton && /* @__PURE__ */ React7.createElement(React7.Fragment, null, "\xA0", /* @__PURE__ */ React7.createElement(import_ui8.Link, { color: "info.main", href: learnMoreButton.href, target: "_blank" }, learnMoreButton.label))))), ctaButton && /* @__PURE__ */ React7.createElement(import_ui8.CardActions, { sx: { justifyContent: "flex-start" } }, /* @__PURE__ */ React7.createElement(
278
+ import_ui8.Button,
266
279
  {
267
280
  size: "small",
268
281
  color: "secondary",
@@ -277,11 +290,11 @@ var InfoTipCard = ({ content, svgIcon, learnMoreButton, ctaButton }) => {
277
290
  // src/components/warning-infotip.tsx
278
291
  var import_react6 = require("react");
279
292
  var React8 = __toESM(require("react"));
280
- var import_ui8 = require("@elementor/ui");
293
+ var import_ui9 = require("@elementor/ui");
281
294
  var WarningInfotip = (0, import_react6.forwardRef)(
282
295
  ({ children, open, title, text, placement, width, offset, hasError = true }, ref) => {
283
296
  return /* @__PURE__ */ React8.createElement(
284
- import_ui8.Infotip,
297
+ import_ui9.Infotip,
285
298
  {
286
299
  ref,
287
300
  open,
@@ -295,14 +308,14 @@ var WarningInfotip = (0, import_react6.forwardRef)(
295
308
  },
296
309
  arrow: false,
297
310
  content: /* @__PURE__ */ React8.createElement(
298
- import_ui8.Alert,
311
+ import_ui9.Alert,
299
312
  {
300
313
  color: hasError ? "error" : "secondary",
301
314
  severity: "warning",
302
315
  variant: "standard",
303
316
  size: "small"
304
317
  },
305
- title ? /* @__PURE__ */ React8.createElement(import_ui8.AlertTitle, null, title) : null,
318
+ title ? /* @__PURE__ */ React8.createElement(import_ui9.AlertTitle, null, title) : null,
306
319
  text
307
320
  )
308
321
  },
@@ -314,7 +327,7 @@ var WarningInfotip = (0, import_react6.forwardRef)(
314
327
  // src/components/global-dialog/components/global-dialog.tsx
315
328
  var import_react7 = require("react");
316
329
  var React9 = __toESM(require("react"));
317
- var import_ui9 = require("@elementor/ui");
330
+ var import_ui10 = require("@elementor/ui");
318
331
 
319
332
  // src/components/global-dialog/subscribers.ts
320
333
  var currentDialogState = null;
@@ -348,14 +361,14 @@ var GlobalDialog = () => {
348
361
  if (!content) {
349
362
  return null;
350
363
  }
351
- return /* @__PURE__ */ React9.createElement(ThemeProvider, null, /* @__PURE__ */ React9.createElement(import_ui9.Dialog, { role: "dialog", open: true, onClose: closeDialog, maxWidth: "sm", fullWidth: true }, content.component));
364
+ return /* @__PURE__ */ React9.createElement(ThemeProvider, null, /* @__PURE__ */ React9.createElement(import_ui10.Dialog, { role: "dialog", open: true, onClose: closeDialog, maxWidth: "sm", fullWidth: true }, content.component));
352
365
  };
353
366
 
354
367
  // src/components/search-field.tsx
355
368
  var React10 = __toESM(require("react"));
356
369
  var import_react8 = require("react");
357
- var import_icons2 = require("@elementor/icons");
358
- var import_ui10 = require("@elementor/ui");
370
+ var import_icons3 = require("@elementor/icons");
371
+ var import_ui11 = require("@elementor/ui");
359
372
  var import_i18n2 = require("@wordpress/i18n");
360
373
  var SIZE = "tiny";
361
374
  var SearchField = ({ value, onSearch, placeholder, id, sx }) => {
@@ -367,8 +380,8 @@ var SearchField = ({ value, onSearch, placeholder, id, sx }) => {
367
380
  const handleInputChange = (event) => {
368
381
  onSearch(event.target.value);
369
382
  };
370
- return /* @__PURE__ */ React10.createElement(import_ui10.Box, { sx: { px: 2, pb: 1.5, ...sx } }, /* @__PURE__ */ React10.createElement(
371
- import_ui10.TextField,
383
+ return /* @__PURE__ */ React10.createElement(import_ui11.Box, { sx: { px: 2, pb: 1.5, ...sx } }, /* @__PURE__ */ React10.createElement(
384
+ import_ui11.TextField,
372
385
  {
373
386
  autoFocus: true,
374
387
  fullWidth: true,
@@ -379,8 +392,8 @@ var SearchField = ({ value, onSearch, placeholder, id, sx }) => {
379
392
  onChange: handleInputChange,
380
393
  placeholder,
381
394
  InputProps: {
382
- startAdornment: /* @__PURE__ */ React10.createElement(import_ui10.InputAdornment, { position: "start" }, /* @__PURE__ */ React10.createElement(import_icons2.SearchIcon, { fontSize: SIZE })),
383
- endAdornment: value && /* @__PURE__ */ React10.createElement(import_ui10.IconButton, { size: SIZE, onClick: handleClear, "aria-label": (0, import_i18n2.__)("Clear", "elementor") }, /* @__PURE__ */ React10.createElement(import_icons2.XIcon, { color: "action", fontSize: SIZE }))
395
+ startAdornment: /* @__PURE__ */ React10.createElement(import_ui11.InputAdornment, { position: "start" }, /* @__PURE__ */ React10.createElement(import_icons3.SearchIcon, { fontSize: SIZE })),
396
+ endAdornment: value && /* @__PURE__ */ React10.createElement(import_ui11.IconButton, { size: SIZE, onClick: handleClear, "aria-label": (0, import_i18n2.__)("Clear", "elementor") }, /* @__PURE__ */ React10.createElement(import_icons3.XIcon, { color: "action", fontSize: SIZE }))
384
397
  }
385
398
  }
386
399
  ));
@@ -410,13 +423,13 @@ var Form = ({ children, onSubmit }) => {
410
423
 
411
424
  // src/components/popover/body.tsx
412
425
  var React12 = __toESM(require("react"));
413
- var import_ui11 = require("@elementor/ui");
426
+ var import_ui12 = require("@elementor/ui");
414
427
  var SECTION_PADDING_INLINE = 32;
415
428
  var DEFAULT_POPOVER_HEIGHT = 348;
416
429
  var FALLBACK_POPOVER_WIDTH = 220;
417
430
  var PopoverBody = ({ children, height = DEFAULT_POPOVER_HEIGHT, width, id }) => {
418
431
  return /* @__PURE__ */ React12.createElement(
419
- import_ui11.Box,
432
+ import_ui12.Box,
420
433
  {
421
434
  display: "flex",
422
435
  flexDirection: "column",
@@ -434,7 +447,7 @@ var PopoverBody = ({ children, height = DEFAULT_POPOVER_HEIGHT, width, id }) =>
434
447
 
435
448
  // src/components/popover/header.tsx
436
449
  var React13 = __toESM(require("react"));
437
- var import_ui12 = require("@elementor/ui");
450
+ var import_ui13 = require("@elementor/ui");
438
451
  var SIZE2 = "tiny";
439
452
  var PopoverHeader = ({ title, onClose, icon, actions }) => {
440
453
  const paddingAndSizing = {
@@ -443,13 +456,13 @@ var PopoverHeader = ({ title, onClose, icon, actions }) => {
443
456
  py: 1.5,
444
457
  maxHeight: 36
445
458
  };
446
- return /* @__PURE__ */ React13.createElement(import_ui12.Stack, { direction: "row", alignItems: "center", ...paddingAndSizing, sx: { columnGap: 0.5 } }, icon, /* @__PURE__ */ React13.createElement(import_ui12.Typography, { variant: "subtitle2", sx: { fontSize: "12px", mt: 0.25 } }, title), /* @__PURE__ */ React13.createElement(import_ui12.Stack, { direction: "row", sx: { ml: "auto" } }, actions, /* @__PURE__ */ React13.createElement(import_ui12.CloseButton, { slotProps: { icon: { fontSize: SIZE2 } }, sx: { ml: "auto" }, onClick: onClose })));
459
+ return /* @__PURE__ */ React13.createElement(import_ui13.Stack, { direction: "row", alignItems: "center", ...paddingAndSizing, sx: { columnGap: 0.5 } }, icon, /* @__PURE__ */ React13.createElement(import_ui13.Typography, { variant: "subtitle2", sx: { fontSize: "12px", mt: 0.25 } }, title), /* @__PURE__ */ React13.createElement(import_ui13.Stack, { direction: "row", sx: { ml: "auto" } }, actions, /* @__PURE__ */ React13.createElement(import_ui13.CloseButton, { slotProps: { icon: { fontSize: SIZE2 } }, sx: { ml: "auto" }, onClick: onClose })));
447
460
  };
448
461
 
449
462
  // src/components/popover/menu-list.tsx
450
463
  var React14 = __toESM(require("react"));
451
464
  var import_react12 = require("react");
452
- var import_ui13 = require("@elementor/ui");
465
+ var import_ui14 = require("@elementor/ui");
453
466
  var import_react_virtual = require("@tanstack/react-virtual");
454
467
 
455
468
  // src/hooks/use-scroll-to-selected.ts
@@ -548,7 +561,7 @@ var PopoverMenuList = ({
548
561
  });
549
562
  useScrollToSelected({ selectedValue, items, virtualizer });
550
563
  const virtualItems = virtualizer.getVirtualItems();
551
- return /* @__PURE__ */ React14.createElement(import_ui13.Box, { ref: containerRef, sx: { height: "100%", overflowY: "auto" } }, items.length === 0 && noResultsComponent ? noResultsComponent : /* @__PURE__ */ React14.createElement(
564
+ return /* @__PURE__ */ React14.createElement(import_ui14.Box, { ref: containerRef, sx: { height: "100%", overflowY: "auto" } }, items.length === 0 && noResultsComponent ? noResultsComponent : /* @__PURE__ */ React14.createElement(
552
565
  MenuListComponent,
553
566
  {
554
567
  role: "listbox",
@@ -567,7 +580,7 @@ var PopoverMenuList = ({
567
580
  if (item.type === "category") {
568
581
  const shouldStick = virtualRow.start + MENU_LIST_PADDING_TOP <= scrollTop;
569
582
  return /* @__PURE__ */ React14.createElement(
570
- import_ui13.MenuSubheader,
583
+ import_ui14.MenuSubheader,
571
584
  {
572
585
  key: virtualRow.key,
573
586
  style: shouldStick ? {} : menuSubHeaderAbsoluteStyling(virtualRow.start),
@@ -578,7 +591,7 @@ var PopoverMenuList = ({
578
591
  }
579
592
  const isDisabled = item.disabled;
580
593
  return /* @__PURE__ */ React14.createElement(
581
- import_ui13.ListItem,
594
+ import_ui14.ListItem,
582
595
  {
583
596
  key: virtualRow.key,
584
597
  role: "option",
@@ -616,7 +629,7 @@ var PopoverMenuList = ({
616
629
  })
617
630
  ));
618
631
  };
619
- var StyledMenuList = (0, import_ui13.styled)(import_ui13.MenuList)(({ theme }) => ({
632
+ var StyledMenuList = (0, import_ui14.styled)(import_ui14.MenuList)(({ theme }) => ({
620
633
  "& > li": {
621
634
  height: ITEM_HEIGHT,
622
635
  width: "100%",
@@ -649,12 +662,12 @@ var StyledMenuList = (0, import_ui13.styled)(import_ui13.MenuList)(({ theme }) =
649
662
  // src/components/save-changes-dialog.tsx
650
663
  var React15 = __toESM(require("react"));
651
664
  var import_react13 = require("react");
652
- var import_icons3 = require("@elementor/icons");
653
- var import_ui14 = require("@elementor/ui");
665
+ var import_icons4 = require("@elementor/icons");
666
+ var import_ui15 = require("@elementor/ui");
654
667
  var TITLE_ID = "save-changes-dialog";
655
- var SaveChangesDialog = ({ children, onClose }) => /* @__PURE__ */ React15.createElement(import_ui14.Dialog, { open: true, onClose, "aria-labelledby": TITLE_ID, maxWidth: "xs" }, children);
668
+ var SaveChangesDialog = ({ children, onClose }) => /* @__PURE__ */ React15.createElement(import_ui15.Dialog, { open: true, onClose, "aria-labelledby": TITLE_ID, maxWidth: "xs" }, children);
656
669
  var SaveChangesDialogTitle = ({ children, onClose }) => /* @__PURE__ */ React15.createElement(
657
- import_ui14.DialogTitle,
670
+ import_ui15.DialogTitle,
658
671
  {
659
672
  id: TITLE_ID,
660
673
  display: "flex",
@@ -662,11 +675,11 @@ var SaveChangesDialogTitle = ({ children, onClose }) => /* @__PURE__ */ React15.
662
675
  gap: 1,
663
676
  sx: { lineHeight: 1, justifyContent: "space-between" }
664
677
  },
665
- /* @__PURE__ */ React15.createElement(import_ui14.Stack, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React15.createElement(import_icons3.AlertTriangleFilledIcon, { color: "secondary" }), children),
666
- onClose && /* @__PURE__ */ React15.createElement(import_ui14.IconButton, { onClick: onClose, size: "small" }, /* @__PURE__ */ React15.createElement(import_icons3.XIcon, null))
678
+ /* @__PURE__ */ React15.createElement(import_ui15.Stack, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React15.createElement(import_icons4.AlertTriangleFilledIcon, { color: "secondary" }), children),
679
+ onClose && /* @__PURE__ */ React15.createElement(import_ui15.IconButton, { onClick: onClose, size: "small" }, /* @__PURE__ */ React15.createElement(import_icons4.XIcon, null))
667
680
  );
668
- var SaveChangesDialogContent = ({ children }) => /* @__PURE__ */ React15.createElement(import_ui14.DialogContent, null, children);
669
- var SaveChangesDialogContentText = (props) => /* @__PURE__ */ React15.createElement(import_ui14.DialogContentText, { variant: "body2", color: "textPrimary", display: "flex", flexDirection: "column", ...props });
681
+ var SaveChangesDialogContent = ({ children }) => /* @__PURE__ */ React15.createElement(import_ui15.DialogContent, null, children);
682
+ var SaveChangesDialogContentText = (props) => /* @__PURE__ */ React15.createElement(import_ui15.DialogContentText, { variant: "body2", color: "textPrimary", display: "flex", flexDirection: "column", ...props });
670
683
  var SaveChangesDialogActions = ({ actions }) => {
671
684
  const [isConfirming, setIsConfirming] = (0, import_react13.useState)(false);
672
685
  const { cancel, confirm, discard } = actions;
@@ -675,7 +688,7 @@ var SaveChangesDialogActions = ({ actions }) => {
675
688
  await confirm.action();
676
689
  setIsConfirming(false);
677
690
  };
678
- return /* @__PURE__ */ React15.createElement(import_ui14.DialogActions, null, cancel && /* @__PURE__ */ React15.createElement(import_ui14.Button, { variant: "text", color: "secondary", onClick: cancel.action }, cancel.label), discard && /* @__PURE__ */ React15.createElement(import_ui14.Button, { variant: "text", color: "secondary", onClick: discard.action }, discard.label), /* @__PURE__ */ React15.createElement(import_ui14.Button, { variant: "contained", color: "secondary", onClick: onConfirm, loading: isConfirming }, confirm.label));
691
+ return /* @__PURE__ */ React15.createElement(import_ui15.DialogActions, null, cancel && /* @__PURE__ */ React15.createElement(import_ui15.Button, { variant: "text", color: "secondary", onClick: cancel.action }, cancel.label), discard && /* @__PURE__ */ React15.createElement(import_ui15.Button, { variant: "text", color: "secondary", onClick: discard.action }, discard.label), /* @__PURE__ */ React15.createElement(import_ui15.Button, { variant: "contained", color: "secondary", onClick: onConfirm, loading: isConfirming }, confirm.label));
679
692
  };
680
693
  SaveChangesDialog.Title = SaveChangesDialogTitle;
681
694
  SaveChangesDialog.Content = SaveChangesDialogContent;
@@ -794,6 +807,7 @@ var selectAll = (el) => {
794
807
  };
795
808
  // Annotate the CommonJS export names for ESM import in node:
796
809
  0 && (module.exports = {
810
+ CollapseIcon,
797
811
  EditableField,
798
812
  EllipsisWithTooltip,
799
813
  Form,
package/dist/index.mjs CHANGED
@@ -1,3 +1,15 @@
1
+ // src/components/collapse-icon.tsx
2
+ import { ChevronDownIcon } from "@elementor/icons";
3
+ import { styled } from "@elementor/ui";
4
+ var CollapseIcon = styled(ChevronDownIcon, {
5
+ shouldForwardProp: (prop) => prop !== "open"
6
+ })(({ theme, open }) => ({
7
+ transform: open ? "rotate(180deg)" : "rotate(0deg)",
8
+ transition: theme.transitions.create("transform", {
9
+ duration: theme.transitions.duration.standard
10
+ })
11
+ }));
12
+
1
13
  // src/components/ellipsis-with-tooltip.tsx
2
14
  import * as React from "react";
3
15
  import { useEffect, useState } from "react";
@@ -45,13 +57,13 @@ var useIsOverflowing = () => {
45
57
  // src/components/editable-field.tsx
46
58
  import * as React2 from "react";
47
59
  import { forwardRef as forwardRef2 } from "react";
48
- import { Box as Box2, styled, Tooltip as Tooltip2 } from "@elementor/ui";
60
+ import { Box as Box2, styled as styled2, Tooltip as Tooltip2 } from "@elementor/ui";
49
61
  var EditableField = forwardRef2(
50
62
  ({ value, error, as = "span", sx, ...props }, ref) => {
51
63
  return /* @__PURE__ */ React2.createElement(Tooltip2, { title: error, open: !!error, placement: "top" }, /* @__PURE__ */ React2.createElement(StyledField, { ref, component: as, ...props }, value));
52
64
  }
53
65
  );
54
- var StyledField = styled(Box2)`
66
+ var StyledField = styled2(Box2)`
55
67
  width: 100%;
56
68
  &:focus {
57
69
  outline: none;
@@ -410,7 +422,7 @@ var PopoverHeader = ({ title, onClose, icon, actions }) => {
410
422
  // src/components/popover/menu-list.tsx
411
423
  import * as React14 from "react";
412
424
  import { useMemo, useRef as useRef3 } from "react";
413
- import { Box as Box6, ListItem, MenuList, MenuSubheader, styled as styled2 } from "@elementor/ui";
425
+ import { Box as Box6, ListItem, MenuList, MenuSubheader, styled as styled3 } from "@elementor/ui";
414
426
  import { useVirtualizer } from "@tanstack/react-virtual";
415
427
 
416
428
  // src/hooks/use-scroll-to-selected.ts
@@ -577,7 +589,7 @@ var PopoverMenuList = ({
577
589
  })
578
590
  ));
579
591
  };
580
- var StyledMenuList = styled2(MenuList)(({ theme }) => ({
592
+ var StyledMenuList = styled3(MenuList)(({ theme }) => ({
581
593
  "& > li": {
582
594
  height: ITEM_HEIGHT,
583
595
  width: "100%",
@@ -763,6 +775,7 @@ var selectAll = (el) => {
763
775
  selection.addRange(range);
764
776
  };
765
777
  export {
778
+ CollapseIcon,
766
779
  EditableField,
767
780
  EllipsisWithTooltip,
768
781
  Form,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elementor/editor-ui",
3
3
  "description": "Elementor Editor UI",
4
- "version": "3.35.0-341",
4
+ "version": "3.35.0-342",
5
5
  "private": false,
6
6
  "author": "Elementor Team",
7
7
  "homepage": "https://elementor.com/",
@@ -37,7 +37,7 @@
37
37
  "react-dom": "^18.3.1"
38
38
  },
39
39
  "dependencies": {
40
- "@elementor/editor-v1-adapters": "3.35.0-341",
40
+ "@elementor/editor-v1-adapters": "3.35.0-342",
41
41
  "@elementor/icons": "^1.62.0",
42
42
  "@elementor/ui": "1.36.17",
43
43
  "@tanstack/react-virtual": "^3.13.3",
@@ -0,0 +1,12 @@
1
+ import { ChevronDownIcon } from '@elementor/icons';
2
+ import { styled } from '@elementor/ui';
3
+
4
+ // TODO: Replace this with future Rotate component that will be implemented in elementor-ui
5
+ export const CollapseIcon = styled( ChevronDownIcon, {
6
+ shouldForwardProp: ( prop ) => prop !== 'open',
7
+ } )< { open: boolean } >( ( { theme, open } ) => ( {
8
+ transform: open ? 'rotate(180deg)' : 'rotate(0deg)',
9
+ transition: theme.transitions.create( 'transform', {
10
+ duration: theme.transitions.duration.standard,
11
+ } ),
12
+ } ) );
package/src/index.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  // components
2
+ export { CollapseIcon } from './components/collapse-icon';
2
3
  export { EllipsisWithTooltip } from './components/ellipsis-with-tooltip';
3
4
  export { EditableField } from './components/editable-field';
4
5
  export { IntroductionModal } from './components/introduction-modal';