@elementor/editor-editing-panel 0.19.0 → 1.0.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 (115) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/dist/index.d.mts +5 -22
  3. package/dist/index.d.ts +5 -22
  4. package/dist/index.js +1444 -1165
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +1434 -1148
  7. package/dist/index.mjs.map +1 -1
  8. package/package.json +15 -14
  9. package/src/components/accordion-section.tsx +3 -2
  10. package/src/components/add-or-remove-content.tsx +42 -0
  11. package/src/components/collapsible-field.tsx +34 -0
  12. package/src/components/editing-panel.tsx +15 -18
  13. package/src/components/settings-tab.tsx +11 -10
  14. package/src/components/style-sections/background-section/background-color-field.tsx +21 -0
  15. package/src/components/style-sections/background-section/background-section.tsx +2 -2
  16. package/src/components/style-sections/border-section/border-color-field.tsx +21 -0
  17. package/src/components/style-sections/border-section/border-field.tsx +47 -0
  18. package/src/components/style-sections/border-section/border-radius-field.tsx +48 -0
  19. package/src/components/style-sections/border-section/border-section.tsx +16 -0
  20. package/src/components/style-sections/border-section/border-style-field.tsx +32 -0
  21. package/src/components/style-sections/border-section/border-width-field.tsx +42 -0
  22. package/src/components/style-sections/effects-section/effects-section.tsx +5 -5
  23. package/src/components/style-sections/position-section/dimensions-field.tsx +46 -0
  24. package/src/components/style-sections/position-section/position-field.tsx +28 -0
  25. package/src/components/style-sections/position-section/position-section.tsx +15 -2
  26. package/src/components/style-sections/position-section/z-index-field.tsx +21 -0
  27. package/src/components/style-sections/size-section/overflow-field.tsx +45 -0
  28. package/src/components/style-sections/size-section/size-section.tsx +55 -0
  29. package/src/components/style-sections/spacing-section/spacing-section.tsx +6 -6
  30. package/src/components/style-sections/typography-section/font-size-field.tsx +21 -0
  31. package/src/components/style-sections/typography-section/{font-weight-control.tsx → font-weight-field.tsx} +7 -6
  32. package/src/components/style-sections/typography-section/letter-spacing-field.tsx +21 -0
  33. package/src/components/style-sections/typography-section/{text-alignment-control.tsx → text-alignment-field.tsx} +7 -7
  34. package/src/components/style-sections/typography-section/text-color-field.tsx +21 -0
  35. package/src/components/style-sections/typography-section/{text-direction-control.tsx → text-direction-field.tsx} +7 -7
  36. package/src/components/style-sections/typography-section/text-stroke-field.tsx +16 -0
  37. package/src/components/style-sections/typography-section/{text-style-control.tsx → text-style-field.tsx} +4 -4
  38. package/src/components/style-sections/typography-section/{transform-control.tsx → transform-field.tsx} +7 -6
  39. package/src/components/style-sections/typography-section/typography-section.tsx +20 -18
  40. package/src/components/style-sections/typography-section/word-spacing-field.tsx +21 -0
  41. package/src/components/style-tab.tsx +42 -25
  42. package/src/contexts/classes-prop-context.tsx +24 -0
  43. package/src/{controls/providers/element-provider.tsx → contexts/element-context.tsx} +3 -7
  44. package/src/contexts/style-context.tsx +8 -22
  45. package/src/control-replacement.tsx +1 -1
  46. package/src/controls/bound-prop-context.tsx +30 -0
  47. package/src/controls/components/control-toggle-button-group.tsx +15 -6
  48. package/src/controls/components/repeater.tsx +1 -1
  49. package/src/controls/components/text-field-inner-selection.tsx +20 -24
  50. package/src/controls/control-actions/control-actions-context.tsx +27 -0
  51. package/src/controls/control-actions/control-actions-menu.ts +6 -7
  52. package/src/controls/control-actions/control-actions.tsx +14 -26
  53. package/src/{components/style-sections/effects-section/box-shadow-repeater.tsx → controls/controls/box-shadow-repeater-control.tsx} +51 -65
  54. package/src/controls/controls/color-control.tsx +25 -0
  55. package/src/controls/controls/equal-unequal-sizes-control.tsx +196 -0
  56. package/src/controls/{control-types → controls}/image-control.tsx +15 -23
  57. package/src/controls/{control-types → controls}/image-media-control.tsx +5 -14
  58. package/src/{components/style-sections/spacing-section → controls/controls}/linked-dimensions-control.tsx +10 -26
  59. package/src/controls/{control-types → controls}/number-control.tsx +2 -2
  60. package/src/controls/{control-types → controls}/select-control.tsx +4 -4
  61. package/src/controls/{control-types → controls}/size-control.tsx +8 -8
  62. package/src/controls/controls/stroke-control.tsx +105 -0
  63. package/src/controls/{control-types → controls}/text-area-control.tsx +3 -3
  64. package/src/controls/{control-types → controls}/text-control.tsx +3 -3
  65. package/src/controls/{control-types → controls}/toggle-control.tsx +4 -4
  66. package/src/controls/create-control-replacement.tsx +3 -3
  67. package/src/controls/index.ts +24 -0
  68. package/src/controls-actions.ts +8 -0
  69. package/src/{controls/components → controls-registry}/control-type-container.tsx +1 -1
  70. package/src/{controls → controls-registry}/controls-registry.tsx +1 -6
  71. package/src/controls-registry/settings-field.tsx +35 -0
  72. package/src/controls-registry/styles-field.tsx +19 -0
  73. package/src/dynamics/components/dynamic-selection-control.tsx +11 -11
  74. package/src/dynamics/components/dynamic-selection.tsx +3 -3
  75. package/src/dynamics/dynamic-control.tsx +6 -5
  76. package/src/dynamics/hooks/use-dynamic-tag.ts +1 -1
  77. package/src/dynamics/hooks/use-prop-dynamic-action.tsx +6 -6
  78. package/src/dynamics/hooks/use-prop-dynamic-tags.ts +2 -2
  79. package/src/dynamics/hooks/use-prop-value-history.ts +2 -2
  80. package/src/dynamics/init.ts +1 -3
  81. package/src/dynamics/types.ts +2 -2
  82. package/src/dynamics/utils.ts +1 -2
  83. package/src/hooks/use-styles-field.ts +30 -0
  84. package/src/index.ts +2 -3
  85. package/src/sync/should-use-v2-panel.ts +1 -2
  86. package/src/sync/types.ts +3 -3
  87. package/src/components/style-sections/background-section/background-color-control.tsx +0 -20
  88. package/src/components/style-sections/position-section/z-index-control.tsx +0 -20
  89. package/src/components/style-sections/size-section.tsx +0 -49
  90. package/src/components/style-sections/typography-section/font-size-control.tsx +0 -20
  91. package/src/components/style-sections/typography-section/letter-spacing-control.tsx +0 -20
  92. package/src/components/style-sections/typography-section/text-color-control.tsx +0 -20
  93. package/src/components/style-sections/typography-section/word-spacing-control.tsx +0 -20
  94. package/src/controls/control-context.tsx +0 -22
  95. package/src/controls/control-replacement.ts +0 -34
  96. package/src/controls/control-types/color-control.tsx +0 -27
  97. package/src/controls/hooks/use-style-control.ts +0 -29
  98. package/src/controls/hooks/use-widget-settings.ts +0 -16
  99. package/src/controls/props/is-transformable.ts +0 -13
  100. package/src/controls/props/types.ts +0 -51
  101. package/src/controls/settings-control.tsx +0 -37
  102. package/src/controls/style-control.tsx +0 -20
  103. package/src/controls/sync/get-container.ts +0 -8
  104. package/src/controls/sync/update-settings.ts +0 -14
  105. package/src/controls/types.ts +0 -39
  106. package/src/hooks/use-element-style-prop.ts +0 -46
  107. package/src/hooks/use-element-styles.ts +0 -13
  108. package/src/hooks/use-element-type.ts +0 -33
  109. package/src/hooks/use-selected-elements.ts +0 -9
  110. package/src/sync/get-element-styles.ts +0 -9
  111. package/src/sync/get-selected-elements.ts +0 -21
  112. package/src/sync/get-widgets-cache.ts +0 -7
  113. package/src/sync/update-style.ts +0 -25
  114. package/src/{controls → controls-registry}/control.tsx +0 -0
  115. package/src/{controls/control-actions/actions/popover-action.tsx → popover-action.tsx} +1 -1
package/dist/index.mjs CHANGED
@@ -1,30 +1,83 @@
1
- // src/controls/create-control-replacement.tsx
1
+ // src/controls/controls/image-control.tsx
2
+ import * as React9 from "react";
3
+ import { __ as __2 } from "@wordpress/i18n";
4
+
5
+ // src/controls/bound-prop-context.tsx
2
6
  import * as React from "react";
7
+ import { createContext, useContext } from "react";
8
+ var BoundPropContext = createContext(null);
9
+ var BoundPropProvider = ({ children, value, setValue, bind }) => {
10
+ return /* @__PURE__ */ React.createElement(BoundPropContext.Provider, { value: { value, setValue, bind } }, children);
11
+ };
12
+ function useBoundProp(defaultValue) {
13
+ const boundPropContext = useContext(BoundPropContext);
14
+ if (!boundPropContext) {
15
+ throw new Error("useBoundProp must be used within a BoundPropContext");
16
+ }
17
+ return { ...boundPropContext, value: boundPropContext.value ?? defaultValue };
18
+ }
19
+
20
+ // src/controls/controls/image-control.tsx
21
+ import { Grid, Stack as Stack2 } from "@elementor/ui";
22
+
23
+ // src/controls/controls/image-media-control.tsx
24
+ import * as React6 from "react";
25
+ import { __ } from "@wordpress/i18n";
26
+ import { UploadIcon } from "@elementor/icons";
27
+ import { Button, Card, CardMedia, CardOverlay, Stack } from "@elementor/ui";
28
+ import { useWpMediaAttachment, useWpMediaFrame } from "@elementor/wp-media";
29
+
30
+ // src/controls/control-actions/control-actions.tsx
31
+ import * as React3 from "react";
32
+ import { styled, UnstableFloatingActionBar } from "@elementor/ui";
33
+
34
+ // src/controls/control-actions/control-actions-context.tsx
35
+ import * as React2 from "react";
3
36
  import { createContext as createContext2, useContext as useContext2 } from "react";
37
+ var Context = createContext2(null);
38
+ var ControlActionsProvider = ({ children, items }) => /* @__PURE__ */ React2.createElement(Context.Provider, { value: { items } }, children);
39
+ var useControlActions = () => {
40
+ const context = useContext2(Context);
41
+ if (!context) {
42
+ throw new Error("useControlActions must be used within a ControlActionsProvider");
43
+ }
44
+ return context;
45
+ };
4
46
 
