@elementor/editor-editing-panel 1.10.0 → 1.11.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 +73 -0
- package/dist/index.js +680 -685
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +632 -641
- package/dist/index.mjs.map +1 -1
- package/package.json +18 -15
- package/src/components/css-classes/css-class-item.tsx +130 -0
- package/src/components/css-classes/css-class-menu.tsx +151 -0
- package/src/components/{css-class-selector.tsx → css-classes/css-class-selector.tsx} +23 -154
- package/src/components/style-sections/layout-section/display-field.tsx +9 -1
- package/src/components/style-sections/layout-section/flex-order-field.tsx +5 -5
- package/src/components/style-sections/layout-section/flex-size-field.tsx +1 -1
- package/src/components/style-sections/layout-section/gap-control-field.tsx +0 -2
- package/src/components/style-sections/position-section/dimensions-field.tsx +1 -1
- package/src/components/style-sections/position-section/position-section.tsx +1 -1
- package/src/components/style-sections/typography-section/font-weight-field.tsx +9 -5
- package/src/components/style-sections/typography-section/text-alignment-field.tsx +16 -8
- package/src/components/style-sections/typography-section/transform-field.tsx +12 -3
- package/src/components/style-tab.tsx +1 -1
- package/src/controls-registry/controls-registry.tsx +3 -1
- package/src/controls-registry/settings-field.tsx +8 -1
- package/src/dynamics/components/dynamic-selection.tsx +1 -1
- package/src/dynamics/dynamic-control.tsx +1 -1
- package/src/dynamics/types.ts +2 -2
- package/src/dynamics/utils.ts +2 -2
- package/src/hooks/use-persist-dynamic-value.ts +1 -1
- package/src/hooks/use-styles-fields.ts +113 -9
- package/src/index.ts +1 -1
- package/src/init.ts +2 -2
- package/src/sync/types.ts +4 -3
- package/src/components/collapsible-field.tsx +0 -36
- package/src/components/css-class-menu.tsx +0 -101
- package/src/components/editable-field.tsx +0 -166
- package/src/hooks/use-session-storage.ts +0 -46
- package/src/sync/enqueue-font.ts +0 -7
package/dist/index.js
CHANGED
|
@@ -43,17 +43,14 @@ var import_editor_controls47 = require("@elementor/editor-controls");
|
|
|
43
43
|
var import_editor_controls = require("@elementor/editor-controls");
|
|
44
44
|
var { replaceControl, getControlReplacement } = (0, import_editor_controls.createControlReplacement)();
|
|
45
45
|
|
|
46
|
-
// src/components/css-class-selector.tsx
|
|
46
|
+
// src/components/css-classes/css-class-selector.tsx
|
|
47
47
|
var React7 = __toESM(require("react"));
|
|
48
|
-
var import_react6 = require("react");
|
|
49
48
|
var import_editor_elements2 = require("@elementor/editor-elements");
|
|
50
49
|
var import_editor_props = require("@elementor/editor-props");
|
|
51
|
-
var
|
|
52
|
-
var import_editor_ui = require("@elementor/editor-ui");
|
|
53
|
-
var import_icons2 = require("@elementor/icons");
|
|
50
|
+
var import_editor_styles_repository4 = require("@elementor/editor-styles-repository");
|
|
54
51
|
var import_locations = require("@elementor/locations");
|
|
55
52
|
var import_ui4 = require("@elementor/ui");
|
|
56
|
-
var
|
|
53
|
+
var import_i18n3 = require("@wordpress/i18n");
|
|
57
54
|
|
|
58
55
|
// src/contexts/classes-prop-context.tsx
|
|
59
56
|
var React = __toESM(require("react"));
|
|
@@ -132,214 +129,10 @@ function getProviderByStyleId(styleId) {
|
|
|
132
129
|
return styleProvider ?? null;
|
|
133
130
|
}
|
|
134
131
|
|
|
135
|
-
// src/components/
|
|
132
|
+
// src/components/multi-combobox.tsx
|
|
136
133
|
var React4 = __toESM(require("react"));
|
|
137
|
-
var import_icons = require("@elementor/icons");
|
|
138
|
-
var import_ui = require("@elementor/ui");
|
|
139
|
-
var import_i18n = require("@wordpress/i18n");
|
|
140
|
-
|
|
141
|
-
// src/hooks/use-unapply-class.ts
|
|
142
|
-
var import_editor_elements = require("@elementor/editor-elements");
|
|
143
|
-
var useUnapplyClass = (classId) => {
|
|
144
|
-
const { element } = useElement();
|
|
145
|
-
const { setId: setStyleId } = useStyle();
|
|
146
|
-
const classesProp = useClassesProp();
|
|
147
|
-
const classes = (0, import_editor_elements.useElementSetting)(element.id, classesProp);
|
|
148
|
-
const filteredClasses = classes?.value.filter((className) => className !== classId) ?? [];
|
|
149
|
-
return () => {
|
|
150
|
-
(0, import_editor_elements.updateElementSettings)({
|
|
151
|
-
id: element.id,
|
|
152
|
-
props: {
|
|
153
|
-
[classesProp]: {
|
|
154
|
-
$$type: "classes",
|
|
155
|
-
value: filteredClasses
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
setStyleId(null);
|
|
160
|
-
};
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
// src/components/css-class-menu.tsx
|
|
164
|
-
var STATES = ["hover", "focus", "active"];
|
|
165
|
-
function CssClassMenu({ styleId, isFixed = false, popupState }) {
|
|
166
|
-
const handleKeyDown = (e) => {
|
|
167
|
-
e.stopPropagation();
|
|
168
|
-
};
|
|
169
|
-
return /* @__PURE__ */ React4.createElement(
|
|
170
|
-
import_ui.Menu,
|
|
171
|
-
{
|
|
172
|
-
MenuListProps: { dense: true },
|
|
173
|
-
...(0, import_ui.bindMenu)(popupState),
|
|
174
|
-
anchorOrigin: {
|
|
175
|
-
vertical: "top",
|
|
176
|
-
horizontal: "right"
|
|
177
|
-
},
|
|
178
|
-
onKeyDown: handleKeyDown
|
|
179
|
-
},
|
|
180
|
-
!isFixed && [
|
|
181
|
-
/* @__PURE__ */ React4.createElement(UnapplyClassMenuItem, { key: "unapply-class", styleId }),
|
|
182
|
-
/* @__PURE__ */ React4.createElement(import_ui.Divider, { key: "global-class-items-divider" })
|
|
183
|
-
],
|
|
184
|
-
/* @__PURE__ */ React4.createElement(import_ui.ListSubheader, null, (0, import_i18n.__)("Add a pseudo selector", "elementor")),
|
|
185
|
-
/* @__PURE__ */ React4.createElement(StateMenuItem, { key: "normal", state: null, styleId }),
|
|
186
|
-
STATES.map((state) => {
|
|
187
|
-
return /* @__PURE__ */ React4.createElement(StateMenuItem, { key: state, state, styleId });
|
|
188
|
-
})
|
|
189
|
-
);
|
|
190
|
-
}
|
|
191
|
-
function StateMenuItem({ state, styleId, ...props }) {
|
|
192
|
-
const { id: activeId, setId: setActiveId, setMetaState: setActiveMetaState, meta } = useStyle();
|
|
193
|
-
const { state: activeState } = meta;
|
|
194
|
-
const isActive = styleId === activeId;
|
|
195
|
-
const isSelected = state === activeState && isActive;
|
|
196
|
-
return /* @__PURE__ */ React4.createElement(
|
|
197
|
-
StyledMenuItem,
|
|
198
|
-
{
|
|
199
|
-
...props,
|
|
200
|
-
selected: isSelected,
|
|
201
|
-
onClick: () => {
|
|
202
|
-
if (!isActive) {
|
|
203
|
-
setActiveId(styleId);
|
|
204
|
-
}
|
|
205
|
-
setActiveMetaState(state);
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
isSelected && /* @__PURE__ */ React4.createElement(import_ui.ListItemIcon, null, /* @__PURE__ */ React4.createElement(import_icons.CheckIcon, null)),
|
|
209
|
-
/* @__PURE__ */ React4.createElement(import_ui.ListItemText, { primary: state ? `:${state}` : "Normal" })
|
|
210
|
-
);
|
|
211
|
-
}
|
|
212
|
-
function UnapplyClassMenuItem({ styleId, ...props }) {
|
|
213
|
-
const unapplyClass = useUnapplyClass(styleId);
|
|
214
|
-
return /* @__PURE__ */ React4.createElement(StyledMenuItem, { ...props, onClick: unapplyClass }, /* @__PURE__ */ React4.createElement(import_ui.ListItemText, { primary: "Remove" }));
|
|
215
|
-
}
|
|
216
|
-
var StyledMenuItem = (0, import_ui.styled)(import_ui.MenuItem)({
|
|
217
|
-
"&:hover": {
|
|
218
|
-
color: "text.primary"
|
|
219
|
-
// Overriding global CSS from the editor.
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
|
|
223
|
-
// src/components/editable-field.tsx
|
|
224
|
-
var React5 = __toESM(require("react"));
|
|
225
134
|
var import_react4 = require("react");
|
|
226
|
-
var
|
|
227
|
-
var Context4 = (0, import_react4.createContext)(null);
|
|
228
|
-
var EditableFieldProvider = ({
|
|
229
|
-
children,
|
|
230
|
-
value,
|
|
231
|
-
onSubmit,
|
|
232
|
-
validation,
|
|
233
|
-
editable
|
|
234
|
-
}) => {
|
|
235
|
-
const [isEditing, setIsEditing] = (0, import_react4.useState)(false);
|
|
236
|
-
const [submitting, setSubmitting] = (0, import_react4.useState)(false);
|
|
237
|
-
const [error, setError] = (0, import_react4.useState)(null);
|
|
238
|
-
const openEditMode = () => {
|
|
239
|
-
setIsEditing(true);
|
|
240
|
-
};
|
|
241
|
-
const closeEditMode = () => {
|
|
242
|
-
setError(null);
|
|
243
|
-
setIsEditing(false);
|
|
244
|
-
};
|
|
245
|
-
const submit = async (newValue) => {
|
|
246
|
-
if (!error) {
|
|
247
|
-
setSubmitting(true);
|
|
248
|
-
try {
|
|
249
|
-
await onSubmit(newValue);
|
|
250
|
-
} finally {
|
|
251
|
-
setSubmitting(false);
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
closeEditMode();
|
|
255
|
-
};
|
|
256
|
-
const onChange = (event) => {
|
|
257
|
-
const { innerText: newValue } = event.target;
|
|
258
|
-
if (validation) {
|
|
259
|
-
setError(validation(newValue));
|
|
260
|
-
}
|
|
261
|
-
};
|
|
262
|
-
return /* @__PURE__ */ React5.createElement(
|
|
263
|
-
Context4.Provider,
|
|
264
|
-
{
|
|
265
|
-
value: {
|
|
266
|
-
isEditing,
|
|
267
|
-
openEditMode,
|
|
268
|
-
closeEditMode,
|
|
269
|
-
onChange,
|
|
270
|
-
value,
|
|
271
|
-
error,
|
|
272
|
-
submit,
|
|
273
|
-
editable,
|
|
274
|
-
submitting
|
|
275
|
-
}
|
|
276
|
-
},
|
|
277
|
-
children
|
|
278
|
-
);
|
|
279
|
-
};
|
|
280
|
-
var EditableField = ({ children, onClick, ...props }) => {
|
|
281
|
-
const ref = (0, import_react4.useRef)(null);
|
|
282
|
-
const { isEditing, closeEditMode, value, onChange, error, submit, editable } = useEditableField();
|
|
283
|
-
(0, import_react4.useEffect)(() => {
|
|
284
|
-
if (isEditing) {
|
|
285
|
-
ref.current?.focus();
|
|
286
|
-
selectAll();
|
|
287
|
-
}
|
|
288
|
-
}, [isEditing]);
|
|
289
|
-
const handleKeyDown = (event) => {
|
|
290
|
-
event.stopPropagation();
|
|
291
|
-
if (["Escape"].includes(event.key)) {
|
|
292
|
-
return closeEditMode();
|
|
293
|
-
}
|
|
294
|
-
if (["Enter"].includes(event.key)) {
|
|
295
|
-
event.preventDefault();
|
|
296
|
-
return submit(event.target.innerText);
|
|
297
|
-
}
|
|
298
|
-
};
|
|
299
|
-
const handleClick = (event) => {
|
|
300
|
-
if (isEditing) {
|
|
301
|
-
event.stopPropagation();
|
|
302
|
-
}
|
|
303
|
-
onClick?.(event);
|
|
304
|
-
};
|
|
305
|
-
const selectAll = () => {
|
|
306
|
-
const selection = getSelection();
|
|
307
|
-
if (!selection || !ref.current) {
|
|
308
|
-
return;
|
|
309
|
-
}
|
|
310
|
-
const range = document.createRange();
|
|
311
|
-
range.selectNodeContents(ref.current);
|
|
312
|
-
selection.removeAllRanges();
|
|
313
|
-
selection.addRange(range);
|
|
314
|
-
};
|
|
315
|
-
if (!editable) {
|
|
316
|
-
return children;
|
|
317
|
-
}
|
|
318
|
-
return /* @__PURE__ */ React5.createElement(import_ui2.Tooltip, { open: !!error, title: error, placement: "top" }, /* @__PURE__ */ React5.createElement("div", { onKeyDown: handleKeyDown, onClick: handleClick, ...props }, /* @__PURE__ */ React5.createElement(
|
|
319
|
-
"span",
|
|
320
|
-
{
|
|
321
|
-
ref,
|
|
322
|
-
role: "textbox",
|
|
323
|
-
onInput: onChange,
|
|
324
|
-
contentEditable: isEditing,
|
|
325
|
-
suppressContentEditableWarning: true,
|
|
326
|
-
onBlur: closeEditMode
|
|
327
|
-
},
|
|
328
|
-
isEditing ? value : children
|
|
329
|
-
)));
|
|
330
|
-
};
|
|
331
|
-
var useEditableField = () => {
|
|
332
|
-
const contextValue = (0, import_react4.useContext)(Context4);
|
|
333
|
-
if (!contextValue) {
|
|
334
|
-
throw new Error("useEditableField must be used within a EditableFieldProvider");
|
|
335
|
-
}
|
|
336
|
-
return contextValue;
|
|
337
|
-
};
|
|
338
|
-
|
|
339
|
-
// src/components/multi-combobox.tsx
|
|
340
|
-
var React6 = __toESM(require("react"));
|
|
341
|
-
var import_react5 = require("react");
|
|
342
|
-
var import_ui3 = require("@elementor/ui");
|
|
135
|
+
var import_ui = require("@elementor/ui");
|
|
343
136
|
function MultiCombobox({
|
|
344
137
|
actions = [],
|
|
345
138
|
selected,
|
|
@@ -349,8 +142,8 @@ function MultiCombobox({
|
|
|
349
142
|
}) {
|
|
350
143
|
const filter = useFilterOptions();
|
|
351
144
|
const { run, loading } = useActionRunner();
|
|
352
|
-
return /* @__PURE__ */
|
|
353
|
-
|
|
145
|
+
return /* @__PURE__ */ React4.createElement(
|
|
146
|
+
import_ui.Autocomplete,
|
|
354
147
|
{
|
|
355
148
|
...props,
|
|
356
149
|
freeSolo: true,
|
|
@@ -362,8 +155,8 @@ function MultiCombobox({
|
|
|
362
155
|
disabled: loading,
|
|
363
156
|
value: selected,
|
|
364
157
|
options: options10,
|
|
365
|
-
renderGroup: (params) => /* @__PURE__ */
|
|
366
|
-
renderInput: (params) => /* @__PURE__ */
|
|
158
|
+
renderGroup: (params) => /* @__PURE__ */ React4.createElement(Group, { ...params }),
|
|
159
|
+
renderInput: (params) => /* @__PURE__ */ React4.createElement(import_ui.TextField, { ...params }),
|
|
367
160
|
onChange: (_, selectedOrInputValue, reason) => {
|
|
368
161
|
const inputValue = selectedOrInputValue.find((option) => typeof option === "string");
|
|
369
162
|
const optionsAndActions = selectedOrInputValue.filter((option) => typeof option !== "string");
|
|
@@ -402,28 +195,28 @@ function MultiCombobox({
|
|
|
402
195
|
);
|
|
403
196
|
}
|
|
404
197
|
var Group = (params) => {
|
|
405
|
-
const id = `combobox-group-${(0,
|
|
406
|
-
return /* @__PURE__ */
|
|
198
|
+
const id = `combobox-group-${(0, import_react4.useId)().replace(/:/g, "_")}`;
|
|
199
|
+
return /* @__PURE__ */ React4.createElement(StyledGroup, { role: "group", "aria-labelledby": id }, /* @__PURE__ */ React4.createElement(StyledGroupHeader, { id }, " ", params.group), /* @__PURE__ */ React4.createElement(StyledGroupItems, { role: "listbox" }, params.children));
|
|
407
200
|
};
|
|
408
|
-
var StyledGroup = (0,
|
|
201
|
+
var StyledGroup = (0, import_ui.styled)("li")`
|
|
409
202
|
&:not( :last-of-type ) {
|
|
410
203
|
border-bottom: 1px solid ${({ theme }) => theme.palette.divider};
|
|
411
204
|
}
|
|
412
205
|
`;
|
|
413
|
-
var StyledGroupHeader = (0,
|
|
206
|
+
var StyledGroupHeader = (0, import_ui.styled)(import_ui.Box)(({ theme }) => ({
|
|
414
207
|
position: "sticky",
|
|
415
208
|
top: "-8px",
|
|
416
209
|
padding: theme.spacing(1, 2),
|
|
417
210
|
color: theme.palette.text.tertiary
|
|
418
211
|
}));
|
|
419
|
-
var StyledGroupItems = (0,
|
|
212
|
+
var StyledGroupItems = (0, import_ui.styled)("ul")`
|
|
420
213
|
padding: 0;
|
|
421
214
|
`;
|
|
422
215
|
function useFilterOptions() {
|
|
423
|
-
return (0,
|
|
216
|
+
return (0, import_react4.useState)(() => (0, import_ui.createFilterOptions)())[0];
|
|
424
217
|
}
|
|
425
218
|
function useActionRunner() {
|
|
426
|
-
const [loading, setLoading] = (0,
|
|
219
|
+
const [loading, setLoading] = (0, import_react4.useState)(false);
|
|
427
220
|
const run = async (apply, value) => {
|
|
428
221
|
setLoading(true);
|
|
429
222
|
try {
|
|
@@ -448,15 +241,233 @@ function isAction(option) {
|
|
|
448
241
|
return "apply" in option && "condition" in option;
|
|
449
242
|
}
|
|
450
243
|
|
|
451
|
-
// src/components/css-class-
|
|
244
|
+
// src/components/css-classes/css-class-item.tsx
|
|
245
|
+
var React6 = __toESM(require("react"));
|
|
246
|
+
var import_react5 = require("react");
|
|
247
|
+
var import_editor_styles_repository3 = require("@elementor/editor-styles-repository");
|
|
248
|
+
var import_editor_ui = require("@elementor/editor-ui");
|
|
249
|
+
var import_icons = require("@elementor/icons");
|
|
250
|
+
var import_ui3 = require("@elementor/ui");
|
|
251
|
+
var import_i18n2 = require("@wordpress/i18n");
|
|
252
|
+
|
|
253
|
+
// src/components/css-classes/css-class-menu.tsx
|
|
254
|
+
var React5 = __toESM(require("react"));
|
|
255
|
+
var import_editor_styles_repository2 = require("@elementor/editor-styles-repository");
|
|
256
|
+
var import_ui2 = require("@elementor/ui");
|
|
257
|
+
var import_i18n = require("@wordpress/i18n");
|
|
258
|
+
|
|
259
|
+
// src/hooks/use-unapply-class.ts
|
|
260
|
+
var import_editor_elements = require("@elementor/editor-elements");
|
|
261
|
+
var useUnapplyClass = (classId) => {
|
|
262
|
+
const { element } = useElement();
|
|
263
|
+
const { setId: setStyleId } = useStyle();
|
|
264
|
+
const classesProp = useClassesProp();
|
|
265
|
+
const classes = (0, import_editor_elements.useElementSetting)(element.id, classesProp);
|
|
266
|
+
const filteredClasses = classes?.value.filter((className) => className !== classId) ?? [];
|
|
267
|
+
return () => {
|
|
268
|
+
(0, import_editor_elements.updateElementSettings)({
|
|
269
|
+
id: element.id,
|
|
270
|
+
props: {
|
|
271
|
+
[classesProp]: {
|
|
272
|
+
$$type: "classes",
|
|
273
|
+
value: filteredClasses
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
setStyleId(null);
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
// src/components/css-classes/css-class-menu.tsx
|
|
282
|
+
var STATES = ["hover", "focus", "active"];
|
|
283
|
+
function CssClassMenu({ styleId, provider, popupState, handleRename, anchorEl }) {
|
|
284
|
+
const handleKeyDown = (e) => {
|
|
285
|
+
e.stopPropagation();
|
|
286
|
+
};
|
|
287
|
+
return /* @__PURE__ */ React5.createElement(
|
|
288
|
+
import_ui2.Menu,
|
|
289
|
+
{
|
|
290
|
+
MenuListProps: { dense: true },
|
|
291
|
+
...(0, import_ui2.bindMenu)(popupState),
|
|
292
|
+
anchorEl,
|
|
293
|
+
anchorOrigin: {
|
|
294
|
+
vertical: "bottom",
|
|
295
|
+
horizontal: "left"
|
|
296
|
+
},
|
|
297
|
+
transformOrigin: {
|
|
298
|
+
horizontal: "left",
|
|
299
|
+
vertical: -4
|
|
300
|
+
},
|
|
301
|
+
onKeyDown: handleKeyDown
|
|
302
|
+
},
|
|
303
|
+
getMenuItemsByProvider({ provider, styleId, handleRename, closeMenu: popupState.close }),
|
|
304
|
+
/* @__PURE__ */ React5.createElement(import_ui2.ListSubheader, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, (0, import_i18n.__)("Pseudo selector", "elementor")),
|
|
305
|
+
STATES.map((state) => {
|
|
306
|
+
return /* @__PURE__ */ React5.createElement(StateMenuItem, { key: state, state, styleId });
|
|
307
|
+
})
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
function getMenuItemsByProvider({
|
|
311
|
+
provider,
|
|
312
|
+
styleId,
|
|
313
|
+
handleRename,
|
|
314
|
+
closeMenu
|
|
315
|
+
}) {
|
|
316
|
+
const providerInstance = import_editor_styles_repository2.stylesRepository.getProviderByKey(provider);
|
|
317
|
+
const providerActions = providerInstance?.actions;
|
|
318
|
+
const [canUpdate, canDelete] = [providerActions?.update, providerActions?.delete];
|
|
319
|
+
const actions = [
|
|
320
|
+
canUpdate && /* @__PURE__ */ React5.createElement(RenameClassMenuItem, { key: "rename-class", handleRename, closeMenu }),
|
|
321
|
+
canDelete && /* @__PURE__ */ React5.createElement(UnapplyClassMenuItem, { key: "unapply-class", styleId })
|
|
322
|
+
].filter(Boolean);
|
|
323
|
+
if (actions.length) {
|
|
324
|
+
actions.unshift(
|
|
325
|
+
/* @__PURE__ */ React5.createElement(
|
|
326
|
+
import_ui2.ListSubheader,
|
|
327
|
+
{
|
|
328
|
+
key: "provider-label",
|
|
329
|
+
sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 }
|
|
330
|
+
},
|
|
331
|
+
providerInstance?.labels?.singular
|
|
332
|
+
)
|
|
333
|
+
);
|
|
334
|
+
actions.push(/* @__PURE__ */ React5.createElement(import_ui2.Divider, { key: "provider-actions-divider" }));
|
|
335
|
+
}
|
|
336
|
+
return actions;
|
|
337
|
+
}
|
|
338
|
+
function StateMenuItem({ state, styleId, ...props }) {
|
|
339
|
+
const { id: activeId, setId: setActiveId, setMetaState: setActiveMetaState, meta } = useStyle();
|
|
340
|
+
const { state: activeState } = meta;
|
|
341
|
+
const isActive = styleId === activeId;
|
|
342
|
+
const isSelected = state === activeState && isActive;
|
|
343
|
+
return /* @__PURE__ */ React5.createElement(
|
|
344
|
+
StyledMenuItem,
|
|
345
|
+
{
|
|
346
|
+
...props,
|
|
347
|
+
selected: isSelected,
|
|
348
|
+
sx: { textTransform: "capitalize" },
|
|
349
|
+
onClick: () => {
|
|
350
|
+
if (!isActive) {
|
|
351
|
+
setActiveId(styleId);
|
|
352
|
+
}
|
|
353
|
+
setActiveMetaState(state);
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
state
|
|
357
|
+
);
|
|
358
|
+
}
|
|
359
|
+
function UnapplyClassMenuItem({ styleId, ...props }) {
|
|
360
|
+
const unapplyClass = useUnapplyClass(styleId);
|
|
361
|
+
return /* @__PURE__ */ React5.createElement(StyledMenuItem, { ...props, onClick: unapplyClass }, (0, import_i18n.__)("Remove", "elementor"));
|
|
362
|
+
}
|
|
363
|
+
function RenameClassMenuItem({
|
|
364
|
+
handleRename,
|
|
365
|
+
closeMenu,
|
|
366
|
+
...props
|
|
367
|
+
}) {
|
|
368
|
+
return /* @__PURE__ */ React5.createElement(
|
|
369
|
+
StyledMenuItem,
|
|
370
|
+
{
|
|
371
|
+
...props,
|
|
372
|
+
onClick: () => {
|
|
373
|
+
closeMenu();
|
|
374
|
+
handleRename();
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
(0, import_i18n.__)("Rename", "elementor")
|
|
378
|
+
);
|
|
379
|
+
}
|
|
380
|
+
var StyledMenuItem = ({ ...props }) => /* @__PURE__ */ React5.createElement(import_ui2.MenuItem, { ...props, sx: { ...props.sx ?? {}, typography: "caption", color: "text.primary" } });
|
|
381
|
+
|
|
382
|
+
// src/components/css-classes/css-class-item.tsx
|
|
383
|
+
var CHIP_SIZE = "tiny";
|
|
384
|
+
function CssClassItem({
|
|
385
|
+
id,
|
|
386
|
+
label,
|
|
387
|
+
provider,
|
|
388
|
+
isActive,
|
|
389
|
+
color: colorProp,
|
|
390
|
+
chipProps,
|
|
391
|
+
onClickActive,
|
|
392
|
+
renameLabel
|
|
393
|
+
}) {
|
|
394
|
+
const { meta } = useStyle();
|
|
395
|
+
const popupState = (0, import_ui3.usePopupState)({ variant: "popover" });
|
|
396
|
+
const [chipRef, setChipRef] = (0, import_react5.useState)(null);
|
|
397
|
+
const { onDelete, ...chipGroupProps } = chipProps;
|
|
398
|
+
const {
|
|
399
|
+
ref,
|
|
400
|
+
isEditing,
|
|
401
|
+
openEditMode,
|
|
402
|
+
error,
|
|
403
|
+
getProps: getEditableProps
|
|
404
|
+
} = (0, import_editor_ui.useEditable)({
|
|
405
|
+
value: label,
|
|
406
|
+
onSubmit: renameLabel,
|
|
407
|
+
validation: validateLabel
|
|
408
|
+
});
|
|
409
|
+
const color = error ? "error" : colorProp;
|
|
410
|
+
const providerActions = import_editor_styles_repository3.stylesRepository.getProviderByKey(provider)?.actions;
|
|
411
|
+
const allowRename = Boolean(providerActions?.update);
|
|
412
|
+
return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(import_ui3.UnstableChipGroup, { ref: setChipRef, ...chipGroupProps, "aria-label": `Edit ${label}`, role: "group" }, /* @__PURE__ */ React6.createElement(
|
|
413
|
+
import_ui3.Chip,
|
|
414
|
+
{
|
|
415
|
+
size: CHIP_SIZE,
|
|
416
|
+
label: isEditing ? /* @__PURE__ */ React6.createElement(import_editor_ui.EditableField, { ref, error, ...getEditableProps() }) : /* @__PURE__ */ React6.createElement(import_editor_ui.EllipsisWithTooltip, { maxWidth: "10ch", title: label, as: "div" }),
|
|
417
|
+
variant: isActive && !meta.state ? "filled" : "standard",
|
|
418
|
+
color,
|
|
419
|
+
onClick: () => {
|
|
420
|
+
if (isActive && allowRename) {
|
|
421
|
+
openEditMode();
|
|
422
|
+
}
|
|
423
|
+
onClickActive(id);
|
|
424
|
+
},
|
|
425
|
+
"aria-pressed": isActive,
|
|
426
|
+
sx: {
|
|
427
|
+
"&.Mui-focusVisible": {
|
|
428
|
+
boxShadow: "none !important"
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
), !isEditing && /* @__PURE__ */ React6.createElement(
|
|
433
|
+
import_ui3.Chip,
|
|
434
|
+
{
|
|
435
|
+
size: CHIP_SIZE,
|
|
436
|
+
label: /* @__PURE__ */ React6.createElement(import_ui3.Stack, { direction: "row", gap: 0.5, alignItems: "center" }, isActive && meta.state && /* @__PURE__ */ React6.createElement(import_ui3.Typography, { variant: "inherit" }, meta.state), /* @__PURE__ */ React6.createElement(import_icons.DotsVerticalIcon, { fontSize: "inherit" })),
|
|
437
|
+
variant: "filled",
|
|
438
|
+
color,
|
|
439
|
+
...(0, import_ui3.bindTrigger)(popupState),
|
|
440
|
+
"aria-label": (0, import_i18n2.__)("Open CSS Class Menu", "elementor")
|
|
441
|
+
}
|
|
442
|
+
)), /* @__PURE__ */ React6.createElement(
|
|
443
|
+
CssClassMenu,
|
|
444
|
+
{
|
|
445
|
+
styleId: id,
|
|
446
|
+
popupState,
|
|
447
|
+
provider,
|
|
448
|
+
handleRename: openEditMode,
|
|
449
|
+
anchorEl: chipRef
|
|
450
|
+
}
|
|
451
|
+
));
|
|
452
|
+
}
|
|
453
|
+
var validateLabel = (newLabel) => {
|
|
454
|
+
if (!import_editor_styles_repository3.stylesRepository.isLabelValid(newLabel)) {
|
|
455
|
+
return (0, import_i18n2.__)("Format is not valid", "elementor");
|
|
456
|
+
}
|
|
457
|
+
if (import_editor_styles_repository3.stylesRepository.isLabelExist(newLabel)) {
|
|
458
|
+
return (0, import_i18n2.__)("Existing name", "elementor");
|
|
459
|
+
}
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
// src/components/css-classes/css-class-selector.tsx
|
|
452
463
|
var ID = "elementor-css-class-selector";
|
|
453
464
|
var TAGS_LIMIT = 8;
|
|
454
465
|
var EMPTY_OPTION = {
|
|
455
|
-
label: (0,
|
|
466
|
+
label: (0, import_i18n3.__)("local", "elementor"),
|
|
456
467
|
value: "",
|
|
457
468
|
fixed: true,
|
|
458
469
|
color: "primary",
|
|
459
|
-
provider:
|
|
470
|
+
provider: import_editor_styles_repository4.ELEMENTS_STYLES_PROVIDER_KEY
|
|
460
471
|
};
|
|
461
472
|
var { Slot: ClassSelectorActionsSlot, inject: injectIntoClassSelectorActions } = (0, import_locations.createLocation)();
|
|
462
473
|
function CssClassSelector() {
|
|
@@ -467,7 +478,7 @@ function CssClassSelector() {
|
|
|
467
478
|
const handleApply = useHandleApply(appliedIds, setAppliedIds);
|
|
468
479
|
const applied = useAppliedOptions(options10, appliedIds);
|
|
469
480
|
const active = applied.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
470
|
-
return /* @__PURE__ */ React7.createElement(import_ui4.Stack, { gap: 1, p: 2 }, /* @__PURE__ */ React7.createElement(import_ui4.Stack, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React7.createElement(import_ui4.Typography, { component: "label", variant: "caption", htmlFor: ID }, (0,
|
|
481
|
+
return /* @__PURE__ */ React7.createElement(import_ui4.Stack, { gap: 1, p: 2 }, /* @__PURE__ */ React7.createElement(import_ui4.Stack, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React7.createElement(import_ui4.Typography, { component: "label", variant: "caption", htmlFor: ID }, (0, import_i18n3.__)("CSS Classes", "elementor")), /* @__PURE__ */ React7.createElement(import_ui4.Stack, { direction: "row", gap: 1 }, /* @__PURE__ */ React7.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React7.createElement(
|
|
471
482
|
MultiCombobox,
|
|
472
483
|
{
|
|
473
484
|
id: ID,
|
|
@@ -481,128 +492,40 @@ function CssClassSelector() {
|
|
|
481
492
|
renderTags: (values, getTagProps) => values.map((value, index) => {
|
|
482
493
|
const chipProps = getTagProps({ index });
|
|
483
494
|
const isActive = value.value === active?.value;
|
|
484
|
-
const isElementsProvider = value.provider ===
|
|
495
|
+
const isElementsProvider = value.provider === import_editor_styles_repository4.ELEMENTS_STYLES_PROVIDER_KEY;
|
|
485
496
|
const renameLabel = (newLabel) => {
|
|
486
497
|
return updateClassByProvider(value.provider, { label: newLabel, id: value.value });
|
|
487
498
|
};
|
|
488
499
|
return /* @__PURE__ */ React7.createElement(
|
|
489
|
-
|
|
500
|
+
CssClassItem,
|
|
490
501
|
{
|
|
491
|
-
key: chipProps.key,
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
)
|
|
499
|
-
|
|
500
|
-
/* @__PURE__ */ React7.createElement(
|
|
501
|
-
CssClassItem,
|
|
502
|
-
{
|
|
503
|
-
label: value.label,
|
|
504
|
-
id: value.value,
|
|
505
|
-
isActive,
|
|
506
|
-
isFixed: value.fixed,
|
|
507
|
-
color: isActive && value.color ? value.color : "default",
|
|
508
|
-
chipProps,
|
|
509
|
-
onClickActive: () => setActiveId(isElementsProvider ? null : value.value)
|
|
510
|
-
}
|
|
511
|
-
)
|
|
512
|
-
);
|
|
513
|
-
})
|
|
514
|
-
}
|
|
515
|
-
));
|
|
516
|
-
}
|
|
517
|
-
var CHIP_SIZE = "tiny";
|
|
518
|
-
function CssClassItem({
|
|
519
|
-
id,
|
|
520
|
-
label,
|
|
521
|
-
isActive,
|
|
522
|
-
isFixed = false,
|
|
523
|
-
color: colorProp,
|
|
524
|
-
chipProps,
|
|
525
|
-
onClickActive
|
|
526
|
-
}) {
|
|
527
|
-
const { meta } = useStyle();
|
|
528
|
-
const popupId = (0, import_react6.useId)().replace(/:/g, "_");
|
|
529
|
-
const popupState = (0, import_ui4.usePopupState)({ variant: "popover", popupId });
|
|
530
|
-
const chipRef = (0, import_react6.useRef)(null);
|
|
531
|
-
const { onDelete, ...chipGroupProps } = chipProps;
|
|
532
|
-
const { isEditing, openEditMode, error, submitting } = useEditableField();
|
|
533
|
-
const color = error ? "error" : colorProp;
|
|
534
|
-
return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(import_ui4.UnstableChipGroup, { ref: chipRef, ...chipGroupProps, "aria-label": `Edit ${label}`, role: "group" }, /* @__PURE__ */ React7.createElement(
|
|
535
|
-
import_ui4.Chip,
|
|
536
|
-
{
|
|
537
|
-
disabled: submitting,
|
|
538
|
-
size: CHIP_SIZE,
|
|
539
|
-
label: /* @__PURE__ */ React7.createElement(
|
|
540
|
-
EditableField,
|
|
541
|
-
{
|
|
542
|
-
onDoubleClick: () => {
|
|
543
|
-
if (!isActive) {
|
|
544
|
-
openEditMode();
|
|
545
|
-
}
|
|
546
|
-
},
|
|
547
|
-
onClick: () => {
|
|
548
|
-
if (isActive) {
|
|
549
|
-
openEditMode();
|
|
550
|
-
}
|
|
502
|
+
key: chipProps.key,
|
|
503
|
+
label: value.label,
|
|
504
|
+
provider: value.provider,
|
|
505
|
+
id: value.value,
|
|
506
|
+
isActive,
|
|
507
|
+
color: isActive && value.color ? value.color : "default",
|
|
508
|
+
chipProps,
|
|
509
|
+
onClickActive: () => setActiveId(isElementsProvider ? null : value.value),
|
|
510
|
+
renameLabel
|
|
551
511
|
}
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
),
|
|
555
|
-
variant: isActive && !meta.state ? "filled" : "standard",
|
|
556
|
-
color,
|
|
557
|
-
onClick: () => onClickActive(id),
|
|
558
|
-
"aria-pressed": isActive,
|
|
559
|
-
sx: {
|
|
560
|
-
"&.Mui-focusVisible": {
|
|
561
|
-
boxShadow: "none !important"
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
), !isEditing && /* @__PURE__ */ React7.createElement(
|
|
566
|
-
import_ui4.Chip,
|
|
567
|
-
{
|
|
568
|
-
disabled: submitting,
|
|
569
|
-
size: CHIP_SIZE,
|
|
570
|
-
label: /* @__PURE__ */ React7.createElement(import_ui4.Stack, { direction: "row", gap: 0.5, alignItems: "center" }, isActive && meta.state && /* @__PURE__ */ React7.createElement(import_ui4.Typography, { variant: "inherit" }, meta.state), /* @__PURE__ */ React7.createElement(import_icons2.DotsVerticalIcon, { fontSize: "inherit" })),
|
|
571
|
-
variant: "filled",
|
|
572
|
-
color,
|
|
573
|
-
...(0, import_ui4.bindTrigger)(popupState),
|
|
574
|
-
"aria-label": (0, import_i18n2.__)("Open CSS Class Menu", "elementor")
|
|
512
|
+
);
|
|
513
|
+
})
|
|
575
514
|
}
|
|
576
|
-
))
|
|
515
|
+
));
|
|
577
516
|
}
|
|
578
517
|
var updateClassByProvider = (provider, data) => {
|
|
579
|
-
const providerInstance =
|
|
518
|
+
const providerInstance = import_editor_styles_repository4.stylesRepository.getProviderByKey(provider);
|
|
580
519
|
if (!providerInstance) {
|
|
581
520
|
return;
|
|
582
521
|
}
|
|
583
522
|
return providerInstance.actions.update?.(data);
|
|
584
523
|
};
|
|
585
|
-
var VALID_SELECTOR_REGEX = /^[a-zA-Z0-9_-]+$/;
|
|
586
|
-
var renameValidation = (newLabel, options10) => {
|
|
587
|
-
if (isNameExist(newLabel, options10)) {
|
|
588
|
-
return (0, import_i18n2.__)("Existing name", "elementor");
|
|
589
|
-
}
|
|
590
|
-
if (isCharactersNotSupported(newLabel)) {
|
|
591
|
-
return (0, import_i18n2.__)("Format is not valid", "elementor");
|
|
592
|
-
}
|
|
593
|
-
};
|
|
594
|
-
var isNameExist = (newLabel, options10) => {
|
|
595
|
-
if (!options10?.length) {
|
|
596
|
-
return false;
|
|
597
|
-
}
|
|
598
|
-
return options10.some((option) => option.label.toLowerCase() === newLabel.toLowerCase());
|
|
599
|
-
};
|
|
600
|
-
var isCharactersNotSupported = (newLabel) => !VALID_SELECTOR_REGEX.test(newLabel);
|
|
601
524
|
function useOptions() {
|
|
602
525
|
const { element } = useElement();
|
|
603
526
|
const isProviderEditable = (provider) => !!provider.actions.updateProps;
|
|
604
|
-
return (0,
|
|
605
|
-
const isElements = provider.key ===
|
|
527
|
+
return (0, import_editor_styles_repository4.useProviders)().filter(isProviderEditable).flatMap((provider) => {
|
|
528
|
+
const isElements = provider.key === import_editor_styles_repository4.ELEMENTS_STYLES_PROVIDER_KEY;
|
|
606
529
|
const styleDefs = provider.actions.get({ elementId: element.id });
|
|
607
530
|
if (isElements && styleDefs.length === 0) {
|
|
608
531
|
return [EMPTY_OPTION];
|
|
@@ -623,17 +546,17 @@ function useCreateActions({
|
|
|
623
546
|
pushAppliedId,
|
|
624
547
|
setActiveId
|
|
625
548
|
}) {
|
|
626
|
-
return (0,
|
|
549
|
+
return (0, import_editor_styles_repository4.useCreateActionsByProvider)().map(([provider, create]) => {
|
|
627
550
|
return {
|
|
628
551
|
// translators: %s is the label of the new class.
|
|
629
|
-
label: (value) => (0,
|
|
630
|
-
apply:
|
|
631
|
-
const
|
|
632
|
-
if (!
|
|
552
|
+
label: (value) => (0, import_i18n3.__)('Create new "%s"', "elementor").replace("%s", value),
|
|
553
|
+
apply: (label) => {
|
|
554
|
+
const createdId = create(label);
|
|
555
|
+
if (!createdId) {
|
|
633
556
|
return;
|
|
634
557
|
}
|
|
635
|
-
pushAppliedId(
|
|
636
|
-
setActiveId(
|
|
558
|
+
pushAppliedId(createdId);
|
|
559
|
+
setActiveId(createdId);
|
|
637
560
|
},
|
|
638
561
|
condition: (options10, inputValue) => {
|
|
639
562
|
const isUniqueLabel = !options10.some(
|
|
@@ -642,14 +565,14 @@ function useCreateActions({
|
|
|
642
565
|
return !!inputValue && isUniqueLabel;
|
|
643
566
|
},
|
|
644
567
|
// translators: %s is the singular label of css class provider (e.g "Global CSS Class").
|
|
645
|
-
group: (0,
|
|
568
|
+
group: (0, import_i18n3.__)("Create New %s", "elementor").replace("%s", provider.labels?.singular ?? "")
|
|
646
569
|
};
|
|
647
570
|
});
|
|
648
571
|
}
|
|
649
572
|
function useAppliedOptions(options10, appliedIds) {
|
|
650
573
|
const applied = options10.filter((option) => appliedIds.includes(option.value));
|
|
651
574
|
const hasElementsProviderStyleApplied = applied.some(
|
|
652
|
-
(option) => option.provider ===
|
|
575
|
+
(option) => option.provider === import_editor_styles_repository4.ELEMENTS_STYLES_PROVIDER_KEY
|
|
653
576
|
);
|
|
654
577
|
if (!hasElementsProviderStyleApplied) {
|
|
655
578
|
applied.unshift(EMPTY_OPTION);
|
|
@@ -707,17 +630,17 @@ var React60 = __toESM(require("react"));
|
|
|
707
630
|
var import_editor_controls41 = require("@elementor/editor-controls");
|
|
708
631
|
var import_editor_elements7 = require("@elementor/editor-elements");
|
|
709
632
|
var import_editor_panels = require("@elementor/editor-panels");
|
|
710
|
-
var
|
|
633
|
+
var import_session4 = require("@elementor/session");
|
|
711
634
|
var import_ui50 = require("@elementor/ui");
|
|
712
|
-
var
|
|
635
|
+
var import_i18n41 = require("@wordpress/i18n");
|
|
713
636
|
|
|
714
637
|
// src/controls-actions.ts
|
|
715
638
|
var import_menus = require("@elementor/menus");
|
|
716
639
|
|
|
717
640
|
// src/popover-action.tsx
|
|
718
641
|
var React8 = __toESM(require("react"));
|
|
719
|
-
var
|
|
720
|
-
var
|
|
642
|
+
var import_react6 = require("react");
|
|
643
|
+
var import_icons2 = require("@elementor/icons");
|
|
721
644
|
var import_ui5 = require("@elementor/ui");
|
|
722
645
|
var SIZE = "tiny";
|
|
723
646
|
function PopoverAction({
|
|
@@ -726,7 +649,7 @@ function PopoverAction({
|
|
|
726
649
|
icon: Icon,
|
|
727
650
|
popoverContent: PopoverContent
|
|
728
651
|
}) {
|
|
729
|
-
const id = (0,
|
|
652
|
+
const id = (0, import_react6.useId)();
|
|
730
653
|
const popupState = (0, import_ui5.usePopupState)({
|
|
731
654
|
variant: "popover",
|
|
732
655
|
popupId: `elementor-popover-action-${id}`
|
|
@@ -745,7 +668,7 @@ function PopoverAction({
|
|
|
745
668
|
},
|
|
746
669
|
...(0, import_ui5.bindPopover)(popupState)
|
|
747
670
|
},
|
|
748
|
-
/* @__PURE__ */ React8.createElement(import_ui5.Stack, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React8.createElement(Icon, { fontSize: SIZE, sx: { mr: 0.5 } }), /* @__PURE__ */ React8.createElement(import_ui5.Typography, { variant: "subtitle2" }, title), /* @__PURE__ */ React8.createElement(import_ui5.IconButton, { sx: { ml: "auto" }, size: SIZE, onClick: popupState.close }, /* @__PURE__ */ React8.createElement(
|
|
671
|
+
/* @__PURE__ */ React8.createElement(import_ui5.Stack, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React8.createElement(Icon, { fontSize: SIZE, sx: { mr: 0.5 } }), /* @__PURE__ */ React8.createElement(import_ui5.Typography, { variant: "subtitle2" }, title), /* @__PURE__ */ React8.createElement(import_ui5.IconButton, { sx: { ml: "auto" }, size: SIZE, onClick: popupState.close }, /* @__PURE__ */ React8.createElement(import_icons2.XIcon, { fontSize: SIZE }))),
|
|
749
672
|
/* @__PURE__ */ React8.createElement(PopoverContent, { closePopover: popupState.close })
|
|
750
673
|
));
|
|
751
674
|
}
|
|
@@ -766,9 +689,9 @@ function EditorPanelErrorFallback() {
|
|
|
766
689
|
|
|
767
690
|
// src/components/editing-panel-tabs.tsx
|
|
768
691
|
var React59 = __toESM(require("react"));
|
|
769
|
-
var
|
|
692
|
+
var import_react14 = require("react");
|
|
770
693
|
var import_ui49 = require("@elementor/ui");
|
|
771
|
-
var
|
|
694
|
+
var import_i18n40 = require("@wordpress/i18n");
|
|
772
695
|
|
|
773
696
|
// src/components/settings-tab.tsx
|
|
774
697
|
var React15 = __toESM(require("react"));
|
|
@@ -782,7 +705,8 @@ var React10 = __toESM(require("react"));
|
|
|
782
705
|
var import_editor_controls2 = require("@elementor/editor-controls");
|
|
783
706
|
var controlTypes = {
|
|
784
707
|
image: { component: import_editor_controls2.ImageControl, layout: "full" },
|
|
785
|
-
|
|
708
|
+
"svg-media": { component: import_editor_controls2.SvgMediaControl, layout: "full" },
|
|
709
|
+
text: { component: import_editor_controls2.TextControl, layout: "full" },
|
|
786
710
|
textarea: { component: import_editor_controls2.TextAreaControl, layout: "full" },
|
|
787
711
|
size: { component: import_editor_controls2.SizeControl, layout: "two-columns" },
|
|
788
712
|
select: { component: import_editor_controls2.SelectControl, layout: "two-columns" },
|
|
@@ -850,8 +774,12 @@ var createTopLevelOjectType = ({ schema }) => {
|
|
|
850
774
|
var SettingsField = ({ bind, children }) => {
|
|
851
775
|
const { element, elementType } = useElement();
|
|
852
776
|
const settingsValue = (0, import_editor_elements3.useElementSetting)(element.id, bind);
|
|
777
|
+
const linkValue = (0, import_editor_elements3.useElementSetting)(element.id, "link");
|
|
853
778
|
const value = { [bind]: settingsValue };
|
|
854
779
|
const propType = createTopLevelOjectType({ schema: elementType.propsSchema });
|
|
780
|
+
if (bind === "tag" && linkValue?.value && "div-block" === elementType.key) {
|
|
781
|
+
return null;
|
|
782
|
+
}
|
|
855
783
|
const setValue = (newValue) => {
|
|
856
784
|
(0, import_editor_elements3.updateElementSettings)({
|
|
857
785
|
id: element.id,
|
|
@@ -863,13 +791,13 @@ var SettingsField = ({ bind, children }) => {
|
|
|
863
791
|
|
|
864
792
|
// src/components/section.tsx
|
|
865
793
|
var React13 = __toESM(require("react"));
|
|
866
|
-
var
|
|
794
|
+
var import_react7 = require("react");
|
|
867
795
|
var import_ui9 = require("@elementor/ui");
|
|
868
796
|
|
|
869
797
|
// src/components/collapse-icon.tsx
|
|
870
|
-
var
|
|
798
|
+
var import_icons3 = require("@elementor/icons");
|
|
871
799
|
var import_ui8 = require("@elementor/ui");
|
|
872
|
-
var CollapseIcon = (0, import_ui8.styled)(
|
|
800
|
+
var CollapseIcon = (0, import_ui8.styled)(import_icons3.ChevronDownIcon, {
|
|
873
801
|
shouldForwardProp: (prop) => prop !== "open"
|
|
874
802
|
})(({ theme, open }) => ({
|
|
875
803
|
transform: open ? "rotate(180deg)" : "rotate(0deg)",
|
|
@@ -880,8 +808,8 @@ var CollapseIcon = (0, import_ui8.styled)(import_icons4.ChevronDownIcon, {
|
|
|
880
808
|
|
|
881
809
|
// src/components/section.tsx
|
|
882
810
|
function Section({ title, children, defaultExpanded = false }) {
|
|
883
|
-
const [isOpen, setIsOpen] = (0,
|
|
884
|
-
const id = (0,
|
|
811
|
+
const [isOpen, setIsOpen] = (0, import_react7.useState)(!!defaultExpanded);
|
|
812
|
+
const id = (0, import_react7.useId)();
|
|
885
813
|
const labelId = `label-${id}`;
|
|
886
814
|
const contentId = `content-${id}`;
|
|
887
815
|
return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(
|
|
@@ -930,12 +858,12 @@ var Control2 = ({ control }) => {
|
|
|
930
858
|
|
|
931
859
|
// src/components/style-tab.tsx
|
|
932
860
|
var React58 = __toESM(require("react"));
|
|
933
|
-
var
|
|
861
|
+
var import_react13 = require("react");
|
|
934
862
|
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
935
863
|
var import_editor_responsive = require("@elementor/editor-responsive");
|
|
936
|
-
var
|
|
864
|
+
var import_session3 = require("@elementor/session");
|
|
937
865
|
var import_ui48 = require("@elementor/ui");
|
|
938
|
-
var
|
|
866
|
+
var import_i18n39 = require("@wordpress/i18n");
|
|
939
867
|
|
|
940
868
|
// src/components/style-sections/background-section/background-section.tsx
|
|
941
869
|
var React17 = __toESM(require("react"));
|
|
@@ -947,16 +875,20 @@ var import_editor_controls5 = require("@elementor/editor-controls");
|
|
|
947
875
|
var import_editor_styles2 = require("@elementor/editor-styles");
|
|
948
876
|
|
|
949
877
|
// src/hooks/use-styles-fields.ts
|
|
950
|
-
var
|
|
878
|
+
var import_react8 = require("react");
|
|
951
879
|
var import_editor_elements4 = require("@elementor/editor-elements");
|
|
952
880
|
var import_editor_styles = require("@elementor/editor-styles");
|
|
953
|
-
var
|
|
881
|
+
var import_editor_styles_repository5 = require("@elementor/editor-styles-repository");
|
|
882
|
+
var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
|
|
883
|
+
var import_i18n4 = require("@wordpress/i18n");
|
|
954
884
|
function useStylesFields(propNames) {
|
|
955
885
|
const { element } = useElement();
|
|
956
886
|
const { id, meta, provider } = useStyle();
|
|
957
887
|
const classesProp = useClassesProp();
|
|
958
|
-
const
|
|
959
|
-
|
|
888
|
+
const undoableUpdateStyle = useUndoableUpdateStyle();
|
|
889
|
+
const undoableCreateElementStyle = useUndoableCreateElementStyle();
|
|
890
|
+
const [, reRender] = (0, import_react8.useReducer)((p) => !p, false);
|
|
891
|
+
(0, import_react8.useEffect)(() => provider?.subscribe(reRender), [provider]);
|
|
960
892
|
const value = getProps({
|
|
961
893
|
elementId: element.id,
|
|
962
894
|
styleId: id,
|
|
@@ -966,19 +898,21 @@ function useStylesFields(propNames) {
|
|
|
966
898
|
});
|
|
967
899
|
const setValue = (props) => {
|
|
968
900
|
if (id === null) {
|
|
969
|
-
(
|
|
901
|
+
undoableCreateElementStyle({
|
|
970
902
|
elementId: element.id,
|
|
971
903
|
classesProp,
|
|
972
904
|
meta,
|
|
973
|
-
props
|
|
974
|
-
label: (0, import_i18n3.__)("local", "elementor")
|
|
905
|
+
props
|
|
975
906
|
});
|
|
976
907
|
return;
|
|
977
908
|
}
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
909
|
+
undoableUpdateStyle({
|
|
910
|
+
elementId: element.id,
|
|
911
|
+
styleId: id,
|
|
912
|
+
provider,
|
|
913
|
+
meta,
|
|
914
|
+
props
|
|
915
|
+
});
|
|
982
916
|
};
|
|
983
917
|
return [value, setValue];
|
|
984
918
|
}
|
|
@@ -995,6 +929,75 @@ function getProps({ styleId, elementId, provider, meta, propNames }) {
|
|
|
995
929
|
propNames.map((key) => [key, variant?.props[key] ?? null])
|
|
996
930
|
);
|
|
997
931
|
}
|
|
932
|
+
function useUndoableCreateElementStyle() {
|
|
933
|
+
return (0, import_react8.useMemo)(() => {
|
|
934
|
+
return (0, import_editor_v1_adapters.undoable)(
|
|
935
|
+
{
|
|
936
|
+
do: (payload) => {
|
|
937
|
+
return (0, import_editor_elements4.createElementStyle)({
|
|
938
|
+
...payload,
|
|
939
|
+
label: import_editor_styles_repository5.LOCAL_STYLES_RESERVED_LABEL
|
|
940
|
+
});
|
|
941
|
+
},
|
|
942
|
+
undo: ({ elementId }, styleId) => {
|
|
943
|
+
(0, import_editor_elements4.deleteElementStyle)(elementId, styleId);
|
|
944
|
+
},
|
|
945
|
+
redo: (payload, styleId) => {
|
|
946
|
+
return (0, import_editor_elements4.createElementStyle)({
|
|
947
|
+
...payload,
|
|
948
|
+
styleId,
|
|
949
|
+
label: import_editor_styles_repository5.LOCAL_STYLES_RESERVED_LABEL
|
|
950
|
+
});
|
|
951
|
+
}
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
title: ({ elementId }) => (0, import_editor_elements4.getElementLabel)(elementId),
|
|
955
|
+
subtitle: (0, import_i18n4.__)("Style edited", "elementor")
|
|
956
|
+
}
|
|
957
|
+
);
|
|
958
|
+
}, []);
|
|
959
|
+
}
|
|
960
|
+
function useUndoableUpdateStyle() {
|
|
961
|
+
return (0, import_react8.useMemo)(() => {
|
|
962
|
+
return (0, import_editor_v1_adapters.undoable)(
|
|
963
|
+
{
|
|
964
|
+
do: ({ elementId, styleId, provider, meta, props }) => {
|
|
965
|
+
if (!provider.actions.updateProps) {
|
|
966
|
+
throw new StylesProviderCannotUpdatePropsError({
|
|
967
|
+
context: { providerKey: provider.key }
|
|
968
|
+
});
|
|
969
|
+
}
|
|
970
|
+
const style = provider.actions.getById(styleId, { elementId });
|
|
971
|
+
const prevProps = getCurrentProps(style, meta);
|
|
972
|
+
provider.actions.updateProps(
|
|
973
|
+
{
|
|
974
|
+
id: styleId,
|
|
975
|
+
meta,
|
|
976
|
+
props
|
|
977
|
+
},
|
|
978
|
+
{ elementId }
|
|
979
|
+
);
|
|
980
|
+
return prevProps;
|
|
981
|
+
},
|
|
982
|
+
undo: ({ elementId, styleId, meta, provider }, prevProps) => {
|
|
983
|
+
provider.actions.updateProps?.({ id: styleId, meta, props: prevProps }, { elementId });
|
|
984
|
+
}
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
title: ({ elementId }) => (0, import_editor_elements4.getElementLabel)(elementId),
|
|
988
|
+
subtitle: (0, import_i18n4.__)("Style edited", "elementor")
|
|
989
|
+
}
|
|
990
|
+
);
|
|
991
|
+
}, []);
|
|
992
|
+
}
|
|
993
|
+
function getCurrentProps(style, meta) {
|
|
994
|
+
if (!style) {
|
|
995
|
+
return {};
|
|
996
|
+
}
|
|
997
|
+
const variant = (0, import_editor_styles.getVariantByMeta)(style, meta);
|
|
998
|
+
const props = variant?.props ?? {};
|
|
999
|
+
return structuredClone(props);
|
|
1000
|
+
}
|
|
998
1001
|
|
|
999
1002
|
// src/hooks/use-styles-field.ts
|
|
1000
1003
|
function useStylesField(propName) {
|
|
@@ -1031,12 +1034,12 @@ var import_ui14 = require("@elementor/ui");
|
|
|
1031
1034
|
|
|
1032
1035
|
// src/components/style-sections/border-section/border-field.tsx
|
|
1033
1036
|
var React22 = __toESM(require("react"));
|
|
1034
|
-
var
|
|
1037
|
+
var import_i18n8 = require("@wordpress/i18n");
|
|
1035
1038
|
|
|
1036
1039
|
// src/components/add-or-remove-content.tsx
|
|
1037
1040
|
var React18 = __toESM(require("react"));
|
|
1038
1041
|
var import_editor_controls7 = require("@elementor/editor-controls");
|
|
1039
|
-
var
|
|
1042
|
+
var import_icons4 = require("@elementor/icons");
|
|
1040
1043
|
var import_ui11 = require("@elementor/ui");
|
|
1041
1044
|
var SIZE2 = "tiny";
|
|
1042
1045
|
var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
@@ -1050,7 +1053,7 @@ var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
|
1050
1053
|
}
|
|
1051
1054
|
},
|
|
1052
1055
|
/* @__PURE__ */ React18.createElement(import_editor_controls7.ControlLabel, null, label),
|
|
1053
|
-
isAdded ? /* @__PURE__ */ React18.createElement(import_ui11.IconButton, { size: SIZE2, onClick: onRemove, "aria-label": "Remove" }, /* @__PURE__ */ React18.createElement(
|
|
1056
|
+
isAdded ? /* @__PURE__ */ React18.createElement(import_ui11.IconButton, { size: SIZE2, onClick: onRemove, "aria-label": "Remove" }, /* @__PURE__ */ React18.createElement(import_icons4.MinusIcon, { fontSize: SIZE2 })) : /* @__PURE__ */ React18.createElement(import_ui11.IconButton, { size: SIZE2, onClick: onAdd, "aria-label": "Add" }, /* @__PURE__ */ React18.createElement(import_icons4.PlusIcon, { fontSize: SIZE2 }))
|
|
1054
1057
|
), /* @__PURE__ */ React18.createElement(import_ui11.Collapse, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React18.createElement(import_ui11.Stack, { gap: 1.5 }, children)));
|
|
1055
1058
|
};
|
|
1056
1059
|
|
|
@@ -1058,56 +1061,56 @@ var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
|
1058
1061
|
var React19 = __toESM(require("react"));
|
|
1059
1062
|
var import_editor_controls8 = require("@elementor/editor-controls");
|
|
1060
1063
|
var import_ui12 = require("@elementor/ui");
|
|
1061
|
-
var
|
|
1064
|
+
var import_i18n5 = require("@wordpress/i18n");
|
|
1062
1065
|
var BorderColorField = () => {
|
|
1063
|
-
return /* @__PURE__ */ React19.createElement(StylesField, { bind: "border-color" }, /* @__PURE__ */ React19.createElement(import_ui12.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React19.createElement(import_ui12.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React19.createElement(import_editor_controls8.ControlLabel, null, (0,
|
|
1066
|
+
return /* @__PURE__ */ React19.createElement(StylesField, { bind: "border-color" }, /* @__PURE__ */ React19.createElement(import_ui12.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React19.createElement(import_ui12.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React19.createElement(import_editor_controls8.ControlLabel, null, (0, import_i18n5.__)("Border Color", "elementor"))), /* @__PURE__ */ React19.createElement(import_ui12.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React19.createElement(import_editor_controls8.ColorControl, null))));
|
|
1064
1067
|
};
|
|
1065
1068
|
|
|
1066
1069
|
// src/components/style-sections/border-section/border-style-field.tsx
|
|
1067
1070
|
var React20 = __toESM(require("react"));
|
|
1068
1071
|
var import_editor_controls9 = require("@elementor/editor-controls");
|
|
1069
1072
|
var import_ui13 = require("@elementor/ui");
|
|
1070
|
-
var
|
|
1073
|
+
var import_i18n6 = require("@wordpress/i18n");
|
|
1071
1074
|
var borderStyles = [
|
|
1072
|
-
{ value: "none", label: (0,
|
|
1073
|
-
{ value: "solid", label: (0,
|
|
1074
|
-
{ value: "dashed", label: (0,
|
|
1075
|
-
{ value: "dotted", label: (0,
|
|
1076
|
-
{ value: "double", label: (0,
|
|
1077
|
-
{ value: "groove", label: (0,
|
|
1078
|
-
{ value: "ridge", label: (0,
|
|
1079
|
-
{ value: "inset", label: (0,
|
|
1080
|
-
{ value: "outset", label: (0,
|
|
1075
|
+
{ value: "none", label: (0, import_i18n6.__)("None", "elementor") },
|
|
1076
|
+
{ value: "solid", label: (0, import_i18n6.__)("Solid", "elementor") },
|
|
1077
|
+
{ value: "dashed", label: (0, import_i18n6.__)("Dashed", "elementor") },
|
|
1078
|
+
{ value: "dotted", label: (0, import_i18n6.__)("Dotted", "elementor") },
|
|
1079
|
+
{ value: "double", label: (0, import_i18n6.__)("Double", "elementor") },
|
|
1080
|
+
{ value: "groove", label: (0, import_i18n6.__)("Groove", "elementor") },
|
|
1081
|
+
{ value: "ridge", label: (0, import_i18n6.__)("Ridge", "elementor") },
|
|
1082
|
+
{ value: "inset", label: (0, import_i18n6.__)("Inset", "elementor") },
|
|
1083
|
+
{ value: "outset", label: (0, import_i18n6.__)("Outset", "elementor") }
|
|
1081
1084
|
];
|
|
1082
1085
|
var BorderStyleField = () => {
|
|
1083
|
-
return /* @__PURE__ */ React20.createElement(StylesField, { bind: "border-style" }, /* @__PURE__ */ React20.createElement(import_ui13.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React20.createElement(import_ui13.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React20.createElement(import_editor_controls9.ControlLabel, null, (0,
|
|
1086
|
+
return /* @__PURE__ */ React20.createElement(StylesField, { bind: "border-style" }, /* @__PURE__ */ React20.createElement(import_ui13.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React20.createElement(import_ui13.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React20.createElement(import_editor_controls9.ControlLabel, null, (0, import_i18n6.__)("Border Type", "elementor"))), /* @__PURE__ */ React20.createElement(import_ui13.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React20.createElement(import_editor_controls9.SelectControl, { options: borderStyles }))));
|
|
1084
1087
|
};
|
|
1085
1088
|
|
|
1086
1089
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
1087
1090
|
var React21 = __toESM(require("react"));
|
|
1088
1091
|
var import_editor_controls10 = require("@elementor/editor-controls");
|
|
1089
1092
|
var import_editor_props2 = require("@elementor/editor-props");
|
|
1090
|
-
var
|
|
1091
|
-
var
|
|
1093
|
+
var import_icons5 = require("@elementor/icons");
|
|
1094
|
+
var import_i18n7 = require("@wordpress/i18n");
|
|
1092
1095
|
var edges = [
|
|
1093
1096
|
{
|
|
1094
|
-
label: (0,
|
|
1095
|
-
icon: /* @__PURE__ */ React21.createElement(
|
|
1097
|
+
label: (0, import_i18n7.__)("Top", "elementor"),
|
|
1098
|
+
icon: /* @__PURE__ */ React21.createElement(import_icons5.SideTopIcon, { fontSize: "tiny" }),
|
|
1096
1099
|
bind: "top"
|
|
1097
1100
|
},
|
|
1098
1101
|
{
|
|
1099
|
-
label: (0,
|
|
1100
|
-
icon: /* @__PURE__ */ React21.createElement(
|
|
1102
|
+
label: (0, import_i18n7.__)("Right", "elementor"),
|
|
1103
|
+
icon: /* @__PURE__ */ React21.createElement(import_icons5.SideRightIcon, { fontSize: "tiny" }),
|
|
1101
1104
|
bind: "right"
|
|
1102
1105
|
},
|
|
1103
1106
|
{
|
|
1104
|
-
label: (0,
|
|
1105
|
-
icon: /* @__PURE__ */ React21.createElement(
|
|
1107
|
+
label: (0, import_i18n7.__)("Bottom", "elementor"),
|
|
1108
|
+
icon: /* @__PURE__ */ React21.createElement(import_icons5.SideBottomIcon, { fontSize: "tiny" }),
|
|
1106
1109
|
bind: "bottom"
|
|
1107
1110
|
},
|
|
1108
1111
|
{
|
|
1109
|
-
label: (0,
|
|
1110
|
-
icon: /* @__PURE__ */ React21.createElement(
|
|
1112
|
+
label: (0, import_i18n7.__)("Left", "elementor"),
|
|
1113
|
+
icon: /* @__PURE__ */ React21.createElement(import_icons5.SideLeftIcon, { fontSize: "tiny" }),
|
|
1111
1114
|
bind: "left"
|
|
1112
1115
|
}
|
|
1113
1116
|
];
|
|
@@ -1116,8 +1119,8 @@ var BorderWidthField = () => {
|
|
|
1116
1119
|
import_editor_controls10.EqualUnequalSizesControl,
|
|
1117
1120
|
{
|
|
1118
1121
|
items: edges,
|
|
1119
|
-
label: (0,
|
|
1120
|
-
icon: /* @__PURE__ */ React21.createElement(
|
|
1122
|
+
label: (0, import_i18n7.__)("Border Width", "elementor"),
|
|
1123
|
+
icon: /* @__PURE__ */ React21.createElement(import_icons5.SideAllIcon, { fontSize: "tiny" }),
|
|
1121
1124
|
multiSizePropTypeUtil: import_editor_props2.borderWidthPropTypeUtil
|
|
1122
1125
|
}
|
|
1123
1126
|
));
|
|
@@ -1145,7 +1148,7 @@ var BorderField = () => {
|
|
|
1145
1148
|
return /* @__PURE__ */ React22.createElement(
|
|
1146
1149
|
AddOrRemoveContent,
|
|
1147
1150
|
{
|
|
1148
|
-
label: (0,
|
|
1151
|
+
label: (0, import_i18n8.__)("Border", "elementor"),
|
|
1149
1152
|
isAdded: hasBorder,
|
|
1150
1153
|
onAdd: addBorder,
|
|
1151
1154
|
onRemove: removeBorder
|
|
@@ -1160,27 +1163,27 @@ var BorderField = () => {
|
|
|
1160
1163
|
var React23 = __toESM(require("react"));
|
|
1161
1164
|
var import_editor_controls11 = require("@elementor/editor-controls");
|
|
1162
1165
|
var import_editor_props3 = require("@elementor/editor-props");
|
|
1163
|
-
var
|
|
1164
|
-
var
|
|
1166
|
+
var import_icons6 = require("@elementor/icons");
|
|
1167
|
+
var import_i18n9 = require("@wordpress/i18n");
|
|
1165
1168
|
var corners = [
|
|
1166
1169
|
{
|
|
1167
|
-
label: (0,
|
|
1168
|
-
icon: /* @__PURE__ */ React23.createElement(
|
|
1170
|
+
label: (0, import_i18n9.__)("Top Left", "elementor"),
|
|
1171
|
+
icon: /* @__PURE__ */ React23.createElement(import_icons6.RadiusTopLeftIcon, { fontSize: "tiny" }),
|
|
1169
1172
|
bind: "top-left"
|
|
1170
1173
|
},
|
|
1171
1174
|
{
|
|
1172
|
-
label: (0,
|
|
1173
|
-
icon: /* @__PURE__ */ React23.createElement(
|
|
1175
|
+
label: (0, import_i18n9.__)("Top Right", "elementor"),
|
|
1176
|
+
icon: /* @__PURE__ */ React23.createElement(import_icons6.RadiusTopRightIcon, { fontSize: "tiny" }),
|
|
1174
1177
|
bind: "top-right"
|
|
1175
1178
|
},
|
|
1176
1179
|
{
|
|
1177
|
-
label: (0,
|
|
1178
|
-
icon: /* @__PURE__ */ React23.createElement(
|
|
1180
|
+
label: (0, import_i18n9.__)("Bottom Right", "elementor"),
|
|
1181
|
+
icon: /* @__PURE__ */ React23.createElement(import_icons6.RadiusBottomRightIcon, { fontSize: "tiny" }),
|
|
1179
1182
|
bind: "bottom-right"
|
|
1180
1183
|
},
|
|
1181
1184
|
{
|
|
1182
|
-
label: (0,
|
|
1183
|
-
icon: /* @__PURE__ */ React23.createElement(
|
|
1185
|
+
label: (0, import_i18n9.__)("Bottom Left", "elementor"),
|
|
1186
|
+
icon: /* @__PURE__ */ React23.createElement(import_icons6.RadiusBottomLeftIcon, { fontSize: "tiny" }),
|
|
1184
1187
|
bind: "bottom-left"
|
|
1185
1188
|
}
|
|
1186
1189
|
];
|
|
@@ -1189,8 +1192,8 @@ var BorderRadiusField = () => {
|
|
|
1189
1192
|
import_editor_controls11.EqualUnequalSizesControl,
|
|
1190
1193
|
{
|
|
1191
1194
|
items: corners,
|
|
1192
|
-
label: (0,
|
|
1193
|
-
icon: /* @__PURE__ */ React23.createElement(
|
|
1195
|
+
label: (0, import_i18n9.__)("Border Radius", "elementor"),
|
|
1196
|
+
icon: /* @__PURE__ */ React23.createElement(import_icons6.BorderCornersIcon, { fontSize: "tiny" }),
|
|
1194
1197
|
multiSizePropTypeUtil: import_editor_props3.borderRadiusPropTypeUtil
|
|
1195
1198
|
}
|
|
1196
1199
|
));
|
|
@@ -1212,17 +1215,17 @@ var React36 = __toESM(require("react"));
|
|
|
1212
1215
|
var import_editor_controls22 = require("@elementor/editor-controls");
|
|
1213
1216
|
var import_editor_elements5 = require("@elementor/editor-elements");
|
|
1214
1217
|
var import_ui27 = require("@elementor/ui");
|
|
1215
|
-
var
|
|
1218
|
+
var import_i18n19 = require("@wordpress/i18n");
|
|
1216
1219
|
|
|
1217
1220
|
// src/hooks/use-computed-style.ts
|
|
1218
|
-
var
|
|
1221
|
+
var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
|
|
1219
1222
|
function useComputedStyle(elementId) {
|
|
1220
|
-
return (0,
|
|
1223
|
+
return (0, import_editor_v1_adapters2.__privateUseListenTo)(
|
|
1221
1224
|
[
|
|
1222
|
-
(0,
|
|
1223
|
-
(0,
|
|
1224
|
-
(0,
|
|
1225
|
-
(0,
|
|
1225
|
+
(0, import_editor_v1_adapters2.windowEvent)("elementor/device-mode/change"),
|
|
1226
|
+
(0, import_editor_v1_adapters2.commandEndEvent)("document/elements/reset-style"),
|
|
1227
|
+
(0, import_editor_v1_adapters2.commandEndEvent)("document/elements/settings"),
|
|
1228
|
+
(0, import_editor_v1_adapters2.commandEndEvent)("document/elements/paste-style")
|
|
1226
1229
|
],
|
|
1227
1230
|
() => {
|
|
1228
1231
|
if (!elementId) {
|
|
@@ -1242,9 +1245,9 @@ function useComputedStyle(elementId) {
|
|
|
1242
1245
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
1243
1246
|
var React27 = __toESM(require("react"));
|
|
1244
1247
|
var import_editor_controls13 = require("@elementor/editor-controls");
|
|
1245
|
-
var
|
|
1248
|
+
var import_icons7 = require("@elementor/icons");
|
|
1246
1249
|
var import_ui18 = require("@elementor/ui");
|
|
1247
|
-
var
|
|
1250
|
+
var import_i18n10 = require("@wordpress/i18n");
|
|
1248
1251
|
|
|
1249
1252
|
// src/hooks/use-direction.ts
|
|
1250
1253
|
var import_ui16 = require("@elementor/ui");
|
|
@@ -1256,7 +1259,7 @@ function useDirection() {
|
|
|
1256
1259
|
|
|
1257
1260
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
1258
1261
|
var React26 = __toESM(require("react"));
|
|
1259
|
-
var
|
|
1262
|
+
var import_react9 = require("react");
|
|
1260
1263
|
var import_ui17 = require("@elementor/ui");
|
|
1261
1264
|
var CLOCKWISE_ANGLES = {
|
|
1262
1265
|
row: 0,
|
|
@@ -1271,7 +1274,7 @@ var COUNTER_CLOCKWISE_ANGLES = {
|
|
|
1271
1274
|
"column-reverse": -270
|
|
1272
1275
|
};
|
|
1273
1276
|
var RotatedIcon = ({ icon: Icon, size, isClockwise = true, offset = 0 }) => {
|
|
1274
|
-
const rotate = (0,
|
|
1277
|
+
const rotate = (0, import_react9.useRef)(useGetTargetAngle(isClockwise, offset));
|
|
1275
1278
|
rotate.current = useGetTargetAngle(isClockwise, offset, rotate);
|
|
1276
1279
|
return /* @__PURE__ */ React26.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
1277
1280
|
};
|
|
@@ -1288,8 +1291,8 @@ var useGetTargetAngle = (isClockwise, offset, existingRef) => {
|
|
|
1288
1291
|
};
|
|
1289
1292
|
|
|
1290
1293
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
1291
|
-
var StartIcon = (0, import_ui18.withDirection)(
|
|
1292
|
-
var EndIcon = (0, import_ui18.withDirection)(
|
|
1294
|
+
var StartIcon = (0, import_ui18.withDirection)(import_icons7.LayoutAlignLeftIcon);
|
|
1295
|
+
var EndIcon = (0, import_ui18.withDirection)(import_icons7.LayoutAlignRightIcon);
|
|
1293
1296
|
var iconProps = {
|
|
1294
1297
|
isClockwise: false,
|
|
1295
1298
|
offset: 90
|
|
@@ -1297,42 +1300,42 @@ var iconProps = {
|
|
|
1297
1300
|
var options = [
|
|
1298
1301
|
{
|
|
1299
1302
|
value: "start",
|
|
1300
|
-
label: (0,
|
|
1303
|
+
label: (0, import_i18n10.__)("Start", "elementor"),
|
|
1301
1304
|
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
1302
1305
|
showTooltip: true
|
|
1303
1306
|
},
|
|
1304
1307
|
{
|
|
1305
1308
|
value: "center",
|
|
1306
|
-
label: (0,
|
|
1307
|
-
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon:
|
|
1309
|
+
label: (0, import_i18n10.__)("Center", "elementor"),
|
|
1310
|
+
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: import_icons7.LayoutAlignCenterIcon, size, ...iconProps }),
|
|
1308
1311
|
showTooltip: true
|
|
1309
1312
|
},
|
|
1310
1313
|
{
|
|
1311
1314
|
value: "end",
|
|
1312
|
-
label: (0,
|
|
1315
|
+
label: (0, import_i18n10.__)("End", "elementor"),
|
|
1313
1316
|
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
1314
1317
|
showTooltip: true
|
|
1315
1318
|
},
|
|
1316
1319
|
{
|
|
1317
1320
|
value: "stretch",
|
|
1318
|
-
label: (0,
|
|
1319
|
-
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon:
|
|
1321
|
+
label: (0, import_i18n10.__)("Stretch", "elementor"),
|
|
1322
|
+
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: import_icons7.LayoutDistributeVerticalIcon, size, ...iconProps }),
|
|
1320
1323
|
showTooltip: true
|
|
1321
1324
|
}
|
|
1322
1325
|
];
|
|
1323
1326
|
var AlignItemsField = () => {
|
|
1324
1327
|
const { isSiteRtl } = useDirection();
|
|
1325
|
-
return /* @__PURE__ */ React27.createElement(import_ui18.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React27.createElement(import_ui18.ThemeProvider, null, /* @__PURE__ */ React27.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React27.createElement(import_ui18.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React27.createElement(import_ui18.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React27.createElement(import_editor_controls13.ControlLabel, null, (0,
|
|
1328
|
+
return /* @__PURE__ */ React27.createElement(import_ui18.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React27.createElement(import_ui18.ThemeProvider, null, /* @__PURE__ */ React27.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React27.createElement(import_ui18.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React27.createElement(import_ui18.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React27.createElement(import_editor_controls13.ControlLabel, null, (0, import_i18n10.__)("Align items", "elementor"))), /* @__PURE__ */ React27.createElement(import_ui18.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React27.createElement(import_editor_controls13.ToggleControl, { options }))))));
|
|
1326
1329
|
};
|
|
1327
1330
|
|
|
1328
1331
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
1329
1332
|
var React28 = __toESM(require("react"));
|
|
1330
1333
|
var import_editor_controls14 = require("@elementor/editor-controls");
|
|
1331
|
-
var
|
|
1334
|
+
var import_icons8 = require("@elementor/icons");
|
|
1332
1335
|
var import_ui19 = require("@elementor/ui");
|
|
1333
|
-
var
|
|
1334
|
-
var StartIcon2 = (0, import_ui19.withDirection)(
|
|
1335
|
-
var EndIcon2 = (0, import_ui19.withDirection)(
|
|
1336
|
+
var import_i18n11 = require("@wordpress/i18n");
|
|
1337
|
+
var StartIcon2 = (0, import_ui19.withDirection)(import_icons8.LayoutAlignLeftIcon);
|
|
1338
|
+
var EndIcon2 = (0, import_ui19.withDirection)(import_icons8.LayoutAlignRightIcon);
|
|
1336
1339
|
var iconProps2 = {
|
|
1337
1340
|
isClockwise: false,
|
|
1338
1341
|
offset: 90
|
|
@@ -1340,105 +1343,113 @@ var iconProps2 = {
|
|
|
1340
1343
|
var options2 = [
|
|
1341
1344
|
{
|
|
1342
1345
|
value: "start",
|
|
1343
|
-
label: (0,
|
|
1346
|
+
label: (0, import_i18n11.__)("Start", "elementor"),
|
|
1344
1347
|
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
1345
1348
|
showTooltip: true
|
|
1346
1349
|
},
|
|
1347
1350
|
{
|
|
1348
1351
|
value: "center",
|
|
1349
|
-
label: (0,
|
|
1350
|
-
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon:
|
|
1352
|
+
label: (0, import_i18n11.__)("Center", "elementor"),
|
|
1353
|
+
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: import_icons8.LayoutAlignCenterIcon, size, ...iconProps2 }),
|
|
1351
1354
|
showTooltip: true
|
|
1352
1355
|
},
|
|
1353
1356
|
{
|
|
1354
1357
|
value: "end",
|
|
1355
|
-
label: (0,
|
|
1358
|
+
label: (0, import_i18n11.__)("End", "elementor"),
|
|
1356
1359
|
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
1357
1360
|
showTooltip: true
|
|
1358
1361
|
},
|
|
1359
1362
|
{
|
|
1360
1363
|
value: "stretch",
|
|
1361
|
-
label: (0,
|
|
1362
|
-
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon:
|
|
1364
|
+
label: (0, import_i18n11.__)("Stretch", "elementor"),
|
|
1365
|
+
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: import_icons8.LayoutDistributeVerticalIcon, size, ...iconProps2 }),
|
|
1363
1366
|
showTooltip: true
|
|
1364
1367
|
}
|
|
1365
1368
|
];
|
|
1366
1369
|
var AlignSelfChild = () => {
|
|
1367
1370
|
const { isSiteRtl } = useDirection();
|
|
1368
|
-
return /* @__PURE__ */ React28.createElement(import_ui19.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React28.createElement(import_ui19.ThemeProvider, null, /* @__PURE__ */ React28.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React28.createElement(import_ui19.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React28.createElement(import_ui19.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(import_editor_controls14.ControlLabel, null, (0,
|
|
1371
|
+
return /* @__PURE__ */ React28.createElement(import_ui19.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React28.createElement(import_ui19.ThemeProvider, null, /* @__PURE__ */ React28.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React28.createElement(import_ui19.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React28.createElement(import_ui19.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(import_editor_controls14.ControlLabel, null, (0, import_i18n11.__)("Align self", "elementor"))), /* @__PURE__ */ React28.createElement(import_ui19.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React28.createElement(import_editor_controls14.ToggleControl, { options: options2 }))))));
|
|
1369
1372
|
};
|
|
1370
1373
|
|
|
1371
1374
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
1372
1375
|
var React29 = __toESM(require("react"));
|
|
1373
1376
|
var import_editor_controls15 = require("@elementor/editor-controls");
|
|
1374
1377
|
var import_ui20 = require("@elementor/ui");
|
|
1375
|
-
var
|
|
1378
|
+
var import_i18n12 = require("@wordpress/i18n");
|
|
1376
1379
|
var DisplayField = () => {
|
|
1377
1380
|
const options10 = [
|
|
1378
1381
|
{
|
|
1379
1382
|
value: "block",
|
|
1380
|
-
renderContent: () => (0,
|
|
1381
|
-
label: (0,
|
|
1383
|
+
renderContent: () => (0, import_i18n12.__)("Block", "elementor"),
|
|
1384
|
+
label: (0, import_i18n12.__)("Block", "elementor"),
|
|
1385
|
+
showTooltip: true
|
|
1382
1386
|
},
|
|
1383
1387
|
{
|
|
1384
1388
|
value: "flex",
|
|
1385
|
-
renderContent: () => (0,
|
|
1386
|
-
label: (0,
|
|
1389
|
+
renderContent: () => (0, import_i18n12.__)("Flex", "elementor"),
|
|
1390
|
+
label: (0, import_i18n12.__)("Flex", "elementor"),
|
|
1391
|
+
showTooltip: true
|
|
1392
|
+
},
|
|
1393
|
+
{
|
|
1394
|
+
value: "inline-block",
|
|
1395
|
+
renderContent: () => (0, import_i18n12.__)("In-blk", "elementor"),
|
|
1396
|
+
label: (0, import_i18n12.__)("Inline-block", "elementor"),
|
|
1397
|
+
showTooltip: true
|
|
1387
1398
|
}
|
|
1388
1399
|
];
|
|
1389
|
-
return /* @__PURE__ */ React29.createElement(StylesField, { bind: "display" }, /* @__PURE__ */ React29.createElement(import_ui20.Stack, { gap: 1 }, /* @__PURE__ */ React29.createElement(import_editor_controls15.ControlLabel, null, (0,
|
|
1400
|
+
return /* @__PURE__ */ React29.createElement(StylesField, { bind: "display" }, /* @__PURE__ */ React29.createElement(import_ui20.Stack, { gap: 1 }, /* @__PURE__ */ React29.createElement(import_editor_controls15.ControlLabel, null, (0, import_i18n12.__)("Display", "elementor")), /* @__PURE__ */ React29.createElement(import_editor_controls15.ToggleControl, { options: options10, fullWidth: true })));
|
|
1390
1401
|
};
|
|
1391
1402
|
|
|
1392
1403
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
1393
1404
|
var React30 = __toESM(require("react"));
|
|
1394
1405
|
var import_editor_controls16 = require("@elementor/editor-controls");
|
|
1395
|
-
var
|
|
1406
|
+
var import_icons9 = require("@elementor/icons");
|
|
1396
1407
|
var import_ui21 = require("@elementor/ui");
|
|
1397
|
-
var
|
|
1408
|
+
var import_i18n13 = require("@wordpress/i18n");
|
|
1398
1409
|
var options3 = [
|
|
1399
1410
|
{
|
|
1400
1411
|
value: "row",
|
|
1401
|
-
label: (0,
|
|
1412
|
+
label: (0, import_i18n13.__)("Row", "elementor"),
|
|
1402
1413
|
renderContent: ({ size }) => {
|
|
1403
|
-
const
|
|
1404
|
-
return /* @__PURE__ */ React30.createElement(
|
|
1414
|
+
const StartIcon5 = (0, import_ui21.withDirection)(import_icons9.ArrowRightIcon);
|
|
1415
|
+
return /* @__PURE__ */ React30.createElement(StartIcon5, { fontSize: size });
|
|
1405
1416
|
},
|
|
1406
1417
|
showTooltip: true
|
|
1407
1418
|
},
|
|
1408
1419
|
{
|
|
1409
1420
|
value: "column",
|
|
1410
|
-
label: (0,
|
|
1411
|
-
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(
|
|
1421
|
+
label: (0, import_i18n13.__)("Column", "elementor"),
|
|
1422
|
+
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(import_icons9.ArrowDownSmallIcon, { fontSize: size }),
|
|
1412
1423
|
showTooltip: true
|
|
1413
1424
|
},
|
|
1414
1425
|
{
|
|
1415
1426
|
value: "row-reverse",
|
|
1416
|
-
label: (0,
|
|
1427
|
+
label: (0, import_i18n13.__)("Reversed row", "elementor"),
|
|
1417
1428
|
renderContent: ({ size }) => {
|
|
1418
|
-
const
|
|
1419
|
-
return /* @__PURE__ */ React30.createElement(
|
|
1429
|
+
const EndIcon5 = (0, import_ui21.withDirection)(import_icons9.ArrowLeftIcon);
|
|
1430
|
+
return /* @__PURE__ */ React30.createElement(EndIcon5, { fontSize: size });
|
|
1420
1431
|
},
|
|
1421
1432
|
showTooltip: true
|
|
1422
1433
|
},
|
|
1423
1434
|
{
|
|
1424
1435
|
value: "column-reverse",
|
|
1425
|
-
label: (0,
|
|
1426
|
-
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(
|
|
1436
|
+
label: (0, import_i18n13.__)("Reversed column", "elementor"),
|
|
1437
|
+
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(import_icons9.ArrowUpSmallIcon, { fontSize: size }),
|
|
1427
1438
|
showTooltip: true
|
|
1428
1439
|
}
|
|
1429
1440
|
];
|
|
1430
1441
|
var FlexDirectionField = () => {
|
|
1431
1442
|
const { isSiteRtl } = useDirection();
|
|
1432
|
-
return /* @__PURE__ */ React30.createElement(import_ui21.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React30.createElement(import_ui21.ThemeProvider, null, /* @__PURE__ */ React30.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React30.createElement(import_ui21.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React30.createElement(import_ui21.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(import_editor_controls16.ControlLabel, null, (0,
|
|
1443
|
+
return /* @__PURE__ */ React30.createElement(import_ui21.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React30.createElement(import_ui21.ThemeProvider, null, /* @__PURE__ */ React30.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React30.createElement(import_ui21.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React30.createElement(import_ui21.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(import_editor_controls16.ControlLabel, null, (0, import_i18n13.__)("Direction", "elementor"))), /* @__PURE__ */ React30.createElement(import_ui21.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React30.createElement(import_editor_controls16.ToggleControl, { options: options3 }))))));
|
|
1433
1444
|
};
|
|
1434
1445
|
|
|
1435
1446
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
1436
1447
|
var React31 = __toESM(require("react"));
|
|
1437
|
-
var
|
|
1448
|
+
var import_react10 = require("react");
|
|
1438
1449
|
var import_editor_controls17 = require("@elementor/editor-controls");
|
|
1439
|
-
var
|
|
1450
|
+
var import_icons10 = require("@elementor/icons");
|
|
1440
1451
|
var import_ui22 = require("@elementor/ui");
|
|
1441
|
-
var
|
|
1452
|
+
var import_i18n14 = require("@wordpress/i18n");
|
|
1442
1453
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
1443
1454
|
var LAST_DEFAULT_VALUE = 99999;
|
|
1444
1455
|
var FIRST = "first";
|
|
@@ -1451,26 +1462,26 @@ var orderValueMap = {
|
|
|
1451
1462
|
var items = [
|
|
1452
1463
|
{
|
|
1453
1464
|
value: FIRST,
|
|
1454
|
-
label: (0,
|
|
1455
|
-
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(
|
|
1465
|
+
label: (0, import_i18n14.__)("First", "elementor"),
|
|
1466
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(import_icons10.ArrowUpSmallIcon, { fontSize: size }),
|
|
1456
1467
|
showTooltip: true
|
|
1457
1468
|
},
|
|
1458
1469
|
{
|
|
1459
1470
|
value: LAST,
|
|
1460
|
-
label: (0,
|
|
1461
|
-
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(
|
|
1471
|
+
label: (0, import_i18n14.__)("Last", "elementor"),
|
|
1472
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(import_icons10.ArrowDownSmallIcon, { fontSize: size }),
|
|
1462
1473
|
showTooltip: true
|
|
1463
1474
|
},
|
|
1464
1475
|
{
|
|
1465
1476
|
value: CUSTOM,
|
|
1466
|
-
label: (0,
|
|
1467
|
-
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(
|
|
1477
|
+
label: (0, import_i18n14.__)("Custom", "elementor"),
|
|
1478
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(import_icons10.PencilIcon, { fontSize: size }),
|
|
1468
1479
|
showTooltip: true
|
|
1469
1480
|
}
|
|
1470
1481
|
];
|
|
1471
1482
|
var FlexOrderField = () => {
|
|
1472
1483
|
const { isSiteRtl } = useDirection(), [order, setOrder] = useStylesField("order");
|
|
1473
|
-
const [groupControlValue, setGroupControlValue] = (0,
|
|
1484
|
+
const [groupControlValue, setGroupControlValue] = (0, import_react10.useState)(getGroupControlValue(order?.value || null));
|
|
1474
1485
|
const handleToggleButtonChange = (group) => {
|
|
1475
1486
|
setGroupControlValue(group);
|
|
1476
1487
|
if (!group || group === CUSTOM) {
|
|
@@ -1479,7 +1490,7 @@ var FlexOrderField = () => {
|
|
|
1479
1490
|
}
|
|
1480
1491
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
1481
1492
|
};
|
|
1482
|
-
return /* @__PURE__ */ React31.createElement(import_ui22.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React31.createElement(import_ui22.ThemeProvider, null, /* @__PURE__ */ React31.createElement(import_ui22.Stack, { gap: 2 }, /* @__PURE__ */ React31.createElement(import_ui22.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(import_ui22.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(import_editor_controls17.ControlLabel, null, (0,
|
|
1493
|
+
return /* @__PURE__ */ React31.createElement(import_ui22.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React31.createElement(import_ui22.ThemeProvider, null, /* @__PURE__ */ React31.createElement(import_ui22.Stack, { gap: 2 }, /* @__PURE__ */ React31.createElement(import_ui22.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(import_ui22.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(import_editor_controls17.ControlLabel, null, (0, import_i18n14.__)("Order", "elementor"))), /* @__PURE__ */ React31.createElement(import_ui22.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(
|
|
1483
1494
|
import_editor_controls17.ControlToggleButtonGroup,
|
|
1484
1495
|
{
|
|
1485
1496
|
items,
|
|
@@ -1487,7 +1498,7 @@ var FlexOrderField = () => {
|
|
|
1487
1498
|
onChange: handleToggleButtonChange,
|
|
1488
1499
|
exclusive: true
|
|
1489
1500
|
}
|
|
1490
|
-
))), CUSTOM === groupControlValue && /* @__PURE__ */ React31.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React31.createElement(import_ui22.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(import_ui22.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(import_editor_controls17.ControlLabel, null, (0,
|
|
1501
|
+
))), CUSTOM === groupControlValue && /* @__PURE__ */ React31.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React31.createElement(import_ui22.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(import_ui22.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(import_editor_controls17.ControlLabel, null, (0, import_i18n14.__)("Custom order", "elementor"))), /* @__PURE__ */ React31.createElement(import_ui22.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(
|
|
1491
1502
|
import_editor_controls17.NumberControl,
|
|
1492
1503
|
{
|
|
1493
1504
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
@@ -1508,36 +1519,36 @@ var getGroupControlValue = (order) => {
|
|
|
1508
1519
|
|
|
1509
1520
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
1510
1521
|
var React32 = __toESM(require("react"));
|
|
1511
|
-
var
|
|
1522
|
+
var import_react11 = require("react");
|
|
1512
1523
|
var import_editor_controls18 = require("@elementor/editor-controls");
|
|
1513
|
-
var
|
|
1524
|
+
var import_icons11 = require("@elementor/icons");
|
|
1514
1525
|
var import_ui23 = require("@elementor/ui");
|
|
1515
|
-
var
|
|
1526
|
+
var import_i18n15 = require("@wordpress/i18n");
|
|
1516
1527
|
var DEFAULT = 1;
|
|
1517
1528
|
var items2 = [
|
|
1518
1529
|
{
|
|
1519
1530
|
value: "flex-grow",
|
|
1520
|
-
label: (0,
|
|
1521
|
-
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(
|
|
1531
|
+
label: (0, import_i18n15.__)("Grow", "elementor"),
|
|
1532
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(import_icons11.ExpandIcon, { fontSize: size }),
|
|
1522
1533
|
showTooltip: true
|
|
1523
1534
|
},
|
|
1524
1535
|
{
|
|
1525
1536
|
value: "flex-shrink",
|
|
1526
|
-
label: (0,
|
|
1527
|
-
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(
|
|
1537
|
+
label: (0, import_i18n15.__)("Shrink", "elementor"),
|
|
1538
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(import_icons11.ShrinkIcon, { fontSize: size }),
|
|
1528
1539
|
showTooltip: true
|
|
1529
1540
|
},
|
|
1530
1541
|
{
|
|
1531
1542
|
value: "custom",
|
|
1532
|
-
label: (0,
|
|
1533
|
-
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(
|
|
1543
|
+
label: (0, import_i18n15.__)("Custom", "elementor"),
|
|
1544
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(import_icons11.PencilIcon, { fontSize: size }),
|
|
1534
1545
|
showTooltip: true
|
|
1535
1546
|
}
|
|
1536
1547
|
];
|
|
1537
1548
|
var FlexSizeField = () => {
|
|
1538
1549
|
const { isSiteRtl } = useDirection(), [growField, setGrowField] = useStylesField("flex-grow"), [shrinkField, setShrinkField] = useStylesField("flex-shrink"), [basisField, setBasisField] = useStylesField("flex-basis");
|
|
1539
1550
|
const grow = growField?.value || null, shrink = shrinkField?.value || null, basis = basisField?.value || null;
|
|
1540
|
-
const currentGroup = (0,
|
|
1551
|
+
const currentGroup = (0, import_react11.useMemo)(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = (0, import_react11.useState)(currentGroup);
|
|
1541
1552
|
const onChangeGroup = (group = null) => {
|
|
1542
1553
|
setActiveGroup(group);
|
|
1543
1554
|
setBasisField(null);
|
|
@@ -1554,7 +1565,7 @@ var FlexSizeField = () => {
|
|
|
1554
1565
|
setGrowField(null);
|
|
1555
1566
|
setShrinkField({ $$type: "number", value: DEFAULT });
|
|
1556
1567
|
};
|
|
1557
|
-
return /* @__PURE__ */ React32.createElement(import_ui23.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React32.createElement(import_ui23.ThemeProvider, null, /* @__PURE__ */ React32.createElement(import_ui23.Stack, { gap: 2 }, /* @__PURE__ */ React32.createElement(import_ui23.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(import_ui23.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(import_editor_controls18.ControlLabel, null, (0,
|
|
1568
|
+
return /* @__PURE__ */ React32.createElement(import_ui23.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React32.createElement(import_ui23.ThemeProvider, null, /* @__PURE__ */ React32.createElement(import_ui23.Stack, { gap: 2 }, /* @__PURE__ */ React32.createElement(import_ui23.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(import_ui23.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(import_editor_controls18.ControlLabel, null, (0, import_i18n15.__)("Size", "elementor"))), /* @__PURE__ */ React32.createElement(import_ui23.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React32.createElement(
|
|
1558
1569
|
import_editor_controls18.ControlToggleButtonGroup,
|
|
1559
1570
|
{
|
|
1560
1571
|
value: activeGroup,
|
|
@@ -1564,7 +1575,7 @@ var FlexSizeField = () => {
|
|
|
1564
1575
|
}
|
|
1565
1576
|
))), "custom" === activeGroup && /* @__PURE__ */ React32.createElement(FlexCustomField, null))));
|
|
1566
1577
|
};
|
|
1567
|
-
var FlexCustomField = () => /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React32.createElement(import_ui23.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(import_ui23.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(import_editor_controls18.ControlLabel, null, (0,
|
|
1578
|
+
var FlexCustomField = () => /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React32.createElement(import_ui23.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(import_ui23.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(import_editor_controls18.ControlLabel, null, (0, import_i18n15.__)("Grow", "elementor"))), /* @__PURE__ */ React32.createElement(import_ui23.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React32.createElement(import_editor_controls18.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React32.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React32.createElement(import_ui23.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(import_ui23.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(import_editor_controls18.ControlLabel, null, (0, import_i18n15.__)("Shrink", "elementor"))), /* @__PURE__ */ React32.createElement(import_ui23.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React32.createElement(import_editor_controls18.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React32.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React32.createElement(import_ui23.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(import_ui23.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(import_editor_controls18.ControlLabel, null, (0, import_i18n15.__)("Basis", "elementor"))), /* @__PURE__ */ React32.createElement(import_ui23.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React32.createElement(import_editor_controls18.SizeControl, null)))));
|
|
1568
1579
|
var getActiveGroup = ({
|
|
1569
1580
|
grow,
|
|
1570
1581
|
shrink,
|
|
@@ -1589,19 +1600,19 @@ var getActiveGroup = ({
|
|
|
1589
1600
|
var React33 = __toESM(require("react"));
|
|
1590
1601
|
var import_editor_controls19 = require("@elementor/editor-controls");
|
|
1591
1602
|
var import_ui24 = require("@elementor/ui");
|
|
1592
|
-
var
|
|
1603
|
+
var import_i18n16 = require("@wordpress/i18n");
|
|
1593
1604
|
var GapControlField = () => {
|
|
1594
|
-
return /* @__PURE__ */ React33.createElement(import_ui24.Stack, { gap: 1 }, /* @__PURE__ */ React33.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React33.createElement(import_editor_controls19.GapControl, { label: (0,
|
|
1605
|
+
return /* @__PURE__ */ React33.createElement(import_ui24.Stack, { gap: 1 }, /* @__PURE__ */ React33.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React33.createElement(import_editor_controls19.GapControl, { label: (0, import_i18n16.__)("Gaps", "elementor") })));
|
|
1595
1606
|
};
|
|
1596
1607
|
|
|
1597
1608
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
1598
1609
|
var React34 = __toESM(require("react"));
|
|
1599
1610
|
var import_editor_controls20 = require("@elementor/editor-controls");
|
|
1600
|
-
var
|
|
1611
|
+
var import_icons12 = require("@elementor/icons");
|
|
1601
1612
|
var import_ui25 = require("@elementor/ui");
|
|
1602
|
-
var
|
|
1603
|
-
var StartIcon3 = (0, import_ui25.withDirection)(
|
|
1604
|
-
var EndIcon3 = (0, import_ui25.withDirection)(
|
|
1613
|
+
var import_i18n17 = require("@wordpress/i18n");
|
|
1614
|
+
var StartIcon3 = (0, import_ui25.withDirection)(import_icons12.JustifyTopIcon);
|
|
1615
|
+
var EndIcon3 = (0, import_ui25.withDirection)(import_icons12.JustifyBottomIcon);
|
|
1605
1616
|
var iconProps3 = {
|
|
1606
1617
|
isClockwise: true,
|
|
1607
1618
|
offset: -90
|
|
@@ -1609,75 +1620,75 @@ var iconProps3 = {
|
|
|
1609
1620
|
var options4 = [
|
|
1610
1621
|
{
|
|
1611
1622
|
value: "start",
|
|
1612
|
-
label: (0,
|
|
1623
|
+
label: (0, import_i18n17.__)("Start", "elementor"),
|
|
1613
1624
|
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: StartIcon3, size, ...iconProps3 }),
|
|
1614
1625
|
showTooltip: true
|
|
1615
1626
|
},
|
|
1616
1627
|
{
|
|
1617
1628
|
value: "center",
|
|
1618
|
-
label: (0,
|
|
1619
|
-
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon:
|
|
1629
|
+
label: (0, import_i18n17.__)("Center", "elementor"),
|
|
1630
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: import_icons12.JustifyCenterIcon, size, ...iconProps3 }),
|
|
1620
1631
|
showTooltip: true
|
|
1621
1632
|
},
|
|
1622
1633
|
{
|
|
1623
1634
|
value: "end",
|
|
1624
|
-
label: (0,
|
|
1635
|
+
label: (0, import_i18n17.__)("End", "elementor"),
|
|
1625
1636
|
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: EndIcon3, size, ...iconProps3 }),
|
|
1626
1637
|
showTooltip: true
|
|
1627
1638
|
},
|
|
1628
1639
|
{
|
|
1629
1640
|
value: "space-between",
|
|
1630
|
-
label: (0,
|
|
1631
|
-
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon:
|
|
1641
|
+
label: (0, import_i18n17.__)("Space between", "elementor"),
|
|
1642
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: import_icons12.JustifySpaceBetweenVerticalIcon, size, ...iconProps3 }),
|
|
1632
1643
|
showTooltip: true
|
|
1633
1644
|
},
|
|
1634
1645
|
{
|
|
1635
1646
|
value: "space-around",
|
|
1636
|
-
label: (0,
|
|
1637
|
-
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon:
|
|
1647
|
+
label: (0, import_i18n17.__)("Space around", "elementor"),
|
|
1648
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: import_icons12.JustifySpaceAroundVerticalIcon, size, ...iconProps3 }),
|
|
1638
1649
|
showTooltip: true
|
|
1639
1650
|
},
|
|
1640
1651
|
{
|
|
1641
1652
|
value: "space-evenly",
|
|
1642
|
-
label: (0,
|
|
1643
|
-
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon:
|
|
1653
|
+
label: (0, import_i18n17.__)("Space evenly", "elementor"),
|
|
1654
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: import_icons12.JustifyDistributeVerticalIcon, size, ...iconProps3 }),
|
|
1644
1655
|
showTooltip: true
|
|
1645
1656
|
}
|
|
1646
1657
|
];
|
|
1647
1658
|
var JustifyContentField = () => {
|
|
1648
1659
|
const { isSiteRtl } = useDirection();
|
|
1649
|
-
return /* @__PURE__ */ React34.createElement(import_ui25.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React34.createElement(import_ui25.ThemeProvider, null, /* @__PURE__ */ React34.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React34.createElement(import_ui25.Stack, { gap: 1 }, /* @__PURE__ */ React34.createElement(import_editor_controls20.ControlLabel, null, (0,
|
|
1660
|
+
return /* @__PURE__ */ React34.createElement(import_ui25.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React34.createElement(import_ui25.ThemeProvider, null, /* @__PURE__ */ React34.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React34.createElement(import_ui25.Stack, { gap: 1 }, /* @__PURE__ */ React34.createElement(import_editor_controls20.ControlLabel, null, (0, import_i18n17.__)("Justify content", "elementor")), /* @__PURE__ */ React34.createElement(import_editor_controls20.ToggleControl, { options: options4, fullWidth: true })))));
|
|
1650
1661
|
};
|
|
1651
1662
|
|
|
1652
1663
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
1653
1664
|
var React35 = __toESM(require("react"));
|
|
1654
1665
|
var import_editor_controls21 = require("@elementor/editor-controls");
|
|
1655
|
-
var
|
|
1666
|
+
var import_icons13 = require("@elementor/icons");
|
|
1656
1667
|
var import_ui26 = require("@elementor/ui");
|
|
1657
|
-
var
|
|
1668
|
+
var import_i18n18 = require("@wordpress/i18n");
|
|
1658
1669
|
var options5 = [
|
|
1659
1670
|
{
|
|
1660
1671
|
value: "nowrap",
|
|
1661
|
-
label: (0,
|
|
1662
|
-
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(
|
|
1672
|
+
label: (0, import_i18n18.__)("No wrap", "elementor"),
|
|
1673
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(import_icons13.ArrowRightIcon, { fontSize: size }),
|
|
1663
1674
|
showTooltip: true
|
|
1664
1675
|
},
|
|
1665
1676
|
{
|
|
1666
1677
|
value: "wrap",
|
|
1667
|
-
label: (0,
|
|
1668
|
-
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(
|
|
1678
|
+
label: (0, import_i18n18.__)("Wrap", "elementor"),
|
|
1679
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(import_icons13.ArrowBackIcon, { fontSize: size }),
|
|
1669
1680
|
showTooltip: true
|
|
1670
1681
|
},
|
|
1671
1682
|
{
|
|
1672
1683
|
value: "wrap-reverse",
|
|
1673
|
-
label: (0,
|
|
1674
|
-
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(
|
|
1684
|
+
label: (0, import_i18n18.__)("Reversed wrap", "elementor"),
|
|
1685
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(import_icons13.ArrowForwardIcon, { fontSize: size }),
|
|
1675
1686
|
showTooltip: true
|
|
1676
1687
|
}
|
|
1677
1688
|
];
|
|
1678
1689
|
var WrapField = () => {
|
|
1679
1690
|
const { isSiteRtl } = useDirection();
|
|
1680
|
-
return /* @__PURE__ */ React35.createElement(import_ui26.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React35.createElement(import_ui26.ThemeProvider, null, /* @__PURE__ */ React35.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React35.createElement(import_ui26.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React35.createElement(import_ui26.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React35.createElement(import_editor_controls21.ControlLabel, null, (0,
|
|
1691
|
+
return /* @__PURE__ */ React35.createElement(import_ui26.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React35.createElement(import_ui26.ThemeProvider, null, /* @__PURE__ */ React35.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React35.createElement(import_ui26.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React35.createElement(import_ui26.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React35.createElement(import_editor_controls21.ControlLabel, null, (0, import_i18n18.__)("Wrap", "elementor"))), /* @__PURE__ */ React35.createElement(import_ui26.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React35.createElement(import_editor_controls21.ToggleControl, { options: options5 }))))));
|
|
1681
1692
|
};
|
|
1682
1693
|
|
|
1683
1694
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
@@ -1689,63 +1700,27 @@ var LayoutSection = () => {
|
|
|
1689
1700
|
return /* @__PURE__ */ React36.createElement(import_ui27.Stack, { gap: 2 }, /* @__PURE__ */ React36.createElement(DisplayField, null), "flex" === display?.value && /* @__PURE__ */ React36.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React36.createElement(FlexChildFields, null));
|
|
1690
1701
|
};
|
|
1691
1702
|
var FlexFields = () => /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(FlexDirectionField, null), /* @__PURE__ */ React36.createElement(JustifyContentField, null), /* @__PURE__ */ React36.createElement(AlignItemsField, null), /* @__PURE__ */ React36.createElement(import_ui27.Divider, null), /* @__PURE__ */ React36.createElement(GapControlField, null), /* @__PURE__ */ React36.createElement(WrapField, null));
|
|
1692
|
-
var FlexChildFields = () => /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(import_ui27.Divider, null), /* @__PURE__ */ React36.createElement(import_editor_controls22.ControlLabel, null, (0,
|
|
1703
|
+
var FlexChildFields = () => /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(import_ui27.Divider, null), /* @__PURE__ */ React36.createElement(import_editor_controls22.ControlLabel, null, (0, import_i18n19.__)("Flex child", "elementor")), /* @__PURE__ */ React36.createElement(AlignSelfChild, null), /* @__PURE__ */ React36.createElement(FlexOrderField, null), /* @__PURE__ */ React36.createElement(FlexSizeField, null));
|
|
1693
1704
|
|
|
1694
1705
|
// src/components/style-sections/position-section/position-section.tsx
|
|
1695
1706
|
var React40 = __toESM(require("react"));
|
|
1707
|
+
var import_session2 = require("@elementor/session");
|
|
1696
1708
|
var import_ui31 = require("@elementor/ui");
|
|
1697
1709
|
|
|
1698
|
-
// src/hooks/use-session-storage.ts
|
|
1699
|
-
var import_react13 = require("react");
|
|
1700
|
-
var import_utils2 = require("@elementor/utils");
|
|
1701
|
-
var useSessionStorage = (key) => {
|
|
1702
|
-
const prefixedKey = `elementor/${key}`;
|
|
1703
|
-
const [value, setValue] = (0, import_react13.useState)();
|
|
1704
|
-
(0, import_react13.useEffect)(() => {
|
|
1705
|
-
return subscribeToSessionStorage(prefixedKey, (newValue) => {
|
|
1706
|
-
setValue(newValue ?? null);
|
|
1707
|
-
});
|
|
1708
|
-
}, [prefixedKey]);
|
|
1709
|
-
const saveValue = (newValue) => {
|
|
1710
|
-
(0, import_utils2.setSessionStorageItem)(prefixedKey, newValue);
|
|
1711
|
-
};
|
|
1712
|
-
const removeValue = () => {
|
|
1713
|
-
(0, import_utils2.removeSessionStorageItem)(prefixedKey);
|
|
1714
|
-
};
|
|
1715
|
-
return [value, saveValue, removeValue];
|
|
1716
|
-
};
|
|
1717
|
-
var subscribeToSessionStorage = (key, subscriber) => {
|
|
1718
|
-
subscriber((0, import_utils2.getSessionStorageItem)(key));
|
|
1719
|
-
const abortController = new AbortController();
|
|
1720
|
-
window.addEventListener(
|
|
1721
|
-
"storage",
|
|
1722
|
-
(e) => {
|
|
1723
|
-
if (e.key !== key || e.storageArea !== sessionStorage) {
|
|
1724
|
-
return;
|
|
1725
|
-
}
|
|
1726
|
-
subscriber((0, import_utils2.getSessionStorageItem)(key));
|
|
1727
|
-
},
|
|
1728
|
-
{ signal: abortController.signal }
|
|
1729
|
-
);
|
|
1730
|
-
return () => {
|
|
1731
|
-
abortController.abort();
|
|
1732
|
-
};
|
|
1733
|
-
};
|
|
1734
|
-
|
|
1735
1710
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
1736
1711
|
var React37 = __toESM(require("react"));
|
|
1737
1712
|
var import_editor_controls23 = require("@elementor/editor-controls");
|
|
1738
|
-
var
|
|
1713
|
+
var import_icons14 = require("@elementor/icons");
|
|
1739
1714
|
var import_ui28 = require("@elementor/ui");
|
|
1740
|
-
var
|
|
1715
|
+
var import_i18n20 = require("@wordpress/i18n");
|
|
1741
1716
|
var sideIcons = {
|
|
1742
|
-
left: /* @__PURE__ */ React37.createElement(
|
|
1743
|
-
right: /* @__PURE__ */ React37.createElement(
|
|
1744
|
-
top: /* @__PURE__ */ React37.createElement(
|
|
1745
|
-
bottom: /* @__PURE__ */ React37.createElement(
|
|
1717
|
+
left: /* @__PURE__ */ React37.createElement(import_icons14.SideLeftIcon, { fontSize: "tiny" }),
|
|
1718
|
+
right: /* @__PURE__ */ React37.createElement(import_icons14.SideRightIcon, { fontSize: "tiny" }),
|
|
1719
|
+
top: /* @__PURE__ */ React37.createElement(import_icons14.SideTopIcon, { fontSize: "tiny" }),
|
|
1720
|
+
bottom: /* @__PURE__ */ React37.createElement(import_icons14.SideBottomIcon, { fontSize: "tiny" })
|
|
1746
1721
|
};
|
|
1747
1722
|
var DimensionsField = () => {
|
|
1748
|
-
return /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement(import_ui28.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(DimensionField, { side: "top", label: (0,
|
|
1723
|
+
return /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement(import_ui28.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(DimensionField, { side: "top", label: (0, import_i18n20.__)("Top", "elementor") }), /* @__PURE__ */ React37.createElement(DimensionField, { side: "right", label: (0, import_i18n20.__)("Right", "elementor") })), /* @__PURE__ */ React37.createElement(import_ui28.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(DimensionField, { side: "bottom", label: (0, import_i18n20.__)("Bottom", "elementor") }), /* @__PURE__ */ React37.createElement(DimensionField, { side: "left", label: (0, import_i18n20.__)("Left", "elementor") })));
|
|
1749
1724
|
};
|
|
1750
1725
|
var DimensionField = ({ side, label }) => {
|
|
1751
1726
|
return /* @__PURE__ */ React37.createElement(import_ui28.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React37.createElement(import_ui28.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React37.createElement(import_editor_controls23.ControlLabel, null, label)), /* @__PURE__ */ React37.createElement(import_ui28.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React37.createElement(StylesField, { bind: side }, /* @__PURE__ */ React37.createElement(import_editor_controls23.SizeControl, { startIcon: sideIcons[side] }))));
|
|
@@ -1755,25 +1730,25 @@ var DimensionField = ({ side, label }) => {
|
|
|
1755
1730
|
var React38 = __toESM(require("react"));
|
|
1756
1731
|
var import_editor_controls24 = require("@elementor/editor-controls");
|
|
1757
1732
|
var import_ui29 = require("@elementor/ui");
|
|
1758
|
-
var
|
|
1733
|
+
var import_i18n21 = require("@wordpress/i18n");
|
|
1759
1734
|
var positionOptions = [
|
|
1760
|
-
{ label: (0,
|
|
1761
|
-
{ label: (0,
|
|
1762
|
-
{ label: (0,
|
|
1763
|
-
{ label: (0,
|
|
1764
|
-
{ label: (0,
|
|
1735
|
+
{ label: (0, import_i18n21.__)("Static", "elementor"), value: "static" },
|
|
1736
|
+
{ label: (0, import_i18n21.__)("Relative", "elementor"), value: "relative" },
|
|
1737
|
+
{ label: (0, import_i18n21.__)("Absolute", "elementor"), value: "absolute" },
|
|
1738
|
+
{ label: (0, import_i18n21.__)("Fixed", "elementor"), value: "fixed" },
|
|
1739
|
+
{ label: (0, import_i18n21.__)("Sticky", "elementor"), value: "sticky" }
|
|
1765
1740
|
];
|
|
1766
1741
|
var PositionField = ({ onChange }) => {
|
|
1767
|
-
return /* @__PURE__ */ React38.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React38.createElement(import_ui29.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(import_ui29.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(import_editor_controls24.ControlLabel, null, (0,
|
|
1742
|
+
return /* @__PURE__ */ React38.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React38.createElement(import_ui29.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(import_ui29.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(import_editor_controls24.ControlLabel, null, (0, import_i18n21.__)("Position", "elementor"))), /* @__PURE__ */ React38.createElement(import_ui29.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(import_editor_controls24.SelectControl, { options: positionOptions, onChange }))));
|
|
1768
1743
|
};
|
|
1769
1744
|
|
|
1770
1745
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
1771
1746
|
var React39 = __toESM(require("react"));
|
|
1772
1747
|
var import_editor_controls25 = require("@elementor/editor-controls");
|
|
1773
1748
|
var import_ui30 = require("@elementor/ui");
|
|
1774
|
-
var
|
|
1749
|
+
var import_i18n22 = require("@wordpress/i18n");
|
|
1775
1750
|
var ZIndexField = () => {
|
|
1776
|
-
return /* @__PURE__ */ React39.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React39.createElement(import_ui30.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(import_ui30.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(import_editor_controls25.ControlLabel, null, (0,
|
|
1751
|
+
return /* @__PURE__ */ React39.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React39.createElement(import_ui30.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(import_ui30.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(import_editor_controls25.ControlLabel, null, (0, import_i18n22.__)("Z-Index", "elementor"))), /* @__PURE__ */ React39.createElement(import_ui30.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(import_editor_controls25.NumberControl, null))));
|
|
1777
1752
|
};
|
|
1778
1753
|
|
|
1779
1754
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -1811,48 +1786,48 @@ var usePersistDimensions = () => {
|
|
|
1811
1786
|
const { id: styleDefID, meta } = useStyle();
|
|
1812
1787
|
const styleVariantPath = `styles/${styleDefID}/${meta.breakpoint || "desktop"}/${meta.state || "null"}`;
|
|
1813
1788
|
const dimensionsPath = `${styleVariantPath}/dimensions`;
|
|
1814
|
-
return useSessionStorage(dimensionsPath);
|
|
1789
|
+
return (0, import_session2.useSessionStorage)(dimensionsPath);
|
|
1815
1790
|
};
|
|
1816
1791
|
|
|
1817
1792
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1818
1793
|
var React42 = __toESM(require("react"));
|
|
1819
1794
|
var import_editor_controls27 = require("@elementor/editor-controls");
|
|
1820
1795
|
var import_ui33 = require("@elementor/ui");
|
|
1821
|
-
var
|
|
1796
|
+
var import_i18n24 = require("@wordpress/i18n");
|
|
1822
1797
|
|
|
1823
1798
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
1824
1799
|
var React41 = __toESM(require("react"));
|
|
1825
1800
|
var import_editor_controls26 = require("@elementor/editor-controls");
|
|
1826
|
-
var
|
|
1801
|
+
var import_icons15 = require("@elementor/icons");
|
|
1827
1802
|
var import_ui32 = require("@elementor/ui");
|
|
1828
|
-
var
|
|
1803
|
+
var import_i18n23 = require("@wordpress/i18n");
|
|
1829
1804
|
var options6 = [
|
|
1830
1805
|
{
|
|
1831
1806
|
value: "visible",
|
|
1832
|
-
label: (0,
|
|
1833
|
-
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(
|
|
1807
|
+
label: (0, import_i18n23.__)("Visible", "elementor"),
|
|
1808
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(import_icons15.EyeIcon, { fontSize: size }),
|
|
1834
1809
|
showTooltip: true
|
|
1835
1810
|
},
|
|
1836
1811
|
{
|
|
1837
1812
|
value: "hidden",
|
|
1838
|
-
label: (0,
|
|
1839
|
-
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(
|
|
1813
|
+
label: (0, import_i18n23.__)("Hidden", "elementor"),
|
|
1814
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(import_icons15.EyeOffIcon, { fontSize: size }),
|
|
1840
1815
|
showTooltip: true
|
|
1841
1816
|
},
|
|
1842
1817
|
{
|
|
1843
1818
|
value: "auto",
|
|
1844
|
-
label: (0,
|
|
1845
|
-
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(
|
|
1819
|
+
label: (0, import_i18n23.__)("Auto", "elementor"),
|
|
1820
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(import_icons15.ExpandBottomIcon, { fontSize: size }),
|
|
1846
1821
|
showTooltip: true
|
|
1847
1822
|
}
|
|
1848
1823
|
];
|
|
1849
1824
|
var OverflowField = () => {
|
|
1850
|
-
return /* @__PURE__ */ React41.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React41.createElement(import_ui32.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(import_editor_controls26.ControlLabel, null, (0,
|
|
1825
|
+
return /* @__PURE__ */ React41.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React41.createElement(import_ui32.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(import_editor_controls26.ControlLabel, null, (0, import_i18n23.__)("Overflow", "elementor"))), /* @__PURE__ */ React41.createElement(import_ui32.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React41.createElement(import_editor_controls26.ToggleControl, { options: options6 }))));
|
|
1851
1826
|
};
|
|
1852
1827
|
|
|
1853
1828
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1854
1829
|
var SizeSection = () => {
|
|
1855
|
-
return /* @__PURE__ */ React42.createElement(import_ui33.Stack, { gap: 1.5 }, /* @__PURE__ */ React42.createElement(import_ui33.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "width", label: (0,
|
|
1830
|
+
return /* @__PURE__ */ React42.createElement(import_ui33.Stack, { gap: 1.5 }, /* @__PURE__ */ React42.createElement(import_ui33.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "width", label: (0, import_i18n24.__)("Width", "elementor") })), /* @__PURE__ */ React42.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "height", label: (0, import_i18n24.__)("Height", "elementor") }))), /* @__PURE__ */ React42.createElement(import_ui33.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "min-width", label: (0, import_i18n24.__)("Min. Width", "elementor") })), /* @__PURE__ */ React42.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "min-height", label: (0, import_i18n24.__)("Min. Height", "elementor") }))), /* @__PURE__ */ React42.createElement(import_ui33.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "max-width", label: (0, import_i18n24.__)("Max. Width", "elementor") })), /* @__PURE__ */ React42.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "max-height", label: (0, import_i18n24.__)("Max. Height", "elementor") }))), /* @__PURE__ */ React42.createElement(import_ui33.Divider, null), /* @__PURE__ */ React42.createElement(import_ui33.Stack, null, /* @__PURE__ */ React42.createElement(OverflowField, null)));
|
|
1856
1831
|
};
|
|
1857
1832
|
var SizeField = ({ label, bind }) => {
|
|
1858
1833
|
return /* @__PURE__ */ React42.createElement(StylesField, { bind }, /* @__PURE__ */ React42.createElement(import_ui33.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React42.createElement(import_ui33.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React42.createElement(import_editor_controls27.ControlLabel, null, label)), /* @__PURE__ */ React42.createElement(import_ui33.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React42.createElement(import_editor_controls27.SizeControl, null))));
|
|
@@ -1862,9 +1837,9 @@ var SizeField = ({ label, bind }) => {
|
|
|
1862
1837
|
var React43 = __toESM(require("react"));
|
|
1863
1838
|
var import_editor_controls28 = require("@elementor/editor-controls");
|
|
1864
1839
|
var import_ui34 = require("@elementor/ui");
|
|
1865
|
-
var
|
|
1840
|
+
var import_i18n25 = require("@wordpress/i18n");
|
|
1866
1841
|
var SpacingSection = () => {
|
|
1867
|
-
return /* @__PURE__ */ React43.createElement(import_ui34.Stack, { gap: 1.5 }, /* @__PURE__ */ React43.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React43.createElement(import_editor_controls28.LinkedDimensionsControl, { label: (0,
|
|
1842
|
+
return /* @__PURE__ */ React43.createElement(import_ui34.Stack, { gap: 1.5 }, /* @__PURE__ */ React43.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React43.createElement(import_editor_controls28.LinkedDimensionsControl, { label: (0, import_i18n25.__)("Padding", "elementor") })), /* @__PURE__ */ React43.createElement(import_ui34.Divider, null), /* @__PURE__ */ React43.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React43.createElement(import_editor_controls28.LinkedDimensionsControl, { label: (0, import_i18n25.__)("Margin", "elementor") })));
|
|
1868
1843
|
};
|
|
1869
1844
|
|
|
1870
1845
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
@@ -1873,11 +1848,11 @@ var import_ui47 = require("@elementor/ui");
|
|
|
1873
1848
|
|
|
1874
1849
|
// src/components/collapsible-content.tsx
|
|
1875
1850
|
var React44 = __toESM(require("react"));
|
|
1876
|
-
var
|
|
1851
|
+
var import_react12 = require("react");
|
|
1877
1852
|
var import_ui35 = require("@elementor/ui");
|
|
1878
|
-
var
|
|
1853
|
+
var import_i18n26 = require("@wordpress/i18n");
|
|
1879
1854
|
var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
1880
|
-
const [open, setOpen] = (0,
|
|
1855
|
+
const [open, setOpen] = (0, import_react12.useState)(defaultOpen);
|
|
1881
1856
|
const handleToggle = () => {
|
|
1882
1857
|
setOpen((prevOpen) => !prevOpen);
|
|
1883
1858
|
};
|
|
@@ -1891,7 +1866,7 @@ var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
|
1891
1866
|
onClick: handleToggle,
|
|
1892
1867
|
endIcon: /* @__PURE__ */ React44.createElement(CollapseIcon, { open })
|
|
1893
1868
|
},
|
|
1894
|
-
open ? (0,
|
|
1869
|
+
open ? (0, import_i18n26.__)("Show less", "elementor") : (0, import_i18n26.__)("Show more", "elementor")
|
|
1895
1870
|
), /* @__PURE__ */ React44.createElement(import_ui35.Collapse, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
1896
1871
|
};
|
|
1897
1872
|
|
|
@@ -1899,7 +1874,7 @@ var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
|
1899
1874
|
var React45 = __toESM(require("react"));
|
|
1900
1875
|
var import_editor_controls29 = require("@elementor/editor-controls");
|
|
1901
1876
|
var import_ui36 = require("@elementor/ui");
|
|
1902
|
-
var
|
|
1877
|
+
var import_i18n27 = require("@wordpress/i18n");
|
|
1903
1878
|
|
|
1904
1879
|
// src/sync/get-elementor-config.ts
|
|
1905
1880
|
var getElementorConfig = () => {
|
|
@@ -1913,7 +1888,7 @@ var FontFamilyField = () => {
|
|
|
1913
1888
|
if (!fontFamilies) {
|
|
1914
1889
|
return null;
|
|
1915
1890
|
}
|
|
1916
|
-
return /* @__PURE__ */ React45.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React45.createElement(import_ui36.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(import_ui36.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(import_editor_controls29.ControlLabel, null, (0,
|
|
1891
|
+
return /* @__PURE__ */ React45.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React45.createElement(import_ui36.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(import_ui36.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(import_editor_controls29.ControlLabel, null, (0, import_i18n27.__)("Font Family", "elementor"))), /* @__PURE__ */ React45.createElement(import_ui36.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(import_editor_controls29.FontFamilyControl, { fontFamilies }))));
|
|
1917
1892
|
};
|
|
1918
1893
|
var getFontFamilies = () => {
|
|
1919
1894
|
const { controls } = getElementorConfig();
|
|
@@ -1928,112 +1903,122 @@ var getFontFamilies = () => {
|
|
|
1928
1903
|
var React46 = __toESM(require("react"));
|
|
1929
1904
|
var import_editor_controls30 = require("@elementor/editor-controls");
|
|
1930
1905
|
var import_ui37 = require("@elementor/ui");
|
|
1931
|
-
var
|
|
1906
|
+
var import_i18n28 = require("@wordpress/i18n");
|
|
1932
1907
|
var FontSizeField = () => {
|
|
1933
|
-
return /* @__PURE__ */ React46.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React46.createElement(import_ui37.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(import_ui37.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(import_editor_controls30.ControlLabel, null, (0,
|
|
1908
|
+
return /* @__PURE__ */ React46.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React46.createElement(import_ui37.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(import_ui37.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(import_editor_controls30.ControlLabel, null, (0, import_i18n28.__)("Font Size", "elementor"))), /* @__PURE__ */ React46.createElement(import_ui37.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(import_editor_controls30.SizeControl, null))));
|
|
1934
1909
|
};
|
|
1935
1910
|
|
|
1936
1911
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
1937
1912
|
var React47 = __toESM(require("react"));
|
|
1938
1913
|
var import_editor_controls31 = require("@elementor/editor-controls");
|
|
1939
1914
|
var import_ui38 = require("@elementor/ui");
|
|
1940
|
-
var
|
|
1915
|
+
var import_i18n29 = require("@wordpress/i18n");
|
|
1941
1916
|
var fontWeightOptions = [
|
|
1942
|
-
{ label: (0,
|
|
1943
|
-
{ label: (0,
|
|
1944
|
-
{ label: (0,
|
|
1945
|
-
{ label: (0,
|
|
1946
|
-
{ label: (0,
|
|
1917
|
+
{ value: "100", label: (0, import_i18n29.__)("100 - Thin", "elementor") },
|
|
1918
|
+
{ value: "200", label: (0, import_i18n29.__)("200 - Extra Light", "elementor") },
|
|
1919
|
+
{ value: "300", label: (0, import_i18n29.__)("300 - Light", "elementor") },
|
|
1920
|
+
{ value: "400", label: (0, import_i18n29.__)("400 - Normal", "elementor") },
|
|
1921
|
+
{ value: "500", label: (0, import_i18n29.__)("500 - Medium", "elementor") },
|
|
1922
|
+
{ value: "600", label: (0, import_i18n29.__)("600 - Semi Bold", "elementor") },
|
|
1923
|
+
{ value: "700", label: (0, import_i18n29.__)("700 - Bold", "elementor") },
|
|
1924
|
+
{ value: "800", label: (0, import_i18n29.__)("800 - Extra Bold", "elementor") },
|
|
1925
|
+
{ value: "900", label: (0, import_i18n29.__)("900 - Black", "elementor") }
|
|
1947
1926
|
];
|
|
1948
1927
|
var FontWeightField = () => {
|
|
1949
|
-
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React47.createElement(import_ui38.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(import_editor_controls31.ControlLabel, null, (0,
|
|
1928
|
+
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React47.createElement(import_ui38.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(import_editor_controls31.ControlLabel, null, (0, import_i18n29.__)("Font Weight", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(import_editor_controls31.SelectControl, { options: fontWeightOptions }))));
|
|
1950
1929
|
};
|
|
1951
1930
|
|
|
1952
1931
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
1953
1932
|
var React48 = __toESM(require("react"));
|
|
1954
1933
|
var import_editor_controls32 = require("@elementor/editor-controls");
|
|
1955
1934
|
var import_ui39 = require("@elementor/ui");
|
|
1956
|
-
var
|
|
1935
|
+
var import_i18n30 = require("@wordpress/i18n");
|
|
1957
1936
|
var LetterSpacingField = () => {
|
|
1958
|
-
return /* @__PURE__ */ React48.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React48.createElement(import_ui39.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(import_editor_controls32.ControlLabel, null, (0,
|
|
1937
|
+
return /* @__PURE__ */ React48.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React48.createElement(import_ui39.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(import_editor_controls32.ControlLabel, null, (0, import_i18n30.__)("Letter Spacing", "elementor"))), /* @__PURE__ */ React48.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(import_editor_controls32.SizeControl, null))));
|
|
1959
1938
|
};
|
|
1960
1939
|
|
|
1961
1940
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
1962
1941
|
var React49 = __toESM(require("react"));
|
|
1963
1942
|
var import_editor_controls33 = require("@elementor/editor-controls");
|
|
1964
1943
|
var import_ui40 = require("@elementor/ui");
|
|
1965
|
-
var
|
|
1944
|
+
var import_i18n31 = require("@wordpress/i18n");
|
|
1966
1945
|
var LineHeightField = () => {
|
|
1967
|
-
return /* @__PURE__ */ React49.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React49.createElement(import_ui40.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(import_editor_controls33.ControlLabel, null, (0,
|
|
1946
|
+
return /* @__PURE__ */ React49.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React49.createElement(import_ui40.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(import_editor_controls33.ControlLabel, null, (0, import_i18n31.__)("Line Height", "elementor"))), /* @__PURE__ */ React49.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(import_editor_controls33.SizeControl, null))));
|
|
1968
1947
|
};
|
|
1969
1948
|
|
|
1970
1949
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
1971
1950
|
var React50 = __toESM(require("react"));
|
|
1972
1951
|
var import_editor_controls34 = require("@elementor/editor-controls");
|
|
1973
|
-
var
|
|
1952
|
+
var import_icons16 = require("@elementor/icons");
|
|
1974
1953
|
var import_ui41 = require("@elementor/ui");
|
|
1975
|
-
var
|
|
1954
|
+
var import_i18n32 = require("@wordpress/i18n");
|
|
1955
|
+
var StartIcon4 = (0, import_ui41.withDirection)(import_icons16.AlignLeftIcon);
|
|
1956
|
+
var EndIcon4 = (0, import_ui41.withDirection)(import_icons16.AlignRightIcon);
|
|
1976
1957
|
var options7 = [
|
|
1977
1958
|
{
|
|
1978
|
-
value: "
|
|
1979
|
-
label: (0,
|
|
1980
|
-
renderContent: (
|
|
1959
|
+
value: "start",
|
|
1960
|
+
label: (0, import_i18n32.__)("Start", "elementor"),
|
|
1961
|
+
renderContent: () => /* @__PURE__ */ React50.createElement(RotatedIcon, { icon: StartIcon4, size: "tiny" }),
|
|
1962
|
+
showTooltip: true
|
|
1981
1963
|
},
|
|
1982
1964
|
{
|
|
1983
1965
|
value: "center",
|
|
1984
|
-
label: (0,
|
|
1985
|
-
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(
|
|
1966
|
+
label: (0, import_i18n32.__)("Center", "elementor"),
|
|
1967
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(import_icons16.AlignCenterIcon, { fontSize: size }),
|
|
1968
|
+
showTooltip: true
|
|
1986
1969
|
},
|
|
1987
1970
|
{
|
|
1988
|
-
value: "
|
|
1989
|
-
label: (0,
|
|
1990
|
-
renderContent: (
|
|
1971
|
+
value: "end",
|
|
1972
|
+
label: (0, import_i18n32.__)("End", "elementor"),
|
|
1973
|
+
renderContent: () => /* @__PURE__ */ React50.createElement(RotatedIcon, { icon: EndIcon4, size: "tiny" }),
|
|
1974
|
+
showTooltip: true
|
|
1991
1975
|
},
|
|
1992
1976
|
{
|
|
1993
1977
|
value: "justify",
|
|
1994
|
-
label: (0,
|
|
1995
|
-
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(
|
|
1978
|
+
label: (0, import_i18n32.__)("Justify", "elementor"),
|
|
1979
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(import_icons16.AlignJustifiedIcon, { fontSize: size }),
|
|
1980
|
+
showTooltip: true
|
|
1996
1981
|
}
|
|
1997
1982
|
];
|
|
1998
1983
|
var TextAlignmentField = () => {
|
|
1999
|
-
return /* @__PURE__ */ React50.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React50.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(import_editor_controls34.ControlLabel, null, (0,
|
|
1984
|
+
return /* @__PURE__ */ React50.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React50.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(import_editor_controls34.ControlLabel, null, (0, import_i18n32.__)("Alignment", "elementor"))), /* @__PURE__ */ React50.createElement(import_ui41.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React50.createElement(import_editor_controls34.ToggleControl, { options: options7 }))));
|
|
2000
1985
|
};
|
|
2001
1986
|
|
|
2002
1987
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
2003
1988
|
var React51 = __toESM(require("react"));
|
|
2004
1989
|
var import_editor_controls35 = require("@elementor/editor-controls");
|
|
2005
1990
|
var import_ui42 = require("@elementor/ui");
|
|
2006
|
-
var
|
|
1991
|
+
var import_i18n33 = require("@wordpress/i18n");
|
|
2007
1992
|
var TextColorField = () => {
|
|
2008
|
-
return /* @__PURE__ */ React51.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React51.createElement(import_ui42.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(import_editor_controls35.ControlLabel, null, (0,
|
|
1993
|
+
return /* @__PURE__ */ React51.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React51.createElement(import_ui42.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(import_editor_controls35.ControlLabel, null, (0, import_i18n33.__)("Text Color", "elementor"))), /* @__PURE__ */ React51.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(import_editor_controls35.ColorControl, null))));
|
|
2009
1994
|
};
|
|
2010
1995
|
|
|
2011
1996
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
2012
1997
|
var React52 = __toESM(require("react"));
|
|
2013
1998
|
var import_editor_controls36 = require("@elementor/editor-controls");
|
|
2014
|
-
var
|
|
1999
|
+
var import_icons17 = require("@elementor/icons");
|
|
2015
2000
|
var import_ui43 = require("@elementor/ui");
|
|
2016
|
-
var
|
|
2001
|
+
var import_i18n34 = require("@wordpress/i18n");
|
|
2017
2002
|
var options8 = [
|
|
2018
2003
|
{
|
|
2019
2004
|
value: "ltr",
|
|
2020
|
-
label: (0,
|
|
2021
|
-
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(
|
|
2005
|
+
label: (0, import_i18n34.__)("Left to Right", "elementor"),
|
|
2006
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(import_icons17.TextDirectionLtrIcon, { fontSize: size })
|
|
2022
2007
|
},
|
|
2023
2008
|
{
|
|
2024
2009
|
value: "rtl",
|
|
2025
|
-
label: (0,
|
|
2026
|
-
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(
|
|
2010
|
+
label: (0, import_i18n34.__)("Right to Left", "elementor"),
|
|
2011
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(import_icons17.TextDirectionRtlIcon, { fontSize: size })
|
|
2027
2012
|
}
|
|
2028
2013
|
];
|
|
2029
2014
|
var TextDirectionField = () => {
|
|
2030
|
-
return /* @__PURE__ */ React52.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React52.createElement(import_ui43.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(import_ui43.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(import_editor_controls36.ControlLabel, null, (0,
|
|
2015
|
+
return /* @__PURE__ */ React52.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React52.createElement(import_ui43.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(import_ui43.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(import_editor_controls36.ControlLabel, null, (0, import_i18n34.__)("Direction", "elementor"))), /* @__PURE__ */ React52.createElement(import_ui43.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React52.createElement(import_editor_controls36.ToggleControl, { options: options8 }))));
|
|
2031
2016
|
};
|
|
2032
2017
|
|
|
2033
2018
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
2034
2019
|
var React53 = __toESM(require("react"));
|
|
2035
2020
|
var import_editor_controls37 = require("@elementor/editor-controls");
|
|
2036
|
-
var
|
|
2021
|
+
var import_i18n35 = require("@wordpress/i18n");
|
|
2037
2022
|
var initTextStroke = {
|
|
2038
2023
|
$$type: "stroke",
|
|
2039
2024
|
value: {
|
|
@@ -2062,7 +2047,7 @@ var TextStrokeField = () => {
|
|
|
2062
2047
|
return /* @__PURE__ */ React53.createElement(
|
|
2063
2048
|
AddOrRemoveContent,
|
|
2064
2049
|
{
|
|
2065
|
-
label: (0,
|
|
2050
|
+
label: (0, import_i18n35.__)("Text Stroke", "elementor"),
|
|
2066
2051
|
isAdded: hasTextStroke,
|
|
2067
2052
|
onAdd: addTextStroke,
|
|
2068
2053
|
onRemove: removeTextStroke
|
|
@@ -2074,9 +2059,9 @@ var TextStrokeField = () => {
|
|
|
2074
2059
|
// src/components/style-sections/typography-section/text-style-field.tsx
|
|
2075
2060
|
var React54 = __toESM(require("react"));
|
|
2076
2061
|
var import_editor_controls38 = require("@elementor/editor-controls");
|
|
2077
|
-
var
|
|
2062
|
+
var import_icons18 = require("@elementor/icons");
|
|
2078
2063
|
var import_ui44 = require("@elementor/ui");
|
|
2079
|
-
var
|
|
2064
|
+
var import_i18n36 = require("@wordpress/i18n");
|
|
2080
2065
|
var buttonSize = "tiny";
|
|
2081
2066
|
var TextStyleField = () => {
|
|
2082
2067
|
const [fontStyle, setFontStyle] = useStylesField("font-style");
|
|
@@ -2100,7 +2085,7 @@ var TextStyleField = () => {
|
|
|
2100
2085
|
value: newValue
|
|
2101
2086
|
});
|
|
2102
2087
|
};
|
|
2103
|
-
return /* @__PURE__ */ React54.createElement(import_ui44.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(import_ui44.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(import_editor_controls38.ControlLabel, null, (0,
|
|
2088
|
+
return /* @__PURE__ */ React54.createElement(import_ui44.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(import_ui44.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(import_editor_controls38.ControlLabel, null, (0, import_i18n36.__)("Style", "elementor"))), /* @__PURE__ */ React54.createElement(import_ui44.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React54.createElement(import_ui44.ToggleButtonGroup, { value: formats }, /* @__PURE__ */ React54.createElement(
|
|
2104
2089
|
ToggleButton,
|
|
2105
2090
|
{
|
|
2106
2091
|
value: "italic",
|
|
@@ -2108,7 +2093,7 @@ var TextStyleField = () => {
|
|
|
2108
2093
|
"aria-label": "italic",
|
|
2109
2094
|
sx: { marginLeft: "auto" }
|
|
2110
2095
|
},
|
|
2111
|
-
/* @__PURE__ */ React54.createElement(
|
|
2096
|
+
/* @__PURE__ */ React54.createElement(import_icons18.ItalicIcon, { fontSize: buttonSize })
|
|
2112
2097
|
), /* @__PURE__ */ React54.createElement(
|
|
2113
2098
|
ShorthandControl,
|
|
2114
2099
|
{
|
|
@@ -2117,7 +2102,7 @@ var TextStyleField = () => {
|
|
|
2117
2102
|
updateValues: handleSetTextDecoration,
|
|
2118
2103
|
"aria-label": "line-through"
|
|
2119
2104
|
},
|
|
2120
|
-
/* @__PURE__ */ React54.createElement(
|
|
2105
|
+
/* @__PURE__ */ React54.createElement(import_icons18.StrikethroughIcon, { fontSize: buttonSize })
|
|
2121
2106
|
), /* @__PURE__ */ React54.createElement(
|
|
2122
2107
|
ShorthandControl,
|
|
2123
2108
|
{
|
|
@@ -2126,7 +2111,7 @@ var TextStyleField = () => {
|
|
|
2126
2111
|
updateValues: handleSetTextDecoration,
|
|
2127
2112
|
"aria-label": "underline"
|
|
2128
2113
|
},
|
|
2129
|
-
/* @__PURE__ */ React54.createElement(
|
|
2114
|
+
/* @__PURE__ */ React54.createElement(import_icons18.UnderlineIcon, { fontSize: buttonSize })
|
|
2130
2115
|
))));
|
|
2131
2116
|
};
|
|
2132
2117
|
var ShorthandControl = ({
|
|
@@ -2157,35 +2142,44 @@ var ToggleButton = ({ onChange, ...props }) => {
|
|
|
2157
2142
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
2158
2143
|
var React55 = __toESM(require("react"));
|
|
2159
2144
|
var import_editor_controls39 = require("@elementor/editor-controls");
|
|
2160
|
-
var
|
|
2145
|
+
var import_icons19 = require("@elementor/icons");
|
|
2161
2146
|
var import_ui45 = require("@elementor/ui");
|
|
2162
|
-
var
|
|
2147
|
+
var import_i18n37 = require("@wordpress/i18n");
|
|
2163
2148
|
var options9 = [
|
|
2149
|
+
{
|
|
2150
|
+
value: "none",
|
|
2151
|
+
label: (0, import_i18n37.__)("None", "elementor"),
|
|
2152
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(import_icons19.MinusIcon, { fontSize: size }),
|
|
2153
|
+
showTooltip: true
|
|
2154
|
+
},
|
|
2164
2155
|
{
|
|
2165
2156
|
value: "capitalize",
|
|
2166
|
-
label: (0,
|
|
2167
|
-
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(
|
|
2157
|
+
label: (0, import_i18n37.__)("Capitalize", "elementor"),
|
|
2158
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(import_icons19.LetterCaseIcon, { fontSize: size }),
|
|
2159
|
+
showTooltip: true
|
|
2168
2160
|
},
|
|
2169
2161
|
{
|
|
2170
2162
|
value: "uppercase",
|
|
2171
|
-
label: (0,
|
|
2172
|
-
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(
|
|
2163
|
+
label: (0, import_i18n37.__)("Uppercase", "elementor"),
|
|
2164
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(import_icons19.LetterCaseUpperIcon, { fontSize: size }),
|
|
2165
|
+
showTooltip: true
|
|
2173
2166
|
},
|
|
2174
2167
|
{
|
|
2175
2168
|
value: "lowercase",
|
|
2176
|
-
label: (0,
|
|
2177
|
-
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(
|
|
2169
|
+
label: (0, import_i18n37.__)("Lowercase", "elementor"),
|
|
2170
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(import_icons19.LetterCaseLowerIcon, { fontSize: size }),
|
|
2171
|
+
showTooltip: true
|
|
2178
2172
|
}
|
|
2179
2173
|
];
|
|
2180
|
-
var TransformField = () => /* @__PURE__ */ React55.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React55.createElement(import_ui45.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(import_editor_controls39.ControlLabel, null, (0,
|
|
2174
|
+
var TransformField = () => /* @__PURE__ */ React55.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React55.createElement(import_ui45.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(import_editor_controls39.ControlLabel, null, (0, import_i18n37.__)("Text Transform", "elementor"))), /* @__PURE__ */ React55.createElement(import_ui45.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React55.createElement(import_editor_controls39.ToggleControl, { options: options9 }))));
|
|
2181
2175
|
|
|
2182
2176
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
2183
2177
|
var React56 = __toESM(require("react"));
|
|
2184
2178
|
var import_editor_controls40 = require("@elementor/editor-controls");
|
|
2185
2179
|
var import_ui46 = require("@elementor/ui");
|
|
2186
|
-
var
|
|
2180
|
+
var import_i18n38 = require("@wordpress/i18n");
|
|
2187
2181
|
var WordSpacingField = () => {
|
|
2188
|
-
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React56.createElement(import_ui46.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(import_editor_controls40.ControlLabel, null, (0,
|
|
2182
|
+
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React56.createElement(import_ui46.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(import_editor_controls40.ControlLabel, null, (0, import_i18n38.__)("Word Spacing", "elementor"))), /* @__PURE__ */ React56.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(import_editor_controls40.SizeControl, null))));
|
|
2189
2183
|
};
|
|
2190
2184
|
|
|
2191
2185
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
@@ -2198,7 +2192,7 @@ var CLASSES_PROP_KEY = "classes";
|
|
|
2198
2192
|
var StyleTab = () => {
|
|
2199
2193
|
const currentClassesProp = useCurrentClassesProp();
|
|
2200
2194
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
2201
|
-
const [activeStyleState, setActiveStyleState] = (0,
|
|
2195
|
+
const [activeStyleState, setActiveStyleState] = (0, import_react13.useState)(null);
|
|
2202
2196
|
const breakpoint = (0, import_editor_responsive.useActiveBreakpoint)();
|
|
2203
2197
|
return /* @__PURE__ */ React58.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React58.createElement(
|
|
2204
2198
|
StyleProvider,
|
|
@@ -2211,11 +2205,11 @@ var StyleTab = () => {
|
|
|
2211
2205
|
},
|
|
2212
2206
|
setMetaState: setActiveStyleState
|
|
2213
2207
|
},
|
|
2214
|
-
/* @__PURE__ */ React58.createElement(
|
|
2208
|
+
/* @__PURE__ */ React58.createElement(import_session3.SessionStorageProvider, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React58.createElement(CssClassSelector, null), /* @__PURE__ */ React58.createElement(import_ui48.Divider, null), /* @__PURE__ */ React58.createElement(SectionsList, null, /* @__PURE__ */ React58.createElement(Section, { title: (0, import_i18n39.__)("Layout", "elementor") }, /* @__PURE__ */ React58.createElement(LayoutSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: (0, import_i18n39.__)("Spacing", "elementor") }, /* @__PURE__ */ React58.createElement(SpacingSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: (0, import_i18n39.__)("Size", "elementor") }, /* @__PURE__ */ React58.createElement(SizeSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: (0, import_i18n39.__)("Position", "elementor") }, /* @__PURE__ */ React58.createElement(PositionSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: (0, import_i18n39.__)("Typography", "elementor") }, /* @__PURE__ */ React58.createElement(TypographySection, null)), /* @__PURE__ */ React58.createElement(Section, { title: (0, import_i18n39.__)("Background", "elementor") }, /* @__PURE__ */ React58.createElement(BackgroundSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: (0, import_i18n39.__)("Border", "elementor") }, /* @__PURE__ */ React58.createElement(BorderSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: (0, import_i18n39.__)("Effects", "elementor") }, /* @__PURE__ */ React58.createElement(EffectsSection, null))))
|
|
2215
2209
|
));
|
|
2216
2210
|
};
|
|
2217
2211
|
function useActiveStyleDefId(currentClassesProp) {
|
|
2218
|
-
const [activeStyledDefId, setActiveStyledDefId] = (0,
|
|
2212
|
+
const [activeStyledDefId, setActiveStyledDefId] = (0, import_react13.useState)(null);
|
|
2219
2213
|
const fallback = useFirstElementStyleDef(currentClassesProp);
|
|
2220
2214
|
return [activeStyledDefId || fallback?.id || null, setActiveStyledDefId];
|
|
2221
2215
|
}
|
|
@@ -2243,7 +2237,7 @@ var EditingPanelTabs = () => {
|
|
|
2243
2237
|
return (
|
|
2244
2238
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
2245
2239
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
2246
|
-
/* @__PURE__ */ React59.createElement(
|
|
2240
|
+
/* @__PURE__ */ React59.createElement(import_react14.Fragment, { key: element.id }, /* @__PURE__ */ React59.createElement(import_ui49.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React59.createElement(import_ui49.Tabs, { variant: "fullWidth", indicatorColor: "secondary", textColor: "inherit", ...getTabsProps() }, /* @__PURE__ */ React59.createElement(import_ui49.Tab, { label: (0, import_i18n40.__)("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React59.createElement(import_ui49.Tab, { label: (0, import_i18n40.__)("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React59.createElement(import_ui49.Divider, null), /* @__PURE__ */ React59.createElement(import_ui49.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React59.createElement(SettingsTab, null)), /* @__PURE__ */ React59.createElement(import_ui49.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React59.createElement(StyleTab, null))))
|
|
2247
2241
|
);
|
|
2248
2242
|
};
|
|
2249
2243
|
|
|
@@ -2256,8 +2250,8 @@ var EditingPanel = () => {
|
|
|
2256
2250
|
if (!element || !elementType) {
|
|
2257
2251
|
return null;
|
|
2258
2252
|
}
|
|
2259
|
-
const panelTitle = (0,
|
|
2260
|
-
return /* @__PURE__ */ React60.createElement(import_ui50.ErrorBoundary, { fallback: /* @__PURE__ */ React60.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React60.createElement(
|
|
2253
|
+
const panelTitle = (0, import_i18n41.__)("Edit %s", "elementor").replace("%s", elementType.title);
|
|
2254
|
+
return /* @__PURE__ */ React60.createElement(import_ui50.ErrorBoundary, { fallback: /* @__PURE__ */ React60.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React60.createElement(import_session4.SessionStorageProvider, { prefix: "elementor" }, /* @__PURE__ */ React60.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React60.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React60.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle)), /* @__PURE__ */ React60.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React60.createElement(import_editor_controls41.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React60.createElement(import_editor_controls41.ControlReplacementProvider, { ...controlReplacement }, /* @__PURE__ */ React60.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React60.createElement(EditingPanelTabs, null))))))));
|
|
2261
2255
|
};
|
|
2262
2256
|
|
|
2263
2257
|
// src/panel.ts
|
|
@@ -2269,12 +2263,12 @@ var { panel, usePanelActions, usePanelStatus } = (0, import_editor_panels2.__cre
|
|
|
2269
2263
|
// src/init.ts
|
|
2270
2264
|
var import_editor = require("@elementor/editor");
|
|
2271
2265
|
var import_editor_panels3 = require("@elementor/editor-panels");
|
|
2272
|
-
var
|
|
2266
|
+
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
2273
2267
|
|
|
2274
2268
|
// src/hooks/use-close-editor-panel.ts
|
|
2275
|
-
var
|
|
2269
|
+
var import_react15 = require("react");
|
|
2276
2270
|
var import_editor_elements9 = require("@elementor/editor-elements");
|
|
2277
|
-
var
|
|
2271
|
+
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
2278
2272
|
|
|
2279
2273
|
// src/sync/is-atomic-widget-selected.ts
|
|
2280
2274
|
var import_editor_elements8 = require("@elementor/editor-elements");
|
|
@@ -2290,8 +2284,8 @@ var isAtomicWidgetSelected = () => {
|
|
|
2290
2284
|
// src/hooks/use-close-editor-panel.ts
|
|
2291
2285
|
var useCloseEditorPanel = () => {
|
|
2292
2286
|
const { close } = usePanelActions();
|
|
2293
|
-
return (0,
|
|
2294
|
-
return (0,
|
|
2287
|
+
return (0, import_react15.useEffect)(() => {
|
|
2288
|
+
return (0, import_editor_v1_adapters3.__privateListenTo)((0, import_editor_v1_adapters3.commandStartEvent)("document/elements/delete"), (e) => {
|
|
2295
2289
|
const selectedElement = (0, import_editor_elements9.getSelectedElements)()[0];
|
|
2296
2290
|
const { container: deletedContainer } = e?.args;
|
|
2297
2291
|
const isSelectedElementInDeletedContainer = deletedContainer && selectedElement && (0, import_editor_elements9.isElementInContainer)(selectedElement, deletedContainer);
|
|
@@ -2303,12 +2297,12 @@ var useCloseEditorPanel = () => {
|
|
|
2303
2297
|
};
|
|
2304
2298
|
|
|
2305
2299
|
// src/hooks/use-open-editor-panel.ts
|
|
2306
|
-
var
|
|
2307
|
-
var
|
|
2300
|
+
var import_react16 = require("react");
|
|
2301
|
+
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
2308
2302
|
var useOpenEditorPanel = () => {
|
|
2309
2303
|
const { open } = usePanelActions();
|
|
2310
|
-
(0,
|
|
2311
|
-
return (0,
|
|
2304
|
+
(0, import_react16.useEffect)(() => {
|
|
2305
|
+
return (0, import_editor_v1_adapters4.__privateListenTo)((0, import_editor_v1_adapters4.commandStartEvent)("panel/editor/open"), () => {
|
|
2312
2306
|
if (isAtomicWidgetSelected()) {
|
|
2313
2307
|
open();
|
|
2314
2308
|
}
|
|
@@ -2325,17 +2319,18 @@ var EditingPanelHooks = () => {
|
|
|
2325
2319
|
|
|
2326
2320
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
2327
2321
|
var React63 = __toESM(require("react"));
|
|
2328
|
-
var
|
|
2322
|
+
var import_react20 = require("react");
|
|
2329
2323
|
var import_editor_controls45 = require("@elementor/editor-controls");
|
|
2330
|
-
var
|
|
2324
|
+
var import_icons21 = require("@elementor/icons");
|
|
2331
2325
|
var import_ui52 = require("@elementor/ui");
|
|
2332
|
-
var
|
|
2326
|
+
var import_i18n43 = require("@wordpress/i18n");
|
|
2333
2327
|
|
|
2334
2328
|
// src/hooks/use-persist-dynamic-value.ts
|
|
2329
|
+
var import_session5 = require("@elementor/session");
|
|
2335
2330
|
var usePersistDynamicValue = (propKey) => {
|
|
2336
2331
|
const { element } = useElement();
|
|
2337
2332
|
const prefixedKey = `dynamic/non-dynamic-values-history/${element.id}/${propKey}`;
|
|
2338
|
-
return useSessionStorage(prefixedKey);
|
|
2333
|
+
return (0, import_session5.useSessionStorage)(prefixedKey);
|
|
2339
2334
|
};
|
|
2340
2335
|
|
|
2341
2336
|
// src/dynamics/dynamic-control.tsx
|
|
@@ -2343,10 +2338,10 @@ var React61 = __toESM(require("react"));
|
|
|
2343
2338
|
var import_editor_controls43 = require("@elementor/editor-controls");
|
|
2344
2339
|
|
|
2345
2340
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
2346
|
-
var
|
|
2341
|
+
var import_react18 = require("react");
|
|
2347
2342
|
|
|
2348
2343
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
2349
|
-
var
|
|
2344
|
+
var import_react17 = require("react");
|
|
2350
2345
|
var import_editor_controls42 = require("@elementor/editor-controls");
|
|
2351
2346
|
|
|
2352
2347
|
// src/dynamics/sync/get-elementor-config.ts
|
|
@@ -2398,7 +2393,7 @@ var usePropDynamicTags = () => {
|
|
|
2398
2393
|
const propDynamicType = getDynamicPropType(propType);
|
|
2399
2394
|
categories = propDynamicType?.settings.categories || [];
|
|
2400
2395
|
}
|
|
2401
|
-
return (0,
|
|
2396
|
+
return (0, import_react17.useMemo)(() => getDynamicTagsByCategories(categories), [categories.join()]);
|
|
2402
2397
|
};
|
|
2403
2398
|
var getDynamicTagsByCategories = (categories) => {
|
|
2404
2399
|
const dynamicTags = getAtomicDynamicTags();
|
|
@@ -2414,7 +2409,7 @@ var getDynamicTagsByCategories = (categories) => {
|
|
|
2414
2409
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
2415
2410
|
var useDynamicTag = (tagName) => {
|
|
2416
2411
|
const dynamicTags = usePropDynamicTags();
|
|
2417
|
-
return (0,
|
|
2412
|
+
return (0, import_react18.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
2418
2413
|
};
|
|
2419
2414
|
|
|
2420
2415
|
// src/dynamics/dynamic-control.tsx
|
|
@@ -2443,14 +2438,14 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
2443
2438
|
|
|
2444
2439
|
// src/dynamics/components/dynamic-selection.tsx
|
|
2445
2440
|
var React62 = __toESM(require("react"));
|
|
2446
|
-
var
|
|
2441
|
+
var import_react19 = require("react");
|
|
2447
2442
|
var import_editor_controls44 = require("@elementor/editor-controls");
|
|
2448
|
-
var
|
|
2443
|
+
var import_icons20 = require("@elementor/icons");
|
|
2449
2444
|
var import_ui51 = require("@elementor/ui");
|
|
2450
|
-
var
|
|
2445
|
+
var import_i18n42 = require("@wordpress/i18n");
|
|
2451
2446
|
var SIZE3 = "tiny";
|
|
2452
2447
|
var DynamicSelection = ({ onSelect }) => {
|
|
2453
|
-
const [searchValue, setSearchValue] = (0,
|
|
2448
|
+
const [searchValue, setSearchValue] = (0, import_react19.useState)("");
|
|
2454
2449
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
2455
2450
|
const { value: anyValue } = (0, import_editor_controls44.useBoundProp)();
|
|
2456
2451
|
const { bind, value: dynamicValue, setValue } = (0, import_editor_controls44.useBoundProp)(dynamicPropTypeUtil);
|
|
@@ -2474,12 +2469,12 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2474
2469
|
size: SIZE3,
|
|
2475
2470
|
value: searchValue,
|
|
2476
2471
|
onChange: handleSearch,
|
|
2477
|
-
placeholder: (0,
|
|
2472
|
+
placeholder: (0, import_i18n42.__)("Search dynamic tag", "elementor"),
|
|
2478
2473
|
InputProps: {
|
|
2479
|
-
startAdornment: /* @__PURE__ */ React62.createElement(import_ui51.InputAdornment, { position: "start" }, /* @__PURE__ */ React62.createElement(
|
|
2474
|
+
startAdornment: /* @__PURE__ */ React62.createElement(import_ui51.InputAdornment, { position: "start" }, /* @__PURE__ */ React62.createElement(import_icons20.SearchIcon, { fontSize: SIZE3 }))
|
|
2480
2475
|
}
|
|
2481
2476
|
}
|
|
2482
|
-
)), /* @__PURE__ */ React62.createElement(import_ui51.Divider, null), /* @__PURE__ */ React62.createElement(import_ui51.Box, { sx: { overflowY: "auto", height: 260, width: 220 } }, options10.length > 0 ? /* @__PURE__ */ React62.createElement(import_ui51.MenuList, { role: "listbox", tabIndex: 0 }, options10.map(([category, items3], index) => /* @__PURE__ */ React62.createElement(
|
|
2477
|
+
)), /* @__PURE__ */ React62.createElement(import_ui51.Divider, null), /* @__PURE__ */ React62.createElement(import_ui51.Box, { sx: { overflowY: "auto", height: 260, width: 220 } }, options10.length > 0 ? /* @__PURE__ */ React62.createElement(import_ui51.MenuList, { role: "listbox", tabIndex: 0 }, options10.map(([category, items3], index) => /* @__PURE__ */ React62.createElement(import_react19.Fragment, { key: index }, /* @__PURE__ */ React62.createElement(import_ui51.ListSubheader, { sx: { typography: "caption", color: "text.tertiary" } }, dynamicGroups?.[category]?.title || category), items3.map(({ value, label: tagLabel }) => {
|
|
2483
2478
|
const isSelected = isCurrentValueDynamic && value === dynamicValue?.name;
|
|
2484
2479
|
return /* @__PURE__ */ React62.createElement(
|
|
2485
2480
|
import_ui51.MenuItem,
|
|
@@ -2492,7 +2487,7 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2492
2487
|
},
|
|
2493
2488
|
tagLabel
|
|
2494
2489
|
);
|
|
2495
|
-
})))) : /* @__PURE__ */ React62.createElement(import_ui51.Stack, { alignItems: "center", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React62.createElement(
|
|
2490
|
+
})))) : /* @__PURE__ */ React62.createElement(import_ui51.Stack, { alignItems: "center", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React62.createElement(import_icons20.PhotoIcon, { fontSize: "large" }), /* @__PURE__ */ React62.createElement(import_ui51.Typography, { align: "center", variant: "caption", color: "text.secondary" }, (0, import_i18n42.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React62.createElement("br", null), "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React62.createElement(import_ui51.Typography, { align: "center", variant: "caption", color: "text.secondary" }, /* @__PURE__ */ React62.createElement(
|
|
2496
2491
|
import_ui51.Link,
|
|
2497
2492
|
{
|
|
2498
2493
|
color: "secondary",
|
|
@@ -2500,8 +2495,8 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2500
2495
|
component: "button",
|
|
2501
2496
|
onClick: () => setSearchValue("")
|
|
2502
2497
|
},
|
|
2503
|
-
(0,
|
|
2504
|
-
), "\xA0", (0,
|
|
2498
|
+
(0, import_i18n42.__)("Clear the filters", "elementor")
|
|
2499
|
+
), "\xA0", (0, import_i18n42.__)("and try again.", "elementor")))));
|
|
2505
2500
|
};
|
|
2506
2501
|
var useFilteredOptions = (searchValue) => {
|
|
2507
2502
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -2526,7 +2521,7 @@ var DynamicSelectionControl = () => {
|
|
|
2526
2521
|
const { bind, value } = (0, import_editor_controls45.useBoundProp)(dynamicPropTypeUtil);
|
|
2527
2522
|
const [propValueFromHistory] = usePersistDynamicValue(bind);
|
|
2528
2523
|
const { name: tagName = "" } = value;
|
|
2529
|
-
const selectionPopoverId = (0,
|
|
2524
|
+
const selectionPopoverId = (0, import_react20.useId)();
|
|
2530
2525
|
const selectionPopoverState = (0, import_ui52.usePopupState)({ variant: "popover", popupId: selectionPopoverId });
|
|
2531
2526
|
const dynamicTag = useDynamicTag(tagName);
|
|
2532
2527
|
const removeDynamicTag = () => {
|
|
@@ -2541,16 +2536,16 @@ var DynamicSelectionControl = () => {
|
|
|
2541
2536
|
fullWidth: true,
|
|
2542
2537
|
showActionsOnHover: true,
|
|
2543
2538
|
label: dynamicTag.label,
|
|
2544
|
-
startIcon: /* @__PURE__ */ React63.createElement(
|
|
2539
|
+
startIcon: /* @__PURE__ */ React63.createElement(import_icons21.DatabaseIcon, { fontSize: SIZE4 }),
|
|
2545
2540
|
...(0, import_ui52.bindTrigger)(selectionPopoverState),
|
|
2546
2541
|
actions: /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React63.createElement(
|
|
2547
2542
|
import_ui52.IconButton,
|
|
2548
2543
|
{
|
|
2549
2544
|
size: SIZE4,
|
|
2550
2545
|
onClick: removeDynamicTag,
|
|
2551
|
-
"aria-label": (0,
|
|
2546
|
+
"aria-label": (0, import_i18n43.__)("Remove dynamic value", "elementor")
|
|
2552
2547
|
},
|
|
2553
|
-
/* @__PURE__ */ React63.createElement(
|
|
2548
|
+
/* @__PURE__ */ React63.createElement(import_icons21.XIcon, { fontSize: SIZE4 })
|
|
2554
2549
|
))
|
|
2555
2550
|
}
|
|
2556
2551
|
), /* @__PURE__ */ React63.createElement(
|
|
@@ -2561,11 +2556,11 @@ var DynamicSelectionControl = () => {
|
|
|
2561
2556
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
2562
2557
|
...(0, import_ui52.bindPopover)(selectionPopoverState)
|
|
2563
2558
|
},
|
|
2564
|
-
/* @__PURE__ */ React63.createElement(import_ui52.Stack, null, /* @__PURE__ */ React63.createElement(import_ui52.Stack, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React63.createElement(
|
|
2559
|
+
/* @__PURE__ */ React63.createElement(import_ui52.Stack, null, /* @__PURE__ */ React63.createElement(import_ui52.Stack, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React63.createElement(import_icons21.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React63.createElement(import_ui52.Typography, { variant: "subtitle2" }, (0, import_i18n43.__)("Dynamic Tags", "elementor")), /* @__PURE__ */ React63.createElement(import_ui52.IconButton, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React63.createElement(import_icons21.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React63.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
2565
2560
|
));
|
|
2566
2561
|
};
|
|
2567
2562
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
2568
|
-
const popupId = (0,
|
|
2563
|
+
const popupId = (0, import_react20.useId)();
|
|
2569
2564
|
const settingsPopupState = (0, import_ui52.usePopupState)({ variant: "popover", popupId });
|
|
2570
2565
|
const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
|
|
2571
2566
|
if (!hasDynamicSettings) {
|
|
@@ -2576,9 +2571,9 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
2576
2571
|
{
|
|
2577
2572
|
size: SIZE4,
|
|
2578
2573
|
...(0, import_ui52.bindTrigger)(settingsPopupState),
|
|
2579
|
-
"aria-label": (0,
|
|
2574
|
+
"aria-label": (0, import_i18n43.__)("Settings", "elementor")
|
|
2580
2575
|
},
|
|
2581
|
-
/* @__PURE__ */ React63.createElement(
|
|
2576
|
+
/* @__PURE__ */ React63.createElement(import_icons21.SettingsIcon, { fontSize: SIZE4 })
|
|
2582
2577
|
), /* @__PURE__ */ React63.createElement(
|
|
2583
2578
|
import_ui52.Popover,
|
|
2584
2579
|
{
|
|
@@ -2586,7 +2581,7 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
2586
2581
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
2587
2582
|
...(0, import_ui52.bindPopover)(settingsPopupState)
|
|
2588
2583
|
},
|
|
2589
|
-
/* @__PURE__ */ React63.createElement(import_ui52.Paper, { component: import_ui52.Stack, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React63.createElement(import_ui52.Stack, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React63.createElement(
|
|
2584
|
+
/* @__PURE__ */ React63.createElement(import_ui52.Paper, { component: import_ui52.Stack, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React63.createElement(import_ui52.Stack, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React63.createElement(import_icons21.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React63.createElement(import_ui52.Typography, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React63.createElement(import_ui52.IconButton, { sx: { ml: "auto" }, size: SIZE4, onClick: settingsPopupState.close }, /* @__PURE__ */ React63.createElement(import_icons21.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React63.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
2590
2585
|
));
|
|
2591
2586
|
};
|
|
2592
2587
|
var DynamicSettings = ({ controls }) => {
|
|
@@ -2614,15 +2609,15 @@ var Control3 = ({ control }) => {
|
|
|
2614
2609
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
2615
2610
|
var React64 = __toESM(require("react"));
|
|
2616
2611
|
var import_editor_controls46 = require("@elementor/editor-controls");
|
|
2617
|
-
var
|
|
2618
|
-
var
|
|
2612
|
+
var import_icons22 = require("@elementor/icons");
|
|
2613
|
+
var import_i18n44 = require("@wordpress/i18n");
|
|
2619
2614
|
var usePropDynamicAction = () => {
|
|
2620
2615
|
const { propType } = (0, import_editor_controls46.useBoundProp)();
|
|
2621
2616
|
const visible = !!propType && supportsDynamic(propType);
|
|
2622
2617
|
return {
|
|
2623
2618
|
visible,
|
|
2624
|
-
icon:
|
|
2625
|
-
title: (0,
|
|
2619
|
+
icon: import_icons22.DatabaseIcon,
|
|
2620
|
+
title: (0, import_i18n44.__)("Dynamic Tags", "elementor"),
|
|
2626
2621
|
popoverContent: ({ closePopover }) => /* @__PURE__ */ React64.createElement(DynamicSelection, { onSelect: closePopover })
|
|
2627
2622
|
};
|
|
2628
2623
|
};
|
|
@@ -2651,7 +2646,7 @@ function init2() {
|
|
|
2651
2646
|
init();
|
|
2652
2647
|
}
|
|
2653
2648
|
var blockV1Panel = () => {
|
|
2654
|
-
(0,
|
|
2649
|
+
(0, import_editor_v1_adapters5.blockCommand)({
|
|
2655
2650
|
command: "panel/editor/open",
|
|
2656
2651
|
condition: isAtomicWidgetSelected
|
|
2657
2652
|
});
|