@elementor/editor-editing-panel 0.17.0 → 0.18.0

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.
Files changed (55) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/index.d.mts +26 -9
  3. package/dist/index.d.ts +26 -9
  4. package/dist/index.js +859 -367
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +830 -329
  7. package/dist/index.mjs.map +1 -1
  8. package/package.json +8 -7
  9. package/src/components/settings-tab.tsx +5 -2
  10. package/src/components/style-sections/effects-section/box-shadow-repeater.tsx +224 -0
  11. package/src/components/style-sections/effects-section/effects-section.tsx +18 -0
  12. package/src/components/style-sections/position-section/z-index-control.tsx +11 -7
  13. package/src/components/style-sections/size-section.tsx +23 -20
  14. package/src/components/style-sections/spacing-section/linked-dimensions-control.tsx +62 -47
  15. package/src/components/style-sections/typography-section/font-size-control.tsx +10 -6
  16. package/src/components/style-sections/typography-section/font-weight-control.tsx +16 -12
  17. package/src/components/style-sections/typography-section/letter-spacing-control.tsx +10 -6
  18. package/src/components/style-sections/typography-section/text-alignment-control.tsx +12 -8
  19. package/src/components/style-sections/typography-section/text-color-control.tsx +10 -6
  20. package/src/components/style-sections/typography-section/text-direction-control.tsx +37 -0
  21. package/src/components/style-sections/typography-section/text-style-control.tsx +37 -34
  22. package/src/components/style-sections/typography-section/transform-control.tsx +14 -12
  23. package/src/components/style-sections/typography-section/typography-section.tsx +2 -0
  24. package/src/components/style-sections/typography-section/word-spacing-control.tsx +10 -6
  25. package/src/components/style-tab.tsx +5 -1
  26. package/src/controls/components/control-type-container.tsx +28 -0
  27. package/src/controls/components/repeater.tsx +197 -0
  28. package/src/controls/control-actions/actions/popover-action.tsx +58 -0
  29. package/src/controls/control-actions/control-actions-menu.ts +8 -0
  30. package/src/controls/control-actions/control-actions.tsx +43 -0
  31. package/src/controls/control-replacement.ts +15 -7
  32. package/src/controls/control-types/color-control.tsx +21 -18
  33. package/src/controls/control-types/image-control.tsx +56 -59
  34. package/src/controls/control-types/image-media-control.tsx +73 -0
  35. package/src/controls/control-types/number-control.tsx +13 -9
  36. package/src/controls/control-types/select-control.tsx +13 -9
  37. package/src/controls/control-types/size-control.tsx +17 -13
  38. package/src/controls/control-types/text-area-control.tsx +15 -11
  39. package/src/controls/control-types/text-control.tsx +9 -3
  40. package/src/controls/control-types/toggle-control.tsx +3 -2
  41. package/src/controls/control.tsx +1 -7
  42. package/src/controls/controls-registry.tsx +19 -10
  43. package/src/controls/create-control.tsx +31 -0
  44. package/src/controls/settings-control.tsx +2 -9
  45. package/src/dynamics/components/dynamic-selection-control.tsx +1 -1
  46. package/src/dynamics/components/dynamic-selection.tsx +1 -1
  47. package/src/dynamics/dynamic-control.tsx +1 -1
  48. package/src/dynamics/hooks/use-prop-dynamic-action.tsx +23 -0
  49. package/src/dynamics/hooks/use-prop-dynamic-tags.ts +4 -4
  50. package/src/dynamics/init.ts +9 -0
  51. package/src/dynamics/types.ts +6 -3
  52. package/src/dynamics/utils.ts +16 -3
  53. package/src/index.ts +2 -0
  54. package/src/types.ts +35 -14
  55. package/src/controls/components/control-container.tsx +0 -18
package/dist/index.js CHANGED
@@ -30,42 +30,91 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var src_exports = {};
32
32
  __export(src_exports, {
33
+ controlActionsMenu: () => controlActionsMenu,
33
34
  replaceControl: () => replaceControl,
34
35
  useControl: () => useControl
35
36
  });
36
37
  module.exports = __toCommonJS(src_exports);
37
38
 
39
+ // src/controls/control-context.tsx
40
+ var import_react = require("react");
41
+ var ControlContext = (0, import_react.createContext)(null);
42
+ function useControl(defaultValue) {
43
+ const controlContext = (0, import_react.useContext)(ControlContext);
44
+ if (!controlContext) {
45
+ throw new Error("useControl must be used within a ControlContext");
46
+ }
47
+ return { ...controlContext, value: controlContext.value ?? defaultValue };
48
+ }
49
+
38
50
  // src/controls/control-replacement.ts
39
51
  var controlReplacement;
40
- var replaceControl = ({ component, condition }) => {
41
- controlReplacement = { component, condition };
42
- };
43
52
  var getControlReplacement = ({ value }) => {
44
53
  let shouldReplace = false;
45
54
  try {
46
- shouldReplace = !!controlReplacement?.condition({ value });
55
+ shouldReplace = !!controlReplacement?.condition({ value }) && !!controlReplacement?.component;
47
56
  } catch {
48
57
  }
49
58
  return shouldReplace ? controlReplacement?.component : void 0;
50
59
  };
60
+ function replaceControl({ component, condition }) {
61
+ controlReplacement = { component, condition };
62
+ }
63
+ function useControlReplacement() {
64
+ const { value } = useControl();
65
+ return getControlReplacement({ value });
66
+ }
51
67
 