5
- // src/controls/control-context.tsx
6
- import { createContext, useContext } from "react";
7
- var ControlContext = createContext(null);
8
- function useControl(defaultValue) {
9
- const controlContext = useContext(ControlContext);
10
- if (!controlContext) {
11
- throw new Error("useControl must be used within a ControlContext");
47
+ // src/controls/control-actions/control-actions.tsx
48
+ var FloatingBarContainer = styled("span")`
49
+ display: contents;
50
+
51
+ .MuiFloatingActionBar-popper:has( .MuiFloatingActionBar-actions:empty ) {
52
+ display: none;
53
+ }
54
+ `;
55
+ function ControlActions({ children }) {
56
+ const { items } = useControlActions();
57
+ if (items.length === 0) {
58
+ return children;
12
59
  }
13
- return { ...controlContext, value: controlContext.value ?? defaultValue };
60
+ const menuItems = items.map(({ MenuItem: MenuItem4, id }) => /* @__PURE__ */ React3.createElement(MenuItem4, { key: id }));
61
+ return /* @__PURE__ */ React3.createElement(FloatingBarContainer, null, /* @__PURE__ */ React3.createElement(UnstableFloatingActionBar, { actions: menuItems }, children));
14
62
  }
15
63
 
64
+ // src/controls/create-control.tsx
65
+ import * as React5 from "react";
66
+
16
67
  // src/controls/create-control-replacement.tsx
17
- var ControlReplacementContext = createContext2(void 0);
68
+ import * as React4 from "react";
69
+ import { createContext as createContext3, useContext as useContext3 } from "react";
70
+ var ControlReplacementContext = createContext3(void 0);
18
71
  var ControlReplacementProvider = ({
19
72
  component,
20
73
  condition,
21
74
  children
22
75
  }) => {
23
- return /* @__PURE__ */ React.createElement(ControlReplacementContext.Provider, { value: { component, condition } }, children);
76
+ return /* @__PURE__ */ React4.createElement(ControlReplacementContext.Provider, { value: { component, condition } }, children);
24
77
  };
25
78
  var useControlReplacement = () => {
26
- const { value } = useControl();
27
- const controlReplacement = useContext2(ControlReplacementContext);
79
+ const { value } = useBoundProp();
80
+ const controlReplacement = useContext3(ControlReplacementContext);
28
81
  let shouldReplace = false;
29
82
  try {
30
83
  shouldReplace = !!controlReplacement?.condition({ value }) && !!controlReplacement.component;
@@ -43,287 +96,22 @@ var createControlReplacement = () => {
43
96
  return { replaceControl: replaceControl2, getControlReplacement: getControlReplacement2 };
44
97
  };
45
98
 
46
- // src/control-replacement.tsx
47
- var { replaceControl, getControlReplacement } = createControlReplacement();
48
-
49
- // src/controls/control-actions/actions/popover-action.tsx
50
- import * as React2 from "react";
51
- import { bindPopover, bindToggle, IconButton, Popover, Stack, Tooltip, Typography, usePopupState } from "@elementor/ui";
52
- import { useId } from "react";
53
- import { XIcon } from "@elementor/icons";
54
- var SIZE = "tiny";
55
- function PopoverAction({
56
- title,
57
- visible = true,
58
- icon: Icon,
59
- popoverContent: PopoverContent
60
- }) {
61
- const id = useId();
62
- const popupState = usePopupState({
63
- variant: "popover",
64
- popupId: `elementor-popover-action-${id}`
65
- });
66
- if (!visible) {
67
- return null;
68
- }
69
- return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(Tooltip, { placement: "top", title }, /* @__PURE__ */ React2.createElement(IconButton, { "aria-label": title, key: id, size: SIZE, ...bindToggle(popupState) }, /* @__PURE__ */ React2.createElement(Icon, { fontSize: SIZE }))), /* @__PURE__ */ React2.createElement(
70
- Popover,
71
- {
72
- disablePortal: true,
73
- disableScrollLock: true,
74
- anchorOrigin: {
75
- vertical: "bottom",
76
- horizontal: "center"
77
- },
78
- ...bindPopover(popupState)
79
- },
80
- /* @__PURE__ */ React2.createElement(Stack, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React2.createElement(Icon, { fontSize: SIZE, sx: { mr: 0.5 } }), /* @__PURE__ */ React2.createElement(Typography, { variant: "subtitle2" }, title), /* @__PURE__ */ React2.createElement(IconButton, { sx: { ml: "auto" }, size: SIZE, onClick: popupState.close }, /* @__PURE__ */ React2.createElement(XIcon, { fontSize: SIZE }))),
81
- /* @__PURE__ */ React2.createElement(PopoverContent, { closePopover: popupState.close })
82
- ));
83
- }
84
-
85
- // src/controls/control-actions/control-actions-menu.ts
86
- import { createMenu } from "@elementor/menus";
87
- var controlActionsMenu = createMenu({
88
- components: {
89
- PopoverAction
90
- }
91
- });
92
-
93
- // src/panel.ts
94
- import { __createPanel as createPanel } from "@elementor/editor-panels";
95
-
96
- // src/components/editing-panel.tsx
97
- import * as React49 from "react";
98
- import { __ as __25 } from "@wordpress/i18n";
99
-
100
- // src/hooks/use-selected-elements.ts
101
- import { __privateUseListenTo as useListenTo, commandEndEvent } from "@elementor/editor-v1-adapters";
102
-
103
- // src/sync/get-selected-elements.ts
104
- function getSelectedElements() {
105
- const extendedWindow = window;
106
- const selectedElements = extendedWindow.elementor?.selection?.getElements?.() ?? [];
107
- return selectedElements.reduce((acc, el) => {
108
- const type = el.model.get("widgetType") || el.model.get("elType");
109
- if (type) {
110
- acc.push({
111
- id: el.model.get("id"),
112
- type
113
- });
114
- }
115
- return acc;
116
- }, []);
117
- }
118
-
119
- // src/hooks/use-selected-elements.ts
120
- function useSelectedElements() {
121
- return useListenTo(
122
- [commandEndEvent("document/elements/select"), commandEndEvent("document/elements/deselect")],
123
- () => getSelectedElements()
124
- );
125
- }
126
-
127
- // src/components/editing-panel.tsx
128
- import { Panel, PanelBody, PanelHeader, PanelHeaderTitle } from "@elementor/editor-panels";
129
-
130
- // src/controls/providers/element-provider.tsx
131
- import * as React3 from "react";
132
- import { createContext as createContext3, useContext as useContext3 } from "react";
133
- var Context = createContext3(null);
134
- function ElementProvider({ children, element, elementType }) {
135
- return /* @__PURE__ */ React3.createElement(Context.Provider, { value: { element, elementType } }, children);
136
- }
137
- function useElement() {
138
- const context = useContext3(Context);
139
- if (!context) {
140
- throw new Error("useElement must be used within a ElementProvider");
141
- }
142
- return context;
143
- }
144
-
145
- // src/hooks/use-element-type.ts
146
- import { __privateUseListenTo as useListenTo2, commandEndEvent as commandEndEvent2 } from "@elementor/editor-v1-adapters";
147
-
148
- // src/sync/get-widgets-cache.ts
149
- function getWidgetsCache() {
150
- const extendedWindow = window;
151
- return extendedWindow?.elementor?.widgetsCache || null;
152
- }
153
-
154
- // src/hooks/use-element-type.ts
155
- function useElementType(type) {
156
- return useListenTo2(
157
- commandEndEvent2("editor/documents/load"),
158
- () => {
159
- if (!type) {
160
- return null;
161
- }
162
- const widgetsCache = getWidgetsCache();
163
- const elementType = widgetsCache?.[type];
164
- if (!elementType?.atomic_controls) {
165
- return null;
166
- }
167
- if (!elementType?.atomic_props_schema) {
168
- return null;
169
- }
170
- return {
171
- key: type,
172
- controls: elementType.atomic_controls,
173
- propsSchema: elementType.atomic_props_schema,
174
- title: elementType.title
175
- };
176
- },
177
- [type]
178
- );
179
- }
180
-
181
- // src/components/editing-panel-tabs.tsx
182
- import { Stack as Stack17, Tabs, Tab, TabPanel, useTabs } from "@elementor/ui";
183
- import * as React47 from "react";
184
- import { __ as __24 } from "@wordpress/i18n";
185
-
186
- // src/components/settings-tab.tsx
187
- import * as React18 from "react";
188
- import { Stack as Stack5 } from "@elementor/ui";
189
-
190
- // src/controls/settings-control.tsx
191
- import * as React5 from "react";
192
-
193
- // src/controls/hooks/use-widget-settings.ts
194
- import { commandEndEvent as commandEndEvent3, __privateUseListenTo as useListenTo3 } from "@elementor/editor-v1-adapters";
195
-
196
- // src/controls/sync/get-container.ts
197
- function getContainer(id) {
198
- const extendedWindow = window;
199
- const container = extendedWindow.elementor?.getContainer?.(id);
200
- return container ?? null;
201
- }
202
-
203
- // src/controls/hooks/use-widget-settings.ts
204
- var useWidgetSettings = ({ id, bind }) => {
205
- return useListenTo3(
206
- commandEndEvent3("document/elements/settings"),
207
- () => {
208
- const container = getContainer(id);
209
- const value = container?.settings?.get(bind) ?? null;
210
- return value;
211
- },
212
- [id, bind]
213
- );
214
- };
215
-
216
- // src/controls/sync/update-settings.ts
217
- import { __privateRunCommand as runCommand } from "@elementor/editor-v1-adapters";
218
- var updateSettings = ({ id, props }) => {
219
- const container = getContainer(id);
220
- runCommand("document/elements/settings", {
221
- container,
222
- settings: {
223
- ...props
224
- }
225
- });
226
- };
227
-
228
- // src/components/control-label.tsx
229
- import * as React4 from "react";
230
- import { Typography as Typography2 } from "@elementor/ui";
231
- var ControlLabel = ({ children }) => {
232
- return /* @__PURE__ */ React4.createElement(Typography2, { component: "label", variant: "caption", color: "text.secondary" }, children);
233
- };
234
-
235
- // src/controls/settings-control.tsx
236
- var SettingsControl = ({ bind, children }) => {
237
- const { element, elementType } = useElement();
238
- const defaultValue = elementType.propsSchema[bind]?.default;
239
- const settingsValue = useWidgetSettings({ id: element.id, bind });
240
- const value = settingsValue ?? defaultValue ?? null;
241
- const setValue = (newValue) => {
242
- updateSettings({
243
- id: element.id,
244
- props: {
245
- [bind]: newValue
246
- }
247
- });
248
- };
249
- return /* @__PURE__ */ React5.createElement(ControlContext.Provider, { value: { setValue, value, bind } }, children);
250
- };
251
- SettingsControl.Label = ControlLabel;
252
-
253
- // src/components/accordion-section.tsx
254
- import * as React6 from "react";
255
- import { useId as useId2 } from "react";
256
- import { Accordion, AccordionSummary, AccordionDetails, AccordionSummaryText, Stack as Stack2 } from "@elementor/ui";
257
- var AccordionSection = ({ title, children }) => {
258
- const uid = useId2();
259
- const labelId = `label-${uid}`;
260
- const contentId = `content-${uid}`;
261
- return /* @__PURE__ */ React6.createElement(Accordion, { disableGutters: true, defaultExpanded: true }, /* @__PURE__ */ React6.createElement(AccordionSummary, { "aria-controls": contentId, id: labelId }, /* @__PURE__ */ React6.createElement(AccordionSummaryText, { primaryTypographyProps: { variant: "caption" } }, title)), /* @__PURE__ */ React6.createElement(AccordionDetails, { id: contentId, "aria-labelledby": labelId }, /* @__PURE__ */ React6.createElement(Stack2, { gap: 2.5 }, children)));
262
- };
263
-
264
- // src/controls/control.tsx
265
- import * as React16 from "react";
266
- import { createError } from "@elementor/utils";
267
-
268
- // src/controls/control-types/image-control.tsx
269
- import * as React11 from "react";
270
- import { Grid, Stack as Stack4 } from "@elementor/ui";
271
- import { __ as __2 } from "@wordpress/i18n";
272
-
273
- // src/controls/control-types/image-media-control.tsx
274
- import * as React9 from "react";
275
- import { Button, Card, CardMedia, CardOverlay, Stack as Stack3 } from "@elementor/ui";
276
- import { UploadIcon } from "@elementor/icons";
277
- import { useWpMediaAttachment, useWpMediaFrame } from "@elementor/wp-media";
278
- import { __ } from "@wordpress/i18n";
279
-
280
- // src/controls/control-actions/control-actions.tsx
281
- import * as React7 from "react";
282
- import { styled, UnstableFloatingActionBar } from "@elementor/ui";
283
- var { useMenuItems } = controlActionsMenu;
284
- var FloatingBar = styled(UnstableFloatingActionBar)`
285
- & .MuiPaper-root:empty {
286
- display: none;
287
- }
288
-
289
- // this is for a fix which would be added later on - to force the width externally
290
- width: 100%;
291
- & > :first-of-type {
292
- width: 100%;
293
- }
294
- `;
295
- function ControlActions({ fullWidth = false, children }) {
296
- const items = useMenuItems().default;
297
- if (items.length === 0) {
298
- return children;
299
- }
300
- return /* @__PURE__ */ React7.createElement(
301
- FloatingBar,
302
- {
303
- actions: items.map(({ MenuItem: MenuItem4, id }) => /* @__PURE__ */ React7.createElement(MenuItem4, { key: id })),
304
- sx: fullWidth ? { width: "100%" } : void 0
305
- },
306
- children
307
- );
308
- }
309
-
310
99
  // src/controls/create-control.tsx
311
- import * as React8 from "react";
312
100
  import { ErrorBoundary } from "@elementor/ui";
313
101
  var brandSymbol = Symbol("control");
314
102
  function createControl(Component, { supportsReplacements = true } = {}) {
315
103
  return (props) => {
316
104
  const ControlReplacement = useControlReplacement();
317
105
  if (ControlReplacement && supportsReplacements) {
318
- return /* @__PURE__ */ React8.createElement(ErrorBoundary, { fallback: null }, /* @__PURE__ */ React8.createElement(ControlReplacement, { ...props }));
106
+ return /* @__PURE__ */ React5.createElement(ErrorBoundary, { fallback: null }, /* @__PURE__ */ React5.createElement(ControlReplacement, { ...props }));
319
107
  }
320
- return /* @__PURE__ */ React8.createElement(ErrorBoundary, { fallback: null }, /* @__PURE__ */ React8.createElement(Component, { ...props }));
108
+ return /* @__PURE__ */ React5.createElement(ErrorBoundary, { fallback: null }, /* @__PURE__ */ React5.createElement(Component, { ...props }));
321
109
  };
322
110
  }
323
111
 
324
- // src/controls/control-types/image-media-control.tsx
112
+ // src/controls/controls/image-media-control.tsx
325
113
  var ImageMediaControl = createControl(() => {
326
- const { value, setValue } = useControl();
114
+ const { value, setValue } = useBoundProp();
327
115
  const { id, url } = value?.value ?? {};
328
116
  const { data: attachment } = useWpMediaAttachment(id?.value || null);
329
117
  const src = attachment?.url ?? url;
@@ -344,7 +132,7 @@ var ImageMediaControl = createControl(() => {
344
132
  });
345
133
  }
346
134
  });
347
- return /* @__PURE__ */ React9.createElement(Card, { variant: "outlined" }, /* @__PURE__ */ React9.createElement(CardMedia, { image: src, sx: { height: 150 } }), /* @__PURE__ */ React9.createElement(CardOverlay, null, /* @__PURE__ */ React9.createElement(ControlActions, null, /* @__PURE__ */ React9.createElement(Stack3, { gap: 0.5 }, /* @__PURE__ */ React9.createElement(
135
+ return /* @__PURE__ */ React6.createElement(Card, { variant: "outlined" }, /* @__PURE__ */ React6.createElement(CardMedia, { image: src, sx: { height: 150 } }), /* @__PURE__ */ React6.createElement(CardOverlay, null, /* @__PURE__ */ React6.createElement(ControlActions, null, /* @__PURE__ */ React6.createElement(Stack, { gap: 0.5 }, /* @__PURE__ */ React6.createElement(
348
136
  Button,
349
137
  {
350
138
  size: "tiny",
@@ -353,33 +141,40 @@ var ImageMediaControl = createControl(() => {
353
141
  onClick: () => open({ mode: "browse" })
354
142
  },
355
143
  __("Select Image", "elementor")
356
- ), /* @__PURE__ */ React9.createElement(
144
+ ), /* @__PURE__ */ React6.createElement(
357
145
  Button,
358
146
  {
359
147
  size: "tiny",
360
148
  variant: "text",
361
149
  color: "inherit",
362
- startIcon: /* @__PURE__ */ React9.createElement(UploadIcon, null),
150
+ startIcon: /* @__PURE__ */ React6.createElement(UploadIcon, null),
363
151
  onClick: () => open({ mode: "upload" })
364
152
  },
365
153
  __("Upload Image", "elementor")
366
154
  )))));
367
155
  });
368
156
 
369
- // src/controls/control-types/select-control.tsx
370
- import * as React10 from "react";
157
+ // src/controls/controls/select-control.tsx
158
+ import * as React7 from "react";
371
159
  import { MenuItem, Select } from "@elementor/ui";
372
- var SelectControl = createControl(({ options: options4 }) => {
373
- const { value, setValue } = useControl();
160
+ var SelectControl = createControl(({ options: options5 }) => {
161
+ const { value, setValue } = useBoundProp();
374
162
  const handleChange = (event) => {
375
163
  setValue(event.target.value);
376
164
  };
377
- return /* @__PURE__ */ React10.createElement(ControlActions, null, /* @__PURE__ */ React10.createElement(Select, { size: "tiny", value: value ?? "", onChange: handleChange }, options4.map(({ label, ...props }) => /* @__PURE__ */ React10.createElement(MenuItem, { key: props.value, ...props }, label))));
165
+ return /* @__PURE__ */ React7.createElement(ControlActions, null, /* @__PURE__ */ React7.createElement(Select, { displayEmpty: true, size: "tiny", value: value ?? "", onChange: handleChange, fullWidth: true }, options5.map(({ label, ...props }) => /* @__PURE__ */ React7.createElement(MenuItem, { key: props.value, ...props }, label))));
378
166
  });
379
167
 
380
- // src/controls/control-types/image-control.tsx
168
+ // src/components/control-label.tsx
169
+ import * as React8 from "react";
170
+ import { Typography } from "@elementor/ui";
171
+ var ControlLabel = ({ children }) => {
172
+ return /* @__PURE__ */ React8.createElement(Typography, { component: "label", variant: "caption", color: "text.secondary" }, children);
173
+ };
174
+
175
+ // src/controls/controls/image-control.tsx
381
176
  var ImageControl = createControl((props) => {
382
- const { value, setValue } = useControl();
177
+ const { value, setValue } = useBoundProp();
383
178
  const { src, size } = value?.value || {};
384
179
  const setImageSrc = (newValue) => {
385
180
  setValue({
@@ -399,27 +194,27 @@ var ImageControl = createControl((props) => {
399
194
  }
400
195
  });
401
196
  };
402
- return /* @__PURE__ */ React11.createElement(Stack4, { gap: 2 }, /* @__PURE__ */ React11.createElement(ControlContext.Provider, { value: { setValue: setImageSrc, value: src, bind: "src" } }, /* @__PURE__ */ React11.createElement(ImageMediaControl, null)), /* @__PURE__ */ React11.createElement(ControlContext.Provider, { value: { setValue: setImageSize, value: size, bind: "size" } }, /* @__PURE__ */ React11.createElement(Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React11.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React11.createElement(SettingsControl.Label, null, " ", __2("Image Resolution", "elementor"))), /* @__PURE__ */ React11.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React11.createElement(SelectControl, { options: props.sizes })))));
197
+ return /* @__PURE__ */ React9.createElement(Stack2, { gap: 2 }, /* @__PURE__ */ React9.createElement(BoundPropProvider, { value: src, setValue: setImageSrc, bind: "src" }, /* @__PURE__ */ React9.createElement(ImageMediaControl, null)), /* @__PURE__ */ React9.createElement(BoundPropProvider, { value: size, setValue: setImageSize, bind: "size" }, /* @__PURE__ */ React9.createElement(Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React9.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React9.createElement(ControlLabel, null, " ", __2("Image Resolution", "elementor"))), /* @__PURE__ */ React9.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React9.createElement(SelectControl, { options: props.sizes })))));
403
198
  });
404
199
 
405
- // src/controls/control-types/text-control.tsx
406
- import * as React12 from "react";
200
+ // src/controls/controls/text-control.tsx
201
+ import * as React10 from "react";
407
202
  import { TextField } from "@elementor/ui";
408
203
  var TextControl = createControl(({ placeholder }) => {
409
- const { value, setValue } = useControl("");
204
+ const { value, setValue } = useBoundProp("");
410
205
  const handleChange = (event) => setValue(event.target.value);
411
- return /* @__PURE__ */ React12.createElement(ControlActions, { fullWidth: true }, /* @__PURE__ */ React12.createElement(TextField, { type: "text", size: "tiny", value, onChange: handleChange, placeholder }));
206
+ return /* @__PURE__ */ React10.createElement(ControlActions, null, /* @__PURE__ */ React10.createElement(TextField, { type: "text", size: "tiny", value, onChange: handleChange, placeholder }));
412
207
  });
413
208
 
414
- // src/controls/control-types/text-area-control.tsx
415
- import * as React13 from "react";
209
+ // src/controls/controls/text-area-control.tsx
210
+ import * as React11 from "react";
416
211
  import { TextField as TextField2 } from "@elementor/ui";
417
212
  var TextAreaControl = createControl(({ placeholder }) => {
418
- const { value, setValue } = useControl();
213
+ const { value, setValue } = useBoundProp();
419
214
  const handleChange = (event) => {
420
215
  setValue(event.target.value);
421
216
  };
422
- return /* @__PURE__ */ React13.createElement(ControlActions, { fullWidth: true }, /* @__PURE__ */ React13.createElement(
217
+ return /* @__PURE__ */ React11.createElement(ControlActions, null, /* @__PURE__ */ React11.createElement(
423
218
  TextField2,
424
219
  {
425
220
  size: "tiny",
@@ -433,8 +228,8 @@ var TextAreaControl = createControl(({ placeholder }) => {
433
228
  ));
434
229
  });
435
230
 
436
- // src/controls/control-types/size-control.tsx
437
- import * as React15 from "react";
231
+ // src/controls/controls/size-control.tsx
232
+ import * as React13 from "react";
438
233
  import { InputAdornment as InputAdornment2 } from "@elementor/ui";
439
234
 
440
235
  // src/controls/hooks/use-sync-external-state.tsx
@@ -471,46 +266,42 @@ var useSyncExternalState = ({
471
266
  };
472
267
 
473
268
  // src/controls/components/text-field-inner-selection.tsx
474
- import * as React14 from "react";
475
- import { useId as useId3 } from "react";
476
- import { bindMenu, bindTrigger, Button as Button2, InputAdornment, Menu, MenuItem as MenuItem2, TextField as TextField3, usePopupState as usePopupState2 } from "@elementor/ui";
477
- var TextFieldInnerSelection = ({
478
- placeholder,
479
- type,
480
- value,
481
- onChange,
482
- endAdornment,
483
- startAdornment
484
- }) => {
485
- return /* @__PURE__ */ React14.createElement(
486
- TextField3,
487
- {
488
- size: "tiny",
489
- type,
490
- value,
491
- onChange,
492
- placeholder,
493
- InputProps: {
494
- endAdornment,
495
- startAdornment
269
+ import * as React12 from "react";
270
+ import { forwardRef, useId } from "react";
271
+ import { bindMenu, bindTrigger, Button as Button2, InputAdornment, Menu, MenuItem as MenuItem2, TextField as TextField3, usePopupState } from "@elementor/ui";
272
+ var TextFieldInnerSelection = forwardRef(
273
+ ({ placeholder, type, value, onChange, endAdornment, startAdornment }, ref) => {
274
+ return /* @__PURE__ */ React12.createElement(
275
+ TextField3,
276
+ {
277
+ size: "tiny",
278
+ type,
279
+ value,
280
+ onChange,
281
+ placeholder,
282
+ InputProps: {
283
+ endAdornment,
284
+ startAdornment
285
+ },
286
+ ref
496
287
  }
497
- }
498
- );
499
- };
288
+ );
289
+ }
290
+ );
500
291
  var SelectionEndAdornment = ({
501
- options: options4,
292
+ options: options5,
502
293
  onClick,
503
294
  value
504
295
  }) => {
505
- const popupState = usePopupState2({
296
+ const popupState = usePopupState({
506
297
  variant: "popover",
507
- popupId: useId3()
298
+ popupId: useId()
508
299
  });
509
300
  const handleMenuItemClick = (index) => {
510
- onClick(options4[index]);
301
+ onClick(options5[index]);
511
302
  popupState.close();
512
303
  };
513
- return /* @__PURE__ */ React14.createElement(InputAdornment, { position: "end" }, /* @__PURE__ */ React14.createElement(
304
+ return /* @__PURE__ */ React12.createElement(InputAdornment, { position: "end" }, /* @__PURE__ */ React12.createElement(
514
305
  Button2,
515
306
  {
516
307
  size: "small",
@@ -519,13 +310,13 @@ var SelectionEndAdornment = ({
519
310
  ...bindTrigger(popupState)
520
311
  },
521
312
  value.toUpperCase()
522
- ), /* @__PURE__ */ React14.createElement(Menu, { MenuListProps: { dense: true }, ...bindMenu(popupState) }, options4.map((option, index) => /* @__PURE__ */ React14.createElement(MenuItem2, { key: option, onClick: () => handleMenuItemClick(index) }, option.toUpperCase()))));
313
+ ), /* @__PURE__ */ React12.createElement(Menu, { MenuListProps: { dense: true }, ...bindMenu(popupState) }, options5.map((option, index) => /* @__PURE__ */ React12.createElement(MenuItem2, { key: option, onClick: () => handleMenuItemClick(index) }, option.toUpperCase()))));
523
314
  };
524
315
 
525
- // src/controls/control-types/size-control.tsx
526
- var defaultUnits = ["px", "%", "em", "rem", "vw"];
527
- var SizeControl = createControl(({ units = defaultUnits, placeholder, startIcon }) => {
528
- const { value, setValue } = useControl();
316
+ // src/controls/controls/size-control.tsx
317
+ var defaultUnits = ["px", "%", "em", "rem", "vw", "vh"];
318
+ var SizeControl = createControl(({ units: units2 = defaultUnits, placeholder, startIcon }) => {
319
+ const { value, setValue } = useBoundProp();
529
320
  const [state, setState] = useSyncExternalState({
530
321
  external: value,
531
322
  setExternal: setValue,
@@ -554,12 +345,12 @@ var SizeControl = createControl(({ units = defaultUnits, placeholder, startIcon
554
345
  }
555
346
  }));
556
347
  };
557
- return /* @__PURE__ */ React15.createElement(ControlActions, null, /* @__PURE__ */ React15.createElement(
348
+ return /* @__PURE__ */ React13.createElement(ControlActions, null, /* @__PURE__ */ React13.createElement(
558
349
  TextFieldInnerSelection,
559
350
  {
560
- endAdornment: /* @__PURE__ */ React15.createElement(SelectionEndAdornment, { options: units, onClick: handleUnitChange, value: state.value.unit }),
351
+ endAdornment: /* @__PURE__ */ React13.createElement(SelectionEndAdornment, { options: units2, onClick: handleUnitChange, value: state.value.unit }),
561
352
  placeholder,
562
- startAdornment: startIcon ?? /* @__PURE__ */ React15.createElement(InputAdornment2, { position: "start" }, startIcon),
353
+ startAdornment: startIcon ?? /* @__PURE__ */ React13.createElement(InputAdornment2, { position: "start" }, startIcon),
563
354
  type: "number",
564
355
  value: Number.isNaN(state.value.size) ? "" : state.value.size,
565
356
  onChange: handleSizeChange
@@ -567,43 +358,564 @@ var SizeControl = createControl(({ units = defaultUnits, placeholder, startIcon
567
358
  ));
568
359
  });
569
360
 
570
- // src/controls/controls-registry.tsx
571
- var controlTypes = {
572
- image: { component: ImageControl, layout: "full" },
573
- text: { component: TextControl, layout: "two-columns" },
574
- textarea: { component: TextAreaControl, layout: "full" },
575
- size: { component: SizeControl, layout: "two-columns" },
576
- select: { component: SelectControl, layout: "two-columns" }
577
- };
578
- var getControlByType = (type) => controlTypes[type]?.component;
579
- var getLayoutByType = (type) => controlTypes[type].layout;
361
+ // src/controls/controls/stroke-control.tsx
362
+ import * as React15 from "react";
363
+ import { __ as __3 } from "@wordpress/i18n";
364
+ import { Grid as Grid2, Stack as Stack3 } from "@elementor/ui";
580
365
 
581
- // src/controls/control.tsx
582
- var ControlTypeError = createError({
583
- code: "CONTROL_TYPE_NOT_FOUND",
584
- message: `Control type not found.`
585
- });
586
- var Control = ({ props, type }) => {
587
- const ControlByType = getControlByType(type);
588
- if (!ControlByType) {
589
- throw new ControlTypeError({
590
- context: { type }
591
- });
366
+ // src/controls/controls/color-control.tsx
367
+ import * as React14 from "react";
368
+ import { UnstableColorField } from "@elementor/ui";
369
+ var ColorControl = createControl(
370
+ (props) => {
371
+ const { value, setValue } = useBoundProp();
372
+ const handleChange = (selectedColor) => {
373
+ setValue({
374
+ $$type: "color",
375
+ value: selectedColor
376
+ });
377
+ };
378
+ return /* @__PURE__ */ React14.createElement(ControlActions, null, /* @__PURE__ */ React14.createElement(UnstableColorField, { size: "tiny", ...props, value: value?.value, onChange: handleChange }));
592
379
  }
593
- return /* @__PURE__ */ React16.createElement(ControlByType, { ...props });
380
+ );
381
+
382
+ // src/controls/controls/stroke-control.tsx
383
+ var defaultStrokeControlValue = {
384
+ $$type: "stroke",
385
+ value: {
386
+ color: {
387
+ $$type: "color",
388
+ value: "#000000"
389
+ },
390
+ width: {
391
+ $$type: "size",
392
+ value: {
393
+ unit: "px",
394
+ size: NaN
395
+ }
396
+ }
397
+ }
398
+ };
399
+ var units = ["px", "em", "rem"];
400
+ var StrokeControl = createControl(() => {
401
+ const { value, setValue } = useBoundProp(defaultStrokeControlValue);
402
+ const setStrokeWidth = (newValue) => {
403
+ const updatedValue = {
404
+ ...value?.value ?? defaultStrokeControlValue.value,
405
+ width: newValue
406
+ };
407
+ setValue({
408
+ $$type: "stroke",
409
+ value: updatedValue
410
+ });
411
+ };
412
+ const setStrokeColor = (newValue) => {
413
+ const updatedValue = {
414
+ ...value?.value ?? defaultStrokeControlValue.value,
415
+ color: newValue
416
+ };
417
+ setValue({
418
+ $$type: "stroke",
419
+ value: updatedValue
420
+ });
421
+ };
422
+ return /* @__PURE__ */ React15.createElement(Stack3, { gap: 1.5 }, /* @__PURE__ */ React15.createElement(
423
+ Control,
424
+ {
425
+ bind: "width",
426
+ label: __3("Stroke Width", "elementor"),
427
+ value: value?.value.width ?? defaultStrokeControlValue.value.width,
428
+ setValue: setStrokeWidth
429
+ },
430
+ /* @__PURE__ */ React15.createElement(SizeControl, { units })
431
+ ), /* @__PURE__ */ React15.createElement(
432
+ Control,
433
+ {
434
+ bind: "color",
435
+ label: __3("Stroke Color", "elementor"),
436
+ value: value?.value.color ?? defaultStrokeControlValue.value.color,
437
+ setValue: setStrokeColor
438
+ },
439
+ /* @__PURE__ */ React15.createElement(ColorControl, null)
440
+ ));
441
+ });
442
+ var Control = ({
443
+ bind,
444
+ value,
445
+ setValue,
446
+ label,
447
+ children
448
+ }) => /* @__PURE__ */ React15.createElement(BoundPropProvider, { bind, value, setValue }, /* @__PURE__ */ React15.createElement(Grid2, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React15.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React15.createElement(ControlLabel, null, label)), /* @__PURE__ */ React15.createElement(Grid2, { item: true, xs: 6 }, children)));
449
+
450
+ // src/controls/controls/box-shadow-repeater-control.tsx
451
+ import * as React17 from "react";
452
+ import { __ as __5 } from "@wordpress/i18n";
453
+ import { Grid as Grid3, Stack as Stack5, Typography as Typography3, UnstableColorIndicator } from "@elementor/ui";
454
+
455
+ // src/controls/components/repeater.tsx
456
+ import * as React16 from "react";
457
+ import { useId as useId2, useRef, useState as useState2 } from "react";
458
+ import { __ as __4 } from "@wordpress/i18n";
459
+ import { PlusIcon, XIcon, CopyIcon, EyeIcon, EyeOffIcon } from "@elementor/icons";
460
+ import {
461
+ Box,
462
+ Stack as Stack4,
463
+ Popover,
464
+ IconButton,
465
+ bindTrigger as bindTrigger2,
466
+ bindPopover,
467
+ usePopupState as usePopupState2,
468
+ UnstableTag,
469
+ Typography as Typography2
470
+ } from "@elementor/ui";
471
+ var SIZE = "tiny";
472
+ var Repeater = ({
473
+ label,
474
+ itemSettings,
475
+ values: repeaterValues = [],
476
+ setValues: setRepeaterValues
477
+ }) => {
478
+ const addRepeaterItem = () => {
479
+ const newItem = structuredClone(itemSettings.initialValues);
480
+ setRepeaterValues([...repeaterValues, newItem]);
481
+ };
482
+ const duplicateRepeaterItem = (index) => {
483
+ setRepeaterValues([
484
+ ...repeaterValues.slice(0, index),
485
+ structuredClone(repeaterValues[index]),
486
+ ...repeaterValues.slice(index)
487
+ ]);
488
+ };
489
+ const removeRepeaterItem = (index) => {
490
+ setRepeaterValues(repeaterValues.filter((_, i) => i !== index));
491
+ };
492
+ const toggleDisableRepeaterItem = (index) => {
493
+ setRepeaterValues(
494
+ repeaterValues.map((value, i) => {
495
+ if (i === index) {
496
+ const { disabled, ...rest } = value;
497
+ return { ...rest, ...disabled ? {} : { disabled: true } };
498
+ }
499
+ return value;
500
+ })
501
+ );
502
+ };
503
+ return /* @__PURE__ */ React16.createElement(Stack4, null, /* @__PURE__ */ React16.createElement(Stack4, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { pb: 1 } }, /* @__PURE__ */ React16.createElement(Typography2, { component: "label", variant: "caption", color: "text.secondary" }, label), /* @__PURE__ */ React16.createElement(IconButton, { size: SIZE, onClick: addRepeaterItem, "aria-label": __4("Add item", "elementor") }, /* @__PURE__ */ React16.createElement(PlusIcon, { fontSize: SIZE }))), /* @__PURE__ */ React16.createElement(Stack4, { gap: 1 }, repeaterValues.map((value, index) => /* @__PURE__ */ React16.createElement(
504
+ RepeaterItem,
505
+ {
506
+ key: index,
507
+ disabled: value.disabled,
508
+ label: /* @__PURE__ */ React16.createElement(itemSettings.Label, { value }),
509
+ startIcon: /* @__PURE__ */ React16.createElement(itemSettings.Icon, { value }),
510
+ removeItem: () => removeRepeaterItem(index),
511
+ duplicateItem: () => duplicateRepeaterItem(index),
512
+ toggleDisableItem: () => toggleDisableRepeaterItem(index)
513
+ },
514
+ (props) => /* @__PURE__ */ React16.createElement(
515
+ itemSettings.Content,
516
+ {
517
+ ...props,
518
+ value,
519
+ setValue: (newValue) => setRepeaterValues(
520
+ repeaterValues.map((item, i) => i === index ? newValue : item)
521
+ )
522
+ }
523
+ )
524
+ ))));
525
+ };
526
+ var RepeaterItem = ({
527
+ label,
528
+ disabled,
529
+ startIcon,
530
+ children,
531
+ removeItem,
532
+ duplicateItem,
533
+ toggleDisableItem
534
+ }) => {
535
+ const popupId = useId2();
536
+ const tagRef = useRef(null);
537
+ const [anchorEl, setAnchorEl] = useState2(null);
538
+ const popoverState = usePopupState2({ popupId, variant: "popover" });
539
+ const popoverProps = bindPopover(popoverState);
540
+ return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(
541
+ UnstableTag,
542
+ {
543
+ ref: tagRef,
544
+ label,
545
+ showActionsOnHover: true,
546
+ variant: "outlined",
547
+ "aria-label": __4("Open item", "elementor"),
548
+ ...bindTrigger2(popoverState),
549
+ startIcon,
550
+ actions: /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(
551
+ IconButton,
552
+ {
553
+ size: SIZE,
554
+ onClick: duplicateItem,
555
+ "aria-label": __4("Duplicate item", "elementor")
556
+ },
557
+ /* @__PURE__ */ React16.createElement(CopyIcon, { fontSize: SIZE })
558
+ ), /* @__PURE__ */ React16.createElement(
559
+ IconButton,
560
+ {
561
+ size: SIZE,
562
+ onClick: toggleDisableItem,
563
+ "aria-label": disabled ? __4("Enable item", "elementor") : __4("Disable item", "elementor")
564
+ },
565
+ disabled ? /* @__PURE__ */ React16.createElement(EyeOffIcon, { fontSize: SIZE }) : /* @__PURE__ */ React16.createElement(EyeIcon, { fontSize: SIZE })
566
+ ), /* @__PURE__ */ React16.createElement(
567
+ IconButton,
568
+ {
569
+ size: SIZE,
570
+ onClick: removeItem,
571
+ "aria-label": __4("Remove item", "elementor")
572
+ },
573
+ /* @__PURE__ */ React16.createElement(XIcon, { fontSize: SIZE })
574
+ ))
575
+ }
576
+ ), /* @__PURE__ */ React16.createElement(
577
+ Popover,
578
+ {
579
+ disablePortal: true,
580
+ slotProps: {
581
+ paper: { ref: setAnchorEl, sx: { width: tagRef.current?.getBoundingClientRect().width } }
582
+ },
583
+ anchorOrigin: { vertical: "bottom", horizontal: "left" },
584
+ ...popoverProps
585
+ },
586
+ /* @__PURE__ */ React16.createElement(Box, { p: 2 }, children({ anchorEl }))
587
+ ));
588
+ };
589
+
590
+ // src/controls/controls/box-shadow-repeater-control.tsx
591
+ var BoxShadowRepeaterControl = createControl(() => {
592
+ const { value, setValue } = useBoundProp();
593
+ const boxShadowValues = value?.value;
594
+ const setBoxShadow = (newValue) => {
595
+ setValue({
596
+ $$type: "box-shadow",
597
+ value: newValue
598
+ });
599
+ };
600
+ return /* @__PURE__ */ React17.createElement(
601
+ Repeater,
602
+ {
603
+ values: boxShadowValues,
604
+ setValues: setBoxShadow,
605
+ label: __5("Box shadow", "elementor"),
606
+ itemSettings: {
607
+ Icon: ItemIcon,
608
+ Label: ItemLabel,
609
+ Content: ItemContent,
610
+ initialValues: initialShadow
611
+ }
612
+ }
613
+ );
614
+ });
615
+ var ItemIcon = ({ value }) => /* @__PURE__ */ React17.createElement(UnstableColorIndicator, { size: "inherit", component: "span", value: value.value.color.value });
616
+ var ItemContent = ({
617
+ value,
618
+ setValue
619
+ }) => {
620
+ const setShadow = (newValue) => {
621
+ setValue({
622
+ $$type: "shadow",
623
+ value: newValue
624
+ });
625
+ };
626
+ return /* @__PURE__ */ React17.createElement(Stack5, { gap: 1.5 }, /* @__PURE__ */ React17.createElement(Grid3, { container: true, spacing: 1 }, /* @__PURE__ */ React17.createElement(
627
+ Control2,
628
+ {
629
+ bind: "color",
630
+ value: value.value.color,
631
+ label: __5("Color", "elementor"),
632
+ setValue: (v) => setShadow({ ...value.value, color: v })
633
+ },
634
+ /* @__PURE__ */ React17.createElement(ColorControl, null)
635
+ ), /* @__PURE__ */ React17.createElement(
636
+ Control2,
637
+ {
638
+ bind: "position",
639
+ value: value.value.position,
640
+ label: __5("Position", "elementor"),
641
+ setValue: (v) => setShadow({ ...value.value, position: v || null })
642
+ },
643
+ /* @__PURE__ */ React17.createElement(
644
+ SelectControl,
645
+ {
646
+ options: [
647
+ { label: __5("Inset", "elementor"), value: "inset" },
648
+ { label: __5("Outset", "elementor"), value: "" }
649
+ ]
650
+ }
651
+ )
652
+ )), /* @__PURE__ */ React17.createElement(Grid3, { container: true, spacing: 1 }, /* @__PURE__ */ React17.createElement(
653
+ Control2,
654
+ {
655
+ bind: "hOffset",
656
+ label: __5("Horizontal", "elementor"),
657
+ value: value.value.hOffset,
658
+ setValue: (v) => setShadow({ ...value.value, hOffset: v })
659
+ },
660
+ /* @__PURE__ */ React17.createElement(SizeControl, null)
661
+ ), /* @__PURE__ */ React17.createElement(
662
+ Control2,
663
+ {
664
+ bind: "vOffset",
665
+ label: __5("Vertical", "elementor"),
666
+ value: value.value.vOffset,
667
+ setValue: (v) => setShadow({ ...value.value, vOffset: v })
668
+ },
669
+ /* @__PURE__ */ React17.createElement(SizeControl, null)
670
+ )), /* @__PURE__ */ React17.createElement(Grid3, { container: true, spacing: 1 }, /* @__PURE__ */ React17.createElement(
671
+ Control2,
672
+ {
673
+ bind: "blur",
674
+ value: value.value.blur,
675
+ label: __5("Blur", "elementor"),
676
+ setValue: (v) => setShadow({ ...value.value, blur: v })
677
+ },
678
+ /* @__PURE__ */ React17.createElement(SizeControl, null)
679
+ ), /* @__PURE__ */ React17.createElement(
680
+ Control2,
681
+ {
682
+ bind: "spread",
683
+ label: __5("Spread", "elementor"),
684
+ value: value.value.spread,
685
+ setValue: (v) => setShadow({ ...value.value, spread: v })
686
+ },
687
+ /* @__PURE__ */ React17.createElement(SizeControl, null)
688
+ )));
689
+ };
690
+ var Control2 = ({
691
+ value,
692
+ setValue,
693
+ label,
694
+ bind,
695
+ children
696
+ }) => /* @__PURE__ */ React17.createElement(BoundPropProvider, { value, setValue, bind }, /* @__PURE__ */ React17.createElement(Grid3, { item: true, xs: 6 }, /* @__PURE__ */ React17.createElement(Grid3, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React17.createElement(Grid3, { item: true, xs: 12 }, /* @__PURE__ */ React17.createElement(Typography3, { component: "label", variant: "caption", color: "text.secondary" }, label)), /* @__PURE__ */ React17.createElement(Grid3, { item: true, xs: 12 }, children))));
697
+ var ItemLabel = ({ value }) => {
698
+ const { position, hOffset, vOffset, blur, spread } = value.value;
699
+ const { size: blurSize = "", unit: blurUnit = "" } = blur?.value || {};
700
+ const { size: spreadSize = "", unit: spreadUnit = "" } = spread?.value || {};
701
+ const { size: hOffsetSize = "unset", unit: hOffsetUnit = "" } = hOffset?.value || {};
702
+ const { size: vOffsetSize = "unset", unit: vOffsetUnit = "" } = vOffset?.value || {};
703
+ const sizes = [
704
+ hOffsetSize + hOffsetUnit,
705
+ vOffsetSize + vOffsetUnit,
706
+ blurSize + blurUnit,
707
+ spreadSize + spreadUnit
708
+ ].join(" ");
709
+ return /* @__PURE__ */ React17.createElement("span", { style: { textTransform: "capitalize" } }, position ?? "outset", ": ", sizes);
710
+ };
711
+ var initialShadow = {
712
+ $$type: "shadow",
713
+ value: {
714
+ hOffset: {
715
+ $$type: "size",
716
+ value: { unit: "px", size: 0 }
717
+ },
718
+ vOffset: {
719
+ $$type: "size",
720
+ value: { unit: "px", size: 0 }
721
+ },
722
+ blur: {
723
+ $$type: "size",
724
+ value: { unit: "px", size: 10 }
725
+ },
726
+ spread: {
727
+ $$type: "size",
728
+ value: { unit: "px", size: 0 }
729
+ },
730
+ color: {
731
+ $$type: "color",
732
+ value: "rgba(0, 0, 0, 1)"
733
+ },
734
+ position: null
735
+ }
736
+ };
737
+
738
+ // src/controls/controls/toggle-control.tsx
739
+ import * as React19 from "react";
740
+
741
+ // src/controls/components/control-toggle-button-group.tsx
742
+ import * as React18 from "react";
743
+ import { styled as styled2, ToggleButton, ToggleButtonGroup, Tooltip } from "@elementor/ui";
744
+ var StyledToggleButtonGroup = styled2(ToggleButtonGroup)`
745
+ ${({ justify }) => `justify-content: ${justify};`}
746
+ `;
747
+ var ControlToggleButtonGroup = ({
748
+ justify = "end",
749
+ size = "tiny",
750
+ value,
751
+ onChange,
752
+ items,
753
+ exclusive = false
754
+ }) => {
755
+ const handleChange = (_, newValue) => {
756
+ onChange(newValue);
757
+ };
758
+ return /* @__PURE__ */ React18.createElement(StyledToggleButtonGroup, { justify, value, onChange: handleChange, exclusive }, items.map(
759
+ ({ label, value: buttonValue, icon: Icon, showTooltip }) => showTooltip ? /* @__PURE__ */ React18.createElement(Tooltip, { title: label, disableFocusListener: true, placement: "top", key: buttonValue }, /* @__PURE__ */ React18.createElement(ToggleButton, { value: buttonValue, "aria-label": label, size }, /* @__PURE__ */ React18.createElement(Icon, { fontSize: size }))) : /* @__PURE__ */ React18.createElement(ToggleButton, { key: buttonValue, value: buttonValue, "aria-label": label, size }, /* @__PURE__ */ React18.createElement(Icon, { fontSize: size }))
760
+ ));
761
+ };
762
+
763
+ // src/controls/controls/toggle-control.tsx
764
+ var ToggleControl = createControl(({ options: options5 }) => {
765
+ const { value, setValue } = useBoundProp();
766
+ const handleToggle = (option) => {
767
+ setValue(option);
768
+ };
769
+ return /* @__PURE__ */ React19.createElement(
770
+ ControlToggleButtonGroup,
771
+ {
772
+ items: options5,
773
+ value: value || null,
774
+ onChange: handleToggle,
775
+ exclusive: true
776
+ }
777
+ );
778
+ });
779
+
780
+ // src/controls/controls/number-control.tsx
781
+ import * as React20 from "react";
782
+ import { TextField as TextField4 } from "@elementor/ui";
783
+ var isEmptyOrNaN = (value) => value === void 0 || value === "" || Number.isNaN(Number(value));
784
+ var NumberControl = createControl(({ placeholder }) => {
785
+ const { value, setValue } = useBoundProp();
786
+ const handleChange = (event) => {
787
+ const eventValue = event.target.value;
788
+ setValue(isEmptyOrNaN(eventValue) ? void 0 : Number(eventValue));
789
+ };
790
+ return /* @__PURE__ */ React20.createElement(ControlActions, null, /* @__PURE__ */ React20.createElement(
791
+ TextField4,
792
+ {
793
+ size: "tiny",
794
+ type: "number",
795
+ value: isEmptyOrNaN(value) ? "" : value,
796
+ onChange: handleChange,
797
+ placeholder
798
+ }
799
+ ));
800
+ });
801
+
802
+ // src/controls/control-actions/control-actions-menu.ts
803
+ import { createMenu } from "@elementor/menus";
804
+ var createControlActionsMenu = ({ components }) => {
805
+ return createMenu({
806
+ components
807
+ });
594
808
  };
595
809
 
596
- // src/controls/components/control-type-container.tsx
597
- import * as React17 from "react";
598
- import { styled as styled2, Box } from "@elementor/ui";
810
+ // src/control-replacement.tsx
811
+ var { replaceControl, getControlReplacement } = createControlReplacement();
812
+
813
+ // src/panel.ts
814
+ import { __createPanel as createPanel } from "@elementor/editor-panels";
815
+
816
+ // src/components/editing-panel.tsx
817
+ import * as React66 from "react";
818
+ import { __ as __38 } from "@wordpress/i18n";
819
+ import { useSelectedElement } from "@elementor/editor-elements";
820
+ import { Panel, PanelBody, PanelHeader, PanelHeaderTitle } from "@elementor/editor-panels";
821
+
822
+ // src/components/editing-panel-tabs.tsx
823
+ import { Stack as Stack22, Tabs, Tab, TabPanel, useTabs } from "@elementor/ui";
824
+ import * as React63 from "react";
825
+ import { __ as __37 } from "@wordpress/i18n";
826
+
827
+ // src/components/settings-tab.tsx
828
+ import * as React26 from "react";
829
+ import { Stack as Stack7 } from "@elementor/ui";
830
+
831
+ // src/controls-registry/settings-field.tsx
832
+ import * as React22 from "react";
833
+ import { useElementSetting, updateSettings } from "@elementor/editor-elements";
834
+
835
+ // src/contexts/element-context.tsx
836
+ import * as React21 from "react";
837
+ import { createContext as createContext4, useContext as useContext4 } from "react";
838
+ var Context2 = createContext4(null);
839
+ function ElementProvider({ children, element, elementType }) {
840
+ return /* @__PURE__ */ React21.createElement(Context2.Provider, { value: { element, elementType } }, children);
841
+ }
842
+ function useElement() {
843
+ const context = useContext4(Context2);
844
+ if (!context) {
845
+ throw new Error("useElement must be used within a ElementProvider");
846
+ }
847
+ return context;
848
+ }
849
+
850
+ // src/controls-registry/settings-field.tsx
851
+ var SettingsField = ({ bind, children }) => {
852
+ const { element, elementType } = useElement();
853
+ const defaultValue = elementType.propsSchema[bind]?.default;
854
+ const settingsValue = useElementSetting({ id: element.id, bind });
855
+ const value = settingsValue ?? defaultValue ?? null;
856
+ const setValue = (newValue) => {
857
+ updateSettings({
858
+ id: element.id,
859
+ props: {
860
+ [bind]: newValue
861
+ }
862
+ });
863
+ };
864
+ return /* @__PURE__ */ React22.createElement(BoundPropProvider, { setValue, value, bind }, children);
865
+ };
866
+
867
+ // src/components/accordion-section.tsx
868
+ import * as React23 from "react";
869
+ import { useId as useId3 } from "react";
870
+ import { Accordion, AccordionSummary, AccordionDetails, AccordionSummaryText, Stack as Stack6 } from "@elementor/ui";
871
+ var AccordionSection = ({ title, children, defaultExpanded = false }) => {
872
+ const uid = useId3();
873
+ const labelId = `label-${uid}`;
874
+ const contentId = `content-${uid}`;
875
+ return /* @__PURE__ */ React23.createElement(Accordion, { disableGutters: true, defaultExpanded }, /* @__PURE__ */ React23.createElement(AccordionSummary, { "aria-controls": contentId, id: labelId }, /* @__PURE__ */ React23.createElement(AccordionSummaryText, { primaryTypographyProps: { variant: "caption" } }, title)), /* @__PURE__ */ React23.createElement(AccordionDetails, { id: contentId, "aria-labelledby": labelId }, /* @__PURE__ */ React23.createElement(Stack6, { gap: 2.5 }, children)));
876
+ };
877
+
878
+ // src/controls-registry/control.tsx
879
+ import * as React24 from "react";
880
+ import { createError } from "@elementor/utils";
881
+
882
+ // src/controls-registry/controls-registry.tsx
883
+ var controlTypes = {
884
+ image: { component: ImageControl, layout: "full" },
885
+ text: { component: TextControl, layout: "two-columns" },
886
+ textarea: { component: TextAreaControl, layout: "full" },
887
+ size: { component: SizeControl, layout: "two-columns" },
888
+ select: { component: SelectControl, layout: "two-columns" }
889
+ };
890
+ var getControlByType = (type) => controlTypes[type]?.component;
891
+ var getLayoutByType = (type) => controlTypes[type].layout;
892
+
893
+ // src/controls-registry/control.tsx
894
+ var ControlTypeError = createError({
895
+ code: "CONTROL_TYPE_NOT_FOUND",
896
+ message: `Control type not found.`
897
+ });
898
+ var Control3 = ({ props, type }) => {
899
+ const ControlByType = getControlByType(type);
900
+ if (!ControlByType) {
901
+ throw new ControlTypeError({
902
+ context: { type }
903
+ });
904
+ }
905
+ return /* @__PURE__ */ React24.createElement(ControlByType, { ...props });
906
+ };
907
+
908
+ // src/controls-registry/control-type-container.tsx
909
+ import * as React25 from "react";
910
+ import { styled as styled3, Box as Box2 } from "@elementor/ui";
599
911
  var ControlTypeContainer = ({
600
912
  controlType,
601
913
  children
602
914
  }) => {
603
915
  const layout = getLayoutByType(controlType);
604
- return /* @__PURE__ */ React17.createElement(StyledContainer, { layout }, children);
916
+ return /* @__PURE__ */ React25.createElement(StyledContainer, { layout }, children);
605
917
  };
606
- var StyledContainer = styled2(Box, {
918
+ var StyledContainer = styled3(Box2, {
607
919
  shouldForwardProp: (prop) => !["layout"].includes(prop)
608
920
  })(({ layout, theme }) => ({
609
921
  display: "grid",
@@ -621,14 +933,14 @@ var getGridLayout = (layout) => ({
621
933
  // src/components/settings-tab.tsx
622
934
  var SettingsTab = () => {
623
935
  const { elementType } = useElement();
624
- return /* @__PURE__ */ React18.createElement(Stack5, null, elementType.controls.map(({ type, value }, index) => {
936
+ return /* @__PURE__ */ React26.createElement(Stack7, null, elementType.controls.map(({ type, value }, index) => {
625
937
  if (type === "control") {
626
- return /* @__PURE__ */ React18.createElement(Control2, { key: value.bind, control: value });
938
+ return /* @__PURE__ */ React26.createElement(Control4, { key: value.bind, control: value });
627
939
  }
628
940
  if (type === "section") {
629
- return /* @__PURE__ */ React18.createElement(AccordionSection, { key: type + "." + index, title: value.label }, value.items?.map((item) => {
941
+ return /* @__PURE__ */ React26.createElement(AccordionSection, { key: type + "." + index, title: value.label, defaultExpanded: true }, value.items?.map((item) => {
630
942
  if (item.type === "control") {
631
- return /* @__PURE__ */ React18.createElement(Control2, { key: item.value.bind, control: item.value });
943
+ return /* @__PURE__ */ React26.createElement(Control4, { key: item.value.bind, control: item.value });
632
944
  }
633
945
  return null;
634
946
  }));
@@ -636,169 +948,154 @@ var SettingsTab = () => {
636
948
  return null;
637
949
  }));
638
950
  };
639
- var Control2 = ({ control }) => {
951
+ var Control4 = ({ control }) => {
640
952
  if (!getControlByType(control.type)) {
641
953
  return null;
642
954
  }
643
- return /* @__PURE__ */ React18.createElement(SettingsControl, { bind: control.bind }, /* @__PURE__ */ React18.createElement(ControlTypeContainer, { controlType: control.type }, control.label ? /* @__PURE__ */ React18.createElement(SettingsControl.Label, null, control.label) : null, /* @__PURE__ */ React18.createElement(Control, { type: control.type, props: control.props })));
955
+ return /* @__PURE__ */ React26.createElement(SettingsField, { bind: control.bind }, /* @__PURE__ */ React26.createElement(ControlTypeContainer, { controlType: control.type }, control.label ? /* @__PURE__ */ React26.createElement(ControlLabel, null, control.label) : null, /* @__PURE__ */ React26.createElement(Control3, { type: control.type, props: control.props })));
644
956
  };
645
957
 
646
958
  // src/components/style-tab.tsx
647
- import * as React46 from "react";
959
+ import * as React62 from "react";
960
+ import { useState as useState5 } from "react";
961
+ import { Stack as Stack21 } from "@elementor/ui";
962
+ import { generateId } from "@elementor/editor-styles";
963
+ import { useActiveBreakpoint } from "@elementor/editor-responsive";
964
+ import { getElementStyles, getElementSetting } from "@elementor/editor-elements";
648
965
 
649
966
  // src/contexts/style-context.tsx
650
- import * as React19 from "react";
651
- import { createContext as createContext4, useContext as useContext4 } from "react";
652
- import { useActiveBreakpoint } from "@elementor/editor-responsive";
653
- var Context2 = createContext4(null);
654
- function StyleContext({ children, selectedStyleDef, selectedClassesProp }) {
655
- const breakpoint = useActiveBreakpoint();
656
- const selectedMeta = { breakpoint, state: null };
657
- return /* @__PURE__ */ React19.createElement(Context2.Provider, { value: { selectedStyleDef, selectedMeta, selectedClassesProp } }, children);
967
+ import * as React27 from "react";
968
+ import { createContext as createContext5, useContext as useContext5 } from "react";
969
+ var Context3 = createContext5(null);
970
+ function StyleProvider({ children, id, meta }) {
971
+ return /* @__PURE__ */ React27.createElement(Context3.Provider, { value: { id, meta } }, children);
658
972
  }
659
- function useStyleContext() {
660
- const context = useContext4(Context2);
973
+ function useStyle() {
974
+ const context = useContext5(Context3);
661
975
  if (!context) {
662
976
  throw new Error("UseStyleContext must be used within a StyleContextProvider");
663
977
  }
664
978
  return context;
665
979
  }
666
980
 
667
- // src/hooks/use-element-styles.ts
668
- import { __privateUseListenTo as useListenTo4, commandEndEvent as commandEndEvent4 } from "@elementor/editor-v1-adapters";
669
-
670
- // src/sync/get-element-styles.ts
671
- var getElementStyles = (elementID) => {
672
- const container = getContainer(elementID);
673
- return container?.model.get("styles") || null;
674
- };
675
-
676
- // src/hooks/use-element-styles.ts
677
- var useElementStyles = (elementID) => {
678
- return useListenTo4(
679
- commandEndEvent4("document/atomic-widgets/styles"),
680
- () => {
681
- return getElementStyles(elementID);
682
- },
683
- [elementID]
684
- );
685
- };
981
+ // src/components/style-sections/size-section/size-section.tsx
982
+ import * as React31 from "react";
983
+ import { Divider, Grid as Grid5, Stack as Stack8 } from "@elementor/ui";
984
+ import { __ as __7 } from "@wordpress/i18n";
686
985
 
687
- // src/components/style-tab.tsx
688
- import { Stack as Stack16 } from "@elementor/ui";
986
+ // src/components/style-sections/size-section/overflow-field.tsx
987
+ import * as React30 from "react";
988
+ import { __ as __6 } from "@wordpress/i18n";
989
+ import { Grid as Grid4 } from "@elementor/ui";
990
+ import { EyeIcon as EyeIcon2, EyeOffIcon as EyeOffIcon2, ExpandBottomIcon } from "@elementor/icons";
689
991
 
690
- // src/components/style-sections/size-section.tsx
691
- import * as React21 from "react";
992
+ // src/controls-registry/styles-field.tsx
993
+ import * as React29 from "react";
692
994
 
693
- // src/controls/style-control.tsx
694
- import * as React20 from "react";
995
+ // src/hooks/use-styles-field.ts
996
+ import { useElementStyleProp, updateStyle } from "@elementor/editor-elements";
695
997
 
696
- // src/hooks/use-element-style-prop.ts
697
- import { commandEndEvent as commandEndEvent5, __privateUseListenTo as useListenTo5 } from "@elementor/editor-v1-adapters";
698
- var useElementStyleProp = ({
699
- elementID,
700
- styleDefID,
701
- meta,
702
- propName
703
- }) => {
704
- return useListenTo5(
705
- commandEndEvent5("document/atomic-widgets/styles"),
706
- () => {
707
- if (!styleDefID) {
708
- return null;
709
- }
710
- const styleDef = getElementStyles(elementID)?.[styleDefID];
711
- if (!styleDef) {
712
- return null;
713
- }
714
- const variant = getVariantByMeta(styleDef, meta);
715
- return variant?.props[propName] ?? null;
716
- },
717
- [elementID, styleDefID, propName, meta]
718
- );
719
- };
720
- function getVariantByMeta(styleDef, meta) {
721
- return styleDef.variants.find((variant) => {
722
- return variant.meta.breakpoint === meta.breakpoint && variant.meta.state === meta.state;
723
- });
998
+ // src/contexts/classes-prop-context.tsx
999
+ import * as React28 from "react";
1000
+ import { createContext as createContext6, useContext as useContext6 } from "react";
1001
+ var Context4 = createContext6(null);
1002
+ function ClassesPropProvider({ children, prop }) {
1003
+ return /* @__PURE__ */ React28.createElement(Context4.Provider, { value: { prop } }, children);
1004
+ }
1005
+ function useClassesProp() {
1006
+ const context = useContext6(Context4);
1007
+ if (!context) {
1008
+ throw new Error("useClassesProp must be used within a ClassesPropProvider");
1009
+ }
1010
+ return context.prop;
724
1011
  }
725
1012
 
726
- // src/sync/update-style.ts
727
- import { __privateRunCommand as runCommand2 } from "@elementor/editor-v1-adapters";
728
- var updateStyle = ({ elementID, styleDefID, meta, props, bind }) => {
729
- const container = getContainer(elementID);
730
- runCommand2("document/atomic-widgets/styles", {
731
- container,
732
- styleDefID,
733
- bind,
734
- meta,
735
- props
736
- });
737
- };
738
-
739
- // src/controls/hooks/use-style-control.ts
740
- var useStyleControl = (propName) => {
1013
+ // src/hooks/use-styles-field.ts
1014
+ var useStylesField = (propName) => {
741
1015
  const { element } = useElement();
742
- const { selectedStyleDef, selectedMeta, selectedClassesProp } = useStyleContext();
1016
+ const { id, meta } = useStyle();
1017
+ const classesProp = useClassesProp();
743
1018
  const value = useElementStyleProp({
744
1019
  elementID: element.id,
745
- styleDefID: selectedStyleDef?.id,
746
- meta: selectedMeta,
1020
+ styleDefID: id,
1021
+ meta,
747
1022
  propName
748
1023
  });
749
1024
  const setValue = (newValue) => {
750
1025
  updateStyle({
751
1026
  elementID: element.id,
752
- styleDefID: selectedStyleDef?.id,
1027
+ styleDefID: id,
753
1028
  props: { [propName]: newValue },
754
- meta: selectedMeta,
755
- bind: selectedClassesProp
1029
+ meta,
1030
+ bind: classesProp
756
1031
  });
757
1032
  };
758
1033
  return [value, setValue];
759
1034
  };
760
1035
 
761
- // src/controls/style-control.tsx
762
- var StyleControl = ({ bind, children }) => {
763
- const [value, setValue] = useStyleControl(bind);
764
- return /* @__PURE__ */ React20.createElement(ControlContext.Provider, { value: { bind, value, setValue } }, children);
1036
+ // src/controls-registry/styles-field.tsx
1037
+ var StylesField = ({ bind, children }) => {
1038
+ const [value, setValue] = useStylesField(bind);
1039
+ return /* @__PURE__ */ React29.createElement(BoundPropProvider, { setValue, value, bind }, children);
765
1040
  };
766
- StyleControl.Label = ControlLabel;
767
1041
 
768
- // src/components/style-sections/size-section.tsx
769
- import { Grid as Grid2, Stack as Stack6 } from "@elementor/ui";
770
- import { __ as __3 } from "@wordpress/i18n";
1042
+ // src/components/style-sections/size-section/overflow-field.tsx
1043
+ var options = [
1044
+ {
1045
+ value: "visible",
1046
+ label: __6("Visible", "elementor"),
1047
+ icon: EyeIcon2,
1048
+ showTooltip: true
1049
+ },
1050
+ {
1051
+ value: "hidden",
1052
+ label: __6("Hidden", "elementor"),
1053
+ icon: EyeOffIcon2,
1054
+ showTooltip: true
1055
+ },
1056
+ {
1057
+ value: "auto",
1058
+ label: __6("Auto", "elementor"),
1059
+ icon: ExpandBottomIcon,
1060
+ showTooltip: true
1061
+ }
1062
+ ];
1063
+ var OverflowField = () => {
1064
+ return /* @__PURE__ */ React30.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React30.createElement(Grid4, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React30.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(ControlLabel, null, __6("Overflow", "elementor"))), /* @__PURE__ */ React30.createElement(Grid4, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React30.createElement(ToggleControl, { options }))));
1065
+ };
1066
+
1067
+ // src/components/style-sections/size-section/size-section.tsx
771
1068
  var SizeSection = () => {
772
- return /* @__PURE__ */ React21.createElement(AccordionSection, { title: __3("Size", "elementor") }, /* @__PURE__ */ React21.createElement(Stack6, { gap: 1.5 }, /* @__PURE__ */ React21.createElement(Grid2, { container: true, spacing: 2 }, /* @__PURE__ */ React21.createElement(Control3, { bind: "width", label: __3("Width", "elementor") }), /* @__PURE__ */ React21.createElement(Control3, { bind: "height", label: __3("Height", "elementor") })), /* @__PURE__ */ React21.createElement(Grid2, { container: true, spacing: 2 }, /* @__PURE__ */ React21.createElement(Control3, { bind: "min-width", label: __3("Min. Width", "elementor") }), /* @__PURE__ */ React21.createElement(Control3, { bind: "min-height", label: __3("Min. Height", "elementor") })), /* @__PURE__ */ React21.createElement(Grid2, { container: true, spacing: 2 }, /* @__PURE__ */ React21.createElement(Control3, { bind: "max-width", label: __3("Max. Width", "elementor") }), /* @__PURE__ */ React21.createElement(Control3, { bind: "max-height", label: __3("Max. Height", "elementor") }))));
1069
+ return /* @__PURE__ */ React31.createElement(AccordionSection, { title: __7("Size", "elementor") }, /* @__PURE__ */ React31.createElement(Stack8, { gap: 1.5 }, /* @__PURE__ */ React31.createElement(Grid5, { container: true, spacing: 2 }, /* @__PURE__ */ React31.createElement(SizeField, { bind: "width", label: __7("Width", "elementor") }), /* @__PURE__ */ React31.createElement(SizeField, { bind: "height", label: __7("Height", "elementor") })), /* @__PURE__ */ React31.createElement(Grid5, { container: true, spacing: 2 }, /* @__PURE__ */ React31.createElement(SizeField, { bind: "min-width", label: __7("Min. Width", "elementor") }), /* @__PURE__ */ React31.createElement(SizeField, { bind: "min-height", label: __7("Min. Height", "elementor") })), /* @__PURE__ */ React31.createElement(Grid5, { container: true, spacing: 2 }, /* @__PURE__ */ React31.createElement(SizeField, { bind: "max-width", label: __7("Max. Width", "elementor") }), /* @__PURE__ */ React31.createElement(SizeField, { bind: "max-height", label: __7("Max. Height", "elementor") })), /* @__PURE__ */ React31.createElement(Divider, null), /* @__PURE__ */ React31.createElement(Stack8, null, /* @__PURE__ */ React31.createElement(OverflowField, null))));
773
1070
  };
774
- var Control3 = ({ label, bind }) => {
775
- return /* @__PURE__ */ React21.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React21.createElement(StyleControl, { bind }, /* @__PURE__ */ React21.createElement(Grid2, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React21.createElement(Grid2, { item: true, xs: 12 }, /* @__PURE__ */ React21.createElement(StyleControl.Label, null, label)), /* @__PURE__ */ React21.createElement(Grid2, { item: true, xs: 12 }, /* @__PURE__ */ React21.createElement(Control, { type: "size" })))));
1071
+ var SizeField = ({ label, bind }) => {
1072
+ return /* @__PURE__ */ React31.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(StylesField, { bind }, /* @__PURE__ */ React31.createElement(Grid5, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React31.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(ControlLabel, null, label)), /* @__PURE__ */ React31.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(SizeControl, null)))));
776
1073
  };
777
1074
 
778
1075
  // src/components/style-sections/typography-section/typography-section.tsx
779
- import * as React35 from "react";
780
- import { Divider, Stack as Stack8 } from "@elementor/ui";
1076
+ import * as React44 from "react";
1077
+ import { Divider as Divider2, Stack as Stack11 } from "@elementor/ui";
781
1078
 
782
- // src/components/style-sections/typography-section/text-style-control.tsx
783
- import * as React22 from "react";
784
- import { __ as __4 } from "@wordpress/i18n";
785
- import { Grid as Grid3, ToggleButton as ToggleButtonBase, ToggleButtonGroup } from "@elementor/ui";
1079
+ // src/components/style-sections/typography-section/text-style-field.tsx
1080
+ import * as React32 from "react";
1081
+ import { __ as __8 } from "@wordpress/i18n";
1082
+ import { Grid as Grid6, ToggleButton as ToggleButtonBase, ToggleButtonGroup as ToggleButtonGroup2 } from "@elementor/ui";
786
1083
  import { ItalicIcon, StrikethroughIcon, UnderlineIcon } from "@elementor/icons";
787
1084
  var buttonSize = "tiny";
788
- var TextStyleControl = () => {
789
- const [fontStyle, setFontStyle] = useStyleControl("font-style");
790
- const [textDecoration, setTextDecoration] = useStyleControl("text-decoration");
1085
+ var TextStyleField = () => {
1086
+ const [fontStyle, setFontStyle] = useStylesField("font-style");
1087
+ const [textDecoration, setTextDecoration] = useStylesField("text-decoration");
791
1088
  const formats = [fontStyle, ...(textDecoration || "").split(" ")];
792
- return /* @__PURE__ */ React22.createElement(Grid3, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React22.createElement(Grid3, { item: true, xs: 6 }, /* @__PURE__ */ React22.createElement(ControlLabel, null, __4("Style", "elementor"))), /* @__PURE__ */ React22.createElement(Grid3, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React22.createElement(ToggleButtonGroup, { value: formats }, /* @__PURE__ */ React22.createElement(
793
- ToggleButton,
1089
+ return /* @__PURE__ */ React32.createElement(Grid6, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React32.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(ControlLabel, null, __8("Style", "elementor"))), /* @__PURE__ */ React32.createElement(Grid6, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React32.createElement(ToggleButtonGroup2, { value: formats }, /* @__PURE__ */ React32.createElement(
1090
+ ToggleButton2,
794
1091
  {
795
1092
  value: "italic",
796
1093
  onChange: (v) => setFontStyle(fontStyle === v ? null : v),
797
1094
  "aria-label": "italic",
798
1095
  sx: { marginLeft: "auto" }
799
1096
  },
800
- /* @__PURE__ */ React22.createElement(ItalicIcon, { fontSize: buttonSize })
801
- ), /* @__PURE__ */ React22.createElement(
1097
+ /* @__PURE__ */ React32.createElement(ItalicIcon, { fontSize: buttonSize })
1098
+ ), /* @__PURE__ */ React32.createElement(
802
1099
  ShorthandControl,
803
1100
  {
804
1101
  value: "line-through",
@@ -806,8 +1103,8 @@ var TextStyleControl = () => {
806
1103
  updateValues: setTextDecoration,
807
1104
  "aria-label": "line-through"
808
1105
  },
809
- /* @__PURE__ */ React22.createElement(StrikethroughIcon, { fontSize: buttonSize })
810
- ), /* @__PURE__ */ React22.createElement(
1106
+ /* @__PURE__ */ React32.createElement(StrikethroughIcon, { fontSize: buttonSize })
1107
+ ), /* @__PURE__ */ React32.createElement(
811
1108
  ShorthandControl,
812
1109
  {
813
1110
  value: "underline",
@@ -815,7 +1112,7 @@ var TextStyleControl = () => {
815
1112
  updateValues: setTextDecoration,
816
1113
  "aria-label": "underline"
817
1114
  },
818
- /* @__PURE__ */ React22.createElement(UnderlineIcon, { fontSize: buttonSize })
1115
+ /* @__PURE__ */ React32.createElement(UnderlineIcon, { fontSize: buttonSize })
819
1116
  ))));
820
1117
  };
821
1118
  var ShorthandControl = ({
@@ -834,95 +1131,77 @@ var ShorthandControl = ({
834
1131
  updateValues([...valuesArr, newValue].join(" "));
835
1132
  }
836
1133
  };
837
- return /* @__PURE__ */ React22.createElement(ToggleButton, { value, onChange: toggleValue, selected, "aria-label": ariaLabel }, children);
1134
+ return /* @__PURE__ */ React32.createElement(ToggleButton2, { value, onChange: toggleValue, selected, "aria-label": ariaLabel }, children);
838
1135
  };
839
- var ToggleButton = ({ onChange, ...props }) => {
1136
+ var ToggleButton2 = ({ onChange, ...props }) => {
840
1137
  const handleChange = (_e, newValue) => {
841
1138
  onChange(newValue);
842
1139
  };
843
- return /* @__PURE__ */ React22.createElement(ToggleButtonBase, { ...props, onChange: handleChange, size: buttonSize });
1140
+ return /* @__PURE__ */ React32.createElement(ToggleButtonBase, { ...props, onChange: handleChange, size: buttonSize });
844
1141
  };
845
1142
 
846
1143
  // src/components/style-sections/typography-section/typography-section.tsx
847
- import { __ as __14 } from "@wordpress/i18n";
1144
+ import { __ as __20 } from "@wordpress/i18n";
848
1145
 
849
- // src/components/style-sections/typography-section/font-size-control.tsx
850
- import * as React23 from "react";
851
- import { __ as __5 } from "@wordpress/i18n";
852
- import { Grid as Grid4 } from "@elementor/ui";
853
- var FontSizeControl = () => {
854
- return /* @__PURE__ */ React23.createElement(StyleControl, { bind: "font-size" }, /* @__PURE__ */ React23.createElement(Grid4, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React23.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React23.createElement(StyleControl.Label, null, __5("Font Size", "elementor"))), /* @__PURE__ */ React23.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React23.createElement(SizeControl, null))));
1146
+ // src/components/style-sections/typography-section/font-size-field.tsx
1147
+ import * as React33 from "react";
1148
+ import { __ as __9 } from "@wordpress/i18n";
1149
+ import { Grid as Grid7 } from "@elementor/ui";
1150
+ var FontSizeField = () => {
1151
+ return /* @__PURE__ */ React33.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React33.createElement(Grid7, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React33.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(ControlLabel, null, __9("Font Size", "elementor"))), /* @__PURE__ */ React33.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(SizeControl, null))));
855
1152
  };
856
1153
 
857
- // src/components/style-sections/typography-section/font-weight-control.tsx
858
- import * as React24 from "react";
859
- import { __ as __6 } from "@wordpress/i18n";
860
- import { Grid as Grid5 } from "@elementor/ui";
1154
+ // src/components/style-sections/typography-section/font-weight-field.tsx
1155
+ import * as React34 from "react";
1156
+ import { __ as __10 } from "@wordpress/i18n";
1157
+ import { Grid as Grid8 } from "@elementor/ui";
861
1158
  var fontWeightOptions = [
862
- { label: __6("Light - 400", "elementor"), value: "400" },
863
- { label: __6("Regular - 500", "elementor"), value: "500" },
864
- { label: __6("Semi Bold - 600", "elementor"), value: "600" },
865
- { label: __6("Bold - 700", "elementor"), value: "700" },
866
- { label: __6("Black - 900", "elementor"), value: "900" }
1159
+ { label: __10("Light - 400", "elementor"), value: "400" },
1160
+ { label: __10("Regular - 500", "elementor"), value: "500" },
1161
+ { label: __10("Semi Bold - 600", "elementor"), value: "600" },
1162
+ { label: __10("Bold - 700", "elementor"), value: "700" },
1163
+ { label: __10("Black - 900", "elementor"), value: "900" }
867
1164
  ];
868
- var FontWeightControl = () => {
869
- return /* @__PURE__ */ React24.createElement(StyleControl, { bind: "font-weight" }, /* @__PURE__ */ React24.createElement(Grid5, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React24.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React24.createElement(StyleControl.Label, null, __6("Font Weight", "elementor"))), /* @__PURE__ */ React24.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React24.createElement(SelectControl, { options: fontWeightOptions }))));
1165
+ var FontWeightField = () => {
1166
+ return /* @__PURE__ */ React34.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React34.createElement(Grid8, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React34.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(ControlLabel, null, __10("Font Weight", "elementor"))), /* @__PURE__ */ React34.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(SelectControl, { options: fontWeightOptions }))));
870
1167
  };
871
1168
 
872
- // src/components/style-sections/typography-section/text-color-control.tsx
873
- import * as React26 from "react";
874
- import { __ as __7 } from "@wordpress/i18n";
875
- import { Grid as Grid6 } from "@elementor/ui";
876
-
877
- // src/controls/control-types/color-control.tsx
878
- import * as React25 from "react";
879
- import { UnstableColorPicker } from "@elementor/ui";
880
- var ColorControl = createControl(
881
- (props) => {
882
- const { value, setValue } = useControl();
883
- const handleChange = (selectedColor) => {
884
- setValue({
885
- $$type: "color",
886
- value: selectedColor
887
- });
888
- };
889
- return /* @__PURE__ */ React25.createElement(ControlActions, null, /* @__PURE__ */ React25.createElement(UnstableColorPicker, { size: "tiny", ...props, value: value?.value, onChange: handleChange }));
890
- }
891
- );
892
-
893
- // src/components/style-sections/typography-section/text-color-control.tsx
894
- var TextColorControl = () => {
895
- return /* @__PURE__ */ React26.createElement(StyleControl, { bind: "color" }, /* @__PURE__ */ React26.createElement(Grid6, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React26.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React26.createElement(StyleControl.Label, null, __7("Text Color", "elementor"))), /* @__PURE__ */ React26.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React26.createElement(ColorControl, null))));
1169
+ // src/components/style-sections/typography-section/text-color-field.tsx
1170
+ import * as React35 from "react";
1171
+ import { __ as __11 } from "@wordpress/i18n";
1172
+ import { Grid as Grid9 } from "@elementor/ui";
1173
+ var TextColorField = () => {
1174
+ return /* @__PURE__ */ React35.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React35.createElement(Grid9, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React35.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React35.createElement(ControlLabel, null, __11("Text Color", "elementor"))), /* @__PURE__ */ React35.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React35.createElement(ColorControl, null))));
896
1175
  };
897
1176
 
898
- // src/components/style-sections/typography-section/letter-spacing-control.tsx
899
- import * as React27 from "react";
900
- import { __ as __8 } from "@wordpress/i18n";
901
- import { Grid as Grid7 } from "@elementor/ui";
902
- var LetterSpacingControl = () => {
903
- return /* @__PURE__ */ React27.createElement(StyleControl, { bind: "letter-spacing" }, /* @__PURE__ */ React27.createElement(Grid7, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React27.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React27.createElement(StyleControl.Label, null, __8("Letter Spacing", "elementor"))), /* @__PURE__ */ React27.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React27.createElement(SizeControl, null))));
1177
+ // src/components/style-sections/typography-section/letter-spacing-field.tsx
1178
+ import * as React36 from "react";
1179
+ import { __ as __12 } from "@wordpress/i18n";
1180
+ import { Grid as Grid10 } from "@elementor/ui";
1181
+ var LetterSpacingField = () => {
1182
+ return /* @__PURE__ */ React36.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React36.createElement(Grid10, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React36.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(ControlLabel, null, __12("Letter Spacing", "elementor"))), /* @__PURE__ */ React36.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(SizeControl, null))));
904
1183
  };
905
1184
 
906
- // src/components/style-sections/typography-section/word-spacing-control.tsx
907
- import * as React28 from "react";
908
- import { __ as __9 } from "@wordpress/i18n";
909
- import { Grid as Grid8 } from "@elementor/ui";
910
- var WordSpacingControl = () => {
911
- return /* @__PURE__ */ React28.createElement(StyleControl, { bind: "word-spacing" }, /* @__PURE__ */ React28.createElement(Grid8, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React28.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(StyleControl.Label, null, __9("Word Spacing", "elementor"))), /* @__PURE__ */ React28.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(SizeControl, null))));
1185
+ // src/components/style-sections/typography-section/word-spacing-field.tsx
1186
+ import * as React37 from "react";
1187
+ import { __ as __13 } from "@wordpress/i18n";
1188
+ import { Grid as Grid11 } from "@elementor/ui";
1189
+ var WordSpacingField = () => {
1190
+ return /* @__PURE__ */ React37.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React37.createElement(Grid11, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React37.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(ControlLabel, null, __13("Word Spacing", "elementor"))), /* @__PURE__ */ React37.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(SizeControl, null))));
912
1191
  };
913
1192
 
914
1193
  // src/components/collapsible-content.tsx
915
- import * as React29 from "react";
916
- import { useState as useState2 } from "react";
1194
+ import * as React38 from "react";
1195
+ import { useState as useState3 } from "react";
917
1196
  import { ChevronDownIcon } from "@elementor/icons";
918
- import { Button as Button3, Collapse, Stack as Stack7, styled as styled3 } from "@elementor/ui";
919
- import { __ as __10 } from "@wordpress/i18n";
1197
+ import { Button as Button3, Collapse, Stack as Stack9, styled as styled4 } from "@elementor/ui";
1198
+ import { __ as __14 } from "@wordpress/i18n";
920
1199
  var CollapsibleContent = ({ children, defaultOpen = false }) => {
921
- const [open, setOpen] = useState2(defaultOpen);
1200
+ const [open, setOpen] = useState3(defaultOpen);
922
1201
  const handleToggle = () => {
923
1202
  setOpen((prevOpen) => !prevOpen);
924
1203
  };
925
- return /* @__PURE__ */ React29.createElement(Stack7, { sx: { py: 0.5 } }, /* @__PURE__ */ React29.createElement(
1204
+ return /* @__PURE__ */ React38.createElement(Stack9, { sx: { py: 0.5 } }, /* @__PURE__ */ React38.createElement(
926
1205
  Button3,
927
1206
  {
928
1207
  fullWidth: true,
@@ -930,12 +1209,12 @@ var CollapsibleContent = ({ children, defaultOpen = false }) => {
930
1209
  color: "secondary",
931
1210
  variant: "outlined",
932
1211
  onClick: handleToggle,
933
- endIcon: /* @__PURE__ */ React29.createElement(ChevronIcon, { open })
1212
+ endIcon: /* @__PURE__ */ React38.createElement(ChevronIcon, { open })
934
1213
  },
935
- open ? __10("Show less", "elementor") : __10("Show more", "elementor")
936
- ), /* @__PURE__ */ React29.createElement(Collapse, { in: open, timeout: "auto" }, children));
1214
+ open ? __14("Show less", "elementor") : __14("Show more", "elementor")
1215
+ ), /* @__PURE__ */ React38.createElement(Collapse, { in: open, timeout: "auto" }, children));
937
1216
  };
938
- var ChevronIcon = styled3(ChevronDownIcon, {
1217
+ var ChevronIcon = styled4(ChevronDownIcon, {
939
1218
  shouldForwardProp: (prop) => prop !== "open"
940
1219
  })(({ theme, open }) => ({
941
1220
  transform: open ? "rotate(180deg)" : "rotate(0)",
@@ -944,171 +1223,172 @@ var ChevronIcon = styled3(ChevronDownIcon, {
944
1223
  })
945
1224
  }));
946
1225
 
947
- // src/components/style-sections/typography-section/transform-control.tsx
948
- import * as React32 from "react";
949
- import { __ as __11 } from "@wordpress/i18n";
950
- import { Grid as Grid9 } from "@elementor/ui";
1226
+ // src/components/style-sections/typography-section/transform-field.tsx
1227
+ import * as React39 from "react";
1228
+ import { __ as __15 } from "@wordpress/i18n";
1229
+ import { Grid as Grid12 } from "@elementor/ui";
951
1230
  import { LetterCaseIcon, LetterCaseLowerIcon, LetterCaseUpperIcon } from "@elementor/icons";
952
-
953
- // src/controls/control-types/toggle-control.tsx
954
- import * as React31 from "react";
955
-
956
- // src/controls/components/control-toggle-button-group.tsx
957
- import * as React30 from "react";
958
- import { styled as styled4, ToggleButton as ToggleButton2, ToggleButtonGroup as ToggleButtonGroup2 } from "@elementor/ui";
959
- var StyledToggleButtonGroup = styled4(ToggleButtonGroup2)`
960
- ${({ justify }) => `justify-content: ${justify};`}
961
- `;
962
- var ControlToggleButtonGroup = ({
963
- justify = "end",
964
- size = "tiny",
965
- value,
966
- onChange,
967
- items,
968
- exclusive = false
969
- }) => {
970
- const handleChange = (_, newValue) => {
971
- onChange(newValue);
972
- };
973
- return /* @__PURE__ */ React30.createElement(StyledToggleButtonGroup, { justify, value, onChange: handleChange, exclusive }, items.map(({ label, value: buttonValue, icon: Icon }) => /* @__PURE__ */ React30.createElement(ToggleButton2, { key: buttonValue, value: buttonValue, "aria-label": label, size }, /* @__PURE__ */ React30.createElement(Icon, { fontSize: size }))));
974
- };
975
-
976
- // src/controls/control-types/toggle-control.tsx
977
- var ToggleControl = createControl(({ options: options4 }) => {
978
- const { value, setValue } = useControl();
979
- const handleToggle = (option) => {
980
- setValue(option || void 0);
981
- };
982
- return /* @__PURE__ */ React31.createElement(
983
- ControlToggleButtonGroup,
984
- {
985
- items: options4,
986
- value: value || null,
987
- onChange: handleToggle,
988
- exclusive: true
989
- }
990
- );
991
- });
992
-
993
- // src/components/style-sections/typography-section/transform-control.tsx
994
- var options = [
995
- { value: "capitalize", label: __11("Capitalize", "elementor"), icon: LetterCaseIcon },
996
- { value: "uppercase", label: __11("Uppercase", "elementor"), icon: LetterCaseUpperIcon },
997
- { value: "lowercase", label: __11("Lowercase", "elementor"), icon: LetterCaseLowerIcon }
1231
+ var options2 = [
1232
+ { value: "capitalize", label: __15("Capitalize", "elementor"), icon: LetterCaseIcon },
1233
+ { value: "uppercase", label: __15("Uppercase", "elementor"), icon: LetterCaseUpperIcon },
1234
+ { value: "lowercase", label: __15("Lowercase", "elementor"), icon: LetterCaseLowerIcon }
998
1235
  ];
999
- var TransformControl = () => /* @__PURE__ */ React32.createElement(StyleControl, { bind: "text-transform" }, /* @__PURE__ */ React32.createElement(Grid9, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React32.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(StyleControl.Label, null, __11("Transform", "elementor"))), /* @__PURE__ */ React32.createElement(Grid9, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React32.createElement(ToggleControl, { options }))));
1236
+ var TransformField = () => /* @__PURE__ */ React39.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React39.createElement(Grid12, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React39.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(ControlLabel, null, __15("Transform", "elementor"))), /* @__PURE__ */ React39.createElement(Grid12, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React39.createElement(ToggleControl, { options: options2 }))));
1000
1237
 
1001
- // src/components/style-sections/typography-section/text-alignment-control.tsx
1002
- import * as React33 from "react";
1003
- import { __ as __12 } from "@wordpress/i18n";
1004
- import { Grid as Grid10 } from "@elementor/ui";
1238
+ // src/components/style-sections/typography-section/text-alignment-field.tsx
1239
+ import * as React40 from "react";
1240
+ import { __ as __16 } from "@wordpress/i18n";
1241
+ import { Grid as Grid13 } from "@elementor/ui";
1005
1242
  import { AlignLeftIcon, AlignCenterIcon, AlignRightIcon, AlignJustifiedIcon } from "@elementor/icons";
1006
- var options2 = [
1243
+ var options3 = [
1007
1244
  {
1008
1245
  value: "left",
1009
- label: __12("Left", "elementor"),
1246
+ label: __16("Left", "elementor"),
1010
1247
  icon: AlignLeftIcon
1011
1248
  },
1012
1249
  {
1013
1250
  value: "center",
1014
- label: __12("Center", "elementor"),
1251
+ label: __16("Center", "elementor"),
1015
1252
  icon: AlignCenterIcon
1016
1253
  },
1017
1254
  {
1018
1255
  value: "right",
1019
- label: __12("Right", "elementor"),
1256
+ label: __16("Right", "elementor"),
1020
1257
  icon: AlignRightIcon
1021
1258
  },
1022
1259
  {
1023
1260
  value: "justify",
1024
- label: __12("Justify", "elementor"),
1261
+ label: __16("Justify", "elementor"),
1025
1262
  icon: AlignJustifiedIcon
1026
1263
  }
1027
1264
  ];
1028
- var TextAlignmentControl = () => {
1029
- return /* @__PURE__ */ React33.createElement(StyleControl, { bind: "text-align" }, /* @__PURE__ */ React33.createElement(Grid10, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React33.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(StyleControl.Label, null, __12("Alignment", "elementor"))), /* @__PURE__ */ React33.createElement(Grid10, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React33.createElement(ToggleControl, { options: options2 }))));
1265
+ var TextAlignmentField = () => {
1266
+ return /* @__PURE__ */ React40.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React40.createElement(Grid13, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React40.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(ControlLabel, null, __16("Alignment", "elementor"))), /* @__PURE__ */ React40.createElement(Grid13, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React40.createElement(ToggleControl, { options: options3 }))));
1030
1267
  };
1031
1268
 
1032
- // src/components/style-sections/typography-section/text-direction-control.tsx
1033
- import * as React34 from "react";
1034
- import { __ as __13 } from "@wordpress/i18n";
1035
- import { Grid as Grid11 } from "@elementor/ui";
1269
+ // src/components/style-sections/typography-section/text-direction-field.tsx
1270
+ import * as React41 from "react";
1271
+ import { __ as __17 } from "@wordpress/i18n";
1272
+ import { Grid as Grid14 } from "@elementor/ui";
1036
1273
  import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
1037
- var options3 = [
1274
+ var options4 = [
1038
1275
  {
1039
1276
  value: "ltr",
1040
- label: __13("Left to Right", "elementor"),
1277
+ label: __17("Left to Right", "elementor"),
1041
1278
  icon: TextDirectionLtrIcon
1042
1279
  },
1043
1280
  {
1044
1281
  value: "rtl",
1045
- label: __13("Right to Left", "elementor"),
1282
+ label: __17("Right to Left", "elementor"),
1046
1283
  icon: TextDirectionRtlIcon
1047
1284
  }
1048
1285
  ];
1049
- var TextDirectionControl = () => {
1050
- return /* @__PURE__ */ React34.createElement(StyleControl, { bind: "direction" }, /* @__PURE__ */ React34.createElement(Grid11, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React34.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(StyleControl.Label, null, __13("Direction", "elementor"))), /* @__PURE__ */ React34.createElement(Grid11, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React34.createElement(ToggleControl, { options: options3 }))));
1286
+ var TextDirectionField = () => {
1287
+ return /* @__PURE__ */ React41.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React41.createElement(Grid14, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React41.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ControlLabel, null, __17("Direction", "elementor"))), /* @__PURE__ */ React41.createElement(Grid14, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React41.createElement(ToggleControl, { options: options4 }))));
1288
+ };
1289
+
1290
+ // src/components/style-sections/typography-section/text-stroke-field.tsx
1291
+ import * as React43 from "react";
1292
+ import { __ as __19 } from "@wordpress/i18n";
1293
+
1294
+ // src/components/collapsible-field.tsx
1295
+ import * as React42 from "react";
1296
+ import { useState as useState4 } from "react";
1297
+ import { __ as __18 } from "@wordpress/i18n";
1298
+ import { Collapse as Collapse2, IconButton as IconButton2, Stack as Stack10 } from "@elementor/ui";
1299
+ import { MinusIcon, PlusIcon as PlusIcon2 } from "@elementor/icons";
1300
+ var CollapsibleField = ({ label, children, defaultOpen = false }) => {
1301
+ const [open, setOpen] = useState4(defaultOpen);
1302
+ const handleToggle = () => {
1303
+ setOpen((prevOpen) => !prevOpen);
1304
+ };
1305
+ return /* @__PURE__ */ React42.createElement(Stack10, { gap: 1.5 }, /* @__PURE__ */ React42.createElement(Stack10, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { py: 0.5 } }, label, /* @__PURE__ */ React42.createElement(
1306
+ IconButton2,
1307
+ {
1308
+ onClick: handleToggle,
1309
+ size: "tiny",
1310
+ "aria-label": open ? __18("Close", "elementor") : __18("Expand", "elementor")
1311
+ },
1312
+ open ? /* @__PURE__ */ React42.createElement(MinusIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React42.createElement(PlusIcon2, { fontSize: "tiny" })
1313
+ )), /* @__PURE__ */ React42.createElement(Collapse2, { in: open }, children));
1314
+ };
1315
+
1316
+ // src/components/style-sections/typography-section/text-stroke-field.tsx
1317
+ var TextStrokeField = () => {
1318
+ return /* @__PURE__ */ React43.createElement(StylesField, { bind: "-webkit-text-stroke" }, /* @__PURE__ */ React43.createElement(CollapsibleField, { label: /* @__PURE__ */ React43.createElement(ControlLabel, null, __19("Text Stroke", "elementor")) }, /* @__PURE__ */ React43.createElement(StrokeControl, null)));
1051
1319
  };
1052
1320
 
1053
1321
  // src/components/style-sections/typography-section/typography-section.tsx
1054
1322
  var TypographySection = () => {
1055
- return /* @__PURE__ */ React35.createElement(AccordionSection, { title: __14("Typography", "elementor") }, /* @__PURE__ */ React35.createElement(Stack8, { gap: 1.5 }, /* @__PURE__ */ React35.createElement(FontWeightControl, null), /* @__PURE__ */ React35.createElement(FontSizeControl, null), /* @__PURE__ */ React35.createElement(Divider, null), /* @__PURE__ */ React35.createElement(TextColorControl, null), /* @__PURE__ */ React35.createElement(CollapsibleContent, null, /* @__PURE__ */ React35.createElement(Stack8, { gap: 1.5, sx: { pt: 1.5 } }, /* @__PURE__ */ React35.createElement(LetterSpacingControl, null), /* @__PURE__ */ React35.createElement(WordSpacingControl, null), /* @__PURE__ */ React35.createElement(Divider, null), /* @__PURE__ */ React35.createElement(TextAlignmentControl, null), /* @__PURE__ */ React35.createElement(TextStyleControl, null), /* @__PURE__ */ React35.createElement(TransformControl, null), /* @__PURE__ */ React35.createElement(TextDirectionControl, null)))));
1323
+ return /* @__PURE__ */ React44.createElement(AccordionSection, { title: __20("Typography", "elementor") }, /* @__PURE__ */ React44.createElement(Stack11, { gap: 1.5 }, /* @__PURE__ */ React44.createElement(FontWeightField, null), /* @__PURE__ */ React44.createElement(FontSizeField, null), /* @__PURE__ */ React44.createElement(Divider2, null), /* @__PURE__ */ React44.createElement(TextColorField, null), /* @__PURE__ */ React44.createElement(CollapsibleContent, null, /* @__PURE__ */ React44.createElement(Stack11, { gap: 1.5, sx: { pt: 1.5 } }, /* @__PURE__ */ React44.createElement(LetterSpacingField, null), /* @__PURE__ */ React44.createElement(WordSpacingField, null), /* @__PURE__ */ React44.createElement(Divider2, null), /* @__PURE__ */ React44.createElement(TextAlignmentField, null), /* @__PURE__ */ React44.createElement(TextStyleField, null), /* @__PURE__ */ React44.createElement(TransformField, null), /* @__PURE__ */ React44.createElement(TextDirectionField, null), /* @__PURE__ */ React44.createElement(TextStrokeField, null)))));
1056
1324
  };
1057
1325
 
1058
1326
  // src/components/style-sections/position-section/position-section.tsx
1059
- import * as React38 from "react";
1060
- import { Stack as Stack9 } from "@elementor/ui";
1327
+ import * as React48 from "react";
1328
+ import { Stack as Stack13 } from "@elementor/ui";
1061
1329
 
1062
- // src/components/style-sections/position-section/z-index-control.tsx
1063
- import * as React37 from "react";
1064
- import { __ as __15 } from "@wordpress/i18n";
1065
- import { Grid as Grid12 } from "@elementor/ui";
1330
+ // src/components/style-sections/position-section/z-index-field.tsx
1331
+ import * as React45 from "react";
1332
+ import { __ as __21 } from "@wordpress/i18n";
1333
+ import { Grid as Grid15 } from "@elementor/ui";
1334
+ var ZIndexField = () => {
1335
+ return /* @__PURE__ */ React45.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React45.createElement(Grid15, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React45.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlLabel, null, __21("Z-Index", "elementor"))), /* @__PURE__ */ React45.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(NumberControl, null))));
1336
+ };
1066
1337
 
1067
- // src/controls/control-types/number-control.tsx
1068
- import * as React36 from "react";
1069
- import { TextField as TextField4 } from "@elementor/ui";
1070
- var isEmptyOrNaN = (value) => value === void 0 || value === "" || Number.isNaN(Number(value));
1071
- var NumberControl = createControl(({ placeholder }) => {
1072
- const { value, setValue } = useControl();
1073
- const handleChange = (event) => {
1074
- const eventValue = event.target.value;
1075
- setValue(isEmptyOrNaN(eventValue) ? void 0 : Number(eventValue));
1076
- };
1077
- return /* @__PURE__ */ React36.createElement(ControlActions, null, /* @__PURE__ */ React36.createElement(
1078
- TextField4,
1079
- {
1080
- size: "tiny",
1081
- type: "number",
1082
- value: isEmptyOrNaN(value) ? "" : value,
1083
- onChange: handleChange,
1084
- placeholder
1085
- }
1086
- ));
1087
- });
1338
+ // src/components/style-sections/position-section/position-field.tsx
1339
+ import * as React46 from "react";
1340
+ import { __ as __22 } from "@wordpress/i18n";
1341
+ import { Grid as Grid16 } from "@elementor/ui";
1342
+ var positionOptions = [
1343
+ { label: __22("Static", "elementor"), value: "static" },
1344
+ { label: __22("Relative", "elementor"), value: "relative" },
1345
+ { label: __22("Absolute", "elementor"), value: "absolute" },
1346
+ { label: __22("Fixed", "elementor"), value: "fixed" }
1347
+ ];
1348
+ var PositionField = () => {
1349
+ return /* @__PURE__ */ React46.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React46.createElement(Grid16, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React46.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlLabel, null, __22("Position", "elementor"))), /* @__PURE__ */ React46.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(SelectControl, { options: positionOptions }))));
1350
+ };
1351
+
1352
+ // src/components/style-sections/position-section/position-section.tsx
1353
+ import { __ as __24 } from "@wordpress/i18n";
1088
1354
 
1089
- // src/components/style-sections/position-section/z-index-control.tsx
1090
- var ZIndexControl = () => {
1091
- return /* @__PURE__ */ React37.createElement(StyleControl, { bind: "z-index" }, /* @__PURE__ */ React37.createElement(Grid12, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React37.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(StyleControl.Label, null, __15("Z-Index", "elementor"))), /* @__PURE__ */ React37.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(NumberControl, null))));
1355
+ // src/components/style-sections/position-section/dimensions-field.tsx
1356
+ import * as React47 from "react";
1357
+ import { Grid as Grid17, Stack as Stack12 } from "@elementor/ui";
1358
+ import { __ as __23 } from "@wordpress/i18n";
1359
+ import { SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
1360
+ var sideIcons = {
1361
+ left: /* @__PURE__ */ React47.createElement(SideLeftIcon, { fontSize: "tiny" }),
1362
+ right: /* @__PURE__ */ React47.createElement(SideRightIcon, { fontSize: "tiny" }),
1363
+ top: /* @__PURE__ */ React47.createElement(SideTopIcon, { fontSize: "tiny" }),
1364
+ bottom: /* @__PURE__ */ React47.createElement(SideBottomIcon, { fontSize: "tiny" })
1365
+ };
1366
+ var DimensionsField = () => {
1367
+ return /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(Stack12, { direction: "row", gap: 2 }, /* @__PURE__ */ React47.createElement(DimensionField, { side: "top", label: __23("Top", "elementor") }), /* @__PURE__ */ React47.createElement(DimensionField, { side: "right", label: __23("Right", "elementor") })), /* @__PURE__ */ React47.createElement(Stack12, { direction: "row", gap: 2 }, /* @__PURE__ */ React47.createElement(DimensionField, { side: "bottom", label: __23("Bottom", "elementor") }), /* @__PURE__ */ React47.createElement(DimensionField, { side: "left", label: __23("Left", "elementor") })));
1368
+ };
1369
+ var DimensionField = ({ side, label }) => {
1370
+ return /* @__PURE__ */ React47.createElement(Grid17, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React47.createElement(Grid17, { item: true, xs: 12 }, /* @__PURE__ */ React47.createElement(ControlLabel, null, label)), /* @__PURE__ */ React47.createElement(Grid17, { item: true, xs: 12 }, /* @__PURE__ */ React47.createElement(StylesField, { bind: side }, /* @__PURE__ */ React47.createElement(SizeControl, { startIcon: sideIcons[side] }))));
1092
1371
  };
1093
1372
 
1094
1373
  // src/components/style-sections/position-section/position-section.tsx
1095
- import { __ as __16 } from "@wordpress/i18n";
1096
1374
  var PositionSection = () => {
1097
- return /* @__PURE__ */ React38.createElement(AccordionSection, { title: __16("Position", "elementor") }, /* @__PURE__ */ React38.createElement(Stack9, { gap: 1.5 }, /* @__PURE__ */ React38.createElement(ZIndexControl, null)));
1375
+ const [positionValue] = useStylesField("position");
1376
+ const isNotStatic = positionValue && positionValue !== "static";
1377
+ return /* @__PURE__ */ React48.createElement(AccordionSection, { title: __24("Position", "elementor") }, /* @__PURE__ */ React48.createElement(Stack13, { gap: 1.5 }, /* @__PURE__ */ React48.createElement(PositionField, null), isNotStatic ? /* @__PURE__ */ React48.createElement(React48.Fragment, null, /* @__PURE__ */ React48.createElement(DimensionsField, null), /* @__PURE__ */ React48.createElement(ZIndexField, null)) : null));
1098
1378
  };
1099
1379
 
1100
1380
  // src/components/style-sections/spacing-section/spacing-section.tsx
1101
- import * as React40 from "react";
1102
- import { Divider as Divider2, Stack as Stack11 } from "@elementor/ui";
1103
- import { __ as __18 } from "@wordpress/i18n";
1381
+ import * as React50 from "react";
1382
+ import { Divider as Divider3, Stack as Stack15 } from "@elementor/ui";
1383
+ import { __ as __26 } from "@wordpress/i18n";
1104
1384
 
1105
- // src/components/style-sections/spacing-section/linked-dimensions-control.tsx
1106
- import * as React39 from "react";
1107
- import { __ as __17 } from "@wordpress/i18n";
1108
- import { Grid as Grid13, Stack as Stack10, ToggleButton as ToggleButton3 } from "@elementor/ui";
1109
- import { DetachIcon, LinkIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
1110
- var LinkedDimensionsControl = ({ label }) => {
1111
- const { value, setValue } = useControl();
1385
+ // src/controls/controls/linked-dimensions-control.tsx
1386
+ import * as React49 from "react";
1387
+ import { __ as __25 } from "@wordpress/i18n";
1388
+ import { Grid as Grid18, Stack as Stack14, ToggleButton as ToggleButton3 } from "@elementor/ui";
1389
+ import { DetachIcon, LinkIcon, SideBottomIcon as SideBottomIcon2, SideLeftIcon as SideLeftIcon2, SideRightIcon as SideRightIcon2, SideTopIcon as SideTopIcon2 } from "@elementor/icons";
1390
+ var LinkedDimensionsControl = createControl(({ label }) => {
1391
+ const { value, setValue } = useBoundProp();
1112
1392
  const { top, right, bottom, left, isLinked = true } = value?.value || {};
1113
1393
  const setLinkedValue = (position, newValue) => {
1114
1394
  const updatedValue = {
@@ -1138,411 +1418,392 @@ var LinkedDimensionsControl = ({ label }) => {
1138
1418
  });
1139
1419
  };
1140
1420
  const LinkedIcon = isLinked ? LinkIcon : DetachIcon;
1141
- return /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement(Stack10, { direction: "row", gap: 2 }, /* @__PURE__ */ React39.createElement(ControlLabel, null, label), /* @__PURE__ */ React39.createElement(
1421
+ return /* @__PURE__ */ React49.createElement(React49.Fragment, null, /* @__PURE__ */ React49.createElement(Stack14, { direction: "row", gap: 2 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, label), /* @__PURE__ */ React49.createElement(
1142
1422
  ToggleButton3,
1143
1423
  {
1144
- "aria-label": __17("Link Inputs", "elementor"),
1424
+ "aria-label": __25("Link Inputs", "elementor"),
1145
1425
  size: "tiny",
1146
1426
  value: "check",
1147
1427
  selected: isLinked,
1148
1428
  sx: { marginLeft: "auto" },
1149
1429
  onChange: toggleLinked
1150
1430
  },
1151
- /* @__PURE__ */ React39.createElement(LinkedIcon, { fontSize: "tiny" })
1152
- )), /* @__PURE__ */ React39.createElement(Stack10, { direction: "row", gap: 2 }, /* @__PURE__ */ React39.createElement(Grid13, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React39.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(ControlLabel, null, __17("Top", "elementor"))), /* @__PURE__ */ React39.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(
1153
- Control4,
1154
- {
1155
- bind: "top",
1156
- value: top,
1157
- setValue: setLinkedValue,
1158
- startIcon: /* @__PURE__ */ React39.createElement(SideTopIcon, { fontSize: "tiny" })
1159
- }
1160
- ))), /* @__PURE__ */ React39.createElement(Grid13, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React39.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(ControlLabel, null, __17("Right", "elementor"))), /* @__PURE__ */ React39.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(
1161
- Control4,
1162
- {
1163
- bind: "right",
1164
- value: right,
1165
- setValue: setLinkedValue,
1166
- startIcon: /* @__PURE__ */ React39.createElement(SideRightIcon, { fontSize: "tiny" })
1167
- }
1168
- )))), /* @__PURE__ */ React39.createElement(Stack10, { direction: "row", gap: 2 }, /* @__PURE__ */ React39.createElement(Grid13, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React39.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(ControlLabel, null, __17("Bottom", "elementor"))), /* @__PURE__ */ React39.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(
1169
- Control4,
1170
- {
1171
- bind: "bottom",
1172
- value: bottom,
1173
- setValue: setLinkedValue,
1174
- startIcon: /* @__PURE__ */ React39.createElement(SideBottomIcon, { fontSize: "tiny" })
1175
- }
1176
- ))), /* @__PURE__ */ React39.createElement(Grid13, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React39.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(ControlLabel, null, __17("Left", "elementor"))), /* @__PURE__ */ React39.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(
1177
- Control4,
1178
- {
1179
- bind: "left",
1180
- value: left,
1181
- setValue: setLinkedValue,
1182
- startIcon: /* @__PURE__ */ React39.createElement(SideLeftIcon, { fontSize: "tiny" })
1183
- }
1184
- )))));
1185
- };
1186
- var Control4 = ({
1187
- bind,
1188
- startIcon,
1189
- value,
1190
- setValue
1191
- }) => /* @__PURE__ */ React39.createElement(
1192
- ControlContext.Provider,
1193
- {
1194
- value: {
1195
- bind,
1196
- setValue: (newValue) => setValue(bind, newValue),
1197
- value
1198
- }
1199
- },
1200
- /* @__PURE__ */ React39.createElement(SizeControl, { startIcon })
1201
- );
1202
-
1203
- // src/components/style-sections/spacing-section/spacing-section.tsx
1204
- var SpacingSection = () => {
1205
- return /* @__PURE__ */ React40.createElement(AccordionSection, { title: __18("Spacing", "elementor") }, /* @__PURE__ */ React40.createElement(Stack11, { gap: 1.5 }, /* @__PURE__ */ React40.createElement(StyleControl, { bind: "padding" }, /* @__PURE__ */ React40.createElement(LinkedDimensionsControl, { label: __18("Padding", "elementor") })), /* @__PURE__ */ React40.createElement(Divider2, null), /* @__PURE__ */ React40.createElement(StyleControl, { bind: "margin" }, /* @__PURE__ */ React40.createElement(LinkedDimensionsControl, { label: __18("Margin", "elementor") }))));
1206
- };
1207
-
1208
- // src/components/style-sections/effects-section/effects-section.tsx
1209
- import * as React43 from "react";
1210
- import { __ as __21 } from "@wordpress/i18n";
1211
- import { Stack as Stack14 } from "@elementor/ui";
1212
-
1213
- // src/components/style-sections/effects-section/box-shadow-repeater.tsx
1214
- import * as React42 from "react";
1215
- import { __ as __20 } from "@wordpress/i18n";
1216
- import { Grid as Grid14, Stack as Stack13, UnstableColorIndicator } from "@elementor/ui";
1217
-
1218
- // src/controls/components/repeater.tsx
1219
- import * as React41 from "react";
1220
- import { useId as useId4, useRef, useState as useState3 } from "react";
1221
- import { __ as __19 } from "@wordpress/i18n";
1222
- import { PlusIcon, XIcon as XIcon2, CopyIcon, EyeIcon, EyeOffIcon } from "@elementor/icons";
1223
- import {
1224
- Box as Box2,
1225
- Stack as Stack12,
1226
- Popover as Popover2,
1227
- IconButton as IconButton2,
1228
- bindTrigger as bindTrigger2,
1229
- bindPopover as bindPopover2,
1230
- usePopupState as usePopupState3,
1231
- UnstableTag,
1232
- Typography as Typography3
1233
- } from "@elementor/ui";
1234
- var SIZE2 = "tiny";
1235
- var Repeater = ({
1236
- label,
1237
- itemSettings,
1238
- values: repeaterValues = [],
1239
- setValues: setRepeaterValues
1240
- }) => {
1241
- const addRepeaterItem = () => {
1242
- const newItem = structuredClone(itemSettings.initialValues);
1243
- setRepeaterValues([...repeaterValues, newItem]);
1244
- };
1245
- const duplicateRepeaterItem = (index) => {
1246
- setRepeaterValues([
1247
- ...repeaterValues.slice(0, index),
1248
- structuredClone(repeaterValues[index]),
1249
- ...repeaterValues.slice(index)
1250
- ]);
1251
- };
1252
- const removeRepeaterItem = (index) => {
1253
- setRepeaterValues(repeaterValues.filter((_, i) => i !== index));
1254
- };
1255
- const toggleDisableRepeaterItem = (index) => {
1256
- setRepeaterValues(
1257
- repeaterValues.map((value, i) => {
1258
- if (i === index) {
1259
- const { disabled, ...rest } = value;
1260
- return { ...rest, ...disabled ? {} : { disabled: true } };
1261
- }
1262
- return value;
1263
- })
1264
- );
1265
- };
1266
- return /* @__PURE__ */ React41.createElement(Stack12, null, /* @__PURE__ */ React41.createElement(Stack12, { direction: "row", justifyContent: "space-between", sx: { py: 0.5 } }, /* @__PURE__ */ React41.createElement(Typography3, { component: "label", variant: "caption", color: "text.secondary" }, label), /* @__PURE__ */ React41.createElement(IconButton2, { size: SIZE2, onClick: addRepeaterItem, "aria-label": __19("Add item", "elementor") }, /* @__PURE__ */ React41.createElement(PlusIcon, { fontSize: SIZE2 }))), /* @__PURE__ */ React41.createElement(Stack12, { gap: 1 }, repeaterValues.map((value, index) => /* @__PURE__ */ React41.createElement(
1267
- RepeaterItem,
1268
- {
1269
- key: index,
1270
- disabled: value.disabled,
1271
- label: /* @__PURE__ */ React41.createElement(itemSettings.Label, { value }),
1272
- startIcon: /* @__PURE__ */ React41.createElement(itemSettings.Icon, { value }),
1273
- removeItem: () => removeRepeaterItem(index),
1274
- duplicateItem: () => duplicateRepeaterItem(index),
1275
- toggleDisableItem: () => toggleDisableRepeaterItem(index)
1276
- },
1277
- (props) => /* @__PURE__ */ React41.createElement(
1278
- itemSettings.Content,
1279
- {
1280
- ...props,
1281
- value,
1282
- setValue: (newValue) => setRepeaterValues(
1283
- repeaterValues.map((item, i) => i === index ? newValue : item)
1284
- )
1285
- }
1286
- )
1287
- ))));
1288
- };
1289
- var RepeaterItem = ({
1290
- label,
1291
- disabled,
1292
- startIcon,
1293
- children,
1294
- removeItem,
1295
- duplicateItem,
1296
- toggleDisableItem
1297
- }) => {
1298
- const popupId = useId4();
1299
- const tagRef = useRef(null);
1300
- const [anchorEl, setAnchorEl] = useState3(null);
1301
- const popoverState = usePopupState3({ popupId, variant: "popover" });
1302
- const popoverProps = bindPopover2(popoverState);
1303
- return /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement(
1304
- UnstableTag,
1305
- {
1306
- ref: tagRef,
1307
- label,
1308
- showActionsOnHover: true,
1309
- variant: "outlined",
1310
- "aria-label": __19("Open item", "elementor"),
1311
- ...bindTrigger2(popoverState),
1312
- startIcon,
1313
- actions: /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement(
1314
- IconButton2,
1315
- {
1316
- size: SIZE2,
1317
- onClick: duplicateItem,
1318
- "aria-label": __19("Duplicate item", "elementor")
1319
- },
1320
- /* @__PURE__ */ React41.createElement(CopyIcon, { fontSize: SIZE2 })
1321
- ), /* @__PURE__ */ React41.createElement(
1322
- IconButton2,
1323
- {
1324
- size: SIZE2,
1325
- onClick: toggleDisableItem,
1326
- "aria-label": disabled ? __19("Enable item", "elementor") : __19("Disable item", "elementor")
1327
- },
1328
- disabled ? /* @__PURE__ */ React41.createElement(EyeOffIcon, { fontSize: SIZE2 }) : /* @__PURE__ */ React41.createElement(EyeIcon, { fontSize: SIZE2 })
1329
- ), /* @__PURE__ */ React41.createElement(
1330
- IconButton2,
1331
- {
1332
- size: SIZE2,
1333
- onClick: removeItem,
1334
- "aria-label": __19("Remove item", "elementor")
1335
- },
1336
- /* @__PURE__ */ React41.createElement(XIcon2, { fontSize: SIZE2 })
1337
- ))
1338
- }
1339
- ), /* @__PURE__ */ React41.createElement(
1340
- Popover2,
1341
- {
1342
- disablePortal: true,
1343
- slotProps: {
1344
- paper: { ref: setAnchorEl, sx: { width: tagRef.current?.getBoundingClientRect().width } }
1345
- },
1346
- anchorOrigin: { vertical: "bottom", horizontal: "left" },
1347
- ...popoverProps
1348
- },
1349
- /* @__PURE__ */ React41.createElement(Box2, { p: 2 }, children({ anchorEl }))
1350
- ));
1351
- };
1352
-
1353
- // src/components/style-sections/effects-section/box-shadow-repeater.tsx
1354
- var BoxShadowRepeater = () => {
1355
- const { value, setValue } = useControl();
1356
- const boxShadowValues = value?.value;
1357
- const setBoxShadow = (newValue) => {
1358
- setValue({
1359
- $$type: "box-shadow",
1360
- value: newValue
1361
- });
1362
- };
1363
- return /* @__PURE__ */ React42.createElement(
1364
- Repeater,
1365
- {
1366
- values: boxShadowValues,
1367
- setValues: setBoxShadow,
1368
- label: __20("Box shadow", "elementor"),
1369
- itemSettings: {
1370
- Icon: ItemIcon,
1371
- Label: ItemLabel,
1372
- Content: ItemContent,
1373
- initialValues: initialShadow
1374
- }
1375
- }
1376
- );
1377
- };
1378
- var ItemIcon = ({ value }) => /* @__PURE__ */ React42.createElement(UnstableColorIndicator, { size: "inherit", component: "span", value: value.value.color.value });
1379
- var ItemContent = ({
1380
- anchorEl,
1381
- value,
1382
- setValue
1383
- }) => {
1384
- const setShadow = (newValue) => {
1385
- setValue({
1386
- $$type: "shadow",
1387
- value: newValue
1388
- });
1389
- };
1390
- return /* @__PURE__ */ React42.createElement(Stack13, { gap: 1.5 }, /* @__PURE__ */ React42.createElement(Grid14, { container: true, spacing: 1 }, /* @__PURE__ */ React42.createElement(
1391
- Control5,
1392
- {
1393
- bind: "color",
1394
- value: value.value.color,
1395
- label: __20("Color", "elementor"),
1396
- setValue: (v) => setShadow({ ...value.value, color: v })
1397
- },
1398
- /* @__PURE__ */ React42.createElement(
1399
- ColorControl,
1400
- {
1401
- anchorEl,
1402
- anchorOrigin: {
1403
- vertical: "top",
1404
- horizontal: "right"
1405
- },
1406
- transformOrigin: {
1407
- vertical: "top",
1408
- horizontal: -10
1409
- }
1410
- }
1411
- )
1412
- ), /* @__PURE__ */ React42.createElement(
1413
- Control5,
1414
- {
1415
- bind: "position",
1416
- value: value.value.position,
1417
- label: __20("Position", "elementor"),
1418
- setValue: (v) => setShadow({ ...value.value, position: v })
1419
- },
1420
- /* @__PURE__ */ React42.createElement(
1421
- SelectControl,
1422
- {
1423
- options: [
1424
- { label: "Inset", value: "inset" },
1425
- { label: "Outset", value: "outset" }
1426
- ]
1427
- }
1428
- )
1429
- )), /* @__PURE__ */ React42.createElement(Grid14, { container: true, spacing: 1 }, /* @__PURE__ */ React42.createElement(
1430
- Control5,
1431
- {
1432
- bind: "hOffset",
1433
- label: __20("Horizontal", "elementor"),
1434
- value: value.value.hOffset,
1435
- setValue: (v) => setShadow({ ...value.value, hOffset: v })
1436
- },
1437
- /* @__PURE__ */ React42.createElement(SizeControl, null)
1438
- ), /* @__PURE__ */ React42.createElement(
1431
+ /* @__PURE__ */ React49.createElement(LinkedIcon, { fontSize: "tiny" })
1432
+ )), /* @__PURE__ */ React49.createElement(Stack14, { direction: "row", gap: 2 }, /* @__PURE__ */ React49.createElement(Grid18, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React49.createElement(Grid18, { item: true, xs: 12 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, __25("Top", "elementor"))), /* @__PURE__ */ React49.createElement(Grid18, { item: true, xs: 12 }, /* @__PURE__ */ React49.createElement(
1439
1433
  Control5,
1440
1434
  {
1441
- label: __20("Vertical", "elementor"),
1442
- bind: "vOffset",
1443
- value: value.value.vOffset,
1444
- setValue: (v) => setShadow({ ...value.value, vOffset: v })
1445
- },
1446
- /* @__PURE__ */ React42.createElement(SizeControl, null)
1447
- )), /* @__PURE__ */ React42.createElement(Grid14, { container: true, spacing: 1 }, /* @__PURE__ */ React42.createElement(
1435
+ bind: "top",
1436
+ value: top,
1437
+ setValue: setLinkedValue,
1438
+ startIcon: /* @__PURE__ */ React49.createElement(SideTopIcon2, { fontSize: "tiny" })
1439
+ }
1440
+ ))), /* @__PURE__ */ React49.createElement(Grid18, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React49.createElement(Grid18, { item: true, xs: 12 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, __25("Right", "elementor"))), /* @__PURE__ */ React49.createElement(Grid18, { item: true, xs: 12 }, /* @__PURE__ */ React49.createElement(
1448
1441
  Control5,
1449
1442
  {
1450
- bind: "blur",
1451
- value: value.value.blur,
1452
- label: __20("Blur", "elementor"),
1453
- setValue: (v) => setShadow({ ...value.value, blur: v })
1454
- },
1455
- /* @__PURE__ */ React42.createElement(SizeControl, null)
1456
- ), /* @__PURE__ */ React42.createElement(
1443
+ bind: "right",
1444
+ value: right,
1445
+ setValue: setLinkedValue,
1446
+ startIcon: /* @__PURE__ */ React49.createElement(SideRightIcon2, { fontSize: "tiny" })
1447
+ }
1448
+ )))), /* @__PURE__ */ React49.createElement(Stack14, { direction: "row", gap: 2 }, /* @__PURE__ */ React49.createElement(Grid18, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React49.createElement(Grid18, { item: true, xs: 12 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, __25("Bottom", "elementor"))), /* @__PURE__ */ React49.createElement(Grid18, { item: true, xs: 12 }, /* @__PURE__ */ React49.createElement(
1457
1449
  Control5,
1458
1450
  {
1459
- bind: "spread",
1460
- label: __20("Spread", "elementor"),
1461
- value: value.value.spread,
1462
- setValue: (v) => setShadow({ ...value.value, spread: v })
1463
- },
1464
- /* @__PURE__ */ React42.createElement(SizeControl, null)
1465
- )));
1466
- };
1451
+ bind: "bottom",
1452
+ value: bottom,
1453
+ setValue: setLinkedValue,
1454
+ startIcon: /* @__PURE__ */ React49.createElement(SideBottomIcon2, { fontSize: "tiny" })
1455
+ }
1456
+ ))), /* @__PURE__ */ React49.createElement(Grid18, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React49.createElement(Grid18, { item: true, xs: 12 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, __25("Left", "elementor"))), /* @__PURE__ */ React49.createElement(Grid18, { item: true, xs: 12 }, /* @__PURE__ */ React49.createElement(
1457
+ Control5,
1458
+ {
1459
+ bind: "left",
1460
+ value: left,
1461
+ setValue: setLinkedValue,
1462
+ startIcon: /* @__PURE__ */ React49.createElement(SideLeftIcon2, { fontSize: "tiny" })
1463
+ }
1464
+ )))));
1465
+ });
1467
1466
  var Control5 = ({
1468
- value,
1469
- setValue,
1470
- label,
1471
1467
  bind,
1472
- children
1473
- }) => /* @__PURE__ */ React42.createElement(ControlContext.Provider, { value: { value, setValue, bind } }, /* @__PURE__ */ React42.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(Grid14, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React42.createElement(Grid14, { item: true, xs: 12 }, /* @__PURE__ */ React42.createElement(ControlLabel, null, label)), /* @__PURE__ */ React42.createElement(Grid14, { item: true, xs: 12 }, children))));
1474
- var ItemLabel = ({ value }) => {
1475
- const { position, hOffset, vOffset, blur, spread } = value.value;
1476
- const { size: hOffsetSize, unit: hOffsetUnit } = hOffset.value;
1477
- const { size: vOffsetSize, unit: vOffsetUnit } = vOffset.value;
1478
- const { size: blurSize, unit: blurUnit } = blur.value;
1479
- const { size: spreadSize, unit: spreadUnit } = spread.value;
1480
- const sizes = [
1481
- hOffsetSize + hOffsetUnit,
1482
- vOffsetSize + vOffsetUnit,
1483
- blurSize + blurUnit,
1484
- spreadSize + spreadUnit
1485
- ].join(" ");
1486
- return /* @__PURE__ */ React42.createElement("span", { style: { textTransform: "capitalize" } }, position, ": ", sizes);
1487
- };
1488
- var initialShadow = {
1489
- $$type: "shadow",
1490
- value: {
1491
- hOffset: {
1492
- $$type: "size",
1493
- value: { unit: "px", size: 0 }
1494
- },
1495
- vOffset: {
1496
- $$type: "size",
1497
- value: { unit: "px", size: 0 }
1498
- },
1499
- blur: {
1500
- $$type: "size",
1501
- value: { unit: "px", size: 0 }
1502
- },
1503
- spread: {
1504
- $$type: "size",
1505
- value: { unit: "px", size: 0 }
1506
- },
1507
- color: {
1508
- $$type: "color",
1509
- value: "rgba(0, 0, 0, 0)"
1510
- },
1511
- position: "inset"
1512
- }
1468
+ startIcon,
1469
+ value,
1470
+ setValue
1471
+ }) => /* @__PURE__ */ React49.createElement(BoundPropProvider, { setValue: (newValue) => setValue(bind, newValue), value, bind }, /* @__PURE__ */ React49.createElement(SizeControl, { startIcon }));
1472
+
1473
+ // src/components/style-sections/spacing-section/spacing-section.tsx
1474
+ var SpacingSection = () => {
1475
+ return /* @__PURE__ */ React50.createElement(AccordionSection, { title: __26("Spacing", "elementor") }, /* @__PURE__ */ React50.createElement(Stack15, { gap: 1.5 }, /* @__PURE__ */ React50.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React50.createElement(LinkedDimensionsControl, { label: __26("Padding", "elementor") })), /* @__PURE__ */ React50.createElement(Divider3, null), /* @__PURE__ */ React50.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React50.createElement(LinkedDimensionsControl, { label: __26("Margin", "elementor") }))));
1513
1476
  };
