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