52
- // src/controls/control-context.tsx
53
- var import_react = require("react");
54
- var ControlContext = (0, import_react.createContext)(null);
55
- function useControl(defaultValue) {
56
- const controlContext = (0, import_react.useContext)(ControlContext);
57
- if (!controlContext) {
58
- throw new Error("useControl must be used within a ControlContext");
68
+ // src/controls/control-actions/actions/popover-action.tsx
69
+ var React = __toESM(require("react"));
70
+ var import_ui = require("@elementor/ui");
71
+ var import_react2 = require("react");
72
+ var import_icons = require("@elementor/icons");
73
+ var SIZE = "tiny";
74
+ function PopoverAction({
75
+ title,
76
+ visible = true,
77
+ icon: Icon,
78
+ popoverContent: PopoverContent
79
+ }) {
80
+ const id = (0, import_react2.useId)();
81
+ const popupState = (0, import_ui.usePopupState)({
82
+ variant: "popover",
83
+ popupId: `elementor-popover-action-${id}`
84
+ });
85
+ if (!visible) {
86
+ return null;
59
87
  }
60
- return { ...controlContext, value: controlContext.value ?? defaultValue };
88
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(import_ui.Tooltip, { placement: "top", title }, /* @__PURE__ */ React.createElement(import_ui.IconButton, { "aria-label": title, key: id, size: SIZE, ...(0, import_ui.bindToggle)(popupState) }, /* @__PURE__ */ React.createElement(Icon, { fontSize: SIZE }))), /* @__PURE__ */ React.createElement(
89
+ import_ui.Popover,
90
+ {
91
+ disablePortal: true,
92
+ disableScrollLock: true,
93
+ anchorOrigin: {
94
+ vertical: "bottom",
95
+ horizontal: "center"
96
+ },
97
+ ...(0, import_ui.bindPopover)(popupState)
98
+ },
99
+ /* @__PURE__ */ React.createElement(import_ui.Stack, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React.createElement(Icon, { fontSize: SIZE, sx: { mr: 0.5 } }), /* @__PURE__ */ React.createElement(import_ui.Typography, { variant: "subtitle2" }, title), /* @__PURE__ */ React.createElement(import_ui.IconButton, { sx: { ml: "auto" }, size: SIZE, onClick: popupState.close }, /* @__PURE__ */ React.createElement(import_icons.XIcon, { fontSize: SIZE }))),
100
+ /* @__PURE__ */ React.createElement(PopoverContent, { closePopover: popupState.close })
101
+ ));
61
102
  }
62
103
 
104
+ // src/controls/control-actions/control-actions-menu.ts
105
+ var import_menus = require("@elementor/menus");
106
+ var controlActionsMenu = (0, import_menus.createMenu)({
107
+ components: {
108
+ PopoverAction
109
+ }
110
+ });
111
+
63
112
  // src/panel.ts
64
113
  var import_editor_panels2 = require("@elementor/editor-panels");
65
114
 
66
115
  // src/components/editing-panel.tsx
67
- var React37 = __toESM(require("react"));
68
- var import_i18n18 = require("@wordpress/i18n");
116
+ var React45 = __toESM(require("react"));
117
+ var import_i18n23 = require("@wordpress/i18n");
69
118
 
70
119
  // src/hooks/use-selected-elements.ts
71
120
  var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
@@ -134,14 +183,14 @@ function useElementType(type) {
134
183
  var import_editor_panels = require("@elementor/editor-panels");
135
184
 
136
185
  // src/contexts/element-context.tsx
137
- var React = __toESM(require("react"));
138
- var import_react2 = require("react");
139
- var Context = (0, import_react2.createContext)(null);
186
+ var React2 = __toESM(require("react"));
187
+ var import_react3 = require("react");
188
+ var Context = (0, import_react3.createContext)(null);
140
189
  function ElementContext({ children, element, elementType }) {
141
- return /* @__PURE__ */ React.createElement(Context.Provider, { value: { element, elementType } }, children);
190
+ return /* @__PURE__ */ React2.createElement(Context.Provider, { value: { element, elementType } }, children);
142
191
  }
143
192
  function useElementContext() {
144
- const context = (0, import_react2.useContext)(Context);
193
+ const context = (0, import_react3.useContext)(Context);
145
194
  if (!context) {
146
195
  throw new Error("useElementContext must be used within a ElementContextProvider");
147
196
  }
@@ -149,13 +198,13 @@ function useElementContext() {
149
198
  }
150
199
 
151
200
  // src/components/editing-panel-tabs.tsx
152
- var import_ui22 = require("@elementor/ui");
153
- var React36 = __toESM(require("react"));
154
- var import_i18n17 = require("@wordpress/i18n");
201
+ var import_ui37 = require("@elementor/ui");
202
+ var React44 = __toESM(require("react"));
203
+ var import_i18n22 = require("@wordpress/i18n");
155
204
 
156
205
  // src/components/settings-tab.tsx
157
- var React13 = __toESM(require("react"));
158
- var import_ui10 = require("@elementor/ui");
206
+ var React17 = __toESM(require("react"));
207
+ var import_ui13 = require("@elementor/ui");
159
208
 
160
209
  // src/controls/settings-control.tsx
161
210
  var React4 = __toESM(require("react"));
@@ -196,32 +245,16 @@ var updateSettings = ({ id, props }) => {
196
245
  };
197
246
 
198
247
  // src/components/control-label.tsx
199
- var React2 = __toESM(require("react"));
200
- var import_ui = require("@elementor/ui");
201
- var ControlLabel = ({ children }) => {
202
- return /* @__PURE__ */ React2.createElement(import_ui.Typography, { component: "label", variant: "caption", color: "text.secondary" }, children);
203
- };
204
-
205
- // src/controls/components/control-container.tsx
206
248
  var React3 = __toESM(require("react"));
207
249
  var import_ui2 = require("@elementor/ui");
208
- var StyledStack = (0, import_ui2.styled)(import_ui2.Stack)(({ theme, gap, direction }) => ({
209
- "> :only-child": {
210
- width: "100%"
211
- },
212
- "&:where( :has( > :nth-child( 2 ):last-child ) ) > :where( * )": {
213
- width: direction === "column" ? "100%" : `calc( 50% - ${theme.spacing(gap / 2)})`
214
- },
215
- "&:where( :has( > :nth-child( 3 ):last-child ) ) > :where( * )": {
216
- width: direction === "column" ? "100%" : `calc( 33.3333% - ${theme.spacing(gap * 2)} / 3)`
217
- }
218
- }));
219
- var ControlContainer = (props) => /* @__PURE__ */ React3.createElement(StyledStack, { gap: 1, direction: "row", alignItems: "center", justifyContent: "space-between", ...props });
250
+ var ControlLabel = ({ children }) => {
251
+ return /* @__PURE__ */ React3.createElement(import_ui2.Typography, { component: "label", variant: "caption", color: "text.secondary" }, children);
252
+ };
220
253
 
221
254
  // src/controls/settings-control.tsx
222
- var SettingsControlProvider = ({ bind, children }) => {
255
+ var SettingsControl = ({ bind, children }) => {
223
256
  const { element, elementType } = useElementContext();
224
- const defaultValue = elementType.propsSchema[bind]?.type.default;
257
+ const defaultValue = elementType.propsSchema[bind]?.default;
225
258
  const settingsValue = useWidgetSettings({ id: element.id, bind });
226
259
  const value = settingsValue ?? defaultValue ?? null;
227
260
  const setValue = (newValue) => {
@@ -234,92 +267,178 @@ var SettingsControlProvider = ({ bind, children }) => {
234
267
  };
235
268
  return /* @__PURE__ */ React4.createElement(ControlContext.Provider, { value: { setValue, value, bind } }, children);
236
269
  };
237
- var SettingsControl = ({ children, bind }) => /* @__PURE__ */ React4.createElement(SettingsControlProvider, { bind }, /* @__PURE__ */ React4.createElement(ControlContainer, { flexWrap: "wrap" }, children));
238
270
  SettingsControl.Label = ControlLabel;
239
271
 
240
272
  // src/components/accordion-section.tsx
241
273
  var React5 = __toESM(require("react"));
242
- var import_react3 = require("react");
274
+ var import_react4 = require("react");
243
275
  var import_ui3 = require("@elementor/ui");
244
276
  var AccordionSection = ({ title, children }) => {
245
- const uid = (0, import_react3.useId)();
277
+ const uid = (0, import_react4.useId)();
246
278
  const labelId = `label-${uid}`;
247
279
  const contentId = `content-${uid}`;
248
280
  return /* @__PURE__ */ React5.createElement(import_ui3.Accordion, { disableGutters: true, defaultExpanded: true }, /* @__PURE__ */ React5.createElement(import_ui3.AccordionSummary, { "aria-controls": contentId, id: labelId }, /* @__PURE__ */ React5.createElement(import_ui3.AccordionSummaryText, { primaryTypographyProps: { variant: "caption" } }, title)), /* @__PURE__ */ React5.createElement(import_ui3.AccordionDetails, { id: contentId, "aria-labelledby": labelId }, /* @__PURE__ */ React5.createElement(import_ui3.Stack, { gap: 2.5 }, children)));
249
281
  };
250
282
 
251
283
  // src/controls/control.tsx
252
- var React12 = __toESM(require("react"));
284
+ var React15 = __toESM(require("react"));
253
285
  var import_utils = require("@elementor/utils");
254
286
 
255
287
  // src/controls/control-types/image-control.tsx
288
+ var React10 = __toESM(require("react"));
289
+ var import_ui7 = require("@elementor/ui");
290
+ var import_i18n2 = require("@wordpress/i18n");
291
+
292
+ // src/controls/control-types/image-media-control.tsx
293
+ var React8 = __toESM(require("react"));
294
+ var import_ui5 = require("@elementor/ui");
295
+ var import_icons2 = require("@elementor/icons");
296
+ var import_wp_media = require("@elementor/wp-media");
297
+ var import_i18n = require("@wordpress/i18n");
298
+
299
+ // src/controls/control-actions/control-actions.tsx
256
300
  var React6 = __toESM(require("react"));
257
301
  var import_ui4 = require("@elementor/ui");
258
- var import_icons = require("@elementor/icons");
259
- var import_i18n = require("@wordpress/i18n");
260
- var import_wp_media = require("@elementor/wp-media");
261
- var ImageControl = () => {
302
+ var { useMenuItems } = controlActionsMenu;
303
+ var FloatingBar = (0, import_ui4.styled)(import_ui4.UnstableFloatingActionBar)`
304
+ & .MuiPaper-root:empty {
305
+ display: none;
306
+ }
307
+
308
+ // this is for a fix which would be added later on - to force the width externally
309
+ width: 100%;
310
+ & > :first-of-type {
311
+ width: 100%;
312
+ }
313
+ `;
314
+ function ControlActions({ fullWidth = false, children }) {
315
+ const items = useMenuItems().default;
316
+ if (items.length === 0) {
317
+ return children;
318
+ }
319
+ return /* @__PURE__ */ React6.createElement(
320
+ FloatingBar,
321
+ {
322
+ actions: items.map(({ MenuItem: MenuItem4, id }) => /* @__PURE__ */ React6.createElement(MenuItem4, { key: id })),
323
+ sx: fullWidth ? { width: "100%" } : void 0
324
+ },
325
+ children
326
+ );
327
+ }
328
+
329
+ // src/controls/create-control.tsx
330
+ var React7 = __toESM(require("react"));
331
+ var brandSymbol = Symbol("control");
332
+ function createControl(Component, { supportsReplacements = true } = {}) {
333
+ return (props) => {
334
+ const ControlReplacement = useControlReplacement();
335
+ if (ControlReplacement && supportsReplacements) {
336
+ return /* @__PURE__ */ React7.createElement(ControlReplacement, { ...props });
337
+ }
338
+ return /* @__PURE__ */ React7.createElement(Component, { ...props });
339
+ };
340
+ }
341
+
342
+ // src/controls/control-types/image-media-control.tsx
343
+ var ImageMediaControl = createControl(() => {
262
344
  const { value, setValue } = useControl();
263
- const { data: attachment } = (0, import_wp_media.useWpMediaAttachment)(value?.value?.attachmentId);
264
- const src = attachment?.url ?? value?.value?.url;
345
+ const { id, url } = value?.value ?? {};
346
+ const { data: attachment } = (0, import_wp_media.useWpMediaAttachment)(id?.value || null);
347
+ const src = attachment?.url ?? url;
265
348
  const { open } = (0, import_wp_media.useWpMediaFrame)({
266
349
  types: ["image"],
267
350
  multiple: false,
268
- selected: value?.value?.attachmentId,
351
+ selected: id?.value || null,
269
352
  onSelect: (selectedAttachment) => {
270
353
  setValue({
271
- $$type: "image",
354
+ $$type: "image-src",
272
355
  value: {
273
- attachmentId: selectedAttachment.id
356
+ id: {
357
+ $$type: "image-attachment-id",
358
+ value: selectedAttachment.id
359
+ },
360
+ url: null
274
361
  }
275
362
  });
276
363
  }
277
364
  });
278
- return /* @__PURE__ */ React6.createElement(import_ui4.Card, { variant: "outlined" }, /* @__PURE__ */ React6.createElement(import_ui4.CardMedia, { image: src, sx: { height: 150 } }), /* @__PURE__ */ React6.createElement(import_ui4.CardOverlay, null, /* @__PURE__ */ React6.createElement(
279
- import_ui4.Button,
365
+ return /* @__PURE__ */ React8.createElement(import_ui5.Card, { variant: "outlined" }, /* @__PURE__ */ React8.createElement(import_ui5.CardMedia, { image: src, sx: { height: 150 } }), /* @__PURE__ */ React8.createElement(import_ui5.CardOverlay, null, /* @__PURE__ */ React8.createElement(ControlActions, null, /* @__PURE__ */ React8.createElement(import_ui5.Stack, { gap: 0.5 }, /* @__PURE__ */ React8.createElement(
366
+ import_ui5.Button,
280
367
  {
368
+ size: "tiny",
281
369
  color: "inherit",
282
- size: "small",
283
370
  variant: "outlined",
284
- onClick: () => {
285
- open({ mode: "browse" });
286
- }
371
+ onClick: () => open({ mode: "browse" })
287
372
  },
288
373
  (0, import_i18n.__)("Select Image", "elementor")
289
- ), /* @__PURE__ */ React6.createElement(
290
- import_ui4.Button,
374
+ ), /* @__PURE__ */ React8.createElement(
375
+ import_ui5.Button,
291
376
  {
292
- color: "inherit",
293
- size: "small",
377
+ size: "tiny",
294
378
  variant: "text",
295
- startIcon: /* @__PURE__ */ React6.createElement(import_icons.UploadIcon, null),
296
- onClick: () => {
297
- open({ mode: "upload" });
298
- }
379
+ color: "inherit",
380
+ startIcon: /* @__PURE__ */ React8.createElement(import_icons2.UploadIcon, null),
381
+ onClick: () => open({ mode: "upload" })
299
382
  },
300
383
  (0, import_i18n.__)("Upload Image", "elementor")
301
- )));
302
- };
384
+ )))));
385
+ });
386
+
387
+ // src/controls/control-types/select-control.tsx
388
+ var React9 = __toESM(require("react"));
389
+ var import_ui6 = require("@elementor/ui");
390
+ var SelectControl = createControl(({ options: options4 }) => {
391
+ const { value, setValue } = useControl();
392
+ const handleChange = (event) => {
393
+ setValue(event.target.value);
394
+ };
395
+ return /* @__PURE__ */ React9.createElement(ControlActions, null, /* @__PURE__ */ React9.createElement(import_ui6.Select, { size: "tiny", value: value ?? "", onChange: handleChange }, options4.map(({ label, ...props }) => /* @__PURE__ */ React9.createElement(import_ui6.MenuItem, { key: props.value, ...props }, label))));
396
+ });
397
+
398
+ // src/controls/control-types/image-control.tsx
399
+ var ImageControl = createControl((props) => {
400
+ const { value, setValue } = useControl();
401
+ const { src, size } = value?.value || {};
402
+ const setImageSrc = (newValue) => {
403
+ setValue({
404
+ $$type: "image",
405
+ value: {
406
+ src: newValue,
407
+ size
408
+ }
409
+ });
410
+ };
411
+ const setImageSize = (newValue) => {
412
+ setValue({
413
+ $$type: "image",
414
+ value: {
415
+ src,
416
+ size: newValue
417
+ }
418
+ });
419
+ };
420
+ return /* @__PURE__ */ React10.createElement(import_ui7.Stack, { gap: 2 }, /* @__PURE__ */ React10.createElement(ControlContext.Provider, { value: { setValue: setImageSrc, value: src, bind: "src" } }, /* @__PURE__ */ React10.createElement(ImageMediaControl, null)), /* @__PURE__ */ React10.createElement(ControlContext.Provider, { value: { setValue: setImageSize, value: size, bind: "size" } }, /* @__PURE__ */ React10.createElement(import_ui7.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React10.createElement(import_ui7.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React10.createElement(SettingsControl.Label, null, " ", (0, import_i18n2.__)("Image Resolution", "elementor"))), /* @__PURE__ */ React10.createElement(import_ui7.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React10.createElement(SelectControl, { options: props.sizes })))));
421
+ });
303
422
 
304
423
  // src/controls/control-types/text-control.tsx
305
- var React7 = __toESM(require("react"));
306
- var import_ui5 = require("@elementor/ui");
307
- var TextControl = ({ placeholder }) => {
424
+ var React11 = __toESM(require("react"));
425
+ var import_ui8 = require("@elementor/ui");
426
+ var TextControl = createControl(({ placeholder }) => {
308
427
  const { value, setValue } = useControl("");
309
428
  const handleChange = (event) => setValue(event.target.value);
310
- return /* @__PURE__ */ React7.createElement(import_ui5.TextField, { type: "text", size: "tiny", value, onChange: handleChange, placeholder });
311
- };
429
+ return /* @__PURE__ */ React11.createElement(ControlActions, { fullWidth: true }, /* @__PURE__ */ React11.createElement(import_ui8.TextField, { type: "text", size: "tiny", value, onChange: handleChange, placeholder }));
430
+ });
312
431
 
313
432
  // src/controls/control-types/text-area-control.tsx
314
- var React8 = __toESM(require("react"));
315
- var import_ui6 = require("@elementor/ui");
316
- var TextAreaControl = ({ placeholder }) => {
433
+ var React12 = __toESM(require("react"));
434
+ var import_ui9 = require("@elementor/ui");
435
+ var TextAreaControl = createControl(({ placeholder }) => {
317
436
  const { value, setValue } = useControl();
318
437
  const handleChange = (event) => {
319
438
  setValue(event.target.value);
320
439
  };
321
- return /* @__PURE__ */ React8.createElement(
322
- import_ui6.TextField,
440
+ return /* @__PURE__ */ React12.createElement(ControlActions, { fullWidth: true }, /* @__PURE__ */ React12.createElement(
441
+ import_ui9.TextField,
323
442
  {
324
443
  size: "tiny",
325
444
  multiline: true,
@@ -329,15 +448,15 @@ var TextAreaControl = ({ placeholder }) => {
329
448
  onChange: handleChange,
330
449
  placeholder
331
450
  }
332
- );
333
- };
451
+ ));
452
+ });
334
453
 
335
454
  // src/controls/control-types/size-control.tsx
336
- var React10 = __toESM(require("react"));
337
- var import_ui8 = require("@elementor/ui");
455
+ var React14 = __toESM(require("react"));
456
+ var import_ui11 = require("@elementor/ui");
338
457
 
339
458
  // src/controls/hooks/use-sync-external-state.tsx
340
- var import_react4 = require("react");
459
+ var import_react5 = require("react");
341
460
  var useSyncExternalState = ({
342
461
  external,
343
462
  setExternal,
@@ -356,8 +475,8 @@ var useSyncExternalState = ({
356
475
  }
357
476
  return externalValue;
358
477
  }
359
- const [internal, setInternal] = (0, import_react4.useState)(toInternal(external, void 0));
360
- (0, import_react4.useEffect)(() => {
478
+ const [internal, setInternal] = (0, import_react5.useState)(toInternal(external, void 0));
479
+ (0, import_react5.useEffect)(() => {
361
480
  setInternal((prevInternal) => toInternal(external, prevInternal));
362
481
  }, [external]);
363
482
  const setInternalValue = (setter) => {
@@ -370,9 +489,9 @@ var useSyncExternalState = ({
370
489
  };
371
490
 
372
491
  // src/controls/components/text-field-inner-selection.tsx
373
- var React9 = __toESM(require("react"));
374
- var import_ui7 = require("@elementor/ui");
375
- var import_react5 = require("react");
492
+ var React13 = __toESM(require("react"));
493
+ var import_ui10 = require("@elementor/ui");
494
+ var import_react6 = require("react");
376
495
  var TextFieldInnerSelection = ({
377
496
  placeholder,
378
497
  type,
@@ -381,8 +500,8 @@ var TextFieldInnerSelection = ({
381
500
  endAdornment,
382
501
  startAdornment
383
502
  }) => {
384
- return /* @__PURE__ */ React9.createElement(
385
- import_ui7.TextField,
503
+ return /* @__PURE__ */ React13.createElement(
504
+ import_ui10.TextField,
386
505
  {
387
506
  size: "tiny",
388
507
  type,
@@ -397,33 +516,33 @@ var TextFieldInnerSelection = ({
397
516
  );
398
517
  };
399
518
  var SelectionEndAdornment = ({
400
- options: options3,
519
+ options: options4,
401
520
  onClick,
402
521
  value
403
522
  }) => {
404
- const popupState = (0, import_ui7.usePopupState)({
523
+ const popupState = (0, import_ui10.usePopupState)({
405
524
  variant: "popover",
406
- popupId: (0, import_react5.useId)()
525
+ popupId: (0, import_react6.useId)()
407
526
  });
408
527
  const handleMenuItemClick = (index) => {
409
- onClick(options3[index]);
528
+ onClick(options4[index]);
410
529
  popupState.close();
411
530
  };
412
- return /* @__PURE__ */ React9.createElement(import_ui7.InputAdornment, { position: "end" }, /* @__PURE__ */ React9.createElement(
413
- import_ui7.Button,
531
+ return /* @__PURE__ */ React13.createElement(import_ui10.InputAdornment, { position: "end" }, /* @__PURE__ */ React13.createElement(
532
+ import_ui10.Button,
414
533
  {
415
534
  size: "small",
416
535
  color: "inherit",
417
536
  sx: { font: "inherit", minWidth: "initial" },
418
- ...(0, import_ui7.bindTrigger)(popupState)
537
+ ...(0, import_ui10.bindTrigger)(popupState)
419
538
  },
420
539
  value.toUpperCase()
421
- ), /* @__PURE__ */ React9.createElement(import_ui7.Menu, { MenuListProps: { dense: true }, ...(0, import_ui7.bindMenu)(popupState) }, options3.map((option, index) => /* @__PURE__ */ React9.createElement(import_ui7.MenuItem, { key: option, onClick: () => handleMenuItemClick(index) }, option.toUpperCase()))));
540
+ ), /* @__PURE__ */ React13.createElement(import_ui10.Menu, { MenuListProps: { dense: true }, ...(0, import_ui10.bindMenu)(popupState) }, options4.map((option, index) => /* @__PURE__ */ React13.createElement(import_ui10.MenuItem, { key: option, onClick: () => handleMenuItemClick(index) }, option.toUpperCase()))));
422
541
  };
423
542
 
424
543
  // src/controls/control-types/size-control.tsx
425
544
  var defaultUnits = ["px", "%", "em", "rem", "vw"];
426
- var SizeControl = ({ units = defaultUnits, placeholder, startIcon }) => {
545
+ var SizeControl = createControl(({ units = defaultUnits, placeholder, startIcon }) => {
427
546
  const { value, setValue } = useControl();
428
547
  const [state, setState] = useSyncExternalState({
429
548
  external: value,
@@ -453,39 +572,29 @@ var SizeControl = ({ units = defaultUnits, placeholder, startIcon }) => {
453
572
  }
454
573
  }));
455
574
  };
456
- return /* @__PURE__ */ React10.createElement(
575
+ return /* @__PURE__ */ React14.createElement(ControlActions, null, /* @__PURE__ */ React14.createElement(
457
576
  TextFieldInnerSelection,
458
577
  {
459
- endAdornment: /* @__PURE__ */ React10.createElement(SelectionEndAdornment, { options: units, onClick: handleUnitChange, value: state.value.unit }),
578
+ endAdornment: /* @__PURE__ */ React14.createElement(SelectionEndAdornment, { options: units, onClick: handleUnitChange, value: state.value.unit }),
460
579
  placeholder,
461
- startAdornment: startIcon ?? /* @__PURE__ */ React10.createElement(import_ui8.InputAdornment, { position: "start" }, startIcon),
580
+ startAdornment: startIcon ?? /* @__PURE__ */ React14.createElement(import_ui11.InputAdornment, { position: "start" }, startIcon),
462
581
  type: "number",
463
582
  value: Number.isNaN(state.value.size) ? "" : state.value.size,
464
583
  onChange: handleSizeChange
465
584
  }
466
- );
467
- };
468
-
469
- // src/controls/control-types/select-control.tsx
470
- var React11 = __toESM(require("react"));
471
- var import_ui9 = require("@elementor/ui");
472
- var SelectControl = ({ options: options3 }) => {
473
- const { value, setValue } = useControl();
474
- const handleChange = (event) => {
475
- setValue(event.target.value);
476
- };
477
- return /* @__PURE__ */ React11.createElement(import_ui9.Select, { size: "tiny", value: value ?? "", onChange: handleChange }, options3.map(({ label, ...props }) => /* @__PURE__ */ React11.createElement(import_ui9.MenuItem, { key: props.value, ...props }, label)));
478
- };
585
+ ));
586
+ });
479
587
 
480
588
  // src/controls/controls-registry.tsx
481
589
  var controlTypes = {
482
- image: ImageControl,
483
- text: TextControl,
484
- textarea: TextAreaControl,
485
- size: SizeControl,
486
- select: SelectControl
590
+ image: { component: ImageControl, layout: "full" },
591
+ text: { component: TextControl, layout: "two-columns" },
592
+ textarea: { component: TextAreaControl, layout: "full" },
593
+ size: { component: SizeControl, layout: "two-columns" },
594
+ select: { component: SelectControl, layout: "two-columns" }
487
595
  };
488
- var getControlByType = (type) => controlTypes[type];
596
+ var getControlByType = (type) => controlTypes[type]?.component;
597
+ var getLayoutByType = (type) => controlTypes[type].layout;
489
598
 
490
599
  // src/controls/control.tsx
491
600
  var ControlTypeError = (0, import_utils.createError)({
@@ -493,28 +602,51 @@ var ControlTypeError = (0, import_utils.createError)({
493
602
  message: `Control type not found.`
494
603
  });
495
604
  var Control = ({ props, type }) => {
496
- const { value } = useControl();
497
605
  const ControlByType = getControlByType(type);
498
606
  if (!ControlByType) {
499
607
  throw new ControlTypeError({
500
608
  context: { type }
501
609
  });
502
610
  }
503
- const ControlComponent = getControlReplacement({ value }) || ControlByType;
504
- return /* @__PURE__ */ React12.createElement(ControlComponent, { ...props });
611
+ return /* @__PURE__ */ React15.createElement(ControlByType, { ...props });
505
612
  };
506
613
 
614
+ // src/controls/components/control-type-container.tsx
615
+ var React16 = __toESM(require("react"));
616
+ var import_ui12 = require("@elementor/ui");
617
+ var ControlTypeContainer = ({
618
+ controlType,
619
+ children
620
+ }) => {
621
+ const layout = getLayoutByType(controlType);
622
+ return /* @__PURE__ */ React16.createElement(StyledContainer, { layout }, children);
623
+ };
624
+ var StyledContainer = (0, import_ui12.styled)(import_ui12.Box, {
625
+ shouldForwardProp: (prop) => !["layout"].includes(prop)
626
+ })(({ layout, theme }) => ({
627
+ display: "grid",
628
+ gridGap: theme.spacing(1),
629
+ ...getGridLayout(layout)
630
+ }));
631
+ var getGridLayout = (layout) => ({
632
+ justifyContent: "space-between",
633
+ gridTemplateColumns: {
634
+ full: "1fr",
635
+ "two-columns": "repeat(2, 1fr)"
636
+ }[layout]
637
+ });
638
+
507
639
  // src/components/settings-tab.tsx
508
640
  var SettingsTab = () => {
509
641
  const { elementType } = useElementContext();
510
- return /* @__PURE__ */ React13.createElement(import_ui10.Stack, null, elementType.controls.map(({ type, value }, index) => {
642
+ return /* @__PURE__ */ React17.createElement(import_ui13.Stack, null, elementType.controls.map(({ type, value }, index) => {
511
643
  if (type === "control") {
512
- return /* @__PURE__ */ React13.createElement(Control2, { key: value.bind, control: value });
644
+ return /* @__PURE__ */ React17.createElement(Control2, { key: value.bind, control: value });
513
645
  }
514
646
  if (type === "section") {
515
- return /* @__PURE__ */ React13.createElement(AccordionSection, { key: type + "." + index, title: value.label }, value.items?.map((item) => {
647
+ return /* @__PURE__ */ React17.createElement(AccordionSection, { key: type + "." + index, title: value.label }, value.items?.map((item) => {
516
648
  if (item.type === "control") {
517
- return /* @__PURE__ */ React13.createElement(Control2, { key: item.value.bind, control: item.value });
649
+ return /* @__PURE__ */ React17.createElement(Control2, { key: item.value.bind, control: item.value });
518
650
  }
519
651
  return null;
520
652
  }));
@@ -526,24 +658,24 @@ var Control2 = ({ control }) => {
526
658
  if (!getControlByType(control.type)) {
527
659
  return null;
528
660
  }
529
- return /* @__PURE__ */ React13.createElement(SettingsControl, { bind: control.bind }, control.label ? /* @__PURE__ */ React13.createElement(SettingsControl.Label, null, control.label) : null, /* @__PURE__ */ React13.createElement(Control, { type: control.type, props: control.props }));
661
+ return /* @__PURE__ */ React17.createElement(SettingsControl, { bind: control.bind }, /* @__PURE__ */ React17.createElement(ControlTypeContainer, { controlType: control.type }, control.label ? /* @__PURE__ */ React17.createElement(SettingsControl.Label, null, control.label) : null, /* @__PURE__ */ React17.createElement(Control, { type: control.type, props: control.props })));
530
662
  };
531
663
 
532
664
  // src/components/style-tab.tsx
533
- var React35 = __toESM(require("react"));
665
+ var React43 = __toESM(require("react"));
534
666
 
535
667
  // src/contexts/style-context.tsx
536
- var React14 = __toESM(require("react"));
537
- var import_react6 = require("react");
668
+ var React18 = __toESM(require("react"));
669
+ var import_react7 = require("react");
538
670
  var import_editor_responsive = require("@elementor/editor-responsive");
539
- var Context2 = (0, import_react6.createContext)(null);
671
+ var Context2 = (0, import_react7.createContext)(null);
540
672
  function StyleContext({ children, selectedStyleDef, selectedClassesProp }) {
541
673
  const breakpoint = (0, import_editor_responsive.useActiveBreakpoint)();
542
674
  const selectedMeta = { breakpoint, state: null };
543
- return /* @__PURE__ */ React14.createElement(Context2.Provider, { value: { selectedStyleDef, selectedMeta, selectedClassesProp } }, children);
675
+ return /* @__PURE__ */ React18.createElement(Context2.Provider, { value: { selectedStyleDef, selectedMeta, selectedClassesProp } }, children);
544
676
  }
545
677
  function useStyleContext() {
546
- const context = (0, import_react6.useContext)(Context2);
678
+ const context = (0, import_react7.useContext)(Context2);
547
679
  if (!context) {
548
680
  throw new Error("UseStyleContext must be used within a StyleContextProvider");
549
681
  }
@@ -571,13 +703,13 @@ var useElementStyles = (elementID) => {
571
703
  };
572
704
 
573
705
  // src/components/style-tab.tsx
574
- var import_ui21 = require("@elementor/ui");
706
+ var import_ui36 = require("@elementor/ui");
575
707
 
576
708
  // src/components/style-sections/size-section.tsx
577
- var React16 = __toESM(require("react"));
709
+ var React20 = __toESM(require("react"));
578
710
 
579
711
  // src/controls/style-control.tsx
580
- var React15 = __toESM(require("react"));
712
+ var React19 = __toESM(require("react"));
581
713
 
582
714
  // src/hooks/use-element-style-prop.ts
583
715
  var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
@@ -647,35 +779,35 @@ var useStyleControl = (propName) => {
647
779
  // src/controls/style-control.tsx
648
780
  var StyleControl = ({ bind, children }) => {
649
781
  const [value, setValue] = useStyleControl(bind);
650
- return /* @__PURE__ */ React15.createElement(ControlContext.Provider, { value: { bind, value, setValue } }, children);
782
+ return /* @__PURE__ */ React19.createElement(ControlContext.Provider, { value: { bind, value, setValue } }, children);
651
783
  };
652
784
  StyleControl.Label = ControlLabel;
653
785
 
654
786
  // src/components/style-sections/size-section.tsx
655
- var import_ui11 = require("@elementor/ui");
656
- var import_i18n2 = require("@wordpress/i18n");
787
+ var import_ui14 = require("@elementor/ui");
788
+ var import_i18n3 = require("@wordpress/i18n");
657
789
  var SizeSection = () => {
658
- return /* @__PURE__ */ React16.createElement(AccordionSection, { title: (0, import_i18n2.__)("Size", "elementor") }, /* @__PURE__ */ React16.createElement(import_ui11.Stack, { gap: 1.5 }, /* @__PURE__ */ React16.createElement(import_ui11.Stack, { direction: "row", gap: 2 }, /* @__PURE__ */ React16.createElement(Control3, { bind: "width", label: (0, import_i18n2.__)("Width", "elementor") }), /* @__PURE__ */ React16.createElement(Control3, { bind: "height", label: (0, import_i18n2.__)("Height", "elementor") })), /* @__PURE__ */ React16.createElement(import_ui11.Stack, { gap: 1.5, sx: { pt: 1.5 } }, /* @__PURE__ */ React16.createElement(import_ui11.Stack, { direction: "row", gap: 2 }, /* @__PURE__ */ React16.createElement(Control3, { bind: "minWidth", label: (0, import_i18n2.__)("Min. Width", "elementor") }), /* @__PURE__ */ React16.createElement(Control3, { bind: "minHeight", label: (0, import_i18n2.__)("Min. Height", "elementor") })), /* @__PURE__ */ React16.createElement(import_ui11.Stack, { direction: "row", gap: 2 }, /* @__PURE__ */ React16.createElement(Control3, { bind: "maxWidth", label: (0, import_i18n2.__)("Max. Width", "elementor") }), /* @__PURE__ */ React16.createElement(Control3, { bind: "maxHeight", label: (0, import_i18n2.__)("Max. Height", "elementor") })))));
790
+ return /* @__PURE__ */ React20.createElement(AccordionSection, { title: (0, import_i18n3.__)("Size", "elementor") }, /* @__PURE__ */ React20.createElement(import_ui14.Stack, { gap: 1.5 }, /* @__PURE__ */ React20.createElement(import_ui14.Grid, { container: true, spacing: 2 }, /* @__PURE__ */ React20.createElement(Control3, { bind: "width", label: (0, import_i18n3.__)("Width", "elementor") }), /* @__PURE__ */ React20.createElement(Control3, { bind: "height", label: (0, import_i18n3.__)("Height", "elementor") })), /* @__PURE__ */ React20.createElement(import_ui14.Grid, { container: true, spacing: 2 }, /* @__PURE__ */ React20.createElement(Control3, { bind: "min-width", label: (0, import_i18n3.__)("Min. Width", "elementor") }), /* @__PURE__ */ React20.createElement(Control3, { bind: "min-height", label: (0, import_i18n3.__)("Min. Height", "elementor") })), /* @__PURE__ */ React20.createElement(import_ui14.Grid, { container: true, spacing: 2 }, /* @__PURE__ */ React20.createElement(Control3, { bind: "max-width", label: (0, import_i18n3.__)("Max. Width", "elementor") }), /* @__PURE__ */ React20.createElement(Control3, { bind: "max-height", label: (0, import_i18n3.__)("Max. Height", "elementor") }))));
659
791
  };
660
792
  var Control3 = ({ label, bind }) => {
661
- return /* @__PURE__ */ React16.createElement(StyleControl, { bind }, /* @__PURE__ */ React16.createElement(ControlContainer, { direction: "column" }, /* @__PURE__ */ React16.createElement(StyleControl.Label, null, label), /* @__PURE__ */ React16.createElement(Control, { type: "size" })));
793
+ return /* @__PURE__ */ React20.createElement(import_ui14.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React20.createElement(StyleControl, { bind }, /* @__PURE__ */ React20.createElement(import_ui14.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React20.createElement(import_ui14.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React20.createElement(StyleControl.Label, null, label)), /* @__PURE__ */ React20.createElement(import_ui14.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React20.createElement(Control, { type: "size" })))));
662
794
  };
663
795
 
664
796
  // src/components/style-sections/typography-section/typography-section.tsx
665
- var React29 = __toESM(require("react"));
666
- var import_ui16 = require("@elementor/ui");
797
+ var React34 = __toESM(require("react"));
798
+ var import_ui27 = require("@elementor/ui");
667
799
 
668
800
  // src/components/style-sections/typography-section/text-style-control.tsx
669
- var React17 = __toESM(require("react"));
670
- var import_ui12 = require("@elementor/ui");
671
- var import_icons2 = require("@elementor/icons");
672
- var import_i18n3 = require("@wordpress/i18n");
801
+ var React21 = __toESM(require("react"));
802
+ var import_i18n4 = require("@wordpress/i18n");
803
+ var import_ui15 = require("@elementor/ui");
804
+ var import_icons3 = require("@elementor/icons");
673
805
  var buttonSize = "tiny";
674
806
  var TextStyleControl = () => {
675
- const [fontStyle, setFontStyle] = useStyleControl("fontStyle");
676
- const [textDecoration, setTextDecoration] = useStyleControl("textDecoration");
807
+ const [fontStyle, setFontStyle] = useStyleControl("font-style");
808
+ const [textDecoration, setTextDecoration] = useStyleControl("text-decoration");
677
809
  const formats = [fontStyle, ...(textDecoration || "").split(" ")];
678
- return /* @__PURE__ */ React17.createElement(ControlContainer, null, /* @__PURE__ */ React17.createElement(ControlLabel, null, (0, import_i18n3.__)("Style", "elementor")), /* @__PURE__ */ React17.createElement(import_ui12.ToggleButtonGroup, { value: formats }, /* @__PURE__ */ React17.createElement(
810
+ return /* @__PURE__ */ React21.createElement(import_ui15.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React21.createElement(import_ui15.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React21.createElement(ControlLabel, null, (0, import_i18n4.__)("Style", "elementor"))), /* @__PURE__ */ React21.createElement(import_ui15.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React21.createElement(import_ui15.ToggleButtonGroup, { value: formats }, /* @__PURE__ */ React21.createElement(
679
811
  ToggleButton,
680
812
  {
681
813
  value: "italic",
@@ -683,8 +815,8 @@ var TextStyleControl = () => {
683
815
  "aria-label": "italic",
684
816
  sx: { marginLeft: "auto" }
685
817
  },
686
- /* @__PURE__ */ React17.createElement(import_icons2.ItalicIcon, { fontSize: buttonSize })
687
- ), /* @__PURE__ */ React17.createElement(
818
+ /* @__PURE__ */ React21.createElement(import_icons3.ItalicIcon, { fontSize: buttonSize })
819
+ ), /* @__PURE__ */ React21.createElement(
688
820
  ShorthandControl,
689
821
  {
690
822
  value: "line-through",
@@ -692,8 +824,8 @@ var TextStyleControl = () => {
692
824
  updateValues: setTextDecoration,
693
825
  "aria-label": "line-through"
694
826
  },
695
- /* @__PURE__ */ React17.createElement(import_icons2.StrikethroughIcon, { fontSize: buttonSize })
696
- ), /* @__PURE__ */ React17.createElement(
827
+ /* @__PURE__ */ React21.createElement(import_icons3.StrikethroughIcon, { fontSize: buttonSize })
828
+ ), /* @__PURE__ */ React21.createElement(
697
829
  ShorthandControl,
698
830
  {
699
831
  value: "underline",
@@ -701,8 +833,8 @@ var TextStyleControl = () => {
701
833
  updateValues: setTextDecoration,
702
834
  "aria-label": "underline"
703
835
  },
704
- /* @__PURE__ */ React17.createElement(import_icons2.UnderlineIcon, { fontSize: buttonSize })
705
- )));
836
+ /* @__PURE__ */ React21.createElement(import_icons3.UnderlineIcon, { fontSize: buttonSize })
837
+ ))));
706
838
  };
707
839
  var ShorthandControl = ({
708
840
  children,
@@ -720,105 +852,108 @@ var ShorthandControl = ({
720
852
  updateValues([...valuesArr, newValue].join(" "));
721
853
  }
722
854
  };
723
- return /* @__PURE__ */ React17.createElement(ToggleButton, { value, onChange: toggleValue, selected, "aria-label": ariaLabel }, children);
855
+ return /* @__PURE__ */ React21.createElement(ToggleButton, { value, onChange: toggleValue, selected, "aria-label": ariaLabel }, children);
724
856
  };
725
857
  var ToggleButton = ({ onChange, ...props }) => {
726
858
  const handleChange = (_e, newValue) => {
727
859
  onChange(newValue);
728
860
  };
729
- return /* @__PURE__ */ React17.createElement(import_ui12.ToggleButton, { ...props, onChange: handleChange, size: buttonSize });
861
+ return /* @__PURE__ */ React21.createElement(import_ui15.ToggleButton, { ...props, onChange: handleChange, size: buttonSize });
730
862
  };
731
863
 
732
864
  // src/components/style-sections/typography-section/typography-section.tsx
733
- var import_i18n12 = require("@wordpress/i18n");
865
+ var import_i18n14 = require("@wordpress/i18n");
734
866
 
735
867
  // src/components/style-sections/typography-section/font-size-control.tsx
736
- var React18 = __toESM(require("react"));
737
- var import_i18n4 = require("@wordpress/i18n");
868
+ var React22 = __toESM(require("react"));
869
+ var import_i18n5 = require("@wordpress/i18n");
870
+ var import_ui16 = require("@elementor/ui");
738
871
  var FontSizeControl = () => {
739
- return /* @__PURE__ */ React18.createElement(StyleControl, { bind: "font-size" }, /* @__PURE__ */ React18.createElement(ControlContainer, null, /* @__PURE__ */ React18.createElement(StyleControl.Label, null, (0, import_i18n4.__)("Font Size", "elementor")), /* @__PURE__ */ React18.createElement(SizeControl, null)));
872
+ return /* @__PURE__ */ React22.createElement(StyleControl, { bind: "font-size" }, /* @__PURE__ */ React22.createElement(import_ui16.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React22.createElement(import_ui16.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React22.createElement(StyleControl.Label, null, (0, import_i18n5.__)("Font Size", "elementor"))), /* @__PURE__ */ React22.createElement(import_ui16.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React22.createElement(SizeControl, null))));
740
873
  };
741
874
 
742
875
  // src/components/style-sections/typography-section/font-weight-control.tsx
743
- var React19 = __toESM(require("react"));
744
- var import_i18n5 = require("@wordpress/i18n");
876
+ var React23 = __toESM(require("react"));
877
+ var import_i18n6 = require("@wordpress/i18n");
878
+ var import_ui17 = require("@elementor/ui");
745
879
  var fontWeightOptions = [
746
- { label: (0, import_i18n5.__)("Light - 400", "elementor"), value: 400 },
747
- { label: (0, import_i18n5.__)("Regular - 500", "elementor"), value: 500 },
748
- { label: (0, import_i18n5.__)("Semi Bold - 600", "elementor"), value: 600 },
749
- { label: (0, import_i18n5.__)("Bold - 700", "elementor"), value: 700 },
750
- { label: (0, import_i18n5.__)("Black - 900", "elementor"), value: 900 }
880
+ { label: (0, import_i18n6.__)("Light - 400", "elementor"), value: "400" },
881
+ { label: (0, import_i18n6.__)("Regular - 500", "elementor"), value: "500" },
882
+ { label: (0, import_i18n6.__)("Semi Bold - 600", "elementor"), value: "600" },
883
+ { label: (0, import_i18n6.__)("Bold - 700", "elementor"), value: "700" },
884
+ { label: (0, import_i18n6.__)("Black - 900", "elementor"), value: "900" }
751
885
  ];
752
886
  var FontWeightControl = () => {
753
- return /* @__PURE__ */ React19.createElement(StyleControl, { bind: "fontWeight" }, /* @__PURE__ */ React19.createElement(ControlContainer, null, /* @__PURE__ */ React19.createElement(StyleControl.Label, null, (0, import_i18n5.__)("Font Weight", "elementor")), /* @__PURE__ */ React19.createElement(SelectControl, { options: fontWeightOptions })));
887
+ return /* @__PURE__ */ React23.createElement(StyleControl, { bind: "font-weight" }, /* @__PURE__ */ React23.createElement(import_ui17.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React23.createElement(import_ui17.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React23.createElement(StyleControl.Label, null, (0, import_i18n6.__)("Font Weight", "elementor"))), /* @__PURE__ */ React23.createElement(import_ui17.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React23.createElement(SelectControl, { options: fontWeightOptions }))));
754
888
  };
755
889
 
756
890
  // src/components/style-sections/typography-section/text-color-control.tsx
757
- var React21 = __toESM(require("react"));
758
- var import_i18n6 = require("@wordpress/i18n");
891
+ var React25 = __toESM(require("react"));
892
+ var import_i18n7 = require("@wordpress/i18n");
893
+ var import_ui19 = require("@elementor/ui");
759
894
 
760
895
  // src/controls/control-types/color-control.tsx
761
- var React20 = __toESM(require("react"));
762
- var import_ui13 = require("@elementor/ui");
763
- var ColorControl = () => {
764
- const { value, setValue } = useControl();
765
- const handleChange = debounce((selectedColor) => {
766
- setValue(selectedColor);
767
- });
768
- return /* @__PURE__ */ React20.createElement(import_ui13.UnstableColorPicker, { value, onChange: handleChange });
769
- };
770
- var debounce = (func, wait = 300) => {
771
- let timer;
772
- return (...args) => {
773
- clearTimeout(timer);
774
- timer = setTimeout(() => func(...args), wait);
775
- };
776
- };
896
+ var React24 = __toESM(require("react"));
897
+ var import_ui18 = require("@elementor/ui");
898
+ var ColorControl = createControl(
899
+ (props) => {
900
+ const { value, setValue } = useControl();
901
+ const handleChange = (selectedColor) => {
902
+ setValue({
903
+ $$type: "color",
904
+ value: selectedColor
905
+ });
906
+ };
907
+ return /* @__PURE__ */ React24.createElement(ControlActions, null, /* @__PURE__ */ React24.createElement(import_ui18.UnstableColorPicker, { size: "tiny", ...props, value: value?.value, onChange: handleChange }));
908
+ }
909
+ );
777
910
 
778
911
  // src/components/style-sections/typography-section/text-color-control.tsx
779
912
  var TextColorControl = () => {
780
- return /* @__PURE__ */ React21.createElement(StyleControl, { bind: "color" }, /* @__PURE__ */ React21.createElement(ControlContainer, null, /* @__PURE__ */ React21.createElement(StyleControl.Label, null, (0, import_i18n6.__)("Text Color", "elementor")), /* @__PURE__ */ React21.createElement(ColorControl, null)));
913
+ return /* @__PURE__ */ React25.createElement(StyleControl, { bind: "color" }, /* @__PURE__ */ React25.createElement(import_ui19.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React25.createElement(import_ui19.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React25.createElement(StyleControl.Label, null, (0, import_i18n7.__)("Text Color", "elementor"))), /* @__PURE__ */ React25.createElement(import_ui19.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React25.createElement(ColorControl, null))));
781
914
  };
782
915
 
783
916
  // src/components/style-sections/typography-section/letter-spacing-control.tsx
784
- var React22 = __toESM(require("react"));
785
- var import_i18n7 = require("@wordpress/i18n");
917
+ var React26 = __toESM(require("react"));
918
+ var import_i18n8 = require("@wordpress/i18n");
919
+ var import_ui20 = require("@elementor/ui");
786
920
  var LetterSpacingControl = () => {
787
- return /* @__PURE__ */ React22.createElement(StyleControl, { bind: "letter-spacing" }, /* @__PURE__ */ React22.createElement(ControlContainer, null, /* @__PURE__ */ React22.createElement(StyleControl.Label, null, (0, import_i18n7.__)("Letter Spacing", "elementor")), /* @__PURE__ */ React22.createElement(SizeControl, null)));
921
+ return /* @__PURE__ */ React26.createElement(StyleControl, { bind: "letter-spacing" }, /* @__PURE__ */ React26.createElement(import_ui20.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React26.createElement(import_ui20.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React26.createElement(StyleControl.Label, null, (0, import_i18n8.__)("Letter Spacing", "elementor"))), /* @__PURE__ */ React26.createElement(import_ui20.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React26.createElement(SizeControl, null))));
788
922
  };
789
923
 
790
924
  // src/components/style-sections/typography-section/word-spacing-control.tsx
791
- var React23 = __toESM(require("react"));
792
- var import_i18n8 = require("@wordpress/i18n");
925
+ var React27 = __toESM(require("react"));
926
+ var import_i18n9 = require("@wordpress/i18n");
927
+ var import_ui21 = require("@elementor/ui");
793
928
  var WordSpacingControl = () => {
794
- return /* @__PURE__ */ React23.createElement(StyleControl, { bind: "word-spacing" }, /* @__PURE__ */ React23.createElement(ControlContainer, null, /* @__PURE__ */ React23.createElement(StyleControl.Label, null, (0, import_i18n8.__)("Word Spacing", "elementor")), /* @__PURE__ */ React23.createElement(SizeControl, null)));
929
+ return /* @__PURE__ */ React27.createElement(StyleControl, { bind: "word-spacing" }, /* @__PURE__ */ React27.createElement(import_ui21.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React27.createElement(import_ui21.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React27.createElement(StyleControl.Label, null, (0, import_i18n9.__)("Word Spacing", "elementor"))), /* @__PURE__ */ React27.createElement(import_ui21.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React27.createElement(SizeControl, null))));
795
930
  };
796
931
 
797
932
  // src/components/collapsible-content.tsx
798
- var React24 = __toESM(require("react"));
799
- var import_react7 = require("react");
800
- var import_icons3 = require("@elementor/icons");
801
- var import_ui14 = require("@elementor/ui");
802
- var import_i18n9 = require("@wordpress/i18n");
933
+ var React28 = __toESM(require("react"));
934
+ var import_react8 = require("react");
935
+ var import_icons4 = require("@elementor/icons");
936
+ var import_ui22 = require("@elementor/ui");
937
+ var import_i18n10 = require("@wordpress/i18n");
803
938
  var CollapsibleContent = ({ children, defaultOpen = false }) => {
804
- const [open, setOpen] = (0, import_react7.useState)(defaultOpen);
939
+ const [open, setOpen] = (0, import_react8.useState)(defaultOpen);
805
940
  const handleToggle = () => {
806
941
  setOpen((prevOpen) => !prevOpen);
807
942
  };
808
- return /* @__PURE__ */ React24.createElement(import_ui14.Stack, { sx: { py: 0.5 } }, /* @__PURE__ */ React24.createElement(
809
- import_ui14.Button,
943
+ return /* @__PURE__ */ React28.createElement(import_ui22.Stack, { sx: { py: 0.5 } }, /* @__PURE__ */ React28.createElement(
944
+ import_ui22.Button,
810
945
  {
811
946
  fullWidth: true,
812
947
  size: "small",
813
948
  color: "secondary",
814
949
  variant: "outlined",
815
950
  onClick: handleToggle,
816
- endIcon: /* @__PURE__ */ React24.createElement(ChevronIcon, { open })
951
+ endIcon: /* @__PURE__ */ React28.createElement(ChevronIcon, { open })
817
952
  },
818
- open ? (0, import_i18n9.__)("Show less", "elementor") : (0, import_i18n9.__)("Show more", "elementor")
819
- ), /* @__PURE__ */ React24.createElement(import_ui14.Collapse, { in: open, timeout: "auto" }, children));
953
+ open ? (0, import_i18n10.__)("Show less", "elementor") : (0, import_i18n10.__)("Show more", "elementor")
954
+ ), /* @__PURE__ */ React28.createElement(import_ui22.Collapse, { in: open, timeout: "auto" }, children));
820
955
  };
821
- var ChevronIcon = (0, import_ui14.styled)(import_icons3.ChevronDownIcon, {
956
+ var ChevronIcon = (0, import_ui22.styled)(import_icons4.ChevronDownIcon, {
822
957
  shouldForwardProp: (prop) => prop !== "open"
823
958
  })(({ theme, open }) => ({
824
959
  transform: open ? "rotate(180deg)" : "rotate(0)",
@@ -828,16 +963,18 @@ var ChevronIcon = (0, import_ui14.styled)(import_icons3.ChevronDownIcon, {
828
963
  }));
829
964
 
830
965
  // src/components/style-sections/typography-section/transform-control.tsx
831
- var React27 = __toESM(require("react"));
832
- var import_i18n10 = require("@wordpress/i18n");
966
+ var React31 = __toESM(require("react"));
967
+ var import_i18n11 = require("@wordpress/i18n");
968
+ var import_ui24 = require("@elementor/ui");
969
+ var import_icons5 = require("@elementor/icons");
833
970
 
834
971
  // src/controls/control-types/toggle-control.tsx
835
- var React26 = __toESM(require("react"));
972
+ var React30 = __toESM(require("react"));
836
973
 
837
974
  // src/controls/components/control-toggle-button-group.tsx
838
- var React25 = __toESM(require("react"));
839
- var import_ui15 = require("@elementor/ui");
840
- var StyledToggleButtonGroup = (0, import_ui15.styled)(import_ui15.ToggleButtonGroup)`
975
+ var React29 = __toESM(require("react"));
976
+ var import_ui23 = require("@elementor/ui");
977
+ var StyledToggleButtonGroup = (0, import_ui23.styled)(import_ui23.ToggleButtonGroup)`
841
978
  ${({ justify }) => `justify-content: ${justify};`}
842
979
  `;
843
980
  var ControlToggleButtonGroup = ({
@@ -851,92 +988,112 @@ var ControlToggleButtonGroup = ({
851
988
  const handleChange = (_, newValue) => {
852
989
  onChange(newValue);
853
990
  };
854
- return /* @__PURE__ */ React25.createElement(StyledToggleButtonGroup, { justify, value, onChange: handleChange, exclusive }, items.map(({ label, value: buttonValue, icon: Icon }) => /* @__PURE__ */ React25.createElement(import_ui15.ToggleButton, { key: buttonValue, value: buttonValue, "aria-label": label, size }, /* @__PURE__ */ React25.createElement(Icon, { fontSize: size }))));
991
+ return /* @__PURE__ */ React29.createElement(StyledToggleButtonGroup, { justify, value, onChange: handleChange, exclusive }, items.map(({ label, value: buttonValue, icon: Icon }) => /* @__PURE__ */ React29.createElement(import_ui23.ToggleButton, { key: buttonValue, value: buttonValue, "aria-label": label, size }, /* @__PURE__ */ React29.createElement(Icon, { fontSize: size }))));
855
992
  };
856
993
 
857
994
  // src/controls/control-types/toggle-control.tsx
858
- var ToggleControl = ({ options: options3 }) => {
995
+ var ToggleControl = createControl(({ options: options4 }) => {
859
996
  const { value, setValue } = useControl();
860
997
  const handleToggle = (option) => {
861
998
  setValue(option || void 0);
862
999
  };
863
- return /* @__PURE__ */ React26.createElement(
1000
+ return /* @__PURE__ */ React30.createElement(
864
1001
  ControlToggleButtonGroup,
865
1002
  {
866
- items: options3,
1003
+ items: options4,
867
1004
  value: value || null,
868
1005
  onChange: handleToggle,
869
1006
  exclusive: true
870
1007
  }
871
1008
  );
872
- };
1009
+ });
873
1010
 
874
1011
  // src/components/style-sections/typography-section/transform-control.tsx
875
- var import_icons4 = require("@elementor/icons");
876
1012
  var options = [
877
- { value: "capitalize", label: (0, import_i18n10.__)("Capitalize", "elementor"), icon: import_icons4.LetterCaseIcon },
878
- { value: "uppercase", label: (0, import_i18n10.__)("Uppercase", "elementor"), icon: import_icons4.LetterCaseUpperIcon },
879
- { value: "lowercase", label: (0, import_i18n10.__)("Lowercase", "elementor"), icon: import_icons4.LetterCaseLowerIcon }
1013
+ { value: "capitalize", label: (0, import_i18n11.__)("Capitalize", "elementor"), icon: import_icons5.LetterCaseIcon },
1014
+ { value: "uppercase", label: (0, import_i18n11.__)("Uppercase", "elementor"), icon: import_icons5.LetterCaseUpperIcon },
1015
+ { value: "lowercase", label: (0, import_i18n11.__)("Lowercase", "elementor"), icon: import_icons5.LetterCaseLowerIcon }
880
1016
  ];
881
- var TransformControl = () => {
882
- return /* @__PURE__ */ React27.createElement(ControlContainer, null, /* @__PURE__ */ React27.createElement(StyleControl.Label, null, (0, import_i18n10.__)("Transform", "elementor")), /* @__PURE__ */ React27.createElement(StyleControl, { bind: "text-transform" }, /* @__PURE__ */ React27.createElement(ToggleControl, { options })));
883
- };
1017
+ var TransformControl = () => /* @__PURE__ */ React31.createElement(StyleControl, { bind: "text-transform" }, /* @__PURE__ */ React31.createElement(import_ui24.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(StyleControl.Label, null, (0, import_i18n11.__)("Transform", "elementor"))), /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(ToggleControl, { options }))));
884
1018
 
885
1019
  // src/components/style-sections/typography-section/text-alignment-control.tsx
886
- var React28 = __toESM(require("react"));
887
- var import_icons5 = require("@elementor/icons");
888
- var import_i18n11 = require("@wordpress/i18n");
1020
+ var React32 = __toESM(require("react"));
1021
+ var import_i18n12 = require("@wordpress/i18n");
1022
+ var import_ui25 = require("@elementor/ui");
1023
+ var import_icons6 = require("@elementor/icons");
889
1024
  var options2 = [
890
1025
  {
891
1026
  value: "left",
892
- label: (0, import_i18n11.__)("Left", "elementor"),
893
- icon: import_icons5.AlignLeftIcon
1027
+ label: (0, import_i18n12.__)("Left", "elementor"),
1028
+ icon: import_icons6.AlignLeftIcon
894
1029
  },
895
1030
  {
896
1031
  value: "center",
897
- label: (0, import_i18n11.__)("Center", "elementor"),
898
- icon: import_icons5.AlignCenterIcon
1032
+ label: (0, import_i18n12.__)("Center", "elementor"),
1033
+ icon: import_icons6.AlignCenterIcon
899
1034
  },
900
1035
  {
901
1036
  value: "right",
902
- label: (0, import_i18n11.__)("Right", "elementor"),
903
- icon: import_icons5.AlignRightIcon
1037
+ label: (0, import_i18n12.__)("Right", "elementor"),
1038
+ icon: import_icons6.AlignRightIcon
904
1039
  },
905
1040
  {
906
1041
  value: "justify",
907
- label: (0, import_i18n11.__)("Justify", "elementor"),
908
- icon: import_icons5.AlignJustifiedIcon
1042
+ label: (0, import_i18n12.__)("Justify", "elementor"),
1043
+ icon: import_icons6.AlignJustifiedIcon
909
1044
  }
910
1045
  ];
911
1046
  var TextAlignmentControl = () => {
912
- return /* @__PURE__ */ React28.createElement(ControlContainer, null, /* @__PURE__ */ React28.createElement(StyleControl.Label, null, (0, import_i18n11.__)("Alignment", "elementor")), /* @__PURE__ */ React28.createElement(StyleControl, { bind: "text-align" }, /* @__PURE__ */ React28.createElement(ToggleControl, { options: options2 })));
1047
+ return /* @__PURE__ */ React32.createElement(StyleControl, { bind: "text-align" }, /* @__PURE__ */ React32.createElement(import_ui25.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React32.createElement(import_ui25.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(StyleControl.Label, null, (0, import_i18n12.__)("Alignment", "elementor"))), /* @__PURE__ */ React32.createElement(import_ui25.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(ToggleControl, { options: options2 }))));
1048
+ };
1049
+
1050
+ // src/components/style-sections/typography-section/text-direction-control.tsx
1051
+ var React33 = __toESM(require("react"));
1052
+ var import_i18n13 = require("@wordpress/i18n");
1053
+ var import_ui26 = require("@elementor/ui");
1054
+ var import_icons7 = require("@elementor/icons");
1055
+ var options3 = [
1056
+ {
1057
+ value: "ltr",
1058
+ label: (0, import_i18n13.__)("Left to Right", "elementor"),
1059
+ icon: import_icons7.TextDirectionLtrIcon
1060
+ },
1061
+ {
1062
+ value: "rtl",
1063
+ label: (0, import_i18n13.__)("Right to Left", "elementor"),
1064
+ icon: import_icons7.TextDirectionRtlIcon
1065
+ }
1066
+ ];
1067
+ var TextDirectionControl = () => {
1068
+ return /* @__PURE__ */ React33.createElement(StyleControl, { bind: "direction" }, /* @__PURE__ */ React33.createElement(import_ui26.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React33.createElement(import_ui26.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(StyleControl.Label, null, (0, import_i18n13.__)("Direction", "elementor"))), /* @__PURE__ */ React33.createElement(import_ui26.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(ToggleControl, { options: options3 }))));
913
1069
  };
914
1070
 
915
1071
  // src/components/style-sections/typography-section/typography-section.tsx
916
1072
  var TypographySection = () => {
917
- return /* @__PURE__ */ React29.createElement(AccordionSection, { title: (0, import_i18n12.__)("Typography", "elementor") }, /* @__PURE__ */ React29.createElement(import_ui16.Stack, { gap: 1.5 }, /* @__PURE__ */ React29.createElement(FontWeightControl, null), /* @__PURE__ */ React29.createElement(FontSizeControl, null), /* @__PURE__ */ React29.createElement(import_ui16.Divider, null), /* @__PURE__ */ React29.createElement(TextColorControl, null), /* @__PURE__ */ React29.createElement(CollapsibleContent, null, /* @__PURE__ */ React29.createElement(import_ui16.Stack, { gap: 1.5, sx: { pt: 1.5 } }, /* @__PURE__ */ React29.createElement(LetterSpacingControl, null), /* @__PURE__ */ React29.createElement(WordSpacingControl, null), /* @__PURE__ */ React29.createElement(import_ui16.Divider, null), /* @__PURE__ */ React29.createElement(TextAlignmentControl, null), /* @__PURE__ */ React29.createElement(TextStyleControl, null), /* @__PURE__ */ React29.createElement(TransformControl, null)))));
1073
+ return /* @__PURE__ */ React34.createElement(AccordionSection, { title: (0, import_i18n14.__)("Typography", "elementor") }, /* @__PURE__ */ React34.createElement(import_ui27.Stack, { gap: 1.5 }, /* @__PURE__ */ React34.createElement(FontWeightControl, null), /* @__PURE__ */ React34.createElement(FontSizeControl, null), /* @__PURE__ */ React34.createElement(import_ui27.Divider, null), /* @__PURE__ */ React34.createElement(TextColorControl, null), /* @__PURE__ */ React34.createElement(CollapsibleContent, null, /* @__PURE__ */ React34.createElement(import_ui27.Stack, { gap: 1.5, sx: { pt: 1.5 } }, /* @__PURE__ */ React34.createElement(LetterSpacingControl, null), /* @__PURE__ */ React34.createElement(WordSpacingControl, null), /* @__PURE__ */ React34.createElement(import_ui27.Divider, null), /* @__PURE__ */ React34.createElement(TextAlignmentControl, null), /* @__PURE__ */ React34.createElement(TextStyleControl, null), /* @__PURE__ */ React34.createElement(TransformControl, null), /* @__PURE__ */ React34.createElement(TextDirectionControl, null)))));
918
1074
  };
919
1075
 
920
1076
  // src/components/style-sections/position-section/position-section.tsx
921
- var React32 = __toESM(require("react"));
922
- var import_ui18 = require("@elementor/ui");
1077
+ var React37 = __toESM(require("react"));
1078
+ var import_ui30 = require("@elementor/ui");
923
1079
 
924
1080
  // src/components/style-sections/position-section/z-index-control.tsx
925
- var React31 = __toESM(require("react"));
926
- var import_i18n13 = require("@wordpress/i18n");
1081
+ var React36 = __toESM(require("react"));
1082
+ var import_i18n15 = require("@wordpress/i18n");
1083
+ var import_ui29 = require("@elementor/ui");
927
1084
 
928
1085
  // src/controls/control-types/number-control.tsx
929
- var React30 = __toESM(require("react"));
930
- var import_ui17 = require("@elementor/ui");
1086
+ var React35 = __toESM(require("react"));
1087
+ var import_ui28 = require("@elementor/ui");
931
1088
  var isEmptyOrNaN = (value) => value === void 0 || value === "" || Number.isNaN(Number(value));
932
- var NumberControl = ({ placeholder }) => {
1089
+ var NumberControl = createControl(({ placeholder }) => {
933
1090
  const { value, setValue } = useControl();
934
1091
  const handleChange = (event) => {
935
1092
  const eventValue = event.target.value;
936
1093
  setValue(isEmptyOrNaN(eventValue) ? void 0 : Number(eventValue));
937
1094
  };
938
- return /* @__PURE__ */ React30.createElement(
939
- import_ui17.TextField,
1095
+ return /* @__PURE__ */ React35.createElement(ControlActions, null, /* @__PURE__ */ React35.createElement(
1096
+ import_ui28.TextField,
940
1097
  {
941
1098
  size: "tiny",
942
1099
  type: "number",
@@ -944,33 +1101,33 @@ var NumberControl = ({ placeholder }) => {
944
1101
  onChange: handleChange,
945
1102
  placeholder
946
1103
  }
947
- );
948
- };
1104
+ ));
1105
+ });
949
1106
 
950
1107
  // src/components/style-sections/position-section/z-index-control.tsx
951
1108
  var ZIndexControl = () => {
952
- return /* @__PURE__ */ React31.createElement(StyleControl, { bind: "zIndex" }, /* @__PURE__ */ React31.createElement(ControlContainer, null, /* @__PURE__ */ React31.createElement(StyleControl.Label, null, (0, import_i18n13.__)("Z-Index", "elementor")), /* @__PURE__ */ React31.createElement(NumberControl, null)));
1109
+ return /* @__PURE__ */ React36.createElement(StyleControl, { bind: "z-index" }, /* @__PURE__ */ React36.createElement(import_ui29.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React36.createElement(import_ui29.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(StyleControl.Label, null, (0, import_i18n15.__)("Z-Index", "elementor"))), /* @__PURE__ */ React36.createElement(import_ui29.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(NumberControl, null))));
953
1110
  };
954
1111
 
955
1112
  // src/components/style-sections/position-section/position-section.tsx
956
- var import_i18n14 = require("@wordpress/i18n");
1113
+ var import_i18n16 = require("@wordpress/i18n");
957
1114
  var PositionSection = () => {
958
- return /* @__PURE__ */ React32.createElement(AccordionSection, { title: (0, import_i18n14.__)("Position", "elementor") }, /* @__PURE__ */ React32.createElement(import_ui18.Stack, { gap: 1.5 }, /* @__PURE__ */ React32.createElement(ZIndexControl, null)));
1115
+ return /* @__PURE__ */ React37.createElement(AccordionSection, { title: (0, import_i18n16.__)("Position", "elementor") }, /* @__PURE__ */ React37.createElement(import_ui30.Stack, { gap: 1.5 }, /* @__PURE__ */ React37.createElement(ZIndexControl, null)));
959
1116
  };
960
1117
 
961
1118
  // src/components/style-sections/spacing-section/spacing-section.tsx
962
- var React34 = __toESM(require("react"));
963
- var import_ui20 = require("@elementor/ui");
964
- var import_i18n16 = require("@wordpress/i18n");
1119
+ var React39 = __toESM(require("react"));
1120
+ var import_ui32 = require("@elementor/ui");
1121
+ var import_i18n18 = require("@wordpress/i18n");
965
1122
 
966
1123
  // src/components/style-sections/spacing-section/linked-dimensions-control.tsx
967
- var React33 = __toESM(require("react"));
968
- var import_ui19 = require("@elementor/ui");
969
- var import_icons6 = require("@elementor/icons");
970
- var import_i18n15 = require("@wordpress/i18n");
1124
+ var React38 = __toESM(require("react"));
1125
+ var import_i18n17 = require("@wordpress/i18n");
1126
+ var import_ui31 = require("@elementor/ui");
1127
+ var import_icons8 = require("@elementor/icons");
971
1128
  var LinkedDimensionsControl = ({ label }) => {
972
1129
  const { value, setValue } = useControl();
973
- const { top, right, bottom, left, isLinked = false } = value?.value || {};
1130
+ const { top, right, bottom, left, isLinked = true } = value?.value || {};
974
1131
  const setLinkedValue = (position, newValue) => {
975
1132
  const updatedValue = {
976
1133
  isLinked,
@@ -998,58 +1155,58 @@ var LinkedDimensionsControl = ({ label }) => {
998
1155
  value: updatedValue
999
1156
  });
1000
1157
  };
1001
- const LinkedIcon = isLinked ? import_icons6.LinkIcon : import_icons6.DetachIcon;
1002
- return /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement(import_ui19.Stack, { direction: "row", gap: 2 }, /* @__PURE__ */ React33.createElement(ControlLabel, null, label), /* @__PURE__ */ React33.createElement(
1003
- import_ui19.ToggleButton,
1158
+ const LinkedIcon = isLinked ? import_icons8.LinkIcon : import_icons8.DetachIcon;
1159
+ return /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement(import_ui31.Stack, { direction: "row", gap: 2 }, /* @__PURE__ */ React38.createElement(ControlLabel, null, label), /* @__PURE__ */ React38.createElement(
1160
+ import_ui31.ToggleButton,
1004
1161
  {
1005
- "aria-label": (0, import_i18n15.__)("Link Inputs", "elementor"),
1162
+ "aria-label": (0, import_i18n17.__)("Link Inputs", "elementor"),
1006
1163
  size: "tiny",
1007
1164
  value: "check",
1008
1165
  selected: isLinked,
1009
1166
  sx: { marginLeft: "auto" },
1010
1167
  onChange: toggleLinked
1011
1168
  },
1012
- /* @__PURE__ */ React33.createElement(LinkedIcon, { fontSize: "tiny" })
1013
- )), /* @__PURE__ */ React33.createElement(import_ui19.Stack, { direction: "row", gap: 2 }, /* @__PURE__ */ React33.createElement(ControlContainer, { direction: "column" }, /* @__PURE__ */ React33.createElement(ControlLabel, null, (0, import_i18n15.__)("Top", "elementor")), /* @__PURE__ */ React33.createElement(
1169
+ /* @__PURE__ */ React38.createElement(LinkedIcon, { fontSize: "tiny" })
1170
+ )), /* @__PURE__ */ React38.createElement(import_ui31.Stack, { direction: "row", gap: 2 }, /* @__PURE__ */ React38.createElement(import_ui31.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React38.createElement(import_ui31.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React38.createElement(ControlLabel, null, (0, import_i18n17.__)("Top", "elementor"))), /* @__PURE__ */ React38.createElement(import_ui31.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React38.createElement(
1014
1171
  Control4,
1015
1172
  {
1016
1173
  bind: "top",
1017
1174
  value: top,
1018
1175
  setValue: setLinkedValue,
1019
- startIcon: /* @__PURE__ */ React33.createElement(import_icons6.SideTopIcon, { fontSize: "tiny" })
1176
+ startIcon: /* @__PURE__ */ React38.createElement(import_icons8.SideTopIcon, { fontSize: "tiny" })
1020
1177
  }
1021
- )), /* @__PURE__ */ React33.createElement(ControlContainer, { direction: "column" }, /* @__PURE__ */ React33.createElement(ControlLabel, null, (0, import_i18n15.__)("Right", "elementor")), /* @__PURE__ */ React33.createElement(
1178
+ ))), /* @__PURE__ */ React38.createElement(import_ui31.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React38.createElement(import_ui31.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React38.createElement(ControlLabel, null, (0, import_i18n17.__)("Right", "elementor"))), /* @__PURE__ */ React38.createElement(import_ui31.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React38.createElement(
1022
1179
  Control4,
1023
1180
  {
1024
1181
  bind: "right",
1025
1182
  value: right,
1026
1183
  setValue: setLinkedValue,
1027
- startIcon: /* @__PURE__ */ React33.createElement(import_icons6.SideRightIcon, { fontSize: "tiny" })
1184
+ startIcon: /* @__PURE__ */ React38.createElement(import_icons8.SideRightIcon, { fontSize: "tiny" })
1028
1185
  }
1029
- ))), /* @__PURE__ */ React33.createElement(import_ui19.Stack, { direction: "row", gap: 2 }, /* @__PURE__ */ React33.createElement(ControlContainer, { direction: "column" }, /* @__PURE__ */ React33.createElement(ControlLabel, null, (0, import_i18n15.__)("Bottom", "elementor")), /* @__PURE__ */ React33.createElement(
1186
+ )))), /* @__PURE__ */ React38.createElement(import_ui31.Stack, { direction: "row", gap: 2 }, /* @__PURE__ */ React38.createElement(import_ui31.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React38.createElement(import_ui31.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React38.createElement(ControlLabel, null, (0, import_i18n17.__)("Bottom", "elementor"))), /* @__PURE__ */ React38.createElement(import_ui31.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React38.createElement(
1030
1187
  Control4,
1031
1188
  {
1032
1189
  bind: "bottom",
1033
1190
  value: bottom,
1034
1191
  setValue: setLinkedValue,
1035
- startIcon: /* @__PURE__ */ React33.createElement(import_icons6.SideBottomIcon, { fontSize: "tiny" })
1192
+ startIcon: /* @__PURE__ */ React38.createElement(import_icons8.SideBottomIcon, { fontSize: "tiny" })
1036
1193
  }
1037
- )), /* @__PURE__ */ React33.createElement(ControlContainer, { direction: "column" }, /* @__PURE__ */ React33.createElement(ControlLabel, null, (0, import_i18n15.__)("Left", "elementor")), /* @__PURE__ */ React33.createElement(
1194
+ ))), /* @__PURE__ */ React38.createElement(import_ui31.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React38.createElement(import_ui31.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React38.createElement(ControlLabel, null, (0, import_i18n17.__)("Left", "elementor"))), /* @__PURE__ */ React38.createElement(import_ui31.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React38.createElement(
1038
1195
  Control4,
1039
1196
  {
1040
1197
  bind: "left",
1041
1198
  value: left,
1042
1199
  setValue: setLinkedValue,
1043
- startIcon: /* @__PURE__ */ React33.createElement(import_icons6.SideLeftIcon, { fontSize: "tiny" })
1200
+ startIcon: /* @__PURE__ */ React38.createElement(import_icons8.SideLeftIcon, { fontSize: "tiny" })
1044
1201
  }
1045
- ))));
1202
+ )))));
1046
1203
  };
1047
1204
  var Control4 = ({
1048
1205
  bind,
1049
1206
  startIcon,
1050
1207
  value,
1051
1208
  setValue
1052
- }) => /* @__PURE__ */ React33.createElement(
1209
+ }) => /* @__PURE__ */ React38.createElement(
1053
1210
  ControlContext.Provider,
1054
1211
  {
1055
1212
  value: {
@@ -1058,12 +1215,314 @@ var Control4 = ({
1058
1215
  value
1059
1216
  }
1060
1217
  },
1061
- /* @__PURE__ */ React33.createElement(SizeControl, { startIcon })
1218
+ /* @__PURE__ */ React38.createElement(SizeControl, { startIcon })
1062
1219
  );
1063
1220
 
1064
1221
  // src/components/style-sections/spacing-section/spacing-section.tsx
1065
1222
  var SpacingSection = () => {
1066
- return /* @__PURE__ */ React34.createElement(AccordionSection, { title: (0, import_i18n16.__)("Spacing", "elementor") }, /* @__PURE__ */ React34.createElement(import_ui20.Stack, { gap: 1.5 }, /* @__PURE__ */ React34.createElement(StyleControl, { bind: "padding" }, /* @__PURE__ */ React34.createElement(LinkedDimensionsControl, { label: (0, import_i18n16.__)("Padding", "elementor") })), /* @__PURE__ */ React34.createElement(import_ui20.Divider, null), /* @__PURE__ */ React34.createElement(StyleControl, { bind: "margin" }, /* @__PURE__ */ React34.createElement(LinkedDimensionsControl, { label: (0, import_i18n16.__)("Margin", "elementor") }))));
1223
+ return /* @__PURE__ */ React39.createElement(AccordionSection, { title: (0, import_i18n18.__)("Spacing", "elementor") }, /* @__PURE__ */ React39.createElement(import_ui32.Stack, { gap: 1.5 }, /* @__PURE__ */ React39.createElement(StyleControl, { bind: "padding" }, /* @__PURE__ */ React39.createElement(LinkedDimensionsControl, { label: (0, import_i18n18.__)("Padding", "elementor") })), /* @__PURE__ */ React39.createElement(import_ui32.Divider, null), /* @__PURE__ */ React39.createElement(StyleControl, { bind: "margin" }, /* @__PURE__ */ React39.createElement(LinkedDimensionsControl, { label: (0, import_i18n18.__)("Margin", "elementor") }))));
1224
+ };
1225
+
1226
+ // src/components/style-sections/effects-section/effects-section.tsx
1227
+ var React42 = __toESM(require("react"));
1228
+ var import_i18n21 = require("@wordpress/i18n");
1229
+ var import_ui35 = require("@elementor/ui");
1230
+
1231
+ // src/components/style-sections/effects-section/box-shadow-repeater.tsx
1232
+ var React41 = __toESM(require("react"));
1233
+ var import_i18n20 = require("@wordpress/i18n");
1234
+ var import_ui34 = require("@elementor/ui");
1235
+
1236
+ // src/controls/components/repeater.tsx
1237
+ var React40 = __toESM(require("react"));
1238
+ var import_react9 = require("react");
1239
+ var import_i18n19 = require("@wordpress/i18n");
1240
+ var import_icons9 = require("@elementor/icons");
1241
+ var import_ui33 = require("@elementor/ui");
1242
+ var SIZE2 = "tiny";
1243
+ var Repeater = ({
1244
+ label,
1245
+ itemSettings,
1246
+ values: repeaterValues = [],
1247
+ setValues: setRepeaterValues
1248
+ }) => {
1249
+ const addRepeaterItem = () => {
1250
+ const newItem = structuredClone(itemSettings.initialValues);
1251
+ setRepeaterValues([...repeaterValues, newItem]);
1252
+ };
1253
+ const duplicateRepeaterItem = (index) => {
1254
+ setRepeaterValues([
1255
+ ...repeaterValues.slice(0, index),
1256
+ structuredClone(repeaterValues[index]),
1257
+ ...repeaterValues.slice(index)
1258
+ ]);
1259
+ };
1260
+ const removeRepeaterItem = (index) => {
1261
+ setRepeaterValues(repeaterValues.filter((_, i) => i !== index));
1262
+ };
1263
+ const toggleDisableRepeaterItem = (index) => {
1264
+ setRepeaterValues(
1265
+ repeaterValues.map((value, i) => {
1266
+ if (i === index) {
1267
+ const { disabled, ...rest } = value;
1268
+ return { ...rest, ...disabled ? {} : { disabled: true } };
1269
+ }
1270
+ return value;
1271
+ })
1272
+ );
1273
+ };
1274
+ return /* @__PURE__ */ React40.createElement(import_ui33.Stack, null, /* @__PURE__ */ React40.createElement(import_ui33.Stack, { direction: "row", justifyContent: "space-between", sx: { py: 0.5 } }, /* @__PURE__ */ React40.createElement(import_ui33.Typography, { component: "label", variant: "caption", color: "text.secondary" }, label), /* @__PURE__ */ React40.createElement(import_ui33.IconButton, { size: SIZE2, onClick: addRepeaterItem, "aria-label": (0, import_i18n19.__)("Add item", "elementor") }, /* @__PURE__ */ React40.createElement(import_icons9.PlusIcon, { fontSize: SIZE2 }))), /* @__PURE__ */ React40.createElement(import_ui33.Stack, { gap: 1 }, repeaterValues.map((value, index) => /* @__PURE__ */ React40.createElement(
1275
+ RepeaterItem,
1276
+ {
1277
+ key: index,
1278
+ disabled: value.disabled,
1279
+ label: /* @__PURE__ */ React40.createElement(itemSettings.Label, { value }),
1280
+ startIcon: /* @__PURE__ */ React40.createElement(itemSettings.Icon, { value }),
1281
+ removeItem: () => removeRepeaterItem(index),
1282
+ duplicateItem: () => duplicateRepeaterItem(index),
1283
+ toggleDisableItem: () => toggleDisableRepeaterItem(index)
1284
+ },
1285
+ (props) => /* @__PURE__ */ React40.createElement(
1286
+ itemSettings.Content,
1287
+ {
1288
+ ...props,
1289
+ value,
1290
+ setValue: (newValue) => setRepeaterValues(
1291
+ repeaterValues.map((item, i) => i === index ? newValue : item)
1292
+ )
1293
+ }
1294
+ )
1295
+ ))));
1296
+ };
1297
+ var RepeaterItem = ({
1298
+ label,
1299
+ disabled,
1300
+ startIcon,
1301
+ children,
1302
+ removeItem,
1303
+ duplicateItem,
1304
+ toggleDisableItem
1305
+ }) => {
1306
+ const popupId = (0, import_react9.useId)();
1307
+ const tagRef = (0, import_react9.useRef)(null);
1308
+ const [anchorEl, setAnchorEl] = (0, import_react9.useState)(null);
1309
+ const popoverState = (0, import_ui33.usePopupState)({ popupId, variant: "popover" });
1310
+ const popoverProps = (0, import_ui33.bindPopover)(popoverState);
1311
+ return /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(
1312
+ import_ui33.UnstableTag,
1313
+ {
1314
+ ref: tagRef,
1315
+ label,
1316
+ showActionsOnHover: true,
1317
+ variant: "outlined",
1318
+ "aria-label": (0, import_i18n19.__)("Open item", "elementor"),
1319
+ ...(0, import_ui33.bindTrigger)(popoverState),
1320
+ startIcon,
1321
+ actions: /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(
1322
+ import_ui33.IconButton,
1323
+ {
1324
+ size: SIZE2,
1325
+ onClick: duplicateItem,
1326
+ "aria-label": (0, import_i18n19.__)("Duplicate item", "elementor")
1327
+ },
1328
+ /* @__PURE__ */ React40.createElement(import_icons9.CopyIcon, { fontSize: SIZE2 })
1329
+ ), /* @__PURE__ */ React40.createElement(
1330
+ import_ui33.IconButton,
1331
+ {
1332
+ size: SIZE2,
1333
+ onClick: toggleDisableItem,
1334
+ "aria-label": disabled ? (0, import_i18n19.__)("Enable item", "elementor") : (0, import_i18n19.__)("Disable item", "elementor")
1335
+ },
1336
+ disabled ? /* @__PURE__ */ React40.createElement(import_icons9.EyeOffIcon, { fontSize: SIZE2 }) : /* @__PURE__ */ React40.createElement(import_icons9.EyeIcon, { fontSize: SIZE2 })
1337
+ ), /* @__PURE__ */ React40.createElement(
1338
+ import_ui33.IconButton,
1339
+ {
1340
+ size: SIZE2,
1341
+ onClick: removeItem,
1342
+ "aria-label": (0, import_i18n19.__)("Remove item", "elementor")
1343
+ },
1344
+ /* @__PURE__ */ React40.createElement(import_icons9.XIcon, { fontSize: SIZE2 })
1345
+ ))
1346
+ }
1347
+ ), /* @__PURE__ */ React40.createElement(
1348
+ import_ui33.Popover,
1349
+ {
1350
+ disablePortal: true,
1351
+ slotProps: {
1352
+ paper: { ref: setAnchorEl, sx: { width: tagRef.current?.getBoundingClientRect().width } }
1353
+ },
1354
+ anchorOrigin: { vertical: "bottom", horizontal: "left" },
1355
+ ...popoverProps
1356
+ },
1357
+ /* @__PURE__ */ React40.createElement(import_ui33.Box, { p: 2 }, children({ anchorEl }))
1358
+ ));
1359
+ };
1360
+
1361
+ // src/components/style-sections/effects-section/box-shadow-repeater.tsx
1362
+ var BoxShadowRepeater = () => {
1363
+ const { value, setValue } = useControl();
1364
+ const boxShadowValues = value?.value;
1365
+ const setBoxShadow = (newValue) => {
1366
+ setValue({
1367
+ $$type: "box-shadow",
1368
+ value: newValue
1369
+ });
1370
+ };
1371
+ return /* @__PURE__ */ React41.createElement(
1372
+ Repeater,
1373
+ {
1374
+ values: boxShadowValues,
1375
+ setValues: setBoxShadow,
1376
+ label: (0, import_i18n20.__)("Box shadow", "elementor"),
1377
+ itemSettings: {
1378
+ Icon: ItemIcon,
1379
+ Label: ItemLabel,
1380
+ Content: ItemContent,
1381
+ initialValues: initialShadow
1382
+ }
1383
+ }
1384
+ );
1385
+ };
1386
+ var ItemIcon = ({ value }) => /* @__PURE__ */ React41.createElement(import_ui34.UnstableColorIndicator, { size: "inherit", component: "span", value: value.value.color.value });
1387
+ var ItemContent = ({
1388
+ anchorEl,
1389
+ value,
1390
+ setValue
1391
+ }) => {
1392
+ const setShadow = (newValue) => {
1393
+ setValue({
1394
+ $$type: "shadow",
1395
+ value: newValue
1396
+ });
1397
+ };
1398
+ return /* @__PURE__ */ React41.createElement(import_ui34.Stack, { gap: 1.5 }, /* @__PURE__ */ React41.createElement(import_ui34.Grid, { container: true, spacing: 1 }, /* @__PURE__ */ React41.createElement(
1399
+ Control5,
1400
+ {
1401
+ bind: "color",
1402
+ value: value.value.color,
1403
+ label: (0, import_i18n20.__)("Color", "elementor"),
1404
+ setValue: (v) => setShadow({ ...value.value, color: v })
1405
+ },
1406
+ /* @__PURE__ */ React41.createElement(
1407
+ ColorControl,
1408
+ {
1409
+ anchorEl,
1410
+ anchorOrigin: {
1411
+ vertical: "top",
1412
+ horizontal: "right"
1413
+ },
1414
+ transformOrigin: {
1415
+ vertical: "top",
1416
+ horizontal: -10
1417
+ }
1418
+ }
1419
+ )
1420
+ ), /* @__PURE__ */ React41.createElement(
1421
+ Control5,
1422
+ {
1423
+ bind: "position",
1424
+ value: value.value.position,
1425
+ label: (0, import_i18n20.__)("Position", "elementor"),
1426
+ setValue: (v) => setShadow({ ...value.value, position: v })
1427
+ },
1428
+ /* @__PURE__ */ React41.createElement(
1429
+ SelectControl,
1430
+ {
1431
+ options: [
1432
+ { label: "Inset", value: "inset" },
1433
+ { label: "Outset", value: "outset" }
1434
+ ]
1435
+ }
1436
+ )
1437
+ )), /* @__PURE__ */ React41.createElement(import_ui34.Grid, { container: true, spacing: 1 }, /* @__PURE__ */ React41.createElement(
1438
+ Control5,
1439
+ {
1440
+ bind: "hOffset",
1441
+ label: (0, import_i18n20.__)("Horizontal", "elementor"),
1442
+ value: value.value.hOffset,
1443
+ setValue: (v) => setShadow({ ...value.value, hOffset: v })
1444
+ },
1445
+ /* @__PURE__ */ React41.createElement(SizeControl, null)
1446
+ ), /* @__PURE__ */ React41.createElement(
1447
+ Control5,
1448
+ {
1449
+ label: (0, import_i18n20.__)("Vertical", "elementor"),
1450
+ bind: "vOffset",
1451
+ value: value.value.vOffset,
1452
+ setValue: (v) => setShadow({ ...value.value, vOffset: v })
1453
+ },
1454
+ /* @__PURE__ */ React41.createElement(SizeControl, null)
1455
+ )), /* @__PURE__ */ React41.createElement(import_ui34.Grid, { container: true, spacing: 1 }, /* @__PURE__ */ React41.createElement(
1456
+ Control5,
1457
+ {
1458
+ bind: "blur",
1459
+ value: value.value.blur,
1460
+ label: (0, import_i18n20.__)("Blur", "elementor"),
1461
+ setValue: (v) => setShadow({ ...value.value, blur: v })
1462
+ },
1463
+ /* @__PURE__ */ React41.createElement(SizeControl, null)
1464
+ ), /* @__PURE__ */ React41.createElement(
1465
+ Control5,
1466
+ {
1467
+ bind: "spread",
1468
+ label: (0, import_i18n20.__)("Spread", "elementor"),
1469
+ value: value.value.spread,
1470
+ setValue: (v) => setShadow({ ...value.value, spread: v })
1471
+ },
1472
+ /* @__PURE__ */ React41.createElement(SizeControl, null)
1473
+ )));
1474
+ };
1475
+ var Control5 = ({
1476
+ value,
1477
+ setValue,
1478
+ label,
1479
+ bind,
1480
+ children
1481
+ }) => /* @__PURE__ */ React41.createElement(ControlContext.Provider, { value: { value, setValue, bind } }, /* @__PURE__ */ React41.createElement(import_ui34.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(import_ui34.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React41.createElement(import_ui34.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React41.createElement(ControlLabel, null, label)), /* @__PURE__ */ React41.createElement(import_ui34.Grid, { item: true, xs: 12 }, children))));
1482
+ var ItemLabel = ({ value }) => {
1483
+ const { position, hOffset, vOffset, blur, spread } = value.value;
1484
+ const { size: hOffsetSize, unit: hOffsetUnit } = hOffset.value;
1485
+ const { size: vOffsetSize, unit: vOffsetUnit } = vOffset.value;
1486
+ const { size: blurSize, unit: blurUnit } = blur.value;
1487
+ const { size: spreadSize, unit: spreadUnit } = spread.value;
1488
+ const sizes = [
1489
+ hOffsetSize + hOffsetUnit,
1490
+ vOffsetSize + vOffsetUnit,
1491
+ blurSize + blurUnit,
1492
+ spreadSize + spreadUnit
1493
+ ].join(" ");
1494
+ return /* @__PURE__ */ React41.createElement("span", { style: { textTransform: "capitalize" } }, position, ": ", sizes);
1495
+ };
1496
+ var initialShadow = {
1497
+ $$type: "shadow",
1498
+ value: {
1499
+ hOffset: {
1500
+ $$type: "size",
1501
+ value: { unit: "px", size: 0 }
1502
+ },
1503
+ vOffset: {
1504
+ $$type: "size",
1505
+ value: { unit: "px", size: 0 }
1506
+ },
1507
+ blur: {
1508
+ $$type: "size",
1509
+ value: { unit: "px", size: 0 }
1510
+ },
1511
+ spread: {
1512
+ $$type: "size",
1513
+ value: { unit: "px", size: 0 }
1514
+ },
1515
+ color: {
1516
+ $$type: "color",
1517
+ value: "rgba(0, 0, 0, 0)"
1518
+ },
1519
+ position: "inset"
1520
+ }
1521
+ };
1522
+
1523
+ // src/components/style-sections/effects-section/effects-section.tsx
1524
+ var EffectsSection = () => {
1525
+ return /* @__PURE__ */ React42.createElement(AccordionSection, { title: (0, import_i18n21.__)("Effects", "elementor") }, /* @__PURE__ */ React42.createElement(import_ui35.Stack, { gap: 1.5 }, /* @__PURE__ */ React42.createElement(StyleControl, { bind: "box-shadow" }, /* @__PURE__ */ React42.createElement(BoxShadowRepeater, null))));
1067
1526
  };
1068
1527
 
1069
1528
  // src/components/style-tab.tsx
@@ -1071,11 +1530,13 @@ var CLASSES_PROP_KEY = "classes";
1071
1530
  var StyleTab = () => {
1072
1531
  const styleDefinition = useStyleDefinition();
1073
1532
  const classesProp = useClassesProp();
1074
- return /* @__PURE__ */ React35.createElement(StyleContext, { selectedStyleDef: styleDefinition, selectedClassesProp: classesProp }, /* @__PURE__ */ React35.createElement(import_ui21.Stack, null, /* @__PURE__ */ React35.createElement(SizeSection, null), /* @__PURE__ */ React35.createElement(PositionSection, null), /* @__PURE__ */ React35.createElement(TypographySection, null), /* @__PURE__ */ React35.createElement(SpacingSection, null)));
1533
+ return /* @__PURE__ */ React43.createElement(StyleContext, { selectedStyleDef: styleDefinition, selectedClassesProp: classesProp }, /* @__PURE__ */ React43.createElement(import_ui36.Stack, null, /* @__PURE__ */ React43.createElement(SizeSection, null), /* @__PURE__ */ React43.createElement(PositionSection, null), /* @__PURE__ */ React43.createElement(TypographySection, null), /* @__PURE__ */ React43.createElement(SpacingSection, null), /* @__PURE__ */ React43.createElement(EffectsSection, null)));
1075
1534
  };
1076
1535
  function useClassesProp() {
1077
1536
  const { elementType } = useElementContext();
1078
- const prop = Object.entries(elementType.propsSchema).find(([, { type }]) => type.key === CLASSES_PROP_KEY);
1537
+ const prop = Object.entries(elementType.propsSchema).find(
1538
+ ([, propType]) => propType.kind === "array" && propType.key === CLASSES_PROP_KEY
1539
+ );
1079
1540
  if (!prop) {
1080
1541
  throw new Error("Element does not have a classes prop");
1081
1542
  }
@@ -1089,8 +1550,8 @@ function useStyleDefinition() {
1089
1550
 
1090
1551
  // src/components/editing-panel-tabs.tsx
1091
1552
  var EditingPanelTabs = () => {
1092
- const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui22.useTabs)("settings");
1093
- return /* @__PURE__ */ React36.createElement(import_ui22.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React36.createElement(import_ui22.Tabs, { variant: "fullWidth", indicatorColor: "secondary", textColor: "inherit", ...getTabsProps() }, /* @__PURE__ */ React36.createElement(import_ui22.Tab, { label: (0, import_i18n17.__)("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React36.createElement(import_ui22.Tab, { label: (0, import_i18n17.__)("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React36.createElement(import_ui22.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React36.createElement(SettingsTab, null)), /* @__PURE__ */ React36.createElement(import_ui22.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React36.createElement(StyleTab, null)));
1553
+ const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui37.useTabs)("settings");
1554
+ return /* @__PURE__ */ React44.createElement(import_ui37.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React44.createElement(import_ui37.Tabs, { variant: "fullWidth", indicatorColor: "secondary", textColor: "inherit", ...getTabsProps() }, /* @__PURE__ */ React44.createElement(import_ui37.Tab, { label: (0, import_i18n22.__)("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React44.createElement(import_ui37.Tab, { label: (0, import_i18n22.__)("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React44.createElement(import_ui37.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React44.createElement(SettingsTab, null)), /* @__PURE__ */ React44.createElement(import_ui37.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React44.createElement(StyleTab, null)));
1094
1555
  };
1095
1556
 
1096
1557
  // src/components/editing-panel.tsx
@@ -1101,8 +1562,8 @@ var EditingPanel = () => {
1101
1562
  if (elements.length !== 1 || !elementType) {
1102
1563
  return null;
1103
1564
  }
1104
- const panelTitle = (0, import_i18n18.__)("Edit %s", "elementor").replace("%s", elementType.title);
1105
- return /* @__PURE__ */ React37.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React37.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React37.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle)), /* @__PURE__ */ React37.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React37.createElement(ElementContext, { element: selectedElement, elementType }, /* @__PURE__ */ React37.createElement(EditingPanelTabs, null))));
1565
+ const panelTitle = (0, import_i18n23.__)("Edit %s", "elementor").replace("%s", elementType.title);
1566
+ return /* @__PURE__ */ React45.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React45.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React45.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle)), /* @__PURE__ */ React45.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React45.createElement(ElementContext, { element: selectedElement, elementType }, /* @__PURE__ */ React45.createElement(EditingPanelTabs, null))));
1106
1567
  };
1107
1568
 
1108
1569
  // src/panel.ts
@@ -1125,11 +1586,11 @@ var shouldUseV2Panel = () => {
1125
1586
  };
1126
1587
 
1127
1588
  // src/hooks/use-open-editor-panel.ts
1128
- var import_react8 = require("react");
1589
+ var import_react10 = require("react");
1129
1590
  var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
1130
1591
  var useOpenEditorPanel = () => {
1131
1592
  const { open } = usePanelActions();
1132
- (0, import_react8.useEffect)(() => {
1593
+ (0, import_react10.useEffect)(() => {
1133
1594
  return (0, import_editor_v1_adapters8.__privateListenTo)((0, import_editor_v1_adapters8.commandStartEvent)("panel/editor/open"), () => {
1134
1595
  if (shouldUseV2Panel()) {
1135
1596
  open();
@@ -1149,14 +1610,14 @@ var import_editor_panels3 = require("@elementor/editor-panels");
1149
1610
  var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
1150
1611
 
1151
1612
  // src/dynamics/components/dynamic-selection-control.tsx
1152
- var React40 = __toESM(require("react"));
1153
- var import_react12 = require("react");
1613
+ var React48 = __toESM(require("react"));
1614
+ var import_react14 = require("react");
1154
1615
 
1155
1616
  // src/dynamics/dynamic-control.tsx
1156
- var React38 = __toESM(require("react"));
1617
+ var React46 = __toESM(require("react"));
1157
1618
 
1158
1619
  // src/dynamics/hooks/use-prop-dynamic-tags.ts
1159
- var import_react9 = require("react");
1620
+ var import_react11 = require("react");
1160
1621
 
1161
1622
  // src/dynamics/sync/get-elementor-config.ts
1162
1623
  var getElementorConfig = () => {
@@ -1187,21 +1648,29 @@ var isTransformable = (value) => {
1187
1648
  };
1188
1649
 
1189
1650
  // src/dynamics/utils.ts
1190
- var isDynamicType = (prop) => prop.key === "dynamic";
1651
+ var DYNAMIC_PROP_TYPE_KEY = "dynamic";
1652
+ var isDynamicPropType = (prop) => prop.key === DYNAMIC_PROP_TYPE_KEY;
1653
+ var getDynamicPropType = (propType) => {
1654
+ const dynamicPropType = propType.kind === "union" && propType.prop_types[DYNAMIC_PROP_TYPE_KEY];
1655
+ return dynamicPropType && isDynamicPropType(dynamicPropType) ? dynamicPropType : null;
1656
+ };
1191
1657
  var isDynamicPropValue = (prop) => {
1192
- return isTransformable(prop) && prop.$$type === "dynamic";
1658
+ return isTransformable(prop) && prop.$$type === DYNAMIC_PROP_TYPE_KEY;
1659
+ };
1660
+ var supportsDynamic = (propType) => {
1661
+ return !!getDynamicPropType(propType);
1193
1662
  };
1194
1663
 
1195
1664
  // src/dynamics/hooks/use-prop-dynamic-tags.ts
1196
1665
  var usePropDynamicTags = (propName) => {
1197
1666
  let categories = [];
1198
1667
  const { elementType } = useElementContext();
1199
- const propSchema = elementType.propsSchema?.[propName];
1200
- if (propSchema) {
1201
- const propDynamicType = propSchema.additional_types.find(isDynamicType);
1668
+ const propType = elementType.propsSchema?.[propName];
1669
+ if (propType) {
1670
+ const propDynamicType = getDynamicPropType(propType);
1202
1671
  categories = propDynamicType?.settings.categories || [];
1203
1672
  }
1204
- return (0, import_react9.useMemo)(() => getDynamicTagsByCategories(categories), [categories.join()]);
1673
+ return (0, import_react11.useMemo)(() => getDynamicTagsByCategories(categories), [categories.join()]);
1205
1674
  };
1206
1675
  var getDynamicTagsByCategories = (categories) => {
1207
1676
  const dynamicTags = getAtomicDynamicTags();
@@ -1215,10 +1684,10 @@ var getDynamicTagsByCategories = (categories) => {
1215
1684
  };
1216
1685
 
1217
1686
  // src/dynamics/hooks/use-dynamic-tag.ts
1218
- var import_react10 = require("react");
1687
+ var import_react12 = require("react");
1219
1688
  var useDynamicTag = (propName, tagName) => {
1220
1689
  const dynamicTags = usePropDynamicTags(propName);
1221
- return (0, import_react10.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
1690
+ return (0, import_react12.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
1222
1691
  };
1223
1692
 
1224
1693
  // src/dynamics/dynamic-control.tsx
@@ -1229,7 +1698,7 @@ var DynamicControl = ({ bind, children }) => {
1229
1698
  if (!dynamicTag) {
1230
1699
  throw new Error(`Dynamic tag ${name} not found`);
1231
1700
  }
1232
- const defaultValue = dynamicTag.props_schema[bind]?.type.default;
1701
+ const defaultValue = dynamicTag.props_schema[bind]?.default;
1233
1702
  const dynamicValue = settings?.[bind] ?? defaultValue;
1234
1703
  const setDynamicValue = (newValue) => {
1235
1704
  setValue({
@@ -1243,18 +1712,18 @@ var DynamicControl = ({ bind, children }) => {
1243
1712
  }
1244
1713
  });
1245
1714
  };
1246
- return /* @__PURE__ */ React38.createElement(ControlContext.Provider, { value: { setValue: setDynamicValue, value: dynamicValue, bind } }, children);
1715
+ return /* @__PURE__ */ React46.createElement(ControlContext.Provider, { value: { setValue: setDynamicValue, value: dynamicValue, bind } }, children);
1247
1716
  };
1248
1717
 
1249
1718
  // src/dynamics/components/dynamic-selection-control.tsx
1250
- var import_icons8 = require("@elementor/icons");
1719
+ var import_icons11 = require("@elementor/icons");
1251
1720
 
1252
1721
  // src/dynamics/components/dynamic-selection.tsx
1253
- var React39 = __toESM(require("react"));
1254
- var import_react11 = require("react");
1255
- var import_icons7 = require("@elementor/icons");
1256
- var import_ui23 = require("@elementor/ui");
1257
- var import_i18n19 = require("@wordpress/i18n");
1722
+ var React47 = __toESM(require("react"));
1723
+ var import_react13 = require("react");
1724
+ var import_icons10 = require("@elementor/icons");
1725
+ var import_ui38 = require("@elementor/ui");
1726
+ var import_i18n24 = require("@wordpress/i18n");
1258
1727
 
1259
1728
  // src/dynamics/hooks/use-prop-value-history.ts
1260
1729
  var PROPS_VALUES_HISTORY_KEY = "elementor/dynamic/non-dynamic-values-history";
@@ -1276,14 +1745,14 @@ var setValues = (values) => {
1276
1745
  };
1277
1746
 
1278
1747
  // src/dynamics/components/dynamic-selection.tsx
1279
- var SIZE = "tiny";
1748
+ var SIZE3 = "tiny";
1280
1749
  var DynamicSelection = ({ onSelect }) => {
1281
- const [searchValue, setSearchValue] = (0, import_react11.useState)("");
1750
+ const [searchValue, setSearchValue] = (0, import_react13.useState)("");
1282
1751
  const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
1283
1752
  const { bind, value: currentValue, setValue } = useControl();
1284
1753
  const [, updatePropValueHistory] = usePropValueHistory(bind);
1285
1754
  const isCurrentValueDynamic = isDynamicPropValue(currentValue);
1286
- const options3 = useFilteredOptions(bind, searchValue);
1755
+ const options4 = useFilteredOptions(bind, searchValue);
1287
1756
  const handleSearch = (event) => {
1288
1757
  setSearchValue(event.target.value);
1289
1758
  };
@@ -1291,25 +1760,25 @@ var DynamicSelection = ({ onSelect }) => {
1291
1760
  if (!isCurrentValueDynamic) {
1292
1761
  updatePropValueHistory(currentValue);
1293
1762
  }
1294
- setValue({ $$type: "dynamic", value: { name: value } });
1763
+ setValue({ $$type: "dynamic", value: { name: value, settings: {} } });
1295
1764
  onSelect?.();
1296
1765
  };
1297
- return /* @__PURE__ */ React39.createElement(import_ui23.Stack, null, /* @__PURE__ */ React39.createElement(import_ui23.Box, { px: 1.5, pb: 1 }, /* @__PURE__ */ React39.createElement(
1298
- import_ui23.TextField,
1766
+ return /* @__PURE__ */ React47.createElement(import_ui38.Stack, null, /* @__PURE__ */ React47.createElement(import_ui38.Box, { px: 1.5, pb: 1 }, /* @__PURE__ */ React47.createElement(
1767
+ import_ui38.TextField,
1299
1768
  {
1300
1769
  fullWidth: true,
1301
- size: SIZE,
1770
+ size: SIZE3,
1302
1771
  value: searchValue,
1303
1772
  onChange: handleSearch,
1304
- placeholder: (0, import_i18n19.__)("Search dynamic tag", "elementor"),
1773
+ placeholder: (0, import_i18n24.__)("Search dynamic tag", "elementor"),
1305
1774
  InputProps: {
1306
- startAdornment: /* @__PURE__ */ React39.createElement(import_ui23.InputAdornment, { position: "start" }, /* @__PURE__ */ React39.createElement(import_icons7.SearchIcon, { fontSize: SIZE }))
1775
+ startAdornment: /* @__PURE__ */ React47.createElement(import_ui38.InputAdornment, { position: "start" }, /* @__PURE__ */ React47.createElement(import_icons10.SearchIcon, { fontSize: SIZE3 }))
1307
1776
  }
1308
1777
  }
1309
- )), /* @__PURE__ */ React39.createElement(import_ui23.Divider, null), /* @__PURE__ */ React39.createElement(import_ui23.Box, { sx: { overflowY: "auto", height: 260, width: 220 } }, options3.length > 0 ? /* @__PURE__ */ React39.createElement(import_ui23.MenuList, { role: "listbox", tabIndex: 0 }, options3.map(([category, items], index) => /* @__PURE__ */ React39.createElement(import_react11.Fragment, { key: index }, /* @__PURE__ */ React39.createElement(import_ui23.ListSubheader, { sx: { typography: "caption", color: "text.tertiary" } }, dynamicGroups?.[category]?.title || category), items.map(({ value, label: tagLabel }) => {
1778
+ )), /* @__PURE__ */ React47.createElement(import_ui38.Divider, null), /* @__PURE__ */ React47.createElement(import_ui38.Box, { sx: { overflowY: "auto", height: 260, width: 220 } }, options4.length > 0 ? /* @__PURE__ */ React47.createElement(import_ui38.MenuList, { role: "listbox", tabIndex: 0 }, options4.map(([category, items], index) => /* @__PURE__ */ React47.createElement(import_react13.Fragment, { key: index }, /* @__PURE__ */ React47.createElement(import_ui38.ListSubheader, { sx: { typography: "caption", color: "text.tertiary" } }, dynamicGroups?.[category]?.title || category), items.map(({ value, label: tagLabel }) => {
1310
1779
  const isSelected = isCurrentValueDynamic && value === currentValue?.value?.name;
1311
- return /* @__PURE__ */ React39.createElement(
1312
- import_ui23.MenuItem,
1780
+ return /* @__PURE__ */ React47.createElement(
1781
+ import_ui38.MenuItem,
1313
1782
  {
1314
1783
  key: value,
1315
1784
  selected: isSelected,
@@ -1319,20 +1788,20 @@ var DynamicSelection = ({ onSelect }) => {
1319
1788
  },
1320
1789
  tagLabel
1321
1790
  );
1322
- })))) : /* @__PURE__ */ React39.createElement(import_ui23.Stack, { alignItems: "center", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React39.createElement(import_icons7.PhotoIcon, { fontSize: "large" }), /* @__PURE__ */ React39.createElement(import_ui23.Typography, { align: "center", variant: "caption", color: "text.secondary" }, (0, import_i18n19.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React39.createElement("br", null), "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React39.createElement(import_ui23.Typography, { align: "center", variant: "caption", color: "text.secondary" }, /* @__PURE__ */ React39.createElement(
1323
- import_ui23.Link,
1791
+ })))) : /* @__PURE__ */ React47.createElement(import_ui38.Stack, { alignItems: "center", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React47.createElement(import_icons10.PhotoIcon, { fontSize: "large" }), /* @__PURE__ */ React47.createElement(import_ui38.Typography, { align: "center", variant: "caption", color: "text.secondary" }, (0, import_i18n24.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React47.createElement("br", null), "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React47.createElement(import_ui38.Typography, { align: "center", variant: "caption", color: "text.secondary" }, /* @__PURE__ */ React47.createElement(
1792
+ import_ui38.Link,
1324
1793
  {
1325
1794
  color: "secondary",
1326
1795
  variant: "caption",
1327
1796
  component: "button",
1328
1797
  onClick: () => setSearchValue("")
1329
1798
  },
1330
- (0, import_i18n19.__)("Clear the filters", "elementor")
1331
- ), "\xA0", (0, import_i18n19.__)("and try again.", "elementor")))));
1799
+ (0, import_i18n24.__)("Clear the filters", "elementor")
1800
+ ), "\xA0", (0, import_i18n24.__)("and try again.", "elementor")))));
1332
1801
  };
1333
1802
  var useFilteredOptions = (bind, searchValue) => {
1334
1803
  const dynamicTags = usePropDynamicTags(bind);
1335
- const options3 = dynamicTags.reduce((categories, { name, label, group }) => {
1804
+ const options4 = dynamicTags.reduce((categories, { name, label, group }) => {
1336
1805
  const isVisible = label.toLowerCase().includes(searchValue.trim().toLowerCase());
1337
1806
  if (!isVisible) {
1338
1807
  return categories;
@@ -1343,19 +1812,19 @@ var useFilteredOptions = (bind, searchValue) => {
1343
1812
  categories.get(group)?.push({ label, value: name });
1344
1813
  return categories;
1345
1814
  }, /* @__PURE__ */ new Map());
1346
- return [...options3];
1815
+ return [...options4];
1347
1816
  };
1348
1817
 
1349
1818
  // src/dynamics/components/dynamic-selection-control.tsx
1350
- var import_ui24 = require("@elementor/ui");
1351
- var import_i18n20 = require("@wordpress/i18n");
1352
- var SIZE2 = "tiny";
1819
+ var import_ui39 = require("@elementor/ui");
1820
+ var import_i18n25 = require("@wordpress/i18n");
1821
+ var SIZE4 = "tiny";
1353
1822
  var DynamicSelectionControl = () => {
1354
1823
  const { bind, value, setValue } = useControl();
1355
1824
  const [propValueFromHistory] = usePropValueHistory(bind);
1356
1825
  const { name: tagName = "" } = value?.value || {};
1357
- const selectionPopoverId = (0, import_react12.useId)();
1358
- const selectionPopoverState = (0, import_ui24.usePopupState)({ variant: "popover", popupId: selectionPopoverId });
1826
+ const selectionPopoverId = (0, import_react14.useId)();
1827
+ const selectionPopoverState = (0, import_ui39.usePopupState)({ variant: "popover", popupId: selectionPopoverId });
1359
1828
  const dynamicTag = useDynamicTag(bind, tagName);
1360
1829
  const removeDynamicTag = () => {
1361
1830
  setValue(propValueFromHistory ?? null);
@@ -1363,88 +1832,110 @@ var DynamicSelectionControl = () => {
1363
1832
  if (!dynamicTag) {
1364
1833
  throw new Error(`Dynamic tag ${tagName} not found`);
1365
1834
  }
1366
- return /* @__PURE__ */ React40.createElement(import_ui24.Box, { sx: { width: "100%" } }, /* @__PURE__ */ React40.createElement(
1367
- import_ui24.UnstableTag,
1835
+ return /* @__PURE__ */ React48.createElement(import_ui39.Box, null, /* @__PURE__ */ React48.createElement(
1836
+ import_ui39.UnstableTag,
1368
1837
  {
1369
1838
  fullWidth: true,
1370
1839
  showActionsOnHover: true,
1371
1840
  label: dynamicTag.label,
1372
- startIcon: /* @__PURE__ */ React40.createElement(import_icons8.DatabaseIcon, { fontSize: SIZE2 }),
1373
- ...(0, import_ui24.bindTrigger)(selectionPopoverState),
1374
- actions: /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React40.createElement(
1375
- import_ui24.IconButton,
1841
+ startIcon: /* @__PURE__ */ React48.createElement(import_icons11.DatabaseIcon, { fontSize: SIZE4 }),
1842
+ ...(0, import_ui39.bindTrigger)(selectionPopoverState),
1843
+ actions: /* @__PURE__ */ React48.createElement(React48.Fragment, null, /* @__PURE__ */ React48.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React48.createElement(
1844
+ import_ui39.IconButton,
1376
1845
  {
1377
- size: SIZE2,
1846
+ size: SIZE4,
1378
1847
  onClick: removeDynamicTag,
1379
- "aria-label": (0, import_i18n20.__)("Remove dynamic value", "elementor")
1848
+ "aria-label": (0, import_i18n25.__)("Remove dynamic value", "elementor")
1380
1849
  },
1381
- /* @__PURE__ */ React40.createElement(import_icons8.XIcon, { fontSize: SIZE2 })
1850
+ /* @__PURE__ */ React48.createElement(import_icons11.XIcon, { fontSize: SIZE4 })
1382
1851
  ))
1383
1852
  }
1384
- ), /* @__PURE__ */ React40.createElement(
1385
- import_ui24.Popover,
1853
+ ), /* @__PURE__ */ React48.createElement(
1854
+ import_ui39.Popover,
1386
1855
  {
1387
1856
  disablePortal: true,
1388
1857
  disableScrollLock: true,
1389
1858
  anchorOrigin: { vertical: "bottom", horizontal: "left" },
1390
- ...(0, import_ui24.bindPopover)(selectionPopoverState)
1859
+ ...(0, import_ui39.bindPopover)(selectionPopoverState)
1391
1860
  },
1392
- /* @__PURE__ */ React40.createElement(import_ui24.Stack, null, /* @__PURE__ */ React40.createElement(import_ui24.Stack, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React40.createElement(import_icons8.DatabaseIcon, { fontSize: SIZE2, sx: { mr: 0.5 } }), /* @__PURE__ */ React40.createElement(import_ui24.Typography, { variant: "subtitle2" }, (0, import_i18n20.__)("Dynamic Tags", "elementor")), /* @__PURE__ */ React40.createElement(import_ui24.IconButton, { size: SIZE2, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React40.createElement(import_icons8.XIcon, { fontSize: SIZE2 }))), /* @__PURE__ */ React40.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
1861
+ /* @__PURE__ */ React48.createElement(import_ui39.Stack, null, /* @__PURE__ */ React48.createElement(import_ui39.Stack, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React48.createElement(import_icons11.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React48.createElement(import_ui39.Typography, { variant: "subtitle2" }, (0, import_i18n25.__)("Dynamic Tags", "elementor")), /* @__PURE__ */ React48.createElement(import_ui39.IconButton, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React48.createElement(import_icons11.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React48.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
1393
1862
  ));
1394
1863
  };
1395
1864
  var DynamicSettingsPopover = ({ dynamicTag }) => {
1396
- const popupId = (0, import_react12.useId)();
1397
- const settingsPopupState = (0, import_ui24.usePopupState)({ variant: "popover", popupId });
1865
+ const popupId = (0, import_react14.useId)();
1866
+ const settingsPopupState = (0, import_ui39.usePopupState)({ variant: "popover", popupId });
1398
1867
  const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
1399
1868
  if (!hasDynamicSettings) {
1400
1869
  return null;
1401
1870
  }
1402
- return /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(
1403
- import_ui24.IconButton,
1871
+ return /* @__PURE__ */ React48.createElement(React48.Fragment, null, /* @__PURE__ */ React48.createElement(
1872
+ import_ui39.IconButton,
1404
1873
  {
1405
- size: SIZE2,
1406
- ...(0, import_ui24.bindTrigger)(settingsPopupState),
1407
- "aria-label": (0, import_i18n20.__)("Settings", "elementor")
1874
+ size: SIZE4,
1875
+ ...(0, import_ui39.bindTrigger)(settingsPopupState),
1876
+ "aria-label": (0, import_i18n25.__)("Settings", "elementor")
1408
1877
  },
1409
- /* @__PURE__ */ React40.createElement(import_icons8.SettingsIcon, { fontSize: SIZE2 })
1410
- ), /* @__PURE__ */ React40.createElement(
1411
- import_ui24.Popover,
1878
+ /* @__PURE__ */ React48.createElement(import_icons11.SettingsIcon, { fontSize: SIZE4 })
1879
+ ), /* @__PURE__ */ React48.createElement(
1880
+ import_ui39.Popover,
1412
1881
  {
1413
1882
  disableScrollLock: true,
1414
1883
  anchorOrigin: { vertical: "bottom", horizontal: "center" },
1415
- ...(0, import_ui24.bindPopover)(settingsPopupState)
1884
+ ...(0, import_ui39.bindPopover)(settingsPopupState)
1416
1885
  },
1417
- /* @__PURE__ */ React40.createElement(import_ui24.Paper, { component: import_ui24.Stack, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React40.createElement(import_ui24.Stack, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React40.createElement(import_icons8.DatabaseIcon, { fontSize: SIZE2, sx: { mr: 0.5 } }), /* @__PURE__ */ React40.createElement(import_ui24.Typography, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React40.createElement(import_ui24.IconButton, { sx: { ml: "auto" }, size: SIZE2, onClick: settingsPopupState.close }, /* @__PURE__ */ React40.createElement(import_icons8.XIcon, { fontSize: SIZE2 }))), /* @__PURE__ */ React40.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
1886
+ /* @__PURE__ */ React48.createElement(import_ui39.Paper, { component: import_ui39.Stack, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React48.createElement(import_ui39.Stack, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React48.createElement(import_icons11.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React48.createElement(import_ui39.Typography, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React48.createElement(import_ui39.IconButton, { sx: { ml: "auto" }, size: SIZE4, onClick: settingsPopupState.close }, /* @__PURE__ */ React48.createElement(import_icons11.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React48.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
1418
1887
  ));
1419
1888
  };
1420
1889
  var DynamicSettings = ({ controls }) => {
1421
1890
  const tabs = controls.filter(({ type }) => type === "section");
1422
- const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui24.useTabs)(0);
1891
+ const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui39.useTabs)(0);
1423
1892
  if (!tabs.length) {
1424
1893
  return null;
1425
1894
  }
1426
- return /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(import_ui24.Tabs, { indicatorColor: "secondary", textColor: "secondary", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React40.createElement(import_ui24.Tab, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React40.createElement(import_ui24.Divider, null), tabs.map(({ value }, index) => {
1427
- return /* @__PURE__ */ React40.createElement(import_ui24.TabPanel, { key: index, sx: { flexGrow: 1 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React40.createElement(import_ui24.Stack, { gap: 1, px: 2 }, value.items.map((item) => {
1895
+ return /* @__PURE__ */ React48.createElement(React48.Fragment, null, /* @__PURE__ */ React48.createElement(import_ui39.Tabs, { indicatorColor: "secondary", textColor: "secondary", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React48.createElement(import_ui39.Tab, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React48.createElement(import_ui39.Divider, null), tabs.map(({ value }, index) => {
1896
+ return /* @__PURE__ */ React48.createElement(import_ui39.TabPanel, { key: index, sx: { flexGrow: 1 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React48.createElement(import_ui39.Stack, { gap: 1, px: 2 }, value.items.map((item) => {
1428
1897
  if (item.type === "control") {
1429
- return /* @__PURE__ */ React40.createElement(Control5, { key: item.value.bind, control: item.value });
1898
+ return /* @__PURE__ */ React48.createElement(Control6, { key: item.value.bind, control: item.value });
1430
1899
  }
1431
1900
  return null;
1432
1901
  })));
1433
1902
  }));
1434
1903
  };
1435
- var Control5 = ({ control }) => {
1904
+ var Control6 = ({ control }) => {
1436
1905
  if (!getControlByType(control.type)) {
1437
1906
  return null;
1438
1907
  }
1439
- return /* @__PURE__ */ React40.createElement(DynamicControl, { bind: control.bind }, control.label ? /* @__PURE__ */ React40.createElement(ControlLabel, null, control.label) : null, /* @__PURE__ */ React40.createElement(Control, { type: control.type, props: control.props }));
1908
+ return /* @__PURE__ */ React48.createElement(DynamicControl, { bind: control.bind }, control.label ? /* @__PURE__ */ React48.createElement(ControlLabel, null, control.label) : null, /* @__PURE__ */ React48.createElement(Control, { type: control.type, props: control.props }));
1909
+ };
1910
+
1911
+ // src/dynamics/hooks/use-prop-dynamic-action.tsx
1912
+ var React49 = __toESM(require("react"));
1913
+ var import_icons12 = require("@elementor/icons");
1914
+ var import_i18n26 = require("@wordpress/i18n");
1915
+ var usePropDynamicAction = () => {
1916
+ const { bind } = useControl();
1917
+ const { elementType } = useElementContext();
1918
+ const propType = elementType.propsSchema[bind];
1919
+ const visible = !!propType && supportsDynamic(propType);
1920
+ return {
1921
+ visible,
1922
+ icon: import_icons12.DatabaseIcon,
1923
+ title: (0, import_i18n26.__)("Dynamic Tags", "elementor"),
1924
+ popoverContent: ({ closePopover }) => /* @__PURE__ */ React49.createElement(DynamicSelection, { onSelect: closePopover })
1925
+ };
1440
1926
  };
1441
1927
 
1442
1928
  // src/dynamics/init.ts
1929
+ var { registerPopoverAction } = controlActionsMenu;
1443
1930
  var init = () => {
1444
1931
  replaceControl({
1445
1932
  component: DynamicSelectionControl,
1446
1933
  condition: ({ value }) => isDynamicPropValue(value)
1447
1934
  });
1935
+ registerPopoverAction({
1936
+ id: "dynamic-tags",
1937
+ useProps: usePropDynamicAction
1938
+ });
1448
1939
  };
1449
1940
 
1450
1941
  // src/init.ts
@@ -1468,6 +1959,7 @@ var blockV1Panel = () => {
1468
1959
  init2();
1469
1960
  // Annotate the CommonJS export names for ESM import in node:
1470
1961
  0 && (module.exports = {
1962
+ controlActionsMenu,
1471
1963
  replaceControl,
1472
1964
  useControl
1473
1965
  });