1514
1477
 
1515
1478
  // src/components/style-sections/effects-section/effects-section.tsx
1479
+ import * as React51 from "react";
1480
+ import { __ as __27 } from "@wordpress/i18n";
1481
+ import { Stack as Stack16 } from "@elementor/ui";
1516
1482
  var EffectsSection = () => {
1517
- return /* @__PURE__ */ React43.createElement(AccordionSection, { title: __21("Effects", "elementor") }, /* @__PURE__ */ React43.createElement(Stack14, { gap: 1.5 }, /* @__PURE__ */ React43.createElement(StyleControl, { bind: "box-shadow" }, /* @__PURE__ */ React43.createElement(BoxShadowRepeater, null))));
1483
+ return /* @__PURE__ */ React51.createElement(AccordionSection, { title: __27("Effects", "elementor") }, /* @__PURE__ */ React51.createElement(Stack16, { gap: 1.5 }, /* @__PURE__ */ React51.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React51.createElement(BoxShadowRepeaterControl, null))));
1518
1484
  };
1519
1485
 
1520
1486
  // src/components/style-sections/background-section/background-section.tsx
1521
- import * as React45 from "react";
1522
- import { __ as __23 } from "@wordpress/i18n";
1523
- import { Stack as Stack15 } from "@elementor/ui";
1487
+ import * as React53 from "react";
1488
+ import { __ as __29 } from "@wordpress/i18n";
1489
+ import { Stack as Stack17 } from "@elementor/ui";
1524
1490
 
