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