1525
- // src/components/style-sections/background-section/background-color-control.tsx
1526
- import * as React44 from "react";
1527
- import { __ as __22 } from "@wordpress/i18n";
1528
- import { Grid as Grid15 } from "@elementor/ui";
1529
- var BackgroundColorControl = () => {
1530
- return /* @__PURE__ */ React44.createElement(StyleControl, { bind: "background-color" }, /* @__PURE__ */ React44.createElement(Grid15, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React44.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(StyleControl.Label, null, __22("Color", "elementor"))), /* @__PURE__ */ React44.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(ColorControl, null))));
1491
+ // src/components/style-sections/background-section/background-color-field.tsx
1492
+ import * as React52 from "react";
1493
+ import { __ as __28 } from "@wordpress/i18n";
1494
+ import { Grid as Grid19 } from "@elementor/ui";
1495
+ var BackgroundColorField = () => {
1496
+ return /* @__PURE__ */ React52.createElement(StylesField, { bind: "background-color" }, /* @__PURE__ */ React52.createElement(Grid19, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React52.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(ControlLabel, null, __28("Color", "elementor"))), /* @__PURE__ */ React52.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(ColorControl, null))));
1531
1497
  };
1532
1498
 
1533
1499
  // src/components/style-sections/background-section/background-section.tsx
1534
1500
  var BackgroundSection = () => {
1535
- return /* @__PURE__ */ React45.createElement(AccordionSection, { title: __23("Background", "elementor") }, /* @__PURE__ */ React45.createElement(Stack15, { gap: 1.5 }, /* @__PURE__ */ React45.createElement(BackgroundColorControl, null)));
1501
+ return /* @__PURE__ */ React53.createElement(AccordionSection, { title: __29("Background", "elementor") }, /* @__PURE__ */ React53.createElement(Stack17, { gap: 1.5 }, /* @__PURE__ */ React53.createElement(BackgroundColorField, null)));
1502
+ };
1503
+
1504
+ // src/components/style-sections/border-section/border-section.tsx
1505
+ import * as React61 from "react";
1506
+ import { Divider as Divider4, Stack as Stack20 } from "@elementor/ui";
1507
+ import { __ as __36 } from "@wordpress/i18n";
1508
+
1509
+ // src/components/style-sections/border-section/border-radius-field.tsx
1510
+ import * as React55 from "react";
1511
+ import { __ as __31 } from "@wordpress/i18n";
1512
+ import {
1513
+ BorderCornersIcon,
1514
+ RadiusBottomLeftIcon,
1515
+ RadiusBottomRightIcon,
1516
+ RadiusTopLeftIcon,
1517
+ RadiusTopRightIcon
1518
+ } from "@elementor/icons";
1519
+
1520
+ // src/controls/controls/equal-unequal-sizes-control.tsx
1521
+ import * as React54 from "react";
1522
+ import { useId as useId4, useRef as useRef2 } from "react";
1523
+ import { bindPopover as bindPopover2, bindToggle, Grid as Grid20, Popover as Popover2, Stack as Stack18, ToggleButton as ToggleButton4, usePopupState as usePopupState3 } from "@elementor/ui";
1524
+ import { __ as __30 } from "@wordpress/i18n";
1525
+ function hasMixedSizes(values) {
1526
+ const [firstValue, ...restValues] = values;
1527
+ return restValues.some(
1528
+ (value) => value?.value?.size !== firstValue?.value?.size || value?.value?.unit !== firstValue?.value?.unit
1529
+ );
1530
+ }
1531
+ function EqualUnequalSizesControl({ label, icon, items, multiSizeType }) {
1532
+ const popupId = useId4();
1533
+ const controlRef = useRef2(null);
1534
+ const { value: controlValue, setValue: setControlValue } = useBoundProp();
1535
+ const actualValue = controlValue?.value ?? {};
1536
+ const setActualValue = (newValue) => {
1537
+ setControlValue({ $$type: multiSizeType, value: newValue });
1538
+ };
1539
+ const setNestedProp = (item, newValue) => {
1540
+ const { bind } = item;
1541
+ const newValues = {
1542
+ ...actualValue,
1543
+ [bind]: newValue
1544
+ };
1545
+ setActualValue(newValues);
1546
+ };
1547
+ const setEqualValues = (newValue) => {
1548
+ const equalValues = items.reduce((values, item) => {
1549
+ return {
1550
+ ...values,
1551
+ [item.bind]: newValue
1552
+ };
1553
+ }, {});
1554
+ setActualValue(equalValues);
1555
+ };
1556
+ const popupState = usePopupState3({
1557
+ variant: "popover",
1558
+ popupId
1559
+ });
1560
+ return /* @__PURE__ */ React54.createElement(React54.Fragment, null, /* @__PURE__ */ React54.createElement(Grid20, { container: true, alignItems: "center", ref: controlRef }, /* @__PURE__ */ React54.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlLabel, null, label)), /* @__PURE__ */ React54.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(
1561
+ EqualValuesControl,
1562
+ {
1563
+ value: actualValue,
1564
+ setValue: setEqualValues,
1565
+ iconButton: /* @__PURE__ */ React54.createElement(
1566
+ ToggleButton4,
1567
+ {
1568
+ size: "tiny",
1569
+ value: "check",
1570
+ sx: { marginLeft: "auto" },
1571
+ ...bindToggle(popupState),
1572
+ selected: popupState.isOpen
1573
+ },
1574
+ icon
1575
+ )
1576
+ }
1577
+ ))), /* @__PURE__ */ React54.createElement(
1578
+ Popover2,
1579
+ {
1580
+ disablePortal: true,
1581
+ disableScrollLock: true,
1582
+ anchorOrigin: {
1583
+ vertical: "bottom",
1584
+ horizontal: "right"
1585
+ },
1586
+ transformOrigin: {
1587
+ vertical: "top",
1588
+ horizontal: "right"
1589
+ },
1590
+ ...bindPopover2(popupState),
1591
+ slotProps: {
1592
+ paper: { sx: { mt: 0.5, p: 2, pt: 1, width: controlRef.current?.getBoundingClientRect().width } }
1593
+ }
1594
+ },
1595
+ /* @__PURE__ */ React54.createElement(Stack18, { gap: 1.5 }, /* @__PURE__ */ React54.createElement(Grid20, { container: true, spacing: 2, alignItems: "center" }, /* @__PURE__ */ React54.createElement(NestedValueControl, { item: items[0], value: actualValue, setNestedProp }), /* @__PURE__ */ React54.createElement(NestedValueControl, { item: items[1], value: actualValue, setNestedProp })), /* @__PURE__ */ React54.createElement(Grid20, { container: true, spacing: 2, alignItems: "center" }, /* @__PURE__ */ React54.createElement(NestedValueControl, { item: items[3], value: actualValue, setNestedProp }), /* @__PURE__ */ React54.createElement(NestedValueControl, { item: items[2], value: actualValue, setNestedProp })))
1596
+ ));
1597
+ }
1598
+ var NestedValueControl = ({
1599
+ item,
1600
+ value,
1601
+ setNestedProp
1602
+ }) => {
1603
+ const { bind } = item;
1604
+ const nestedValue = value?.[bind] ? value[bind] : void 0;
1605
+ return /* @__PURE__ */ React54.createElement(BoundPropProvider, { bind: "", setValue: (val) => setNestedProp(item, val), value: nestedValue }, /* @__PURE__ */ React54.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(Grid20, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React54.createElement(Grid20, { item: true, xs: 12 }, /* @__PURE__ */ React54.createElement(ControlLabel, null, item.label)), /* @__PURE__ */ React54.createElement(Grid20, { item: true, xs: 12 }, /* @__PURE__ */ React54.createElement(SizeControl, { startIcon: item.icon })))));
1606
+ };
1607
+ var EqualValuesControl = ({
1608
+ value,
1609
+ setValue,
1610
+ iconButton
1611
+ }) => {
1612
+ const values = Object.values(value ?? {});
1613
+ const isMixed = hasMixedSizes(values);
1614
+ return /* @__PURE__ */ React54.createElement(
1615
+ BoundPropProvider,
1616
+ {
1617
+ bind: "",
1618
+ setValue: (val) => setValue(val),
1619
+ value: isMixed ? void 0 : values[0]
1620
+ },
1621
+ /* @__PURE__ */ React54.createElement(Stack18, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React54.createElement(SizeControl, { placeholder: __30("MIXED", "elementor") }), iconButton)
1622
+ );
1536
1623
  };
1537
1624
 
1625
+ // src/components/style-sections/border-section/border-radius-field.tsx
1626
+ var corners = [
1627
+ {
1628
+ label: __31("Top Left", "elementor"),
1629
+ icon: /* @__PURE__ */ React55.createElement(RadiusTopLeftIcon, { fontSize: "tiny" }),
1630
+ bind: "top-left"
1631
+ },
1632
+ {
1633
+ label: __31("Top Right", "elementor"),
1634
+ icon: /* @__PURE__ */ React55.createElement(RadiusTopRightIcon, { fontSize: "tiny" }),
1635
+ bind: "top-right"
1636
+ },
1637
+ {
1638
+ label: __31("Bottom Right", "elementor"),
1639
+ icon: /* @__PURE__ */ React55.createElement(RadiusBottomRightIcon, { fontSize: "tiny" }),
1640
+ bind: "bottom-right"
1641
+ },
1642
+ {
1643
+ label: __31("Bottom Left", "elementor"),
1644
+ icon: /* @__PURE__ */ React55.createElement(RadiusBottomLeftIcon, { fontSize: "tiny" }),
1645
+ bind: "bottom-left"
1646
+ }
1647
+ ];
1648
+ var BorderRadiusField = () => {
1649
+ return /* @__PURE__ */ React55.createElement(StylesField, { bind: "border-radius" }, /* @__PURE__ */ React55.createElement(
1650
+ EqualUnequalSizesControl,
1651
+ {
1652
+ label: __31("Border Radius", "elementor"),
1653
+ icon: /* @__PURE__ */ React55.createElement(BorderCornersIcon, { fontSize: "tiny" }),
1654
+ items: corners,
1655
+ multiSizeType: "border-radius"
1656
+ }
1657
+ ));
1658
+ };
1659
+
1660
+ // src/components/style-sections/border-section/border-field.tsx
1661
+ import * as React60 from "react";
1662
+ import { __ as __35 } from "@wordpress/i18n";
1663
+
1664
+ // src/components/style-sections/border-section/border-width-field.tsx
1665
+ import * as React56 from "react";
1666
+ import { SideBottomIcon as SideBottomIcon3, SideLeftIcon as SideLeftIcon3, SideRightIcon as SideRightIcon3, SideTopIcon as SideTopIcon3, SideAllIcon } from "@elementor/icons";
1667
+ import { __ as __32 } from "@wordpress/i18n";
1668
+ var edges = [
1669
+ {
1670
+ label: __32("Top", "elementor"),
1671
+ icon: /* @__PURE__ */ React56.createElement(SideTopIcon3, { fontSize: "tiny" }),
1672
+ bind: "top"
1673
+ },
1674
+ {
1675
+ label: __32("Right", "elementor"),
1676
+ icon: /* @__PURE__ */ React56.createElement(SideRightIcon3, { fontSize: "tiny" }),
1677
+ bind: "right"
1678
+ },
1679
+ {
1680
+ label: __32("Bottom", "elementor"),
1681
+ icon: /* @__PURE__ */ React56.createElement(SideBottomIcon3, { fontSize: "tiny" }),
1682
+ bind: "bottom"
1683
+ },
1684
+ {
1685
+ label: __32("Left", "elementor"),
1686
+ icon: /* @__PURE__ */ React56.createElement(SideLeftIcon3, { fontSize: "tiny" }),
1687
+ bind: "left"
1688
+ }
1689
+ ];
1690
+ var BorderWidthField = () => {
1691
+ return /* @__PURE__ */ React56.createElement(StylesField, { bind: "border-width" }, /* @__PURE__ */ React56.createElement(
1692
+ EqualUnequalSizesControl,
1693
+ {
1694
+ label: __32("Border Width", "elementor"),
1695
+ icon: /* @__PURE__ */ React56.createElement(SideAllIcon, { fontSize: "tiny" }),
1696
+ items: edges,
1697
+ multiSizeType: "border-width"
1698
+ }
1699
+ ));
1700
+ };
1701
+
1702
+ // src/components/style-sections/border-section/border-color-field.tsx
1703
+ import * as React57 from "react";
1704
+ import { __ as __33 } from "@wordpress/i18n";
1705
+ import { Grid as Grid21 } from "@elementor/ui";
1706
+ var BorderColorField = () => {
1707
+ return /* @__PURE__ */ React57.createElement(StylesField, { bind: "border-color" }, /* @__PURE__ */ React57.createElement(Grid21, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React57.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(ControlLabel, null, __33("Border Color", "elementor"))), /* @__PURE__ */ React57.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(ColorControl, null))));
1708
+ };
1709
+
1710
+ // src/components/style-sections/border-section/border-style-field.tsx
1711
+ import * as React58 from "react";
1712
+ import { __ as __34 } from "@wordpress/i18n";
1713
+ import { Grid as Grid22 } from "@elementor/ui";
1714
+ var borderStyles = [
1715
+ { value: "none", label: __34("None", "elementor") },
1716
+ { value: "solid", label: __34("Solid", "elementor") },
1717
+ { value: "dashed", label: __34("Dashed", "elementor") },
1718
+ { value: "dotted", label: __34("Dotted", "elementor") },
1719
+ { value: "double", label: __34("Double", "elementor") },
1720
+ { value: "groove", label: __34("Groove", "elementor") },
1721
+ { value: "ridge", label: __34("Ridge", "elementor") },
1722
+ { value: "inset", label: __34("Inset", "elementor") },
1723
+ { value: "outset", label: __34("Outset", "elementor") }
1724
+ ];
1725
+ var BorderStyleField = () => {
1726
+ return /* @__PURE__ */ React58.createElement(StylesField, { bind: "border-style" }, /* @__PURE__ */ React58.createElement(Grid22, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React58.createElement(Grid22, { item: true, xs: 6 }, /* @__PURE__ */ React58.createElement(ControlLabel, null, __34("Border Type", "elementor"))), /* @__PURE__ */ React58.createElement(Grid22, { item: true, xs: 6 }, /* @__PURE__ */ React58.createElement(SelectControl, { options: borderStyles }))));
1727
+ };
1728
+
1729
+ // src/components/add-or-remove-content.tsx
1730
+ import * as React59 from "react";
1731
+ import { MinusIcon as MinusIcon2, PlusIcon as PlusIcon3 } from "@elementor/icons";
1732
+ import { Collapse as Collapse3, IconButton as IconButton3, Stack as Stack19 } from "@elementor/ui";
1733
+ var SIZE2 = "tiny";
1734
+ var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
1735
+ return /* @__PURE__ */ React59.createElement(Stack19, { gap: 1.5 }, /* @__PURE__ */ React59.createElement(
1736
+ Stack19,
1737
+ {
1738
+ direction: "row",
1739
+ sx: {
1740
+ justifyContent: "space-between",
1741
+ alignItems: "center"
1742
+ }
1743
+ },
1744
+ /* @__PURE__ */ React59.createElement(ControlLabel, null, label),
1745
+ isAdded ? /* @__PURE__ */ React59.createElement(IconButton3, { size: SIZE2, onClick: onRemove }, /* @__PURE__ */ React59.createElement(MinusIcon2, { fontSize: SIZE2 })) : /* @__PURE__ */ React59.createElement(IconButton3, { size: SIZE2, onClick: onAdd }, /* @__PURE__ */ React59.createElement(PlusIcon3, { fontSize: SIZE2 }))
1746
+ ), /* @__PURE__ */ React59.createElement(Collapse3, { in: isAdded }, /* @__PURE__ */ React59.createElement(Stack19, { gap: 1.5 }, children)));
1747
+ };
1748
+
1749
+ // src/components/style-sections/border-section/border-field.tsx
1750
+ var initialSize = { $$type: "size", value: { size: 1, unit: "px" } };
1751
+ var initialBorderWidth = {
1752
+ $$type: "border-width",
1753
+ value: { top: initialSize, right: initialSize, bottom: initialSize, left: initialSize }
1754
+ };
1755
+ var initialBorderColor = { $$type: "color", value: "#000000" };
1756
+ var initialBorderStyle = "solid";
1757
+ var BorderField = () => {
1758
+ const [borderWidth, setBorderWidth] = useStylesField("border-width");
1759
+ const [borderColor, setBorderColor] = useStylesField("border-color");
1760
+ const [borderStyle, setBorderStyle] = useStylesField("border-style");
1761
+ const addBorder = () => {
1762
+ setBorderWidth(initialBorderWidth);
1763
+ setBorderColor(initialBorderColor);
1764
+ setBorderStyle(initialBorderStyle);
1765
+ };
1766
+ const removeBorder = () => {
1767
+ setBorderWidth(null);
1768
+ setBorderColor(null);
1769
+ setBorderStyle(null);
1770
+ };
1771
+ const hasBorder = Boolean(borderWidth || borderColor || borderStyle);
1772
+ return /* @__PURE__ */ React60.createElement(
1773
+ AddOrRemoveContent,
1774
+ {
1775
+ label: __35("Border", "elementor"),
1776
+ isAdded: hasBorder,
1777
+ onAdd: addBorder,
1778
+ onRemove: removeBorder
1779
+ },
1780
+ /* @__PURE__ */ React60.createElement(BorderWidthField, null),
1781
+ /* @__PURE__ */ React60.createElement(BorderColorField, null),
1782
+ /* @__PURE__ */ React60.createElement(BorderStyleField, null)
1783
+ );
1784
+ };
1785
+
1786
+ // src/components/style-sections/border-section/border-section.tsx
1787
+ var BorderSection = () => /* @__PURE__ */ React61.createElement(AccordionSection, { title: __36("Border", "elementor") }, /* @__PURE__ */ React61.createElement(Stack20, { gap: 1.5 }, /* @__PURE__ */ React61.createElement(BorderRadiusField, null), /* @__PURE__ */ React61.createElement(Divider4, null), /* @__PURE__ */ React61.createElement(BorderField, null)));
1788
+
1538
1789
  // src/components/style-tab.tsx
1539
1790
  var CLASSES_PROP_KEY = "classes";
1540
1791
  var StyleTab = () => {
1541
- const styleDefinition = useStyleDefinition();
1542
- const classesProp = useClassesProp();
1543
- return /* @__PURE__ */ React46.createElement(StyleContext, { selectedStyleDef: styleDefinition, selectedClassesProp: classesProp }, /* @__PURE__ */ React46.createElement(Stack16, null, /* @__PURE__ */ React46.createElement(SizeSection, null), /* @__PURE__ */ React46.createElement(PositionSection, null), /* @__PURE__ */ React46.createElement(TypographySection, null), /* @__PURE__ */ React46.createElement(BackgroundSection, null), /* @__PURE__ */ React46.createElement(SpacingSection, null), /* @__PURE__ */ React46.createElement(EffectsSection, null)));
1792
+ const currentClassesProp = useCurrentClassesProp();
1793
+ const [selectedStyleDefId] = useSelectedStyleDefId(currentClassesProp);
1794
+ const breakpoint = useActiveBreakpoint();
1795
+ return /* @__PURE__ */ React62.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React62.createElement(StyleProvider, { meta: { breakpoint, state: null }, id: selectedStyleDefId }, /* @__PURE__ */ React62.createElement(Stack21, null, /* @__PURE__ */ React62.createElement(SpacingSection, null), /* @__PURE__ */ React62.createElement(SizeSection, null), /* @__PURE__ */ React62.createElement(PositionSection, null), /* @__PURE__ */ React62.createElement(TypographySection, null), /* @__PURE__ */ React62.createElement(BackgroundSection, null), /* @__PURE__ */ React62.createElement(BorderSection, null), /* @__PURE__ */ React62.createElement(EffectsSection, null))));
1544
1796
  };
1545
- function useClassesProp() {
1797
+ function useSelectedStyleDefId(currentClassesProp) {
1798
+ const { element } = useElement();
1799
+ const [selectedStyleDefId, setSelectedStyleDefId] = useState5(() => {
1800
+ const styleIds = getElementSetting(element.id, currentClassesProp)?.value ?? [];
1801
+ const stylesDefs = getElementStyles(element.id) ?? {};
1802
+ return styleIds.find((id) => id in stylesDefs) ?? generateId(`e-${element.id}-`, Object.keys(stylesDefs));
1803
+ });
1804
+ return [selectedStyleDefId, setSelectedStyleDefId];
1805
+ }
1806
+ function useCurrentClassesProp() {
1546
1807
  const { elementType } = useElement();
1547
1808
  const prop = Object.entries(elementType.propsSchema).find(
1548
1809
  ([, propType]) => propType.kind === "array" && propType.key === CLASSES_PROP_KEY
@@ -1552,39 +1813,76 @@ function useClassesProp() {
1552
1813
  }
1553
1814
  return prop[0];
1554
1815
  }
1555
- function useStyleDefinition() {
1556
- const { element } = useElement();
1557
- const elementStyles = useElementStyles(element.id);
1558
- return Object.values(elementStyles || {})[0] ?? null;
1559
- }
1560
1816
 
1561
1817
  // src/components/editing-panel-tabs.tsx
1562
1818
  var EditingPanelTabs = () => {
1563
1819
  const { getTabProps, getTabPanelProps, getTabsProps } = useTabs("settings");
1564
- return /* @__PURE__ */ React47.createElement(Stack17, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React47.createElement(Tabs, { variant: "fullWidth", indicatorColor: "secondary", textColor: "inherit", ...getTabsProps() }, /* @__PURE__ */ React47.createElement(Tab, { label: __24("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React47.createElement(Tab, { label: __24("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React47.createElement(TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React47.createElement(SettingsTab, null)), /* @__PURE__ */ React47.createElement(TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React47.createElement(StyleTab, null)));
1820
+ return /* @__PURE__ */ React63.createElement(Stack22, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React63.createElement(Tabs, { variant: "fullWidth", indicatorColor: "secondary", textColor: "inherit", ...getTabsProps() }, /* @__PURE__ */ React63.createElement(Tab, { label: __37("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React63.createElement(Tab, { label: __37("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React63.createElement(TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React63.createElement(SettingsTab, null)), /* @__PURE__ */ React63.createElement(TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React63.createElement(StyleTab, null)));
1565
1821
  };
1566
1822
 
1567
1823
  // src/components/editing-panel.tsx
1568
1824
  import { ErrorBoundary as ErrorBoundary2 } from "@elementor/ui";
1569
1825
 
1570
1826
  // src/components/editing-panel-error-fallback.tsx
1571
- import * as React48 from "react";
1827
+ import * as React64 from "react";
1572
1828
  import { Alert, Box as Box3 } from "@elementor/ui";
1573
1829
  function EditorPanelErrorFallback() {
1574
- return /* @__PURE__ */ React48.createElement(Box3, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React48.createElement(Alert, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React48.createElement("strong", null, "Something went wrong")));
1830
+ return /* @__PURE__ */ React64.createElement(Box3, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React64.createElement(Alert, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React64.createElement("strong", null, "Something went wrong")));
1831
+ }
1832
+
1833
+ // src/popover-action.tsx
1834
+ import * as React65 from "react";
1835
+ import { useId as useId5 } from "react";
1836
+ import { XIcon as XIcon2 } from "@elementor/icons";
1837
+ import { bindPopover as bindPopover3, bindToggle as bindToggle2, IconButton as IconButton4, Popover as Popover3, Stack as Stack23, Tooltip as Tooltip2, Typography as Typography4, usePopupState as usePopupState4 } from "@elementor/ui";
1838
+ var SIZE3 = "tiny";
1839
+ function PopoverAction({
1840
+ title,
1841
+ visible = true,
1842
+ icon: Icon,
1843
+ popoverContent: PopoverContent
1844
+ }) {
1845
+ const id = useId5();
1846
+ const popupState = usePopupState4({
1847
+ variant: "popover",
1848
+ popupId: `elementor-popover-action-${id}`
1849
+ });
1850
+ if (!visible) {
1851
+ return null;
1852
+ }
1853
+ return /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(Tooltip2, { placement: "top", title }, /* @__PURE__ */ React65.createElement(IconButton4, { "aria-label": title, key: id, size: SIZE3, ...bindToggle2(popupState) }, /* @__PURE__ */ React65.createElement(Icon, { fontSize: SIZE3 }))), /* @__PURE__ */ React65.createElement(
1854
+ Popover3,
1855
+ {
1856
+ disablePortal: true,
1857
+ disableScrollLock: true,
1858
+ anchorOrigin: {
1859
+ vertical: "bottom",
1860
+ horizontal: "center"
1861
+ },
1862
+ ...bindPopover3(popupState)
1863
+ },
1864
+ /* @__PURE__ */ React65.createElement(Stack23, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React65.createElement(Icon, { fontSize: SIZE3, sx: { mr: 0.5 } }), /* @__PURE__ */ React65.createElement(Typography4, { variant: "subtitle2" }, title), /* @__PURE__ */ React65.createElement(IconButton4, { sx: { ml: "auto" }, size: SIZE3, onClick: popupState.close }, /* @__PURE__ */ React65.createElement(XIcon2, { fontSize: SIZE3 }))),
1865
+ /* @__PURE__ */ React65.createElement(PopoverContent, { closePopover: popupState.close })
1866
+ ));
1575
1867
  }
1576
1868
 
1869
+ // src/controls-actions.ts
1870
+ var { useMenuItems, registerPopoverAction } = createControlActionsMenu({
1871
+ components: {
1872
+ PopoverAction
1873
+ }
1874
+ });
1875
+
1577
1876
  // src/components/editing-panel.tsx
1578
1877
  var EditingPanel = () => {
1579
- const elements = useSelectedElements();
1580
- const [selectedElement] = elements;
1581
- const elementType = useElementType(selectedElement?.type);
1582
- if (elements.length !== 1 || !elementType) {
1878
+ const { element, elementType } = useSelectedElement();
1879
+ const controlReplacement = getControlReplacement();
1880
+ const menuItems = useMenuItems().default;
1881
+ if (!element || !elementType) {
1583
1882
  return null;
1584
1883
  }
1585
- const controlReplacement = getControlReplacement();
1586
- const panelTitle = __25("Edit %s", "elementor").replace("%s", elementType.title);
1587
- return /* @__PURE__ */ React49.createElement(ErrorBoundary2, { fallback: /* @__PURE__ */ React49.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React49.createElement(Panel, null, /* @__PURE__ */ React49.createElement(PanelHeader, null, /* @__PURE__ */ React49.createElement(PanelHeaderTitle, null, panelTitle)), /* @__PURE__ */ React49.createElement(PanelBody, null, /* @__PURE__ */ React49.createElement(ControlReplacementProvider, { ...controlReplacement }, /* @__PURE__ */ React49.createElement(ElementProvider, { element: selectedElement, elementType }, /* @__PURE__ */ React49.createElement(EditingPanelTabs, null))))));
1884
+ const panelTitle = __38("Edit %s", "elementor").replace("%s", elementType.title);
1885
+ return /* @__PURE__ */ React66.createElement(ErrorBoundary2, { fallback: /* @__PURE__ */ React66.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React66.createElement(Panel, null, /* @__PURE__ */ React66.createElement(PanelHeader, null, /* @__PURE__ */ React66.createElement(PanelHeaderTitle, null, panelTitle)), /* @__PURE__ */ React66.createElement(PanelBody, null, /* @__PURE__ */ React66.createElement(ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React66.createElement(ControlReplacementProvider, { ...controlReplacement }, /* @__PURE__ */ React66.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React66.createElement(EditingPanelTabs, null)))))));
1588
1886
  };
1589
1887
 
1590
1888
  // src/panel.ts
@@ -1597,6 +1895,7 @@ var { panel, usePanelActions, usePanelStatus } = createPanel({
1597
1895
  import { injectIntoLogic } from "@elementor/editor";
1598
1896
 
1599
1897
  // src/sync/should-use-v2-panel.ts
1898
+ import { getSelectedElements, getWidgetsCache } from "@elementor/editor-elements";
1600
1899
  var shouldUseV2Panel = () => {
1601
1900
  const selectedElements = getSelectedElements();
1602
1901
  const widgetCache = getWidgetsCache();
@@ -1631,11 +1930,30 @@ import { __registerPanel as registerPanel } from "@elementor/editor-panels";
1631
1930
  import { __privateBlockDataCommand as blockDataCommand } from "@elementor/editor-v1-adapters";
1632
1931
 
1633
1932
  // src/dynamics/components/dynamic-selection-control.tsx
1634
- import * as React52 from "react";
1635
- import { useId as useId5 } from "react";
1933
+ import * as React69 from "react";
1934
+ import { useId as useId6 } from "react";
1935
+ import { __ as __40 } from "@wordpress/i18n";
1936
+ import { DatabaseIcon, SettingsIcon, XIcon as XIcon3 } from "@elementor/icons";
1937
+ import {
1938
+ bindPopover as bindPopover4,
1939
+ bindTrigger as bindTrigger3,
1940
+ Box as Box5,
1941
+ IconButton as IconButton5,
1942
+ Paper,
1943
+ Popover as Popover4,
1944
+ Stack as Stack25,
1945
+ Typography as Typography6,
1946
+ UnstableTag as Tag,
1947
+ usePopupState as usePopupState5,
1948
+ Tabs as Tabs2,
1949
+ Divider as Divider6,
1950
+ useTabs as useTabs2,
1951
+ Tab as Tab2,
1952
+ TabPanel as TabPanel2
1953
+ } from "@elementor/ui";
1636
1954
 
1637
1955
  // src/dynamics/dynamic-control.tsx
1638
- import * as React50 from "react";
1956
+ import * as React67 from "react";
1639
1957
 
1640
1958
  // src/dynamics/hooks/use-dynamic-tag.ts
1641
1959
  import { useMemo as useMemo2 } from "react";
@@ -1661,17 +1979,8 @@ var getAtomicDynamicTags = () => {
1661
1979
  };
1662
1980
  };
1663
1981
 
1664
- // src/controls/props/is-transformable.ts
1665
- import { z } from "@elementor/schema";
1666
- var transformableSchema = z.object({
1667
- $$type: z.string(),
1668
- value: z.any()
1669
- });
1670
- var isTransformable = (value) => {
1671
- return transformableSchema.safeParse(value).success;
1672
- };
1673
-
1674
1982
  // src/dynamics/utils.ts
1983
+ import { isTransformable } from "@elementor/editor-props";
1675
1984
  var DYNAMIC_PROP_TYPE_KEY = "dynamic";
1676
1985
  var isDynamicPropType = (prop) => prop.key === DYNAMIC_PROP_TYPE_KEY;
1677
1986
  var getDynamicPropType = (propType) => {
@@ -1715,7 +2024,7 @@ var useDynamicTag = (propName, tagName) => {
1715
2024
 
1716
2025
  // src/dynamics/dynamic-control.tsx
1717
2026
  var DynamicControl = ({ bind, children }) => {
1718
- const { value, setValue, bind: propName } = useControl();
2027
+ const { value, setValue, bind: propName } = useBoundProp();
1719
2028
  const { name = "", settings } = value?.value ?? {};
1720
2029
  const dynamicTag = useDynamicTag(propName, name);
1721
2030
  if (!dynamicTag) {
@@ -1735,29 +2044,26 @@ var DynamicControl = ({ bind, children }) => {
1735
2044
  }
1736
2045
  });
1737
2046
  };
1738
- return /* @__PURE__ */ React50.createElement(ControlContext.Provider, { value: { setValue: setDynamicValue, value: dynamicValue, bind } }, children);
2047
+ return /* @__PURE__ */ React67.createElement(BoundPropProvider, { setValue: setDynamicValue, value: dynamicValue, bind }, children);
1739
2048
  };
1740
2049
 
1741
- // src/dynamics/components/dynamic-selection-control.tsx
1742
- import { DatabaseIcon, SettingsIcon, XIcon as XIcon3 } from "@elementor/icons";
1743
-
1744
2050
  // src/dynamics/components/dynamic-selection.tsx
1745
- import * as React51 from "react";
1746
- import { useState as useState4, Fragment as Fragment4 } from "react";
2051
+ import * as React68 from "react";
2052
+ import { useState as useState6, Fragment as Fragment7 } from "react";
1747
2053
  import { SearchIcon, PhotoIcon } from "@elementor/icons";
1748
2054
  import {
1749
2055
  Box as Box4,
1750
- Divider as Divider3,
2056
+ Divider as Divider5,
1751
2057
  InputAdornment as InputAdornment3,
1752
2058
  Link,
1753
2059
  ListSubheader,
1754
2060
  MenuItem as MenuItem3,
1755
2061
  MenuList,
1756
- Stack as Stack18,
2062
+ Stack as Stack24,
1757
2063
  TextField as TextField5,
1758
- Typography as Typography4
2064
+ Typography as Typography5
1759
2065
  } from "@elementor/ui";
1760
- import { __ as __26 } from "@wordpress/i18n";
2066
+ import { __ as __39 } from "@wordpress/i18n";
1761
2067
 
1762
2068
  // src/dynamics/hooks/use-prop-value-history.ts
1763
2069
  var PROPS_VALUES_HISTORY_KEY = "elementor/dynamic/non-dynamic-values-history";
@@ -1779,14 +2085,14 @@ var setValues = (values) => {
1779
2085
  };
1780
2086
 
1781
2087
  // src/dynamics/components/dynamic-selection.tsx
1782
- var SIZE3 = "tiny";
2088
+ var SIZE4 = "tiny";
1783
2089
  var DynamicSelection = ({ onSelect }) => {
1784
- const [searchValue, setSearchValue] = useState4("");
2090
+ const [searchValue, setSearchValue] = useState6("");
1785
2091
  const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
1786
- const { bind, value: currentValue, setValue } = useControl();
2092
+ const { bind, value: currentValue, setValue } = useBoundProp();
1787
2093
  const [, updatePropValueHistory] = usePropValueHistory(bind);
1788
2094
  const isCurrentValueDynamic = isDynamicPropValue(currentValue);
1789
- const options4 = useFilteredOptions(bind, searchValue);
2095
+ const options5 = useFilteredOptions(bind, searchValue);
1790
2096
  const handleSearch = (event) => {
1791
2097
  setSearchValue(event.target.value);
1792
2098
  };
@@ -1797,21 +2103,21 @@ var DynamicSelection = ({ onSelect }) => {
1797
2103
  setValue({ $$type: "dynamic", value: { name: value, settings: {} } });
1798
2104
  onSelect?.();
1799
2105
  };
1800
- return /* @__PURE__ */ React51.createElement(Stack18, null, /* @__PURE__ */ React51.createElement(Box4, { px: 1.5, pb: 1 }, /* @__PURE__ */ React51.createElement(
2106
+ return /* @__PURE__ */ React68.createElement(Stack24, null, /* @__PURE__ */ React68.createElement(Box4, { px: 1.5, pb: 1 }, /* @__PURE__ */ React68.createElement(
1801
2107
  TextField5,
1802
2108
  {
1803
2109
  fullWidth: true,
1804
- size: SIZE3,
2110
+ size: SIZE4,
1805
2111
  value: searchValue,
1806
2112
  onChange: handleSearch,
1807
- placeholder: __26("Search dynamic tag", "elementor"),
2113
+ placeholder: __39("Search dynamic tag", "elementor"),
1808
2114
  InputProps: {
1809
- startAdornment: /* @__PURE__ */ React51.createElement(InputAdornment3, { position: "start" }, /* @__PURE__ */ React51.createElement(SearchIcon, { fontSize: SIZE3 }))
2115
+ startAdornment: /* @__PURE__ */ React68.createElement(InputAdornment3, { position: "start" }, /* @__PURE__ */ React68.createElement(SearchIcon, { fontSize: SIZE4 }))
1810
2116
  }
1811
2117
  }
1812
- )), /* @__PURE__ */ React51.createElement(Divider3, null), /* @__PURE__ */ React51.createElement(Box4, { sx: { overflowY: "auto", height: 260, width: 220 } }, options4.length > 0 ? /* @__PURE__ */ React51.createElement(MenuList, { role: "listbox", tabIndex: 0 }, options4.map(([category, items], index) => /* @__PURE__ */ React51.createElement(Fragment4, { key: index }, /* @__PURE__ */ React51.createElement(ListSubheader, { sx: { typography: "caption", color: "text.tertiary" } }, dynamicGroups?.[category]?.title || category), items.map(({ value, label: tagLabel }) => {
2118
+ )), /* @__PURE__ */ React68.createElement(Divider5, null), /* @__PURE__ */ React68.createElement(Box4, { sx: { overflowY: "auto", height: 260, width: 220 } }, options5.length > 0 ? /* @__PURE__ */ React68.createElement(MenuList, { role: "listbox", tabIndex: 0 }, options5.map(([category, items], index) => /* @__PURE__ */ React68.createElement(Fragment7, { key: index }, /* @__PURE__ */ React68.createElement(ListSubheader, { sx: { typography: "caption", color: "text.tertiary" } }, dynamicGroups?.[category]?.title || category), items.map(({ value, label: tagLabel }) => {
1813
2119
  const isSelected = isCurrentValueDynamic && value === currentValue?.value?.name;
1814
- return /* @__PURE__ */ React51.createElement(
2120
+ return /* @__PURE__ */ React68.createElement(
1815
2121
  MenuItem3,
1816
2122
  {
1817
2123
  key: value,
@@ -1822,7 +2128,7 @@ var DynamicSelection = ({ onSelect }) => {
1822
2128
  },
1823
2129
  tagLabel
1824
2130
  );
1825
- })))) : /* @__PURE__ */ React51.createElement(Stack18, { alignItems: "center", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React51.createElement(PhotoIcon, { fontSize: "large" }), /* @__PURE__ */ React51.createElement(Typography4, { align: "center", variant: "caption", color: "text.secondary" }, __26("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React51.createElement("br", null), "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React51.createElement(Typography4, { align: "center", variant: "caption", color: "text.secondary" }, /* @__PURE__ */ React51.createElement(
2131
+ })))) : /* @__PURE__ */ React68.createElement(Stack24, { alignItems: "center", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React68.createElement(PhotoIcon, { fontSize: "large" }), /* @__PURE__ */ React68.createElement(Typography5, { align: "center", variant: "caption", color: "text.secondary" }, __39("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React68.createElement("br", null), "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React68.createElement(Typography5, { align: "center", variant: "caption", color: "text.secondary" }, /* @__PURE__ */ React68.createElement(
1826
2132
  Link,
1827
2133
  {
1828
2134
  color: "secondary",
@@ -1830,12 +2136,12 @@ var DynamicSelection = ({ onSelect }) => {
1830
2136
  component: "button",
1831
2137
  onClick: () => setSearchValue("")
1832
2138
  },
1833
- __26("Clear the filters", "elementor")
1834
- ), "\xA0", __26("and try again.", "elementor")))));
2139
+ __39("Clear the filters", "elementor")
2140
+ ), "\xA0", __39("and try again.", "elementor")))));
1835
2141
  };
1836
2142
  var useFilteredOptions = (bind, searchValue) => {
1837
2143
  const dynamicTags = usePropDynamicTags(bind);
1838
- const options4 = dynamicTags.reduce((categories, { name, label, group }) => {
2144
+ const options5 = dynamicTags.reduce((categories, { name, label, group }) => {
1839
2145
  const isVisible = label.toLowerCase().includes(searchValue.trim().toLowerCase());
1840
2146
  if (!isVisible) {
1841
2147
  return categories;
@@ -1846,35 +2152,17 @@ var useFilteredOptions = (bind, searchValue) => {
1846
2152
  categories.get(group)?.push({ label, value: name });
1847
2153
  return categories;
1848
2154
  }, /* @__PURE__ */ new Map());
1849
- return [...options4];
2155
+ return [...options5];
1850
2156
  };
1851
2157
 
1852
2158
  // src/dynamics/components/dynamic-selection-control.tsx
1853
- import {
1854
- bindPopover as bindPopover3,
1855
- bindTrigger as bindTrigger3,
1856
- Box as Box5,
1857
- IconButton as IconButton3,
1858
- Paper,
1859
- Popover as Popover3,
1860
- Stack as Stack19,
1861
- Typography as Typography5,
1862
- UnstableTag as Tag,
1863
- usePopupState as usePopupState4,
1864
- Tabs as Tabs2,
1865
- Divider as Divider4,
1866
- useTabs as useTabs2,
1867
- Tab as Tab2,
1868
- TabPanel as TabPanel2
1869
- } from "@elementor/ui";
1870
- import { __ as __27 } from "@wordpress/i18n";
1871
- var SIZE4 = "tiny";
2159
+ var SIZE5 = "tiny";
1872
2160
  var DynamicSelectionControl = () => {
1873
- const { bind, value, setValue } = useControl();
2161
+ const { bind, value, setValue } = useBoundProp();
1874
2162
  const [propValueFromHistory] = usePropValueHistory(bind);
1875
2163
  const { name: tagName = "" } = value?.value || {};
1876
- const selectionPopoverId = useId5();
1877
- const selectionPopoverState = usePopupState4({ variant: "popover", popupId: selectionPopoverId });
2164
+ const selectionPopoverId = useId6();
2165
+ const selectionPopoverState = usePopupState5({ variant: "popover", popupId: selectionPopoverId });
1878
2166
  const dynamicTag = useDynamicTag(bind, tagName);
1879
2167
  const removeDynamicTag = () => {
1880
2168
  setValue(propValueFromHistory ?? null);
@@ -1882,58 +2170,58 @@ var DynamicSelectionControl = () => {
1882
2170
  if (!dynamicTag) {
1883
2171
  throw new Error(`Dynamic tag ${tagName} not found`);
1884
2172
  }
1885
- return /* @__PURE__ */ React52.createElement(Box5, null, /* @__PURE__ */ React52.createElement(
2173
+ return /* @__PURE__ */ React69.createElement(Box5, null, /* @__PURE__ */ React69.createElement(
1886
2174
  Tag,
1887
2175
  {
1888
2176
  fullWidth: true,
1889
2177
  showActionsOnHover: true,
1890
2178
  label: dynamicTag.label,
1891
- startIcon: /* @__PURE__ */ React52.createElement(DatabaseIcon, { fontSize: SIZE4 }),
2179
+ startIcon: /* @__PURE__ */ React69.createElement(DatabaseIcon, { fontSize: SIZE5 }),
1892
2180
  ...bindTrigger3(selectionPopoverState),
1893
- actions: /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React52.createElement(
1894
- IconButton3,
2181
+ actions: /* @__PURE__ */ React69.createElement(React69.Fragment, null, /* @__PURE__ */ React69.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React69.createElement(
2182
+ IconButton5,
1895
2183
  {
1896
- size: SIZE4,
2184
+ size: SIZE5,
1897
2185
  onClick: removeDynamicTag,
1898
- "aria-label": __27("Remove dynamic value", "elementor")
2186
+ "aria-label": __40("Remove dynamic value", "elementor")
1899
2187
  },
1900
- /* @__PURE__ */ React52.createElement(XIcon3, { fontSize: SIZE4 })
2188
+ /* @__PURE__ */ React69.createElement(XIcon3, { fontSize: SIZE5 })
1901
2189
  ))
1902
2190
  }
1903
- ), /* @__PURE__ */ React52.createElement(
1904
- Popover3,
2191
+ ), /* @__PURE__ */ React69.createElement(
2192
+ Popover4,
1905
2193
  {
1906
2194
  disablePortal: true,
1907
2195
  disableScrollLock: true,
1908
2196
  anchorOrigin: { vertical: "bottom", horizontal: "left" },
1909
- ...bindPopover3(selectionPopoverState)
2197
+ ...bindPopover4(selectionPopoverState)
1910
2198
  },
1911
- /* @__PURE__ */ React52.createElement(Stack19, null, /* @__PURE__ */ React52.createElement(Stack19, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React52.createElement(DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React52.createElement(Typography5, { variant: "subtitle2" }, __27("Dynamic Tags", "elementor")), /* @__PURE__ */ React52.createElement(IconButton3, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React52.createElement(XIcon3, { fontSize: SIZE4 }))), /* @__PURE__ */ React52.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
2199
+ /* @__PURE__ */ React69.createElement(Stack25, null, /* @__PURE__ */ React69.createElement(Stack25, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React69.createElement(DatabaseIcon, { fontSize: SIZE5, sx: { mr: 0.5 } }), /* @__PURE__ */ React69.createElement(Typography6, { variant: "subtitle2" }, __40("Dynamic Tags", "elementor")), /* @__PURE__ */ React69.createElement(IconButton5, { size: SIZE5, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React69.createElement(XIcon3, { fontSize: SIZE5 }))), /* @__PURE__ */ React69.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
1912
2200
  ));
1913
2201
  };
1914
2202
  var DynamicSettingsPopover = ({ dynamicTag }) => {
1915
- const popupId = useId5();
1916
- const settingsPopupState = usePopupState4({ variant: "popover", popupId });
2203
+ const popupId = useId6();
2204
+ const settingsPopupState = usePopupState5({ variant: "popover", popupId });
1917
2205
  const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
1918
2206
  if (!hasDynamicSettings) {
1919
2207
  return null;
1920
2208
  }
1921
- return /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement(
1922
- IconButton3,
2209
+ return /* @__PURE__ */ React69.createElement(React69.Fragment, null, /* @__PURE__ */ React69.createElement(
2210
+ IconButton5,
1923
2211
  {
1924
- size: SIZE4,
2212
+ size: SIZE5,
1925
2213
  ...bindTrigger3(settingsPopupState),
1926
- "aria-label": __27("Settings", "elementor")
2214
+ "aria-label": __40("Settings", "elementor")
1927
2215
  },
1928
- /* @__PURE__ */ React52.createElement(SettingsIcon, { fontSize: SIZE4 })
1929
- ), /* @__PURE__ */ React52.createElement(
1930
- Popover3,
2216
+ /* @__PURE__ */ React69.createElement(SettingsIcon, { fontSize: SIZE5 })
2217
+ ), /* @__PURE__ */ React69.createElement(
2218
+ Popover4,
1931
2219
  {
1932
2220
  disableScrollLock: true,
1933
2221
  anchorOrigin: { vertical: "bottom", horizontal: "center" },
1934
- ...bindPopover3(settingsPopupState)
2222
+ ...bindPopover4(settingsPopupState)
1935
2223
  },
1936
- /* @__PURE__ */ React52.createElement(Paper, { component: Stack19, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React52.createElement(Stack19, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React52.createElement(DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React52.createElement(Typography5, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React52.createElement(IconButton3, { sx: { ml: "auto" }, size: SIZE4, onClick: settingsPopupState.close }, /* @__PURE__ */ React52.createElement(XIcon3, { fontSize: SIZE4 }))), /* @__PURE__ */ React52.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
2224
+ /* @__PURE__ */ React69.createElement(Paper, { component: Stack25, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React69.createElement(Stack25, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React69.createElement(DatabaseIcon, { fontSize: SIZE5, sx: { mr: 0.5 } }), /* @__PURE__ */ React69.createElement(Typography6, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React69.createElement(IconButton5, { sx: { ml: "auto" }, size: SIZE5, onClick: settingsPopupState.close }, /* @__PURE__ */ React69.createElement(XIcon3, { fontSize: SIZE5 }))), /* @__PURE__ */ React69.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
1937
2225
  ));
1938
2226
  };
1939
2227
  var DynamicSettings = ({ controls }) => {
@@ -1942,10 +2230,10 @@ var DynamicSettings = ({ controls }) => {
1942
2230
  if (!tabs.length) {
1943
2231
  return null;
1944
2232
  }
1945
- return /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement(Tabs2, { indicatorColor: "secondary", textColor: "secondary", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React52.createElement(Tab2, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React52.createElement(Divider4, null), tabs.map(({ value }, index) => {
1946
- return /* @__PURE__ */ React52.createElement(TabPanel2, { key: index, sx: { flexGrow: 1 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React52.createElement(Stack19, { gap: 1, px: 2 }, value.items.map((item) => {
2233
+ return /* @__PURE__ */ React69.createElement(React69.Fragment, null, /* @__PURE__ */ React69.createElement(Tabs2, { indicatorColor: "secondary", textColor: "secondary", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React69.createElement(Tab2, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React69.createElement(Divider6, null), tabs.map(({ value }, index) => {
2234
+ return /* @__PURE__ */ React69.createElement(TabPanel2, { key: index, sx: { flexGrow: 1 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React69.createElement(Stack25, { gap: 1, px: 2 }, value.items.map((item) => {
1947
2235
  if (item.type === "control") {
1948
- return /* @__PURE__ */ React52.createElement(Control6, { key: item.value.bind, control: item.value });
2236
+ return /* @__PURE__ */ React69.createElement(Control6, { key: item.value.bind, control: item.value });
1949
2237
  }
1950
2238
  return null;
1951
2239
  })));
@@ -1955,28 +2243,27 @@ var Control6 = ({ control }) => {
1955
2243
  if (!getControlByType(control.type)) {
1956
2244
  return null;
1957
2245
  }
1958
- return /* @__PURE__ */ React52.createElement(DynamicControl, { bind: control.bind }, control.label ? /* @__PURE__ */ React52.createElement(ControlLabel, null, control.label) : null, /* @__PURE__ */ React52.createElement(Control, { type: control.type, props: control.props }));
2246
+ return /* @__PURE__ */ React69.createElement(DynamicControl, { bind: control.bind }, control.label ? /* @__PURE__ */ React69.createElement(ControlLabel, null, control.label) : null, /* @__PURE__ */ React69.createElement(Control3, { type: control.type, props: control.props }));
1959
2247
  };
1960
2248
 
1961
2249
  // src/dynamics/hooks/use-prop-dynamic-action.tsx
1962
- import * as React53 from "react";
2250
+ import * as React70 from "react";
2251
+ import { __ as __41 } from "@wordpress/i18n";
1963
2252
  import { DatabaseIcon as DatabaseIcon2 } from "@elementor/icons";
1964
- import { __ as __28 } from "@wordpress/i18n";
1965
2253
  var usePropDynamicAction = () => {
1966
- const { bind } = useControl();
2254
+ const { bind } = useBoundProp();
1967
2255
  const { elementType } = useElement();
1968
2256
  const propType = elementType.propsSchema[bind];
1969
2257
  const visible = !!propType && supportsDynamic(propType);
1970
2258
  return {
1971
2259
  visible,
1972
2260
  icon: DatabaseIcon2,
1973
- title: __28("Dynamic Tags", "elementor"),
1974
- popoverContent: ({ closePopover }) => /* @__PURE__ */ React53.createElement(DynamicSelection, { onSelect: closePopover })
2261
+ title: __41("Dynamic Tags", "elementor"),
2262
+ popoverContent: ({ closePopover }) => /* @__PURE__ */ React70.createElement(DynamicSelection, { onSelect: closePopover })
1975
2263
  };
1976
2264
  };
1977
2265
 
1978
2266
  // src/dynamics/init.ts
1979
- var { registerPopoverAction } = controlActionsMenu;
1980
2267
  var init = () => {
1981
2268
  replaceControl({
1982
2269
  component: DynamicSelectionControl,
@@ -2008,8 +2295,7 @@ var blockV1Panel = () => {
2008
2295
  // src/index.ts
2009
2296
  init2();
2010
2297
  export {
2011
- controlActionsMenu,
2012
2298
  replaceControl,
2013
- useControl
2299
+ useBoundProp
2014
2300
  };
2015
2301
  //# sourceMappingURL=index.mjs.map